From 33639143ea50404a04bc4c454435aff1bd79dd4b Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 20 Dec 2024 13:58:21 +0100 Subject: refactor({modules,test}): Migrate to a `by-name` structure --- flake.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'flake.nix') 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 ]; }; -- cgit 1.4.1