mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 01:17:42 -04:00
Rename nixosHostConfig to mkNixosHost
This commit is contained in:
parent
9715c97ac6
commit
ce4262d2e2
5 changed files with 14 additions and 14 deletions
|
|
@ -26,14 +26,14 @@ The Nix bits are driven by `flake.nix` which pulls in things under `modules/`. B
|
||||||
- all the outputs from the inputs
|
- all the outputs from the inputs
|
||||||
- a `let` ... `in` block that contains:
|
- a `let` ... `in` block that contains:
|
||||||
- `darwinHostConfig` which takes a set of paramters as an attribute set and pulls in all the things needed to use Nix on a macOS host
|
- `darwinHostConfig` which takes a set of paramters as an attribute set and pulls in all the things needed to use Nix on a macOS host
|
||||||
- `nixosHostConfig` which takes a set of parameters as an attribute set and pulls in all the things needed to configure a NixOS host
|
- `mkNixosHost` which takes a set of parameters as an attribute set and pulls in all the things needed to configure a NixOS host
|
||||||
- `linuxHomeConfig` which takes a set of paramters as an attribute set and pulls in the things I manage on non-NixOS Linux hosts
|
- `linuxHomeConfig` which takes a set of paramters as an attribute set and pulls in the things I manage on non-NixOS Linux hosts
|
||||||
- the body of outputs that contains:
|
- the body of outputs that contains:
|
||||||
- `darwinConfigurations` contains is an attribute set that contains keys named for each macOS host set to the results of a call to `darwinHostConfig` with values for each of the required parameters
|
- `darwinConfigurations` contains is an attribute set that contains keys named for each macOS host set to the results of a call to `darwinHostConfig` with values for each of the required parameters
|
||||||
- `nixosConfigurations` contains is an attribute set that contains keys named for each NixOS host set to the results of a call to `darwinHostConfig` with values for each of the required parameters
|
- `nixosConfigurations` contains is an attribute set that contains keys named for each NixOS host set to the results of a call to `darwinHostConfig` with values for each of the required parameters
|
||||||
- `homeConfigurations` contains an entry for each username set to the results of a call to `linuxHomeConfig` with values for each of the required parameters
|
- `homeConfigurations` contains an entry for each username set to the results of a call to `linuxHomeConfig` with values for each of the required parameters
|
||||||
|
|
||||||
The parameters on `darwinHostConfig` & `nixosHostConfig` are:
|
The parameters on `darwinHostConfig` & `mkNixosHost` are:
|
||||||
|
|
||||||
- `system:` the system definition to use for nixpkgs
|
- `system:` the system definition to use for nixpkgs
|
||||||
- `hostname:` the hostname of the machine being configured
|
- `hostname:` the hostname of the machine being configured
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
darwinHostConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }:
|
darwinHostConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }:
|
||||||
nix-darwin.lib.darwinSystem { };
|
nix-darwin.lib.darwinSystem { };
|
||||||
|
|
||||||
nixosHostConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }:
|
mkNixosHost = { system, hostname, username, additionalModules, additionalSpecialArgs }:
|
||||||
nixpkgs.lib.nixosSystem { };
|
nixpkgs.lib.nixosSystem { };
|
||||||
|
|
||||||
linuxHomeConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }:
|
linuxHomeConfig = { system, hostname, username, additionalModules, additionalSpecialArgs }:
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
# NixOS hosts
|
# NixOS hosts
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
rainbow-planet = nixosHostConfig {
|
rainbow-planet = mkNixosHost {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
hostname = "rainbow-planet";
|
hostname = "rainbow-planet";
|
||||||
username = "gene";
|
username = "gene";
|
||||||
|
|
|
||||||
12
flake.nix
12
flake.nix
|
|
@ -170,38 +170,38 @@
|
||||||
|
|
||||||
# NixOS hosts
|
# NixOS hosts
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
bigboy = mylib.nixosHostConfig {
|
bigboy = mylib.mkNixosHost {
|
||||||
hostname = "bigboy";
|
hostname = "bigboy";
|
||||||
additionalModules = [
|
additionalModules = [
|
||||||
nixos-hardware.nixosModules.lenovo-thinkpad-p52
|
nixos-hardware.nixosModules.lenovo-thinkpad-p52
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
hetznix01 = mylib.nixosHostConfig {
|
hetznix01 = mylib.mkNixosHost {
|
||||||
hostname = "hetznix01";
|
hostname = "hetznix01";
|
||||||
additionalModules = [
|
additionalModules = [
|
||||||
simple-nixos-mailserver.nixosModule
|
simple-nixos-mailserver.nixosModule
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
hetznix02 = mylib.nixosHostConfig {
|
hetznix02 = mylib.mkNixosHost {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
hostname = "hetznix02";
|
hostname = "hetznix02";
|
||||||
additionalModules = [
|
additionalModules = [
|
||||||
# simple-nixos-mailserver.nixosModule
|
# simple-nixos-mailserver.nixosModule
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nixnas1 = mylib.nixosHostConfig {
|
nixnas1 = mylib.mkNixosHost {
|
||||||
hostname = "nixnas1";
|
hostname = "nixnas1";
|
||||||
additionalModules = [
|
additionalModules = [
|
||||||
simple-nixos-mailserver.nixosModule
|
simple-nixos-mailserver.nixosModule
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nixnuc = mylib.nixosHostConfig {
|
nixnuc = mylib.mkNixosHost {
|
||||||
hostname = "nixnuc";
|
hostname = "nixnuc";
|
||||||
additionalModules = [
|
additionalModules = [
|
||||||
simple-nixos-mailserver.nixosModule
|
simple-nixos-mailserver.nixosModule
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
rainbow-planet = mylib.nixosHostConfig {
|
rainbow-planet = mylib.mkNixosHost {
|
||||||
hostname = "rainbow-planet";
|
hostname = "rainbow-planet";
|
||||||
additionalModules = [
|
additionalModules = [
|
||||||
nixos-cosmic.nixosModules.default
|
nixos-cosmic.nixosModules.default
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ inputs, ... }: let
|
{ inputs, ... }: let
|
||||||
nixosHostConfig = import ./nixosHostConfig.nix { inherit inputs; };
|
mkNixosHost = import ./mkNixosHost.nix { inherit inputs; };
|
||||||
in {
|
in {
|
||||||
inherit (nixosHostConfig)
|
inherit (mkNixosHost)
|
||||||
nixosHostConfig
|
mkNixosHost
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
nixosHostConfig = {
|
mkNixosHost = {
|
||||||
system ? "x86_64-linux",
|
system ? "x86_64-linux",
|
||||||
hostname,
|
hostname,
|
||||||
username ? "gene",
|
username ? "gene",
|
||||||
Loading…
Add table
Add a link
Reference in a new issue