diff --git a/hosts/desktop/hjem-rum/snowy.nix b/hosts/desktop/hjem-rum/snowy.nix index f38db05..bee415a 100644 --- a/hosts/desktop/hjem-rum/snowy.nix +++ b/hosts/desktop/hjem-rum/snowy.nix @@ -31,9 +31,9 @@ mpv jetbrains.idea - jetbrains.rider + # jetbrains.rider orca-slicer - unityhub + # unityhub #language servers bash-language-server diff --git a/hosts/desktop/system/configuration.nix b/hosts/desktop/system/configuration.nix index 68cd68f..3d9a003 100644 --- a/hosts/desktop/system/configuration.nix +++ b/hosts/desktop/system/configuration.nix @@ -87,6 +87,13 @@ "vm.max_map_count" = 1048576; "net.ipv4.conf.all.forwarding" = true; "net.ipv6.conf.all.forwarding" = true; + + # https://wiki.archlinux.org/title/Sysctl#Enable_TCP_Fast_Open + "net.ipv4.tcp_fastopen" = 3; + + # better + "net.ipv4.tcp_congestion_control" = "tcp_bbr"; + "net.core.default_qdisc" = "fq"; }; extraModprobeConfig = '' @@ -457,10 +464,10 @@ fwupd android-tools netcap - # nemo - nemo-with-extensions - nemo-fileroller - nemo-preview + + # nemo-with-extensions + # nemo-fileroller + # nemo-preview zellij helix @@ -476,7 +483,7 @@ rocmPackages.rocm-smi amdgpu_top mangohud - # mangojuice + mangojuice rofi mako @@ -503,9 +510,8 @@ repos.unstable.xwayland-satellite xdg-desktop-portal-gnome - # hyprpaper swaybg - swww + # swww virt-manager prismlauncher @@ -518,10 +524,10 @@ pear-desktop r2modman hoppscotch - ani-cli syncplay mumble + monero-gui p2pool # keyguard @@ -529,10 +535,10 @@ quickshell # distrobox - (discord.override { - withOpenASAR = true; - withVencord = true; - }) + # (discord.override { + # withOpenASAR = true; + # withVencord = true; + # }) ]; gnome.excludePackages = with pkgs; [ diff --git a/hosts/desktop/system/services.nix b/hosts/desktop/system/services.nix index e504f12..dae53b9 100644 --- a/hosts/desktop/system/services.nix +++ b/hosts/desktop/system/services.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, repos, ... }: { services = { timesyncd.enable = true; @@ -45,7 +45,10 @@ }; ntp.enable = true; - gvfs.enable = true; + gvfs = { + enable = true; + package = pkgs.gnome.gvfs; + }; gnome.gnome-keyring.enable = true; flatpak.enable = true; blueman.enable = true; @@ -64,7 +67,11 @@ }; netbird = { - ui.enable = true; + package = repos.stable.netbird; + ui = { + enable = true; + package = repos.stable.netbird-ui; + }; clients.fennec = { port = 51820; diff --git a/hosts/homelab/services/garage.nix b/hosts/homelab/services/garage.nix index e39dfc7..c5d7804 100644 --- a/hosts/homelab/services/garage.nix +++ b/hosts/homelab/services/garage.nix @@ -5,6 +5,7 @@ }: { # todo! garage-webui :3 + services.garage = { enable = true; package = pkgs.garage_2; @@ -52,6 +53,18 @@ }; }; + systemd.services.garage_cleanup = { + enable = true; + description = "Cleans up any incomplete uploads in garage to save storage :P"; + startAt = "daily UTC"; + enableStrictShellChecks = true; + script = '' + ${pkgs.garage_2}/bin/garage bucket cleanup-incomplete-uploads phone-backup + ${pkgs.garage_2}/bin/garage bucket cleanup-incomplete-uploads ente-bucket + ${pkgs.garage_2}/bin/garage bucket cleanup-incomplete-uploads music + ''; + }; + # systemd.services.garage.serviceConfig = { # # Dynamicuser = false; # }; diff --git a/hosts/homelab/services/samba.nix b/hosts/homelab/services/samba.nix index 831fd04..723a008 100644 --- a/hosts/homelab/services/samba.nix +++ b/hosts/homelab/services/samba.nix @@ -16,7 +16,11 @@ openFirewall = true; settings = { global = { - security = "user"; + "security" = "user"; + "workgroup" = "WORKGROUP"; + "server string" = "My snowlab Samba"; + "netbios name" = "SNOWLAB"; # what shows up in discovery + "hosts allow" = "ALL"; }; # public = { }; private = { @@ -40,17 +44,15 @@ }; system.activationScripts = { - # The "init_smbpasswd" script name is arbitrary, but a useful label for tracking - # failed scripts in the build output. An absolute path to smbpasswd is necessary - # as it is not in $PATH in the activation script's environment. The password - # is repeated twice with newline characters as smbpasswd requires a password - # confirmation even in non-interactive mode where input is piped in through stdin. - init_samba_user_smbpasswd.text = '' - /run/current-system/sw/bin/printf "$(/run/current-system/sw/bin/cat ${ - config.sops.secrets."samba/samba_user".path - })\n$(/run/current-system/sw/bin/cat ${ - config.sops.secrets."samba/samba_user".path - })\n" | /run/current-system/sw/bin/smbpasswd -sa samba_user - ''; + init_samba_user_smbpasswd = { + deps = [ "setupSecrets" ]; # depend it on sops + text = '' + /run/current-system/sw/bin/printf "$(/run/current-system/sw/bin/cat ${ + config.sops.secrets."samba/samba_user".path + })\n$(/run/current-system/sw/bin/cat ${ + config.sops.secrets."samba/samba_user".path + })\n" | /run/current-system/sw/bin/smbpasswd -sa samba_user + ''; + }; }; } diff --git a/hosts/homelab/system/configuration.nix b/hosts/homelab/system/configuration.nix index e7d9dbc..5d4c5ea 100644 --- a/hosts/homelab/system/configuration.nix +++ b/hosts/homelab/system/configuration.nix @@ -75,6 +75,10 @@ kernel.sysctl = { # https://wiki.archlinux.org/title/Sysctl#Enable_TCP_Fast_Open "net.ipv4.tcp_fastopen" = 3; + + # better for starlink + "net.ipv4.tcp_congestion_control" = "tcp_bbr"; + "net.core.default_qdisc" = "fq"; }; loader = { @@ -197,6 +201,8 @@ }; }; + # systemd.enableStrictShellChecks = true; + users = { mutableUsers = false; groups.user = { }; diff --git a/hosts/server/services/caddy.nix b/hosts/server/services/caddy.nix index 92b93b8..35573ab 100644 --- a/hosts/server/services/caddy.nix +++ b/hosts/server/services/caddy.nix @@ -1,6 +1,5 @@ { config, - lib, ... }: # let @@ -9,7 +8,7 @@ { services.caddy = { enable = true; - logFormat = lib.mkForce "level DEBUG"; + # logFormat = lib.mkForce "level DEBUG"; globalConfig = '' ''; @@ -159,11 +158,11 @@ } *.s3.mrsnowy.dev, s3.mrsnowy.dev { - tls { - ciphers TLS_AES_128_GCM_SHA256 TLS_AES_256_GCM_SHA384 - } + # log { + # output file /var/log/caddy/s3.log + # level DEBUG + # } - @h2 protocol h1 reverse_proxy :${toString config.ports.garage.s3_api} { flush_interval -1 # low-latency mode # request_body { @@ -171,31 +170,26 @@ # } # - transport http { - keepalive_idle_conns_per_host 0 - read_buffer 1MiB - write_buffer 1MiB - compression off - # versions 1.1 - } + # transport http { + # # compression off + # versions 1.1 + # } } } http://s4.mrsnowy.dev { + # log { + # output file /var/log/caddy/s4.log + # level DEBUG + # } reverse_proxy :${toString config.ports.garage.s3_api} { flush_interval -1 # low-latency mode - # request_body { - # max_size 5GB # raise for large object uploads - # } - # - transport http { - keepalive_idle_conns_per_host 0 - read_buffer 1MiB - write_buffer 1MiB - compression off - } + # transport http { + # # compression off + # versions 1.1 + # } } } ''; diff --git a/hosts/server/services/garage.nix b/hosts/server/services/garage.nix index 1b0c73d..83951dd 100644 --- a/hosts/server/services/garage.nix +++ b/hosts/server/services/garage.nix @@ -10,7 +10,7 @@ package = pkgs.garage_2; settings = { db_engine = "sqlite"; - compression_level = 0; + compression_level = 18; replication_factor = 2; consistency_mode = "degraded"; metadata_fsync = false; diff --git a/hosts/server/system/configuration.nix b/hosts/server/system/configuration.nix index 09fb487..4c8bd32 100644 --- a/hosts/server/system/configuration.nix +++ b/hosts/server/system/configuration.nix @@ -86,6 +86,10 @@ # https://wiki.archlinux.org/title/Sysctl#Enable_TCP_Fast_Open "net.ipv4.tcp_fastopen" = 3; + # better + "net.ipv4.tcp_congestion_control" = "tcp_bbr"; + "net.core.default_qdisc" = "fq"; + # for containers :3 "kernel.unprivileged_userns_clone" = 1; @@ -181,6 +185,7 @@ programs = { nano.enable = false; fish.enable = true; + bat.enable = true; # nh = { # enable = true; # flake = "/etc/nixos"; diff --git a/modules/npins/sources.json b/modules/npins/sources.json index 432f35f..5fb987d 100644 --- a/modules/npins/sources.json +++ b/modules/npins/sources.json @@ -23,9 +23,9 @@ }, "branch": "master", "submodules": false, - "revision": "9d3ef138f70b3540397320d25ead6aa96101371d", - "url": "https://github.com/amaanq/helium-flake/archive/9d3ef138f70b3540397320d25ead6aa96101371d.tar.gz", - "hash": "sha256-OxeMEMxRJ6dF3UGXVJoNRwxU/F1nOVbdcyX9n8S3Mxk=" + "revision": "e90541d0904593bec70fadd6383659ec42cd610b", + "url": "https://github.com/amaanq/helium-flake/archive/e90541d0904593bec70fadd6383659ec42cd610b.tar.gz", + "hash": "sha256-6FDLz9ydI32uoOJa2qsPpaxQ3T0DB/7Lw/Meos6NjRo=" }, "hjem": { "type": "Git", @@ -36,9 +36,9 @@ }, "branch": "main", "submodules": false, - "revision": "4d0d0e4dc99245ffaa0d51acf69e288fb59fb0f1", - "url": "https://github.com/feel-co/hjem/archive/4d0d0e4dc99245ffaa0d51acf69e288fb59fb0f1.tar.gz", - "hash": "sha256-bPTW00Tkp8c7HJbhNC7wLO3fcngFXBpuX7LZByE/F8c=" + "revision": "d51b2e524794a61762453be5bf7b4fe259150191", + "url": "https://github.com/feel-co/hjem/archive/d51b2e524794a61762453be5bf7b4fe259150191.tar.gz", + "hash": "sha256-hOweDMc/uNFeliSVuNXZ4qa6WC8AbmRV8pNSAD/h4S0=" }, "hjem-rum": { "type": "Git", @@ -62,9 +62,9 @@ }, "branch": "release-25.11", "submodules": false, - "revision": "5c0f63f8d55040a7eed69df7e3fcdd15dfb5a04c", - "url": "https://github.com/nix-community/home-manager/archive/5c0f63f8d55040a7eed69df7e3fcdd15dfb5a04c.tar.gz", - "hash": "sha256-rK0507bDuWBrZo+0zts9bCs/+RRUEHuvFE5DHWPxX/Q=" + "revision": "cf9686ba26f5ef788226843bc31fda4cf72e373b", + "url": "https://github.com/nix-community/home-manager/archive/cf9686ba26f5ef788226843bc31fda4cf72e373b.tar.gz", + "hash": "sha256-dnHvv5EMUgTzGZmA+3diYjQU2O6BEpGLEOgJ1Qe9LaY=" }, "nix-gaming-edge": { "type": "Git", @@ -75,9 +75,9 @@ }, "branch": "nightly", "submodules": false, - "revision": "a6644fdb35fb66e3f15ed1ce5dd5e56ea64ddf06", - "url": "https://github.com/powerofthe69/nix-gaming-edge/archive/a6644fdb35fb66e3f15ed1ce5dd5e56ea64ddf06.tar.gz", - "hash": "sha256-aKwGEGa3UffChR91GNkk/TnVNXWQth8mmZATAgrG0Yc=" + "revision": "3e479e75a18f1458b112ee74ae6c0c5b4b75bcf9", + "url": "https://github.com/powerofthe69/nix-gaming-edge/archive/3e479e75a18f1458b112ee74ae6c0c5b4b75bcf9.tar.gz", + "hash": "sha256-bfjINgmeHk+jWwli/ODZsQFZcR1yZjVXzalR6vvjz9o=" }, "nixpkgs-stable": { "type": "Git", @@ -88,9 +88,9 @@ }, "branch": "nixos-25.11", "submodules": false, - "revision": "3e20095fe3c6cbb1ddcef89b26969a69a1570776", - "url": "https://github.com/NixOS/nixpkgs/archive/3e20095fe3c6cbb1ddcef89b26969a69a1570776.tar.gz", - "hash": "sha256-SEzUWw2Rf5Ki3bcM26nSKgbeoqi2uYy8IHVBqOKjX3w=" + "revision": "4590696c8693fea477850fe379a01544293ca4e2", + "url": "https://github.com/NixOS/nixpkgs/archive/4590696c8693fea477850fe379a01544293ca4e2.tar.gz", + "hash": "sha256-4XfMXU0DjN83o6HWZoKG9PegCvKvIhNUnRUI19vzTcQ=" }, "nixpkgs-unstable": { "type": "Git", @@ -101,9 +101,9 @@ }, "branch": "nixos-unstable", "submodules": false, - "revision": "c06b4ae3d6599a672a6210b7021d699c351eebda", - "url": "https://github.com/NixOS/nixpkgs/archive/c06b4ae3d6599a672a6210b7021d699c351eebda.tar.gz", - "hash": "sha256-wvfdLLWJ2I9oEpDd9PfMA8osfIZicoQ5MT1jIwNs9Tk=" + "revision": "6c9a78c09ff4d6c21d0319114873508a6ec01655", + "url": "https://github.com/NixOS/nixpkgs/archive/6c9a78c09ff4d6c21d0319114873508a6ec01655.tar.gz", + "hash": "sha256-US5Tda2sKmjrg2lNHQL3jRQ6p96cgfWh3J1QBliQ8Ws=" }, "sops-nix": { "type": "Git", @@ -114,9 +114,9 @@ }, "branch": "master", "submodules": false, - "revision": "d1ff3b1034d5bab5d7d8086a7803c5a5968cd784", - "url": "https://github.com/Mic92/sops-nix/archive/d1ff3b1034d5bab5d7d8086a7803c5a5968cd784.tar.gz", - "hash": "sha256-M3zEnq9OElB7zqc+mjgPlByPm1O5t2fbUrH3t/Hm5Ag=" + "revision": "614e256310e0a4f8a9ccae3fa80c11844fba7042", + "url": "https://github.com/Mic92/sops-nix/archive/614e256310e0a4f8a9ccae3fa80c11844fba7042.tar.gz", + "hash": "sha256-fhG4JAcLgjKwt+XHbjs8brpWnyKUfU4LikLm3s0Q/ic=" }, "wire": { "type": "Git", @@ -127,9 +127,9 @@ }, "branch": "stable", "submodules": false, - "revision": "53dad75b2503b8d9bb09ea3fbd9d87a0ab14bcf2", - "url": "https://github.com/mrshmllow/wire/archive/53dad75b2503b8d9bb09ea3fbd9d87a0ab14bcf2.tar.gz", - "hash": "sha256-eIi3o3TiYFlgk831lkWilNw9vTrO26PNaNwbG2UAF60=" + "revision": "5439d792ec7f876992300f10da37ff068dbafb29", + "url": "https://github.com/mrshmllow/wire/archive/5439d792ec7f876992300f10da37ff068dbafb29.tar.gz", + "hash": "sha256-vTO8yQsn0lCwxaXx/i4Njuv8NcENP8k5w1PKdVhT4lI=" }, "zen-browser": { "type": "Git", @@ -140,9 +140,9 @@ }, "branch": "main", "submodules": false, - "revision": "9346698c4562819f61b4e5097151ec0b17729fab", - "url": "https://github.com/0xc000022070/zen-browser-flake/archive/9346698c4562819f61b4e5097151ec0b17729fab.tar.gz", - "hash": "sha256-L1yMYmFffHfZNP+hKJGRBmrFKkn/VDhu7jEbVftBQuM=" + "revision": "a0f3d47dbd8f8618a1920d5a5ca09b7993415895", + "url": "https://github.com/0xc000022070/zen-browser-flake/archive/a0f3d47dbd8f8618a1920d5a5ca09b7993415895.tar.gz", + "hash": "sha256-gibUM0pSnLxEeuFrYA8T1oEaixk+fjQpqXbYaxcEX/4=" } }, "version": 7 diff --git a/modules/sops/homelab/default.yaml b/modules/sops/homelab/default.yaml index dacb7d2..7fe408e 100644 --- a/modules/sops/homelab/default.yaml +++ b/modules/sops/homelab/default.yaml @@ -2,7 +2,7 @@ wireguard: key: ENC[AES256_GCM,data:TZG68pWFZW5T+UxoCXhmLgp2SYhvN/kKeLLgjRf48M79pzZVWnwQT2769Cc=,iv:WmfvM9H0zwYUTnM4DszQRA3W+si0eULNpW4ZJqAjtyk=,tag:UBultWSGxv1spMeBtknmUg==,type:str] samba: - samba_user: ENC[AES256_GCM,data:iaWzLYgvJPMKjrqBPt3YjiWhS073oQ/kpg88pUuMUj0kfuXSZ9sjTmwr2HUam0Gpod8Zujj76HpxxH9N5Cqiqg==,iv:uLeZ4v3PhCZ7hZ7NTDpsGx76WBlIQinfvU4iN2YMjVQ=,tag:DYdFVPTunMzDg60sSB3Lpg==,type:str] + samba_user: ENC[AES256_GCM,data:sY6FSlw+wb+mYWjZGMjfqRDkVeqCf4B+HITiS2L90/I=,iv:zW7ya+xDMx20HqnjV3Zv5Iptu33nqFba3Q3DbwnnTmA=,tag:u0IE9x3sm6FSdjATzdLckQ==,type:str] sops: age: - recipient: age1yjv3ngyz26qqggvef3ekwdw60dfvcmfd0l6n88vs3axux6vusdhsyzlts0 @@ -14,8 +14,8 @@ sops: UXhYeElvSTNaV21CY2s2c29tOFplakkKdSQ+SSMQje7l3AmNndI/PAmMVzmJe7sm snnqYTs6E1sKfBklznsYbcZrXeuDzgPt6XhtC1XIgHP0bxTFVYSPRA== -----END AGE ENCRYPTED FILE----- - lastmodified: "2026-03-19T13:26:55Z" - mac: ENC[AES256_GCM,data:bI/dov0roY6UVz/DwJa7GpYD2oLy7KKx6QiAiePKIy+gsp2qgVFVar2R+98mU6JkRTO4qVCF3mjpIqXmb0ezJOJZKKJTzMrIA3TpTJJcfhiw2WLA7LpxLKi7o80NdvbXBQxFKsZCaEBJoJxwxqMbch/0lltZAgClu7MW/FW7WG4=,iv:taiX25EYw0spPzBg6thtJJWEKy0j9gt5w8orC/uhd+4=,tag:ECN3I7vgFUwXOrFsSffL/g==,type:str] + lastmodified: "2026-03-21T15:49:40Z" + mac: ENC[AES256_GCM,data:Z3EGvXmNjZy6Hor2uE4tQf9KaA14wBGYVovndDRPyGTjE2vv2b0JJW+8YBujw1f1QQBnKubWeMbAwLpB277ZH86+5KntIgZbqq44MZAgXD84WOiFfHg0CP3Z7qLT3rMLrt/1m6yAdmbTbluAxilGB8IXnI3t3nLz2KB7Ji4Cga4=,iv:DCU5xizhb6eDG80szLYCuswMDHstuecjjgCM0jB8ZEs=,tag:14me8kgEg8ETjHBMRLzOvw==,type:str] pgp: - created_at: "2026-02-06T18:21:16Z" enc: |-