From 4a82f5292034b678ea7bd94b2a0cceada89ee281 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Mon, 13 Jan 2025 16:14:46 +0100 Subject: [PATCH] WIP: Just a quick hack overlaying systemd from staging-next --- flake.lock | 19 ++++++++++++++++++- flake.nix | 8 +++++++- modules/image/default.nix | 17 ++++++++++------- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 2f5f887..334ed87 100644 --- a/flake.lock +++ b/flake.lock @@ -16,9 +16,26 @@ "type": "github" } }, + "nixpkgs-staging-next": { + "locked": { + "lastModified": 1736775562, + "narHash": "sha256-4qqVIwZXGezX1X6Hyo+MdU/xhQv4IMKCE4qqa1oXYw4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "71c2fcc94d888c994a0962af2d1d78ae73181c79", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "staging-next", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-staging-next": "nixpkgs-staging-next" } } }, diff --git a/flake.nix b/flake.nix index d82cc3a..7cce781 100644 --- a/flake.nix +++ b/flake.nix @@ -3,10 +3,11 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-staging-next.url = "github:NixOS/nixpkgs/staging-next"; }; outputs = - { self, nixpkgs }: + { self, nixpkgs, nixpkgs-staging-next }: let releaseVersion = "0.0.1"; system = "x86_64-linux"; @@ -44,6 +45,11 @@ system.image.id = "patos"; system.image.version = releaseVersion; image.compress = false; + nixpkgs.overlays = [ + (final: prev: { + systemd = nixpkgs-staging-next.legacyPackages.${final.system}.systemd; + }) + ]; } self.nixosModules.image self.nixosModules.devel diff --git a/modules/image/default.nix b/modules/image/default.nix index dc705e9..e09751b 100644 --- a/modules/image/default.nix +++ b/modules/image/default.nix @@ -57,7 +57,8 @@ Label = "patos-state"; Minimize = "off"; FactoryReset = "yes"; - Encrypt = "tpm2"; + # FIXME: borked w/systemd 257? + # Encrypt = "tpm2"; SizeMinBytes = "2G"; SplitName = "-"; }; @@ -110,12 +111,14 @@ { "/var" = { fsType = parts."40-var".Format; - device = "/dev/mapper/var"; - encrypted = { - enable = true; - blkDev = "/dev/disk/by-partuuid/${parts."40-var".UUID}"; - label = "var"; - }; + device = "/dev/disk/by-partuuid/${parts."40-var".UUID}"; + # FIXME: borked w/systemd 257? + # device = "/dev/mapper/var"; + # encrypted = { + # enable = true; + # blkDev = "/dev/disk/by-partuuid/${parts."40-var".UUID}"; + # label = "var"; + # }; }; }; -- 2.47.0