From f172746e8914ee8aa61ccd3137fd8c5de7d0f6a5 Mon Sep 17 00:00:00 2001 From: Florian Agbuya Date: Tue, 2 Jan 2024 17:06:42 +0800 Subject: [PATCH] add not-os nixpkgs related patches --- pr-29.patch | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pr-29.patch diff --git a/pr-29.patch b/pr-29.patch new file mode 100644 index 0000000..040f11a --- /dev/null +++ b/pr-29.patch @@ -0,0 +1,41 @@ +diff --git a/base.nix b/base.nix +index 7eaee32..c1881cb 100644 +--- a/base.nix ++++ b/base.nix +@@ -155,6 +155,23 @@ with lib; + # dummy to make setup-etc happy + ''; + system.activationScripts.etc = stringAfter [ "users" "groups" ] config.system.build.etcActivationCommands; ++ # Re-apply deprecated var value due to systemd preference in recent nixpkgs ++ # See https://github.com/NixOS/nixpkgs/commit/59e37267556eb917146ca3110ab7c96905b9ffbd ++ system.activationScripts.var = lib.mkForce '' ++ # Various log/runtime directories. ++ ++ mkdir -p /var/tmp ++ chmod 1777 /var/tmp ++ ++ # Empty, immutable home directory of many system accounts. ++ mkdir -p /var/empty ++ # Make sure it's really empty ++ ${pkgs.e2fsprogs}/bin/chattr -f -i /var/empty || true ++ find /var/empty -mindepth 1 -delete ++ chmod 0555 /var/empty ++ chown root:root /var/empty ++ ${pkgs.e2fsprogs}/bin/chattr -f +i /var/empty || true ++ ''; + + # nix-build -A system.build.toplevel && du -h $(nix-store -qR result) --max=0 -BM|sort -n + system.build.toplevel = pkgs.runCommand "not-os" { +diff --git a/systemd-compat.nix b/systemd-compat.nix +index 11464c6..cb223b8 100644 +--- a/systemd-compat.nix ++++ b/systemd-compat.nix +@@ -9,6 +9,8 @@ with lib; + }; + systemd.user = mkOption { + }; ++ systemd.tmpfiles = mkOption { ++ }; + }; + config = { + }; \ No newline at end of file