From 58e4e735dc3aeee71e4c1a87c88b9e7edbbd4b84 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 3 Aug 2025 12:17:11 +0200 Subject: [PATCH 1/7] feat: enable `nix-serve` for local devices --- modules/services/nix-serve.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 modules/services/nix-serve.nix diff --git a/modules/services/nix-serve.nix b/modules/services/nix-serve.nix new file mode 100644 index 0000000..06fcdfc --- /dev/null +++ b/modules/services/nix-serve.nix @@ -0,0 +1,18 @@ +{ config, ... }: +{ + services = { + nix-serve = { + enable = true; + secretKeyFile = "/var/secrets/cache-private-key.pem"; + }; + + nginx.virtualHosts."violet.booping.local" = { + forceSSL = false; + # sslCertificate = "/var/lib/acme/liv.town/cert.pem"; + # sslCertificateKey = "/var/lib/acme/liv.town/key.pem"; + locations."/" = { + proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}"; + }; + }; + }; +} From c2159bf950528b784b9fd5fff98f3309a0223149 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 3 Aug 2025 12:17:51 +0200 Subject: [PATCH 2/7] feat: adds user for remote building --- modules/services/remote-build.nix | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 modules/services/remote-build.nix diff --git a/modules/services/remote-build.nix b/modules/services/remote-build.nix new file mode 100644 index 0000000..811231f --- /dev/null +++ b/modules/services/remote-build.nix @@ -0,0 +1,55 @@ +{ + config, + pkgs, + username, + ... +}: +{ + users.users.remotebuild = { + isNormalUser = true; + createHome = false; + group = "remotebuild"; + openssh.authorizedKeys.keys = config.users.users.${username}.openssh.authorizedKeys.keys ++ [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINKI2KQn97mykFLIaMUWMftA1txJec9qW56hAMj5/MhE liv@dandelion +" + ]; + }; + + users.groups.remotebuild = { }; + + nix = { + nrBuildUsers = 64; + settings = { + trusted-users = [ "remotebuild" ]; + + min-free = 10 * 1024 * 1024; + max-free = 200 * 1024 * 1024; + + max-jobs = "auto"; + cores = 0; + }; + }; + + systemd.services.nix-daemon.serviceConfig = { + MemoryAccounting = true; + MemoryMax = "90%"; + OOMScoreAdjust = 500; + }; + + # add to clients: + # nix.distributedBuilds = true; + # nix.settings.builders-use-substitutes = true; + # nix.buildMachines = [ + # { + # hostName = "violet"; + # sshUser = "remotebuild"; + # sshKey = "/home/liv/.ssh/id_ed25519"; # Make sure to give a key that works for this user. + # system = pkgs.stdenv.hostPlatform.system; + # supportedFeatures = [ + # "nixos-test" + # "big-parallel" + # "kvm" + # ]; + # } + # ]; +} From 9c5f55644faa926a3437ef0bcb9d167f2e861a9a Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 3 Aug 2025 12:18:40 +0200 Subject: [PATCH 3/7] chore: move `secrets.yaml` to host-specific folder --- secrets/{ => sakura}/secrets.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename secrets/{ => sakura}/secrets.yaml (100%) diff --git a/secrets/secrets.yaml b/secrets/sakura/secrets.yaml similarity index 100% rename from secrets/secrets.yaml rename to secrets/sakura/secrets.yaml From 69a7d717d68a4ce239e772db77418c32af82f83e Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 3 Aug 2025 12:18:51 +0200 Subject: [PATCH 4/7] flake: update (nixvim) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 3be4fca..ea8e840 100644 --- a/flake.lock +++ b/flake.lock @@ -954,11 +954,11 @@ "nixvim": "nixvim_2" }, "locked": { - "lastModified": 1753605519, - "narHash": "sha256-RJTIXX9JMeUOA3sJuiqJRBXFzzQLM6GrOFrL8+Iy6hg=", + "lastModified": 1754172548, + "narHash": "sha256-8lWMN23VGQHTN5Kg5Kz1UMakt42brOlMz2IKxFBvKog=", "owner": "ahwxorg", "repo": "nixvim-config", - "rev": "20053a4d7a90b56cb7fe38d9557d71aeecd2cb47", + "rev": "fe2f1c27fa532489800b8f4d17f12c13299afa8d", "type": "github" }, "original": { From 1f06aba566244bfd0ea47d0984b215662d43fb71 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 3 Aug 2025 12:20:32 +0200 Subject: [PATCH 5/7] feat: adds `nix-ld` and no longer hard-code timezone --- modules/core/system.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/core/system.nix b/modules/core/system.nix index cc2ab7c..71ecb33 100644 --- a/modules/core/system.nix +++ b/modules/core/system.nix @@ -14,6 +14,8 @@ "nix-command" "flakes" ]; + # substituters = [ "http://violet.booping.local" ]; + # trusted-public-keys = [ "violet.booping.local:2gshN3xfGSL7eKFc8tGkqSoIb3WQxuB2RJ8DuakLLqc=%" ]; }; gc = { automatic = true; @@ -22,6 +24,11 @@ }; }; + programs.nix-ld = { + enable = true; + libraries = with pkgs; [ ]; + }; + # nixpkgs = { # overlays = [ # self.overlays.default @@ -56,6 +63,6 @@ ipaexfont ]; - time.timeZone = "Europe/Amsterdam"; + time.timeZone = lib.mkDefault "Europe/Amsterdam"; system.stateVersion = "24.05"; } From ee59ff3f3b2fec0067fe600354558c37aa9003b7 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 3 Aug 2025 12:20:57 +0200 Subject: [PATCH 6/7] feat: set new colorscheme for kitty; fix deprecation error for `theme` option --- modules/home/kitty.nix | 101 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 2 deletions(-) diff --git a/modules/home/kitty.nix b/modules/home/kitty.nix index 3f20039..39371d6 100644 --- a/modules/home/kitty.nix +++ b/modules/home/kitty.nix @@ -3,7 +3,7 @@ programs.kitty = { enable = true; - theme = "3024 Night"; + # theme = "3024 Night"; font = { name = "GohuFont 14 Nerd Font Mono"; @@ -12,7 +12,7 @@ settings = { confirm_os_window_close = 0; - background_opacity = "0.25"; + background_opacity = "0.50"; window_padding_width = 10; scrollback_lines = 10000; enable_audio_bell = false; @@ -35,5 +35,102 @@ "ctrl+shift+left" = "no_op"; "ctrl+shift+right" = "no_op"; }; + extraConfig = '' + # vim:ft=kitty + + ## name: Base2Tone Suburb Dark + ## author: Bram de Haan (https://github.com/atelierbram) + ## license: MIT + ## upstream: https://github.com/atelierbram/Base2Tone-kitty/blob/main/themes/base2tone-suburb-dark.conf + ## blurb: duotone theme | warm blue - bright pink + + + #: The basic colors + + foreground #878ba6 + # background #1e202f + selection_foreground #878ba6 + selection_background #292c3d + + + #: Cursor colors + + cursor #d14781 + cursor_text_color #1e202f + + + #: URL underline color when hovering with mouse + + url_color #d2d8fe + + + #: kitty window border colors and terminal bell colors + + active_border_color #444864 + inactive_border_color #1e202f + bell_border_color #5165e6 + visual_bell_color none + + + #: OS Window titlebar colors + + wayland_titlebar_color #292c3d + macos_titlebar_color #292c3d + + + #: Tab bar colors + + active_tab_foreground #fbf9fa + active_tab_background #1e202f + inactive_tab_foreground #b0a6aa + inactive_tab_background #292c3d + tab_bar_background #292c3d + tab_bar_margin_color none + + + #: Colors for marks (marked text in the terminal) + + mark1_foreground #1e202f + mark1_background #6375ee + mark2_foreground #1e202f + mark2_background #8d8186 + mark3_foreground #1e202f + mark3_background #e44e8c + + + #: The basic 16 colors + + #: black + color0 #1e202f + color8 #4f5472 + + #: red + color1 #7586f5 + color9 #fe81b5 + + #: green + color2 #fb6fa9 + color10 #292c3d + + #: yellow + color3 #ffb3d2 + color11 #444864 + + #: blue + color4 #8696fd + color12 #5b6080 + + #: magenta + color5 #fb6fa9 + color13 #d2d8fe + + #: cyan + color6 #a0acfe + color14 #f764a1 + + #: white + color7 #878ba6 + color15 #ebedff + ''; }; } From 0fa2dd54dcfe50689eed1e25dc7e1e5994cb4580 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 3 Aug 2025 12:21:14 +0200 Subject: [PATCH 7/7] feat: adds more `zsh` things --- modules/home/zsh.nix | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/modules/home/zsh.nix b/modules/home/zsh.nix index 28fde10..35d8bb5 100644 --- a/modules/home/zsh.nix +++ b/modules/home/zsh.nix @@ -11,6 +11,18 @@ enable = true; autocd = true; autosuggestion.enable = true; + syntaxHighlighting = { + enable = true; + highlighters = [ + "main" + "brackets" + "pattern" + "regexp" + "cursor" + "root" + "line" + ]; + }; enableCompletion = true; # enableGlobalCompInit = true; # Should be a thing according to NixOS options but is not a thing? @@ -137,6 +149,7 @@ enable = true; abbreviations = { mkdir = "mkdir -p"; + mv = "mv --interactive"; vim = "nvim"; v = "nvim"; vi = "nvim"; @@ -191,6 +204,7 @@ sxiv = "nsxiv"; enby = "man"; woman = "man"; + mkcd = "mkdir $1 && cd $1"; # NixOS ns = "nix-shell --run zsh"; @@ -202,16 +216,16 @@ }; plugins = with pkgs; [ - { - name = "zsh-syntax-highlighting"; - src = fetchFromGitHub { - owner = "zsh-users"; - repo = "zsh-syntax-highlighting"; - rev = "0.6.0"; - sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4"; - }; - file = "zsh-syntax-highlighting.zsh"; - } + #{ + # name = "zsh-syntax-highlighting"; + # src = fetchFromGitHub { + # owner = "zsh-users"; + # repo = "zsh-syntax-highlighting"; + # rev = "0.6.0"; + # sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4"; + # }; + # file = "zsh-syntax-highlighting.zsh"; + #} { name = "zsh-autopair"; src = fetchFromGitHub {