Include Hyprspace as a potential plugin

This commit is contained in:
DashieTM 2024-11-09 23:59:21 +01:00
parent a138b332a3
commit eb1cb1f297
6 changed files with 36 additions and 53 deletions

View file

@ -41,7 +41,7 @@ in
''resume="PARTLABEL=SWAP"''
''quiet''
''udev.log_level=3''
] ++ config.conf.boot_params;
] ++ config.conf.bootParams;
};
# Enable networking

View file

@ -12,7 +12,7 @@
sessionVariables = {
NIXOS_OZONE_WL = "1";
GOPATH = "$HOME/.go";
FLAKE = config.conf.nix_path;
FLAKE = config.conf.nixosConfigPath;
};
};
}

View file

@ -16,10 +16,9 @@
sops-nix.url = "github:Mic92/sops-nix";
# Hyprspace = {
# url = "github:KZDKM/Hyprspace";
# inputs.hyprland.follows = "nixpkgs";
# };
Hyprspace = {
url = "github:KZDKM/Hyprspace";
};
nur.url = "github:nix-community/nur";
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";

View file

@ -93,7 +93,7 @@
};
};
boot_params = lib.mkOption {
bootParams = lib.mkOption {
default = [ ];
example = [ "resume=something" ];
type = with lib.types; listOf str;
@ -150,7 +150,7 @@
'';
};
nixos-config-path = lib.mkOption {
nixosConfigPath = lib.mkOption {
default = "/home/${config.conf.username}/gits/nixos/.";
example = "yourpath/.";
type = lib.types.str;
@ -159,41 +159,6 @@
'';
};
nvim-colorscheme = lib.mkOption {
default = {
tokyonight = {
enable = true;
};
};
example = {
catppuccin = {
enable = true;
};
};
type = lib.types.attrs;
description = ''
nixvim colorscheme.
'';
};
nix_path = lib.mkOption {
default = "/home/${config.conf.username}/gits/nixos";
example = "yourpath";
type = lib.types.str;
description = ''
The default path for your configuration.
'';
};
kb_layout = lib.mkOption {
default = "dashie";
example = "us";
type = lib.types.str;
description = ''
The layout used in services.
'';
};
systemStateVersion = lib.mkOption {
example = "24.05";
default = "23.05";

View file

@ -41,7 +41,7 @@
# Utility functions for zoxide.
#
export NIX_PATH="$NIX_PATH:${config.conf.nixos-config-path}"
export NIX_PATH="$NIX_PATH:${config.conf.nixosConfigPath}"
set EDITOR "neovide --no-fork"

View file

@ -3,6 +3,7 @@
lib,
options,
pkgs,
inputs,
...
}:
let
@ -89,6 +90,23 @@ in
Plugins to be added to Hyprland.
'';
};
pluginConfig = lib.mkOption {
default = { };
example = { };
type = with lib.types; attrsOf anything;
description = ''
Plugin configuration to be added to Hyprland.
'';
};
hyprspaceEnable = lib.mkOption {
default = false;
type = lib.types.bool;
example = true;
description = ''
Enables Hyprspace plugin for hyprland.
Please note, plugins tend to break VERY often.
'';
};
};
};
@ -362,19 +380,20 @@ in
"oxinoti"
] ++ config.mods.hyprland.extraAutostart;
# plugin = {
# hyprspace = {
# bind = [
# "SUPER, W, overview:toggle, toggle"
# ];
# };
# };
plugin = {
hyprspace = lib.mkIf config.mods.hyprland.hyprspaceEnable {
bind = [
"SUPER, W, overview:toggle, toggle"
];
};
} // config.mods.hyprland.pluginConfig;
}
// config.mods.hyprland.customConfig
else
lib.mkForce config.mods.hyprland.customConfig;
plugins = config.mods.hyprland.plugins;
#inputs.Hyprspace.packages.${pkgs.system}.Hyprspace
plugins = [
(lib.mkIf config.mods.hyprland.hyprspaceEnable inputs.Hyprspace.packages.${pkgs.system}.Hyprspace)
] ++ config.mods.hyprland.plugins;
};
}
);