Neovim added leap plugin

Rewritten and moved portable module
Updated background
Disabled garnix substitutor
Small changes to greetd
This commit is contained in:
Jurn Wubben 2025-06-23 20:10:15 +02:00
parent b524030089
commit a46e31e783
14 changed files with 131 additions and 31 deletions

View file

@ -41,11 +41,12 @@
providers.wl-copy.enable = true;
registers = "unnamedplus";
};
options.shiftwidth = 2;
binds = {
whichKey.enable = true;
cheatsheet.enable = true;
};
options.shiftwidth = 2;
languages = {
enableFormat = true; #You can also manually overwrite each language.
enableTreesitter = true;
@ -120,7 +121,16 @@
colorizer.enable = true;
smartcolumn. enable = true;
};
utility.vim-wakatime.enable = true;
utility = {
vim-wakatime.enable = true;
motion.leap = {
enable = true;
mappings = {
leapForwardTo = "f";
leapBackwardTo = "F";
};
};
};
visuals = {
nvim-web-devicons.enable = true;
nvim-cursorline.enable = true;

View file

@ -23,7 +23,7 @@
++ lib.optionals osConfig.niksos.bluetooth [
pkgs.ear2ctl
]
++ lib.optionals osConfig.niksos.portable [
++ lib.optionals osConfig.niksos.portable.enable [
inputs.somcli.defaultPackage.${pkgs.system}
];
}

View file

@ -115,8 +115,9 @@ in {
"Super, s, exec, ${torzu}"
"Super, d, exec, ${dolphin}"
])
++ lib.optionals portable [
++ lib.optionals portable.enable [
"$m Shift, S, exec, ${somcli}"
", XF86AudioMedia, exec, powermode toggle"
];
bindl = [

View file

@ -21,10 +21,12 @@ in {
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"NIXOS_OZONE_WL,1"
];
exec-once = [
exec-once =
[
"${uwsm} finalize"
"${hyprlock}" # Lock screen
];
]
++ lib.optional osConfig.niksos.portable.enable "powermode sync";
};
};
}

View file

@ -24,7 +24,17 @@
niksos = {
fingerprint = true;
bluetooth = true;
portable = true;
portable = {
enable = true;
hyprland = {
powerSaver = ''
hyprctl keyword monitor eDP-1,2880x1920@60,0x0,1.5,vrr,1
'';
performance = ''
hyprctl keyword monitor eDP-1,2880x1920@120,0x0,1.5,vrr,1
'';
};
};
neovim = true;
games = true;

View file

@ -23,7 +23,13 @@
nvidia = false;
};
neovim = false;
portable = false;
portable = {
enable = false;
hyprland = {
powerSaver = "";
performance = "";
};
};
server = false;
};

View file

@ -20,6 +20,6 @@
};
};
programs.uwsm.enable = lib.mkDefault true;
programs.uwsm.enable = config.niksos.desktop.hyprland;
};
}

View file

@ -22,7 +22,6 @@ in {
desktopManager.plasma6.enable = true;
};
programs.uwsm.enable = false;
home-manager.users.jsw.stylix.autoEnable = false;
};

View file

@ -6,5 +6,6 @@
./graphics.nix
./fingerprint.nix
./fwupd.nix
./power.nix
];
}

87
system/hardware/power.nix Normal file
View file

@ -0,0 +1,87 @@
{
config,
lib,
pkgs,
...
}: let
inherit (config) niksos;
cfg = niksos.portable;
in {
options.niksos.portable = {
enable = lib.mkEnableOption "battery optimisers";
hyprland = let
gen = mode:
lib.mkOption {
default = "";
description = "Shell commands to run when switching to ${mode} mode.";
type = lib.types.lines;
};
in {
powerSaver = gen "power-saver";
performance = gen "performance";
};
};
config = {
services = lib.mkIf cfg.enable {
logind = {
powerKey = "suspend-then-hibernate";
powerKeyLongPress = "poweroff";
};
upower.enable = true;
power-profiles-daemon.enable = true;
};
environment.systemPackages = lib.mkIf niksos.desktop.hyprland [
(pkgs.writeScriptBin "powermode" ''
#!/usr/bin/env bash
function sync() {
if [ "$(powerprofilesctl get)" = "power-saver" ]; then
hyprctl --batch "\
keyword animations:enabled 0;\
keyword decoration:shadow:enabled 0;\
keyword decoration:blur:enabled 0;\
keyword general:gaps_in 0;\
keyword general:gaps_out 0;\
keyword general:border_size 1;\
keyword decoration:rounding 0"
${cfg.hyprland.powerSaver}
else
${cfg.hyprland.performance}
hyprctl reload
fi
}
function toggle() {
if [ "$(powerprofilesctl get)" = "power-saver" ]; then
powerprofilesctl set performance
else
powerprofilesctl set power-saver
fi
sync
}
if [ "$#" -ne 1 ]; then
echo "Usage: $0 {toggle|sync}"
exit 1
fi
case "$1" in
toggle)
toggle
;;
sync)
sync
;;
*)
echo "Invalid option: $1"
echo "Usage: $0 {toggle|sync}"
exit 1
;;
esac
'')
];
};
}

View file

@ -3,7 +3,7 @@
substituters = [
# high priority since it's almost always used
"https://cache.nixos.org?priority=10"
"https://cache.garnix.io"
# "https://cache.garnix.io"
# "https://anyrun.cachix.org"
# "https://fufexan.cachix.org"
@ -16,7 +16,7 @@
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= "
# "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= "
# "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
# "fufexan.cachix.org-1:LwCDjCJNJQf5XD2BV+yamQIMZfcKWR9ISIFy5curUsY="

View file

@ -3,7 +3,6 @@
./tailscale.nix
./avahi.nix
./kanata.nix
./power.nix
./ssh.nix
];
}

View file

@ -1,15 +0,0 @@
{
config,
lib,
...
}: {
options.niksos.portable = lib.mkEnableOption "battery optimisers";
config.services = lib.mkIf config.niksos.portable {
logind = {
powerKey = "suspend-then-hibernate";
powerKeyLongPress = "poweroff";
};
upower.enable = true;
power-profiles-daemon.enable = true;
};
}

View file

@ -1,7 +1,7 @@
{config, ...}: {
services.openssh = {
enable = true;
openFirewall = !config.niksos.portable;
openFirewall = !config.niksos.portable.enable;
settings.UseDns = true;
};
}