added for vps
This commit is contained in:
parent
15d0cb574b
commit
ffbf9e08f2
9 changed files with 314 additions and 21 deletions
49
hosts/server/flake.nix
Normal file
49
hosts/server/flake.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
inputs.disko.url = "github:nix-community/disko";
|
||||
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
disko,
|
||||
nixos-facter-modules,
|
||||
...
|
||||
}: {
|
||||
nixosConfigurations.alteur = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
# Use this for all other targets
|
||||
# nixos-anywhere --flake .#generic --generate-hardware-config nixos-generate-config ./hardware-configuration.nix <hostname>
|
||||
nixosConfigurations.generic = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
./configuration.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
# Slightly experimental: Like generic, but with nixos-facter (https://github.com/numtide/nixos-facter)
|
||||
# nixos-anywhere --flake .#generic-nixos-facter --generate-hardware-config nixos-facter facter.json <hostname>
|
||||
nixosConfigurations.generic-nixos-facter = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
./configuration.nix
|
||||
nixos-facter-modules.nixosModules.facter
|
||||
{
|
||||
config.facter.reportPath =
|
||||
if builtins.pathExists ./facter.json
|
||||
then ./facter.json
|
||||
else throw "Have you forgotten to run nixos-anywhere with `--generate-hardware-config nixos-facter ./facter.json`?";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue