Define imv keys, switch to btop, put stateful data in per-system config

This commit is contained in:
Jimbo 2024-12-06 04:03:03 -05:00
parent 0d212ce643
commit a589e07a6c
29 changed files with 121 additions and 114 deletions

View file

@ -6,6 +6,7 @@
./filesystems ./filesystems
./firewall ./firewall
./hardware ./hardware
./users
../../modules/system ../../modules/system
]; ];
@ -17,4 +18,5 @@
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
networking.hostName = "tower"; networking.hostName = "tower";
system.stateVersion = "24.05";
} }

View file

@ -0,0 +1,4 @@
{ ... }:
{
imports = [ ./jimbo ];
}

View file

@ -1,5 +1,6 @@
{ ... }: { ... }:
{ {
home-manager.users.jimbo = { home-manager.users.jimbo = {
home.stateVersion = "24.05";
}; };
} }

View file

@ -13,4 +13,6 @@
# Imports # Imports
nur.nixosModules.nur nur.nixosModules.nur
]; ];
nixpkgs.config.allowUnfree = true;
} }

View file

@ -9,9 +9,6 @@
".assets/lockscreen" = { ".assets/lockscreen" = {
source = ./assets/lockscreen; source = ./assets/lockscreen;
}; };
".icons/default" = {
source = "${pkgs.simp1e-cursors}/share/icons/Simp1e-Dark";
};
".alsoftrc" = { ".alsoftrc" = {
text = ''drivers=pulse''; text = ''drivers=pulse'';
}; };

View file

@ -3,6 +3,7 @@
imports = [ imports = [
./easyeffects ./easyeffects
./foot ./foot
./imv
./librewolf ./librewolf
./mangohud ./mangohud
./mpv ./mpv

View file

@ -0,0 +1,12 @@
{ ... }:
{
programs.imv = {
enable = true;
settings.binds = {
h = "prev";
j = "zoom -5";
k = "zoom 5";
l = "next";
};
};
}

View file

@ -7,6 +7,7 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
ffmpeg ffmpeg
ffmpegthumbnailer
puddletag puddletag
pulsemixer pulsemixer
]; ];

View file

@ -4,8 +4,8 @@
dolphin-emu dolphin-emu
cemu cemu
ryujinx ryujinx
lime3ds
duckstation duckstation
pcsx2 pcsx2
lime3ds
]; ];
} }

View file

@ -1,7 +1,4 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [ xash3d ];
openarena
xash3d
];
} }

View file

@ -2,8 +2,6 @@
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
libreoffice libreoffice
ffmpegthumbnailer
imv
bc bc
]; ];
} }

View file

@ -1,7 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
gotop
p7zip p7zip
vimv vimv
dua dua

View file

@ -0,0 +1,11 @@
{ ... }:
{
programs.btop = {
enable = true;
settings = {
vim_keys = true;
rounded_corners = false;
theme_background = false;
};
};
}

View file

@ -1,6 +1,7 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./btop
./fastfetch ./fastfetch
./git ./git
./ncmpcpp ./ncmpcpp

View file

@ -0,0 +1,9 @@
{ pkgs, ... }:
{
home.pointerCursor = {
gtk.enable = true;
name = "Simp1e-Dark";
package = pkgs.simp1e-cursors;
size = 24;
};
}

View file

@ -1,10 +1,10 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./cursor
./dconf ./dconf
./fonts ./fonts
./gtk ./gtk
./nix
./xdg ./xdg
]; ];
} }

View file

@ -0,0 +1,11 @@
{ pkgs, config, ... }:
{
gtk.gtk3.bookmarks = [
"file:///home/${config.home.username}/Keepers"
"file:///home/${config.home.username}/Downloads"
"file:///home/${config.home.username}/Documents"
"file:///home/${config.home.username}/Videos"
"file:///home/${config.home.username}/Pictures/Screenshots"
"file:///etc/nixos"
];
}

View file

@ -0,0 +1,20 @@
{ ... }:
{
gtk = {
# Disable shadows
gtk3.extraCss = ''
* { outline-width: 0px; }
decoration { box-shadow: none; }
'';
# Prevent GTK4 rounding
gtk4.extraCss = ''
window {
border-top-left-radius:0;
border-top-right-radius:0;
border-bottom-left-radius:0;
border-bottom-right-radius:0;
}
'';
};
}

View file

@ -1,5 +1,10 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
{ {
imports = [
./bookmarks
./css
];
gtk = { gtk = {
enable = true; enable = true;
font = { font = {
@ -25,36 +30,5 @@
color = "${config.look.colors.folder}"; color = "${config.look.colors.folder}";
}; };
}; };
cursorTheme = {
package = pkgs.simp1e-cursors;
name = "Simp1e-Dark";
};
gtk3 = {
bookmarks = [
"file:///home/jimbo/Keepers"
"file:///home/jimbo/Downloads"
"file:///home/jimbo/Documents"
"file:///home/jimbo/Videos"
"file:///home/jimbo/Pictures/Screenshots"
"file:///etc/nixos"
];
# Disable shadows
extraCss = ''
* { outline-width: 0px; }
decoration { box-shadow: none; }
'';
};
# Stop gtk4 from being rounded
gtk4.extraCss = ''
window {
border-top-left-radius:0;
border-top-right-radius:0;
border-bottom-left-radius:0;
border-bottom-right-radius:0;
}
'';
}; };
} }

View file

@ -1,5 +0,0 @@
{ ... }:
{
nixpkgs.config.allowUnfree = true;
home.stateVersion = "24.05";
}

View file

@ -143,10 +143,15 @@
${primeMod}+f { maximize-column; } ${primeMod}+f { maximize-column; }
${primeMod}+Shift+f { fullscreen-window; } ${primeMod}+Shift+f { fullscreen-window; }
// Niri specific // Column functions
${primeMod}+r { switch-preset-column-width; } ${primeMod}+r { switch-preset-column-width; }
${primeMod}+Shift+r { reset-window-height; } ${primeMod}+Shift+r { reset-window-height; }
${primeMod}+Shift+c { center-column; } ${primeMod}+Shift+c { center-column; }
// Move these into scratchpads if or when they get supported
${primeMod}+Shift+Backslash { spawn "sh" "-c" "foot btop"; }
${primeMod}+Shift+m { spawn "sh" "-c" "foot ncmpcpp"; }
${primeMod}+Shift+v { spawn "sh" "-c" "foot pulsemixer"; }
} }
''; '';
} }

View file

@ -5,7 +5,7 @@
startup = [ startup = [
# Scratchpads # Scratchpads
{ command = "foot -a gotop -T Gotop gotop"; } { command = "foot -a btop -T Gotop btop"; }
{ command = "foot -a music -T Music ncmpcpp"; } { command = "foot -a music -T Music ncmpcpp"; }
{ command = "foot -a sound -T Sound pulsemixer"; } { command = "foot -a sound -T Sound pulsemixer"; }

View file

@ -160,7 +160,7 @@
"${primeMod}+shift+a" = ''focus child''; "${primeMod}+shift+a" = ''focus child'';
# Scratchpads # Scratchpads
"Shift+Ctrl+Backslash" = ''[app_id="gotop"] scratchpad show, move position center, resize set 1216 888''; "${primeMod}+Shift+Backslash" = ''[app_id="btop"] scratchpad show, move position center, resize set 1216 888'';
"${primeMod}+Shift+m" = ''[app_id="music"] scratchpad show, move position center, resize set 1006 657''; "${primeMod}+Shift+m" = ''[app_id="music"] scratchpad show, move position center, resize set 1006 657'';
"${primeMod}+Shift+v" = ''[app_id="sound"] scratchpad show, move position center, resize set 1000 800''; "${primeMod}+Shift+v" = ''[app_id="sound"] scratchpad show, move position center, resize set 1000 800'';
}; };

View file

@ -10,10 +10,10 @@
# Scratchpads # Scratchpads
{ {
criteria = { con_mark = "scratchpad"; }; criteria = { con_mark = "scratchpad"; };
command = ''floating enable, sticky enable, move scratchpad, mark borderless''; command = ''floating enable, sticky enable, move scratchpad, mark giveborder'';
} }
{ {
criteria = { app_id = "gotop"; }; criteria = { app_id = "btop"; };
command = ''mark scratchpad''; command = ''mark scratchpad'';
} }
{ {
@ -27,35 +27,31 @@
# Give apps that don't have them borders # Give apps that don't have them borders
{ {
criteria = { con_mark = "borderless"; }; criteria = { con_mark = "giveborder"; };
command = ''border pixel ${config.look.border.string}''; command = ''border pixel ${config.look.border.string}'';
} }
{ {
criteria = { app_id = "com.github.wwmm.easyeffects"; }; criteria = { app_id = "com.github.wwmm.easyeffects"; };
command = ''mark borderless''; command = ''mark giveborder'';
} }
{ {
criteria = { class = "steam"; }; criteria = { class = "steam"; };
command = ''mark borderless''; command = ''mark giveborder'';
} }
{ {
criteria = { app_id = "swappy"; }; criteria = { app_id = "swappy"; };
command = ''mark borderless''; command = ''mark giveborder'';
} }
{ {
criteria = { app_id = "virt-manager"; }; criteria = { app_id = "virt-manager"; };
command = ''mark borderless''; command = ''mark giveborder'';
} }
{ {
criteria = { window_role = "pop-up"; }; criteria = { window_role = "pop-up"; };
command = ''mark borderless''; command = ''mark giveborder'';
} }
# Floating or fullscreen rules # Misc
{
criteria = { app_id = "float"; };
command = ''floating enable'';
}
{ {
criteria = { title = "^GlobalShot"; }; criteria = { title = "^GlobalShot"; };
command = ''floating enable, fullscreen enable global''; command = ''floating enable, fullscreen enable global'';

View file

@ -9,6 +9,4 @@
./settings ./settings
../extras ../extras
]; ];
system.stateVersion = "24.05";
} }

View file

@ -1,8 +1,8 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./displaymanager
./gnome-keyring ./gnome-keyring
./greetd
./gvfs ./gvfs
./keyd ./keyd
./libvirtd ./libvirtd

View file

@ -0,0 +1,14 @@
{ config, pkgs, ... }:
{
services.greetd = {
enable = config.system.desktop.enable;
restart = true;
settings = {
terminal = {
vt = 2;
switch = true;
};
default_session.command = "${pkgs.greetd.tuigreet}/bin/tuigreet";
};
};
}

View file

@ -1,39 +0,0 @@
{ config, pkgs, ... }:
{
services.greetd = {
enable = config.system.desktop.enable;
restart = true;
settings = {
terminal = {
vt = 2;
switch = true;
};
default_session.command = "${pkgs.greetd.tuigreet}/bin/tuigreet";
};
};
environment.etc."greetd/environments".text = let
initScript = ''
if ${pkgs.pciutils}/bin/lspci -k | grep "in use: nvidia" &> /dev/null; then
export LIBVA_DRIVER_NAME=nvidia
export GBM_BACKEND=nvidia-drm
export __GLX_VENDOR_LIBRARY_NAME=nvidia
else
:
fi
'';
in ''
${pkgs.writeScript "startsway" ''
${initScript}
export QT_QPA_PLATFORM="wayland;xcb"
export XDG_CURRENT_DESKTOP=sway
sway --unsupported-gpu
''}
${pkgs.writeScript "startniri" ''
${initScript}
export QT_QPA_PLATFORM=wayland
export XDG_CURRENT_DESKTOP=niri
niri-session
''}
'';
}

View file

@ -4,14 +4,12 @@
./autoupgrade ./autoupgrade
]; ];
nix = { nix.settings = {
settings = { experimental-features = [
experimental-features = [ "nix-command"
"nix-command" "flakes"
"flakes" ];
]; auto-optimise-store = true;
auto-optimise-store = true;
};
}; };
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;