ctucx.git: nixfiles

ctucx' nixfiles

commit b3501d2494a817f4acdc05971ff0ee5c656722d4
parent 4f5b5aacba07664b41a3b0b8eb45efbaafc98012
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sat, 21 May 2022 11:21:13 +0200

machines/blechbuechse: use pinned nixpkgs for nix-shell etc
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/helpers/make-nixpkgs.nix b/helpers/make-nixpkgs.nix
@@ -14,8 +14,8 @@ let
       ${lib.optionalString (config.system.nixos.revision != null) ''
         echo -n ${config.system.nixos.revision} > $out/nixpkgs/.git-revision  
       ''}
-      echo -n ${config.system.nixos.versionSuffix} > $out/nixpkgs/.git-revision
-      echo ${config.system.nixos.versionSuffix} | sed -e s/pre// > $out/nixpkgs/svn-revision
+      #echo -n ${config.system.nixos.versionSuffix} > $out/nixpkgs/.git-revision
+      #echo ${config.system.nixos.versionSuffix} | sed -e s/pre// > $out/nixpkgs/svn-revision
       date +%s > $out/last_updated
     '';
 
diff --git a/machines/blechbuechse/darwin-configuration.nix b/machines/blechbuechse/darwin-configuration.nix
@@ -22,6 +22,9 @@ in {
     <home-manager/nix-darwin>
     ./modules/syncthing.nix
     ./modules/quirks.nix
+
+    ../../helpers/make-nixpkgs.nix
+
     ./services/syncthing.nix
     ../../configurations/yubikey.nix
     ../../configurations/programs/cli/bash.nix
diff --git a/machines/blechbuechse/modules/quirks.nix b/machines/blechbuechse/modules/quirks.nix
@@ -11,6 +11,10 @@
 
     services.dbus.packages     = lib.mkOption { type = lib.types.listOf lib.types.path; };
     services.udev.packages     = lib.mkOption { type = lib.types.listOf lib.types.path; };
+
+    system.nixos.version       = lib.mkOption { type = lib.types.str; default = lib.version; };
+    system.nixos.revision      = lib.mkOption { type = lib.types.str; default = ""; };
+    system.nixos.versionSuffix = lib.mkOption { type = lib.types.str; default = ""; };
   };
 
 }