mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-26 00:41:53 -05:00
consolidated systemConfig and removed soulseek port fowarding
This commit is contained in:
parent
f162dfe47c
commit
965f03be6a
|
@ -4,26 +4,24 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [./network.nix ./plymouth ./power-profiles-daemon ./zramSwap];
|
imports = [./plymouth ./power-profiles-daemon ./zramSwap];
|
||||||
|
|
||||||
systemConfig.power-profiles-daemon.enable = lib.mkDefault true;
|
systemConfig.power-profiles-daemon.enable = lib.mkDefault true;
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/New_York";
|
time.timeZone = "America/New_York";
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n = {
|
i18n = {
|
||||||
defaultLocale = "en_US.UTF-8";
|
defaultLocale = "en_US.UTF-8";
|
||||||
extraLocaleSettings = {
|
extraLocaleSettings = {
|
||||||
LC_ADDRESS = "en_US.UTF-8";
|
LC_ADDRESS = config.i18n.defaultLocale;
|
||||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
LC_IDENTIFICATION = config.i18n.defaultLocale;
|
||||||
LC_MEASUREMENT = "en_US.UTF-8";
|
LC_MEASUREMENT = config.i18n.defaultLocale;
|
||||||
LC_MONETARY = "en_US.UTF-8";
|
LC_MONETARY = config.i18n.defaultLocale;
|
||||||
LC_NAME = "en_US.UTF-8";
|
LC_NAME = config.i18n.defaultLocale;
|
||||||
LC_NUMERIC = "en_US.UTF-8";
|
LC_NUMERIC = config.i18n.defaultLocale;
|
||||||
LC_PAPER = "en_US.UTF-8";
|
LC_PAPER = config.i18n.defaultLocale;
|
||||||
LC_TELEPHONE = "en_US.UTF-8";
|
LC_TELEPHONE = config.i18n.defaultLocale;
|
||||||
LC_TIME = "en_US.UTF-8";
|
LC_TIME = config.i18n.defaultLocale;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -33,25 +31,26 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
# Enable Bluetooth connections.
|
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
# Add support for logitech unifying receivers.
|
# Add support for logitech unifying receivers.
|
||||||
logitech.wireless = {
|
logitech.wireless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableGraphical = true;
|
enableGraphical = true;
|
||||||
};
|
};
|
||||||
# Add support for configuring QMK keyboards with Via.
|
|
||||||
keyboard.qmk.enable = true;
|
keyboard.qmk.enable = true;
|
||||||
|
|
||||||
pulseaudio = {
|
pulseaudio = {
|
||||||
enable = lib.mkForce false;
|
enable = lib.mkForce false;
|
||||||
# Enables extra codecs like aptx.
|
|
||||||
package = pkgs.pulseaudioFull;
|
package = pkgs.pulseaudioFull;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
networkmanager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
logind.extraConfig = ''
|
logind.extraConfig = ''
|
||||||
# Don't shutdown when power button is short-pressed
|
# Don't shutdown when power button is short-pressed
|
||||||
|
@ -64,6 +63,24 @@
|
||||||
alsa.support32Bit = true;
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
openFirewall = true;
|
||||||
|
publish = {
|
||||||
|
enable = true;
|
||||||
|
addresses = true;
|
||||||
|
userServices = true;
|
||||||
|
workstation = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
openssh = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
printing.enable = true;
|
||||||
|
syncthing.openDefaultPorts = true;
|
||||||
|
tailscale.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
|
@ -87,7 +104,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
# Optimize the Nix store on a schedule.
|
|
||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
gc = {
|
gc = {
|
||||||
# Delete generations older than 7 days.
|
# Delete generations older than 7 days.
|
||||||
|
@ -102,9 +118,7 @@
|
||||||
max-free = ${toString (1024 * 1024 * 1024)}
|
max-free = ${toString (1024 * 1024 * 1024)}
|
||||||
'';
|
'';
|
||||||
settings = {
|
settings = {
|
||||||
# Automatically optimize the Nix store during every build.
|
|
||||||
auto-optimise-store = false;
|
auto-optimise-store = false;
|
||||||
# Enable experimental `nix` command and flakes.
|
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = ["nix-command" "flakes"];
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://nixcache.raffauflabs.com"
|
"https://nixcache.raffauflabs.com"
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
networking = {
|
|
||||||
networkmanager.enable = true;
|
|
||||||
|
|
||||||
firewall.allowedTCPPortRanges = [
|
|
||||||
# Soulseek
|
|
||||||
{
|
|
||||||
from = 2234;
|
|
||||||
to = 2239;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
firewall.allowedUDPPortRanges = [
|
|
||||||
# Soulseek
|
|
||||||
{
|
|
||||||
from = 2234;
|
|
||||||
to = 2239;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
|
||||||
# Enable avahi for auto network discovery.
|
|
||||||
avahi = {
|
|
||||||
enable = true;
|
|
||||||
nssmdns4 = true;
|
|
||||||
openFirewall = true;
|
|
||||||
publish = {
|
|
||||||
enable = true;
|
|
||||||
addresses = true;
|
|
||||||
userServices = true;
|
|
||||||
workstation = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# Enable remote connections with SSH.
|
|
||||||
openssh = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
# Enable printing.
|
|
||||||
printing.enable = true;
|
|
||||||
# Syncthing runs as a user service, but needs its ports open here.
|
|
||||||
syncthing.openDefaultPorts = true;
|
|
||||||
# Enable tailscale for easy Wireguard VPNs on a tailnet.
|
|
||||||
tailscale.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue