My NixOS config Part 3: Flake-Parts Crusaders nix.ladas552.me
hjem nix nixos impermanence flake-parts nvfetcher niri noctalia

try to expose sites with caddy

Ladas552 06b2e592 0034aa6b

+21 -68
-50
modules/homeBrew/chawan.nix
··· 1 - { 2 - flake.modules.hjem.chawan-brew = 3 - { 4 - config, 5 - lib, 6 - pkgs, 7 - ... 8 - }: 9 - let 10 - inherit (lib.modules) mkIf; 11 - inherit (lib.options) mkOption mkEnableOption mkPackageOption; 12 - 13 - toml = pkgs.formats.toml { }; 14 - 15 - cfg = config.rum.programs.chawan; 16 - in 17 - { 18 - options.rum.programs.chawan = { 19 - enable = mkEnableOption "chawan"; 20 - 21 - package = mkPackageOption pkgs "chawan" { nullable = true; }; 22 - 23 - settings = mkOption { 24 - type = toml.type; 25 - default = { }; 26 - example = { 27 - buffer = { 28 - images = true; 29 - autofocus = true; 30 - }; 31 - page."C-k" = "() => pager.load('ddg:')"; 32 - }; 33 - description = '' 34 - Configuration written to {file}`$XDG_CONFIG_HOME/chawan/config.toml`. 35 - Please reference [chawan's documentation] for config options. 36 - 37 - [chawan's documentation]: https://git.sr.ht/~bptato/chawan/tree/master/doc/config.md 38 - ''; 39 - }; 40 - }; 41 - 42 - config = mkIf cfg.enable { 43 - packages = mkIf (cfg.package != null) [ cfg.package ]; 44 - xdg.config.files."chawan/config.toml" = mkIf (cfg.settings != { }) { 45 - source = toml.generate "chawan-config.toml" cfg.settings; 46 - }; 47 - }; 48 - }; 49 - 50 - }
-1
modules/homeBrew/default.nix
··· 7 7 syncthing-brew 8 8 userDirs-brew 9 9 imv-brew 10 - chawan-brew 11 10 ]; 12 11 }
+21 -16
modules/hosts/NixWool/nixwool.nix
··· 41 41 globalConfig = '' 42 42 email me@ladas552.me 43 43 ''; 44 - # virtualHosts = { 45 - # "blog.ladas552.me" = { 46 - # extraConfig = '' 47 - # handle { 48 - # reverse_proxy http://127.0.0.1:1313 49 - # } 50 - # ''; 51 - # }; 52 - # "nix.ladas552.me" = { 53 - # extraConfig = '' 54 - # handle { 55 - # reverse_proxy http://127.0.0.1:3131 56 - # } 57 - # ''; 58 - # }; 59 - # }; 44 + virtualHosts = { 45 + "blog.ladas552.me" = { 46 + extraConfig = '' 47 + handle { 48 + reverse_proxy http://127.0.0.1:1313 49 + } 50 + root * /home/ladas552/sites/blog/public 51 + encode gzip 52 + ''; 53 + }; 54 + "nix.ladas552.me" = { 55 + extraConfig = '' 56 + handle { 57 + reverse_proxy http://127.0.0.1:3131 58 + } 59 + root * /home/ladas552/sites/nix/public 60 + encode gzip 61 + ''; 62 + }; 63 + }; 60 64 }; 61 65 62 66 # ZFS needs it ··· 84 88 ]; 85 89 86 90 custom.imp.home.directories = [ 91 + "sites" 87 92 ]; 88 93 }; 89 94 homeManager.NixWool = {
-1
modules/userModules/chawan.nix
··· 45 45 in 46 46 { 47 47 hjem.chawan = { 48 - # from https://github.com/snugnug/hjem-rum/pull/162 49 48 inherit custom; 50 49 rum.programs.chawan = config-chawan; 51 50 };