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,
...
}:
let
buildLiminalOS = import ./lib/buildLiminalOS.nix;
in
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
@ -98,30 +101,17 @@
];
flake = {
nixosConfigurations = {
demeter = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
demeter = buildLiminalOS {
inherit inputs nixpkgs;
systemModule = ./hosts/demeter;
};
modules = [
./hosts/demeter
];
callisto = buildLiminalOS {
inherit nixpkgs inputs;
systemModule = ./hosts/callisto;
};
callisto = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
};
modules = [
./hosts/callisto
];
};
adrastea = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
};
modules = [
./hosts/adrastea
];
adrastea = buildLiminalOS {
inherit inputs nixpkgs;
systemModule = ./hosts/adrastea;
};
};
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
];
}