Compare commits

...

6 Commits

12 changed files with 637 additions and 1161 deletions

6
.envrc
View File

@@ -1,11 +1,7 @@
# -*- mode: sh; -*-
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi
watch_file flake.nix
watch_file flake.lock
if ! use flake . --no-pure-eval
then
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
echo "dev shell could not be built. The environment was not loaded. Make the necessary changes to flake.nix and hit enter to try again." >&2
fi

904
flake.lock generated

File diff suppressed because it is too large Load Diff

211
flake.nix
View File

@@ -3,11 +3,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
devenv = {
url = "github:cachix/devenv";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager";
@@ -34,6 +30,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
opencode = {
url = "github:anomalyco/opencode/v1.3.15";
inputs.nixpkgs.follows = "nixpkgs";
};
pumo-system-info = {
url = "git+https://labs.phundrak.com/phundrak/pumo-system-info";
inputs.nixpkgs.follows = "nixpkgs";
@@ -82,119 +83,101 @@
outputs = {
self,
nixpkgs,
flake-utils,
home-manager,
devenv,
srvos,
...
} @ inputs: let
inherit (self) outputs;
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
formatter.${system} = pkgs.alejandra;
} @ inputs:
flake-utils.lib.eachDefaultSystem (
system: let
inherit (self) outputs;
pkgs = nixpkgs.legacyPackages.${system};
in {
formatter = pkgs.alejandra;
devShells.default = pkgs.mkShell {
buildInputs = [pkgs.nh];
};
packages.${system} = {
devenv-up = self.devShells.${system}.default.config.procfileScript;
devenv-test = self.devShells.${system}.default.config.test;
};
devShells.${system}.default = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
(
{pkgs, ...}: {
packages = [pkgs.nh];
git-hooks.hooks = {
alejandra.enable = true;
commitizen.enable = true;
detect-private-keys.enable = true;
end-of-file-fixer.enable = true;
deadnix.enable = true;
ripsecrets.enable = true;
statix.enable = true;
packages = {
homeConfigurations = let
extraSpecialArgs = {inherit inputs outputs system;};
pkgs = nixpkgs.legacyPackages.x86_64-linux;
defaultUserModules = [
inputs.sops-nix.homeManagerModules.sops
inputs.spicetify.homeManagerModules.default
inputs.caelestia-shell.homeManagerModules.default
];
withUserModules = modules: nixpkgs.lib.lists.flatten (defaultUserModules ++ [modules]);
in {
"phundrak@alys" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/phundrak/host/alys.nix;
};
}
)
];
};
"creug@elcafe" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/creug/host/elcafe.nix;
};
"phundrak@elcafe" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/phundrak/host/elcafe.nix;
};
"phundrak@gampo" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/phundrak/host/marpa.nix;
};
"phundrak@marpa" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/phundrak/host/marpa.nix;
};
"phundrak@NaroMk3" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/phundrak/host/naromk3.nix;
};
"phundrak@tilo" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/phundrak/host/tilo.nix;
};
};
homeConfigurations = let
extraSpecialArgs = {inherit inputs outputs system;};
pkgs = nixpkgs.legacyPackages.x86_64-linux;
defaultUserModules = [
inputs.sops-nix.homeManagerModules.sops
inputs.spicetify.homeManagerModules.default
inputs.caelestia-shell.homeManagerModules.default
];
withUserModules = modules: nixpkgs.lib.lists.flatten (defaultUserModules ++ [modules]);
in {
"phundrak@alys" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/phundrak/host/alys.nix;
};
"creug@elcafe" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/creug/host/elcafe.nix;
};
"phundrak@elcafe" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/phundrak/host/elcafe.nix;
};
"phundrak@gampo" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/phundrak/host/marpa.nix;
};
"phundrak@marpa" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/phundrak/host/marpa.nix;
};
"phundrak@NaroMk3" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/phundrak/host/naromk3.nix;
};
"phundrak@tilo" = home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs pkgs;
modules = withUserModules ./users/phundrak/host/tilo.nix;
};
};
nixosConfigurations = let
specialArgs = {inherit inputs outputs;};
defaultSystemModules = [
inputs.sops-nix.nixosModules.sops
inputs.copyparty.nixosModules.default
];
withSystemModules = modules: nixpkgs.lib.lists.flatten (defaultSystemModules ++ [modules]);
in {
alys = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = withSystemModules ./hosts/alys/configuration.nix;
};
elcafe = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = withSystemModules ./hosts/elcafe/configuration.nix;
};
gampo = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = withSystemModules ./hosts/gampo/configuration.nix;
};
marpa = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = withSystemModules ./hosts/marpa/configuration.nix;
};
NaroMk3 = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = withSystemModules [
srvos.nixosModules.server
srvos.nixosModules.hardware-hetzner-cloud
srvos.nixosModules.mixins-terminfo
./hosts/naromk3/configuration.nix
];
};
tilo = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = withSystemModules ./hosts/tilo/configuration.nix;
};
};
};
nixosConfigurations = let
specialArgs = {inherit inputs outputs;};
defaultSystemModules = [
inputs.sops-nix.nixosModules.sops
inputs.copyparty.nixosModules.default
];
withSystemModules = modules: nixpkgs.lib.lists.flatten (defaultSystemModules ++ [modules]);
in {
alys = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = withSystemModules ./hosts/alys/configuration.nix;
};
elcafe = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = withSystemModules ./hosts/elcafe/configuration.nix;
};
gampo = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = withSystemModules ./hosts/gampo/configuration.nix;
};
marpa = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = withSystemModules ./hosts/marpa/configuration.nix;
};
NaroMk3 = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = withSystemModules [
srvos.nixosModules.server
srvos.nixosModules.hardware-hetzner-cloud
srvos.nixosModules.mixins-terminfo
./hosts/naromk3/configuration.nix
];
};
tilo = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = withSystemModules ./hosts/tilo/configuration.nix;
};
};
};
}
);
}

View File

@@ -9,6 +9,7 @@ in {
imports = [
./caelestia.nix
./eww.nix
./firefox.nix
./hyprland.nix
./kdeconnect.nix
./kitty.nix
@@ -18,6 +19,7 @@ in {
./swaync.nix
./theme.nix
./waybar.nix
./wl-kbptr.nix
./wlr-which-key.nix
./wlsunset.nix
];
@@ -25,6 +27,7 @@ in {
options.home.desktop.fullDesktop = mkEnableOption "Enable options for graphical environments";
config.home.desktop = {
eww.enable = mkDefault cfg.fullDesktop;
firefox.enable = mkDefault cfg.fullDesktop;
hyprland.enable = mkDefault cfg.fullDesktop;
kdeconnect.enable = mkDefault cfg.fullDesktop;
kitty.enable = mkDefault cfg.fullDesktop;

View File

@@ -0,0 +1,70 @@
{
config,
lib,
inputs,
pkgs,
...
}:
with lib; let
cfg = config.home.desktop.firefox;
inherit (pkgs.stdenv.hostPlatform) system;
zen = inputs.zen-browser.packages.${system}.default;
settingsToLines = settings:
concatStringsSep "\n" (mapAttrsToList (name: value: "set ${name} ${toString value}") settings);
in {
options.home.desktop.firefox = {
enable = mkEnableOption "enable Firefox";
useZen = mkEnableOption "use Zen instead of Firefox";
tridactyl = {
enable = mkEnableOption "enable Tridactyl";
preConfig = mkOption {
description = "Lines to add to the beginning of tridactylrc";
type = types.lines;
default = "";
};
config = mkOption {
type = with types;
attrsOf (oneOf [
int
str
bool
]);
description = "Tridactyl settings (converted to 'set key value' lines)";
default = {};
example = {
smoothscroll = true;
history = 1000;
};
};
extraConfig = mkOption {
description = "Extra lines to add to tridactylrc (for bindings, autocmds, etc)";
type = types.lines;
default = "";
};
};
};
config = mkIf cfg.enable {
programs.firefox = {
inherit (cfg) enable;
package =
if cfg.useZen
then zen
else pkgs.firefox;
nativeMessagingHosts = lists.optional cfg.tridactyl.enable pkgs.tridactyl-native;
};
xdg.configFile."tridactyl/tridactylrc" = mkIf cfg.tridactyl.enable {
text = concatStringsSep "\n" (filter (s: s != "") [
cfg.tridactyl.preConfig
(settingsToLines (cfg.tridactyl.config
// {
browser =
if cfg.useZen
then "zen"
else "firefox";
}))
cfg.tridactyl.extraConfig
]);
};
};
}

View File

@@ -0,0 +1,37 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
configDir = config.xdg.configHome;
cfg = config.home.desktop.wl-kbptr;
iniFormat = pkgs.formats.ini {};
in {
options.home.desktop.wl-kbptr = {
enable = mkEnableOption "enable wl-kbptr";
config = mkOption {
inherit (iniFormat) type;
default = {};
description = ''
Options to add to the {file}`config` file. See
<https://github.com/moverest/wl-kbptr/blob/main/config.example>
for options.
'';
example = {
general = {
home_row_keys = "abcd";
};
};
};
};
config = mkIf cfg.enable {
home = {
packages = [pkgs.wl-kbptr];
file."${configDir}/wl-kbptr/config" = mkIf (cfg.config != {}) {
source = iniFormat.generate "wl-kbptr-config" cfg.config;
};
};
};
}

View File

@@ -6,16 +6,23 @@
}:
with lib; let
cfg = config.home.dev.ai.claude;
jsonFormat = pkgs.formats.json {};
in {
options.home.dev.ai.claude.enable = mkEnableOption "Enables Claude-related packages";
options.home.dev.ai.claude = {
enable = mkEnableOption "Enables Claude-related packages";
mcpServers = mkOption {
inherit (jsonFormat) type;
default = {};
};
};
config = mkIf cfg.enable {
home.packages = let
claude-jj = pkgs.writeShellScriptBin "claude-jj" ''
${pkgs.claude-code}/bin/claude --append-system-prompt 'CRITICAL: This repository uses Jujutsu (jj), NOT git. Never use git commands. Use jj equivalents. See CLAUDE.md.' "$@"
${pkgs.claude-code}/bin/claude --append-system-prompt 'CRITICAL: This repository uses Jujutsu (jj), NOT git. Never use git commands. Use jj equivalents.' "$@"
'';
in [claude-jj];
in [claude-jj pkgs.sox];
programs.claude-code = {
inherit (cfg) enable;
inherit (cfg) enable mcpServers;
};
};
}

View File

@@ -2,22 +2,43 @@
config,
lib,
pkgs,
inputs,
...
}:
with lib; let
cfg = config.home.dev.ai;
jsonFormat = pkgs.formats.json {};
in {
imports = [
./claude.nix
./ollama.nix
];
options.home.dev.ai.enable = mkEnableOption "Enables AI features";
config.home = mkIf cfg.enable {
dev.ai = {
claude.enable = mkDefault cfg.enable;
ollama.enable = mkDefault cfg.enable;
options.home.dev.ai = {
enable = mkEnableOption "Enables AI features";
mcpServers = mkOption {
inherit (jsonFormat) type;
default = {};
};
};
config = {
home = mkIf cfg.enable {
dev.ai = {
claude = {
enable = mkDefault cfg.enable;
mcpServers = mkDefault cfg.mcpServers;
};
ollama.enable = mkDefault cfg.enable;
};
packages = let
inherit (pkgs.stdenv.hostPlatform) system;
inherit (inputs.opencode.packages.${system}) opencode;
# opencodeCli = inputs.opencode.packages.${system}.opencode;
in [pkgs.lmstudio opencode];
};
programs.mcp = mkIf (cfg.mcpServers != {}) {
enable = true;
servers = cfg.mcpServers;
};
packages = [pkgs.lmstudio];
};
}

View File

@@ -128,7 +128,10 @@ in {
"dist/"
];
signing = {
format = if cfg.publicKeyFile != null then "ssh" else "openpgp";
format =
if cfg.publicKeyFile != null
then "ssh"
else "openpgp";
key = cfg.publicKeyFile;
signByDefault = true;
};

View File

@@ -65,10 +65,91 @@
};
desktop = {
caelestia.enable = true;
firefox = {
enable = true;
useZen = true;
tridactyl = {
enable = true;
preConfig = "sanitise tridactyllocal tridactylsync";
config = {
editorcmd = "emacsclient -c";
keyboardlayoutbase = "bepo";
keyboardlayoutforce = "true";
hintchars = "auiectsr";
smothscroll = "true";
};
extraConfig = ''
unbind h
unbind j
unbind k
unbind l
unbind c
unbind t
unbind s
unbind r
unbind H
unbind J
unbind K
unbind L
unbind C
unbind T
unbind S
unbind R
" === Bépo layout scrolling (ctsr = hjkl) ===
bind c scrollpx -300 0
bind t scrollline 5
bind s scrollline -5
bind r scrollpx 300 0
" Half/full page scroll (replacing C-f/C-b/C-d/C-u)
bind <C-t> scrollpage 0.5
bind <C-s> scrollpage -0.5
" === History navigation (C/R = H/L) ===
bind C back
bind R forward
" === Tab navigation ===
bind T tabnext
bind S tabprev
" === Displaced commands ===
" reload was on r move to h (bépo's 'replace' position)
bind h reload
bind H reloadhard
" tabopen was on t move to j (bépo's 'find char to' position)
bind j fillcmdline tabopen
unbind ^http(s?)://youtube\.com f
unbind ^http(s?)://youtube\.com t
unbind ^http(s?)://youtube\.com l
unbind ^http(s?)://youtube\.com j
unbind ^http(s?)://twitch\.tv f
bind < urlincrement -1
bind > urlincrement 1
bind ypv js tri.native.run(`mpv --ytdl-format="[height >=? 480]" --ontop --fs "''${document.location.href}"`)
bind ypm hint -JF e => tri.native.run(`mpv --ytdl-format="[height >=? 480]" --ontop --fs "''${e.href}"`)
'';
};
};
spotify = {
enable = true;
spicetify.enable = true;
};
wl-kbptr = {
enable = true;
config = {
general = {
# first eight chars to select areas, last three chars
# for left, right, middle click
home_row_keys = "auiectsrtsr";
modes = "tile,bisect";
};
};
};
};
dev = {
ai.claude.enable = true;

View File

@@ -9,7 +9,6 @@ with lib; let
handy = pkgs.callPackage ../../packages/handy.nix {};
inkdrop = pkgs.callPackage ../../packages/inkdrop.nix {};
pumo-system-info = inputs.pumo-system-info.packages.${system}.default;
zen = inputs.zen-browser.packages.${system}.default;
in {
programs.bun.enable = true;
home.packages = with pkgs; [
@@ -52,7 +51,6 @@ in {
scrcpy
syncthing
watchmate
zen
# Games
atlauncher

View File

@@ -1,6 +1,7 @@
{
config,
pkgs,
lib,
...
}: {
config.home.desktop.wlr-which-key.settings = {
@@ -27,217 +28,223 @@
logout = import ./logout.nix {inherit pkgs;};
ytplay = import ../../modules/cli/scripts/ytplay.nix {inherit pkgs;};
plock = import ../../modules/cli/scripts/plock.nix {inherit pkgs;};
in [
{
key = "a";
desc = "Apps";
submenu = [
{
key = "b";
desc = "Browser";
cmd = "zen";
}
{
key = "B";
desc = "Qutebrowser";
cmd = "${pkgs.qutebrowser}/bin/qutebrowser";
}
{
key = "d";
desc = "Discord";
cmd = "${pkgs.vesktop}/bin/vesktop";
}
{
key = "e";
desc = "Emacs";
cmd = "${config.home.dev.editors.emacs.package}/bin/emacsclient -c -n";
}
{
key = "g";
desc = "Gimp";
cmd = "${pkgs.gimp}/bin/gimp";
}
{
key = "h";
desc = "Handy";
cmd = "pkill -USR2 -n handy";
}
{
key = "n";
desc = "Nemo";
cmd = "${pkgs.nemo-with-extensions}/bin/nemo";
}
{
key = "N";
desc = "Nextcloud";
cmd = "${pkgs.nextcloud-client}/bin/nextcloud";
}
{
key = "r";
desc = "Rofi";
submenu = [
{
key = "b";
desc = "Bluetooth";
cmd = "${pkgs.rofi-bluetooth}/bin/rofi-bluetooth";
}
{
key = "c";
desc = "calc";
cmd = "rofi -show calc";
}
{
key = "e";
desc = "Emoji";
cmd = "rofi -show emoji";
}
{
key = "r";
desc = "App Menu";
cmd = "rofi -show drun";
}
{
key = "s";
desc = "SSH";
cmd = "rofi -show ssh";
}
{
key = "y";
desc = "YouTube";
cmd = "${ytplay}/bin/ytplay";
}
];
}
];
}
{
key = "b";
desc = "Buffers";
submenu = [
{
key = "c";
desc = "Center";
cmd = "${center-window}/bin/center-window";
}
{
key = "d";
desc = "Close";
cmd = "${close-window}/bin/close-window";
}
{
key = "f";
desc = "Fullscreen";
cmd = "${fullscreen}/bin/fullscreen";
}
{
key = "F";
desc = "Float";
cmd = "${float-window}/bin/float-window";
}
{
key = "u";
desc = "Urgent";
cmd = "${focus-urgent}/bin/focus-urgent";
}
{
key = ".";
desc = "Resize";
submenu = [
{
key = left;
desc = "Decrease Width";
cmd = "echo decrease width";
keep-open = true;
}
{
key = down;
desc = "Increase Height";
cmd = "echo decrease height";
keep-open = true;
}
{
key = up;
desc = "Decrease Height";
cmd = "echo decrease height";
keep-open = true;
}
{
key = right;
desc = "Increase Width";
cmd = "echo increase width";
keep-open = true;
}
];
}
];
}
{
key = "l";
desc = "Lock session";
cmd = "${plock}/bin/plock";
}
{
key = "p";
desc = "Power";
submenu = [
{
key = "l";
desc = "Logout";
cmd = "${logout}/bin/logout";
}
{
key = "s";
desc = "Suspend";
cmd = "systemctl suspend";
}
{
key = "r";
desc = "Reboot";
cmd = "systemctl reboot";
}
{
key = "o";
desc = "Poweroff";
cmd = "systemctl poweroff";
}
];
}
{
key = "s";
desc = "Screenshots";
submenu = [
{
key = "Print";
desc = "Screenshot";
cmd = "screenshot";
}
{
key = "d";
desc = "Delayed";
cmd = "screenshot -d 3";
}
{
key = "D";
desc = "Select, Delay, Edit, and Copy";
cmd = "screenshot -secd 3";
}
{
key = "e";
desc = "Select, Edit, and Copy";
cmd = "screenshot -sec";
}
{
key = "g";
desc = "Select, Gimp, and Copy";
cmd = "screenshot -sgc";
}
{
key = "s";
desc = "Select and Copy";
cmd = "screenshot -sc";
}
];
}
];
in
[
{
key = "a";
desc = "Apps";
submenu = [
{
key = "b";
desc = "Browser";
cmd = "zen";
}
{
key = "B";
desc = "Qutebrowser";
cmd = "${pkgs.qutebrowser}/bin/qutebrowser";
}
{
key = "d";
desc = "Discord";
cmd = "${pkgs.vesktop}/bin/vesktop";
}
{
key = "e";
desc = "Emacs";
cmd = "${config.home.dev.editors.emacs.package}/bin/emacsclient -c -n";
}
{
key = "g";
desc = "Gimp";
cmd = "${pkgs.gimp}/bin/gimp";
}
{
key = "h";
desc = "Handy";
cmd = "pkill -USR2 -n handy";
}
{
key = "n";
desc = "Nemo";
cmd = "${pkgs.nemo-with-extensions}/bin/nemo";
}
{
key = "N";
desc = "Nextcloud";
cmd = "${pkgs.nextcloud-client}/bin/nextcloud";
}
{
key = "r";
desc = "Rofi";
submenu = [
{
key = "b";
desc = "Bluetooth";
cmd = "${pkgs.rofi-bluetooth}/bin/rofi-bluetooth";
}
{
key = "c";
desc = "calc";
cmd = "rofi -show calc";
}
{
key = "e";
desc = "Emoji";
cmd = "rofi -show emoji";
}
{
key = "r";
desc = "App Menu";
cmd = "rofi -show drun";
}
{
key = "s";
desc = "SSH";
cmd = "rofi -show ssh";
}
{
key = "y";
desc = "YouTube";
cmd = "${ytplay}/bin/ytplay";
}
];
}
];
}
{
key = "b";
desc = "Buffers";
submenu = [
{
key = "c";
desc = "Center";
cmd = "${center-window}/bin/center-window";
}
{
key = "d";
desc = "Close";
cmd = "${close-window}/bin/close-window";
}
{
key = "f";
desc = "Fullscreen";
cmd = "${fullscreen}/bin/fullscreen";
}
{
key = "F";
desc = "Float";
cmd = "${float-window}/bin/float-window";
}
{
key = "u";
desc = "Urgent";
cmd = "${focus-urgent}/bin/focus-urgent";
}
{
key = ".";
desc = "Resize";
submenu = [
{
key = left;
desc = "Decrease Width";
cmd = "echo decrease width";
keep-open = true;
}
{
key = down;
desc = "Increase Height";
cmd = "echo decrease height";
keep-open = true;
}
{
key = up;
desc = "Decrease Height";
cmd = "echo decrease height";
keep-open = true;
}
{
key = right;
desc = "Increase Width";
cmd = "echo increase width";
keep-open = true;
}
];
}
];
}
{
key = "l";
desc = "Lock session";
cmd = "${plock}/bin/plock";
}
{
key = "p";
desc = "Power";
submenu = [
{
key = "l";
desc = "Logout";
cmd = "${logout}/bin/logout";
}
{
key = "s";
desc = "Suspend";
cmd = "systemctl suspend";
}
{
key = "r";
desc = "Reboot";
cmd = "systemctl reboot";
}
{
key = "o";
desc = "Poweroff";
cmd = "systemctl poweroff";
}
];
}
{
key = "s";
desc = "Screenshots";
submenu = [
{
key = "Print";
desc = "Screenshot";
cmd = "screenshot";
}
{
key = "d";
desc = "Delayed";
cmd = "screenshot -d 3";
}
{
key = "D";
desc = "Select, Delay, Edit, and Copy";
cmd = "screenshot -secd 3";
}
{
key = "e";
desc = "Select, Edit, and Copy";
cmd = "screenshot -sec";
}
{
key = "g";
desc = "Select, Gimp, and Copy";
cmd = "screenshot -sgc";
}
{
key = "s";
desc = "Select and Copy";
cmd = "screenshot -sc";
}
];
}
]
++ lib.lists.optional config.home.desktop.wl-kbptr.enable {
key = "m";
desc = "Mouse Warp";
cmd = "wl-kbptr";
};
};
}