summary refs log tree commit diff stats
path: root/flake.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-20 13:58:21 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-20 13:58:21 +0100
commit33639143ea50404a04bc4c454435aff1bd79dd4b (patch)
treeede4b6832bb86ac30281fc22700ae1fe40658f37 /flake.nix
parentfix(treewide): Update to nixos release 24.11 (diff)
downloadnixos-server-33639143ea50404a04bc4c454435aff1bd79dd4b.tar.gz
nixos-server-33639143ea50404a04bc4c454435aff1bd79dd4b.zip
refactor({modules,test}): Migrate to a `by-name` structure
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix
index d9f02c2..ff3014f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -5,6 +5,8 @@
     nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11-small";
     nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
 
+    library.url = "git+https://git.vhack.eu/vhack.eu/nix-library?ref=prime";
+
     # inputs for following
     systems = {
       url = "github:nix-systems/x86_64-linux"; # only evaluate for this system
@@ -73,6 +75,7 @@
     self,
     nixpkgs,
     nixpkgs-unstable,
+    library,
     # modules
     simple-nixos-mailserver,
     impermanence,
@@ -90,7 +93,7 @@
     specialArgs =
       attrs
       // {
-        inherit pkgsUnstable nixpkgs-unstable nixos-lib extraModules;
+        inherit pkgsUnstable nixpkgs-unstable nixos-lib extraModules nixLib;
       };
 
     extraModules = [
@@ -100,8 +103,9 @@
       agenix.nixosModules.default
     ];
 
-    inherit (pkgs) lib;
-    tests = import ./tests.nix {inherit lib pkgs specialArgs;};
+    tests = import ./tests {inherit pkgs specialArgs nixLib;};
+
+    inherit (library) nixLib;
   in {
     nixosConfigurations."server1" = nixpkgs.lib.nixosSystem {
       system = "x86_64-linux";
@@ -109,7 +113,7 @@
       modules =
         extraModules
         ++ [
-          ./modules/nixos
+          ./modules
           ./hosts/server1/configuration.nix
         ];
     };