Updated new config for use on servers
This commit is contained in:
parent
ab6f92e38d
commit
24725d0217
4 changed files with 53 additions and 4 deletions
|
|
@ -87,6 +87,10 @@
|
||||||
modules = [ ./hosts/display ];
|
modules = [ ./hosts/display ];
|
||||||
specialArgs = { inherit inputs outputs; };
|
specialArgs = { inherit inputs outputs; };
|
||||||
};
|
};
|
||||||
|
fred = lib.nixosSystem {
|
||||||
|
modules = [ ./hosts/fred ];
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
harper2 = lib.nixosSystem {
|
harper2 = lib.nixosSystem {
|
||||||
modules = [ ./hosts/harper2 ];
|
modules = [ ./hosts/harper2 ];
|
||||||
specialArgs = { inherit inputs outputs; };
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
../server
|
||||||
./podman.nix
|
./podman.nix
|
||||||
];
|
];
|
||||||
networking.hostName = "fred";
|
networking.hostName = "fred";
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
let
|
let
|
||||||
my-python-packages = python-packages: with python-packages; [
|
my-python-packages = python-packages: with python-packages; [
|
||||||
pip
|
pip
|
||||||
pipx
|
# pipx
|
||||||
python-dateutil
|
python-dateutil
|
||||||
setuptools
|
setuptools
|
||||||
requests
|
requests
|
||||||
|
|
@ -31,18 +31,31 @@ in
|
||||||
./upgrade-diff.nix
|
./upgrade-diff.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
networking.enableIPv6 = true;
|
networking.enableIPv6 = true;
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
time = {
|
time = {
|
||||||
timeZone = "America/Chicago";
|
timeZone = "America/Chicago";
|
||||||
hardwareClockInLocalTime = false;
|
hardwareClockInLocalTime = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
i18n.defaultLocale = "en_US.utf8";
|
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.utf8";
|
||||||
|
i18n.inputMethod = {
|
||||||
|
enabled = "fcitx5";
|
||||||
|
fcitx5.addons = with pkgs; [
|
||||||
|
fcitx5-mozc
|
||||||
|
fcitx5-gtk
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
boot = {
|
boot = {
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
kernelParams = [ "consoleblank=60" ];
|
kernelParams = [ "consoleblank=60" ];
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot = {
|
systemd-boot = {
|
||||||
|
|
@ -63,6 +76,9 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
|
polkit = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
sudo.enable = false;
|
sudo.enable = false;
|
||||||
doas = {
|
doas = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -78,6 +94,13 @@ in
|
||||||
pcscd = {
|
pcscd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
};
|
||||||
|
printing = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
udisks2 = {
|
udisks2 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
@ -168,15 +191,35 @@ in
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = false;
|
enable = true;
|
||||||
|
# always allow traffic from your Tailscale network
|
||||||
trustedInterfaces = [ "tailscale0" ];
|
trustedInterfaces = [ "tailscale0" ];
|
||||||
checkReversePath = "loose";
|
checkReversePath = "loose";
|
||||||
|
|
||||||
|
# allow the Tailscale UDP port through the firewall
|
||||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
allowedUDPPorts = [ config.services.tailscale.port ];
|
||||||
|
allowedTCPPortRanges = [ { from = 1714 ; to = 1764; } ];
|
||||||
|
allowedUDPPortRanges = [ { from = 1714 ; to = 1764; } ];
|
||||||
|
|
||||||
|
# allow you to SSH in over the public internet
|
||||||
allowedTCPPorts = [ 22 ];
|
allowedTCPPorts = [ 22 ];
|
||||||
|
interfaces = {
|
||||||
|
"tailscale0" = {
|
||||||
|
allowedTCPPorts = [ 22 8080 8443 ];
|
||||||
|
allowedTCPPortRanges = [ { from = 1714 ; to = 1764; } ];
|
||||||
|
allowedUDPPortRanges = [ { from = 1714 ; to = 1764; } ];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It's perfectly fine and recommended to leavecatenate(variables, "bootdev", bootdev)
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
programs.msmtp = {
|
programs.msmtp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
accounts = {
|
accounts = {
|
||||||
|
|
|
||||||
|
|
@ -218,6 +218,7 @@ in
|
||||||
isync
|
isync
|
||||||
libsForQt5.qtkeychain
|
libsForQt5.qtkeychain
|
||||||
lsb-release
|
lsb-release
|
||||||
|
lsof
|
||||||
pkg-config
|
pkg-config
|
||||||
playerctl
|
playerctl
|
||||||
poppler_utils
|
poppler_utils
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue