mirror of
https://github.com/RGBCube/ncc
synced 2025-07-29 19:17:45 +00:00
Make it pure!
This commit is contained in:
parent
e3f54aa93a
commit
617601cb13
5 changed files with 33 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,6 +3,7 @@
|
|||
!derivations/
|
||||
|
||||
!hosts/
|
||||
!hosts/enka/
|
||||
|
||||
!modules/
|
||||
!modules/bat/
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
modules = [
|
||||
homeManager.nixosModules.default
|
||||
defaultConfiguration
|
||||
./hosts/${host}.nix
|
||||
./hosts/${host}
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
})
|
||||
|
||||
(importModules [
|
||||
./hardware.nix
|
||||
|
||||
"bat"
|
||||
"blueman"
|
||||
"boot"
|
||||
|
@ -44,6 +46,4 @@
|
|||
"steam"
|
||||
"steck"
|
||||
"waybar"
|
||||
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
])
|
25
hosts/enka/hardware.nix
Normal file
25
hosts/enka/hardware.nix
Normal 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;
|
||||
}
|
|
@ -8,11 +8,11 @@ def main --wrapped [
|
|||
machine: string@complete = "" # The machine to build.
|
||||
...arguments # The arguments to pass to `nix system apply`.
|
||||
] {
|
||||
let flags = $arguments | append [
|
||||
let flags = [
|
||||
$"--flake ('.#' + $machine)"
|
||||
"--option accept-flake-config true"
|
||||
"--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"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue