extract music to different config

This commit is contained in:
Ivan Kirilov Dimitrov 2024-07-05 20:03:30 +02:00
parent 876a3f631e
commit ffceb60bb8
No known key found for this signature in database
GPG Key ID: 0BDAD4B211C49294
2 changed files with 15 additions and 6 deletions

View File

@ -26,3 +26,6 @@ cleanRoot:
news: news:
home-manager news --flake ./. home-manager news --flake ./.
music:
doas nixos-rebuild switch --flake ./#music

View File

@ -1,6 +1,8 @@
toplevel@{ inputs, withSystem, ... }: toplevel@{ inputs, withSystem, ... }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
nixosModules = toplevel.config.flake.nixosModules;
minimal = [ ./nova-hardware.nix inputs.hosts.nixosModule ] ++ (with nixosModules; [ grub base sound wayland security ivand wireless wireguard ]);
in in
{ {
flake.nixosConfigurations = { flake.nixosConfigurations = {
@ -10,11 +12,15 @@ in
inherit inputs inputs'; inherit inputs inputs';
packages = config.packages; packages = config.packages;
}; };
modules = [ modules = minimal;
./nova-hardware.nix });
inputs.hosts.nixosModule music = withSystem system (ctx@{ config, inputs', ... }:
inputs.musnix.nixosModules.musnix inputs.nixpkgs.lib.nixosSystem {
] ++ (with toplevel.config.flake.nixosModules; [ grub base sound music wayland security ivand wireless wireguard ]); specialArgs = {
inherit inputs inputs';
packages = config.packages;
};
modules = minimal ++ [ inputs.musnix.nixosModules.musnix ] ++ (with nixosModules; [ music ]);
}); });
vm = withSystem system (ctx@{ config, inputs', ... }: vm = withSystem system (ctx@{ config, inputs', ... }:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
@ -24,7 +30,7 @@ in
}; };
modules = [ modules = [
inputs.hosts.nixosModule inputs.hosts.nixosModule
] ++ (with toplevel.config.flake.nixosModules; [ vm base security testUser ]); ] ++ (with nixosModules; [ vm base security testUser ]);
}); });
}; };
} }