From 90c13a072887e0c641103d8fa8b96f1cd114d452 Mon Sep 17 00:00:00 2001 From: fwastring Date: Tue, 7 Oct 2025 14:33:57 +0200 Subject: [PATCH] added wishlist and more --- flake.lock | 50 +++++++++++++--- flake.nix | 17 +++++- maskiner/core/configuration.nix | 12 ++-- maskiner/node/configuration.nix | 6 ++ moduler/hyprland.nix | 3 + moduler/oh-my-posh.nix | 38 ++++++------- moduler/programs.nix | 2 + moduler/services/wishlist/default.nix | 82 +++++++++++++++++++++++++++ 8 files changed, 176 insertions(+), 34 deletions(-) create mode 100644 moduler/services/wishlist/default.nix diff --git a/flake.lock b/flake.lock index a1082ed..510acbd 100644 --- a/flake.lock +++ b/flake.lock @@ -118,6 +118,25 @@ "type": "github" } }, + "confetti": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1759829282, + "narHash": "sha256-mg+XLmTnQr3o8CT88P1zsKSXRBWZyjF/n686HZp9Els=", + "ref": "main", + "rev": "cb6fa4450ae8e3e8920b307ea2b5684b4567e049", + "revCount": 1, + "type": "git", + "url": "https://git.wastring.com/fw/confetti" + }, + "original": { + "ref": "main", + "type": "git", + "url": "https://git.wastring.com/fw/confetti" + } + }, "firefox-gnome-theme": { "flake": false, "locked": { @@ -473,7 +492,7 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "pre-commit-hooks": "pre-commit-hooks", "systems": "systems", "xdph": "xdph" @@ -691,7 +710,7 @@ "git-hooks": "git-hooks", "hercules-ci-effects": "hercules-ci-effects", "neovim-src": "neovim-src", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -741,6 +760,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1759733170, + "narHash": "sha256-TXnlsVb5Z8HXZ6mZoeOAIwxmvGHp1g4Dw89eLvIwKVI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8913c168d1c56dc49a7718685968f38752171c3b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1757487488, "narHash": "sha256-zwE/e7CuPJUWKdvvTCB7iunV4E/+G0lKfv4kk/5Izdg=", @@ -756,7 +791,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1758029226, "narHash": "sha256-TjqVmbpoCqWywY9xIZLTf6ANFvDCXdctCjoYuYPYdMI=", @@ -772,7 +807,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1758035966, "narHash": "sha256-qqIJ3yxPiB0ZQTT9//nFGQYn8X/PBoJbofA7hRKZnmE=", @@ -788,7 +823,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1744536153, "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", @@ -855,11 +890,12 @@ "root": { "inputs": { "catppuccin": "catppuccin", + "confetti": "confetti", "home-manager": "home-manager", "hyprland": "hyprland", "minimal-tmux": "minimal-tmux", "neovim-nightly-overlay": "neovim-nightly-overlay", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "sops-nix": "sops-nix", "stylix": "stylix", "typsite": "typsite" @@ -867,7 +903,7 @@ }, "rust-overlay": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1749004659, diff --git a/flake.nix b/flake.nix index ba30575..58ff06b 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,8 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - catppuccin.url = "github:catppuccin/nix"; + catppuccin.url = "github:catppuccin/nix"; + confetti.url = "git+https://git.wastring.com/fw/confetti?ref=main"; # Neovim neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; @@ -42,6 +43,7 @@ stylix, sops-nix, catppuccin, + confetti, ... }@inputs: let @@ -83,7 +85,18 @@ stylix.nixosModules.stylix home-manager.nixosModules.home-manager sops-nix.nixosModules.sops - catppuccin.nixosModules.catppuccin + catppuccin.nixosModules.catppuccin + ( + { pkgs, ... }: + { + environment.systemPackages = [ + confetti.packages.${pkgs.system}.confetti + # or: confetti.packages.${pkgs.system}.default + ]; + + hardware.opengl.enable = true; + } + ) ]; }; archive = nixpkgs.lib.nixosSystem { diff --git a/maskiner/core/configuration.nix b/maskiner/core/configuration.nix index a34a024..89b4cbe 100644 --- a/maskiner/core/configuration.nix +++ b/maskiner/core/configuration.nix @@ -10,7 +10,7 @@ ... }: let - # btusb = pkgs.callPackage ../../moduler/btusb.nix { inherit (config.boot.kernelPackages) kernel; }; + btusb = pkgs.callPackage ../../moduler/btusb.nix { inherit (config.boot.kernelPackages) kernel; }; in { imports = [ @@ -73,11 +73,11 @@ in }; boot.kernelPackages = pkgs.linuxPackages_latest; - # boot.extraModulePackages = [ - # (btusb.overrideAttrs (_: { - # patches = [ ../../moduler/btusb-add-mt7925.patch ]; - # })) - # ]; + boot.extraModulePackages = [ + (btusb.overrideAttrs (_: { + patches = [ ../../moduler/btusb-add-mt7925.patch ]; + })) + ]; networking.hostName = myhostname; diff --git a/maskiner/node/configuration.nix b/maskiner/node/configuration.nix index 3347c3d..53abd72 100644 --- a/maskiner/node/configuration.nix +++ b/maskiner/node/configuration.nix @@ -29,6 +29,7 @@ in ( modulesDirectory + /services/mpd ) ( modulesDirectory + /services/actual ) ( modulesDirectory + /services/forgejo ) + ( modulesDirectory + /services/wishlist ) ]; sops.defaultSopsFile = ../../secrets/sops.yaml; @@ -42,6 +43,11 @@ in mpd = { enable = true; }; + wishlist = { + enable = true; + host = "127.0.0.1"; + domain = "wish.wastring.com"; + }; forgejo = { enable = true; diff --git a/moduler/hyprland.nix b/moduler/hyprland.nix index 01b6e59..f9eb6f7 100644 --- a/moduler/hyprland.nix +++ b/moduler/hyprland.nix @@ -268,6 +268,9 @@ in # Screencapture "$mod SHIFT, s, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png" + + # special + "SUPER+SHIFT, code:201, exec, confetti" ]; bindm = [ diff --git a/moduler/oh-my-posh.nix b/moduler/oh-my-posh.nix index 7231778..9cae598 100644 --- a/moduler/oh-my-posh.nix +++ b/moduler/oh-my-posh.nix @@ -6,29 +6,29 @@ settings = { "$schema"= "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json"; # Macchiato - # "palette" = { - # "os"= "#ACB0BE"; - # "closer"= "p:os"; - # "pink"= "#F5BDE6"; - # "lavender"= "#B7BDF8"; - # "blue"= "#8aadf4"; - # "peach" = "#f5a97f"; - # "red" = "#ed8796"; - # "green" = "#a6da95"; - # "mauve" = "#c6a0f6"; - # }; - # Latte "palette" = { "os"= "#ACB0BE"; "closer"= "p:os"; - "pink" = "#ea76cb"; - "lavender" = "#7287FD"; - "blue" = "#1e66f5"; - "peach" = "#fe640b"; - "red" = "#d20f39"; - "green" = "#40a02b"; - "mauve" = "#8839ef"; + "pink"= "#F5BDE6"; + "lavender"= "#B7BDF8"; + "blue"= "#8aadf4"; + "peach" = "#f5a97f"; + "red" = "#ed8796"; + "green" = "#a6da95"; + "mauve" = "#c6a0f6"; }; + # Latte + # "palette" = { + # "os"= "#ACB0BE"; + # "closer"= "p:os"; + # "pink" = "#ea76cb"; + # "lavender" = "#7287FD"; + # "blue" = "#1e66f5"; + # "peach" = "#fe640b"; + # "red" = "#d20f39"; + # "green" = "#40a02b"; + # "mauve" = "#8839ef"; + # }; "blocks"= [ { "alignment"= "left"; diff --git a/moduler/programs.nix b/moduler/programs.nix index 6886ced..259a575 100644 --- a/moduler/programs.nix +++ b/moduler/programs.nix @@ -38,6 +38,7 @@ freecad-wayland kdePackages.okular angryipscanner + vlc # TUI mpc @@ -58,6 +59,7 @@ devour # Swallow windows caligula # Burn ISOs ptouch-print + xev # Transforms yt-dlp diff --git a/moduler/services/wishlist/default.nix b/moduler/services/wishlist/default.nix new file mode 100644 index 0000000..d63e086 --- /dev/null +++ b/moduler/services/wishlist/default.nix @@ -0,0 +1,82 @@ +{ + lib, + config, + ... +}: +with lib; + +let + +in +{ + options = { + wishlist = { + enable = mkEnableOption "enables wishlist"; + port = lib.mkOption { + type = lib.types.int; + default = 5434; + description = "The port wishlist listens on."; + }; + host = mkOption { + type = types.str; + defaultText = literalExpression "127.0.0.1"; + description = "The hostname that wishlist binds to"; + }; + domain = mkOption { + type = types.str; + description = "Domain name for wishlist to be served on."; + }; + }; + }; + + config = mkMerge [ + (mkIf config.wishlist.enable { + systemd.tmpfiles.settings."wishlist-dirs" = { + "/var/wishlist".d = { + mode = "0755"; + user = "root"; + group = "root"; + }; + "/var/wishlist/uploads".d = { + mode = "0755"; + user = "root"; + group = "root"; + }; + "/var/wishlist/data".d = { + mode = "0755"; + user = "root"; + group = "root"; + }; + }; + + virtualisation.oci-containers = { + backend = "podman"; + containers = { + wishlist = { + image = "ghcr.io/cmintey/wishlist:latest"; + volumes = [ + "/var/wishlist/uploads:/usr/src/app/uploads" + "/var/wishlist/data:/usr/src/app/data" + ]; + ports = [ "${config.wishlist.host}:${toString config.wishlist.port}:3280" ]; + environment = { + ORIGIN = "https://${config.wishlist.domain}"; + TOKEN_TIME = "72"; + }; + }; + }; + }; + + # nginx reverse proxy + services.nginx.virtualHosts."${config.wishlist.domain}" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://${config.wishlist.host}:${toString config.wishlist.port}"; + proxyWebsockets = true; + extraConfig = "proxy_ssl_server_name on;" + "proxy_pass_header Authorization;"; + }; + }; + }) + ]; +}