nod: Fifth attempt at flakes
Also simplified a few things, nice
This commit is contained in:
parent
e56514890d
commit
bac1813c77
22
flake.nix
22
flake.nix
|
@ -38,35 +38,38 @@
|
|||
|
||||
outputs = { self, nixpkgs, disko, nixos-hardware, nix-on-droid, home-manager, stylix, nixvim, nixgl, nur, ... }:
|
||||
let
|
||||
sharedOverlays = [
|
||||
nixgl.overlay
|
||||
];
|
||||
nixpkgsConfig = {
|
||||
overlays = [
|
||||
nixgl.overlay
|
||||
];
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
lib = {
|
||||
nixosSystem = { system, modules ? [ ] }: nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = modules ++ [
|
||||
self.nixosModules.dotfiles
|
||||
{
|
||||
nixpkgs.overlays = sharedOverlays;
|
||||
nixpkgs = nixpkgsConfig;
|
||||
home-manager.sharedModules = [ self.homeManagerModules.dotfiles ];
|
||||
}
|
||||
];
|
||||
};
|
||||
nixOnDroidConfiguration = { modules ? [ ] }: nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
pkgs = import nixpkgs (nixpkgsConfig // {
|
||||
system = "aarch64-linux"; # nod doesn't support anything else
|
||||
});
|
||||
modules = modules ++ [
|
||||
self.nixOnDroidModules.dotfiles
|
||||
{
|
||||
# TODO Can't use overlays, see
|
||||
# https://github.com/nix-community/nix-on-droid/blob/039379abeee67144d4094d80bbdaf183fb2eabe5/modules/nixpkgs/options.nix#L166
|
||||
home-manager.sharedModules = [ self.homeManagerModules.dotfiles ];
|
||||
}
|
||||
];
|
||||
};
|
||||
homeManagerConfiguration = { system, modules ? [ ] }: home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
pkgs = import nixpkgs (nixpkgsConfig // {
|
||||
inherit system;
|
||||
overlays = sharedOverlays;
|
||||
};
|
||||
});
|
||||
modules = modules ++ [ self.homeManagerModules.dotfiles ];
|
||||
};
|
||||
};
|
||||
|
@ -83,6 +86,7 @@
|
|||
nixOnDroidModules.dotfiles = {
|
||||
imports = [
|
||||
./nod
|
||||
# home-manager is included
|
||||
];
|
||||
};
|
||||
homeManagerModules.dotfiles = {
|
||||
|
|
|
@ -19,6 +19,5 @@
|
|||
warn-dirty = false;
|
||||
};
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
system.stateVersion = "23.11";
|
||||
terminal.font = "${
|
||||
pkgs.nerdfonts.override {
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
git # Needed for all the fetchFromGit in this repo on nixos-rebuild
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
warn-dirty = false;
|
||||
|
|
Loading…
Reference in a new issue