🚚 [shared] Added shared config that shared desktop config inherits from

This commit is contained in:
2025-05-20 21:52:00 +02:00
parent adb02fbcc2
commit 9a8cc63674
92 changed files with 41 additions and 25 deletions

View File

@ -0,0 +1,3 @@
{
imports = [ ./ssh.nix ];
}

View File

@ -0,0 +1,27 @@
# ~/.ssh/config
{
systemConfig,
systems,
common,
...
}:
{
programs.ssh = {
enable = true;
matchBlocks =
let
block = hostname: {
port = 22;
user = systemConfig.username;
hostname = "${hostname}.dns.${common.domain}";
};
in
{
desktop = block "desktop";
homelab = block "admin"; # TODO rename to homelab
pi4 = block "pi4";
thinkpad = block "thinkpad";
};
};
}

View File

@ -0,0 +1,3 @@
{
imports = [ ./networking.nix ];
}

View File

@ -0,0 +1,26 @@
{ pkgs, systemConfig, ... }:
{
environment.systemPackages = with pkgs; [
wget
];
networking = {
networkmanager.enable = true;
hostName = systemConfig.hostName;
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
};
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
programs.ssh.enableAskPassword = false;
services.tailscale.enable = true;
}