diff --git a/.vscode/settings.json b/.vscode/settings.json index f2387e6..8d8ea20 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -124,6 +124,7 @@ "mountpoints", "mousewheel", "mtxr", + "muninn", "ncdu", "nemo", "neofetch", diff --git a/flake.nix b/flake.nix index 07a2d4d..00a6a5a 100644 --- a/flake.nix +++ b/flake.nix @@ -82,6 +82,10 @@ modules = [./systems/rhapsody-in-green]; specialArgs = {inherit inputs outputs;}; }; + muninn = lib.nixosSystem { + modules = [./systems/muninn]; + specialArgs = {inherit inputs outputs;}; + }; }; }; } diff --git a/systems/muninn/default.nix b/systems/muninn/default.nix new file mode 100644 index 0000000..3b9c4cb --- /dev/null +++ b/systems/muninn/default.nix @@ -0,0 +1,52 @@ +{ + imports = [ + ../../users/richie + ../../common/global + ../../common/optional/desktop.nix + ../../common/optional/steam.nix + ../../common/optional/systemd-boot.nix + ./hardware.nix + ]; + + networking = { + hostName = "muninn"; + hostId = "a43179c5"; + firewall.enable = true; + networkmanager.enable = true; + }; + + hardware = { + pulseaudio.enable = false; + bluetooth = { + enable = true; + powerOnBoot = true; + }; + }; + + security.rtkit.enable = true; + + services = { + + displayManager.sddm.enable = true; + + openssh.ports = [ 262 ]; + + printing.enable = true; + + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + snapshot_manager.enable = true; + + zfs = { + trim.enable = true; + autoScrub.enable = true; + }; + }; + + system.stateVersion = "24.05"; +} diff --git a/systems/muninn/hardware.nix b/systems/muninn/hardware.nix new file mode 100644 index 0000000..1310d4d --- /dev/null +++ b/systems/muninn/hardware.nix @@ -0,0 +1,61 @@ +{ config, lib, modulesPath, ... }: + +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd = { + availableKernelModules = [ + "nvme" + "xhci_pci" + "thunderbolt" + "usb_storage" + "sd_mod" + ]; + kernelModules = [ ]; + luks.devices."luks-root-pool-nvme-INTEL_SSDPEKKW256G7_BTPY63820XBH256D-part2" = { + device = "/dev/disk/by-id/nvme-INTEL_SSDPEKKW256G7_BTPY63820XBH256D-part2"; + bypassWorkqueues = true; + allowDiscards = true; + }; + }; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + }; + + fileSystems = { + "/" = lib.mkDefault { + device = "root_pool/root"; + fsType = "zfs"; + }; + + "/home" = { + device = "root_pool/home"; + fsType = "zfs"; + }; + + "/nix" = { + device = "root_pool/nix"; + fsType = "zfs"; + }; + + "/var" = { + device = "root_pool/var"; + fsType = "zfs"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/12CE-A600"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/users/richie/systems/muninn.nix b/users/richie/systems/muninn.nix new file mode 100644 index 0000000..b1d9590 --- /dev/null +++ b/users/richie/systems/muninn.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../home/global.nix + ../home/gui + ]; +}