Skip to content

Commit

Permalink
feat: nixosProfiles.facter - init
Browse files Browse the repository at this point in the history
  • Loading branch information
Lehmanator committed Jan 21, 2025
1 parent fe95feb commit 810f2cf
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
16 changes: 16 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
# --- Modules: Filesystems -------------------------------------
impermanence.url = "github:nix-community/impermanence";
disko = {inputs.nixpkgs.follows="nixpkgs"; url="github:nix-community/disko";};
facter = {inputs.nixpkgs.follows="nixpkgs"; url="github:nix-community/nixos-facter-modules";};
envfs = {inputs.nixpkgs.follows="nixpkgs"; url="github:Mic92/envfs";};
# --- Modules: Containers --------------------------------------
nix-helm = {inputs.nixpkgs.follows="nixpkgs"; url="github:gytis-ivaskevicius/nix-helm";};
Expand Down
1 change: 1 addition & 0 deletions nixos/profiles/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
(inputs.self + /nixos/profiles/bootspec.nix)
(inputs.self + /nixos/profiles/cachix-agent.nix)
(inputs.self + /nixos/profiles/colmena.nix)
(inputs.self + /nixos/profiles/facter.nix)
(inputs.self + /nixos/profiles/fs-btrfs.nix)
(inputs.self + /nixos/profiles/fs-ntfs.nix)
(inputs.self + /nixos/profiles/fwupd.nix)
Expand Down
21 changes: 21 additions & 0 deletions nixos/profiles/facter.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ inputs, config, lib, pkgs, ... }:
{
# https://github.com/nix-community/nixos-facter-modules
# https://github.com/nix-community/nixos-facter
# https://nix-community.github.io/nixos-facter/latest/
# nixos-facter-modules -
imports = [inputs.facter.nixosModules.facter];
facter.reportPath = inputs.self + /nixos/hosts/${config.networking.hostName}/facter.json;

# $ sudo nix run nixpkgs#nixos-facter -- -o facter.json
environment.systemPackages = [
pkgs.nixos-facter
(pkgs.writeShellApplication {
name = "facter";
runtimeInputs = [pkgs.nixos-facter];
text = ''
nixos-facter -o nixos/hosts/${config.networking.hostName}/facter.json
'';
})
];
}

0 comments on commit 810f2cf

Please sign in to comment.