added nixos-facter to generate hardware report

This commit is contained in:
Aleksandr Lebedev 2024-12-18 23:16:00 +01:00
parent 940ec2f0ec
commit 6599e23992
6 changed files with 7697 additions and 4 deletions

View file

@ -10,6 +10,15 @@ Rebuild system
nh os switch nh os switch
~~~ ~~~
Generate hardware report
~~~
sudo nix run \
--option experimental-features "nix-command flakes" \
--option extra-substituters https://numtide.cachix.org \
--option extra-trusted-public-keys numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE= \
github:numtide/nixos-facter -- -o facter.json
~~~
## Install system ## Install system
Assuming that you're in nixos installer Assuming that you're in nixos installer
~~~ ~~~

16
flake.lock generated
View file

@ -734,6 +734,21 @@
"type": "github" "type": "github"
} }
}, },
"nixos-facter-modules": {
"locked": {
"lastModified": 1732288619,
"narHash": "sha256-zSQ2cR+NRJfHUVfkv+O6Wi53wXfzX8KHiO8fRfnvc0M=",
"owner": "numtide",
"repo": "nixos-facter-modules",
"rev": "862648589993a96480c2255197a28feea712f68f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nixos-facter-modules",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1733212471, "lastModified": 1733212471,
@ -912,6 +927,7 @@
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"impermanence": "impermanence", "impermanence": "impermanence",
"nixos-facter-modules": "nixos-facter-modules",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nixvim": "nixvim", "nixvim": "nixvim",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",

View file

@ -4,8 +4,6 @@
inputs = { inputs = {
nixpkgs = { nixpkgs = {
url = "github:nixos/nixpkgs?ref=nixos-unstable"; url = "github:nixos/nixpkgs?ref=nixos-unstable";
}; };
nixvim = { nixvim = {
url = "github:nix-community/nixvim"; url = "github:nix-community/nixvim";
@ -28,6 +26,7 @@
url = "github:nix-community/disko"; url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
impermanence.url = "github:nix-community/impermanence"; impermanence.url = "github:nix-community/impermanence";
}; };
@ -50,7 +49,7 @@
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
stylix.nixosModules.stylix stylix.nixosModules.stylix
inputs.nixos-facter-modules.nixosModules.facter
]; ];
first-nixos-install = "1729112485"; #stat -c %W / first-nixos-install = "1729112485"; #stat -c %W /
@ -86,7 +85,7 @@
#nur.nixosModules.nur #nur.nixosModules.nur
./nixos/configuration.nix ./nixos/configuration.nix
./nixos/nvidia.nix ./nixos/nvidia.nix
./nixos/homepc-hardware-conf.nix #./nixos/homepc-hardware-conf.nix
./nixos/libvirt.nix ./nixos/libvirt.nix
#nix-flatpak.nixosModules.default #nix-flatpak.nixosModules.default
] ++ general-modules; ] ++ general-modules;

View file

@ -11,7 +11,9 @@
./firefox.nix ./firefox.nix
./modules/services/autoupgrade ./modules/services/autoupgrade
./modules/sops ./modules/sops
./hosts/${hwconfig.hostname}
]; ];
facter.reportPath = ./hosts/${hwconfig.hostname}/facter.json;
kylekrein.services.autoUpgrade = { kylekrein.services.autoUpgrade = {
enable = true; enable = true;
pushUpdates = if hwconfig.hostname == "${username}-homepc" then true else false; pushUpdates = if hwconfig.hostname == "${username}-homepc" then true else false;

View file

@ -0,0 +1,4 @@
{ pkgs, lib, hwconfig, inputs, ... }:
{
systemd.network.wait-online.enable = lib.mkForce false;
}

File diff suppressed because it is too large Load diff