diff --git a/devices/ellaca/disko.nix b/devices/ellaca/disko.nix deleted file mode 100644 index 8db7d7b..0000000 --- a/devices/ellaca/disko.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ - 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 = "/"; - }; - "/nix" = { - mountOptions = [ "compress=zstd" "noatime" ]; - mountpoint = "/nix"; - }; - "/persist" = { - mountOptions = [ "compress=zstd" "noatime" ]; - mountpoint = "/persist"; - }; - }; - - mountpoint = "/partition-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 5c882ae..c29f1f6 100644 --- a/devices/ellaca/hardware-config.nix +++ b/devices/ellaca/hardware-config.nix @@ -3,30 +3,6 @@ initrd = { availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; kernelModules = [ ]; - postDeviceCommands = lib.mkAfter '' - mkdir /btrfs_tmp - mount /dev/disk/by-uuid/b6e6bca7-1435-4b41-b174-8550eace7c32 /btrfs_tmp - if [[ -e /btrfs_tmp/rootfs ]]; then - mkdir -p /btrfs_tmp/old_roots - timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/rootfs)" "+%Y-%m-%-d_%H:%M:%S") - mv /btrfs_tmp/rootfs "/btrfs_tmp/old_roots/$timestamp" - fi - - delete_subvolume_recursively() { - IFS=$'\n' - for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do - delete_subvolume_recursively "/btrfs_tmp/$i" - done - btrfs subvolume delete "$1" - } - - for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do - delete_subvolume_recursively "$i" - done - - btrfs subvolume create /btrfs_tmp/rootfs - umount /btrfs_tmp - ''; }; kernelModules = [ "kvm-amd" ]; extraModulePackages = [ ]; diff --git a/flake.lock b/flake.lock index f28c8cd..34da028 100644 --- a/flake.lock +++ b/flake.lock @@ -249,21 +249,6 @@ "type": "github" } }, - "impermanence": { - "locked": { - "lastModified": 1708968331, - "narHash": "sha256-VUXLaPusCBvwM3zhGbRIJVeYluh2uWuqtj4WirQ1L9Y=", - "owner": "nix-community", - "repo": "impermanence", - "rev": "a33ef102a02ce77d3e39c25197664b7a636f9c30", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "impermanence", - "type": "github" - } - }, "niri": { "inputs": { "crate2nix": "crate2nix", @@ -479,7 +464,6 @@ "root": { "inputs": { "home-manager": "home-manager", - "impermanence": "impermanence", "niri": "niri", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_3", diff --git a/flake.nix b/flake.nix index bbf34d3..cbc14ef 100644 --- a/flake.nix +++ b/flake.nix @@ -21,10 +21,6 @@ url = "github:sodiboo/niri-flake"; inputs.nixpkgs.follows = "nixpkgs"; }; - - impermanence = { - url = "github:nix-community/impermanence"; - }; }; outputs = inputs: import ./outputs.nix inputs; diff --git a/modules/system/persist/default.nix b/modules/system/persist/default.nix deleted file mode 100644 index 71fec1d..0000000 --- a/modules/system/persist/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ ... }: { - users.mutableUsers = false; - users.users.twoneis.initialHashedPassword = "$y$j9T$0pmWE8A2JWcr2BDqqZ2u./$Km7K1hml9Gy0fc9DzBsDTvpyCKZ9DW0GOkD.lDcyYw0"; - users.users.root.initialHashedPassword = "$y$j9T$U8fvYSDoZxqVrkjlZM2Db.$qvkT9GIbVJ23EtB7KcqyI8u7RKJ99pYSXNu8IhVcDx9"; - environment.persistence."/persist" = { - directories = [ - "/var/log" - "/var/lib/bluetooth" - "/var/nixos" - "/var/lib/systemd/coredump" - "/etc/NetworkManager/system-connections" - ]; - files = [ - "/etc/machine-id" - ]; - users.twoneis = { - directories = [ - "Documents" - "uni" - "code" - # a lot of firefox settings that can't/aren't currently declared properly - ".mozilla" - ".local/share/keyrings" - ]; - }; - }; -} diff --git a/outputs.nix b/outputs.nix index f028f6a..6cf25e0 100644 --- a/outputs.nix +++ b/outputs.nix @@ -1,4 +1,4 @@ -{ nixpkgs, home-manager, nixos-hardware, nur, niri, impermanence, ... }@inputs: { +{ nixpkgs, home-manager, nixos-hardware, niri, ... }@inputs: { nixosConfigurations = { # AMD Ryzen 5600X # nvidia GeForce GTX 1060 (6GB) @@ -11,10 +11,8 @@ ./devices/ellaca ./modules/system ./modules/system/home - ./modules/system/persist ./options.nix niri.nixosModules.niri - impermanence.nixosModules.impermanence home-manager.nixosModules.home-manager ]; };