From 2951f948b4ba2ceb90d95b22555668bc3544d6b0 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Tue, 24 Sep 2024 04:49:25 +0100 Subject: [PATCH] kilgharrah: set up zfs datasets using randomcat's module --- flake.nix | 8 +++++++- hosts/kilgharrah/datasets.nix | 12 ++++++++++++ hosts/kilgharrah/default.nix | 2 ++ hosts/kilgharrah/filesystems.nix | 6 ------ 4 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 hosts/kilgharrah/datasets.nix diff --git a/flake.nix b/flake.nix index 06f6387..61126be 100644 --- a/flake.nix +++ b/flake.nix @@ -28,10 +28,15 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + randomcat = { + url = "github:randomnetcat/nix-configs"; + flake = false; + }; + birdsong.url = "git+https://git.qenya.tel/qenya/birdsong?ref=main"; }; - outputs = inputs@{ self, nixpkgs, nixpkgsSmall, home-manager, plasma-manager, nur, agenix, colmena, birdsong, ... }: { + outputs = inputs@{ self, nixpkgs, nixpkgsSmall, home-manager, plasma-manager, nur, agenix, colmena, randomcat, birdsong, ... }: { nixosConfigurations = (colmena.lib.makeHive self.outputs.colmena).nodes; # The name of this output type is not standardised. I have picked @@ -79,6 +84,7 @@ birdsong.nixosModules.default ./common ./services + (builtins.toPath "${randomcat}/services/default.nix") ]; }; diff --git a/hosts/kilgharrah/datasets.nix b/hosts/kilgharrah/datasets.nix new file mode 100644 index 0000000..161a50f --- /dev/null +++ b/hosts/kilgharrah/datasets.nix @@ -0,0 +1,12 @@ +{ config, lib, pkgs, ... }: + +{ + environment.etc.crypttab.text = '' + albion UUID=acda0e7a-069f-47c7-8e37-ec00e7cdde0f /root/luks-albion.key + ''; + + randomcat.services.zfs.datasets = { + "rpool_albion/data" = { mountpoint = "none"; }; + "rpool_albion/data/steam" = { mountpoint = "/home/qenya/.local/share/Steam"; }; + }; +} diff --git a/hosts/kilgharrah/default.nix b/hosts/kilgharrah/default.nix index 01377be..75dd2ec 100644 --- a/hosts/kilgharrah/default.nix +++ b/hosts/kilgharrah/default.nix @@ -6,6 +6,8 @@ ./filesystems.nix ./hardware.nix ./networking.nix + + ./datasets.nix ]; nixpkgs.hostPlatform = "x86_64-linux"; diff --git a/hosts/kilgharrah/filesystems.nix b/hosts/kilgharrah/filesystems.nix index bfc5b10..e2baa43 100644 --- a/hosts/kilgharrah/filesystems.nix +++ b/hosts/kilgharrah/filesystems.nix @@ -5,12 +5,6 @@ "cryptroot".device = "/dev/disk/by-uuid/b414aaba-0a36-4135-a7e1-dc9489286acd"; }; - boot.supportedFilesystems = [ "zfs" ]; - - environment.etc.crypttab.text = '' - cryptstorage UUID=acda0e7a-069f-47c7-8e37-ec00e7cdde0f /root/luks-albion.key - ''; - fileSystems = { "/" = { device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";