1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

Make it pure!

This commit is contained in:
RGBCube 2023-12-11 22:47:54 +03:00
parent e3f54aa93a
commit 617601cb13
No known key found for this signature in database
5 changed files with 33 additions and 7 deletions

1
.gitignore vendored
View file

@ -3,6 +3,7 @@
!derivations/ !derivations/
!hosts/ !hosts/
!hosts/enka/
!modules/ !modules/
!modules/bat/ !modules/bat/

View file

@ -131,7 +131,7 @@
modules = [ modules = [
homeManager.nixosModules.default homeManager.nixosModules.default
defaultConfiguration defaultConfiguration
./hosts/${host}.nix ./hosts/${host}
]; ];
}; };

View file

@ -14,6 +14,8 @@
}) })
(importModules [ (importModules [
./hardware.nix
"bat" "bat"
"blueman" "blueman"
"boot" "boot"
@ -44,6 +46,4 @@
"steam" "steam"
"steck" "steck"
"waybar" "waybar"
/etc/nixos/hardware-configuration.nix
]) ])

25
hosts/enka/hardware.nix Normal file
View file

@ -0,0 +1,25 @@
{
boot.initrd.availableKernelModules = [
"ahci"
"rtsx_pci_sdmmc"
"sd_mod"
"sr_mod"
"xhci_pci"
];
fileSystems."/" = {
device = "/dev/disk/by-uuid/cc473c12-94a9-4399-a0ab-f080f9e786f6";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D1F5-D862";
fsType = "vfat";
};
swapDevices = [
{ device = "/dev/disk/by-uuid/f3a15cd2-9897-4867-9414-d4a8c3e71caf"; }
];
hardware.cpu.intel.updateMicrocode = true;
}

View file

@ -8,11 +8,11 @@ def main --wrapped [
machine: string@complete = "" # The machine to build. machine: string@complete = "" # The machine to build.
...arguments # The arguments to pass to `nix system apply`. ...arguments # The arguments to pass to `nix system apply`.
] { ] {
let flags = $arguments | append [ let flags = [
$"--flake ('.#' + $machine)"
"--option accept-flake-config true" "--option accept-flake-config true"
"--log-format internal-json" "--log-format internal-json"
"--impure" ] | append $arguments
]
sudo sh -c $"nix system apply ('.#' + $machine) ($flags | str join ' ') |& nom --json" sudo sh -c $"nixos-rebuild switch ($flags | str join ' ') |& nom --json"
} }