Flake: nixos-facter-module with flake: false

This commit is contained in:
Johannes Kirschbauer
2024-08-28 10:32:41 +02:00
parent 4306028fcb
commit fec7b3e120
4 changed files with 32 additions and 17 deletions

17
flake.lock generated
View File

@@ -40,6 +40,22 @@
"type": "github" "type": "github"
} }
}, },
"nixos-facter-modules": {
"flake": false,
"locked": {
"lastModified": 1724681057,
"narHash": "sha256-wxx2Sh/urE3sKY/1v3tmrWTNMIQ3RoJtd7bcuqVpY2Y=",
"owner": "numtide",
"repo": "nixos-facter-modules",
"rev": "55088bf19810d23ca7cb86fb71516c95d97f035b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nixos-facter-modules",
"type": "github"
}
},
"nixos-images": { "nixos-images": {
"inputs": { "inputs": {
"nixos-stable": [], "nixos-stable": [],
@@ -81,6 +97,7 @@
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nixos-facter-modules": "nixos-facter-modules",
"nixos-images": "nixos-images", "nixos-images": "nixos-images",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",

View File

@@ -18,16 +18,11 @@
treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
#nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
#nixos-facter-modules.inputs.nixpkgs.follows = "nixpkgs"; # TODO: remove this once the upstream doesnt have dependencies
#nixos-facter-modules.inputs.systems.follows = "systems"; nixos-facter-modules.flake = false;
#nixos-facter-modules.inputs.blueprint.follows = "blueprint"; # nixos-facter-modules.inputs.nixpkgs.follows = "nixpkgs";
#nixos-facter-modules.inputs.treefmt-nix.follows = "treefmt-nix";
# Pinned input for nixos-facter-modules
# Allows downstream flakes to .follow override the input
#blueprint.url = "github:numtide/blueprint";
#blueprint.inputs.nixpkgs.follows = "nixpkgs";
#blueprint.inputs.systems.follows = "systems";
}; };
outputs = outputs =

View File

@@ -67,13 +67,13 @@ let
facterJson = "${directory}/machines/${name}/facter.json"; facterJson = "${directory}/machines/${name}/facter.json";
hwConfig = "${directory}/machines/${name}/hardware-configuration.nix"; hwConfig = "${directory}/machines/${name}/hardware-configuration.nix";
facterModules = lib.optionals (builtins.pathExists facterJson) [
"${clan-core.inputs.nixos-facter-modules}/modules/nixos/facter.nix"
{ config.facter.reportPath = facterJson; }
];
in in
#facterModules = lib.optionals (builtins.pathExists facterJson) [
# clan-core.inputs.nixos-facter-modules.nixosModules.facter
# { config.facter.reportPath = facterJson; }
#];
(machineImports settings) (machineImports settings)
#++ facterModules ++ facterModules
++ [ ++ [
{ {
# Autoinclude configuration.nix and hardware-configuration.nix # Autoinclude configuration.nix and hardware-configuration.nix

View File

@@ -45,8 +45,11 @@
}; };
clanDir = lib.mkOption { clanDir = lib.mkOption {
type = lib.types.path; type = lib.types.path;
# TODO: @DavHau: before we can remove this, we need to make sure that Palo's config case works # documentation.nixos.extraModules = [
default = ./.; # ...
# clan-core.nixosModules.clanCore
# { clan.core.clanDir = ./path/to/flake; }
# ];
description = '' description = ''
the location of the flake repo, used to calculate the location of facts and secrets the location of the flake repo, used to calculate the location of facts and secrets
''; '';