❄️ my cosy setup powered by nix

fawni.org :3

Diogo f525e484 2065a4f2

Changed files
+45 -2
home
diogo
programs
hosts
tulip
modules
nixos
services
+5
flake.nix
··· 68 68 repo = "zen-browser-flake"; 69 69 inputs.nixpkgs.follows = "nixpkgs"; 70 70 }; 71 + 72 + fawni = { 73 + type = "git"; 74 + url = "https://codeberg.org/fawni/fawni.git"; 75 + }; 71 76 }; 72 77 73 78 outputs =
+1 -1
home/diogo/programs/zen.nix
··· 154 154 "Porkbun" = { 155 155 id = "7df1ae5e-946d-4b19-bc23-72b990a3d2aa"; 156 156 workspace = spaces."Me".id; 157 - url = "https://porkbun.com"; 157 + url = "https://porkbun.com/account/domainsSpeedy"; 158 158 position = 106; 159 159 isEssential = false; 160 160 };
+6 -1
hosts/tulip/default.nix
··· 5 5 6 6 sys = { 7 7 profiles.headless.enable = true; 8 - services = { }; 8 + services = { 9 + caddy = { 10 + enable = true; 11 + domain = "fawni.org"; 12 + }; 13 + }; 9 14 }; 10 15 11 16 system.stateVersion = "25.05";
+33
modules/nixos/services/fawni.nix
··· 1 + { 2 + lib, 3 + self, 4 + config, 5 + inputs, 6 + ... 7 + }: 8 + let 9 + inherit (lib) mkIf; 10 + inherit (self.lib) mkServiceOption; 11 + 12 + cfg = config.sys.services.fawni; 13 + in 14 + { 15 + imports = [ 16 + inputs.fawni.nixosModules.default 17 + ]; 18 + 19 + options.sys.services.fawni = mkServiceOption "fawni" { 20 + domain = "fawni.org"; 21 + }; 22 + 23 + config = mkIf cfg.enable { 24 + services = { 25 + fawni.enable = true; 26 + 27 + caddy.virtualHosts.fawni.serverAliases = [ 28 + cfg.domain 29 + "www.${cfg.domain}" 30 + ]; 31 + }; 32 + }; 33 + }