Add 'old-conf/' from commit '62a64a79a8'

git-subtree-dir: old-conf
git-subtree-mainline: 4667974392
git-subtree-split: 62a64a79a8
This commit is contained in:
Lucy Hochkamp 2025-11-21 13:33:06 +01:00
commit 83de52d5db
195 changed files with 13408 additions and 0 deletions

View file

@ -0,0 +1,99 @@
(defcfg
;; ** For Linux **
input (device-file "/dev/input/by-id/usb-04d9_USB-HID_Keyboard-event-kbd")
;; input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
output (uinput-sink "KMonad output")
;; ** For Windows **
;; input (low-level-hook)
;; output (send-event-sink)
;; ** For MacOS **
;; input (iokit-name "my-keyboard-product-string")
;; output (kext)
fallthrough true
)
(defsrc
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ]
caps a s d f g h j k l ; ' \ ret
lsft 102d z x c v b n m , . / rsft
lctl lmet lalt spc ralt rmet cmp rctl
)
(defalias
ext (layer-toggle extend) ;; Bind 'ext' to the Extend Layer
)
(defalias
cpy C-c
pst C-v
cut C-x
udo C-z
all C-a
fnd C-f
bk Back
fw Forward
)
(defalias
num (layer-toggle num)
t (tap-hold-next-release 200 t (layer-toggle hjkl))
)
(deflayer colemak-dh
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w f p b j l u y ; [ ]
esc (tap-hold-next-release 200 a lctrl) (tap-hold-next-release 200 r ralt) (tap-hold-next-release 200 s lmet) @t g m n (tap-hold-next-release 200 e rmet) (tap-hold-next-release 200 i lalt) (tap-hold-next-release 200 o rctrl) ' \\ ret
lsft z x c d v 102d k h , . / rsft
lctl lmet lalt spc ralt rmet _ _
)
(deflayer hjkl
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w f p b j l u y ; [ ]
esc (tap-hold-next-release 200 a lctrl) (tap-hold-next-release 200 r ralt) (tap-hold-next-release 200 s lmet) t g m h j k l ' \\ ret
lsft z x c d v 102d k h , . / rsft
lctl lmet lalt spc ralt rmet _ _
)
(deflayer num
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w f p b j l u y ; [ ]
esc 1 2 3 4 5 6 7 8 9 0 ' \\ ret
lsft z x c d v 102d k h , . / rsft
lctl lmet lalt spc ralt rmet _ _
)
(deflayer colemak-dhk
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w f p b j l u y ; [ ]
@ext a r s t g k n e i o ' \\ ret
lsft z x c d v 102d m h , . / rsft
lctl lmet lalt spc ralt rmet _ _
)
(deflayer extend
_ play rewind previoussong nextsong ejectcd refresh brdn brup www mail prog1 prog2
_ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 _
_ esc @bk @fnd @fw ins pgup home up end menu prnt slck
_ lalt lmet lsft lctl ralt pgdn lft down rght del caps _ _
_ @udo @cut @cpy tab @pst _ pgdn bks lsft lctl comp _
_ _ _ ret _ _ _ _
)
(deflayer empty
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _
)

View file

@ -0,0 +1,387 @@
{
config,
inputs,
pkgs,
lib,
...
}:
{
imports = [
./hardware-configuration.nix
./kmonad.nix
../../nixos-modules/networking/tailscale.nix
../../nixos-modules/services/ssh.nix
../../nixos-modules/system/agenix.nix
../../nixos-modules/system/persist.nix
../../nixos-modules/user
# ./gnome.nix
];
# For mount.cifs, required unless domain name resolution is not needed.
environment.systemPackages = [ pkgs.cifs-utils ];
nix.extraOptions = # devenv
''
trusted-users = root ragon
'';
users.extraGroups.plugdev = { };
services.udev.packages = [
pkgs.openocd
pkgs.probe-rs-tools
];
hardware.keyboard.zsa.enable = true;
services.tailscale.useRoutingFeatures = lib.mkForce "client";
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
config = {
river = {
"org.freedesktop.impl.portal.Secret" = [
"gnome-keyring"
];
default = [
"gtk"
];
"org.freedesktop.impl.portal.Screenshot" = "wlr";
"org.freedesktop.impl.portal.ScreenCast" = "wlr";
};
};
};
ragon.agenix.secrets.smbSecrets = { };
# fileSystems."/data" = {
# device = "//ds9.kangaroo-galaxy.ts.net/data";
# fsType = "cifs";
# options = let
# automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
# in ["${automount_opts},credentials=${config.age.secrets.smbSecrets.path},uid=1000,gid=100"];
# };
# Don't Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.initrd.luks.devices.cryptroot.device =
"/dev/disk/by-uuid/4cd8dbb3-8eea-48ff-87b1-92945be291ac";
programs.fuse.userAllowOther = true;
programs.sway.enable = true;
programs.nix-ld.enable = true;
programs.gamescope.enable = true;
programs.wireshark.enable = true;
services.gnome.sushi.enable = true;
services.gnome.gnome-settings-daemon.enable = true;
services.gvfs.enable = true;
services.logind.extraConfig = ''
# supspend on pw button press
HandlePowerKey=suspend
'';
programs.kdeconnect.enable = true;
services.power-profiles-daemon.enable = true;
programs.sway.extraSessionCommands = ''
export NIXOS_OZONE_WL=1
'';
# start bt
hardware.bluetooth.enable = true;
services.blueman.enable = true;
# end bt
# start printing
services.avahi = {
enable = true;
nssmdns4 = true;
nssmdns6 = true;
openFirewall = true;
};
services.printing.enable = true;
services.printing.logLevel = "debug";
# end printing
programs.light.enable = true;
# networking.networkmanager.enable = true;
# networking.networkmanager.wifi.backend = "iwd";
networking.wireless.iwd.enable = true;
networking.useDHCP = lib.mkDefault true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.enable = true;
services.xserver.displayManager.gdm.wayland = true;
programs.seahorse.enable = true;
services.gnome.gnome-keyring.enable = true;
services.gnome.gnome-online-accounts.enable = true;
services.gnome.core-utilities.enable = true;
services.displayManager.defaultSession = "river";
programs.river.enable = true;
services.upower.enable = true;
users.users.ragon.extraGroups = [
"networkmanager"
"video"
"netdev"
"plugdev"
"dialout"
"tape"
"uucp"
"wireshark"
];
fonts.packages = with pkgs; [
nerdfonts
cantarell-fonts
dejavu_fonts
source-code-pro # Default monospace font in 3.32
source-sans
b612
];
services.pipewire = {
enable = true;
raopOpenFirewall = true; # airplay
pulse.enable = true;
extraConfig.pipewire = {
"9-clock-allow-higher" = {
"context.properties" = {
"default.clock.allowed-rates" = [
"44100"
"48000"
"96000"
"192000"
];
};
};
"10-raop-discover" = {
"context.modules" = [
{
name = "libpipewire-module-raop-discover";
args = { };
}
];
};
};
};
services.fwupd.enable = true;
programs.ssh.startAgent = true;
programs.evolution.enable = true;
services.gnome.evolution-data-server.enable = true;
services.flatpak.enable = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
# dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
home-manager.users.ragon =
{
pkgs,
lib,
inputs,
config,
...
}:
{
imports = [
../../hm-modules/helix
../../hm-modules/nushell
../../hm-modules/zellij
../../hm-modules/cli.nix
./swaycfg.nix
./work.nix
./river.nix
../../hm-modules/files.nix
inputs.wired.homeManagerModules.default
];
ragon.helix.enable = true;
ragon.nushell.enable = true;
ragon.nushell.isNixOS = true;
ragon.zellij.enable = true;
services.gnome-keyring.enable = true;
home.file.".config/wezterm/wezterm.lua".text = ''
local wezterm = require 'wezterm'
-- This will hold the configuration.
local config = wezterm.config_builder()
config.default_prog = { 'nu' }
config.hide_tab_bar_if_only_one_tab = true
config.max_fps = 144
config.font = wezterm.font 'Source Code Pro'
-- This is where you actually apply your config choices
-- For example, changing the color scheme:
config.color_scheme = 'Gruvbox Dark (Gogh)'
-- and finally, return the configuration to wezterm
return config
'';
services.syncthing.enable = true;
services.syncthing.tray.enable = true;
services.syncthing.tray.command = "syncthingtray --wait";
programs.firefox.nativeMessagingHosts = [
pkgs.unstable.firefoxpwa
pkgs.unstable.keepassxc
];
programs.firefox.enable = true;
home.packages = with pkgs; [
# inputs.wezterm.packages.${pkgs.system}.default
element-desktop # this is not a place of honor
discord # shitcord
unstable.signal-desktop
unstable.firefoxpwa
mosh
unstable.plexamp
# firefox
obsidian
thunderbird
# unstable.orca-slicer
diebahn
vlc
dolphin
# unstable.kicad
unstable.devenv
lutris
libsecret
mixxx
unstable.harsh
libreoffice-qt6-fresh
inkscape
easyeffects
dune3d
ptyxis
appimage-run
unstable.keepassxc
# unstable.zenbrowser
inputs.zen-browser.packages."${pkgs.system}".default
aerc
w3m
# filezilla
broot
];
home.file.".zshrc".text = lib.mkForce ''
# we're using nushell as our interactive shell
# so if zsh gets spawned by our terminal emulator, exec nu
cat /proc/$PPID/cmdline | grep -q alacritty && exec nu
'';
services.kdeconnect = {
enable = true;
indicator = true;
package = pkgs.kdePackages.kdeconnect-kde;
};
# home.persistence."/persistent/home/ragon" =
# {
# directories = [
# ".mozilla"
# ".cache"
# ".ssh"
# "docs"
# "Images"
# "Downloads"
# "Music"
# "Pictures"
# "Documents"
# "Videos"
# "VirtualBox VMs"
# ".gnupg"
# ".ssh"
# ".local/share/keyrings"
# ".local/share/direnv"
# ".local/share/Steam"
# ];
# allowOther = true;
# };
programs.home-manager.enable = true;
home.stateVersion = "24.05";
programs.alacritty = {
enable = true;
settings = {
font.normal.family = "JetBrainsMono NerdFont";
colors = {
primary = {
# hard contrast
background = "#1d2021";
# normal background = "#282828";
# soft contrast background = = "#32302f"
foreground = "#ebdbb2";
};
normal = {
black = "#282828";
red = "#cc241d";
green = "#98971a";
yellow = "#d79921";
blue = "#458588";
magenta = "#b16286";
cyan = "#689d6a";
white = "#a89984";
};
bright = {
black = "#928374";
red = "#fb4934";
green = "#b8bb26";
yellow = "#fabd2f";
blue = "#83a598";
magenta = "#d3869b";
cyan = "#8ec07c";
white = "#ebdbb2";
};
};
};
};
programs.borgmatic = {
enable = true;
backups.system =
let
notify = "${pkgs.libnotify}/bin/notify-send";
in
{
location.sourceDirectories = [ "/persistent" ];
location.repositories = [ { path = "ssh://ragon@ds9//backups/theseus"; } ];
location.extraConfig.exclude_if_present = [ ".nobackup" ];
storage.encryptionPasscommand = "${pkgs.libsecret}/bin/secret-tool lookup borg-repository system";
location.extraConfig.before_backup = [
"${notify} -u low -a borgmatic borgmatic \"starting backup\" -t 10000"
];
location.extraConfig.after_backup = [
"${notify} -u low -a borgmatic borgmatic \"finished backup\" -t 10000"
];
location.extraConfig.on_error = [
"${notify} -u critical -a borgmatic borgmatic \"backup failed<br>maybe unlock keepass\""
];
location.extraConfig.ssh_command = "ssh -o IdentityAgent=/run/user/1000/ssh-agent";
location.extraConfig.one_file_system = true;
retention = {
keepHourly = 24;
keepDaily = 7;
keepWeekly = 4;
keepMonthly = 12;
keepYearly = 2;
};
};
};
services.borgmatic.enable = true;
};
ragon = {
user.enable = true;
persist.enable = true;
persist.extraDirectories = [
"/var/lib/bluetooth"
"/var/lib/flatpak"
"/var/lib/iwd"
"/var/log" # lol
];
services = {
ssh.enable = true;
tailscale.enable = true;
};
};
}

View file

@ -0,0 +1,16 @@
{ pkgs, config, inputs, lib, ... }:
let
gnomeExtensions = with pkgs.gnomeExtensions; [
paperwm
gsconnect
];
gnomeExtensionUuids = map (x: x.extensionUuid) gnomeExtensions;
in
{
services.xserver.desktopManager.gnome.enable = true;
environment.systemPackages = gnomeExtensions;
home-manager.users.ragon.dconf.settings."org/gnome/shell" = {
"disable-user-extensions" = false;
enabled-extensions = gnomeExtensionUuids;
};
}

View file

@ -0,0 +1,54 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, inputs, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
"${inputs.nixos-hardware}/framework/13-inch/7040-amd"
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.supportedFilesystems = { xfs = true; };
fileSystems."/persistent" =
{ device = "/dev/disk/by-uuid/ca79f433-163a-4c5c-b176-8e694a674dda";
fsType = "xfs";
neededForBoot = true;
};
fileSystems."/nix" = {
device = "/persistent/nix";
fsType = "none";
depends = ["/persistent"];
options = ["bind"];
};
fileSystems."/" =
{ device = "none";
fsType = "tmpfs";
options = [ "size=32G" "defaults" "mode=755"];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/DA11-68A6";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" "noauto" "x-systemd.automount" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/96c380b3-4498-4eb8-8a18-5eebe2a41428"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
# networking.interfaces.enp195s0f3u1u3.useDHCP = lib.mkDefault true;
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1,17 @@
{ pkgs, lib, ... }: {
services.kmonad = {
enable = true;
keyboards = {
builtin = {
device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd";
config = builtins.readFile ./builtin.kbd;
};
k70-office = {
device = "/dev/input/by-id/usb-Corsair_CORSAIR_K70_CORE_RGB_TKL_Mechanical_Gaming_Keyboard_599A4D472DCAC05584072AFB922E3BFB-event-kbd";
config = builtins.readFile ./razer.kbd;
};
};
};
}

View file

@ -0,0 +1,30 @@
{ pkgs, config, lib, ... }:
let
cfg = config.xyno.desktop.mako;
makoConf = pkgs.writeText "mako.conf" ''
font=Source Sans Pro Nerd Font 11
background-color=#1d2021ff
border-color=#3c3836FF
text-color=#ebdbb2ff
progress-color=over #928374FF
'';
in
{
options.xyno.desktop.mako.enable = lib.mkEnableOption "enable mako notification daemon";
options.xyno.desktop.mako.wantedBy = lib.mkOption {
type = lib.types.str;
default = "niri.service";
};
options.xyno.desktop.mako.package = lib.mkOption {
type = lib.types.package;
default = pkgs.mako;
};
config = lib.mkIf cfg.enable {
systemd.user.services.mako = {
wantedBy = [ cfg.wantedBy ];
script = "${cfg.package}/bin/mako -c ${makoConf}";
restartTrigers = makoConf;
};
};
}

View file

@ -0,0 +1,39 @@
{ pkgs, config, lib, ... }:
let
floatingAppids = [
"floating-alacritty"
"org.pulseaudio.pavucontrol"
"KeePassXC"
"org.gnome.NautilusPreviewer"
];
matchFloat = lib.concatStringSep "\n" (map (x: ''
window-rule {
match app-id="${x}"
open-floating true
open-focused true
}
'') floatingAppids);
in
{
imports = [
./waybar.nix
./mako.nix
];
xyno.desktop = {
waybar.enable = true;
mako.enable = true;
};
programs.niri.enable = true;
environment.etc."niri/config.kdl".text = ''
screenshot-path "~/Pictures/screenshots/screenshot-%Y-%m-%d %H-%M-%S.png"
input {
workspace-auto-back-and-forth
focus-follows-mouse max-scroll-amount="10%"
touchpad {
tap
}
}
// autogenerated from here on
${matchFloat}
'';
}

View file

@ -0,0 +1,86 @@
(defcfg
;; ** For Linux **
input (device-file "/dev/input/by-id/usb-Corsair_CORSAIR_K70_CORE_RGB_TKL_Mechanical_Gaming_Keyboard_599A4D472DCAC05584072AFB922E3BFB-event-kbd")
;; input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
output (uinput-sink "KMonad output razer")
;; ** For Windows **
;; input (low-level-hook)
;; output (send-event-sink)
;; ** For MacOS **
;; input (iokit-name "my-keyboard-product-string")
;; output (kext)
fallthrough true
)
(defsrc
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ]
caps a s d f g h j k l ; ' \ ret
lsft 102d z x c v b n m , . / rsft
lctl lmet lalt spc ralt rmet cmp rctl
)
(defalias
cpy C-c
pst C-v
cut C-x
udo C-z
all C-a
fnd C-f
bk Back
fw Forward
)
(defalias
num (layer-toggle num)
t (tap-hold-next-release 200 t (layer-toggle hjkl))
)
(deflayer colemak-dh
102d f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w f p b j l u y ; [ ]
esc (tap-hold-next-release 200 a lctrl) (tap-hold-next-release 200 r ralt) (tap-hold-next-release 200 s lmet) @t g m n (tap-hold-next-release 200 e rmet) (tap-hold-next-release 200 i lalt) (tap-hold-next-release 200 o rctrl) ' \\ ret
lsft z x c d v 102d k h , . / rsft
lctl lmet lalt spc ralt rmet _ _
)
(deflayer hjkl
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w f p b j l u y ; [ ]
esc (tap-hold-next-release 200 a lctrl) (tap-hold-next-release 200 r ralt) (tap-hold-next-release 200 s lmet) t g m h j k l ' \\ ret
lsft z x c d v 102d k h , . / rsft
lctl lmet lalt spc ralt rmet _ _
)
(deflayer num
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w f p b j l u y ; [ ]
esc 1 2 3 4 5 6 7 8 9 0 ' \\ ret
lsft z x c d v 102d k h , . / rsft
lctl lmet lalt spc ralt rmet _ _
)
(deflayer extend
_ play rewind previoussong nextsong ejectcd refresh brdn brup www mail prog1 prog2
_ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 _
_ esc @bk @fnd @fw ins pgup home up end menu prnt slck
_ lalt lmet lsft lctl ralt pgdn lft down rght del caps _ _
_ @udo @cut @cpy tab @pst _ pgdn bks lsft lctl comp _
_ _ _ ret _ _ _ _
)
(deflayer empty
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _
)

View file

@ -0,0 +1,620 @@
{ lib, pkgs, config, inputs, ... }:
let
# backgroundImage = builtins.fetchurl {
# url = "https://gruvbox-wallpapers.pages.dev/wallpapers/anime/wallhaven-2e2xyx.jpg";
# sha256 = "1zw1a8x20bp9mn9lx18mxzgzvzi02ss57r4q1lc9f14fsmzphnlq";
# };
setRandomBackground = pkgs.writeScript "setBackground.sh" ''
#!/${pkgs.bash}/bin/bash
while true; do
FILENAME=''$(${pkgs.findutils}/bin/find /home/ragon/Pictures/backgrounds -type f | ${pkgs.coreutils}/bin/shuf -n 1)
${pkgs.swaybg}/bin/swaybg -i $FILENAME -m fill &
PID=$!
sleep 1200
kill $PID
done
'';
backgroundImage = "/home/ragon/Pictures/background.jpg";
pow = n: i:
if i == 1 then n
else if i == 0 then 1
else n * pow n (i - 1);
tag = n: toString (pow 2 (n - 1));
scratchTag = tag 20;
in
{
home.packages = with pkgs; [
unstable.shikane
helvum
swaylock
swayidle
swaybg
wlopm
brightnessctl
dconf
playerctl
pwvucontrol
# networkmanagerapplet
mako
impala
# iwgtk
libnotify
];
dconf = {
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
};
home.file.".config/mako/config".text = ''
font=Source Sans Pro Nerd Font
background-color=#1d2021ff
border-color=#3c3836FF
text-color=#ebdbb2ff
progress-color=over #928374FF
'';
gtk = {
enable = true;
gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
};
qt = {
enable = true;
# platformTheme.name = "Adwaita-dark";
platformTheme.name = "Fusion";
style = {
name = "Fusion";
# package = pkgs.adwaita-qt;
};
};
programs.waybar = {
enable = true;
systemd.enable = true;
style = ''
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: "Source Sans Pro Nerd Font";
font-size: 12px;
}
window#waybar {
/* background-color: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);*/
color: #a89984;
background-color: #1d2021;
/* transition-property: background-color;
transition-duration: .5s;*/
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
/*window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}*/
#tags button {
padding: 0 2px;
background-color: #1d2021;
color: #ebdbb2;
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each workspace name */
border: none;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#tags button:hover {
background: rgba(0, 0, 0, 0.2);
/* box-shadow: inset 0 -3px #fbf1c7;
*/
background-color: #3c3836;
}
#tags button.focused {
/* box-shadow: inset 0 -3px #fbf1c7;
*/
background-color: #3c3836;
color: #ebdbb2;
}
#tags button.occupied {
color: #d3869b;
}
#tags button.urgent {
background-color: #cc241d;
color: #ebdbb2;
}
#mode {
background-color: #64727D;
border-bottom: 3px solid #fbf1c7;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#custom-poweroff,
#custom-suspend,
#mpd {
padding: 0 2px;
background-color: #1d2021;
color: #ebdbb2;
}
#window,
#workspaces,
#tags {
margin: 0 2px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#battery {
color: #d3869b;
}
#battery.charging, #battery.plugged {
color: #98971a;
}
@keyframes blink {
to {
background-color: #fbf1c7;
color: #df3f71;
}
}
#battery.critical:not(.charging) {
background-color: #1d2021;
color: #d3869b;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#backlight {
color: #458588;
}
#temperature {
color: #fabd2f;
}
#temperature.critical {
background-color: #fbf1c7;
color: #b57614;
}
#memory {
color: #FCF434; /* enby yellow */
}
#disk {
color: #FFFFFF; /* enby white */
}
#network {
color: #b8bb26; /* enby green */
}
#clock {
color: #9C59D1; /* enby purple */
/*color: #2C2C2C; enby black */
}
#network.disconnected {
background-color: #fbf1c7;
color: #9d0006;
}
#wireplumber {
color: #fe8019;
}
#tray {
}
#tray > .needs-attention {
background-color: #fbf1c7;
color: #3c3836;
}
#idle_inhibitor {
background-color: #1d2021;
color: #ebdbb2;
}
#idle_inhibitor.activated {
background-color: #fbf1c7;
color: #3c3836;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
'';
settings = {
mainBar = {
layer = "top";
position = "top";
height = 15;
modules-left = [ "river/tags" "river/layout" "river/window" ];
modules-right = [ "tray" "power_profiles_daemon" "idle_inhibitor" "wireplumber" "battery" "backlight" "cpu" "temperature" "memory" "disk" "custom/tailscale" "network" "clock" ];
"river/window" = {
max-length = 40;
};
wireplumber = {
"format" = "{icon} {volume}%";
"format-muted" = " MUTE";
# "on-click" = "${pkgs.pwvucontrol}/bin/pwvucontrol";
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
"on-click-right" = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"format-icons" = [ "" "" "" ];
};
"backlight" = {
"device" = "amdgpu_bl1";
"format" = "{icon} {percent}%";
"format-icons" = [ "󰃚" "󰃛" "󰃜" "󰃝" "󰃞" "󰃟" "󰃠" ];
"on-scroll-up" = "${pkgs.brightnessctl}/bin/brightnessctl s +10";
"on-scroll-down" = "${pkgs.brightnessctl}/bin/brightnessctl s 10-";
};
"idle_inhibitor" = {
format = "{icon} ";
format-icons = {
"activated" = "󰅶";
"deactivated" = "󰾪";
};
};
battery = {
"states" = {
"warning" = 30;
"critical" = 15;
};
"format" = "{icon} {capacity}%";
"format-icons" = [ "" "" "" "" "" ];
"tooltip-format" = "Capacity: {capacity}%\nPower Draw: {power:0.2f}W\n{timeTo}\nCycles: {cycles}";
"max-length" = 25;
};
"cpu" = {
"interval" = 10;
"format" = " {:0.0f}%";
"max-length" = 10;
};
"temperature" = {
"format" = " {temperatureC}°C";
};
memory = {
interval = 30;
format = " {used:0.0f}/{total:0.0f}GB";
};
clock = {
interval = 1;
format = "{:%Y-%m-%dT%H:%M:%S%z}";
"tooltip-format" = "<tt><small>{calendar}</small></tt>";
"calendar" = {
"mode" = "year";
"mode-mon-col" = 3;
"weeks-pos" = "right";
"on-scroll" = 1;
"format" = {
"months" = "<span color='#ffead3'><b>{}</b></span>";
"days" = "<span color='#ecc6d9'><b>{}</b></span>";
"weeks" = "<span color='#99ffdd'><b>W{}</b></span>";
"weekdays" = "<span color='#ffcc66'><b>{}</b></span>";
"today" = "<span color='#ff6699'><b><u>{}</u></b></span>";
};
};
"actions" = {
"on-click-right" = "mode";
"on-scroll-up" = "shift_up";
"on-scroll-down" = "shift_down";
};
};
disk = {
format = "󰋊 {specific_used:0.0f}/{specific_total:0.0f}GB";
unit = "GB";
path = "/persistent";
};
# "custom/tailscale" = {
# exec = pkgs.writeScript "tailscaleWaybar.sh" ''
# #!${pkgs.bash}/bin/bash
# TAILNET=$(${pkgs.tailscale}/bin/tailscale status --json | ${pkgs.jq}/bin/jq -j '.MagicDNSSuffix')
# echo "''${''${TAILNET%.ts.net}:(-15)}"
# '';
# interval = 30;
# };
"network" = {
"on-click" = "${pkgs.alacritty}/bin/alacritty --class floating-alacritty -e ${pkgs.impala}/bin/impala";
"format" = "{ifname}";
"format-wifi" = "󰖩 {essid}";
"format-ethernet" = "󰈀 {ifname}";
"format-disconnected" = "󰖪";
"tooltip-format" = "{ifname} via {gwaddr}\n{ipaddr}/{cidr}";
"tooltip-format-wifi" = "{essid} ({signaldBm} dBm) {frequency} GHz\n{ipaddr}/{cidr}";
"tooltip-format-ethernet" = "{ifname}\n{ipaddr}/{cidr}";
"tooltip-format-disconnected" = "Disconnected";
"max-length" = 50;
};
};
};
};
wayland.windowManager.river = {
enable = true;
systemd.enable = true;
xwayland.enable = true;
settings = {
map = {
normal =
let
scrn = pkgs.writeScript "scrn.sh" ''
#!${pkgs.bash}/bin/bash
IMG_FILE=~/Images/screenshots/scrn-$(date +\"%Y-%m-%d-%H-%M-%S\").png
${pkgs.grim}/bin/grim $IMG_FILE
${pkgs.wl-clipboard}/bin/wl-copy < $IMG_FILE
${pkgs.libnotify}/bin/notify-send -i $IMG_FILE -e -t 10000 "Screenshot Saved" $IMG_FILE
'';
slurpscrn = pkgs.writeScript "scurpscrn.sh" ''
#!${pkgs.bash}/bin/bash
IMG_FILE=~/Images/screenshots/scrn-$(date +\"%Y-%m-%d-%H-%M-%S\").png
${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim -g - $IMG_FILE
${pkgs.wl-clipboard}/bin/wl-copy < $IMG_FILE
${pkgs.libnotify}/bin/notify-send -i $IMG_FILE -e -t 10000 "Screenshot Saved" $IMG_FILE
'';
in
{
"Super+Alt 4" = "spawn '${slurpscrn}'";
"Super+Alt 1" = "spawn '${scrn}'";
"Super+Shift Space" = "spawn 'rofi -show drun'";
"Super+Shift A" = "spawn alacritty";
"Super+Shift F" = "spawn nautilus";
"Super Q" = "close";
"Super J" = "focus-view next";
"Super K" = "focus-view previous";
"Super Up" = "focus-view next";
"Super Down" = "focus-view previous";
"Super+Shift J" = "swap next";
"Super+Shift K" = "swap previous";
"Super+Shift Up" = "swap next";
"Super+Shift Down" = "swap previous";
"Super Period" = "focus-output right";
"Super Comma" = "focus-output left";
"Super+Control Period" = "send-to-output -current-tags right";
"Super+Control Comma" = "send-to-output -current-tags left";
"Super Return" = "zoom";
"Super H" = ''send-layout-cmd rivertile "main-ratio -0.05"'';
"Super L" = ''send-layout-cmd rivertile "main-ratio +0.05"'';
"Super Left" = ''send-layout-cmd rivertile "main-ratio -0.05"'';
"Super Right" = ''send-layout-cmd rivertile "main-ratio +0.05"'';
"Super+Shift H" = ''send-layout-cmd rivertile "main-count -1"'';
"Super+Shift L" = ''send-layout-cmd rivertile "main-count +1"'';
"Super+Shift Left" = ''send-layout-cmd rivertile "main-count -1"'';
"Super+Shift Right" = ''send-layout-cmd rivertile "main-count +1"'';
# Super+Alt+{H,J,K,L} to move views
"Super+Alt H" = "move left 100";
"Super+Alt J" = "move down 100";
"Super+Alt K" = "move up 100";
"Super+Alt L" = "move right 100";
# Super+Alt+Control+{H,J,K,L} to snap views to screen edges
"Super+Alt+Control H" = "snap left";
"Super+Alt+Control J" = "snap down";
"Super+Alt+Control K" = "snap up";
"Super+Alt+Control L" = "snap right";
# Super+Alt+Shift+{H,J,K,L} to resize views
"Super+Alt+Shift H" = "resize horizontal -100";
"Super+Alt+Shift J" = "resize vertical 100";
"Super+Alt+Shift K" = "resize vertical -100";
"Super+Alt+Shift L" = "resize horizontal 100";
} // (lib.zipAttrs (map
(x_int:
let
tags = toString (pow 2 (x_int - 1));
x = toString x_int;
in
{
"Super ${x}" = "set-focused-tags ${tags}";
"Super+Shift ${x}" = "set-view-tags ${tags}";
"Super+Control ${x}" = "toggle-focused-tags ${tags}";
"Super+Shift+Control ${x}" = "toggle-view-tags ${tags}";
}
)
(lib.range 1 9)))
// {
"Super 0" = "set-focused-tags 4294967295"; # $(((1 << 32) - 1))
"Super+Shift 0" = "set-view-tags 4294967295"; # $(((1 << 32) - 1))
"Super P" = "toggle-focused-tags ${scratchTag}";
"Super+Shift P" = "set-view-tags ${scratchTag}";
# Super+Space to toggle float
"Super Space" = "toggle-float";
# Super+F to toggle fullscreen
"Super F" = "toggle-fullscreen";
# Super+{Up,Right,Down,Left} to change layout orientation
"Super Up" = ''send-layout-cmd rivertile "main-location top"'';
"Super Right" = ''send-layout-cmd rivertile "main-location right"'';
"Super Down" = ''send-layout-cmd rivertile "main-location bottom"'';
"Super Left" = ''send-layout-cmd rivertile "main-location left"'';
# Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer)
"None XF86AudioRaiseVolume" = "spawn 'pamixer -i 5'";
"None XF86AudioLowerVolume" = "spawn 'pamixer -d 5'";
"None XF86AudioMute" = "spawn 'pamixer --toggle-mute'";
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
"None XF86AudioMedia" = "spawn 'playerctl play-pause'";
"None XF86AudioPlay" = "spawn 'playerctl play-pause'";
"None XF86AudioPrev" = "spawn 'playerctl previous'";
"None XF86AudioNext" = "spawn 'playerctl next'";
# Control screen backlight brightness with brightnessctl (https://github.com/Hummer12007/brightnessctl)
"None XF86MonBrightnessUp" = "spawn 'brightnessctl set +5%'";
"None XF86MonBrightnessDown" = "spawn 'brightnessctl set 5%-'";
}
;
};
map-pointer.normal = {
# Super + Left Mouse Button to move views
"Super BTN_LEFT" = "move-view";
# Super + Right Mouse Button to resize views
"Super BTN_RIGHT" = "resize-view";
# Super + Middle Mouse Button to toggle float
"Super BTN_MIDDLE" = "toggle-float";
};
border-color-focused = "0x7c6f64"; # bg4
border-color-unfocused = "0x3c3836"; # bg1
focus-follows-cursor = "normal";
input = {
"pointer-2362-628-PIXA3854:00_093A:0274_Touchpad" = "tap enabled";
};
keyboard-layout = "eu";
xcursor-theme = "Adwaita";
default-layout = "rivertile";
spawn-tagmask = "4293918719"; # (( ((1 << 32) - 1) ^ (1 << 20) )) all but scratch tag
rule-add = {
"-title 'Picture-in-Picture'" = "float";
"-app-id 'floating-alacritty'" = "float";
"-app-id 'org.pulseaudio.pavucontrol'" = "float";
"-app-id 'KeePassXC'" = "float";
"-app-id 'org.gnome.NautilusPreviewer'" = "float";
"-app-id 'Signal'" = "tags ${tag 9}"; # signal
"-app-id 'Element'" = "tags ${tag 9}"; # cinny
"-app-id 'FFPWA-01JHNYASHBQB122KMCDPEZ65JA'" = "tags ${tag 9}"; # yt music
"-app-id 'org.gnome.evolution'" = "tags ${tag 8}"; # evolution
"-app-id 'obsidian'" = "tags ${tag 1}"; # obsidian
"-app-id 'KeePassXC' " = "tags ${scratchTag}";
};
};
extraConfig = ''
export XDG_CURRENT_DESKTOP=river
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent
rivertile -view-padding 0 -outer-padding 0 &
swayidle \
timeout 300 'swaylock -i ${backgroundImage}' \
timeout 600 'wlopm --off \*' resume 'wlopm --on \*' \
before-sleep 'swaylock -i ${backgroundImage}' &
# swaybg -i ${backgroundImage} &
${setRandomBackground} &
shikane &
${pkgs.mako}/bin/mako &
# iwgtk likes to crash when restarting iwd
# (while true; do iwgtk -i; sleep 10; done) &
# now autostarting stuff thats always open anyways
obsidian &
signal-desktop &
element-desktop &
evolution &
# ${pkgs.appimage-run}/bin/appimage-run /home/ragon/AppImages/KeePassXC-2.8.0-snapshot-x86_64.AppImage &
keepassxc &
'';
};
# services.wired = {
# enable = true;
# config = ./wired.ron;
# };
}

View file

@ -0,0 +1,308 @@
{ pkgs, config, inputs, ... }: {
# imports = [ inputs.ironbar.homeManagerModules.default ];
home.packages = with pkgs; [
slurp
grim
# mako
# firefox
# light installed via programs.light
playerctl
jq
rofi
# inputs.swaymonad.defaultPackage.x86_64-linux
swaylock
];
# programs.ironbar = {
# enable = false;
# style = ''
# @define-color color_bg #282828;
# @define-color color_bg_dark #3c3836;
# @define-color color_border #665c54;
# @define-color color_border_active #7c6f64;
# @define-color color_text #ebdbb2;
# @define-color color_urgent #cc241d;
# * {
# font-family: Source Sans Pro Nerd Font, sans-serif;
# font-size: 15px;
# border: none;
# border-radius: 0;
# }
# box, menubar, button {
# background-color: @color_bg;
# background-image: none;
# box-shadow: none;
# }
# button, label {
# color: @color_text;
# }
# button:hover {
# background-color: @color_bg_dark;
# }
# scale trough {
# min-width: 1px;
# min-height: 2px;
# }
# /* #bar {
# border-top: 1px solid @color_border;
# } */
# .popup {
# border: 1px solid @color_border;
# padding: 1em;
# }
# '';
# config = {
# position = "top";
# height = 20;
# start = [
# { type = "workspaces"; }
# { type = "sway_mode"; }
# ];
# center = [
# {
# type = "focused";
# show_icon = true;
# show_title = true;
# icon_size = 10;
# truncate = "end";
# }
# ];
# end = [
# { type = "music"; player_name = "mpris"; }
# {
# type = "volume";
# icons = {
# volume_high = "󰕾";
# volume_medium = "󰖀";
# volume_low = "󰕿";
# muted = "󰝟";
# };
# format = "{icon} {percentage}%";
# max_volume = 100;
# }
# {
# type = "upower";
# format = "{icon} {percentage}%";
# }
# {
# type = "sys_info";
# format = [
# " {cpu_percent}%"
# " {temp_c:k10temp-Tctl}°C"
# " {memory_used}/{memory_total}GB"
# "󰋊 {disk_used:/persistent}/{disk_total:/persistent}GB"
# "󰓢 {net_down:wlan0}/{net_up:wlan0} Mbps"
# # "󰖡 {load_average:1} | {load_average:5} | {load_average:15}"
# ];
# interval = {
# "cpu" = 1;
# "disks" = 300;
# "memory" = 30;
# "networks" = 3;
# "temps" = 5;
# };
# }
# {
# type = "clock";
# format = "%Y-%m-%dT%H:%M:%S%z";
# }
# ];
# };
# };
# TODO: change to home-manager module somehow
home.file.".config/sway/config".text = ''
set $mod Mod4
set $term wezterm
set $screenclip slurp | grim -g - ~/Images/screenshots/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png
set $screenshot grim ~/Images/screenshots/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png
set $menu rofi -show drun -run-command 'swaymsg exec -- {cmd}'
set $lock swaylock -c 000000
exec --no-statup-id ${pkgs.kanshi}/bin/kanshi
set $cl_high #009ddc
set $cl_indi #d9d8d8
set $cl_back #231f20
set $cl_fore #d9d8d8
set $cl_urge #ee2e24
# Colors border bg text indi childborder
client.focused $cl_high $cl_high $cl_fore $cl_indi $cl_high
client.focused_inactive $cl_back $cl_back $cl_fore $cl_back $cl_back
client.unfocused $cl_back $cl_back $cl_fore $cl_back $cl_back
client.urgent $cl_urge $cl_urge $cl_fore $cl_urge $cl_urge
# workspaces
set $ws1 1:1
set $ws2 2:2
set $ws3 3:3
set $ws4 4:4
set $ws5 5:5
set $ws6 6:6
set $ws7 7:7
set $ws8 8:8
set $ws9 9:9
set $ws0 10:10
exec --no-startup-id mako
exec --no-startup-id ironbar
input * {
xkb_layout eu
}
input 12972:6:FRMW0004:00_32AC:0006_Consumer_Control {
xkb_layout us
xkb_variant colemak_dh_iso
xkb_options caps:escape
}
input type:touchpad {
tap enabled
}
bindsym $mod+Shift+Return exec $term
bindsym $mod+Space exec $menu
bindsym $mod+Print exec $screenshot
bindsym $mod+Shift+Print exec $screenclip
bindsym $mod+Shift+q kill
bindsym $mod+Shift+c reload
# Brightness controls
bindsym --locked XF86MonBrightnessUp exec --no-startup-id light -A 10
bindsym --locked XF86MonBrightnessDown exec --no-startup-id light -U 10
# Multimedia
bindsym --locked XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%
bindsym --locked XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%
bindsym --locked XF86AudioMute exec --no-startup-id pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle
bindsym --locked XF86AudioPlay exec playerctl play-pause
bindsym --locked XF86AudioNext exec playerctl next
bindsym --locked XF86AudioPrev exec playerctl previous
# Idle configuration
exec swayidle \
timeout 300 'exec $lock' \
timeout 600 'swaymsg "output * dpms off"' \
after-resume 'swaymsg "output * dpms on"' \
before-sleep 'exec $lock'
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws0
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws0
# Layout stuff:
# Make the current focus fullscreen
bindsym $mod+Shift+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
# bindsym $mod+f focus mode_toggle
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
set $mode_system System: (l) lock, (e) logout, (s) suspend, (r) reboot, (S) shutdown, (R) UEFI
mode "$mode_system" {
bindsym l exec $lock, mode "default"
bindsym e exit
bindsym s exec --no-startup-id systemctl suspend, mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
bindsym Shift+r exec --no-startup-id systemctl reboot --firmware-setup, mode "default"
# return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Shift+e mode "$mode_system"
# exec_always "pkill -f 'python3? .+/swaymonad.py'; swaymonad"
bindsym $mod+Return nop promote_window
bindsym $mod+j nop focus_next_window
bindsym $mod+k nop focus_prev_window
bindsym $mod+Down nop focus_next_window
bindsym $mod+Up nop focus_prev_window
bindsym $mod+Shift+Left nop move left
bindsym $mod+Shift+Down nop move down
bindsym $mod+Shift+Up nop move up
bindsym $mod+Shift+Right nop move right
bindsym $mod+Shift+j nop swap_with_next_window
bindsym $mod+Shift+k nop swap_with_prev_window
bindsym $mod+x nop reflectx
bindsym $mod+y nop reflecty
bindsym $mod+t nop transpose
bindsym $mod+f nop fullscreen
bindsym $mod+Comma nop increment_masters
bindsym $mod+Period nop decrement_masters
mode "resize" {
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
bindsym Shift+Left nop resize_master shrink width 10px
bindsym Shift+Down nop resize_master grow height 10px
bindsym Shift+Up nop resize_master shrink height 10px
bindsym Shift+Right nop resize_master grow width 10px
# bindsym n resize set width (n-1/n)
bindsym 2 resize set width 50ppt # 1/2, 1/2
bindsym 3 resize set width 66ppt # 2/3, 1/3
bindsym 4 resize set width 75ppt # 3/4, 1/4
bindsym Shift+2 nop resize_master set width 50ppt
bindsym Shift+3 nop resize_master set width 66ppt
bindsym Shift+4 nop resize_master set width 75ppt
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
mode "layout" {
bindsym t nop set_layout tall
bindsym 2 nop set_layout 2_col
bindsym 3 nop set_layout 3_col
bindsym n nop set_layout nop
bindsym Return mode "default"
bindsym Escape mode "default"
}
# nop set_layout 2_col
bindsym $mod+l mode "layout"
mouse_warping container
focus_wrapping no
'';
}

View file

@ -0,0 +1,381 @@
{ pkgs, config, lib, ... }:
let
cfg = config.xyno.desktop.waybar;
waybarConf = pkgs.writeText "waybar.conf" ''
font=Source Sans Pro Nerd Font
background-color=#1d2021ff
border-color=#3c3836FF
text-color=#ebdbb2ff
progress-color=over #928374FF
'';
in
{
options.xyno.desktop.waybar.enable = lib.mkEnableOption "enable mako notification daemon";
options.xyno.desktop.waybar.wantedBy = lib.mkOption {
type = lib.types.str;
default = "niri.service";
};
options.xyno.desktop.waybar.package = lib.mkOption {
type = lib.types.package;
default = pkgs.waybar;
};
options.xyno.desktop.waybar.mode = lib.mkOption {
type = lib.types.str;
default = "niri";
};
config = lib.mkIf cfg.enable {
programs.waybar.enable = true;
environment.etc."xdg/waybar/config".text = builtins.toJSON {
mainBar = {
layer = "top";
position = "top";
height = 15;
modules-left = (lib.mkIf (cfg.mode == "river") [ "river/tags" "river/layout" "river/window" ])
++ (lib.mkIf (cfg.mode == "niri") [ "niri/workspaces" "niri/window" ]);
modules-right = [ "tray" "power_profiles_daemon" "idle_inhibitor" "wireplumber" "battery" "backlight" "cpu" "temperature" "memory" "disk" "custom/tailscale" "network" "clock" ];
"river/window" = {
max-length = 40;
};
wireplumber = {
"format" = "{icon} {volume}%";
"format-muted" = " MUTE";
# "on-click" = "${pkgs.pwvucontrol}/bin/pwvucontrol";
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
"on-click-right" = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"format-icons" = [ "" "" "" ];
};
"backlight" = {
"device" = "amdgpu_bl1";
"format" = "{icon} {percent}%";
"format-icons" = [ "󰃚" "󰃛" "󰃜" "󰃝" "󰃞" "󰃟" "󰃠" ];
"on-scroll-up" = "${pkgs.brightnessctl}/bin/brightnessctl s +10";
"on-scroll-down" = "${pkgs.brightnessctl}/bin/brightnessctl s 10-";
};
"idle_inhibitor" = {
format = "{icon} ";
format-icons = {
"activated" = "󰅶";
"deactivated" = "󰾪";
};
};
battery = {
"states" = {
"warning" = 30;
"critical" = 15;
};
"format" = "{icon} {capacity}%";
"format-icons" = [ "" "" "" "" "" ];
"tooltip-format" = "Capacity: {capacity}%\nPower Draw: {power:0.2f}W\n{timeTo}\nCycles: {cycles}";
"max-length" = 25;
};
"cpu" = {
"interval" = 10;
"format" = " {:0.0f}%";
"max-length" = 10;
};
"temperature" = {
"format" = " {temperatureC}°C";
};
memory = {
interval = 30;
format = " {used:0.0f}/{total:0.0f}GB";
};
clock = {
interval = 1;
format = "{:%Y-%m-%dT%H:%M:%S%z}";
"tooltip-format" = "<tt><small>{calendar}</small></tt>";
"calendar" = {
"mode" = "year";
"mode-mon-col" = 3;
"weeks-pos" = "right";
"on-scroll" = 1;
"format" = {
"months" = "<span color='#ffead3'><b>{}</b></span>";
"days" = "<span color='#ecc6d9'><b>{}</b></span>";
"weeks" = "<span color='#99ffdd'><b>W{}</b></span>";
"weekdays" = "<span color='#ffcc66'><b>{}</b></span>";
"today" = "<span color='#ff6699'><b><u>{}</u></b></span>";
};
};
"actions" = {
"on-click-right" = "mode";
"on-scroll-up" = "shift_up";
"on-scroll-down" = "shift_down";
};
};
disk = {
format = "󰋊 {specific_used:0.0f}/{specific_total:0.0f}GB";
unit = "GB";
path = "/persistent";
};
"network" = {
"on-click" = "${pkgs.alacritty}/bin/alacritty --class floating-alacritty -e ${pkgs.impala}/bin/impala";
"format" = "{ifname}";
"format-wifi" = "󰖩 {essid}";
"format-ethernet" = "󰈀 {ifname}";
"format-disconnected" = "󰖪";
"tooltip-format" = "{ifname} via {gwaddr}\n{ipaddr}/{cidr}";
"tooltip-format-wifi" = "{essid} ({signaldBm} dBm) {frequency} GHz\n{ipaddr}/{cidr}";
"tooltip-format-ethernet" = "{ifname}\n{ipaddr}/{cidr}";
"tooltip-format-disconnected" = "Disconnected";
"max-length" = 50;
};
};
};
environment.etc."xdg/waybar/style.css".text = ''
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: "Source Sans Pro Nerd Font";
font-size: 12px;
}
window#waybar {
/* background-color: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);*/
color: #a89984;
background-color: #1d2021;
/* transition-property: background-color;
transition-duration: .5s;*/
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
/*window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}*/
#tags button {
padding: 0 2px;
background-color: #1d2021;
color: #ebdbb2;
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each workspace name */
border: none;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#tags button:hover {
background: rgba(0, 0, 0, 0.2);
/* box-shadow: inset 0 -3px #fbf1c7;
*/
background-color: #3c3836;
}
#tags button.focused {
/* box-shadow: inset 0 -3px #fbf1c7;
*/
background-color: #3c3836;
color: #ebdbb2;
}
#tags button.occupied {
color: #d3869b;
}
#tags button.urgent {
background-color: #cc241d;
color: #ebdbb2;
}
#mode {
background-color: #64727D;
border-bottom: 3px solid #fbf1c7;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#custom-poweroff,
#custom-suspend,
#mpd {
padding: 0 2px;
background-color: #1d2021;
color: #ebdbb2;
}
#window,
#workspaces,
#tags {
margin: 0 2px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#battery {
color: #d3869b;
}
#battery.charging, #battery.plugged {
color: #98971a;
}
@keyframes blink {
to {
background-color: #fbf1c7;
color: #df3f71;
}
}
#battery.critical:not(.charging) {
background-color: #1d2021;
color: #d3869b;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#backlight {
color: #458588;
}
#temperature {
color: #fabd2f;
}
#temperature.critical {
background-color: #fbf1c7;
color: #b57614;
}
#memory {
color: #FCF434; /* enby yellow */
}
#disk {
color: #FFFFFF; /* enby white */
}
#network {
color: #b8bb26; /* enby green */
}
#clock {
color: #9C59D1; /* enby purple */
/*color: #2C2C2C; enby black */
}
#network.disconnected {
background-color: #fbf1c7;
color: #9d0006;
}
#wireplumber {
color: #fe8019;
}
#tray {
}
#tray > .needs-attention {
background-color: #fbf1c7;
color: #3c3836;
}
#idle_inhibitor {
background-color: #1d2021;
color: #ebdbb2;
}
#idle_inhibitor.activated {
background-color: #fbf1c7;
color: #3c3836;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
'';
};
}

View file

@ -0,0 +1,302 @@
(
// Maximum number of notifications to show at any one time.
// A value of 0 means that there is no limit.
max_notifications: 0,
// The default timeout, in miliseconds, for notifications that don't have an initial timeout set.
// 1000ms = 1s.
timeout: 10000,
// How should we handle `expire_timeout` values of zero?
// `UseDefault`: use `timeout`.
// `NeverExpire`: show this notification forever.
// The latter is technically correct according to the notification spec: https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html
zero_timeout_behavior: NeverExpire,
// `poll_interval` decides decides how often (in milliseconds) Wired checks events,
// draws notifications (if necessary) -- the update loop while any notification is present.
// Note that when no notifications are present, Wired polls at `idle_poll_interval` instead.
// 16ms ~= 60hz / 7ms ~= 144hz.
poll_interval: 16,
// The interval at which wired updates when no notifications/windows are present.
//idle_poll_interval: 500,
// Wired will pause notifications if you are idle (no mouse or keyboard input) for longer than
// `idle_threshold` seconds.
// Note that notifications will not be automatically unpaused on wake, and will need to be manually
// cleared, unless `unpause_on_input` is set to true.
// Also note that no distinction is made between manually paused and idle paused notifications.
// If `idle_threshold` is not specified, the behavior will be disabled entirely.
//idle_threshold: 3600,
// Notifications will spawn paused, and have to be manually unpaused or cleared by the user,
// unless `unpause_on_input` is also set.
//notifications_spawn_paused: false,
// Unpause notifications when we receive any input after being idle for longer than 1 second.
// Note that no distinction is made between manually paused notifications and idle paused/spawned notifications.
//unpause_on_input: false,
// Enable/disable replacement functionality.
// If this is disabled, replacement requests will just send a new notification.
// E.g., with replacing_enabled: true, Pidgin will only show the latest message from each contact,
// instead of sending a new one for each message.
// Default: true
//replacing_enabled: true,
// Whether a notification should reset its timeout when it is replaced.
// No effect if replacing_enabled is set to false.
// Default: false
//replacing_resets_timeout: false,
// Some apps/programs close notifications on their own by sending a request to dbus.
// Sometimes this is not desired.
// Default: true
//closing_enabled: true,
// How many notifications are kept in history.
// Each notification is roughly 256 bytes (excluding buffers!), so there's some math to do here.
// Default: 100
//history_length: 100,
// When a `NotificationBlock` has monitorr: -1 (i.e. should follow active monitor), then what input
// should we use to determine the active monitor?
// Options: Mouse, Window
// Default: Mouse
//focus_follows: Mouse,
// Enable printing notification data to a file.
// Useful for scripting purposes.
// The data is written as JSON.
// Default: None
//print_to_file: "/tmp/wired.log",
// Minimum window width and height. This is used to create the base rect that the notification
// grows within.
// The notification window will never be smaller than this.
// A value of 1 means that the window will generally always resize with notification, unless
// you have a 1x1 pixel notification...
// Generally, you shouldn't need to set this.
min_window_width: 325,
//min_window_height: 1,
// Trim whitespace in received notification text, since some clients like to send whitespace, which we usually don't actually want.
//trim_whitespace: true,
// Enable/disable debug rendering.
debug: false,
debug_color: Color(r: 0.0, g: 1.0, b: 0.0, a: 1.0), // Primary color for debug rectangles.
debug_color_alt: Color(r: 1.0, g: 0.0, b: 0.0, a: 1.0), // Secondary color for debug rectangles.
layout_blocks: [
// Layout 1, when an image is present.
(
name: "root",
parent: "",
hook: Hook(parent_anchor: TR, self_anchor: TR),
offset: Vec2(x: -15, y: 15),
//render_criteria: [HintImage],
// https://github.com/Toqozz/wired-notify/wiki/NotificationBlock
params: NotificationBlock((
monitor: 0,
border_width: 2.0,
border_rounding: 0.0,
background_color: Color(hex: "#11111b"),
border_color: Color(hex: "#cba6f7"),
border_color_low: Color(hex: "#89b4fa"),
border_color_critical: Color(hex: "#f38ba8"),
border_color_paused: Color(hex: "#f9e2af"),
gap: Vec2(x: 0.0, y: 10),
notification_hook: Hook(parent_anchor: BR, self_anchor: TR),
)),
),
(
name: "image",
parent: "root",
hook: Hook(parent_anchor: ML, self_anchor: ML),
offset: Vec2(x: 0.0, y: 0.0),
// https://github.com/Toqozz/wired-notify/wiki/ImageBlock
params: ImageBlock((
image_type: HintThenApp,
padding: Padding(left: 13.0, right: 6.0, top: 0.0, bottom: 10.0),
rounding: 3.0,
scale_width: 48,
scale_height: 48,
filter_mode: Lanczos3,
)),
),
(
name: "summary",
parent: "image",
hook: Hook(parent_anchor: MR, self_anchor: BL),
offset: Vec2(x: 0.0, y: 0.0),
// https://github.com/Toqozz/wired-notify/wiki/TextBlock
params: TextBlock((
text: "%s",
font: "JetBrains Mono 11",
color: Color(hex: "#ffffff"),
padding: Padding(left: 12.0, right: 11.0, top: 12.0, bottom: 12.0),
dimensions: (width: (min: 50, max: 250), height: (min: 0, max: 0)),
)),
),
(
name: "body",
parent: "summary",
hook: Hook(parent_anchor: BL, self_anchor: TL),
offset: Vec2(x: 0.0, y: 0.0),
render_criteria: [Body],
// https://github.com/Toqozz/wired-notify/wiki/ScrollingTextBlock
params: ScrollingTextBlock((
text: "%b",
font: "JetBrains Mono 10",
color: Color(hex: "#a6adc8"),
padding: Padding(left: 11.0, right: 11.0, top: 0.0, bottom: 11.0),
width: (min: 150, max: 300),
scroll_speed: 0.1,
lhs_dist: 35.0,
rhs_dist: 35.0,
scroll_t: 1.0,
)),
),
(
name: "progress",
parent: "summary",
hook: Hook(parent_anchor: BL, self_anchor: TL),
offset: Vec2(x: 0.0, y: -3.0),
render_criteria: [Progress],
// https://github.com/Toqozz/wired-notify/wiki/ProgressBlock
params: ProgressBlock((
padding: Padding(left: 12.0, right: 11.0, top: 6.0, bottom: 11.0),
border_width: 2.0,
border_rounding: 5.0,
fill_rounding: 5.0,
border_color: Color(hex: "#313244"),
background_color: Color(hex: "#1e1e2e"),
fill_color: Color(hex: "#cba6f7"),
width: 230,
height: 15,
)),
),
(
name: "button_0",
parent: "summary",
hook: Hook(parent_anchor: BL, self_anchor: TL),
offset: Vec2(x: 12.0, y: 0.0),
render_criteria: [ActionOther(0)],
// https://github.com/Toqozz/wired-notify/wiki/ButtonBlock
params: ButtonBlock((
padding: Padding(left: 8.0, right: 11.0, top: 6.0, bottom: 5.0),
action: OtherAction(0),
text: "%a",
font: "JetBrains Mono 9",
border_width: 2.0,
border_rounding: 0.0,
text_color: Color(hex: "#a6adc8"),
border_color: Color(hex: "#313244"),
background_color: Color(hex: "#1e1e2e"),
dimensions: (width: (min: 0, max: 150), height: (min: 0, max: 0)),
)),
),
(
name: "button_1",
parent: "button_0",
hook: Hook(parent_anchor: TR, self_anchor: TL),
offset: Vec2(x: 12.0, y: 0.0),
render_criteria: [ActionOther(1)],
// https://github.com/Toqozz/wired-notify/wiki/ButtonBlock
params: ButtonBlock((
padding: Padding(left: 8.0, right: 11.0, top: 6.0, bottom: 5.0),
action: OtherAction(1),
text: "%a",
font: "JetBrains Mono 9",
border_width: 2.0,
border_rounding: 0.0,
text_color: Color(hex: "#a6adc8"),
border_color: Color(hex: "#313244"),
background_color: Color(hex: "#1e1e2e"),
dimensions: (width: (min: 0, max: 150), height: (min: 0, max: 0)),
)),
),
(
name: "button_2",
parent: "button_1",
hook: Hook(parent_anchor: TR, self_anchor: TL),
offset: Vec2(x: 12.0, y: 0.0),
render_criteria: [ActionOther(2)],
// https://github.com/Toqozz/wired-notify/wiki/ButtonBlock
params: ButtonBlock((
padding: Padding(left: 8.0, right: 11.0, top: 6.0, bottom: 5.0),
action: OtherAction(2),
text: "%a",
font: "JetBrains Mono 9",
border_width: 2.0,
border_rounding: 0.0,
text_color: Color(hex: "#a6adc8"),
border_color: Color(hex: "#313244"),
background_color: Color(hex: "#1e1e2e"),
dimensions: (width: (min: 0, max: 150), height: (min: 0, max: 0)),
)),
),
(
name: "button_3",
parent: "button_2",
hook: Hook(parent_anchor: TR, self_anchor: TL),
offset: Vec2(x: 12.0, y: 0.0),
render_criteria: [ActionOther(3)],
// https://github.com/Toqozz/wired-notify/wiki/ButtonBlock
params: ButtonBlock((
padding: Padding(left: 8.0, right: 11.0, top: 6.0, bottom: 5.0),
action: OtherAction(3),
text: "%a",
font: "JetBrains Mono 9",
border_width: 2.0,
border_rounding: 0.0,
text_color: Color(hex: "#a6adc8"),
border_color: Color(hex: "#313244"),
background_color: Color(hex: "#1e1e2e"),
dimensions: (width: (min: 0, max: 150), height: (min: 0, max: 0)),
)),
),
(
name: "padding",
parent: "button_0",
hook: Hook(parent_anchor: BR, self_anchor: TL),
offset: Vec2(x: 0.0, y: 0.0),
render_criteria: [ActionOther(0)],
// https://github.com/Toqozz/wired-notify/wiki/ScrollingTextBlock
params: TextBlock((
text: "",
font: "JetBrains Mono 1",
color: Color(hex: "#ffffff"),
padding: Padding(left: 12.0, right: 0.0, top: 12.0, bottom: 0.0),
dimensions: (width: (min: 0, max: 0), height: (min: 0, max: 0)),
)),
),
],
// https://github.com/Toqozz/wired-notify/wiki/Shortcuts
shortcuts: ShortcutsConfig (
notification_interact: 1,
notification_close: 2,
// notification_closeall: 99,
// notification_pause: 99,
notification_action1: 3,
// notification_action2: 99,
// notification_action3: 99,
// notification_action4: 99,
),
)

View file

@ -0,0 +1,10 @@
{ config, pkgs, lib, ... }: {
home.packages = [
# pkgs.dotnet-sdk_8
pkgs.unstable.dotnet-sdk_9
pkgs.unstable.jetbrains.rider
# pkgs.jetbrains.datagrip
(pkgs.unstable.firefox-devedition.overrideAttrs (super: self: { meta.priority = 1; }))
];
}