From 95155e9e93050bc4d8721fcac5190c92bc5c1e15 Mon Sep 17 00:00:00 2001 From: Jimbo Date: Fri, 18 Oct 2024 15:32:32 -0400 Subject: [PATCH] Add Chromebook to the roster --- flake.nix | 2 + hosts/firefly/home/default.nix | 2 +- hosts/firefly/system/default.nix | 5 +- hosts/lacros/home/default.nix | 22 +++++ hosts/lacros/id_ed25519.pub | 1 + hosts/lacros/system/default.nix | 27 ++++++ hosts/lacros/system/hardware/default.nix | 78 ++++++++++++++++++ .../devices/boot/lanzaboote/default.nix | 6 +- variables/secrets/default.nix | Bin 2395 -> 2373 bytes 9 files changed, 137 insertions(+), 6 deletions(-) create mode 100644 hosts/lacros/home/default.nix create mode 100644 hosts/lacros/id_ed25519.pub create mode 100644 hosts/lacros/system/default.nix create mode 100644 hosts/lacros/system/hardware/default.nix diff --git a/flake.nix b/flake.nix index 350653c..a4a5f4d 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,7 @@ firefly = mkNixos [ ./hosts/firefly/system ]; cyberspark = mkNixos [ ./hosts/cyberspark/system ]; shuttleworth = mkNixos [ ./hosts/shuttleworth/system ]; + lacros = mkNixos [ ./hosts/lacros/system ]; }; # home-manager switch --flake .#username@hostname @@ -45,6 +46,7 @@ "jimbo@firefly" = mkHome [ ./hosts/firefly/home ] nixpkgs.legacyPackages.x86_64-linux; "jimbo@cyberspark" = mkHome [ ./hosts/cyberspark/home ] nixpkgs.legacyPackages.x86_64-linux; "jimbo@shuttleworth" = mkHome [ ./hosts/shuttleworth/home ] nixpkgs.legacyPackages.aarch64-linux; + "jimbo@lacros" = mkHome [ ./hosts/lacros/home ] nixpkgs.legacyPackages.x86_64-linux; }; }; } diff --git a/hosts/firefly/home/default.nix b/hosts/firefly/home/default.nix index 4bd077b..d6d513d 100644 --- a/hosts/firefly/home/default.nix +++ b/hosts/firefly/home/default.nix @@ -8,9 +8,9 @@ ../../../modules/home/settings ../../../modules/home/programs ../../../modules/home/programs/misc/production - ../../../modules/home/programs/misc/school ../../../modules/home/programs/misc/gaming/launchers ../../../modules/home/programs/misc/gaming/xash3d + ../../../modules/home/programs/misc/school ../../../modules/home/sway ../../../modules/home/utils diff --git a/hosts/firefly/system/default.nix b/hosts/firefly/system/default.nix index 343e7f9..652005e 100644 --- a/hosts/firefly/system/default.nix +++ b/hosts/firefly/system/default.nix @@ -1,4 +1,4 @@ -{ lanzaboote, ... }: +{ ... }: { imports = [ ./hardware @@ -21,9 +21,6 @@ # Misc ../../../overlays ../../../variables - - # Imports - lanzaboote.nixosModules.lanzaboote ]; networking.hostName = "firefly"; diff --git a/hosts/lacros/home/default.nix b/hosts/lacros/home/default.nix new file mode 100644 index 0000000..75cd42e --- /dev/null +++ b/hosts/lacros/home/default.nix @@ -0,0 +1,22 @@ +{ config, nur, ... }: +{ + imports = [ + # Apps and programs + ../../../modules/home + ../../../modules/home/users + ../../../modules/home/files + ../../../modules/home/settings + ../../../modules/home/programs + ../../../modules/home/programs/misc/remote-desktop + ../../../modules/home/sway + ../../../modules/home/utils + + # Misc + ../../../overlays + ../../../variables + ../../../variables/look/colors/purple + + # Imports + nur.nixosModules.nur + ]; +} diff --git a/hosts/lacros/id_ed25519.pub b/hosts/lacros/id_ed25519.pub new file mode 100644 index 0000000..84c223c --- /dev/null +++ b/hosts/lacros/id_ed25519.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBk6ALxn+zKrRys6/c1oYSoWJaUUEo3nAM224ElhjJQR jimbo@lacros diff --git a/hosts/lacros/system/default.nix b/hosts/lacros/system/default.nix new file mode 100644 index 0000000..2e8ad70 --- /dev/null +++ b/hosts/lacros/system/default.nix @@ -0,0 +1,27 @@ +{ config, ... }: +{ + imports = [ + ./hardware + + # Apps and programs + ../../../modules/system + ../../../modules/system/accounts + ../../../modules/system/desktop + ../../../modules/system/programs + ../../../modules/system/services + + # Devices and hardware + ../../../modules/system/devices + ../../../modules/system/devices/boot/lanzaboote + ../../../modules/system/devices/networking/wireless + ../../../modules/system/devices/networking/firewall/pc + ../../../modules/system/devices/networking/wireguard/pc + + # Extras + ../../../overlays + ../../../variables + ]; + + networking.hostName = "lacros"; + networking.wireguard.interfaces."${config.ips.wgInt}".ips = [ "${config.ips.wgSpan}.18/24" ]; +} diff --git a/hosts/lacros/system/hardware/default.nix b/hosts/lacros/system/hardware/default.nix new file mode 100644 index 0000000..021d994 --- /dev/null +++ b/hosts/lacros/system/hardware/default.nix @@ -0,0 +1,78 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot = { + initrd = { + availableKernelModules = [ + "xhci_pci" + "usb_storage" + "sd_mod" + "sdhci_pci" + ]; + kernelModules = [ + "dm-snapshot" + "kvm-intel" + ]; + + # Encryption and TPM + systemd.enable = true; + luks.devices = { + crypt-mmc = { + device = "/dev/disk/by-uuid/5906e176-7ad3-41e5-bc45-ae65664eb10c"; + preLVM = true; + allowDiscards = true; + }; + }; + }; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; + fsType = "btrfs"; + options = [ "subvol=@" "noatime" "nodiratime" "discard" ]; + }; + "/home" = { + device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; + fsType = "btrfs"; + options = [ "subvol=@home" "noatime" "nodiratime" "discard" ]; + }; + "/var" = { + device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; + fsType = "btrfs"; + options = [ "subvol=@var" "noatime" "nodiratime" "discard" ]; + }; + "/nix" = { + device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; + fsType = "btrfs"; + options = [ "subvol=@nix" "noatime" "nodiratime" "discard" ]; + }; + "/.snapshots" = { + device = "/dev/disk/by-uuid/e8c9c5a8-4df0-4100-8de6-f08a1a774fad"; + fsType = "btrfs"; + options = [ "subvol=@snapshots" "noatime" "nodiratime" "discard" ]; + }; + "/boot" = { + device = "/dev/disk/by-uuid/1C76-1006"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + "/home/jimbo/JimboNFS" = { + device = "${config.ips.wgSpan}.1:/export/JimboNFS"; + fsType = "nfs4"; + options = ["x-systemd.automount" "_netdev" "nofail" "noauto"]; + }; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/54a9cc22-4a2c-4e04-a968-313c34481489"; } + ]; + + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/system/devices/boot/lanzaboote/default.nix b/modules/system/devices/boot/lanzaboote/default.nix index 7a62227..9ba80ba 100644 --- a/modules/system/devices/boot/lanzaboote/default.nix +++ b/modules/system/devices/boot/lanzaboote/default.nix @@ -1,5 +1,9 @@ -{ ... }: +{ lanzaboote, ... }: { + imports = [ + lanzaboote.nixosModules.lanzaboote + ]; + boot.lanzaboote = { enable = true; pkiBundle = "/etc/secureboot"; diff --git a/variables/secrets/default.nix b/variables/secrets/default.nix index 38b50a76672facba1208f7fbdf18fa7ebfc8b26d..8b87e6caa270d84f550b321ba00f71ac8873ce8b 100644 GIT binary patch literal 2373 zcmZWr*>amo5Pi>AOl;k9mE#~lthtp33A7-Dgf?q=h>K;|cLoWR%D-PgaunaZAkp1( z`gBjv8GeGm)n9-SN0w{901U&xuWz4zegYs)kQ+ximO~?hCH8;vz1kVk{_O-@% zs9*Frx7?u4V#MJ?iw3|W*yb<;iI(T*I5YDXV8aMz8iFP`yT}1gq2D@9@HGUvqkW|b z^64F3kNbw9)@z##9j0R+k|CCiyBBqDyAjTGNWU^Y(K2zFAw|dHRa_mNrp{`9VMXUT$om% zWf1gL3HY#TskN4V;>xgUm`TFcC5|2r-}G4U;dZL;RoMs_T5P((elb5FpY^YvlD2))2c*G4i^&&D7f8vc}xS+u48 zg1C}c$lFQ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