Start switch to nixos-facter
This commit is contained in:
parent
891ce0ce17
commit
32c24866e9
3 changed files with 6485 additions and 14 deletions
13
flake.nix
13
flake.nix
|
@ -7,7 +7,7 @@
|
||||||
nixpkgs-pr-feishin.url = "github:NixOS/nixpkgs?ref=pull/414929/head"; # Feishin 0.17.0
|
nixpkgs-pr-feishin.url = "github:NixOS/nixpkgs?ref=pull/414929/head"; # Feishin 0.17.0
|
||||||
|
|
||||||
deploy-rs.url = "github:serokell/deploy-rs"; # Remote deployment.
|
deploy-rs.url = "github:serokell/deploy-rs"; # Remote deployment.
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware"; # Hardware specific config.
|
nixos-facter.url = "github:nix-community/nixos-facter-modules"; # Hardware specific config.
|
||||||
|
|
||||||
# Secure boot.
|
# Secure boot.
|
||||||
lanzaboote = {
|
lanzaboote = {
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {nixos-hardware, ...} @ inputs: let
|
outputs = {...} @ inputs: let
|
||||||
# Import helpers & make functions available.
|
# Import helpers & make functions available.
|
||||||
helpers = import ./helpers.nix inputs;
|
helpers = import ./helpers.nix inputs;
|
||||||
inherit (helpers) mergeHosts mkHost;
|
inherit (helpers) mergeHosts mkHost;
|
||||||
|
@ -49,26 +49,17 @@
|
||||||
# ThinkPad T480.
|
# ThinkPad T480.
|
||||||
(mkHost "muskduck" {
|
(mkHost "muskduck" {
|
||||||
suite = "desktop";
|
suite = "desktop";
|
||||||
hostModules = [
|
|
||||||
nixos-hardware.nixosModules.lenovo-thinkpad-t480
|
|
||||||
];
|
|
||||||
})
|
})
|
||||||
|
|
||||||
# ThinkPad X220.
|
# ThinkPad X220.
|
||||||
(mkHost "pardalote" {
|
(mkHost "pardalote" {
|
||||||
suite = "desktop";
|
suite = "desktop";
|
||||||
hostModules = [
|
|
||||||
nixos-hardware.nixosModules.lenovo-thinkpad-x220
|
|
||||||
];
|
|
||||||
})
|
})
|
||||||
|
|
||||||
# Raspberry Pi 4B.
|
# Raspberry Pi 4B.
|
||||||
(mkHost "weebill" {
|
(mkHost "weebill" {
|
||||||
suite = "server";
|
suite = "server";
|
||||||
platform = "aarch64-linux";
|
platform = "aarch64-linux";
|
||||||
hostModules = [
|
|
||||||
nixos-hardware.nixosModules.raspberry-pi-4
|
|
||||||
];
|
|
||||||
})
|
})
|
||||||
|
|
||||||
# VM running docker containers.
|
# VM running docker containers.
|
||||||
|
|
|
@ -11,7 +11,6 @@ with inputs.nixpkgs.lib; {
|
||||||
platform ? "x86_64-linux",
|
platform ? "x86_64-linux",
|
||||||
suite ? "",
|
suite ? "",
|
||||||
docker ? false,
|
docker ? false,
|
||||||
hostModules ? [],
|
|
||||||
}: let
|
}: let
|
||||||
# System architecture.
|
# System architecture.
|
||||||
system = platform;
|
system = platform;
|
||||||
|
@ -21,8 +20,7 @@ with inputs.nixpkgs.lib; {
|
||||||
|
|
||||||
# Extra modules to import.
|
# Extra modules to import.
|
||||||
extraModules =
|
extraModules =
|
||||||
hostModules # Host-specific modules.
|
optionals (docker == true) [./suites/server/docker] # Enable docker if required.
|
||||||
++ optionals (docker == true) [./suites/server/docker] # Enable docker if required.
|
|
||||||
++ (filesystem.listFilesRecursive ./modules); # Custom modules.
|
++ (filesystem.listFilesRecursive ./modules); # Custom modules.
|
||||||
|
|
||||||
# nixpkgs config.
|
# nixpkgs config.
|
||||||
|
@ -78,6 +76,10 @@ with inputs.nixpkgs.lib; {
|
||||||
lanzaboote.nixosModules.lanzaboote # Secure boot.
|
lanzaboote.nixosModules.lanzaboote # Secure boot.
|
||||||
sops-nix.nixosModules.sops # Secrets management.
|
sops-nix.nixosModules.sops # Secrets management.
|
||||||
|
|
||||||
|
# Hardware configuration.
|
||||||
|
nixos-facter.nixosModules.facter
|
||||||
|
{config.facter.reportPath = ./hosts/${hostname}/facter.json;}
|
||||||
|
|
||||||
./suites/${suite} # Collection of configuration options for different types of systems.
|
./suites/${suite} # Collection of configuration options for different types of systems.
|
||||||
./hosts/${hostname} # Host-specific config.
|
./hosts/${hostname} # Host-specific config.
|
||||||
|
|
||||||
|
|
6478
hosts/muskduck/facter.json
Normal file
6478
hosts/muskduck/facter.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue