interfaces and package config externalized, also tmux added and version variable

This commit is contained in:
2025-07-16 20:33:59 +02:00
parent 80d8003e4d
commit 47f7bc25b7
6 changed files with 49 additions and 32 deletions

View File

@@ -17,6 +17,7 @@
./users.nix
./program-homemanager.nix
./ssh.nix
./program-tmux.nix
# Hardware
./nfs-mount.nix
@@ -46,18 +47,19 @@
networking.hostName = config.vars.hostname; # Define your hostname.
networking.hostId = config.vars.hostid; # Define your hostID - Needs to be unique!.
networking = {
interfaces.enp1s0 = {
interfaces.${lib.head config.vars.interfaces} = {
ipv4.addresses = [{
address = config.vars.local_ip;
prefixLength = 24;
}];
};
defaultGateway = {
address = "192.168.178.1";
interface = "enp1s0";
};
nameservers = [ "192.168.178.10" "9.9.9.9" ];
};
networking.defaultGateway = {
address = "192.168.178.1";
interface = lib.head config.vars.interfaces;
};
networking.nameservers = [ "192.168.178.10" "9.9.9.9" ];
# Set your time zone.
time.timeZone = "Europe/Berlin";
@@ -88,12 +90,10 @@
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
htop
ncdu
git
tmux
zsh
zoxide
fzf
@@ -103,11 +103,6 @@
seaweedfs
];
programs.tmux = {
enable = true;
clock24 = true;
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];