diff --git a/config/instances/config/hledger.nix b/config/instances/config/hledger.nix new file mode 100755 index 0000000..50a82e1 --- /dev/null +++ b/config/instances/config/hledger.nix @@ -0,0 +1,18 @@ +{ instancesFunctions }: +let + inherit (instancesFunctions) + dummy + ; + hledgerLabel = "Hledger"; + hledgerName = "hledger"; +in +{ + label = hledgerLabel; + name = hledgerName; + paths = { + path0 = "/mnt/media/storage/${hledgerLabel}"; + }; + ports = { + port0 = 5000; + }; +} diff --git a/home/modules/cli/fun/aniCli/default.nix b/home/modules/cli/fun/aniCli/default.nix new file mode 100755 index 0000000..bd02397 --- /dev/null +++ b/home/modules/cli/fun/aniCli/default.nix @@ -0,0 +1,11 @@ +{ + pkgs, + ... +}: +{ + home.packages = builtins.attrValues { + inherit (pkgs) + ani-cli + ; + }; +} diff --git a/home/modules/cli/fun/default.nix b/home/modules/cli/fun/default.nix new file mode 100755 index 0000000..f106bc5 --- /dev/null +++ b/home/modules/cli/fun/default.nix @@ -0,0 +1,10 @@ +let + content = builtins.readDir ./.; + + dirContent = builtins.filter (n: content.${n} == "directory") (builtins.attrNames content); + + importList = map (name: ./. + "/${name}") dirContent; +in +{ + imports = importList; +} diff --git a/home/modules/cli/utilities/fastFetch/config/settings.nix b/home/modules/cli/fun/fastFetch/config/settings.nix similarity index 100% rename from home/modules/cli/utilities/fastFetch/config/settings.nix rename to home/modules/cli/fun/fastFetch/config/settings.nix diff --git a/home/modules/cli/utilities/fastFetch/default.nix b/home/modules/cli/fun/fastFetch/default.nix similarity index 100% rename from home/modules/cli/utilities/fastFetch/default.nix rename to home/modules/cli/fun/fastFetch/default.nix diff --git a/home/modules/cli/utilities/libgenCli/default.nix b/home/modules/cli/fun/libgenCli/default.nix similarity index 100% rename from home/modules/cli/utilities/libgenCli/default.nix rename to home/modules/cli/fun/libgenCli/default.nix diff --git a/home/modules/cli/utilities/nyanCat/default.nix b/home/modules/cli/fun/nyanCat/default.nix similarity index 100% rename from home/modules/cli/utilities/nyanCat/default.nix rename to home/modules/cli/fun/nyanCat/default.nix diff --git a/home/modules/cli/utilities/yaBridge/default.nix b/home/modules/cli/fun/yaBridge/default.nix similarity index 100% rename from home/modules/cli/utilities/yaBridge/default.nix rename to home/modules/cli/fun/yaBridge/default.nix diff --git a/home/modules/cli/utilities/yt-dlp/config/extraConfig.nix b/home/modules/cli/fun/yt-dlp/config/extraConfig.nix similarity index 100% rename from home/modules/cli/utilities/yt-dlp/config/extraConfig.nix rename to home/modules/cli/fun/yt-dlp/config/extraConfig.nix diff --git a/home/modules/cli/utilities/yt-dlp/config/settings.nix b/home/modules/cli/fun/yt-dlp/config/settings.nix similarity index 100% rename from home/modules/cli/utilities/yt-dlp/config/settings.nix rename to home/modules/cli/fun/yt-dlp/config/settings.nix diff --git a/home/modules/cli/utilities/yt-dlp/default.nix b/home/modules/cli/fun/yt-dlp/default.nix similarity index 100% rename from home/modules/cli/utilities/yt-dlp/default.nix rename to home/modules/cli/fun/yt-dlp/default.nix diff --git a/home/modules/gui/apps/browsers/firefox/config/bookmarks/config/flake/selfHosted.nix b/home/modules/gui/apps/browsers/firefox/config/bookmarks/config/flake/selfHosted.nix index 7029de9..ec0a9ae 100755 --- a/home/modules/gui/apps/browsers/firefox/config/bookmarks/config/flake/selfHosted.nix +++ b/home/modules/gui/apps/browsers/firefox/config/bookmarks/config/flake/selfHosted.nix @@ -64,6 +64,16 @@ in ]; keyword = instances.forgejo.label; } + { + name = instances.hledger.label; + url = "http://localhost.${builtins.toString instances.hledger.ports.port0}"; + tags = [ + instances.hledger.name + "hledger" + "finances" + ]; + keyword = instances.hledger.label; + } { name = "${instances.jellyfin.label} (Internet)"; url = "https://${instances.jellyfin.name}.${instances.web.domains.url0}"; @@ -78,7 +88,7 @@ in } { name = instances.mastodon.label; - url = "https://${instances.web.domains.url1}"; + url = "https://${instances.mastodon.subdomain}.${instances.web.domains.url3}"; tags = [ instances.mastodon.name "mast" @@ -143,7 +153,7 @@ in } { name = instances.peertube.label; - url = "https://${instances.peertube.subdomain}.${instances.web.domains.url1}"; + url = "https://${instances.peertube.subdomain}.${instances.web.domains.url3}"; tags = [ instances.peertube.name "peer" diff --git a/home/modules/gui/desktop/hyprland/config/windowrulev2.nix b/home/modules/gui/desktop/hyprland/config/windowrulev2.nix index 0af2065..b15d025 100755 --- a/home/modules/gui/desktop/hyprland/config/windowrulev2.nix +++ b/home/modules/gui/desktop/hyprland/config/windowrulev2.nix @@ -20,6 +20,7 @@ let kdenlive = "(org.kde.kdenlive)"; shotcut = "(shotcut)"; scrcpy = "(.scrcpy-wrapped)"; + battle = "(.*Battle.net.*)"; maxsizeWindows = [ "maxsize 720 400, class:^${blueman}$" @@ -34,6 +35,8 @@ let "maxsize 720 400, title:^${picture}$" "maxsize 720 400, title:^${save}$" "maxsize 720 400, title:^${discord-popout}$" + "maxsize 1280 720, title:^${battle}$" + "minsize 1280 720, title:^${battle}$" ]; floatWindows = builtins.map (x: "float, " + x) [ @@ -50,6 +53,7 @@ let "title:^(${discord-popout})$" "title:^${bitwarden}$" "title:^${save}$" + "title:^${battle}$" ]; pinWindows = builtins.map (x: "pin, " + x) [ diff --git a/nixos/default.nix b/nixos/default.nix index 5cfa623..ae32b8f 100755 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -60,6 +60,7 @@ in inherit (modules) syncthing ollama + hledger # plasma # sddm ; diff --git a/nixos/modules/environment.nix b/nixos/modules/environment.nix index d4202bc..6af7bea 100755 --- a/nixos/modules/environment.nix +++ b/nixos/modules/environment.nix @@ -5,7 +5,7 @@ }: { environment = { - # enableAllTerminfo = true; + enableAllTerminfo = true; systemPackages = builtins.attrValues { inherit (pkgs) git diff --git a/nixos/modules/hledger.nix b/nixos/modules/hledger.nix new file mode 100755 index 0000000..ed947f1 --- /dev/null +++ b/nixos/modules/hledger.nix @@ -0,0 +1,72 @@ +{ + flake, + pkgs, + ... +}: +let + inherit (flake.config.machines.devices) + server + ; + inherit (flake.config.services.instances) + hledger + web + ; + service = hledger; + localhost = web.localhost.address0; +in +{ + services = { + hledger-web = { + enable = true; + host = localhost; + # baseUrl = "https://${host}"; + stateDir = service.paths.path0; + port = service.ports.port0; + journalFiles = [ + ".hledger.journal" + ]; + allow = "edit"; + }; + }; + + environment = { + systemPackages = builtins.attrValues { + inherit (pkgs) + hledger + hledger-ui + ; + }; + }; + + users = { + users.${service.name} = { + isSystemUser = true; + group = service.name; + home = service.paths.path0; + }; + groups.${service.name} = { }; + }; + + fileSystems."/var/lib/${service.name}" = { + device = service.paths.path0; + fsType = "none"; + options = [ + "bind" + ]; + depends = [ + server.storage0.mount + ]; + }; + + systemd.tmpfiles.rules = [ + "Z ${service.paths.path0} 0755 ${service.name} ${service.name} -" + ]; + + networking = { + firewall = { + allowedTCPPorts = [ + service.ports.port0 + ]; + }; + }; +} diff --git a/nixos/modules/services/acme.nix b/nixos/modules/services/acme.nix index 2958efa..0ddb5c4 100755 --- a/nixos/modules/services/acme.nix +++ b/nixos/modules/services/acme.nix @@ -38,7 +38,6 @@ in value = dnsConfig; }) [ - "nextcloud" "jellyfin" "minecraft" "ollama" @@ -46,17 +45,6 @@ in "vaultwarden" ] ) - ++ (map - (service: { - name = "${instanceName service}.${domain1}"; - value = dnsConfig; - }) - [ - "nextcloud" - "matrix" - "owncast" - ] - ) ++ (map (service: { name = "${instanceName service}.${domain3}"; diff --git a/profiles/user0/configs/server.nix b/profiles/user0/configs/server.nix index 6ed7e0e..f0a02a7 100755 --- a/profiles/user0/configs/server.nix +++ b/profiles/user0/configs/server.nix @@ -5,7 +5,7 @@ let ; moduleImports = map (module: self.homeModules.${module}) [ - "cli" + "server" ]; in {