move to nushell
This commit is contained in:
parent
fdd9dd20ae
commit
caf9810290
24 changed files with 521 additions and 469 deletions
|
|
@ -1,14 +1,10 @@
|
|||
/* Mullvad specific styles */
|
||||
#custom-mullvad.connected {
|
||||
color: @green;
|
||||
border-bottom: 2px solid @green;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
#custom-mullvad.disconnected {
|
||||
color: @red;
|
||||
border-bottom: 2px solid @red;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
#custom-mullvad {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
options,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
|
|
@ -24,6 +25,8 @@ in {
|
|||
bold_font ${fonts.mono} Bold Italic
|
||||
italic_font ${fonts.mono} Italic
|
||||
bold_italic_font ${fonts.mono} Bold Italic
|
||||
|
||||
shell ${lib.getExe pkgs.nushell}
|
||||
'';
|
||||
|
||||
catppuccin.enable = true;
|
||||
|
|
|
|||
|
|
@ -65,6 +65,30 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"christoomey/vim-tmux-navigator",
|
||||
cmd = {
|
||||
"TmuxNavigateLeft",
|
||||
"TmuxNavigateDown",
|
||||
"TmuxNavigateUp",
|
||||
"TmuxNavigateRight",
|
||||
"TmuxNavigatePrevious",
|
||||
"TmuxNavigatorProcessList",
|
||||
},
|
||||
keys = {
|
||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"m4xshen/hardtime.nvim",
|
||||
lazy = false,
|
||||
dependencies = { "MunifTanjim/nui.nvim" },
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ in {
|
|||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = config.programs.zsh.enable;
|
||||
enableNushellIntegration = config.programs.nushell.enable;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = "$username$directory$git_branch$git_status$python$rust$nodejs$nix_shell$cmd_duration$line_break$character";
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ in {
|
|||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
shell = "${pkgs.zsh}/bin/zsh";
|
||||
shell = "${lib.getExe pkgs.nushell}";
|
||||
historyLimit = 100000;
|
||||
plugins = with pkgs; [
|
||||
tmuxPlugins.sensible
|
||||
|
|
|
|||
|
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with pkgs; {
|
||||
ytmp3 = ''
|
||||
${getExe yt-dlp} -x --continue --add-metadata --embed-thumbnail --audio-format mp3 --audio-quality 0 --metadata-from-title="%(artist)s - %(title)s" --prefer-ffmpeg -o "%(title)s.%(ext)s"'';
|
||||
cat = "${getExe bat} --style=plain";
|
||||
vpn = "mullvad";
|
||||
uuid = "cat /proc/sys/kernel/random/uuid";
|
||||
grep = getExe ripgrep;
|
||||
fzf = getExe skim;
|
||||
untar = "tar -xvf";
|
||||
untargz = "tar -xzf";
|
||||
du = getExe du-dust;
|
||||
ps = getExe procs;
|
||||
lb = "pw-loopback -C \"alsa_input.pci-0000_0d_00.4.analog-stereo\" -P \"Scarlett Solo (3rd Gen.) Headphones / Line 1-2\"";
|
||||
deploy = "nixos-rebuild switch --flake ~/nixos#pluto --target-host zoeys.computer --use-remote-sudo";
|
||||
m = "mkdir -p";
|
||||
fcd = "cd $(find -type d | fzf)";
|
||||
l = "ls -lF --time-style=long-iso --icons";
|
||||
sc = "sudo systemctl";
|
||||
scu = "systemctl --user ";
|
||||
la = "${getExe eza} -lah --tree";
|
||||
ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension";
|
||||
tree = "${getExe eza} --tree --icons --tree";
|
||||
kys = "shutdown now";
|
||||
gpl = "curl https://www.gnu.org/licenses/gpl-3.0.txt -o LICENSE";
|
||||
agpl = "curl https://www.gnu.org/licenses/agpl-3.0.txt -o LICENSE";
|
||||
tsm = "transmission-remote";
|
||||
g = "git";
|
||||
n = "nix";
|
||||
r = "rebuild";
|
||||
vm = "nixos-rebuild build-vm --flake ~/nixos#earth";
|
||||
mnt = "udisksctl mount -b";
|
||||
umnt = "udisksctl unmount -b";
|
||||
burn = "pkill -9";
|
||||
diff = "diff --color=auto";
|
||||
wu = "vpn disconnect -w && awsvpnclient start --config ~/Downloads/cvpn-endpoint-085400ccc19bb4a17.ovpn";
|
||||
"v" = "nvim";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../../";
|
||||
"...." = "cd ../../../";
|
||||
"....." = "cd ../../../../";
|
||||
"......" = "cd ../../../../../";
|
||||
}
|
||||
|
|
@ -66,7 +66,7 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
|
||||
shellAliases = import ../aliases.nix {inherit pkgs lib config;};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -17,16 +17,13 @@ with pkgs; {
|
|||
untargz = "tar -xzf";
|
||||
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
|
||||
du = getExe du-dust;
|
||||
ps = getExe procs;
|
||||
lb = "pw-loopback -C \"alsa_input.pci-0000_0d_00.4.analog-stereo\" -P \"Scarlett Solo (3rd Gen.) Headphones / Line 1-2\"";
|
||||
deploy = "nixos-rebuild switch --flake ~/nixos#pluto --target-host zoeys.computer --use-remote-sudo";
|
||||
m = "mkdir -p";
|
||||
fcd = "cd $(find -type d | fzf)";
|
||||
l = "ls -lF --time-style=long-iso --icons";
|
||||
m = "mkdir";
|
||||
l = "exa -lF --time-style=long-iso --icons";
|
||||
sc = "sudo systemctl";
|
||||
scu = "systemctl --user ";
|
||||
la = "${getExe eza} -lah --tree";
|
||||
ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension";
|
||||
tree = "${getExe eza} --tree --icons --tree";
|
||||
kys = "shutdown now";
|
||||
lv = "nvim -c \"normal '\''0\"";
|
||||
|
|
@ -37,11 +34,8 @@ with pkgs; {
|
|||
n = "nix";
|
||||
r = "rebuild";
|
||||
vm = "nixos-rebuild build-vm --flake ~/nixos#earth";
|
||||
mnt = "udisksctl mount -b";
|
||||
umnt = "udisksctl unmount -b";
|
||||
burn = "pkill -9";
|
||||
diff = "diff --color=auto";
|
||||
wu = "vpn disconnect -w && awsvpnclient start --config ~/Downloads/cvpn-endpoint-085400ccc19bb4a17.ovpn";
|
||||
"v" = "nvim";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../../";
|
||||
|
|
|
|||
|
|
@ -17,47 +17,35 @@ in {
|
|||
programs.nushell = {
|
||||
enable = true;
|
||||
|
||||
# Nushell doesn't need generateCompletions like fish
|
||||
|
||||
extraConfig = ''
|
||||
# Environment variables
|
||||
let-env LC_ALL = "en_US.UTF-8"
|
||||
let-env SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh"
|
||||
let-env FLAKE = "/home/zoey/nixos/"
|
||||
$env.config.show_banner = false
|
||||
|
||||
# FZF settings
|
||||
let-env FZF_PREVIEW_FILE_CMD = "head -n 10"
|
||||
let-env FZF_PREVIEW_DIR_CMD = "ls"
|
||||
|
||||
def pf [] {
|
||||
fzf --bind ctrl-y:preview-up,ctrl-e:preview-down \
|
||||
--bind ctrl-b:preview-page-up,ctrl-f:preview-page-down \
|
||||
--bind ctrl-u:preview-half-page-up,ctrl-d:preview-half-page-down \
|
||||
--bind ctrl-k:up,ctrl-j:down \
|
||||
--preview='bat --style=numbers --color=always --line-range :100 {}'
|
||||
if ('TMUX' in $env == false) {
|
||||
exec tmux
|
||||
}
|
||||
|
||||
def ff [] {
|
||||
let files = (pf)
|
||||
for file in $files {
|
||||
let cmd = $"v ($file)"
|
||||
echo $cmd
|
||||
nu -c $cmd
|
||||
}
|
||||
}
|
||||
fastfetch --config minimal
|
||||
'';
|
||||
|
||||
# Nushell handles plugins differently, you might want to use modules instead
|
||||
# or configure external tools directly
|
||||
|
||||
extraEnv = ''
|
||||
# Add any environment-specific configuration here
|
||||
# Environment variables
|
||||
$env.LC_ALL = "en_US.UTF-8"
|
||||
|
||||
$env.SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh"
|
||||
$env.FLAKE = "/home/zoey/nixos/"
|
||||
|
||||
# FZF settings
|
||||
$env.FZF_PREVIEW_FILE_CMD = "head -n 10"
|
||||
$env.FZF_PREVIEW_DIR_CMD = "ls"
|
||||
'';
|
||||
|
||||
# Import aliases (you'll need to convert fish aliases to Nushell format)
|
||||
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
|
||||
};
|
||||
|
||||
programs.carapace.enable = true;
|
||||
programs.carapace.enableNushellIntegration = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gnumake
|
||||
comma
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ in {
|
|||
media = "/run/media/$USER";
|
||||
};
|
||||
|
||||
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
|
||||
shellAliases = import ../aliases.nix {inherit pkgs lib config;};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -70,9 +70,9 @@ in {
|
|||
|
||||
bind =
|
||||
[
|
||||
"${mod},RETURN,exec,${lib.getExe pkgs.alacritty}"
|
||||
"${mod},RETURN,exec,${lib.getExe pkgs.kitty}"
|
||||
|
||||
"${mod},D,exec,rofi -show drun"
|
||||
"${mod},D,exec,fuzzel"
|
||||
"${mod},Q,killactive"
|
||||
"${mod},M,exit"
|
||||
"${mod},P,pseudo"
|
||||
|
|
@ -129,8 +129,8 @@ in {
|
|||
allow_tearing = true;
|
||||
|
||||
# active border color
|
||||
"col.active_border" = "rgb(${colors.lavender.hex})";
|
||||
"col.inactive_border" = "rgb(${colors.base.hex})";
|
||||
"col.active_border" = "${colors.lavender.rgb}";
|
||||
"col.inactive_border" = "${colors.base.rgb}";
|
||||
};
|
||||
|
||||
input = {
|
||||
|
|
@ -199,7 +199,7 @@ in {
|
|||
};
|
||||
|
||||
# for 10 bit color: DP-3,2560x1440@240,0x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,1.0
|
||||
monitor = ["DP-3,2560x1440@240,0x0,1" "HDMI-A-1,disable" "DP-1,disable"];
|
||||
monitor = ["DP-1,2560x1440@240,0x0,1" "HDMI-A-1,disable"];
|
||||
|
||||
layerrule = [
|
||||
"blur, ^(gtk-layer-shell)$"
|
||||
|
|
@ -257,14 +257,14 @@ in {
|
|||
# };
|
||||
# };
|
||||
|
||||
systemd.user.services = {
|
||||
swaybg = mkService {
|
||||
Unit.Description = "Wallpaper chooser";
|
||||
Service = {
|
||||
ExecStart = "${getExe pkgs.swaybg} -i ${wallpaper}";
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
};
|
||||
# systemd.user.services = {
|
||||
# swaybg = mkService {
|
||||
# Unit.Description = "Wallpaper chooser";
|
||||
# Service = {
|
||||
# ExecStart = "${getExe pkgs.swaybg} -i ${wallpaper}";
|
||||
# Restart = "always";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ with lib.custom; let
|
|||
|
||||
actions = config.lib.niri.actions;
|
||||
|
||||
niri = "${config.programs.niri.package}/bin/niri";
|
||||
|
||||
mkColor = color: {inherit color;};
|
||||
mkGradient = from: to: {
|
||||
angle ? 180,
|
||||
|
|
@ -332,200 +334,171 @@ in {
|
|||
};
|
||||
|
||||
# Keybindings
|
||||
binds = {
|
||||
"Mod+Shift+Slash" = {action = actions.show-hotkey-overlay;};
|
||||
binds =
|
||||
{
|
||||
"Mod+Shift+Slash" = {action = actions.show-hotkey-overlay;};
|
||||
|
||||
"Mod+Return" = {action = actions.spawn "kitty";};
|
||||
"Mod+D" = {action = actions.spawn "fuzzel";};
|
||||
"Super+Alt+L" = {action = actions.spawn "swaylock";};
|
||||
# "Mod+T" = { action = actions.spawn "bash" "-c" "notify-send hello && exec alacritty"; };
|
||||
"Mod+Return" = {action = actions.spawn "kitty";};
|
||||
"Mod+D" = {action = actions.spawn "fuzzel";};
|
||||
"Super+Alt+L" = {action = actions.spawn "swaylock";};
|
||||
# "Mod+T" = { action = actions.spawn "bash" "-c" "notify-send hello && exec alacritty"; };
|
||||
|
||||
# "Mod+S" = {action = actions.set-dynamic-cast-window;};
|
||||
#
|
||||
# "Mod+Shift+S" = {action = actions.set-dynamic-cast-monitor;};
|
||||
#
|
||||
# "Mod+Z" = {action = actions.clear-dynamic-cast-target;};
|
||||
# "Mod+S" = {action = actions.set-dynamic-cast-window;};
|
||||
#
|
||||
# "Mod+Shift+S" = {action = actions.set-dynamic-cast-monitor;};
|
||||
#
|
||||
# "Mod+Z" = {action = actions.clear-dynamic-cast-target;};
|
||||
|
||||
"XF86AudioRaiseVolume" = {
|
||||
allow-when-locked = true;
|
||||
action = actions.spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+";
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
allow-when-locked = true;
|
||||
action = actions.spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-";
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
allow-when-locked = true;
|
||||
action = actions.spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle";
|
||||
};
|
||||
"XF86AudioMicMute" = {
|
||||
allow-when-locked = true;
|
||||
action =
|
||||
actions.spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle";
|
||||
};
|
||||
"XF86AudioRaiseVolume" = {
|
||||
allow-when-locked = true;
|
||||
action = actions.spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+";
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
allow-when-locked = true;
|
||||
action = actions.spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-";
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
allow-when-locked = true;
|
||||
action = actions.spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle";
|
||||
};
|
||||
"XF86AudioMicMute" = {
|
||||
allow-when-locked = true;
|
||||
action =
|
||||
actions.spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle";
|
||||
};
|
||||
|
||||
"Mod+Q" = {action = actions.close-window;};
|
||||
"Mod+Q" = {action = actions.close-window;};
|
||||
|
||||
"Mod+Left" = {action = actions.focus-column-left;};
|
||||
"Mod+Down" = {action = actions.focus-window-down;};
|
||||
"Mod+Up" = {action = actions.focus-window-up;};
|
||||
"Mod+Right" = {action = actions.focus-column-right;};
|
||||
"Mod+H" = {action = actions.focus-column-left;};
|
||||
"Mod+J" = {action = actions.focus-window-down;};
|
||||
"Mod+K" = {action = actions.focus-window-up;};
|
||||
"Mod+L" = {action = actions.focus-column-right;};
|
||||
"Mod+Left" = {action = actions.focus-column-left;};
|
||||
"Mod+Down" = {action = actions.focus-window-down;};
|
||||
"Mod+Up" = {action = actions.focus-window-up;};
|
||||
"Mod+Right" = {action = actions.focus-column-right;};
|
||||
"Mod+H" = {action = actions.focus-column-left;};
|
||||
"Mod+J" = {action = actions.focus-window-down;};
|
||||
"Mod+K" = {action = actions.focus-window-up;};
|
||||
"Mod+L" = {action = actions.focus-column-right;};
|
||||
|
||||
"Mod+Ctrl+Left" = {action = actions.move-column-left;};
|
||||
"Mod+Ctrl+Down" = {action = actions.move-window-down;};
|
||||
"Mod+Ctrl+Up" = {action = actions.move-window-up;};
|
||||
"Mod+Ctrl+Right" = {action = actions.move-column-right;};
|
||||
"Mod+Ctrl+H" = {action = actions.move-column-left;};
|
||||
"Mod+Ctrl+J" = {action = actions.move-window-down;};
|
||||
"Mod+Ctrl+K" = {action = actions.move-window-up;};
|
||||
"Mod+Ctrl+L" = {action = actions.move-column-right;};
|
||||
"Mod+Ctrl+Left" = {action = actions.move-column-left;};
|
||||
"Mod+Ctrl+Down" = {action = actions.move-window-down;};
|
||||
"Mod+Ctrl+Up" = {action = actions.move-window-up;};
|
||||
"Mod+Ctrl+Right" = {action = actions.move-column-right;};
|
||||
"Mod+Ctrl+H" = {action = actions.move-column-left;};
|
||||
"Mod+Ctrl+J" = {action = actions.move-window-down;};
|
||||
"Mod+Ctrl+K" = {action = actions.move-window-up;};
|
||||
"Mod+Ctrl+L" = {action = actions.move-column-right;};
|
||||
|
||||
# Alternative commands (commented out in KDL)
|
||||
# "Mod+J" = { action = actions.focus-window-or-workspace-down; };
|
||||
# "Mod+K" = { action = actions.focus-window-or-workspace-up; };
|
||||
# "Mod+Ctrl+J" = { action = actions.move-window-down-or-to-workspace-down; };
|
||||
# "Mod+Ctrl+K" = { action = actions.move-window-up-or-to-workspace-up; };
|
||||
# Alternative commands (commented out in KDL)
|
||||
# "Mod+J" = { action = actions.focus-window-or-workspace-down; };
|
||||
# "Mod+K" = { action = actions.focus-window-or-workspace-up; };
|
||||
# "Mod+Ctrl+J" = { action = actions.move-window-down-or-to-workspace-down; };
|
||||
# "Mod+Ctrl+K" = { action = actions.move-window-up-or-to-workspace-up; };
|
||||
|
||||
"Mod+Home" = {action = actions.focus-column-first;};
|
||||
"Mod+End" = {action = actions.focus-column-last;};
|
||||
"Mod+Ctrl+Home" = {action = actions.move-column-to-first;};
|
||||
"Mod+Ctrl+End" = {action = actions.move-column-to-last;};
|
||||
"Mod+Home" = {action = actions.focus-column-first;};
|
||||
"Mod+End" = {action = actions.focus-column-last;};
|
||||
"Mod+Ctrl+Home" = {action = actions.move-column-to-first;};
|
||||
"Mod+Ctrl+End" = {action = actions.move-column-to-last;};
|
||||
|
||||
"Mod+Shift+Left" = {action = actions.focus-monitor-left;};
|
||||
"Mod+Shift+Down" = {action = actions.focus-monitor-down;};
|
||||
"Mod+Shift+Up" = {action = actions.focus-monitor-up;};
|
||||
"Mod+Shift+Right" = {action = actions.focus-monitor-right;};
|
||||
"Mod+Shift+H" = {action = actions.focus-monitor-left;};
|
||||
"Mod+Shift+J" = {action = actions.focus-workspace-down;};
|
||||
"Mod+Shift+K" = {action = actions.focus-workspace-up;};
|
||||
"Mod+Shift+L" = {action = actions.focus-monitor-right;};
|
||||
"Mod+Shift+Left" = {action = actions.focus-monitor-left;};
|
||||
"Mod+Shift+Down" = {action = actions.focus-monitor-down;};
|
||||
"Mod+Shift+Up" = {action = actions.focus-monitor-up;};
|
||||
"Mod+Shift+Right" = {action = actions.focus-monitor-right;};
|
||||
"Mod+Shift+H" = {action = actions.focus-monitor-left;};
|
||||
"Mod+Shift+J" = {action = actions.focus-workspace-down;};
|
||||
"Mod+Shift+K" = {action = actions.focus-workspace-up;};
|
||||
"Mod+Shift+L" = {action = actions.focus-monitor-right;};
|
||||
|
||||
"Mod+Ctrl+Shift+F" = {action = actions.toggle-windowed-fullscreen;};
|
||||
"Mod+Ctrl+Shift+F" = {action = actions.toggle-windowed-fullscreen;};
|
||||
|
||||
"Mod+Shift+Ctrl+Left" = {action = actions.move-column-to-monitor-left;};
|
||||
"Mod+Shift+Ctrl+Down" = {action = actions.move-column-to-monitor-down;};
|
||||
"Mod+Shift+Ctrl+Up" = {action = actions.move-column-to-monitor-up;};
|
||||
"Mod+Shift+Ctrl+Right" = {action = actions.move-column-to-monitor-right;};
|
||||
"Mod+Shift+Ctrl+H" = {action = actions.move-column-to-monitor-left;};
|
||||
"Mod+Shift+Ctrl+J" = {action = actions.move-column-to-monitor-down;};
|
||||
"Mod+Shift+Ctrl+K" = {action = actions.move-column-to-monitor-up;};
|
||||
"Mod+Shift+Ctrl+L" = {action = actions.move-column-to-monitor-right;};
|
||||
"Mod+Shift+Ctrl+Left" = {action = actions.move-column-to-monitor-left;};
|
||||
"Mod+Shift+Ctrl+Down" = {action = actions.move-column-to-monitor-down;};
|
||||
"Mod+Shift+Ctrl+Up" = {action = actions.move-column-to-monitor-up;};
|
||||
"Mod+Shift+Ctrl+Right" = {action = actions.move-column-to-monitor-right;};
|
||||
"Mod+Shift+Ctrl+H" = {action = actions.move-column-to-monitor-left;};
|
||||
"Mod+Shift+Ctrl+J" = {action = actions.move-column-to-monitor-down;};
|
||||
"Mod+Shift+Ctrl+K" = {action = actions.move-column-to-monitor-up;};
|
||||
"Mod+Shift+Ctrl+L" = {action = actions.move-column-to-monitor-right;};
|
||||
|
||||
# Alternative move commands (commented out in KDL)
|
||||
# "Mod+Shift+Ctrl+Left" = { action = actions.move-window-to-monitor-left; };
|
||||
# "Mod+Shift+Ctrl+Left" = { action = actions.move-workspace-to-monitor-left; };
|
||||
"Mod+Page_Down" = {action = actions.focus-workspace-down;};
|
||||
"Mod+Page_Up" = {action = actions.focus-workspace-up;};
|
||||
"Mod+U" = {action = actions.focus-workspace-down;};
|
||||
"Mod+I" = {action = actions.focus-workspace-up;};
|
||||
"Mod+Ctrl+Page_Down" = {action = actions.move-column-to-workspace-down;};
|
||||
"Mod+Ctrl+Page_Up" = {action = actions.move-column-to-workspace-up;};
|
||||
"Mod+Ctrl+U" = {action = actions.move-column-to-workspace-down;};
|
||||
"Mod+Ctrl+I" = {action = actions.move-column-to-workspace-up;};
|
||||
|
||||
"Mod+Page_Down" = {action = actions.focus-workspace-down;};
|
||||
"Mod+Page_Up" = {action = actions.focus-workspace-up;};
|
||||
"Mod+U" = {action = actions.focus-workspace-down;};
|
||||
"Mod+I" = {action = actions.focus-workspace-up;};
|
||||
"Mod+Ctrl+Page_Down" = {action = actions.move-column-to-workspace-down;};
|
||||
"Mod+Ctrl+Page_Up" = {action = actions.move-column-to-workspace-up;};
|
||||
"Mod+Ctrl+U" = {action = actions.move-column-to-workspace-down;};
|
||||
"Mod+Ctrl+I" = {action = actions.move-column-to-workspace-up;};
|
||||
"Mod+Shift+Page_Down" = {action = actions.move-workspace-down;};
|
||||
"Mod+Shift+Page_Up" = {action = actions.move-workspace-up;};
|
||||
"Mod+Shift+U" = {action = actions.move-workspace-down;};
|
||||
"Mod+Shift+I" = {action = actions.move-workspace-up;};
|
||||
|
||||
# Alternative move commands (commented out in KDL)
|
||||
# "Mod+Ctrl+Page_Down" = { action = actions.move-window-to-workspace-down; };
|
||||
"Mod+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action = actions.focus-workspace-down;
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action = actions.focus-workspace-up;
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action = actions.move-column-to-workspace-down;
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action = actions.move-column-to-workspace-up;
|
||||
};
|
||||
|
||||
"Mod+Shift+Page_Down" = {action = actions.move-workspace-down;};
|
||||
"Mod+Shift+Page_Up" = {action = actions.move-workspace-up;};
|
||||
"Mod+Shift+U" = {action = actions.move-workspace-down;};
|
||||
"Mod+Shift+I" = {action = actions.move-workspace-up;};
|
||||
"Mod+WheelScrollRight" = {action = actions.focus-column-right;};
|
||||
"Mod+WheelScrollLeft" = {action = actions.focus-column-left;};
|
||||
"Mod+Ctrl+WheelScrollRight" = {action = actions.move-column-right;};
|
||||
"Mod+Ctrl+WheelScrollLeft" = {action = actions.move-column-left;};
|
||||
|
||||
"Mod+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action = actions.focus-workspace-down;
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action = actions.focus-workspace-up;
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action = actions.move-column-to-workspace-down;
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action = actions.move-column-to-workspace-up;
|
||||
};
|
||||
"Mod+Shift+WheelScrollDown" = {action = actions.focus-column-right;};
|
||||
"Mod+Shift+WheelScrollUp" = {action = actions.focus-column-left;};
|
||||
"Mod+Ctrl+Shift+WheelScrollDown" = {action = actions.move-column-right;};
|
||||
"Mod+Ctrl+Shift+WheelScrollUp" = {action = actions.move-column-left;};
|
||||
|
||||
"Mod+WheelScrollRight" = {action = actions.focus-column-right;};
|
||||
"Mod+WheelScrollLeft" = {action = actions.focus-column-left;};
|
||||
"Mod+Ctrl+WheelScrollRight" = {action = actions.move-column-right;};
|
||||
"Mod+Ctrl+WheelScrollLeft" = {action = actions.move-column-left;};
|
||||
"Mod+Comma" = {action = actions.consume-window-into-column;};
|
||||
"Mod+Period" = {action = actions.expel-window-from-column;};
|
||||
|
||||
"Mod+Shift+WheelScrollDown" = {action = actions.focus-column-right;};
|
||||
"Mod+Shift+WheelScrollUp" = {action = actions.focus-column-left;};
|
||||
"Mod+Ctrl+Shift+WheelScrollDown" = {action = actions.move-column-right;};
|
||||
"Mod+Ctrl+Shift+WheelScrollUp" = {action = actions.move-column-left;};
|
||||
"Mod+BracketLeft" = {action = actions.consume-or-expel-window-left;};
|
||||
"Mod+BracketRight" = {action = actions.consume-or-expel-window-right;};
|
||||
|
||||
# Touchpad scroll binds (commented out in KDL)
|
||||
# "Mod+TouchpadScrollDown" = { action = actions.spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; };
|
||||
# "Mod+TouchpadScrollUp" = { action = actions.spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; };
|
||||
"Mod+R" = {action = actions.switch-preset-column-width;};
|
||||
"Mod+Shift+R" = {action = actions.switch-preset-window-height;};
|
||||
"Mod+Ctrl+R" = {action = actions.reset-window-height;};
|
||||
"Mod+F" = {action = actions.maximize-column;};
|
||||
"Mod+Shift+F" = {action = actions.fullscreen-window;};
|
||||
"Mod+C" = {action = actions.center-column;};
|
||||
"Mod+Ctrl+F" = {action = actions.expand-column-to-available-width;};
|
||||
|
||||
"Mod+1" = {action = actions.focus-workspace 1;};
|
||||
"Mod+2" = {action = actions.focus-workspace 2;};
|
||||
"Mod+3" = {action = actions.focus-workspace 3;};
|
||||
"Mod+4" = {action = actions.focus-workspace 4;};
|
||||
"Mod+5" = {action = actions.focus-workspace 5;};
|
||||
"Mod+6" = {action = actions.focus-workspace 6;};
|
||||
"Mod+7" = {action = actions.focus-workspace 7;};
|
||||
"Mod+8" = {action = actions.focus-workspace 8;};
|
||||
"Mod+9" = {action = actions.focus-workspace 9;};
|
||||
"Mod+Shift+1" = {action = actions.move-column-to-workspace 1;};
|
||||
"Mod+Shift+2" = {action = actions.move-column-to-workspace 2;};
|
||||
"Mod+Shift+3" = {action = actions.move-column-to-workspace 3;};
|
||||
"Mod+Shift+4" = {action = actions.move-column-to-workspace 4;};
|
||||
"Mod+Shift+5" = {action = actions.move-column-to-workspace 5;};
|
||||
"Mod+Shift+6" = {action = actions.move-column-to-workspace 6;};
|
||||
"Mod+Shift+7" = {action = actions.move-column-to-workspace 7;};
|
||||
"Mod+Shift+8" = {action = actions.move-column-to-workspace 8;};
|
||||
"Mod+Shift+9" = {action = actions.move-column-to-workspace 9;};
|
||||
"Mod+V" = {action = actions.toggle-window-floating;};
|
||||
|
||||
# Alternative move commands (commented out in KDL)
|
||||
# "Mod+Ctrl+1" = { action = actions.move-window-to-workspace 1; };
|
||||
"Mod+Minus" = {action = actions.set-column-width "-10%";};
|
||||
"Mod+Equal" = {action = actions.set-column-width "+10%";};
|
||||
|
||||
# "Mod+Tab" = { action = actions.focus-workspace-previous; }; # Commented out
|
||||
"Mod+Shift+Minus" = {action = actions.set-window-height "-10%";};
|
||||
"Mod+Shift+Equal" = {action = actions.set-window-height "+10%";};
|
||||
|
||||
"Mod+Comma" = {action = actions.consume-window-into-column;};
|
||||
"Mod+Period" = {action = actions.expel-window-from-column;};
|
||||
"Print" = {action = actions.screenshot {};}; # Empty attrset for default args
|
||||
"Mod+Shift+E" = {action = actions.quit {};}; # Default: no skip-confirmation
|
||||
"Ctrl+Alt+Delete" = {action = actions.quit {};};
|
||||
|
||||
"Mod+BracketLeft" = {action = actions.consume-or-expel-window-left;};
|
||||
"Mod+BracketRight" = {action = actions.consume-or-expel-window-right;};
|
||||
|
||||
"Mod+R" = {action = actions.switch-preset-column-width;};
|
||||
"Mod+Shift+R" = {action = actions.switch-preset-window-height;};
|
||||
"Mod+Ctrl+R" = {action = actions.reset-window-height;};
|
||||
"Mod+F" = {action = actions.maximize-column;};
|
||||
"Mod+Shift+F" = {action = actions.fullscreen-window;};
|
||||
"Mod+C" = {action = actions.center-column;};
|
||||
"Mod+Ctrl+F" = {action = actions.expand-column-to-available-width;};
|
||||
|
||||
"Mod+V" = {action = actions.toggle-window-floating;};
|
||||
|
||||
"Mod+Minus" = {action = actions.set-column-width "-10%";};
|
||||
"Mod+Equal" = {action = actions.set-column-width "+10%";};
|
||||
|
||||
"Mod+Shift+Minus" = {action = actions.set-window-height "-10%";};
|
||||
"Mod+Shift+Equal" = {action = actions.set-window-height "+10%";};
|
||||
|
||||
# Layout switching (commented out in KDL)
|
||||
# "Mod+Space" = { action = actions.switch-layout "next"; };
|
||||
# "Mod+Shift+Space" = { action = actions.switch-layout "prev"; };
|
||||
|
||||
"Print" = {action = actions.screenshot {};}; # Empty attrset for default args
|
||||
# "Ctrl+Print" = {action = actions.screenshot-screen {};}; # Empty attrset for default args
|
||||
# "Alt+Print" = {action = actions.screenshot-window {};}; # Empty attrset for default args
|
||||
|
||||
"Mod+Shift+E" = {action = actions.quit {};}; # Default: no skip-confirmation
|
||||
"Ctrl+Alt+Delete" = {action = actions.quit {};};
|
||||
|
||||
"Mod+Shift+P" = {action = actions.power-off-monitors;};
|
||||
};
|
||||
"Mod+Shift+P" = {action = actions.power-off-monitors;};
|
||||
}
|
||||
// lib.attrsets.listToAttrs (builtins.concatMap (i:
|
||||
with actions; [
|
||||
{
|
||||
name = "Mod+${toString i}";
|
||||
value.action = focus-workspace i;
|
||||
}
|
||||
# FIXME: use this action directly untril sodiboo/niri-flake#1018 is fixed.
|
||||
{
|
||||
name = "Mod+Shift+${toString i}";
|
||||
value.action = spawn [niri "msg" "action" "move-column-to-workspace" (toString i)];
|
||||
}
|
||||
]) (lib.range 1 9));
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -173,6 +173,10 @@ in {
|
|||
in [env];
|
||||
};
|
||||
|
||||
systemd.services.libvirtd-config = {
|
||||
enable = lib.mkForce false;
|
||||
};
|
||||
|
||||
system.activationScripts.libvirt-hooks.text = ''
|
||||
ln -Tfs /etc/libvirt/hooks /var/lib/libvirt/hooks
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -44,42 +44,43 @@ in {
|
|||
nvidiaSettings = false;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta.overrideAttrs {
|
||||
patchesOpen = with pkgs; [
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0001-Enable-atomic-kernel-modesetting-by-default.patch";
|
||||
hash = "sha256-tvdm8nxxXslPUun33zj1kkYZOiWKK3F4nwcCkdzPW9s=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0002-Add-IBT-support.patch";
|
||||
hash = "sha256-JUT8FwBhyRhOWxwET7Zw/xkIl8g6UCLMXSTofr0OuSg=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0003-Kbuild-Convert-EXTRA_CFLAGS-to-ccflags-y.patch";
|
||||
hash = "sha256-W+yyiK6TpEs9IACMr/0V7EIP++u7MPOfa9ko3w8Gqtc=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0004-kernel-open-nvidia-Use-new-timer-functions-for-6.15.patch";
|
||||
hash = "sha256-T3SY2O6Pmc8BA0oana5xGGDhBxCizwmRqMyPvgF3j8A=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0005-nvidia-uvm-Use-__iowrite64_hi_lo.patch";
|
||||
hash = "sha256-T8BNr1H1vgEQoKB0S5cqcbq6fSQxiDK9bb/MCvMtzTI";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0006-nvidia-uvm-Use-page_pgmap.patch";
|
||||
hash = "sha256-YucFZ2Z7YSgUiah82uLOmd4Z/c5YLOXxzEZNO6ZvQQg=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0007-nvidia-uvm-Convert-make_device_exclusive_range-to-ma.patch";
|
||||
hash = "sha256-AehV7D+yYBmE8FWsUiagnjB8V7S8RJSTNcVMwZIgw/I=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0008-kbuild-Add-workaround-for-GCC-15-Compilation.patch";
|
||||
hash = "sha256-HrYBiAFy62Jll+ceVnGuJKGKDoaRObjAGIYa+yrAogA=";
|
||||
})
|
||||
];
|
||||
};
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.beta.overrideAttrs {
|
||||
# patchesOpen = with pkgs; [
|
||||
# (fetchpatch {
|
||||
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0001-Enable-atomic-kernel-modesetting-by-default.patch";
|
||||
# hash = "sha256-tvdm8nxxXslPUun33zj1kkYZOiWKK3F4nwcCkdzPW9s=";
|
||||
# })
|
||||
# (fetchpatch {
|
||||
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0002-Add-IBT-support.patch";
|
||||
# hash = "sha256-JUT8FwBhyRhOWxwET7Zw/xkIl8g6UCLMXSTofr0OuSg=";
|
||||
# })
|
||||
# (fetchpatch {
|
||||
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0003-Kbuild-Convert-EXTRA_CFLAGS-to-ccflags-y.patch";
|
||||
# hash = "sha256-W+yyiK6TpEs9IACMr/0V7EIP++u7MPOfa9ko3w8Gqtc=";
|
||||
# })
|
||||
# (fetchpatch {
|
||||
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0004-kernel-open-nvidia-Use-new-timer-functions-for-6.15.patch";
|
||||
# hash = "sha256-T3SY2O6Pmc8BA0oana5xGGDhBxCizwmRqMyPvgF3j8A=";
|
||||
# })
|
||||
# (fetchpatch {
|
||||
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0005-nvidia-uvm-Use-__iowrite64_hi_lo.patch";
|
||||
# hash = "sha256-T8BNr1H1vgEQoKB0S5cqcbq6fSQxiDK9bb/MCvMtzTI";
|
||||
# })
|
||||
# (fetchpatch {
|
||||
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0006-nvidia-uvm-Use-page_pgmap.patch";
|
||||
# hash = "sha256-YucFZ2Z7YSgUiah82uLOmd4Z/c5YLOXxzEZNO6ZvQQg=";
|
||||
# })
|
||||
# (fetchpatch {
|
||||
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0007-nvidia-uvm-Convert-make_device_exclusive_range-to-ma.patch";
|
||||
# hash = "sha256-AehV7D+yYBmE8FWsUiagnjB8V7S8RJSTNcVMwZIgw/I=";
|
||||
# })
|
||||
# (fetchpatch {
|
||||
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0008-kbuild-Add-workaround-for-GCC-15-Compilation.patch";
|
||||
# hash = "sha256-HrYBiAFy62Jll+ceVnGuJKGKDoaRObjAGIYa+yrAogA=";
|
||||
# })
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
environment.variables = {
|
||||
|
|
|
|||
|
|
@ -15,12 +15,8 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.etc."greetd/environments".text = ''
|
||||
sway
|
||||
'';
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "niri-session";
|
||||
|
|
@ -29,6 +25,12 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.displayManager.gdm.wayland = true;
|
||||
|
||||
# services.displayManager.sddm.enable = true;
|
||||
# services.displayManager.sddm.package = lib.mkForce pkgs.kdePackages.sddm;
|
||||
|
||||
programs.uwsm = {
|
||||
waylandCompositors = {
|
||||
# "mwc" = {
|
||||
|
|
@ -49,8 +51,8 @@ in {
|
|||
# ];
|
||||
|
||||
programs.hyprland = {
|
||||
withUWSM = true;
|
||||
enable = true;
|
||||
withUWSM = false;
|
||||
enable = false;
|
||||
xwayland.enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
||||
|
|
@ -80,7 +82,6 @@ in {
|
|||
SDL_VIDEODRIVER = "wayland,x11";
|
||||
XDG_CACHE_HOME = "/home/zoey/.cache";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||
|
||||
# # CachyOS-inspired Nvidia optimizations for gaming
|
||||
# __GL_THREADED_OPTIMIZATIONS = "1";
|
||||
|
|
|
|||
23
modules/nixos/services/gdm-fuckery/default.nix
Normal file
23
modules/nixos/services/gdm-fuckery/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.custom; let
|
||||
cfg = config.services.gdm-monitors;
|
||||
|
||||
montiorsXmlContent = builtins.readFile ./monitors.xml;
|
||||
monitorsConfig = pkgs.writeText "gdm_monitors.xml" montiorsXmlContent;
|
||||
in {
|
||||
options.services.gdm-monitors = with types; {
|
||||
enable = mkBoolOpt false "Enable Monitors config for GDM";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /run/gdm/.config/monitors.xml - - - - ${monitorsConfig}"
|
||||
];
|
||||
};
|
||||
}
|
||||
24
modules/nixos/services/gdm-fuckery/monitors.xml
Normal file
24
modules/nixos/services/gdm-fuckery/monitors.xml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<monitors version="2">
|
||||
<configuration>
|
||||
<layoutmode>physical</layoutmode>
|
||||
<logicalmonitor>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<scale>1</scale>
|
||||
<primary>yes</primary>
|
||||
<monitor>
|
||||
<monitorspec>
|
||||
<connector>DP-1</connector>
|
||||
<vendor>AUS</vendor>
|
||||
<product>PG27AQDM</product>
|
||||
<serial>R5LMRS022182</serial>
|
||||
</monitorspec>
|
||||
<mode>
|
||||
<width>2560</width>
|
||||
<height>1440</height>
|
||||
<rate>239.972</rate>
|
||||
</mode>
|
||||
</monitor>
|
||||
</logicalmonitor>
|
||||
</configuration>
|
||||
</monitors>
|
||||
Loading…
Add table
Add a link
Reference in a new issue