Neovim added leap plugin
Rewritten and moved portable module Updated background Disabled garnix substitutor Small changes to greetd
This commit is contained in:
parent
b524030089
commit
a46e31e783
14 changed files with 131 additions and 31 deletions
|
|
@ -41,11 +41,12 @@
|
||||||
providers.wl-copy.enable = true;
|
providers.wl-copy.enable = true;
|
||||||
registers = "unnamedplus";
|
registers = "unnamedplus";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.shiftwidth = 2;
|
||||||
binds = {
|
binds = {
|
||||||
whichKey.enable = true;
|
whichKey.enable = true;
|
||||||
cheatsheet.enable = true;
|
cheatsheet.enable = true;
|
||||||
};
|
};
|
||||||
options.shiftwidth = 2;
|
|
||||||
languages = {
|
languages = {
|
||||||
enableFormat = true; #You can also manually overwrite each language.
|
enableFormat = true; #You can also manually overwrite each language.
|
||||||
enableTreesitter = true;
|
enableTreesitter = true;
|
||||||
|
|
@ -120,7 +121,16 @@
|
||||||
colorizer.enable = true;
|
colorizer.enable = true;
|
||||||
smartcolumn. 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 = {
|
visuals = {
|
||||||
nvim-web-devicons.enable = true;
|
nvim-web-devicons.enable = true;
|
||||||
nvim-cursorline.enable = true;
|
nvim-cursorline.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
++ lib.optionals osConfig.niksos.bluetooth [
|
++ lib.optionals osConfig.niksos.bluetooth [
|
||||||
pkgs.ear2ctl
|
pkgs.ear2ctl
|
||||||
]
|
]
|
||||||
++ lib.optionals osConfig.niksos.portable [
|
++ lib.optionals osConfig.niksos.portable.enable [
|
||||||
inputs.somcli.defaultPackage.${pkgs.system}
|
inputs.somcli.defaultPackage.${pkgs.system}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,8 +115,9 @@ in {
|
||||||
"Super, s, exec, ${torzu}"
|
"Super, s, exec, ${torzu}"
|
||||||
"Super, d, exec, ${dolphin}"
|
"Super, d, exec, ${dolphin}"
|
||||||
])
|
])
|
||||||
++ lib.optionals portable [
|
++ lib.optionals portable.enable [
|
||||||
"$m Shift, S, exec, ${somcli}"
|
"$m Shift, S, exec, ${somcli}"
|
||||||
|
", XF86AudioMedia, exec, powermode toggle"
|
||||||
];
|
];
|
||||||
|
|
||||||
bindl = [
|
bindl = [
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,12 @@ in {
|
||||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||||
"NIXOS_OZONE_WL,1"
|
"NIXOS_OZONE_WL,1"
|
||||||
];
|
];
|
||||||
exec-once = [
|
exec-once =
|
||||||
"${uwsm} finalize"
|
[
|
||||||
"${hyprlock}" # Lock screen
|
"${uwsm} finalize"
|
||||||
];
|
"${hyprlock}" # Lock screen
|
||||||
|
]
|
||||||
|
++ lib.optional osConfig.niksos.portable.enable "powermode sync";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,17 @@
|
||||||
niksos = {
|
niksos = {
|
||||||
fingerprint = true;
|
fingerprint = true;
|
||||||
bluetooth = 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;
|
neovim = true;
|
||||||
games = true;
|
games = true;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,13 @@
|
||||||
nvidia = false;
|
nvidia = false;
|
||||||
};
|
};
|
||||||
neovim = false;
|
neovim = false;
|
||||||
portable = false;
|
portable = {
|
||||||
|
enable = false;
|
||||||
|
hyprland = {
|
||||||
|
powerSaver = "";
|
||||||
|
performance = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
server = false;
|
server = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.uwsm.enable = lib.mkDefault true;
|
programs.uwsm.enable = config.niksos.desktop.hyprland;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ in {
|
||||||
|
|
||||||
desktopManager.plasma6.enable = true;
|
desktopManager.plasma6.enable = true;
|
||||||
};
|
};
|
||||||
programs.uwsm.enable = false;
|
|
||||||
|
|
||||||
home-manager.users.jsw.stylix.autoEnable = false;
|
home-manager.users.jsw.stylix.autoEnable = false;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,6 @@
|
||||||
./graphics.nix
|
./graphics.nix
|
||||||
./fingerprint.nix
|
./fingerprint.nix
|
||||||
./fwupd.nix
|
./fwupd.nix
|
||||||
|
./power.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
87
system/hardware/power.nix
Normal file
87
system/hardware/power.nix
Normal 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
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
substituters = [
|
substituters = [
|
||||||
# high priority since it's almost always used
|
# high priority since it's almost always used
|
||||||
"https://cache.nixos.org?priority=10"
|
"https://cache.nixos.org?priority=10"
|
||||||
"https://cache.garnix.io"
|
# "https://cache.garnix.io"
|
||||||
|
|
||||||
# "https://anyrun.cachix.org"
|
# "https://anyrun.cachix.org"
|
||||||
# "https://fufexan.cachix.org"
|
# "https://fufexan.cachix.org"
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= "
|
# "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= "
|
||||||
|
|
||||||
# "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
|
# "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
|
||||||
# "fufexan.cachix.org-1:LwCDjCJNJQf5XD2BV+yamQIMZfcKWR9ISIFy5curUsY="
|
# "fufexan.cachix.org-1:LwCDjCJNJQf5XD2BV+yamQIMZfcKWR9ISIFy5curUsY="
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
./tailscale.nix
|
./tailscale.nix
|
||||||
./avahi.nix
|
./avahi.nix
|
||||||
./kanata.nix
|
./kanata.nix
|
||||||
./power.nix
|
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{config, ...}: {
|
{config, ...}: {
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = !config.niksos.portable;
|
openFirewall = !config.niksos.portable.enable;
|
||||||
settings.UseDns = true;
|
settings.UseDns = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue