cleanup code, migrate to modules + start rewriting ddt4all derivation
This commit is contained in:
@ -2,21 +2,29 @@
|
||||
|
||||
let
|
||||
inherit (self) inputs;
|
||||
system = "x86_64-linux";
|
||||
homeDir = self + /profiles;
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
mkSystem = pkgs: hostname:
|
||||
pkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
./base-configuration.nix
|
||||
./${hostname}
|
||||
homeDir
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
|
||||
mkSystem = {
|
||||
system,
|
||||
hostname,
|
||||
useHomeManager ? true,
|
||||
modules ? []
|
||||
}: inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./base-configuration.nix
|
||||
./${hostname}
|
||||
homeDir
|
||||
] ++ (
|
||||
if useHomeManager then
|
||||
[ inputs.home-manager.nixosModules.home-manager ]
|
||||
else
|
||||
[ ]
|
||||
) ++ modules;
|
||||
};
|
||||
in {
|
||||
hulk = mkSystem inputs.nixpkgs "hulk";
|
||||
hulk = mkSystem {
|
||||
system = "x86_64-linux";
|
||||
hostname = "hulk";
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user