diff --git a/.sops.yaml b/.sops.yaml index d27c351..356cf9d 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -2,7 +2,6 @@ keys: - &admin_fw age1jeyw96795qu52swmtkjqgr2w3g4vxc43ckc5r4hlwpje23ptnfwsheah0s - &server_desktop age106ml0ssx0p24dvfamp322myzka4wzeze9yhzyvtptp9c6fmmru6slswh2x - &server_macmini age1dql5lwetk39a9y8ummfgjx3aym02yn205lxk389k6q0tu9y3ff4s94l66t - - &server_legacy age1kf93dpuqhu0a90s49sszgw64mn32hwgrm8suv799ca4ngrkecpqs8ljzk8 creation_rules: - path_regex: secrets/[^/]+\.(yaml|json|env|ini)$ key_groups: diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..db4b1bf --- /dev/null +++ b/Justfile @@ -0,0 +1,66 @@ +# just is a command runner, Justfile is very similar to Makefile, but simpler. + +############################################################################ +# +# Nix commands related to the local machine +# +############################################################################ + +deploy: + nixos-rebuild switch --flake . --use-remote-sudo + +debug: + nixos-rebuild switch --flake . --use-remote-sudo --show-trace --verbose + +up: + nix flake update + +# Update specific input +# usage: make upp i=home-manager +upp: + nix flake update $(i) + +history: + nix profile history --profile /nix/var/nix/profiles/system + +repl: + nix repl -f flake:nixpkgs + +clean: + # remove all generations older than 7 days + sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d + +gc: + # garbage collect all unused nix store entries + sudo nix-collect-garbage --delete-old + +############################################################################ +# +# Idols, Commands related to my remote distributed building cluster +# +############################################################################ + +add-idols-ssh-key: + ssh-add ~/.ssh/ai-idols + +aqua: add-idols-ssh-key + nixos-rebuild --flake .#aquamarine --target-host aquamarine --build-host aquamarine switch --use-remote-sudo + +aqua-debug: add-idols-ssh-key + nixos-rebuild --flake .#aquamarine --target-host aquamarine --build-host aquamarine switch --use-remote-sudo --show-trace --verbose + +ruby: add-idols-ssh-key + nixos-rebuild --flake .#ruby --target-host ruby --build-host ruby switch --use-remote-sudo + +ruby-debug: add-idols-ssh-key + nixos-rebuild --flake .#ruby --target-host ruby --build-host ruby switch --use-remote-sudo --show-trace --verbose + +kana: add-idols-ssh-key + nixos-rebuild --flake .#kana --target-host kana --build-host kana switch --use-remote-sudo + +kana-debug: add-idols-ssh-key + nixos-rebuild --flake .#kana --target-host kana --build-host kana switch --use-remote-sudo --show-trace --verbose + +idols: aqua ruby kana + +idols-debug: aqua-debug ruby-debug kana-debug diff --git a/README.md b/README.md index f4ab78f..70ed1fb 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,10 @@ # min nix config :) @ Wastring -- legacy (Lenovo Yoga) -- node (Lenovo ThinkCentre) -- archive (2014 MacMini) +- laptop (Acer Swift 3) † 2025-08-05 +- desktop (ThinkCentre) +- macmini (2014 MacMini) @ iFACTS Office -- core (MinisForum AI X1 Pro) - -@ Old Computers -- laptop (Acer Swift 3) † 2025-08-05 +- jobb (MinisForum AI X1 Pro) +- work-desktop (VM @ Proxmox) diff --git a/flake.lock b/flake.lock index 972fe87..2e7fade 100644 --- a/flake.lock +++ b/flake.lock @@ -227,24 +227,6 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "fromYaml": { "flake": false, "locked": { @@ -271,11 +253,11 @@ ] }, "locked": { - "lastModified": 1758108966, - "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=", + "lastModified": 1757588530, + "narHash": "sha256-tJ7A8mID3ct69n9WCvZ3PzIIl3rXTdptn/lZmqSS95U=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", + "rev": "b084b2c2b6bc23e83bbfe583b03664eb0b18c411", "type": "github" }, "original": { @@ -354,11 +336,11 @@ ] }, "locked": { - "lastModified": 1758022363, - "narHash": "sha256-ENUhCRWgSX4ni751HieNuQoq06dJvApV/Nm89kh+/A0=", + "lastModified": 1755233722, + "narHash": "sha256-AavrbMltJKcC2Fx0lfJoZfmy7g87ebXU0ddVenhajLA=", "owner": "hercules-ci", "repo": "hercules-ci-effects", - "rev": "1a3667d33e247ad35ca250698d63f49a5453d824", + "rev": "99e03e72e3f7e13506f80ef9ebaedccb929d84d0", "type": "github" }, "original": { @@ -374,11 +356,11 @@ ] }, "locked": { - "lastModified": 1758184248, - "narHash": "sha256-TOazVsj8D1LTGQ6q8xdtfoPs9Z+PiqUS952WvZPssR0=", + "lastModified": 1757920978, + "narHash": "sha256-Mv16aegXLulgyDunijP6SPFJNm8lSXb2w3Q0X+vZ9TY=", "owner": "nix-community", "repo": "home-manager", - "rev": "bf7056c6a2d893d80db18d06d7e730d6515aaae8", + "rev": "11cc5449c50e0e5b785be3dfcb88245232633eb8", "type": "github" }, "original": { @@ -461,11 +443,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1758110629, - "narHash": "sha256-uHE+FdhKBohAUeO29034b68RN0ITf/KRy2tkaXQdLCY=", + "lastModified": 1757936652, + "narHash": "sha256-qQi/z2sfqFpVnDP+oqIBXRxwRCsmtk7HFOrQF08h6e8=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "1cb8cd3930e2c8410bbc99baa0a5bea91994bd71", + "rev": "9e74d0aea7614eaf238ef07261129026572337e7", "type": "github" }, "original": { @@ -677,11 +659,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1758153943, - "narHash": "sha256-jXnUMejhammEWX6rqC+bKRNN8k6kWlXUwZ8GrUqLXeA=", + "lastModified": 1757894719, + "narHash": "sha256-sG0DIub/4dB4HK8CahQYm6rTcxT8LHS6QmQNwThIN6M=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "500b1019f07a48adf8f42c57deb5f44f6e9b6eff", + "rev": "2376288a3cf701a272d4b083d2e39a44d087f9e2", "type": "github" }, "original": { @@ -693,11 +675,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1758137374, - "narHash": "sha256-cNyIdXePxgwHy2rLm/M0wXl3lc+ZmvBNhO1tQBDU0v4=", + "lastModified": 1757891857, + "narHash": "sha256-GWKvDTB+03uQGx1qzuBQCewPgZiD8HWX2rovynsBbt8=", "owner": "neovim", "repo": "neovim", - "rev": "5148c1247e4dffbe59bebb89084a285bb9f50677", + "rev": "7b8b9d270f6ede43661f54573d1f4f0ae49d4ff1", "type": "github" }, "original": { @@ -724,11 +706,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1758029226, - "narHash": "sha256-TjqVmbpoCqWywY9xIZLTf6ANFvDCXdctCjoYuYPYdMI=", + "lastModified": 1757746433, + "narHash": "sha256-fEvTiU4s9lWgW7mYEU/1QUPirgkn+odUBTaindgiziY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "08b8f92ac6354983f5382124fef6006cade4a1c1", + "rev": "6d7ec06d6868ac6d94c371458fc2391ded9ff13d", "type": "github" }, "original": { @@ -740,11 +722,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1758035966, - "narHash": "sha256-qqIJ3yxPiB0ZQTT9//nFGQYn8X/PBoJbofA7hRKZnmE=", + "lastModified": 1757745802, + "narHash": "sha256-hLEO2TPj55KcUFUU1vgtHE9UEIOjRcH/4QbmfHNF820=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8d4ddb19d03c65a36ad8d189d001dc32ffb0306b", + "rev": "c23193b943c6c689d70ee98ce3128239ed9e32d1", "type": "github" }, "original": { @@ -754,22 +736,6 @@ "type": "github" } }, - "nixpkgs_4": { - "locked": { - "lastModified": 1744536153, - "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nur": { "inputs": { "flake-parts": [ @@ -826,26 +792,7 @@ "neovim-nightly-overlay": "neovim-nightly-overlay", "nixpkgs": "nixpkgs_3", "sops-nix": "sops-nix", - "stylix": "stylix", - "typsite": "typsite" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": "nixpkgs_4" - }, - "locked": { - "lastModified": 1749004659, - "narHash": "sha256-zaZrcC5UwHPGkgfnhTPx5sZfSSnUJdvYHhgex10RadQ=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "c52e346aedfa745564599558a096e88f9a5557f9", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" + "stylix": "stylix" } }, "sops-nix": { @@ -855,11 +802,11 @@ ] }, "locked": { - "lastModified": 1758007585, - "narHash": "sha256-HYnwlbY6RE5xVd5rh0bYw77pnD8lOgbT4mlrfjgNZ0c=", + "lastModified": 1757847158, + "narHash": "sha256-TumOaykhZO8SOs/faz6GQhqkOcFLoQvESLSF1cJ4mZc=", "owner": "Mic92", "repo": "sops-nix", - "rev": "f77d4cfa075c3de66fc9976b80e0c4fc69e2c139", + "rev": "ee6f91c1c11acf7957d94a130de77561ec24b8ab", "type": "github" }, "original": { @@ -932,21 +879,6 @@ "type": "github" } }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tinted-foot": { "flake": false, "locked": { @@ -1049,28 +981,6 @@ "type": "github" } }, - "typsite": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1757041869, - "narHash": "sha256-3gq3miYeelGbYU6rpVzHJHVrnNegrLf9ec8KBN+a2uo=", - "owner": "Glomzzz", - "repo": "typsite", - "rev": "0e8ca8ad75dc077d680550a797babd3b29495d25", - "type": "github" - }, - "original": { - "owner": "Glomzzz", - "repo": "typsite", - "type": "github" - } - }, "xdph": { "inputs": { "hyprland-protocols": [ diff --git a/flake.nix b/flake.nix index 99c5154..a3186be 100644 --- a/flake.nix +++ b/flake.nix @@ -12,10 +12,6 @@ url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - typsite = { - url = "github:Glomzzz/typsite"; - inputs.nixpkgs.follows = "nixpkgs"; - }; # Neovim neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; @@ -38,8 +34,7 @@ nixpkgs, home-manager, stylix, - sops-nix, - typsite, + sops-nix, ... }@inputs: let @@ -56,9 +51,7 @@ myhostname = "legacy"; }; modules = [ - stylix.nixosModules.stylix ./maskiner/legacy/configuration.nix - sops-nix.nixosModules.sops ]; }; node = nixpkgs.lib.nixosSystem { @@ -68,7 +61,7 @@ }; modules = [ ./maskiner/node/configuration.nix - sops-nix.nixosModules.sops + sops-nix.nixosModules.sops ]; }; core = nixpkgs.lib.nixosSystem { @@ -80,7 +73,7 @@ ./maskiner/core/configuration.nix stylix.nixosModules.stylix home-manager.nixosModules.home-manager - sops-nix.nixosModules.sops + sops-nix.nixosModules.sops ]; }; archive = nixpkgs.lib.nixosSystem { diff --git a/maskiner/core/configuration.nix b/maskiner/core/configuration.nix index ea0110d..22e00b9 100644 --- a/maskiner/core/configuration.nix +++ b/maskiner/core/configuration.nix @@ -19,7 +19,6 @@ in ../../moduler/base.nix ../../moduler/users.nix - ../../moduler/git.nix ../../moduler/network.nix ../../moduler/programs.nix ../../moduler/system.nix @@ -32,6 +31,16 @@ in kubernetes-tools.enable = true; + + sops.defaultSopsFile = ../../secrets/sops.yaml; + sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; + sops.secrets.gandi_key = { + # This path is where the *decrypted* secret will be placed at runtime + path = "/run/secrets/gandi_key"; + owner = "root"; + mode = "0440"; + }; + stylix = { enable = true; base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-latte.yaml"; diff --git a/maskiner/legacy/configuration.nix b/maskiner/legacy/configuration.nix index e101a51..02740b5 100644 --- a/maskiner/legacy/configuration.nix +++ b/maskiner/legacy/configuration.nix @@ -28,27 +28,11 @@ in ../../moduler/sound.nix ]; - sops.defaultSopsFile = ../../secrets/sops.yaml; - sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; - - stylix = { - enable = true; - base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-latte.yaml"; - }; - home-manager.extraSpecialArgs = { inherit inputs pkgs; }; home-manager.users.fw = { imports = [ ./../../moduler/home.nix ]; - stylix.targets = { - lazygit.enable = false; - fish.enable = false; - kitty.enable = false; - waybar.enable = false; - tmux.enable = false; - k9s.enable = false; - }; }; boot.kernelPackages = pkgs.linuxPackages_latest; diff --git a/maskiner/node/configuration.nix b/maskiner/node/configuration.nix index ecf63bc..8af7c08 100644 --- a/maskiner/node/configuration.nix +++ b/maskiner/node/configuration.nix @@ -21,10 +21,7 @@ ../../moduler/uptime-kuma.nix ../../moduler/services/monitoring ../../moduler/services/headscale - ../../moduler/services/actual - ../../moduler/services/forgejo # ../../moduler/wastring.nix - ../../moduler/wedding.nix ]; sops.defaultSopsFile = ../../secrets/sops.yaml; @@ -35,14 +32,6 @@ mode = "0440"; }; - forgejo = { - enable = true; - }; - - actual = { - enable = true; - }; - grafana = { enable = true; host = "127.0.0.1"; @@ -82,6 +71,34 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII60tdNsG0z9q2jHmoTKvkeLQE6OF0bmTsDX1bpqpoG7 fw@jobb" ]; + security.acme = { + acceptTerms = true; + defaults.email = "fredrik@wastring.com"; + certs."shop.wastring.com" = { + dnsProvider = "gandiv5"; + webroot = null; + credentialsFile = config.sops.secrets.gandi_key.path; + dnsPropagationCheck = true; + }; + }; + services.nginx = { + enable = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + virtualHosts."shop.wastring.com" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:8080"; + proxyWebsockets = true; + extraConfig = + "proxy_ssl_server_name on;" + + + # required when the server wants to use HTTP Authentication + "proxy_pass_header Authorization;"; + }; + }; + }; networking.hostName = myhostname; diff --git a/moduler/base.nix b/moduler/base.nix index 26af008..b7646a3 100644 --- a/moduler/base.nix +++ b/moduler/base.nix @@ -58,7 +58,6 @@ fonts.packages = with pkgs; [ nerd-fonts.comic-shanns-mono nerd-fonts.fira-code - garamond-libre ]; i18n.defaultLocale = "en_US.UTF-8"; diff --git a/moduler/dev.nix b/moduler/dev.nix index 03afa7e..b579440 100644 --- a/moduler/dev.nix +++ b/moduler/dev.nix @@ -41,7 +41,6 @@ in # Blogging hugo - zola # System Design sqlc diff --git a/moduler/git.nix b/moduler/git.nix index 2bbf0ff..e260d68 100644 --- a/moduler/git.nix +++ b/moduler/git.nix @@ -2,14 +2,9 @@ { programs.git = { enable = true; - config = { - user = { - name = "fwastring"; - email = "fredrik@wastring.com"; - }; - pull = { - rebase = false; - }; + userName = "fwastring"; + userEmail = "fredrik@wastring.com"; + extraConfig = { url."git@github.com:".insteadOf = "https://github.com/"; }; }; diff --git a/moduler/home.nix b/moduler/home.nix index 968f69e..f97513e 100644 --- a/moduler/home.nix +++ b/moduler/home.nix @@ -10,6 +10,7 @@ imports = [ ../moduler/tmux.nix ../moduler/fish.nix + ../moduler/git.nix ../moduler/kitty.nix ../moduler/dunst.nix ../moduler/nixpkgs.nix diff --git a/moduler/hyprland.nix b/moduler/hyprland.nix index 9c6860d..c6e89ac 100644 --- a/moduler/hyprland.nix +++ b/moduler/hyprland.nix @@ -4,7 +4,6 @@ lib, pkgs, inputs, - myhostname, ... }: let @@ -55,7 +54,7 @@ in }; rofi = { enable = true; - font = lib.mkForce "ComicShannsMono Nerd Font 18"; + font = lib.mkForce "ComicShannsMono Nerd Font 18"; }; waybar = { enable = true; @@ -246,7 +245,6 @@ in monitor = [ "desc: ASUSTek COMPUTER INC ASUS PA279CV S4LMTF159462 (DP-1), 3840x2160@60, 0x0, 1.5" "desc: ASUSTek COMPUTER INC VG279 JBLMQS021792 (DP-1), 1920x1080@144, 0x0, 1" - "eDP-1, 1920x1080@60, 0x0, 1, transform, 2" ",prefered,auto,1" ]; @@ -298,8 +296,8 @@ in }; }; - animations = { - enabled = false; + animations = { + enabled = true; bezier = [ "linear, 0, 0, 1, 1" "md3_standard, 0.2, 0, 0, 1" @@ -317,17 +315,17 @@ in "md2, 0.4, 0, 0.2, 1" ]; animation = [ - "windows, 1, 1.2, md3_decel, popin 60%" - "windowsIn, 1, 1.2, md3_decel, popin 60%" - "windowsOut, 1, 1.2, md3_accel, popin 60%" + "windows, 1, 1, md3_decel, popin 60%" + "windowsIn, 1, 1, md3_decel, popin 60%" + "windowsOut, 1, 1, md3_accel, popin 60%" "border, 1, 2, default" - "fade, 1, 1.2, md3_decel" - "layersIn, 1, 1.2, menu_decel, slide" - "layersOut, 1, 1.2, menu_accel" - "fadeLayersIn, 1, 1.2, menu_decel" - "fadeLayersOut, 1, 1.2, menu_accel" + "fade, 1, 1, md3_decel" + "layersIn, 1, 1, menu_decel, slide" + "layersOut, 1, 1, menu_accel" + "fadeLayersIn, 1, 1, menu_decel" + "fadeLayersOut, 1, 1, menu_accel" "workspaces, 1, 2, menu_decel, slide" - "specialWorkspace, 1, 1.2, md3_decel, slidevert" + "specialWorkspace, 1, 1, md3_decel, slidevert" ]; }; diff --git a/moduler/kitchenowl.nix b/moduler/kitchenowl.nix index f3ae4aa..9d351a4 100644 --- a/moduler/kitchenowl.nix +++ b/moduler/kitchenowl.nix @@ -7,34 +7,6 @@ let in { - security.acme = { - acceptTerms = true; - defaults.email = "fredrik@wastring.com"; - certs."shop.wastring.com" = { - dnsProvider = "gandiv5"; - webroot = null; - credentialsFile = config.sops.secrets.gandi_key.path; - dnsPropagationCheck = true; - }; - }; - services.nginx = { - enable = true; - recommendedProxySettings = true; - recommendedTlsSettings = true; - virtualHosts."shop.wastring.com" = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:8080"; - proxyWebsockets = true; - extraConfig = - "proxy_ssl_server_name on;" - + - # required when the server wants to use HTTP Authentication - "proxy_pass_header Authorization;"; - }; - }; - }; virtualisation.oci-containers = { backend = "podman"; containers = { diff --git a/moduler/lsp.nix b/moduler/lsp.nix index c052aa8..1c9131e 100644 --- a/moduler/lsp.nix +++ b/moduler/lsp.nix @@ -27,6 +27,5 @@ typescript-language-server lua-language-server marksman - typstfmt ]; } diff --git a/moduler/programs.nix b/moduler/programs.nix index 4f15b86..c6bbdc9 100644 --- a/moduler/programs.nix +++ b/moduler/programs.nix @@ -4,7 +4,8 @@ inputs, lib, config, - pkgs, myhostname, + pkgs, + myhostname, ... }: { services.udev = { @@ -33,12 +34,11 @@ via drawio freecad-wayland + ghostty kdePackages.okular + xdg-user-dirs angryipscanner - # TUI - gurk-rs - # Browsers librewolf chawan diff --git a/moduler/radicale.nix b/moduler/radicale.nix index 5a4ca9e..dbf7daa 100644 --- a/moduler/radicale.nix +++ b/moduler/radicale.nix @@ -4,11 +4,30 @@ }: { + security.acme = { + certs."cal.wastring.com" = { + dnsProvider = "gandiv5"; + webroot = null; + credentialsFile = config.sops.secrets.gandi_key.path; + dnsPropagationCheck = true; + }; + }; + # services.nginx = { + # virtualHosts."cal.wastring.com" = { + # enableACME = true; + # forceSSL = true; + # locations."/" = { + # proxyPass = "http://127.0.0.1:5232"; + # proxyWebsockets = true; # needed if you need to use WebSocket + # extraConfig = "proxy_ssl_server_name on;" + "proxy_pass_header Authorization;"; + # }; + # }; + # }; services.radicale = { enable = true; settings = { auth.type = "none"; - server.hosts = [ "100.64.0.4:5232" ]; + server.hosts = [ "0.0.0.0:5232" ]; }; }; } diff --git a/moduler/services/actual/default.nix b/moduler/services/actual/default.nix deleted file mode 100644 index 0860a27..0000000 --- a/moduler/services/actual/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - lib, - config, - ... -}: -with lib; -{ - options = { - actual = { - enable = mkEnableOption "enables Actual"; - port = lib.mkOption { - type = lib.types.int; - default = 8001; - description = "The port that Actual is served on."; - }; - hostname = lib.mkOption { - type = lib.types.str; - default = "localhost"; - description = "The hostname that Actual is served on."; - }; - }; - }; - - config = mkMerge [ - (mkIf config.actual.enable { - services = { - actual = { - enable = true; - openFirewall = true; - settings = { - port = config.actual.port; - hostname = config.actual.hostname; - }; - }; - nginx.virtualHosts."budget.wastring.com" = { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://${toString config.actual.hostname}:${toString config.actual.port}"; - proxyWebsockets = true; - }; - }; - }; - }) - ]; -} diff --git a/moduler/services/forgejo/default.nix b/moduler/services/forgejo/default.nix deleted file mode 100644 index d45ec8c..0000000 --- a/moduler/services/forgejo/default.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - cfg = config.services.forgejo; - srv = cfg.settings.server; -in -with lib; -{ - options = { - forgejo = { - enable = mkEnableOption "enables forgejo"; - port = lib.mkOption { - type = lib.types.int; - default = 8003; - description = "The port that Actual is served on."; - }; - domain = lib.mkOption { - type = lib.types.str; - default = "git.wastring.com"; - description = "The hostname that Actual is served on."; - }; - }; - }; - config = mkMerge [ - (mkIf config.actual.enable { - services.nginx = { - virtualHosts.${config.forgejo.domain} = { - forceSSL = true; - enableACME = true; - extraConfig = '' - client_max_body_size 512M; - ''; - locations."/".proxyPass = "http://localhost:${toString config.forgejo.port}"; - }; - }; - - sops.secrets.smtp_password = { }; - sops.secrets.forgejo-admin-password.owner = "forgejo"; - systemd.services.forgejo.preStart = - let - adminCmd = "${lib.getExe cfg.package} admin user"; - pwd = config.sops.secrets.forgejo-admin-password; - user = "fw"; - in - '' - ${adminCmd} create --admin --email "root@localhost" --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true - ## uncomment this line to change an admin user which was already created - # ${adminCmd} change-password --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true - ''; - - services.forgejo = { - enable = true; - database.type = "postgres"; - # Enable support for Git Large File Storage - lfs.enable = true; - settings = { - server = { - DOMAIN = "${config.forgejo.domain}"; - # You need to specify this to remove the port from URLs in the web UI. - ROOT_URL = "https://${config.forgejo.domain}/"; - HTTP_PORT = config.forgejo.port; - }; - # You can temporarily allow registration to create an admin user. - service.DISABLE_REGISTRATION = true; - # Add support for actions, based on act: https://github.com/nektos/act - actions = { - ENABLED = true; - DEFAULT_ACTIONS_URL = "github"; - }; - # Sending emails is completely optional - # You can send a test email from the web UI at: - # Profile Picture > Site Administration > Configuration > Mailer Configuration - mailer = { - ENABLED = true; - SMTP_ADDR = "mail.gandi.net"; - FROM = "noreply@${config.forgejo.domain}"; - USER = "fredrik@wastring.com"; - }; - }; - secrets = { - mailer.PASSWD = config.sops.secrets.smtp_password.path; - }; - }; - }) - ]; - -} diff --git a/moduler/system.nix b/moduler/system.nix index bce6d3c..1679ebd 100644 --- a/moduler/system.nix +++ b/moduler/system.nix @@ -86,7 +86,6 @@ # Git lazygit - hyprpicker # Terminal Stuff chawan @@ -96,7 +95,6 @@ typst typstyle tinymist - typstfmt websocat nix-search-cli libsixel diff --git a/moduler/users.nix b/moduler/users.nix index 3307570..97b308e 100644 --- a/moduler/users.nix +++ b/moduler/users.nix @@ -20,7 +20,9 @@ ]; openssh.authorizedKeys = { keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFpJBGPIfPB1BwSG7aoKqwfccyZSaU7J3xpJ8behMp9N fw@core" + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDALsdpwvC0w/Aj+1fWtzJyyWoUrGkdh8o2thVHeQQBNo0D7cmVberYmi4Cv9gWGX6PaElrnOl0KRdGyro2wxOYokSxgk2VgWW67BFITAQAbKyG2NhXXPbhb4jccDo7WH7TtOG8IofuJTPRu1Duda6k4RN0I0CkyAN6LGX+zy49cq0qKf9ijXYhCDYNih3+Fu/ig0aW/SYmsVoUl2VFTWdI5x5/wLvIjTEZhmAtYIeYADaLnom356cFrUysZa++FUujQAz3Ow236BvP95XZdTsqvfWNZFNIpC9VYF72JeIDCs5wDIr0GFmanF2On1nar+jJpoOE8SdHt357p5g/PqXV5TisN2xQRkqVwO9tWtMl4sF84jA4ULnY2gQWv9jErMxymUQ1IwuPUzDDlbRHCtfexAtkBy7wv6xslKAzG1QahvF/btNs5Caj3LN31rgAuxyooCbKGKTeBP3kHPKcz1iupgidfbO/QqVXBRQJTEdGyAKa8hVmLQZZPC/XUhxESAk= fw@fw-nix" + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8ku8iCb7tXd/tfxYDW+Tj8K9kpfrYZciYUZ6tBpO80inm4EImtfyEeJTuqDWMKov2BftUKs8brNeTBCXUEvU1P0+cpOP9RtYA5tfBXf3su+iVSswJJStIxNboXHrEGKdJJRNsTv/9agshDSUBy6G5TI1cXhv/updornfA4fwOMqOmtlYEn6XCRnsrO6NBLc/uLckdbF75HOsoLvezRvuqTLjpapjaUKGVPrgNXiclIKHmuOx71kgD4FX3rSz9FgKjnfu3a7DBbrHsf/g+N9PjNF1muN9UOV6nK3WwiO9BMWi7NpAWfzJOeZg9chqzI+U6CcsqYVeESgL41so+dnv3 fw@laptop" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP34dnsZSnWdDvd+3BXDwcw7wP0PjPEx2eCdBQJyGD6O fw@laptop" ]; }; }; diff --git a/moduler/wedding.nix b/moduler/wedding.nix deleted file mode 100644 index 6c89be8..0000000 --- a/moduler/wedding.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - config, - inputs, - pkgs, - ... -}: - -let -in -{ - sops.secrets.github_password = { }; - virtualisation.oci-containers = { - backend = "podman"; - containers = { - wedding = { - login = { - username = "fwastring"; - passwordFile = config.sops.secrets.github_password.path; - registry = "https://ghcr.io"; - }; - image = "ghcr.io/fwastring/wedding:8eed91e3c05fde5f826f25de4c7bccdbc312caef"; - ports = [ "127.0.0.1:8083:8080" ]; - }; - }; - }; - services.nginx = { - virtualHosts."wedding.wastring.com" = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:8083"; - proxyWebsockets = true; - }; - }; - }; -} diff --git a/secrets/sops.yaml b/secrets/sops.yaml index 8f6bed5..623737c 100644 --- a/secrets/sops.yaml +++ b/secrets/sops.yaml @@ -1,9 +1,6 @@ gandi_key: ENC[AES256_GCM,data:rhsDbf5RyChBWsgyLZoHCr12K1CztsoSitGNJbqqXlGhvYIP47cIXO8gCiEDOxhhC+gKp5Zc5biHUZ6Kf9vkV64X9SHoyw==,iv:WU+tuNpU8tlg6utPfah/EU9PrrO02SgJ1Fi07oxUjZI=,tag:9EYL9qX8DCy5U6IC7gP/eg==,type:str] wireguard_private_key: ENC[AES256_GCM,data:Fk3ZYyj51iSC0q7gQKY9kyg+kPHDJJJOYLiKyIuB2aDbI5yy8pggGyRBjtY=,iv:RQa34Irb93NlOCnpH7oEzDjJ30qlzMTAiosUsZYreqQ=,tag:0UFrh55JHSlJvzDtw7A60w==,type:str] wireguard_public_key: ENC[AES256_GCM,data:4ETVdAeLrqwPh7LZGN6wounajnh8bD9zdq4GWMCdSOJB6Z5ZA4iNHFKPU0k=,iv:RPKRI6A8sOmn22OdVrgl2RpbKGdfkrDdExlRd2QT/Wg=,tag:68cWti2y7f99GFHVYH1rtQ==,type:str] -github_password: ENC[AES256_GCM,data:2Q27cc0cqsWFt/lBNUApWPVRQaXi7uZ3UEn051G/Ar8lZs9zTYYWrg==,iv:s81MlK8u7QzP1azsNw2CtKouJqe/pAHZ7wy5aCWEEuI=,tag:Lf9o6RbLdsQ7ZYCMdVXglQ==,type:str] -smtp_password: ENC[AES256_GCM,data:h1K973qeehIIATdoqFhrLiY7XiU=,iv:ltrsG9KZ8rQuSJXNXswMnbIW/N8+CGbRmiTiENzcGTM=,tag:mD/VpM1FqZaiwksWQpAAog==,type:str] -forgejo-admin-password: ENC[AES256_GCM,data:FuDfqjeQ2T5KcOO1BQ==,iv:ueX7XjbiChuwfYm1B/MJvJaYdWbCmoIs91lj9h9uFYE=,tag:qUszDTRZklwSKrS0PpJhTA==,type:str] sops: age: - recipient: age1jeyw96795qu52swmtkjqgr2w3g4vxc43ckc5r4hlwpje23ptnfwsheah0s @@ -33,7 +30,7 @@ sops: OU8yT0cvcnZMMXphMFVHSXpHNjc4dEkKyXiwholsJthB9O7onb0buF6qHNVNZA3s A2+HSl5P0HCyaZhDIDBFdaUL2r0CHKOPCN3Lrd5+Rirnx48RnDxwBA== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-09-23T11:21:30Z" - mac: ENC[AES256_GCM,data:/bLDPC0lRZhs/KY3wQ+nEapiIaMjjWCFUVQLgojiGfKvp7Cp7XmyGaHx1GbcxVSbh67TxjlbojEtno6QVtbfT64gFFq6X5Y96S1UCLBgTzsbn7c8NKzXvf3viUPgf8zZJDnKT2nzq6p3FVt+ZNcheZfpBUO1WmXadEbmCNGMR6A=,iv:BAh9rLxGcfNt0xrwgJDe9edLaAHoRFFSb0nnlbH6FMQ=,tag:2f3L7mQ+on/3wy64nhCC/Q==,type:str] + lastmodified: "2025-09-13T19:07:35Z" + mac: ENC[AES256_GCM,data:aQy8wXhipZtFjAGvHd4+M1wj18vIQNOw2gRvjtcCpvsnD35CDHPNPC2taH9p8Dj3zDta+2L+GP7mwsxKyU/jMKQrgVmLb0A2ConBx0IcuAhs1xI6E9lW2zGiQg6eWllQvvFispakc1mT1f763wQRUnsWif/GvNCluBybm0TPjbE=,iv:tFYEFMHear3tI6VTXrvyEJB0jIrmXzK1j7p7R0uRQEo=,tag:uEeJoaaF14YYQSWliZctgw==,type:str] unencrypted_suffix: _unencrypted version: 3.10.2