1

set hostname in shared config

This commit is contained in:
2022-08-08 19:29:35 +02:00
parent 25225658bd
commit 35141735b5
4 changed files with 7 additions and 9 deletions

View File

@ -9,7 +9,8 @@ in rec {
inherit system; inherit system;
# Make our inputs available to the configuration.nix (for importing modules) # 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 [ modules = builtins.concatLists [
[ [
@ -39,7 +40,6 @@ in rec {
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
# User specific config file # User specific config file
# Is marked as error but correct
home-manager.users.${username}.imports = [ ../home/${username} ]; home-manager.users.${username}.imports = [ ../home/${username} ];
} }
] ]

View File

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ inputs, lib, config, pkgs, ... }: { inputs, hostname, lib, config, pkgs, ... }:
{ {
imports = [ imports = [
@ -111,7 +111,9 @@
# TODO: Other ports (tcp/udp/ssh...)? # TODO: Other ports (tcp/udp/ssh...)?
# Open ports in the firewall. # Open ports in the firewall.
networking = { 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. # wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary # Configure network proxy if necessary

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, musnix, ... }: { musnix, config, lib, pkgs, ... }:
{ {
imports = [ imports = [
@ -6,8 +6,6 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
networking.hostName = "nixinator"; # Define your hostname.
musnix = { musnix = {
enable = true; enable = true;
# musnix.soundcardPciId = ; # musnix.soundcardPciId = ;

View File

@ -6,8 +6,6 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
networking.hostName = "nixtop"; # Define your hostname.
services.xserver = { services.xserver = {
# Configure keymap in X11 # Configure keymap in X11
layout = "de"; layout = "de";