write it programmatically
This commit is contained in:
parent
2d7a917bcb
commit
9e7a252e8a
2 changed files with 13 additions and 37 deletions
50
flake.nix
50
flake.nix
|
|
@ -58,48 +58,24 @@
|
||||||
];
|
];
|
||||||
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
|
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
|
||||||
makePkgs = system: import nixpkgs { inherit system; };
|
makePkgs = system: import nixpkgs { inherit system; };
|
||||||
|
makeNixosConfig = configName: nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
modules = [ ./hosts/${configName}/configuration.nix ];
|
||||||
|
};
|
||||||
|
configNames = builtins.attrNames (builtins.readDir ./hosts);
|
||||||
|
|
||||||
|
makeNixosConfigurations = config_folder:
|
||||||
|
let
|
||||||
|
configNames = builtins.attrNames (builtins.readDir config_folder);
|
||||||
|
in
|
||||||
|
nixpkgs.lib.genAttrs configNames (name: makeNixosConfig name);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = makeNixosConfigurations ./hosts;
|
||||||
tartarus = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [ ./hosts/tartarus/configuration.nix ];
|
|
||||||
};
|
|
||||||
ymir = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [ ./hosts/ymir/configuration.nix ];
|
|
||||||
};
|
|
||||||
harmonica = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [ ./hosts/harmonica/configuration.nix ];
|
|
||||||
};
|
|
||||||
harmonica-sd = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [ ./hosts/harmonica-sd/configuration.nix ];
|
|
||||||
};
|
|
||||||
pochita = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [ ./hosts/pochita/configuration.nix ];
|
|
||||||
};
|
|
||||||
pochita-sd = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [ ./hosts/pochita-sd/configuration.nix ];
|
|
||||||
};
|
|
||||||
myISO = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [
|
|
||||||
./hosts/iso/configuration.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
wallfacer = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [ ./hosts/wallfacer/configuration.nix ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
|
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||||
extraSpecialArgs = { inherit inputs outputs; };
|
extraSpecialArgs = { inherit inputs outputs; };
|
||||||
pkgs = import nixpkgs { system = "aarch64-linux"; };
|
pkgs = import nixpkgs { system = "aarch64-linux"; };
|
||||||
modules = [ ./hosts/atreus/configuration.nix ];
|
modules = [ ./nixOnDroidHosts/atreus/configuration.nix ];
|
||||||
};
|
};
|
||||||
|
|
||||||
lib = import ./lib { inherit (nixpkgs) lib; };
|
lib = import ./lib { inherit (nixpkgs) lib; };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue