diff --git a/desktop/configuration.nix b/desktop/configuration.nix index 3b93b0d..aa5f649 100644 --- a/desktop/configuration.nix +++ b/desktop/configuration.nix @@ -48,13 +48,6 @@ passwordlessSyncUsers = [ "bogale" ]; settings.cursor.size = 24; }; - greetd = { - enable = true; - settings.default_session = { - command = "${pkgs.noctalia-greeter}/bin/noctalia-greeter-session"; - user = "greeter"; - }; - }; logind.settings.Login.HandleLidSwitch = "suspend-then-hibernate"; pipewire = { enable = true; diff --git a/desktop/mods/pxeboot.nix b/desktop/mods/pxeboot.nix index ad99282..317f751 100644 --- a/desktop/mods/pxeboot.nix +++ b/desktop/mods/pxeboot.nix @@ -4,10 +4,12 @@ allowedTCPPorts = [ 2049 ]; allowedUDPPorts = [ 547 + 67 69 ]; }; nat = { + enable = true; enableIPv6 = true; internalInterfaces = [ "br0" ]; }; diff --git a/flake.lock b/flake.lock index 15b2eed..e78e6bf 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1793193205, - "narHash": "sha256-X6xa6sGA7RnJQuZGbFMC+K+KToWAlBDCCjJXfTwEPsw=", + "lastModified": 1793979366, + "narHash": "sha256-7OoWDsYO9teiPxl0QdlS5lYE20Pue8/5mpscSL32FUA=", "owner": "nix-community", "repo": "home-manager", - "rev": "095fef2f265c3c0da4fe315efba8f8a04495ab34", + "rev": "2c0c1f01521469cf0271180c453c79782d53c2f6", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1793110635, - "narHash": "sha256-dhoW6VgFWlaodSY5jrBn+CF2FLmaUvDVgM7+C7T2+NM=", + "lastModified": 1793876309, + "narHash": "sha256-Wojg9lIH/hDH91iDVH2/EPw8oDSpxjxhXONbU1yf4Zg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "31ecbaca1bdefa45dffc409f0250bd8039ea0010", + "rev": "f9a75f41be3a74eab55d3a7679d34ad6cc0da977", "type": "github" }, "original": { @@ -50,11 +50,11 @@ ] }, "locked": { - "lastModified": 1793052255, - "narHash": "sha256-Y/JIHTnMlOabDfyaSBubWGLDIVGihLEUuoMhFvQKaDo=", + "lastModified": 1793995029, + "narHash": "sha256-ZlE4BtMjWhfC6rFXLO9Qimn36Ene1INqCgKDDvazjhc=", "owner": "Mic92", "repo": "sops-nix", - "rev": "60182817ee048ac94b4c68ea76d5ef2e8aac730d", + "rev": "89a234ce2daf6e568a7d4b4fe250afdd23d84e20", "type": "github" }, "original": { diff --git a/home/bogale.nix b/home/bogale.nix index 61f6450..e0b6be3 100644 --- a/home/bogale.nix +++ b/home/bogale.nix @@ -10,7 +10,6 @@ alacritty bibata-cursors bluez - brave-origin ffmpeg-headless heroic joplin-desktop @@ -22,6 +21,7 @@ qbittorrent telegram-desktop thunderbird + ungoogled-chromium wl-mirror ]; pointerCursor = { diff --git a/mods/host.nix b/mods/host.nix index a5ed3fc..65a36d4 100644 --- a/mods/host.nix +++ b/mods/host.nix @@ -16,14 +16,6 @@ ./vps-init.nix ]; networking = { - firewall = { - allowedTCPPorts = [ 53 ]; - allowedUDPPorts = [ - 53 - 67 - ]; - }; - nat.enable = true; networkmanager.ensureProfiles = { environmentFiles = [ config.sops.secrets.wifi-env.path ]; profiles = { diff --git a/install.sh b/mods/install.sh similarity index 100% rename from install.sh rename to mods/install.sh diff --git a/server/configuration.nix b/server/configuration.nix index 6aa2723..455b061 100644 --- a/server/configuration.nix +++ b/server/configuration.nix @@ -1,8 +1,5 @@ -{ config, pkgs, ... }: { - boot.kernelParams = [ - "cfg80211.ieee80211_regdom=RU" - "consoleblank=60" - ]; +{ config, ... }: { + boot.kernelParams = [ "consoleblank=60" ]; imports = [ ../mods/host.nix ./hardware.nix @@ -22,27 +19,6 @@ allowedUDPPorts = [ 443 ]; }; hostName = "nixos-server"; - nat.internalInterfaces = [ "wlp2s0" ]; - networkmanager.ensureProfiles.profiles = { - dhcp-ethernet.ethernet.cloned-mac-address = "0C:0E:76:A6:E6:B6"; - home-wifi = { - ipv4 = { - addresses = "10.1.0.1/16"; - method = "shared"; - }; - wifi = { - band = "a"; - channel = 157; - channel-width = 80; - mode = "ap"; - }; - wifi-security = { - group = "ccmp"; - pairwise = "ccmp"; - proto = "rsn"; - }; - }; - }; wg-quick.interfaces.awg0.configFile = config.sops.templates.awg1-conf.path; }; security.acme = { diff --git a/server/mods/ap.nix b/server/mods/ap.nix new file mode 100644 index 0000000..e98544c --- /dev/null +++ b/server/mods/ap.nix @@ -0,0 +1,43 @@ +{ + boot.kernelParams = [ "cfg80211.ieee80211_regdom=RU" ]; + networking = { + firewall = { + allowedTCPPorts = [ 53 ]; + allowedUDPPorts = [ + 53 + 67 + ]; + }; + networkmanager.ensureProfiles.profiles = { + dhcp-ethernet.ethernet.cloned-mac-address = "0C:0E:76:A6:E6:B6"; + home-wifi = { + ipv4 = { + addresses = "10.1.0.1/16"; + method = "shared"; + }; + wifi = { + band = "a"; + channel = 157; + channel-width = 80; + mode = "ap"; + }; + wifi-security = { + group = "ccmp"; + pairwise = "ccmp"; + proto = "rsn"; + }; + }; + }; + }; + systemd.services.hotspot-routing = { + after = [ "wg-quick-awg0.service" ]; + path = [ pkgs.iproute2 ]; + preStop = "ip rule del from 10.1.0.0/16 lookup main"; + requiredBy = [ "wg-quick-awg0.service" ]; + script = "ip rule add from 10.1.0.0/16 lookup main"; + serviceConfig = { + RemainAfterExit = true; + Type = "oneshot"; + }; + }; +} diff --git a/server/mods/system.nix b/server/mods/system.nix index 53ca29e..c9889ee 100644 --- a/server/mods/system.nix +++ b/server/mods/system.nix @@ -18,17 +18,6 @@ sops.secrets.tgbot-env = { }; systemd = { services = { - hotspot-routing = { - after = [ "wg-quick-awg0.service" ]; - path = [ pkgs.iproute2 ]; - preStop = "ip rule del from 10.1.0.0/16 lookup main"; - requiredBy = [ "wg-quick-awg0.service" ]; - script = "ip rule add from 10.1.0.0/16 lookup main"; - serviceConfig = { - RemainAfterExit = true; - Type = "oneshot"; - }; - }; network-watchdog = { path = with pkgs; [ curl