Compare commits

..

No commits in common. "579259b1567202fa283434d6d77f97164a33d9eb" and "c09e7674f49553dccb2026acc2265610bb7af8e8" have entirely different histories.

2 changed files with 8 additions and 13 deletions

View File

@ -24,22 +24,20 @@ let
hardware.cpu.intel.updateMicrocode = lib.mkForce false; hardware.cpu.intel.updateMicrocode = lib.mkForce false;
}; };
}; };
essential = with mods; [ grub base security wireless wireguard ]; essential = [ hardwareConfigurations.nova inputs.hosts.nixosModule inputs.home-manager.nixosModules.default ] ++ (with mods; [ grub base sound wayland security ivand wireless wireguard ]);
desktop = with mods; [ sound wayland ]; systemWithModules = modules: withSystem system (ctx@{ config, inputs', pkgs, ... }: inputs.nixpkgs.lib.nixosSystem {
configWithModules = { hardware, modules }: withSystem system (ctx@{ config, inputs', pkgs, ... }: inputs.nixpkgs.lib.nixosSystem {
specialArgs = { specialArgs = {
inherit inputs inputs' pkgs; inherit inputs inputs' pkgs;
packages = config.packages; packages = config.packages;
}; };
modules = [ hardware ] ++ modules; modules = modules;
}); });
novaConfig = mods: configWithModules { hardware = hardwareConfigurations.nova; modules = essential ++ desktop ++ mods; };
in in
{ {
flake.nixosConfigurations = { flake.nixosConfigurations = {
nixos = novaConfig [ mods.ivand ]; nixos = systemWithModules essential;
music = novaConfig (with mods; [ music ivand ]); music = systemWithModules (essential ++ [ inputs.musnix.nixosModules.musnix mods.music ]);
nonya = novaConfig (with mods; [ anon cryptocurrency ivand ]); nonya = systemWithModules (essential ++ (with mods; [ anon cryptocurrency ]));
ai = novaConfig (with mods; [ ai ivand ]); ai = systemWithModules (essential ++ (with mods; [ ai ]));
}; };
} }

View File

@ -1,4 +1,4 @@
top@{ inputs, moduleWithSystem, ... }: { top@{ moduleWithSystem, ... }: {
flake.nixosModules = { flake.nixosModules = {
grub = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: { grub = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
boot = { boot = {
@ -13,7 +13,6 @@ top@{ inputs, moduleWithSystem, ... }: {
}; };
}); });
base = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: { base = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
imports = [ inputs.hosts.nixosModule ];
system.stateVersion = top.config.flake.stateVersion; system.stateVersion = top.config.flake.stateVersion;
nix = { extraOptions = ''experimental-features = nix-command flakes''; }; nix = { extraOptions = ''experimental-features = nix-command flakes''; };
i18n.supportedLocales = [ "all" ]; i18n.supportedLocales = [ "all" ];
@ -36,7 +35,6 @@ top@{ inputs, moduleWithSystem, ... }: {
environment.systemPackages = with pkgs; [ pwvucontrol ]; environment.systemPackages = with pkgs; [ pwvucontrol ];
}); });
music = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: { music = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
imports = [ inputs.musnix.nixosModules.musnix ];
environment.systemPackages = with pkgs; [ guitarix ]; environment.systemPackages = with pkgs; [ guitarix ];
services.pipewire = { services.pipewire = {
jack.enable = true; jack.enable = true;
@ -130,7 +128,6 @@ top@{ inputs, moduleWithSystem, ... }: {
}; };
ivand = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: ivand = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }:
let homeMods = top.config.flake.homeManagerModules; in { let homeMods = top.config.flake.homeManagerModules; in {
imports = [ inputs.home-manager.nixosModules.default ];
home-manager = { home-manager = {
backupFileExtension = "bak"; backupFileExtension = "bak";
useUserPackages = true; useUserPackages = true;