diff options
| author | Preston Pan <ret2pop@nullring.xyz> | 2026-03-01 15:05:36 -0800 |
|---|---|---|
| committer | Preston Pan <ret2pop@nullring.xyz> | 2026-03-01 15:05:36 -0800 |
| commit | c46325d82f3a325021811f1be844ba24b0ee5688 (patch) | |
| tree | cf2824f076c0023c736b26887cd55fe2d93ef0bf /nix | |
| parent | 004d30ad75da83075ce0fae01f41f5205302e7da (diff) | |
add nice keybindings and options for hyprland; start of rpi-zero
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/flake.nix | 79 | ||||
| -rw-r--r-- | nix/flakevars.nix | 1 | ||||
| -rw-r--r-- | nix/init.el | 2 | ||||
| -rw-r--r-- | nix/modules/home/default.nix | 1 | ||||
| -rw-r--r-- | nix/modules/home/firefox.nix | 4 | ||||
| -rw-r--r-- | nix/modules/home/hyprland.nix | 15 | ||||
| -rw-r--r-- | nix/modules/home/pantalaimon.nix | 8 | ||||
| -rw-r--r-- | nix/modules/home/user.nix | 2 | ||||
| -rw-r--r-- | nix/modules/pantalaimon.nix | 13 | ||||
| -rw-r--r-- | nix/systems/rpi-zero/default.nix | 22 | ||||
| -rw-r--r-- | nix/systems/rpi-zero/home.nix | 7 | ||||
| -rw-r--r-- | nix/systems/spontaneity/default.nix | 7 |
12 files changed, 114 insertions, 47 deletions
diff --git a/nix/flake.nix b/nix/flake.nix index dad1072..86ce7ac 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -67,7 +67,10 @@ let vars = import ./flakevars.nix; system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + armPkgs = import nixpkgs { inherit system; }; + generate = nixos-dns.utils.generate nixpkgs.legacyPackages."${system}"; dnsConfig = { @@ -76,38 +79,50 @@ }; # function that generates all systems from hostnames - mkConfigs = map (hostname: {name = "${hostname}"; - value = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = attrs; - modules = if (hostname == "installer") then [ - (./. + "/systems/${hostname}/default.nix") - { networking.hostName = "${hostname}"; } - nix-topology.nixosModules.default - ] else [ - { - environment.systemPackages = with nixpkgs.lib; [ - deep-research.packages."${system}".deep-research - ]; - } - impermanence.nixosModules.impermanence - nix-topology.nixosModules.default - lanzaboote.nixosModules.lanzaboote - disko.nixosModules.disko - home-manager.nixosModules.home-manager - sops-nix.nixosModules.sops - nixos-dns.nixosModules.dns - { - nixpkgs.overlays = [ nur.overlays.default ]; - home-manager.extraSpecialArgs = attrs // { - systemHostName = "${hostname}"; - }; - networking.hostName = "${hostname}"; - } - (./. + "/systems/${hostname}/default.nix") - ]; - }; - }); + mkConfigs = map (hostname: + let + isRpi = (builtins.match "rpi-.*" hostname) != null; + hostSystem = if isRpi then "aarch64-linux" else system; + in + { + name = "${hostname}"; + value = nixpkgs.lib.nixosSystem { + system = hostSystem; + specialArgs = attrs; + modules = if (hostname == "installer") then [ + (./. + "/systems/${hostname}/default.nix") + { networking.hostName = "${hostname}"; } + nix-topology.nixosModules.default + ] else (if isRpi then [ + (./. + "/systems/${hostname}/default.nix") + disko.nixosModules.disko + home-manager.nixosModules.home-manager + sops-nix.nixosModules.sops + lanzaboote.nixosModules.lanzaboote + ] else ([ + { + environment.systemPackages = with nixpkgs.lib; [ + deep-research.packages."${system}".deep-research + ]; + } + impermanence.nixosModules.impermanence + nix-topology.nixosModules.default + lanzaboote.nixosModules.lanzaboote + disko.nixosModules.disko + home-manager.nixosModules.home-manager + sops-nix.nixosModules.sops + nixos-dns.nixosModules.dns + { + nixpkgs.overlays = [ nur.overlays.default ]; + home-manager.extraSpecialArgs = attrs // { + systemHostName = "${hostname}"; + }; + networking.hostName = "${hostname}"; + } + (./. + "/systems/${hostname}/default.nix") + ])); + }; + }); mkDiskoFiles = map (hostname: { name = "${hostname}"; diff --git a/nix/flakevars.nix b/nix/flakevars.nix index dd42616..e737e82 100644 --- a/nix/flakevars.nix +++ b/nix/flakevars.nix @@ -14,6 +14,7 @@ in # Hostnames of my systems hostnames = [ + "rpi-zero" "affinity" "continuity" "spontaneity" diff --git a/nix/init.el b/nix/init.el index d6358e4..10d6046 100644 --- a/nix/init.el +++ b/nix/init.el @@ -146,7 +146,7 @@ :html-preamble-format (("en" "<p class=\"preamble\"><a href=\"/index.html\">home</a> | <a href=\"./index.html\">section main page</a></p><hr>"))) ("website-static" :base-directory "~/monorepo" - :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico\\|asc\\|pub\\|webmanifest\\|xml\\|svg" + :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico\\|asc\\|pub\\|webmanifest\\|xml\\|svg\\|txt" :publishing-directory "~/website_html/" :recursive t :publishing-function org-publish-attachment) diff --git a/nix/modules/home/default.nix b/nix/modules/home/default.nix index 6e92c86..3eb4ad5 100644 --- a/nix/modules/home/default.nix +++ b/nix/modules/home/default.nix @@ -22,6 +22,7 @@ ./user.nix ./gtk.nix ./secrets.nix + ./pantalaimon.nix ]; options = { diff --git a/nix/modules/home/firefox.nix b/nix/modules/home/firefox.nix index df05517..d339ba8 100644 --- a/nix/modules/home/firefox.nix +++ b/nix/modules/home/firefox.nix @@ -16,7 +16,9 @@ vimium privacy-redirect ] ++ (lib.optional config.monorepo.profiles.crypto.enable pkgs.nur.repos.rycee.firefox-addons.metamask); - + settings = { + "privacy.resistFingerprinting.letterboxing" = true; + }; }; }; }; diff --git a/nix/modules/home/hyprland.nix b/nix/modules/home/hyprland.nix index 3e867cb..c836b81 100644 --- a/nix/modules/home/hyprland.nix +++ b/nix/modules/home/hyprland.nix @@ -58,13 +58,18 @@ workspace = 2; } { - name = "element-desktop"; - "match:class" = "element-desktop"; + name = "chromium-browser"; + "match:class" = "chromium-browser"; + workspace = 2; + } + { + name = "signal"; + "match:class" = "signal"; workspace = 3; } { - name = "vesktop"; - "match:class" = "vesktop"; + name = "Element"; + "match:class" = "Element"; workspace = 3; } { @@ -92,7 +97,7 @@ "$mod, S, exec, pavucontrol" "$mod, M, exec, monero-wallet-gui" "$mod, V, exec, element-desktop" - "$mod, C, exec, fluffychat" + "$mod, C, exec, signal-desktop" "$mod, D, exec, wofi --show run" "$mod, P, exec, bash ${scripts}/powermenu.sh" "$mod, Q, killactive" diff --git a/nix/modules/home/pantalaimon.nix b/nix/modules/home/pantalaimon.nix index b523865..b3a4d42 100644 --- a/nix/modules/home/pantalaimon.nix +++ b/nix/modules/home/pantalaimon.nix @@ -1,17 +1,19 @@ { lib, config, ... }: { services.pantalaimon = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; + enable = lib.mkDefault config.monorepo.profiles.enable; settings = { Default = { LogLevel = "Debug"; SSL = true; }; + local-matrix = { - Homeserver = "https://matrix.${config.monorepo.vars.orgHost}"; + Homeserver = "https://matrix.nullring.xyz"; ListenAddress = "127.0.0.1"; - ListenPort = "8008"; + ListenPort = 8008; }; }; + }; } diff --git a/nix/modules/home/user.nix b/nix/modules/home/user.nix index 05729b1..fc8c2ae 100644 --- a/nix/modules/home/user.nix +++ b/nix/modules/home/user.nix @@ -47,7 +47,7 @@ # Apps # octaveFull - grim swww vim kotatogram-desktop tg qwen-code element-desktop signal-desktop thunderbird jami + grim swww vim kotatogram-desktop tg qwen-code element-desktop signal-desktop signal-cli thunderbird jami # Sound/media pavucontrol alsa-utils imagemagick ffmpeg helvum diff --git a/nix/modules/pantalaimon.nix b/nix/modules/pantalaimon.nix new file mode 100644 index 0000000..e82e50f --- /dev/null +++ b/nix/modules/pantalaimon.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +{ + services.pantalaimon-headless = { + instances = { + "nullring" = { + ssl = true; + homeserver = "https://matrix.nullring.xyz"; + listenAddress = "localhost"; + listenPort = 8009; + }; + }; + }; +} diff --git a/nix/systems/rpi-zero/default.nix b/nix/systems/rpi-zero/default.nix new file mode 100644 index 0000000..f0e4dec --- /dev/null +++ b/nix/systems/rpi-zero/default.nix @@ -0,0 +1,22 @@ +{ lib, config, home-manager, ... }: +{ + imports = [ + ../common.nix + ]; + config = { + zramSwap = { + enable = true; + algorithm = "zstd"; + memoryPercent = 100; + }; + boot.loader.grub.enable = false; + boot.loader.generic-extlinux-compatible.enable = true; + monorepo = { + vars.device = "/dev/mmcblk0"; + profiles = { + server.enable = false; + ttyonly.enable = true; + }; + }; + }; +} diff --git a/nix/systems/rpi-zero/home.nix b/nix/systems/rpi-zero/home.nix new file mode 100644 index 0000000..205ea02 --- /dev/null +++ b/nix/systems/rpi-zero/home.nix @@ -0,0 +1,7 @@ +{ lib, config, pkgs, ... }: +{ + imports = [ + ../home-common.nix + ]; + config.monorepo.profiles.enable = false; +} diff --git a/nix/systems/spontaneity/default.nix b/nix/systems/spontaneity/default.nix index 9f33555..a7e78fc 100644 --- a/nix/systems/spontaneity/default.nix +++ b/nix/systems/spontaneity/default.nix @@ -35,12 +35,11 @@ systemd.network.networks."40-ens3" = { matchConfig.Name = "ens3"; networkConfig = { - # This is the magic combo for Vultr: - IPv6AcceptRA = true; # Accept routes (so we know where the internet is) - IPv6PrivacyExtensions = false; # No random privacy IPs + IPv6AcceptRA = true; + IPv6PrivacyExtensions = false; }; ipv6AcceptRAConfig = { - UseAutonomousPrefix = false; # Do NOT generate an IP address from the RA + UseAutonomousPrefix = false; }; }; networking = { |
