From 16808296167643943982672944d02b2df6ad33f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 26 Jun 2021 19:12:31 +0100 Subject: [PATCH] wip on reinstalling foureighty --- flake.nix | 7 ++++ nixos/boxes/bootstrap/1.nix | 17 ---------- nixos/boxes/bootstrap/2.nix | 34 ------------------- nixos/boxes/bootstrap/default.nix | 16 +++++++++ .../bootstrap/hardware-configuration.nix | 31 +++++++++++++++++ nixos/boxes/foureighty/default.nix | 8 ----- .../foureighty/hardware-configuration.nix | 18 ++++------ 7 files changed, 61 insertions(+), 70 deletions(-) delete mode 100644 nixos/boxes/bootstrap/1.nix delete mode 100644 nixos/boxes/bootstrap/2.nix create mode 100644 nixos/boxes/bootstrap/default.nix create mode 100644 nixos/boxes/bootstrap/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 0bd420c7..3ec0e9f7 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,13 @@ { nixosConfigurations = { + bootstrap = nixpkgs-stable.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + (./. + "/nixos/boxes/bootstrap") + ]; + specialArgs = { inherit inputs; }; + }; foureighty = mkWorkstation nixpkgs-stable "x86_64-linux" "foureighty"; skinnyv = mkWorkstation nixpkgs-stable "x86_64-linux" "skinnyv"; brix = mkServer nixpkgs-stable "x86_64-linux" "brix"; diff --git a/nixos/boxes/bootstrap/1.nix b/nixos/boxes/bootstrap/1.nix deleted file mode 100644 index d01e593a..00000000 --- a/nixos/boxes/bootstrap/1.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, pkgs, ... }: -{ - networking.hostName = "fixme"; - - imports = [ - ./hardware-configuration.nix - ../../boot.nix - ../../common.nix - ../../distributed-builds.nix - ]; - - boot.kernelPackages = pkgs.linuxPackages_latest_hardened; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - time.timeZone = "Europe/London"; -} diff --git a/nixos/boxes/bootstrap/2.nix b/nixos/boxes/bootstrap/2.nix deleted file mode 100644 index 4b91dbd7..00000000 --- a/nixos/boxes/bootstrap/2.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, pkgs, ... }: -{ - networking.hostName = "fixme"; - - imports = [ - - ./hardware-configuration.nix - ../../boot.nix - ../../common.nix - ../../gfx-intel.nix - ../../i3 - ../../distributed-builds.nix - ../../gui - ../../git - ../../backups.nix - ]; - - boot.kernelPackages = pkgs.linuxPackages_latest_hardened; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - time.timeZone = "Europe/London"; - - fonts.fontconfig.enable = true; - home-manager.users.cyryl = {...}: { - imports = [ - ../../home-manager - ]; - home.stateVersion = config.system.stateVersion; - - nixpkgs.overlays = config.nixpkgs.overlays; - nixpkgs.config = config.nixpkgs.config; - }; - -} diff --git a/nixos/boxes/bootstrap/default.nix b/nixos/boxes/bootstrap/default.nix new file mode 100644 index 00000000..62661270 --- /dev/null +++ b/nixos/boxes/bootstrap/default.nix @@ -0,0 +1,16 @@ +{ config, pkgs, inputs, ... }: +{ + networking.hostName = "fixme"; + + imports = [ + ./hardware-configuration.nix + ../../boot.nix + ../../common.nix + ../../gfx-intel.nix + ]; + + boot.kernelPackages = pkgs.linuxPackages_latest; + time.timeZone = "Europe/London"; + + fonts.fontconfig.enable = true; +} diff --git a/nixos/boxes/bootstrap/hardware-configuration.nix b/nixos/boxes/bootstrap/hardware-configuration.nix new file mode 100644 index 00000000..ecd7b6aa --- /dev/null +++ b/nixos/boxes/bootstrap/hardware-configuration.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, inputs, ... }: +{ + boot = { + kernelModules = [ "kvm-intel" ]; + + initrd = { + kernelModules = [ "dm-snapshot" ]; + availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + }; + + loader.efi.canTouchEfiVariables = true; + loader.systemd-boot.enable = true; + }; + + boot.initrd.luks.devices."crypt".device = "replaceme"; + + fileSystems."/" = { + device = "replaceme"; + fsType = "btrfs"; + }; + + fileSystems."/boot" = { + device = "replaceme"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + nix.maxJobs = 2; + nix.buildCores = 6; +} diff --git a/nixos/boxes/foureighty/default.nix b/nixos/boxes/foureighty/default.nix index aad592d3..dc21f301 100644 --- a/nixos/boxes/foureighty/default.nix +++ b/nixos/boxes/foureighty/default.nix @@ -19,14 +19,6 @@ ]; boot.kernelPackages = pkgs.linuxPackages_latest_hardened; - boot.loader.grub = { - enable = true; - version = 2; - useOSProber = true; - memtest86.enable = true; - splashImage = ./boot.png; - }; - time.hardwareClockInLocalTime = true; time.timeZone = "Europe/London"; hardware.trackpoint.enable = true; diff --git a/nixos/boxes/foureighty/hardware-configuration.nix b/nixos/boxes/foureighty/hardware-configuration.nix index 6e891a87..6476a188 100644 --- a/nixos/boxes/foureighty/hardware-configuration.nix +++ b/nixos/boxes/foureighty/hardware-configuration.nix @@ -17,23 +17,19 @@ availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; }; - loader.grub = { - device = "nodev"; - efiSupport = true; - }; - loader.efi.canTouchEfiVariables = true; + loader.systemd-boot.enable = true; }; - fileSystems."/" = - { device = "/dev/mapper/crypt"; + boot.initrd.luks.devices."crypt".device = "replaceme"; + + fileSystems."/" = { + device = "replaceme"; fsType = "btrfs"; }; - boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/c2b23e5e-82c6-45dc-b07d-a8f9be03440e"; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/C380-BA8A"; + fileSystems."/boot" = { + device = "replaceme"; fsType = "vfat"; };