From 792c41c296839cffa41965befad37eac1c81e1f9 Mon Sep 17 00:00:00 2001 From: OCbwoy3 Date: Sat, 11 Jan 2025 22:33:49 +0200 Subject: [PATCH] Add new modules and configurations for HyprPanel and related components --- flake.lock | 185 +++++++++++++++++- flake.nix | 4 +- .../default/apps/files/crontab-executable.ts | 3 + hosts/default/configuration.nix | 5 +- hosts/default/other/activate.nix | 11 +- hosts/default/packages.nix | 14 +- modules/home-manager/hyprpanel.nix | 11 ++ modules/nixos/bootloader.nix | 11 ++ modules/nixos/i18n.nix | 5 +- modules/nixos/nixpkgs.nix | 2 + 10 files changed, 242 insertions(+), 9 deletions(-) create mode 100644 modules/home-manager/hyprpanel.nix diff --git a/flake.lock b/flake.lock index d8526f3..fea81ce 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,27 @@ { "nodes": { + "ags": { + "inputs": { + "astal": "astal", + "nixpkgs": [ + "hyprpanel", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1736090999, + "narHash": "sha256-B5CJuHqfJrzPa7tObK0H9669/EClSHpa/P7B9EuvElU=", + "owner": "aylur", + "repo": "ags", + "rev": "5527c3c07d92c11e04e7fd99d58429493dba7e3c", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "ags", + "type": "github" + } + }, "aquamarine": { "inputs": { "hyprutils": [ @@ -33,6 +55,28 @@ "type": "github" } }, + "astal": { + "inputs": { + "nixpkgs": [ + "hyprpanel", + "ags", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1735172721, + "narHash": "sha256-rtEAwGsHSppnkR3Qg3eRJ6Xh/F84IY9CrBBLzYabalY=", + "owner": "aylur", + "repo": "astal", + "rev": "6c84b64efc736e039a8a10774a4a1bf772c37aa2", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "astal", + "type": "github" + } + }, "catppuccin": { "inputs": { "catppuccin-v1_1": "catppuccin-v1_1", @@ -371,6 +415,31 @@ "type": "github" } }, + "hyprland-qt-support": { + "inputs": { + "nixpkgs": [ + "hyprsysteminfo", + "nixpkgs" + ], + "systems": [ + "hyprsysteminfo", + "systems" + ] + }, + "locked": { + "lastModified": 1736374981, + "narHash": "sha256-DI/ZjoOIpKiZSLxAZ406bon68jtfKMlkNrmOSqi86lU=", + "owner": "hyprwm", + "repo": "hyprland-qt-support", + "rev": "d4615b8e40dcdfc11b6020d3e022f8744843a9f8", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-qt-support", + "type": "github" + } + }, "hyprland-qtutils": { "inputs": { "hyprutils": [ @@ -429,6 +498,46 @@ "type": "github" } }, + "hyprpanel": { + "inputs": { + "ags": "ags", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1736593231, + "narHash": "sha256-WVSMaMoLcVqBjLviw3M19Fu+za/jKDrO8p2GeMWlcCc=", + "owner": "Jas-SinghFSU", + "repo": "HyprPanel", + "rev": "db3fa88d18452d87370103af82aec424515c1d3e", + "type": "github" + }, + "original": { + "owner": "Jas-SinghFSU", + "repo": "HyprPanel", + "type": "github" + } + }, + "hyprsysteminfo": { + "inputs": { + "hyprland-qt-support": "hyprland-qt-support", + "hyprutils": "hyprutils_2", + "nixpkgs": "nixpkgs_4", + "systems": "systems_4" + }, + "locked": { + "lastModified": 1736375900, + "narHash": "sha256-AWW2KgHdK2CfRmlYWLWW2GCbPVmRK14IqyzdkrT5fes=", + "owner": "hyprwm", + "repo": "hyprsysteminfo", + "rev": "54ce0e6243eaceef9b3f743cba4ef70ec92a049d", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprsysteminfo", + "type": "github" + } + }, "hyprutils": { "inputs": { "nixpkgs": [ @@ -454,6 +563,31 @@ "type": "github" } }, + "hyprutils_2": { + "inputs": { + "nixpkgs": [ + "hyprsysteminfo", + "nixpkgs" + ], + "systems": [ + "hyprsysteminfo", + "systems" + ] + }, + "locked": { + "lastModified": 1736164519, + "narHash": "sha256-1LimBKvDpBbeX+qW7T240WEyw+DBVpDotZB4JYm8Aps=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "3c895da64b0eb19870142196fa48c07090b441c4", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, "hyprwayland-scanner": { "inputs": { "nixpkgs": [ @@ -620,6 +754,38 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1736344531, + "narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "bffc22eb12172e6db3c5dde9e3e5628f8e3e7912", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1736012469, + "narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1735471104, "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", @@ -688,8 +854,10 @@ "ghostty": "ghostty", "home-manager": "home-manager_2", "hyprland": "hyprland", + "hyprpanel": "hyprpanel", + "hyprsysteminfo": "hyprsysteminfo", "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_5" } }, "systems": { @@ -737,6 +905,21 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, "xdph": { "inputs": { "hyprland-protocols": [ diff --git a/flake.nix b/flake.nix index ba88b7a..2a2ceaa 100644 --- a/flake.nix +++ b/flake.nix @@ -6,8 +6,10 @@ catppuccin.url = "github:catppuccin/nix"; nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1"; hyprland.url = "github:hyprwm/Hyprland"; + hyprsysteminfo.url = "github:hyprwm/hyprsysteminfo"; ghostty.url = "github:ghostty-org/ghostty"; - + hyprpanel.url = "github:Jas-SinghFSU/HyprPanel"; + home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/default/apps/files/crontab-executable.ts b/hosts/default/apps/files/crontab-executable.ts index e12f640..9ce4eff 100644 --- a/hosts/default/apps/files/crontab-executable.ts +++ b/hosts/default/apps/files/crontab-executable.ts @@ -54,6 +54,7 @@ function checkChallengeState() { if (stateDate === today) { if (floorsSurvived < 25) { + /* if (floorsSurvived === 0) { sendReminderNotification(); } else { @@ -62,6 +63,8 @@ function checkChallengeState() { if (hoursLeft <= 4) { sendSpamNotifications(); } + */ + sendReminderNotification(); } } else { sendReminderNotification(); diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index f7e45c0..9302abf 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -12,7 +12,9 @@ ../../modules/nixos/network.nix ../../modules/nixos/programs.nix ./packages.nix + ../../modules/home-manager/hyprpanel.nix ./other/activate.nix + ]; programs.steam = { @@ -91,7 +93,8 @@ warp-terminal prismlauncher # vesktop - legcord + # legcord + equibop kdenlive libsForQt5.qt5ct libsForQt5.lightly diff --git a/hosts/default/other/activate.nix b/hosts/default/other/activate.nix index 2fc8910..5d2c9bb 100644 --- a/hosts/default/other/activate.nix +++ b/hosts/default/other/activate.nix @@ -2,11 +2,20 @@ { + system.nixos = { + distroName = "OCbwoy3"; + extraOSReleaseArgs = { + HOME_URL="https://ocbwoy3.dev/"; + VERSION_CODENAME=""; + NAME="OCbwoy3"; + PRETTY_NAME="OCbwoy3"; + }; + }; + system.activationScripts.installRoblox = { text = '' trap "${pkgs.flatpak}/bin/flatpak install -y https://sober.vinegarhq.org/sober.flatpakref" EXIT ''; }; - } diff --git a/hosts/default/packages.nix b/hosts/default/packages.nix index 1f5e2af..c7eb9d2 100644 --- a/hosts/default/packages.nix +++ b/hosts/default/packages.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ inputs, config, pkgs, ... }: { @@ -7,14 +7,20 @@ noto-fonts-cjk-sans noto-fonts-emoji monaspace + geist-font # nerdfonts + nerd-fonts.geist-mono nerd-fonts.monaspace + nerd-fonts.symbols-only ]; + programs.seahorse.enable = true; + environment.systemPackages = with pkgs; [ - xorg.xkeyboard_config + inputs.hyprsysteminfo.packages.${pkgs.stdenv.hostPlatform.system}.hyprsysteminfo + hyprpanel libxkbcommon - libxkbcommon-x11 + gnupg nix-direnv htop nixpkgs-fmt @@ -35,7 +41,7 @@ qpwgraph wget git - neofetch + fastfetch vscode nodejs bun diff --git a/modules/home-manager/hyprpanel.nix b/modules/home-manager/hyprpanel.nix new file mode 100644 index 0000000..50d5322 --- /dev/null +++ b/modules/home-manager/hyprpanel.nix @@ -0,0 +1,11 @@ +{ inputs, ... }: + +{ + imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ]; + + programs.hyprpanel = { + enable = true; + systemd.enable = true; + overwrite.enable = true; + }; +} diff --git a/modules/nixos/bootloader.nix b/modules/nixos/bootloader.nix index af85b2c..95afeab 100644 --- a/modules/nixos/bootloader.nix +++ b/modules/nixos/bootloader.nix @@ -13,6 +13,17 @@ boot.supportedFilesystems = [ "ntfs" ]; + boot.plymouth = { + enable = true; + }; + + boot.initrd.verbose = false; + boot.kernelParams = [ + # "quiet" + "splash" + "boot.shell_on_fail" + ]; + boot.loader = { efi = { canTouchEfiVariables = true; diff --git a/modules/nixos/i18n.nix b/modules/nixos/i18n.nix index b8469c0..ef0a5aa 100644 --- a/modules/nixos/i18n.nix +++ b/modules/nixos/i18n.nix @@ -18,7 +18,10 @@ LC_TIME = "lv_LV.UTF-8"; }; - i18n.supportedLocales = [ "en_US.UTF-8" "lv_LV.UTF-8" ]; + i18n.supportedLocales = [ + "en_US.UTF-8/UTF-8" + "lv_LV.UTF-8/UTF-8" + ]; services.xserver.xkb = { layout = "us"; diff --git a/modules/nixos/nixpkgs.nix b/modules/nixos/nixpkgs.nix index 2859249..fd114e6 100644 --- a/modules/nixos/nixpkgs.nix +++ b/modules/nixos/nixpkgs.nix @@ -13,10 +13,12 @@ substituters = [ "https://hyprland.cachix.org" "https://ghostty.cachix.org" + "https://hyprpanel.cachix.org" ]; trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" + "hyprpanel.cachix.org-1:tYDZEqAUAqgIz+zYwJ5+v5J62AnYqA/WEXv4VHA/XRs=" ]; };