diff --git a/lib/nixos.nix b/lib/nixos.nix index 4778c087..e68fefc1 100644 --- a/lib/nixos.nix +++ b/lib/nixos.nix @@ -9,7 +9,8 @@ in rec { inherit system; # Make our inputs available to the configuration.nix (for importing modules) - specialArgs = { inherit inputs; }; + # specialArgs are propagated to all modules + specialArgs = { inherit inputs hostname; }; modules = builtins.concatLists [ [ @@ -39,7 +40,6 @@ in rec { home-manager.useUserPackages = true; # User specific config file - # Is marked as error but correct home-manager.users.${username}.imports = [ ../home/${username} ]; } ] diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 1644072b..e7d2f6cd 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ inputs, lib, config, pkgs, ... }: +{ inputs, hostname, lib, config, pkgs, ... }: { imports = [ @@ -111,7 +111,9 @@ # TODO: Other ports (tcp/udp/ssh...)? # Open ports in the firewall. networking = { - # hostName = "nixinator"; # Define your hostname. # NOTE: Done in host specific config + # Gets inherited from flake in nixos mylib + hostName = hostname; # Define your hostname. + # wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary diff --git a/nixos/nixinator/default.nix b/nixos/nixinator/default.nix index 48dc1550..bf8c212c 100644 --- a/nixos/nixinator/default.nix +++ b/nixos/nixinator/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, musnix, ... }: +{ musnix, config, lib, pkgs, ... }: { imports = [ @@ -6,8 +6,6 @@ ./hardware-configuration.nix ]; - networking.hostName = "nixinator"; # Define your hostname. - musnix = { enable = true; # musnix.soundcardPciId = ; diff --git a/nixos/nixtop/default.nix b/nixos/nixtop/default.nix index 5ef56174..1ebb3c51 100644 --- a/nixos/nixtop/default.nix +++ b/nixos/nixtop/default.nix @@ -6,8 +6,6 @@ ./hardware-configuration.nix ]; - networking.hostName = "nixtop"; # Define your hostname. - services.xserver = { # Configure keymap in X11 layout = "de";