diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index e133b08..b4f0e8b 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -9,9 +9,10 @@ lix.nixosModules.default self.nixosModules.desktop self.nixosModules.system - ./hardware-conf.nix + ./hardware.nix ./programs.nix ./stylix.nix + ./disko.nix ./users.nix ./sops.nix ]; diff --git a/hosts/sarien/disko.nix b/hosts/sarien/disko.nix new file mode 100644 index 0000000..8ea2ee2 --- /dev/null +++ b/hosts/sarien/disko.nix @@ -0,0 +1,73 @@ +{inputs, ...}: { + imports = with inputs; [ + disko.nixosModules.disko + ]; + disko.devices.disk.main = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "2G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ + "umask=0077" + "fmask=0022" + "dmask=0022" + "noexec" + ]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "luks-main"; + initrdUnlock = true; + settings.allowDiscards = true; + content = { + type = "btrfs"; + extraArgs = ["-f"]; + subvolumes = { + "@nixos" = { + mountpoint = "/"; + mountOptions = [ + "compress=zstd" + "noatime" + # "noexec" + ]; + }; + "home" = { + mountpoint = "/home"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; + }; + "@storage" = { + mountpoint = "/storage"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; + }; + # "@nix" = { + # mountpoint = "/nix"; + # mountOptions = [ + # "compress=zstd" + # "noatime" + # ]; + # }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/sarien/hardware-conf.nix b/hosts/sarien/hardware.nix similarity index 68% rename from hosts/sarien/hardware-conf.nix rename to hosts/sarien/hardware.nix index de5c70b..33eb600 100644 --- a/hosts/sarien/hardware-conf.nix +++ b/hosts/sarien/hardware.nix @@ -21,48 +21,17 @@ boot = { kernelModules = ["kvm-intel"]; - extraModulePackages = []; kernelParams = [ "i915.enable_guc=2" "i915.enable_fbc=1" "i915.enable_psr=2" ]; initrd = { - luks.devices."luks-149371a0-a41f-4c43-8935-cb199508c66a".device = "/dev/disk/by-uuid/149371a0-a41f-4c43-8935-cb199508c66a"; availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod" "rtsx_pci_sdmmc"]; kernelModules = ["i915"]; }; }; - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf"; - fsType = "btrfs"; - options = ["subvol=@nixos,compress=zstd"]; - }; - - "/home" = { - device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf"; - fsType = "btrfs"; - options = ["subvol=home,compress=zstd"]; - }; - - "/storage" = { - device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf"; - fsType = "btrfs"; - options = ["subvol=@storage,compress=zstd"]; - }; - - "/boot" = { - device = "/dev/disk/by-uuid/F195-F7C0"; - fsType = "vfat"; - options = ["umask=0077"]; - }; - }; - - swapDevices = []; - - networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/hosts/sarien/sops.nix b/hosts/sarien/sops.nix index 7310e4d..ec0ea0f 100644 --- a/hosts/sarien/sops.nix +++ b/hosts/sarien/sops.nix @@ -1,8 +1,8 @@ {inputs, ...}: let secretsPath = builtins.toString inputs.mysecrets; in { - imports = [ - inputs.sops-nix.nixosModules.sops + imports = with inputs; [ + sops-nix.nixosModules.sops ]; sops = { diff --git a/hosts/sarien/stylix.nix b/hosts/sarien/stylix.nix index 26af5d3..3ef96bd 100644 --- a/hosts/sarien/stylix.nix +++ b/hosts/sarien/stylix.nix @@ -3,11 +3,10 @@ inputs, ... }: { - imports = [ - inputs.stylix.nixosModules.stylix + imports = with inputs; [ + stylix.nixosModules.stylix ]; environment.systemPackages = with pkgs; [ - #papirus-icon-theme nerd-fonts.iosevka ]; stylix = { @@ -15,14 +14,14 @@ base16Scheme = "${pkgs.base16-schemes}/share/themes/tomorrow-night.yaml"; polarity = "dark"; cursor = { - package = pkgs.google-cursor; - name = "GoogleDot-Blue"; + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Amber"; size = 24; }; image = builtins.fetchurl { - url = "https://w.wallhaven.cc/full/9m/wallhaven-9mwzwk.jpg"; - name = "wallhaven-9mwzwk"; - sha256 = "0pj2k30mfhqr02dzdj40z62awmy58s5gg5mm4xzxiialclbd5n8d"; + url = "https://w.wallhaven.cc/full/13/wallhaven-13e379.png"; + name = "wallhaven-13e379"; + sha256 = "1h8xhcgcdgd3dy1viqv6f192kr5cw7gi4rjqh4kbgwg6hj962409"; }; opacity.terminal = 0.9; fonts = { @@ -44,7 +43,6 @@ package = pkgs.nerd-fonts.iosevka; name = "Iosevka Nerd Font Mono"; }; - emoji = { package = pkgs.noto-fonts-emoji; name = "Noto Color Emoji";