diff --git a/nixops/cnc-hardware-configuration.nix b/nixops/cnc-hardware-configuration.nix new file mode 100644 index 0000000..a5ae41a --- /dev/null +++ b/nixops/cnc-hardware-configuration.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: + +{ + imports = + [ + ]; + + boot.initrd.availableKernelModules = [ "ata_generic" "uhci_hcd" "ehci_pci" "ahci" "usb_storage" "usbhid" "floppy" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/35d9c50c-e479-43a9-8324-b8ded5b71844"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/d8480389-c558-4c46-a58f-00207315dbdd"; } + ]; + + nix.maxJobs = lib.mkDefault 2; + + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.device = "/dev/sda"; + + services.xserver.videoDrivers = ["intel"]; +} diff --git a/nixops/desktop.nix b/nixops/desktop.nix index 549f5fc..d3d984e 100644 --- a/nixops/desktop.nix +++ b/nixops/desktop.nix @@ -12,9 +12,6 @@ in (./. + "/${host}-hardware-configuration.nix") ]; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = host; time.timeZone = "Asia/Hong_Kong"; diff --git a/nixops/juno-hardware-configuration.nix b/nixops/juno-hardware-configuration.nix index 0564025..bb8e0da 100644 --- a/nixops/juno-hardware-configuration.nix +++ b/nixops/juno-hardware-configuration.nix @@ -1,6 +1,3 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. { config, lib, pkgs, ... }: { @@ -27,4 +24,7 @@ nix.maxJobs = lib.mkDefault 8; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; } diff --git a/nixops/nixops.nix b/nixops/nixops.nix index 77aeb6f..b8bb715 100644 --- a/nixops/nixops.nix +++ b/nixops/nixops.nix @@ -10,4 +10,5 @@ imports = [(import ./rpi.nix { host = "rpi-4"; rpi4 = true; })]; }; juno = import ./desktop.nix { host = "juno"; }; + cnc = import ./desktop.nix { host = "cnc"; }; }