about summary refs log tree commit diff stats
path: root/flake/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake/default.nix')
-rw-r--r--flake/default.nix36
1 files changed, 25 insertions, 11 deletions
diff --git a/flake/default.nix b/flake/default.nix
index f158478b..222b18ac 100644
--- a/flake/default.nix
+++ b/flake/default.nix
@@ -3,6 +3,7 @@
   self,
   pkgs,
   pkgsStable,
+  nixLib,
   myPkgs,
   system,
   sysLib,
@@ -38,12 +39,10 @@
       nixpkgs_as_input
       nixpkgs_open_prs
       # my things
-      
       shell_library
       sysLib
       templates
       # modules
-      
       home-manager
       nixVim
       nixos-generators
@@ -55,22 +54,37 @@
       lanzaboote
       nix-index-database
       # bins
-      
       river_init_lesser
       # external
-      
       user_js
       ;
   };
+
+  tests = import ../tests {
+    inherit pkgs nixpkgs_as_input myPkgs;
+    inherit (pkgs) lib;
+    extraModules = {
+      termfilechooser = "${nixpkgs_open_prs.nixpkgs-tfc}/nixos/modules/config/xdg/portals/termfilechooser.nix";
+
+      agenix = agenix.nixosModules.default;
+      disko = disko.nixosModules.default;
+      serverphone = serverphone.nixosModules.default;
+      inherit (home-manager.nixosModules) home-manager;
+      inherit (impermanence.nixosModules) impermanence;
+      inherit (lanzaboote.nixosModules) lanzaboote;
+    };
+  };
 in {
   inherit nixosConfigurations;
-  checks."${system}" = {
-    inherit
-      (self.packages."${system}")
-      nvim
-      ;
-    formatting = treefmtEval.config.build.check self;
-  };
+  checks."${system}" =
+    nixLib.maybeMerge {
+      inherit
+        (self.packages."${system}")
+        nvim
+        ;
+      formatting = treefmtEval.config.build.check self;
+    }
+    tests "flake checks";
 
   # legacyPackages."${system}" = pkgs;