diff --git a/flake.nix b/flake.nix index 693a1ef8..03a9d53f 100644 --- a/flake.nix +++ b/flake.nix @@ -97,6 +97,7 @@ # Laptops intuos.imports = [ ./hosts/intuos ]; jupiter.imports = [ ./hosts/jupiter ]; + flight.imports = [ ./hosts/flight ]; # Servers midas.imports = [ ./hosts/midas ]; diff --git a/hosts/flight/boot/default.nix b/hosts/flight/boot/default.nix new file mode 100644 index 00000000..2d553d61 --- /dev/null +++ b/hosts/flight/boot/default.nix @@ -0,0 +1,11 @@ +{ lib, pkgs, ... }: +{ + boot = { + kernelPackages = pkgs.linuxPackages; + loader.limine = { + enable = true; + biosDevice = lib.mkForce "/dev/disk/by-id/ata-XSTAR_SSD_64GB_XSFA2011000462"; + }; + plymouth.enable = true; + }; +} diff --git a/hosts/flight/default.nix b/hosts/flight/default.nix new file mode 100644 index 00000000..a6c07faa --- /dev/null +++ b/hosts/flight/default.nix @@ -0,0 +1,22 @@ +{ config, lib, ... }: +{ + imports = [ + ./boot + ./filesystems + ./hardware + ./root + ]; + + system = { + nixos.tags = [ + "pc" + "chat" + "production" + ]; + stateVersion = "25.05"; + }; + + deployment.targetHost = "409:b2b1:966c:b13:6d67:2d6b:45e2:f048"; + + home-manager.users."${config.vars.mainUser}".wayland.windowManager.sway.extraSessionCommands = lib.mkForce ""; +} diff --git a/hosts/flight/filesystems/default.nix b/hosts/flight/filesystems/default.nix new file mode 100644 index 00000000..8a568d0f --- /dev/null +++ b/hosts/flight/filesystems/default.nix @@ -0,0 +1,14 @@ +{ config, ... }: +{ + fileSystems = { + "/persist/storage" = { + device = "/dev/disk/by-uuid/3d6f81f2-7fa5-40a2-85bb-56f4cab63773"; + fsType = "btrfs"; + options = [ + "nofail" + "nosuid" + "subvol=storage" + ]; + }; + }; +} diff --git a/hosts/flight/hardware/default.nix b/hosts/flight/hardware/default.nix new file mode 100644 index 00000000..fa1b984c --- /dev/null +++ b/hosts/flight/hardware/default.nix @@ -0,0 +1,35 @@ +{ config, modulesPath, ... }: +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd = { + availableKernelModules = [ + "ehci_pci" + "ahci" + "xhci_pci" + "usb_storage" + "sd_mod" + "sr_mod" + ]; + kernelModules = [ "dm-snapshot" ]; + }; + kernelModules = [ "kvm-intel" ]; + }; + + services.xserver.videoDrivers = [ "nvidia" ]; + + hardware = { + cpu.intel.updateMicrocode = true; + nvidia = { + package = config.boot.kernelPackages.nvidiaPackages.legacy_390; + prime = { + sync.enable = true; + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + }; + + nixpkgs.hostPlatform = "x86_64-linux"; +} diff --git a/hosts/flight/id_ed25519.pub b/hosts/flight/id_ed25519.pub new file mode 100644 index 00000000..4b360ec0 --- /dev/null +++ b/hosts/flight/id_ed25519.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINVg1T0x0Att4hBqPfTIstgpaBddfmssC/q9LFqF/gYY diff --git a/hosts/flight/root/default.nix b/hosts/flight/root/default.nix new file mode 100644 index 00000000..7bccd4b8 --- /dev/null +++ b/hosts/flight/root/default.nix @@ -0,0 +1,54 @@ +{ config, name, ... }: +{ + boot.initrd.luks.devices."${name}-disk".device = "/dev/disk/by-uuid/0fc43c11-c382-4e37-812b-8866b1b20e68"; + + fileSystems = { + "/boot" = { + device = "/dev/disk/by-uuid/FA96-EF11"; + fsType = "vfat"; + options = [ "umask=0077" ]; + }; + + "/" = { + device = "/dev/disk/by-uuid/bbaf733b-14af-417b-b1c8-2f0534995483"; + fsType = "btrfs"; + options = [ + "compress=zstd" + "ssd" + "subvol=root" + ]; + }; + "/prev" = { + device = "/dev/disk/by-uuid/bbaf733b-14af-417b-b1c8-2f0534995483"; + fsType = "btrfs"; + options = [ + "compress=zstd" + "noexec" + "ssd" + "subvol=prev" + ]; + }; + "/nix" = { + device = "/dev/disk/by-uuid/bbaf733b-14af-417b-b1c8-2f0534995483"; + fsType = "btrfs"; + options = [ + "compress=zstd" + "ssd" + "subvol=nix" + ]; + }; + + "/persist" = { + device = "/dev/disk/by-uuid/bbaf733b-14af-417b-b1c8-2f0534995483"; + fsType = "btrfs"; + neededForBoot = true; + options = [ + "compress=zstd" + "ssd" + "subvol=persist" + ]; + }; + }; + + swapDevices = [ { device = "/dev/disk/by-uuid/93ac8c5c-c947-4b45-a12a-146e87398517"; } ]; +} diff --git a/hosts/flight/user/default.nix b/hosts/flight/user/default.nix new file mode 100644 index 00000000..e408de6a --- /dev/null +++ b/hosts/flight/user/default.nix @@ -0,0 +1,7 @@ +{ config, lib, ... }: +{ + home-manager.users."${config.vars.mainUser}" = { + home.guifull.enable = true; + wayland.windowManager.sway.extraSessionCommands = lib.mkForce ""; + }; +} diff --git a/modules/system/users/main/default.nix b/modules/system/users/main/default.nix index f310ede1..2e89c479 100644 --- a/modules/system/users/main/default.nix +++ b/modules/system/users/main/default.nix @@ -14,6 +14,7 @@ ../../../../hosts/tower/id_ed25519.pub ../../../../hosts/intuos/id_ed25519.pub ../../../../hosts/jupiter/id_ed25519.pub + ../../../../hosts/flight/id_ed25519.pub ]; extraGroups = [ # Privilige