refactor: pointless abstraction for fun

This commit is contained in:
Youwen Wu 2024-10-25 14:44:25 -07:00
parent 01b1b13b6a
commit c9024ba8b7
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
2 changed files with 25 additions and 22 deletions

View file

@ -90,6 +90,9 @@
flake-parts, flake-parts,
... ...
}: }:
let
buildLiminalOS = import ./lib/buildLiminalOS.nix;
in
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ systems = [
"x86_64-linux" "x86_64-linux"
@ -98,30 +101,17 @@
]; ];
flake = { flake = {
nixosConfigurations = { nixosConfigurations = {
demeter = nixpkgs.lib.nixosSystem { demeter = buildLiminalOS {
specialArgs = { inherit inputs nixpkgs;
inherit inputs; systemModule = ./hosts/demeter;
}; };
modules = [ callisto = buildLiminalOS {
./hosts/demeter inherit nixpkgs inputs;
]; systemModule = ./hosts/callisto;
}; };
adrastea = buildLiminalOS {
callisto = nixpkgs.lib.nixosSystem { inherit inputs nixpkgs;
specialArgs = { systemModule = ./hosts/adrastea;
inherit inputs;
};
modules = [
./hosts/callisto
];
};
adrastea = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
};
modules = [
./hosts/adrastea
];
}; };
}; };
darwinConfigurations.phobos = nix-darwin.lib.darwinSystem { darwinConfigurations.phobos = nix-darwin.lib.darwinSystem {

13
lib/buildLiminalOS.nix Normal file
View file

@ -0,0 +1,13 @@
{
nixpkgs,
inputs,
systemModule,
}:
nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
};
modules = [
systemModule
];
}