From da6a7d5c69aa3e8b70755e88be0f44b642422114 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 7 Dec 2023 20:32:45 +0100 Subject: bump --- flake.nix | 79 ++++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 26 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index b6de92f2..7ed56d44 100644 --- a/flake.nix +++ b/flake.nix @@ -19,12 +19,24 @@ # ref = "nixos-unstable"; ref = "ppp-systemd"; }; - nixpkgs-stable = { + nixpkgs-pgbackrest = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; ref = "23.05"; }; + nixpkgs-stable = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "23.11"; + }; + nixpkgs-eostre = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "23.11"; + }; home-manager = { type = "github"; # owner = "nix-community"; @@ -97,23 +109,35 @@ nixpkgs.follows = "nixpkgs"; }; }; + poetry2nix = { + type = "github"; + owner = "nix-community"; + repo = "poetry2nix"; + ref = "master"; + inputs = { + flake-utils.follows = "flake-utils"; + nixpkgs.follows = "nixpkgs"; + }; + }; ca-util = { type = "gitlab"; owner = "gkleen"; repo = "ca"; - ref = "v2.1.0"; + ref = "v2.3.3"; inputs = { nixpkgs.follows = "nixpkgs"; + poetry2nix.follows = "poetry2nix"; }; }; backup-utils = { type = "gitlab"; owner = "gkleen"; repo = "backup-utils"; - ref = "v0.1.0"; + ref = "v0.1.2"; inputs = { nixpkgs.follows = "nixpkgs"; + poetry2nix.follows = "poetry2nix"; }; }; prometheus-borg-exporter = { @@ -123,6 +147,7 @@ ref = "main"; inputs = { nixpkgs.follows = "nixpkgs"; + poetry2nix.follows = "poetry2nix"; }; }; }; @@ -133,7 +158,7 @@ inherit (nixpkgs) lib; utils = import ./utils { inherit lib; }; inherit (utils) nixImport overrideModule; - inherit (lib) nixosSystem mkIf splitString filterAttrs listToAttrs mapAttrsToList nameValuePair concatMap composeManyExtensions mapAttrs mapAttrs' recursiveUpdate genAttrs unique elem optionalAttrs isDerivation concatLists concatStringsSep fix filter makeOverridable foldr; + inherit (lib) mkIf splitString filterAttrs listToAttrs mapAttrsToList nameValuePair concatMap composeManyExtensions mapAttrs mapAttrs' recursiveUpdate genAttrs unique elem optionalAttrs isDerivation concatLists concatStringsSep fix filter makeOverridable foldr; inherit (lib.strings) escapeNixString hasSuffix; accountUserName = accountName: @@ -149,29 +174,31 @@ mkOverlay = path: final: prev: import path ({ inherit final; inherit prev; flakeInputs = inputs; flake = self; } // mkSources prev); - mkNixosConfiguration = addProfiles: dir: path: hostName: nixosSystem rec { - specialArgs = { - flake = self; - flakeInputs = inputs; - path = ./.; + mkNixosConfiguration = addProfiles: dir: path: hostName: + let inherit ((inputs."nixpkgs-${hostName}" or inputs.nixpkgs).lib) nixosSystem; + in nixosSystem rec { + specialArgs = { + flake = self; + flakeInputs = inputs; + path = ./.; + }; + modules = + let + defaultProfiles = with self.nixosModules.systemProfiles; + [ core + ]; + + local = dir + "/${path}"; + argsModule = { pkgs, ... }: { + _module.args = { + customUtils = utils; + inherit hostName; + } // mkSources pkgs; + }; + accountModules = attrValues (filterAttrs accountMatchesHost self.nixosModules.accounts); + accountMatchesHost = n: _v: accountHostName n == hostName; + in attrValues (filterAttrs (n: _v: !(elem n ["systemProfiles" "users" "userProfiles" "accounts"])) self.nixosModules) ++ [ argsModule ] ++ defaultProfiles ++ addProfiles ++ [ local ] ++ accountModules; }; - modules = - let - defaultProfiles = with self.nixosModules.systemProfiles; - [ core - ]; - - local = dir + "/${path}"; - argsModule = { pkgs, ... }: { - _module.args = { - customUtils = utils; - inherit hostName; - } // mkSources pkgs; - }; - accountModules = attrValues (filterAttrs accountMatchesHost self.nixosModules.accounts); - accountMatchesHost = n: _v: accountHostName n == hostName; - in attrValues (filterAttrs (n: _v: !(elem n ["systemProfiles" "users" "userProfiles" "accounts"])) self.nixosModules) ++ [ argsModule ] ++ defaultProfiles ++ addProfiles ++ [ local ] ++ accountModules; - }; mkSystemProfile = dir: path: profileName: { imports = [ (dir + "/${path}") ]; -- cgit v1.2.3