2024-06-18 20:32:19 +02:00
|
|
|
toplevel@{ inputs, withSystem, ... }:
|
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
2024-08-02 19:47:54 +02:00
|
|
|
mods = toplevel.config.flake.nixosModules;
|
2024-07-06 13:07:59 +02:00
|
|
|
hardwareConfigurations = {
|
2024-07-06 13:11:49 +02:00
|
|
|
nova = { lib, modulesPath, ... }: {
|
2024-07-06 13:07:59 +02:00
|
|
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
|
|
boot = {
|
|
|
|
initrd = {
|
|
|
|
availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
|
|
|
|
kernelModules = [ ];
|
|
|
|
luks.devices."nixos".device = "/dev/disk/by-uuid/712dd8ba-d5b4-438a-9a77-663b8c935cfe";
|
|
|
|
};
|
|
|
|
kernelModules = [ "kvm-intel" ];
|
|
|
|
extraModulePackages = [ ];
|
|
|
|
};
|
|
|
|
fileSystems = {
|
|
|
|
"/" = { device = "/dev/disk/by-uuid/47536cbe-7265-493b-a2e3-bbd376a6f9af"; fsType = "btrfs"; };
|
2024-07-06 16:52:29 +02:00
|
|
|
"/boot" = { device = "/dev/disk/by-uuid/4C3C-993A"; fsType = "vfat"; };
|
2024-07-06 13:07:59 +02:00
|
|
|
};
|
|
|
|
swapDevices = [ ];
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
2024-07-06 13:11:49 +02:00
|
|
|
hardware.cpu.intel.updateMicrocode = lib.mkForce false;
|
2024-07-06 13:07:59 +02:00
|
|
|
};
|
|
|
|
};
|
2024-08-03 10:49:41 +02:00
|
|
|
essential = with mods; [ grub base security wireless wireguard ];
|
|
|
|
desktop = with mods; [ sound wayland ];
|
|
|
|
configWithModules = { hardware, modules }: withSystem system (ctx@{ config, inputs', pkgs, ... }: inputs.nixpkgs.lib.nixosSystem {
|
2024-08-02 19:47:54 +02:00
|
|
|
specialArgs = {
|
|
|
|
inherit inputs inputs' pkgs;
|
|
|
|
packages = config.packages;
|
|
|
|
};
|
2024-08-03 10:49:41 +02:00
|
|
|
modules = [ hardware ] ++ modules;
|
2024-08-02 19:47:54 +02:00
|
|
|
});
|
2024-08-03 10:49:41 +02:00
|
|
|
novaConfig = mods: configWithModules { hardware = hardwareConfigurations.nova; modules = essential ++ desktop ++ mods; };
|
2024-06-18 20:32:19 +02:00
|
|
|
in
|
|
|
|
{
|
2024-07-04 08:38:33 +02:00
|
|
|
flake.nixosConfigurations = {
|
2024-08-03 10:49:41 +02:00
|
|
|
nixos = novaConfig [ mods.ivand ];
|
|
|
|
music = novaConfig (with mods; [ music ivand ]);
|
|
|
|
nonya = novaConfig (with mods; [ anon cryptocurrency ivand ]);
|
|
|
|
ai = novaConfig (with mods; [ ai ivand ]);
|
2024-07-04 08:38:33 +02:00
|
|
|
};
|
2024-06-18 20:32:19 +02:00
|
|
|
}
|