Make the NixOS hostname configurable
This commit is contained in:
parent
e87b718592
commit
7c72cc4d5d
10
flake.nix
10
flake.nix
|
@ -32,7 +32,15 @@
|
||||||
|
|
||||||
flake = {
|
flake = {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
nixedo = nixos-system { desktop = true; };
|
apollo = nixos-system {
|
||||||
|
desktop = true;
|
||||||
|
hostname = "apollo";
|
||||||
|
};
|
||||||
|
|
||||||
|
nixedo = nixos-system {
|
||||||
|
desktop = true;
|
||||||
|
hostname = "nixedo";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, desktop ? false, pkgs, system }:
|
{ inputs, desktop ? false, hostname, pkgs, system }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgsUnstable = inputs.nixpkgs-unstable.legacyPackages."${system}";
|
pkgsUnstable = inputs.nixpkgs-unstable.legacyPackages."${system}";
|
||||||
|
@ -37,7 +37,7 @@ in
|
||||||
DefaultTimeoutStopSec=10s
|
DefaultTimeoutStopSec=10s
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# networking.hostName = "nixedo"; # Define your hostname.
|
networking.hostName = hostname;
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
# Configure network proxy if necessary
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{ inputs, pkgs, self, system, username }:
|
{ inputs, pkgs, self, system, username }:
|
||||||
|
|
||||||
{ desktop ? false }:
|
{ desktop ? false, hostname }:
|
||||||
|
|
||||||
let
|
let
|
||||||
configuration = import ./configuration.nix { inherit desktop inputs pkgs system; };
|
configuration = import ./configuration.nix { inherit desktop hostname inputs pkgs system; };
|
||||||
hardware-configuration = import ./hardware-configuration.nix;
|
hardware-configuration = import ./hardware-configuration.nix;
|
||||||
in
|
in
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
Loading…
Reference in a new issue