diff --git a/devices/ellaca/default.nix b/devices/ellaca/default.nix index e8a2e4b..f3f1fa7 100644 --- a/devices/ellaca/default.nix +++ b/devices/ellaca/default.nix @@ -15,6 +15,7 @@ grub = { enable = true; efiSupport = true; + efiInstallAsRemovable = true; device = "nodev"; useOSProber = true; font = null; diff --git a/devices/ellaca/disko.nix b/devices/ellaca/disko.nix new file mode 100644 index 0000000..1349545 --- /dev/null +++ b/devices/ellaca/disko.nix @@ -0,0 +1,81 @@ +{ + disko.devices = { + disk = { + vda = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + priority = 1; + name = "ESP"; + start = "1M"; + end = "128M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; # Override existing partition + # Subvolumes must set a mountpoint in order to be mounted, + # unless their parent is mounted + subvolumes = { + "/rootfs" = { + mountOptions = [ "compress=zstd" "noatime" ]; + mountpoint = "/"; + }; + "/home" = { + mountOptions = [ "compress=zstd" "noatime" ]; + mountpoint = "/home"; + }; + "/nix" = { + mountOptions = [ "compress=zstd" "noatime" ]; + mountpoint = "/nix"; + }; + }; + + mountpoint = "/pratition-root"; + swap = { + swapfile = { + size = "16G"; + }; + }; + }; + }; + }; + }; + }; + vdb = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; # Override existing partition + # Subvolumes must set a mountpoint in order to be mounted, + # unless their parent is mounted + subvolumes = { + "/ext" = { + mountOptions = [ "compress=zstd" "noatime" ]; + mountpoint = "/ext"; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/devices/ellaca/hardware-config.nix b/devices/ellaca/hardware-config.nix index c805605..08d9ed7 100644 --- a/devices/ellaca/hardware-config.nix +++ b/devices/ellaca/hardware-config.nix @@ -1,30 +1,36 @@ -{ config, lib, modulesPath, ... }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - +{ config, lib, ... }: { boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/95b15244-c97c-42a5-9be1-ed5df6872dcb"; - fsType = "ext4"; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/7d29fef5-9fdf-43b4-ad17-a94774f802b5"; + fsType = "btrfs"; + options = [ "subvol=rootfs" "compress=zstd" "noatime" ]; + }; + "/boot" = { + device = "/dev/disk/by-uuid/DCD8-29D7"; + fsType = "vfat"; + }; + "/nix" = { + device = "/dev/disk/by-uuid/7d29fef5-9fdf-43b4-ad17-a94774f802b5"; + fsType = "btrfs"; + options = [ "subvol=nix" "compress=zstd" "noatime" ]; + }; + "/home" = { + device = "/dev/disk/by-uuid/7d29fef5-9fdf-43b4-ad17-a94774f802b5"; + fsType = "btrfs"; + options = [ "subvol=home" "compress=zstd" "noatime" ]; + }; + "/ext" = { + device = "/dev/disk/by-uuid/90aa2cba-41dc-4efb-b509-822d1e2bc525"; + fsType = "btrfs"; + options = [ "subvol=ext" "compress=zstd" "noatime" ]; + }; }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/BF87-B3DE"; - fsType = "vfat"; - }; - - fileSystems."/ext" = { - device = "/dev/disk/by-uuid/31608388-1043-47a0-a5da-e92250e821f8"; - fsType = "ext4"; - }; - - swapDevices =[ { device = "/dev/disk/by-uuid/b6445ced-1cc2-461f-a81f-6e8409c10f48"; } ]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction diff --git a/flake.lock b/flake.lock index 076add5..b228582 100644 --- a/flake.lock +++ b/flake.lock @@ -236,11 +236,11 @@ ] }, "locked": { - "lastModified": 1714981474, - "narHash": "sha256-b3/U21CJjCjJKmA9WqUbZGZgCvospO3ArOUTgJugkOY=", + "lastModified": 1715077503, + "narHash": "sha256-AfHQshzLQfUqk/efMtdebHaQHqVntCMjhymQzVFLes0=", "owner": "nix-community", "repo": "home-manager", - "rev": "6ebe7be2e67be7b9b54d61ce5704f6fb466c536f", + "rev": "6e277d9566de9976f47228dd8c580b97488734d4", "type": "github" }, "original": { @@ -261,11 +261,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1714951328, - "narHash": "sha256-qCKsQcM9uOxZ+ATJ1iYOuQNLP5AwXiTs0hraM3+jj3Q=", + "lastModified": 1715110424, + "narHash": "sha256-rPFWgi2ngVwf5hhQR/5WbHioEEd2qNQGf2h0F9G/ft4=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "520b2c1c1a1d30a579fa275bc85e3af58dbccde4", + "rev": "cea8f80a5b8171e7c2b90b89c67ef4b28faa2bf9", "type": "github" }, "original": { @@ -294,11 +294,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1714900109, - "narHash": "sha256-+VJWriIMcBv6p+Ri6e/6OWHrItWlunitXPzhfCvj82w=", + "lastModified": 1715105951, + "narHash": "sha256-DWhwI5hTqVCjNuboPDAwKLsdamSlgE/FtJJN/+hdglA=", "owner": "YaLTeR", "repo": "niri", - "rev": "9847a652af864109b3543e42d48087a38c0729ad", + "rev": "5248e534995dc21279cfd14651c994cd02353452", "type": "github" }, "original": { @@ -325,11 +325,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1714984131, - "narHash": "sha256-kjIvFbbKb6RGIJyOgcF+BBWHNzhNSNqRTxX/SkrkRno=", + "lastModified": 1715010655, + "narHash": "sha256-FmdhvR/hgBkPDvIv/HOEIQsSMaVXh8wvTrnep8dF3Jc=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "e148ccbecbd2fe4dc4768fba67f6db828466ad06", + "rev": "d1659c9eb8af718118fb4bbe2c86797c8b8623eb", "type": "github" }, "original": { @@ -368,11 +368,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1714782413, - "narHash": "sha256-tbg0MEuKaPcUrnmGCu4xiY5F+7LW2+ECPKVAJd2HLwM=", + "lastModified": 1714971268, + "narHash": "sha256-IKwMSwHj9+ec660l+I4tki/1NRoeGpyA2GdtdYpAgEw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "651b4702e27a388f0f18e1b970534162dec09aff", + "rev": "27c13997bf450a01219899f5a83bd6ffbfc70d3c", "type": "github" }, "original": { @@ -414,11 +414,11 @@ }, "nur": { "locked": { - "lastModified": 1715006743, - "narHash": "sha256-ILUhdMg6UYaWB7Tl+Npw96bhIjOQXyxgPIGiJb/KKvg=", + "lastModified": 1715118353, + "narHash": "sha256-3TqhtMk0arxsDHagrK4TbnqJnHvnPlgt9PXaioP8+84=", "owner": "nix-community", "repo": "nur", - "rev": "92319ea1c3659134da57f4ab53c415f2994527a4", + "rev": "dbfe43f42385384352f1d6f7fe2ace2208e88517", "type": "github" }, "original": {