refactor: prepare for multi machine config
This commit is contained in:
parent
844b0cfdfb
commit
fe5efac384
126 changed files with 59 additions and 50 deletions
30
common/default.nix
Normal file
30
common/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
({ nixpkgs, ... }: {
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_CA.UTF-8";
|
||||
console = {
|
||||
keyMap = "ca";
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix = {
|
||||
# Edit nix.conf
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
keep-outputs = true;
|
||||
keep-derivations = true;
|
||||
auto-optimise-store = true;
|
||||
warn-dirty = false;
|
||||
};
|
||||
|
||||
# Minimize dowloads of indirect nixpkgs flakes
|
||||
registry.nixpkgs = {
|
||||
flake = nixpkgs;
|
||||
exact = false;
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
./overlays/list.nix
|
||||
];
|
||||
})
|
|
@ -44,40 +44,25 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, nur, ... }@attrs: {
|
||||
outputs = { self, nixpkgs, home-manager, nur, ... }@attrs: let
|
||||
defaultModules = [
|
||||
nur.nixosModules.nur
|
||||
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.extraSpecialArgs = attrs;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
}
|
||||
|
||||
./common/default.nix
|
||||
];
|
||||
in {
|
||||
nixosConfigurations.wim = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = attrs;
|
||||
modules = [
|
||||
nur.nixosModules.nur
|
||||
|
||||
({ ... }: {
|
||||
nix = {
|
||||
# Edit nix.conf
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
keep-outputs = true;
|
||||
keep-derivations = true;
|
||||
auto-optimise-store = true;
|
||||
warn-dirty = false;
|
||||
};
|
||||
|
||||
# Minimize dowloads of indirect nixpkgs flakes
|
||||
registry = {
|
||||
nixpkgs.flake = self.inputs.nixpkgs;
|
||||
nixpkgs.exact = false;
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.extraSpecialArgs = attrs;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
}
|
||||
|
||||
./configuration.nix
|
||||
];
|
||||
./hosts/wim/configuration.nix
|
||||
] ++ defaultModules;
|
||||
};
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue