diff options
| author | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2025-09-25 18:39:49 +0200 |
|---|---|---|
| committer | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2025-09-25 18:39:49 +0200 |
| commit | 0a389da154f6e4901b60c86f39e883cb9cf05a11 (patch) | |
| tree | 65642476697942c629ebf6456e744bb2389c307f | |
| parent | ff442b6e9e6011874b52d3a86422a6e72a0a62f9 (diff) | |
Whatever
| -rw-r--r-- | common.nix | 8 | ||||
| -rw-r--r-- | home-modules/apps/default.nix | 14 | ||||
| -rw-r--r-- | home-modules/apps/nvim/default.nix | 1 | ||||
| -rw-r--r-- | home-modules/services/default.nix | 3 | ||||
| -rw-r--r-- | hosts/apocalypse/default.nix | 9 | ||||
| -rw-r--r-- | hosts/apocalypse/firewall.nix | 4 | ||||
| -rw-r--r-- | hosts/apocalypse/hardware-configuration.nix | 4 | ||||
| -rw-r--r-- | modules/vpn.nix | 9 |
8 files changed, 48 insertions, 4 deletions
@@ -16,6 +16,12 @@ enableUserSlices = true; enableSystemSlice = true; enableRootSlice = true; + extraConfig = { + SwapUsedLimit="50%"; + DefaultMemoryPressureLimit="50%"; + DefaultMemoryPressureDurationSec=20; + + }; }; nix.gc = { @@ -53,6 +59,8 @@ gnumake clang rustup + + # D ]; # This option defines the first version of NixOS you have installed on this particular machine, diff --git a/home-modules/apps/default.nix b/home-modules/apps/default.nix index 20a3f33..2abc4d1 100644 --- a/home-modules/apps/default.nix +++ b/home-modules/apps/default.nix @@ -102,8 +102,6 @@ in }) (lib.mkIf cfg.connectivity.enable { home.packages = with pkgs; [ - libsForQt5.kdeconnect-kde - syncthingtray eduvpn-client ]; services.syncthing = { @@ -117,6 +115,18 @@ in ]; services.playerctld.enable = true; + services.spotifyd = { + enable = true; + settings = { + global = { + device_name = "Apocalypse Nix"; + }; + discovery = { + zeroconf_port = 5352; + }; + # FIXME: Add a hook for notifications + }; + }; }) (lib.mkIf cfg.games.enable { home.packages = with pkgs; [ diff --git a/home-modules/apps/nvim/default.nix b/home-modules/apps/nvim/default.nix index 64c9619..d1641f3 100644 --- a/home-modules/apps/nvim/default.nix +++ b/home-modules/apps/nvim/default.nix @@ -55,6 +55,7 @@ in { texlive.combined.scheme-medium texlab mermaid-cli + deno ] ++ [ ts_ls vue_ls]; }; diff --git a/home-modules/services/default.nix b/home-modules/services/default.nix index 0483d63..6694bb0 100644 --- a/home-modules/services/default.nix +++ b/home-modules/services/default.nix @@ -1,3 +1,6 @@ {lib, ...}: { imports = [./direnv.nix]; + + # Gnome keyring, very smort + services.gnome-keyring.enable = true; } diff --git a/hosts/apocalypse/default.nix b/hosts/apocalypse/default.nix index 8993dc2..c20c609 100644 --- a/hosts/apocalypse/default.nix +++ b/hosts/apocalypse/default.nix @@ -1,4 +1,4 @@ - {lib, ...}: + {lib, pkgs, ...}: { imports = [ ./hardware-configuration.nix @@ -94,6 +94,13 @@ PrintMotd = true; }; }; + + # Winbox setup. + programs.winbox = { + enable = true; + openFirewall = true; + package = pkgs.winbox; + }; } diff --git a/hosts/apocalypse/firewall.nix b/hosts/apocalypse/firewall.nix index 5c73966..93a9d54 100644 --- a/hosts/apocalypse/firewall.nix +++ b/hosts/apocalypse/firewall.nix @@ -2,11 +2,13 @@ let baseTCP = [ 22000 # Syncthng + 5352 # Zeroconf for spotifyd ]; baseUDP = [ 22000 # Syncthing 22027 # Syncthing 16555 # Wireguard + 5353 # Mdns (Spotify) ]; baseTCPRanges = [ { from = 1714; to = 1764; } # KDE-CONNECT @@ -32,7 +34,7 @@ let in { networking.firewall = { - enable = false; + enable = true; allowedTCPPorts = baseTCP; allowedUDPPorts = baseUDP; allowedUDPPortRanges = baseUDPRanges; diff --git a/hosts/apocalypse/hardware-configuration.nix b/hosts/apocalypse/hardware-configuration.nix index d8ae434..a3bd75f 100644 --- a/hosts/apocalypse/hardware-configuration.nix +++ b/hosts/apocalypse/hardware-configuration.nix @@ -19,6 +19,10 @@ menuentry 'UEFI Firmware' $menuentry_id_option 'uefi-firmware' { fwsetup } ''; + + boot.extraModprobeConfig = '' + options thinkpad_acpi fan_control=1 + ''; boot.initrd.luks.devices = { "cryptroot".device = "/dev/disk/by-uuid/d2c3c197-3d75-4da2-a098-207030a91b62"; diff --git a/modules/vpn.nix b/modules/vpn.nix index 5b5cf09..1aaaa6e 100644 --- a/modules/vpn.nix +++ b/modules/vpn.nix @@ -6,15 +6,24 @@ let in { options.addons.vpn = { + eduvpn.enable = lib.mkEnableOption "Enable eduvpn"; mullvad.enable = lib.mkEnableOption "Enable mullvad vpn"; }; config = lib.mkMerge [ ({ services.mullvad-vpn.enable = opt-mullvad.enable; }) + (lib.mkIf cfg.eduvpn.enable { + networking.networkmanager.plugins = [ pkgs.networkmanager-openvpn ]; + }) (lib.mkIf desktop.enable (lib.mkMerge [ (lib.mkIf opt-mullvad.enable { services.mullvad-vpn.package = pkgs.mullvad-vpn; }) + (lib.mkIf cfg.eduvpn.enable { + environment.systemPackages = with pkgs; [ + eduvpn-client + ]; + }) ])) ]; } |
