From 32a079507c063756b617a274d21f48a7166b23be Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Fri, 12 Sep 2025 14:44:09 +0200 Subject: [PATCH] remove unused Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- flake.lock | 258 +++++----------------------- flake.nix | 12 -- home/scripts/system/default.nix | 104 +---------- home/system/hyprland/default.nix | 1 - home/system/hyprland/hyprspace.nix | 24 --- hosts/server/configuration.nix | 3 - server-modules/eleakxir.nix | 46 ----- server-modules/nextcloud.nix | 57 ------ server-modules/search-nixos-api.nix | 17 -- 9 files changed, 47 insertions(+), 475 deletions(-) delete mode 100644 home/system/hyprland/hyprspace.nix delete mode 100644 server-modules/eleakxir.nix delete mode 100644 server-modules/nextcloud.nix delete mode 100644 server-modules/search-nixos-api.nix diff --git a/flake.lock b/flake.lock index 30ddae2..0699578 100644 --- a/flake.lock +++ b/flake.lock @@ -126,27 +126,6 @@ "type": "github" } }, - "eleakxir": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems" - }, - "locked": { - "lastModified": 1756842568, - "narHash": "sha256-sNtjvv7UEPRUAjhUg7WFlH4Q+KYVivEtk5L7nHGz6jQ=", - "owner": "anotherhadi", - "repo": "eleakxir-temp", - "rev": "91bb6364af9d0aa74c476e6ebf1ad36007a5f8f1", - "type": "github" - }, - "original": { - "owner": "anotherhadi", - "repo": "eleakxir-temp", - "type": "github" - } - }, "firefox-gnome-theme": { "flake": false, "locked": { @@ -271,7 +250,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1731533236, @@ -289,7 +268,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_8" + "systems": "systems_6" }, "locked": { "lastModified": 1731533236, @@ -401,27 +380,6 @@ "type": "github" } }, - "home-manager_3": { - "inputs": { - "nixpkgs": [ - "zen-browser", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1752603129, - "narHash": "sha256-S+wmHhwNQ5Ru689L2Gu8n1OD6s9eU9n9mD827JNR+kw=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "e8c19a3cec2814c754f031ab3ae7316b64da085b", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, "hyprcursor": { "inputs": { "hyprlang": [ @@ -492,7 +450,7 @@ "hyprwayland-scanner": "hyprwayland-scanner", "nixpkgs": "nixpkgs_2", "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems_2", + "systems": "systems", "xdph": "xdph" }, "locked": { @@ -653,27 +611,6 @@ "type": "github" } }, - "hyprspace": { - "inputs": { - "hyprland": [ - "hyprland" - ], - "systems": "systems_4" - }, - "locked": { - "lastModified": 1754887838, - "narHash": "sha256-npC+H+Wl60EdrV75sjqm+bbbLbKgCCGn4ALSM0B2OWA=", - "owner": "KZDKM", - "repo": "Hyprspace", - "rev": "2b61fd2115262243b03aa9afe8dfd8a78e71636c", - "type": "github" - }, - "original": { - "owner": "KZDKM", - "repo": "Hyprspace", - "type": "github" - } - }, "hyprutils": { "inputs": { "nixpkgs": [ @@ -827,22 +764,6 @@ } }, "nixpkgs_10": { - "locked": { - "lastModified": 1756819007, - "narHash": "sha256-12V64nKG/O/guxSYnr5/nq1EfqwJCdD2+cIGmhz3nrE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "aaff8c16d7fc04991cac6245bee1baa31f72b1e1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_11": { "locked": { "lastModified": 1755027561, "narHash": "sha256-IVft239Bc8p8Dtvf7UAACMG5P3ZV+3/aO28gXpGtMXI=", @@ -858,22 +779,6 @@ "type": "github" } }, - "nixpkgs_12": { - "locked": { - "lastModified": 1755615617, - "narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "20075955deac2583bb12f07151c2df830ef346b4", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1757487488, @@ -971,22 +876,6 @@ } }, "nixpkgs_8": { - "locked": { - "lastModified": 1743583204, - "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_9": { "locked": { "lastModified": 1757034884, "narHash": "sha256-PgLSZDBEWUHpfTRfFyklmiiLBE1i1aGCtz4eRA3POao=", @@ -1002,6 +891,22 @@ "type": "github" } }, + "nixpkgs_9": { + "locked": { + "lastModified": 1756819007, + "narHash": "sha256-12V64nKG/O/guxSYnr5/nq1EfqwJCdD2+cIGmhz3nrE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "aaff8c16d7fc04991cac6245bee1baa31f72b1e1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "inputs": { "flake-parts": [ @@ -1033,7 +938,7 @@ "flake-parts": "flake-parts_2", "mnw": "mnw", "nixpkgs": "nixpkgs_7", - "systems": "systems_5" + "systems": "systems_3" }, "locked": { "lastModified": 1757397598, @@ -1087,40 +992,18 @@ "root": { "inputs": { "apple-fonts": "apple-fonts", - "eleakxir": "eleakxir", "home-manager": "home-manager", "hyprland": "hyprland", "hyprpanel": "hyprpanel", - "hyprspace": "hyprspace", "nixarr": "nixarr", "nixcord": "nixcord", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_6", "nvf": "nvf", - "search-nixos-api": "search-nixos-api", "sops-nix": "sops-nix", "spicetify-nix": "spicetify-nix", "stylix": "stylix", - "vicinae": "vicinae", - "zen-browser": "zen-browser" - } - }, - "search-nixos-api": { - "inputs": { - "nixpkgs": "nixpkgs_8" - }, - "locked": { - "lastModified": 1757503843, - "narHash": "sha256-1PlbMltB06fMQVIaiHILA/mtTz1JOhV3dS/HbOXsfRw=", - "owner": "anotherhadi", - "repo": "search-nixos-api", - "rev": "e93bd98a13496673f4f2cd248f590c48b05ff8a7", - "type": "github" - }, - "original": { - "owner": "anotherhadi", - "repo": "search-nixos-api", - "type": "github" + "vicinae": "vicinae" } }, "sf-arabic": { @@ -1209,7 +1092,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1757503115, @@ -1230,7 +1113,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_6" + "systems": "systems_4" }, "locked": { "lastModified": 1757219159, @@ -1255,9 +1138,9 @@ "firefox-gnome-theme": "firefox-gnome-theme", "flake-parts": "flake-parts_3", "gnome-shell": "gnome-shell", - "nixpkgs": "nixpkgs_10", + "nixpkgs": "nixpkgs_9", "nur": "nur", - "systems": "systems_7", + "systems": "systems_5", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1279,21 +1162,6 @@ } }, "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -1308,6 +1176,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "systems_3": { "locked": { "lastModified": 1681028828, @@ -1325,16 +1208,16 @@ }, "systems_4": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, @@ -1368,36 +1251,6 @@ "type": "github" } }, - "systems_7": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_8": { - "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": { @@ -1482,7 +1335,7 @@ "vicinae": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_11" + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1757667341, @@ -1574,25 +1427,6 @@ "repo": "xdg-desktop-portal-hyprland", "type": "github" } - }, - "zen-browser": { - "inputs": { - "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_12" - }, - "locked": { - "lastModified": 1757654247, - "narHash": "sha256-Nz0EWw4N05bFZITsBOvQHk2rQ3n+IdPeqIg4R2jQuGM=", - "owner": "0xc000022070", - "repo": "zen-browser-flake", - "rev": "f2e90503e6b847b7b0bd2628d1d15fac1113fb9a", - "type": "github" - }, - "original": { - "owner": "0xc000022070", - "repo": "zen-browser-flake", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 246d638..347bbaa 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,6 @@ hyprpanel.url = "github:Jas-SinghFSU/HyprPanel"; stylix.url = "github:danth/stylix"; apple-fonts.url = "github:Lyndeno/apple-fonts.nix"; - zen-browser.url = "github:0xc000022070/zen-browser-flake"; nixcord.url = "github:kaylorben/nixcord"; sops-nix.url = "github:Mic92/sops-nix"; nixarr.url = "github:rasmus-kirk/nixarr"; @@ -26,15 +25,6 @@ url = "github:Gerg-L/spicetify-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - hyprspace = { - url = "github:KZDKM/Hyprspace"; - inputs.hyprland.follows = "hyprland"; - }; - search-nixos-api.url = "github:anotherhadi/search-nixos-api"; - eleakxir = { - url = "github:anotherhadi/eleakxir-temp"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; outputs = inputs @ {nixpkgs, ...}: { @@ -61,8 +51,6 @@ inputs.stylix.nixosModules.stylix inputs.sops-nix.nixosModules.sops inputs.nixarr.nixosModules.default - inputs.search-nixos-api.nixosModules.search-nixos-api - inputs.eleakxir.nixosModules.eleakxir-backend ./hosts/server/configuration.nix ]; }; diff --git a/home/scripts/system/default.nix b/home/scripts/system/default.nix index 9035632..e9c336b 100644 --- a/home/scripts/system/default.nix +++ b/home/scripts/system/default.nix @@ -2,111 +2,9 @@ #- #- Usefull quick scripts #- -#- - `menu` - Open wofi with drun mode. (wofi) -#- - `powermenu` - Open power dropdown menu. (wofi) -#- - `quickmenu` - Open a dropdown menu with shortcuts and scripts. (wofi) #- - `lock` - Lock the screen. (hyprlock) #- - `powermode-toggle` - Toggle between performance and balanced power mode. (powerprofilesctl) {pkgs, ...}: let - menu = - pkgs.writeShellScriptBin "menu" - # bash - '' - if pgrep wofi; then - pkill wofi - else - wofi -p " Apps" --show drun & - # # Quit when not focused anymore - # sleep 0.2 - # while true; do - # window=$(hyprctl activewindow | grep "wofi") - # if [[ ! $window ]]; then - # pkill wofi - # break - # fi - # sleep 0.2 - # done - fi - ''; - - powermenu = - pkgs.writeShellScriptBin "powermenu" - # bash - '' - if pgrep wofi; then - pkill wofi - # if pgrep tofi; then - # pkill tofi - else - options=( - "󰌾 Lock" - "󰍃 Logout" - " Suspend" - "󰑐 Reboot" - "󰿅 Shutdown" - ) - - selected=$(printf '%s\n' "''${options[@]}" | wofi -p " Powermenu" --dmenu) - # selected=$(printf '%s\n' "''${options[@]}" | tofi --prompt-text "> ") - selected=''${selected:2} - - case $selected in - "Lock") - ${pkgs.hyprlock}/bin/hyprlock - ;; - "Logout") - hyprctl dispatch exit - ;; - "Suspend") - systemctl suspend - ;; - "Reboot") - systemctl reboot - ;; - "Shutdown") - systemctl poweroff - ;; - esac - fi - ''; - - quickmenu = - pkgs.writeShellScriptBin "quickmenu" - # bash - '' - if pgrep wofi; then - pkill wofi - # if pgrep tofi; then - # pkill tofi - else - options=( - "󰖔 Night-shift" - " Nixy" - "󰈊 Hyprpicker" - "󰖂 Toggle VPN" - ) - - selected=$(printf '%s\n' "''${options[@]}" | wofi -p " Quickmenu" --dmenu) - # selected=$(printf '%s\n' "''${options[@]}" | tofi --prompt-text "> ") - selected=''${selected:2} - - case $selected in - "Night-shift") - night-shift - ;; - "Nixy") - kitty zsh -c nixy - ;; - "Hyprpicker") - sleep 0.2 && ${pkgs.hyprpicker}/bin/hyprpicker -a - ;; - "Toggle VPN") - openvpn-toggle - ;; - esac - fi - ''; - lock = pkgs.writeShellScriptBin "lock" # bash @@ -127,4 +25,4 @@ ${pkgs.swayosd}/bin/swayosd-client --custom-message="Powermode set to performance" --custom-icon="emblem-default" fi ''; -in {home.packages = [menu powermenu lock quickmenu powermode-toggle];} +in {home.packages = [lock powermode-toggle];} diff --git a/home/system/hyprland/default.nix b/home/system/hyprland/default.nix index 9dd3cb1..20ce875 100644 --- a/home/system/hyprland/default.nix +++ b/home/system/hyprland/default.nix @@ -20,7 +20,6 @@ in { ./bindings.nix ./polkitagent.nix ./keyboard-backlight.nix # CHANGEME: This is for omen laptop only - # ./hyprspace.nix # FIXME: Broken for now ]; home.packages = with pkgs; [ diff --git a/home/system/hyprland/hyprspace.nix b/home/system/hyprland/hyprspace.nix deleted file mode 100644 index a530a5e..0000000 --- a/home/system/hyprland/hyprspace.nix +++ /dev/null @@ -1,24 +0,0 @@ -# Hyprspace is a hyprland plugin that provides a workspaces overview (three-finger swipe up) and a workspace switcher (three-finger down). -{ - inputs, - pkgs, - ... -}: { - wayland.windowManager.hyprland = { - plugins = [inputs.hyprspace.packages.${pkgs.system}.Hyprspace]; - settings = { - plugin = { - overview = { - centerAligned = true; - hideTopLayers = true; - hideOverlayLayers = true; - showNewWorkspace = true; - exitOnClick = true; - exitOnSwitch = true; - drawActiveWorkspace = true; - autoDrag = false; - }; - }; - }; - }; -} diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index eac59a6..516eb17 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -14,13 +14,10 @@ ../../server-modules/bitwarden.nix ../../server-modules/firewall.nix ../../server-modules/nginx.nix - ../../server-modules/nextcloud.nix ../../server-modules/glance.nix ../../server-modules/adguardhome.nix ../../server-modules/arr.nix ../../server-modules/mealie.nix - ../../server-modules/search-nixos-api.nix - ../../server-modules/eleakxir.nix # You should let those lines as is ./hardware-configuration.nix diff --git a/server-modules/eleakxir.nix b/server-modules/eleakxir.nix deleted file mode 100644 index c6d9b7e..0000000 --- a/server-modules/eleakxir.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - inputs, - config, - pkgs, - ... -}: { - services.eleakxir-backend = { - enable = true; - port = 8080; - leakPath = "/var/lib/eleakxir-backend/leaks"; - cachePath = "/var/lib/eleakxir-backend/cache"; - }; - - services.nginx = { - virtualHosts."eleakxir.hadi.diy" = { - useACMEHost = "hadi.diy"; - forceSSL = true; - - root = "${ - inputs.eleakxir.packages.${pkgs.system}.frontend - }/eleakxir-frontend"; - - locations."/api/" = { - proxyPass = "http://127.0.0.1:${toString config.services.eleakxir-backend.port}/"; - extraConfig = '' - # Crucial for SSE: Disable buffering - proxy_buffering off; - proxy_cache off; - proxy_http_version 1.1; - proxy_set_header Connection ""; # Required for HTTP/1.1 persistent connections - proxy_read_timeout 36000s; # Long timeout, adjust as needed. SSE connections are long-lived. - proxy_send_timeout 36000s; # Also important for sending data - - # Your existing rewrite rule (make sure this doesn't cause issues with SSE paths specifically) - rewrite ^/api/(.*) /$1 break; - ''; - }; - - locations."/" = { - extraConfig = '' - try_files $uri $uri/ /index.html =404; # Fallback vers index.html pour les routes SPA - ''; - }; - }; - }; -} diff --git a/server-modules/nextcloud.nix b/server-modules/nextcloud.nix deleted file mode 100644 index 36ac15f..0000000 --- a/server-modules/nextcloud.nix +++ /dev/null @@ -1,57 +0,0 @@ -# Nextcloud is a self-hosted productivity platform that allows you to store and share files, manage calendars, contacts, and more. -{ - pkgs, - config, - ... -}: let - domain = "cloud.hadi.diy"; - adminuser = "hadi"; -in { - services = { - nginx.virtualHosts = { - "${domain}" = { - # DNS-01 challenge - useACMEHost = "hadi.diy"; - forceSSL = true; - }; - }; - nextcloud = { - enable = true; - hostName = domain; - package = pkgs.nextcloud31; - database.createLocally = true; - configureRedis = true; - maxUploadSize = "16G"; - https = true; - autoUpdateApps.enable = true; - settings = { - trusted_domains = [domain]; - default_phone_region = "FR"; - overwriteprotocol = "https"; - }; - extraAppsEnable = true; - # extraApps = with config.services.nextcloud.package.packages.apps; { - # List of apps we want to install and are already packaged in - # https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/nextcloud/packages/nextcloud-apps.json - # inherit calendar contacts notes onlyoffice tasks cookbook qownnotesapi; - # inherit cookbook; - # Custom app example. - # socialsharing_telegram = pkgs.fetchNextcloudApp rec { - # url = - # "https://github.com/nextcloud-releases/socialsharing/releases/download/v3.0.1/socialsharing_telegram-v3.0.1.tar.gz"; - # license = "agpl3"; - # sha256 = "sha256-8XyOslMmzxmX2QsVzYzIJKNw6rVWJ7uDhU1jaKJ0Q8k="; - # }; - # }; - config = { - dbtype = "pgsql"; - adminuser = adminuser; - adminpassFile = config.sops.secrets.nextcloud-pwd.path; - }; - # Suggested by Nextcloud's health check. - phpOptions."opcache.interned_strings_buffer" = "16"; - }; - }; - - sops.secrets.nextcloud-pwd.path = "/etc/nextcloud/pwd.txt"; -} diff --git a/server-modules/search-nixos-api.nix b/server-modules/search-nixos-api.nix deleted file mode 100644 index 4c7f7ea..0000000 --- a/server-modules/search-nixos-api.nix +++ /dev/null @@ -1,17 +0,0 @@ -# Custom NixOS module for the Search NixOS API service -# Check https://search-nixos.hadi.diy -{config, ...}: let - domain = "search-nixos-api.hadi.diy"; -in { - services = { - search-nixos-api = {enable = true;}; - - nginx.virtualHosts."${domain}" = { - useACMEHost = "hadi.diy"; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.services.search-nixos-api.port}/"; - }; - }; - }; -}