mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 23:42:51 -05:00
Get home-manager module working
This commit is contained in:
57
flake.nix
57
flake.nix
@@ -3,10 +3,12 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
|
quickshell.url = "git+https://git.outfoxxed.me/quickshell/quickshell";
|
||||||
|
quickshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
# home-manager.url = "github:nix-community/home-manager";
|
# home-manager.url = "github:nix-community/home-manager";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager }:
|
outputs = { self, nixpkgs, ... }:
|
||||||
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
in {
|
in {
|
||||||
|
|
||||||
@@ -41,45 +43,54 @@
|
|||||||
enable = pkgs.lib.mkEnableOption "DankMaterialShell";
|
enable = pkgs.lib.mkEnableOption "DankMaterialShell";
|
||||||
enableKeybinds =
|
enableKeybinds =
|
||||||
pkgs.lib.mkEnableOption "DankMaterialShell Niri keybinds";
|
pkgs.lib.mkEnableOption "DankMaterialShell Niri keybinds";
|
||||||
|
enableSystemd =
|
||||||
|
pkgs.lib.mkEnableOption "DankMaterialShell systemd startup";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.quickshell.enable = pkgs.lib.mkIf cfg.enable true;
|
config.programs.quickshell.enable = pkgs.lib.mkIf cfg.enable true;
|
||||||
|
|
||||||
programs.quickshell.configs.DankMaterialShell =
|
config.programs.quickshell.configs.DankMaterialShell =
|
||||||
pkgs.lib.mkIf cfg.enableKeybinds
|
pkgs.lib.mkIf cfg.enable
|
||||||
"${outputs.packages.x86_64-linux.dankMaterialShell}/etc/xdg/quickshell/DankMaterialShell";
|
"${self.outputs.packages.x86_64-linux.dankMaterialShell}/etc/xdg/quickshell/DankMaterialShell";
|
||||||
|
|
||||||
programs.quickshell.activeConfig =
|
config.programs.quickshell.package = pkgs.lib.mkIf cfg.enable
|
||||||
pkgs.lib.mkIf cfg.enable "DankMaterialShell";
|
self.inputs.quickshell.packages.x86_64-linux.quickshell;
|
||||||
|
|
||||||
programs.niri.settings.input.binds = pkgs.lib.mkIf cfg.enableKeybinds
|
config.programs.quickshell.activeConfig =
|
||||||
|
pkgs.lib.mkIf cfg.enableSystemd "DankMaterialShell";
|
||||||
|
config.programs.quickshell.systemd.enable =
|
||||||
|
pkgs.lib.mkIf cfg.enableSystemd true;
|
||||||
|
config.programs.quickshell.systemd.target =
|
||||||
|
pkgs.lib.mkIf cfg.enableSystemd "graphical-session.target";
|
||||||
|
|
||||||
|
config.programs.niri.settings.binds = pkgs.lib.mkIf cfg.enableKeybinds
|
||||||
(with config.lib.niri.actions; {
|
(with config.lib.niri.actions; {
|
||||||
"Mod+Space" = {
|
"Mod+Space" = {
|
||||||
hotkey-overlay-title = "Application Launcher";
|
hotkey-overlay.title = "Application Launcher";
|
||||||
action =
|
action =
|
||||||
spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "spotlight"
|
spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "spotlight"
|
||||||
"toggle";
|
"toggle";
|
||||||
};
|
};
|
||||||
"Mod+V" = {
|
"Mod+V" = {
|
||||||
hotkey-overlay-title = "Clipboard Manager";
|
hotkey-overlay.title = "Clipboard Manager";
|
||||||
action =
|
action =
|
||||||
spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "clipboard"
|
spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "clipboard"
|
||||||
"toggle";
|
"toggle";
|
||||||
};
|
};
|
||||||
"Mod+M" = {
|
"Mod+M" = {
|
||||||
hotkey-overlay-title = "Task Manager";
|
hotkey-overlay.title = "Task Manager";
|
||||||
action =
|
action =
|
||||||
spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "processlist"
|
spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "processlist"
|
||||||
"toggle";
|
"toggle";
|
||||||
};
|
};
|
||||||
"Mod+Comma" = {
|
"Mod+Comma" = {
|
||||||
hotkey-overlay-title = "Settings";
|
hotkey-overlay.title = "Settings";
|
||||||
action =
|
action =
|
||||||
spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "settings"
|
spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "settings"
|
||||||
"toggle";
|
"toggle";
|
||||||
};
|
};
|
||||||
"Super+Alt+L" = {
|
"Super+Alt+L" = {
|
||||||
hotkey-overlay-title = "Lock Screen";
|
hotkey-overlay.title = "Lock Screen";
|
||||||
action = spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "lock"
|
action = spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "lock"
|
||||||
"lock";
|
"lock";
|
||||||
};
|
};
|
||||||
@@ -108,8 +119,24 @@
|
|||||||
"micmute";
|
"micmute";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
programs.niri.settings.spawn-at-startup =
|
|
||||||
[{ command = "qs" "-c" "DankMaterialShell"; }];
|
config.home.packages = pkgs.lib.mkIf cfg.enable (with pkgs; [
|
||||||
|
material-symbols
|
||||||
|
inter
|
||||||
|
fira-code
|
||||||
|
cava
|
||||||
|
wl-clipboard
|
||||||
|
cliphist
|
||||||
|
ddcutil
|
||||||
|
libsForQt5.qt5ct
|
||||||
|
kdePackages.qt6ct
|
||||||
|
matugen
|
||||||
|
]);
|
||||||
|
|
||||||
|
config.programs.niri.settings.spawn-at-startup =
|
||||||
|
pkgs.lib.mkIf (cfg.enable && !cfg.enableSystemd) [{
|
||||||
|
command = [ "qs" "-c" "DankMaterialShell" ];
|
||||||
|
}];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user