initial commit for module-refactor

This commit is contained in:
pagedmov
2024-11-01 21:01:52 -04:00
parent 7bee6ebce5
commit ff2535e7a7
62 changed files with 2819 additions and 2670 deletions

View File

@@ -1,5 +1,7 @@
{
host,
lib,
config,
self,
pkgs,
...
@@ -16,10 +18,6 @@
self = self;
pkgs = pkgs;
};
scheck = import ./commands/s_check.nix {
self = self;
pkgs = pkgs;
};
runbg = import ./commands/runbg.nix {
self = self;
pkgs = pkgs;
@@ -32,6 +30,7 @@
self = self;
pkgs = pkgs;
};
scheck = import ./wm-controls/s_check.nix { self = self; pkgs = pkgs;};
switchmon = import ./wm-controls/switchmon.nix {
self = self;
pkgs = pkgs;
@@ -51,20 +50,56 @@
};
chpaper = import ./wm-controls/chpaper.nix {pkgs = pkgs;};
in {
home.packages = [
chpaper
chscheme
keyring
garbage-collect
invoke
rebuild
nsp
runbg
scheck
splash
switchmon
moveonscreen
toolbelt
viconf
];
options = {
pagedmovScripts.enable = lib.mkEnableOption "enables pagedmov's scripts";
pagedmovScripts.commandScripts.invoke.enable =
lib.mkEnableOption "enables the invoke command";
pagedmovScripts.commandScripts.runbg.enable =
lib.mkEnableOption "enables the runbg command - written by FrostPhoenix";
pagedmovScripts.commandScripts.splash.enable =
lib.mkEnableOption "enables the splash screen when opening a terminal";
pagedmovScripts.commandScripts.toolbelt.enable =
lib.mkEnableOption "enables the toolbelt command";
pagedmovScripts.commandScripts.viconf.enable =
lib.mkEnableOption "enables the viconf command";
pagedmovScripts.hyprlandControls.chpaper.enable =
lib.mkEnableOption "enables the chpaper command";
pagedmovScripts.hyprlandControls.scheck.enable =
lib.mkEnableOption "enables the chpaper command";
pagedmovScripts.hyprlandControls.chscheme.enable =
lib.mkEnableOption "enables the chscheme command";
pagedmovScripts.hyprlandControls.keyring.enable =
lib.mkEnableOption "enables the keyring command";
pagedmovScripts.hyprlandControls.moveonscreen.enable =
lib.mkEnableOption "enables the moveonscreen command, makes sure that the edges of floating windows are always on screen";
pagedmovScripts.hyprlandControls.switchmon.enable =
lib.mkEnableOption "moves your cursor to the center of your second monitor; currently only supports two monitors";
pagedmovScripts.nixShortcuts.garbage-collect.enable =
lib.mkEnableOption "enables the garbage-collect script, runs nixos garbage collection and empties the gtrash bin";
pagedmovScripts.nixShortcuts.nsp.enable =
lib.mkEnableOption "enables nsp, essentially an alias for 'nix-shell -p'";
pagedmovScripts.nixShortcuts.rebuild.enable =
lib.mkEnableOption "enables rebuild, an alias for 'sudo nixos-rebuild switch --flake $FLAKEPATH#$(hostname)'";
};
config = lib.mkIf config.pagedmovScripts.enable {
home.packages = lib.optionals config.pagedmovScripts.commandScripts.invoke.enable [ invoke ]
++ lib.optionals config.pagedmovScripts.commandScripts.runbg.enable [ runbg ]
++ lib.optionals config.pagedmovScripts.commandScripts.splash.enable [ splash ]
++ lib.optionals config.pagedmovScripts.commandScripts.toolbelt.enable [ toolbelt ]
++ lib.optionals config.pagedmovScripts.commandScripts.viconf.enable [ viconf ]
++ lib.optionals config.pagedmovScripts.hyprlandControls.chpaper.enable [ chpaper ]
++ lib.optionals config.pagedmovScripts.hyprlandControls.chpaper.enable [ scheck ]
++ lib.optionals config.pagedmovScripts.hyprlandControls.chscheme.enable [ chscheme ]
++ lib.optionals config.pagedmovScripts.hyprlandControls.keyring.enable [ keyring ]
++ lib.optionals config.pagedmovScripts.hyprlandControls.moveonscreen.enable [ moveonscreen ]
++ lib.optionals config.pagedmovScripts.hyprlandControls.switchmon.enable [ switchmon ]
++ lib.optionals config.pagedmovScripts.nixShortcuts.garbage-collect.enable [ garbage-collect ]
++ lib.optionals config.pagedmovScripts.nixShortcuts.nsp.enable [ nsp ]
++ lib.optionals config.pagedmovScripts.nixShortcuts.rebuild.enable [ rebuild ];
};
}