diff --git a/flake.lock b/flake.lock index 8844b8e..e74e8fa 100644 --- a/flake.lock +++ b/flake.lock @@ -21,6 +21,28 @@ "type": "github" } }, + "ags_2": { + "inputs": { + "astal": "astal_3", + "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": [ @@ -95,6 +117,28 @@ "type": "github" } }, + "astal_3": { + "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" + } + }, "flake-compat": { "flake": false, "locked": { @@ -221,7 +265,9 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs", + "nixpkgs": [ + "nixpkgs" + ], "pre-commit-hooks": "pre-commit-hooks", "systems": "systems", "xdph": "xdph" @@ -362,6 +408,27 @@ "type": "github" } }, + "hyprpanel": { + "inputs": { + "ags": "ags_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1747029715, + "narHash": "sha256-F75IlhzUF+VTPOq+u2Exj+6PjHWPkLcBWDnhO+Vvch4=", + "owner": "Jas-SinghFSU", + "repo": "Hyprpanel", + "rev": "2bb1449fb6ad60a736ce6fb4de2037d7655545ed", + "type": "github" + }, + "original": { + "owner": "Jas-SinghFSU", + "repo": "Hyprpanel", + "type": "github" + } + }, "hyprutils": { "inputs": { "nixpkgs": [ @@ -413,22 +480,6 @@ } }, "nixpkgs": { - "locked": { - "lastModified": 1746461020, - "narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1746904237, "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", @@ -473,7 +524,8 @@ "astal": "astal_2", "home-manager": "home-manager", "hyprland": "hyprland", - "nixpkgs": "nixpkgs_2" + "hyprpanel": "hyprpanel", + "nixpkgs": "nixpkgs" } }, "systems": { diff --git a/flake.nix b/flake.nix index c9a7f06..faef951 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,7 @@ home-manager.inputs.nixpkgs.follows = "nixpkgs"; # ensures version follows nixpkgs hyprland.url = "github:hyprwm/Hyprland"; + hyprland.inputs.nixpkgs.follows = "nixpkgs"; astal = { url = "github:aylur/astal"; @@ -17,6 +18,9 @@ url = "github:aylur/ags"; inputs.nixpkgs.follows = "nixpkgs"; }; + + hyprpanel.url = "github:Jas-SinghFSU/Hyprpanel"; + hyprpanel.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, home-manager, ags, astal, ... } @ inputs: @@ -43,19 +47,24 @@ ''; }; - nixosConfigurations = { + nixosConfigurations = { biscuit = lib.nixosSystem { specialArgs = { inherit inputs system; }; inherit system; - modules = [ ./nixos/configuration.nix ]; + modules = [ + ./nixos/configuration.nix + { nixpkgs.overlays = [inputs.hyprpanel.overlay]; } + ]; }; }; homeConfigurations = { biscuit = home-manager.lib.homeManagerConfiguration { extraSpecialArgs = { inherit inputs system; }; + overlays = [ + inputs.hyprpanel.overlay + ]; inherit pkgs; - modules = [ ./home-manager/home.nix - ]; + modules = [ ./home-manager/home.nix ]; }; }; }; diff --git a/packages/hyprland/custom/keybinds.conf b/packages/hyprland/custom/keybinds.conf index 20d6d62..198a346 100644 --- a/packages/hyprland/custom/keybinds.conf +++ b/packages/hyprland/custom/keybinds.conf @@ -5,6 +5,7 @@ # See https://wiki.hyprland.org/Configuring/Keywords/ $mainMod = SUPER # Sets "Windows" key as main modifier $terminal = kitty +$browser = firefox # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, Return, exec, $terminal @@ -15,6 +16,7 @@ bind = $mainMod, V, togglefloating, bind = $mainMod, R, exec, $menu bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, B, togglesplit, # dwindle +bind = $mainMod, W, exec, $browser # Move focus with mainMod + arrow keys bind = $mainMod, H, movefocus, l diff --git a/packages/hyprpanel/default.nix b/packages/hyprpanel/default.nix new file mode 100644 index 0000000..4cd1062 --- /dev/null +++ b/packages/hyprpanel/default.nix @@ -0,0 +1,78 @@ +{ inputs, ... }: { + imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ]; + + programs.hyprpanel = { + + # Enable the module. + # Default: false + enable = true; + + # Automatically restart HyprPanel with systemd. + # Useful when updating your config so that you + # don't need to manually restart it. + # Default: false + systemd.enable = true; + + # Add '/nix/store/.../hyprpanel' to your + # Hyprland config 'exec-once'. + # Default: false + hyprland.enable = true; + + # Fix the overwrite issue with HyprPanel. + # See below for more information. + # Default: false + overwrite.enable = true; + + # Import a theme from './themes/*.json'. + # Default: "" + theme = "gruvbox_split"; + + # Override the final config with an arbitrary set. + # Useful for overriding colors in your selected theme. + # Default: {} + override = { + theme.bar.menus.text = "#123ABC"; + }; + + # Configure bar layouts for monitors. + # See 'https://hyprpanel.com/configuration/panel.html'. + # Default: null + layout = { + "bar.layouts" = { + "0" = { + left = [ "dashboard" "workspaces" ]; + middle = [ "media" ]; + right = [ "volume" "systray" "notifications" ]; + }; + }; + }; + + # Configure and theme almost all options from the GUI. + # Options that require '{}' or '[]' are not yet implemented, + # except for the layout above. + # See 'https://hyprpanel.com/configuration/settings.html'. + # Default: + settings = { + bar.launcher.autoDetectIcon = true; + bar.workspaces.show_icons = true; + + menus.clock = { + time = { + military = true; + hideSeconds = true; + }; + weather.unit = "metric"; + }; + + menus.dashboard.directories.enabled = false; + menus.dashboard.stats.enable_gpu = true; + + theme.bar.transparent = true; + + theme.font = { + name = "CaskaydiaCove NF"; + size = "16px"; + }; + }; + }; +}