Switch to KDE Plasma

This commit is contained in:
Christopher Mühl 2025-11-10 11:12:23 +01:00
parent 1ef0868c37
commit 416ef19d90
No known key found for this signature in database
GPG key ID: E919B0F59E14FD47
38 changed files with 375 additions and 1606 deletions

View file

@ -10,7 +10,7 @@ default:
[group('nix')]
deploy:
{{if os() == "linux" { \
"nixos-rebuild switch --flake . --sudo" \
"sudo nixos-rebuild switch --flake ." \
} else { \
"sudo darwin-rebuild switch --flake ." \
} \
@ -68,6 +68,5 @@ edit-secret file:
# Exits the current user session
[group('desktop')]
[confirm]
logout:
hyprctl dispatch exit
# niri msg action quit

View file

@ -78,8 +78,8 @@ Since this is pretty much always a work-in-progress I do not expect it to be in
most presentable state at all times. Whenever I have time I try to streamline some of
the config, but especially when trying out new tools the code could be a bit wild.
There's a couple of ideas I have for this:
- [ ] Deploy base tooling to all hosts. This mainly includes `nushell` and `helix` configs. They should still be configurable per-host. Potential issue here could be hosts where I don't use home manager
Additionally, there's a couple of ideas I have for this:
- [ ] Deploy base tooling to all hosts. This mainly includes shell and `helix` configs. They should still be configurable per-host. Potential issue here could be hosts where I don't use home manager
- [ ] Make everything more composable. Can make use of the `elements` config some more, like how it's done for `quirks`
[just]: https://github.com/casey/just

876
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -65,8 +65,8 @@
};
inputs = {
# nixpkgs.url = "git+file:///home/christopher/code/opensource/nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
# Opinionated flake library for better organization without much boilerplate
snowfall = {
@ -74,46 +74,29 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# For using home-manager on Darwin (macOS) devices
darwin.url = "github:lnl7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
# url = "git+file:///home/christopher/code/opensource/home-manager";
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# For using home-manager on Darwin (macOS) devices
darwin.url = "github:lnl7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
# Disk management via Nix
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
# Secrets management
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix-rekey.url = "github:oddlama/agenix-rekey";
agenix-rekey.inputs.nixpkgs.follows = "nixpkgs";
hyprland.url = "github:hyprwm/hyprland";
hypridle = {
url = "github:hyprwm/hypridle";
inputs.nixpkgs.follows = "nixpkgs";
};
rose-pine-hyprcursor = {
url = "github:ndom91/rose-pine-hyprcursor";
inputs.nixpkgs.follows = "nixpkgs";
inputs.hyprlang.follows = "hyprland/hyprlang";
};
split-monitor-workspaces = {
url = "github:Duckonaut/split-monitor-workspaces";
inputs.hyprland.follows = "hyprland";
};
affinity-nix.url = "github:mrshmllow/affinity-nix";
quadlet.url = "github:SEIAROTg/quadlet-nix";
musnix.url = "github:musnix/musnix";
docker-compose-1.url = github:nixos/nixpkgs/b0f0b5c6c021ebafbd322899aa9a54b87d75a313;
};
}

View file

@ -1,21 +1,12 @@
{pkgs, ...}: {
home.packages = with pkgs; [
rose-pine-cursor
lxappearance
];
gtk = {
enable = true;
iconTheme = {
name = "oomox-rose-pine";
package = pkgs.rose-pine-icon-theme;
};
theme = {
name = "rose-pine";
package = pkgs.rose-pine-gtk-theme;
};
cursorTheme = {
name = "BreezeX-RoséPine";
package = pkgs.rose-pine-cursor;

View file

@ -1,5 +1,18 @@
{pkgs, ...}: {
home.packages = with pkgs; [
# Editors
jetbrains-toolbox # Installer for JetBrains IDEs
zed-editor
code-cursor
vscode
# Language Servers
lua-language-server
rust-analyzer
nodePackages.typescript
nodePackages.typescript-language-server
nil # nix lsp
zx # Tool for writing better scripts
# trurl # Parsing and manipulating URLs via CLI
dig # DNS
@ -7,12 +20,10 @@
tokei # Like cloc
zeal # Offline documentation browser
just # Just a command runner
jetbrains-toolbox # Installer for JetBrains IDEs
claude-code
devenv
# Build tools
platformio
cargo
glibc
gcc

View file

@ -1,47 +0,0 @@
# Dunst is used for displaying system notifications.
# It is configured here, so that its styling looks better.
{...}: {
services.dunst = {
enable = true;
settings = {
global = {
font = "Roboto 11";
format = "<b>%s</b>\\n%b";
width = 300;
height = 100;
offset = "7x7";
frame_color = "#8AADF4";
frame_width = 2;
gap_size = 8;
line_height = 2;
sort = true;
# Not really relevant for single-monitor setup, but doesn't hurt either
monitor = 0;
follow = "mouse";
};
urgency_low = {
background = "#24273A";
foreground = "#CAD3F5";
timeout = 10;
};
urgency_normal = {
background = "#24273A";
foreground = "#CAD3F5";
timeout = 10;
};
urgency_critical = {
background = "#24273A";
foreground = "#CAD3F5";
frame_color = "#F5A97F";
timeout = 0;
};
};
};
}

View file

@ -1,13 +0,0 @@
{pkgs, ...}: {
# Install common editors
home.packages = with pkgs; [
zed-editor
# Language Servers
lua-language-server
rust-analyzer
nodePackages.typescript
nodePackages.typescript-language-server
nil # nix lsp
];
}

View file

@ -1,15 +0,0 @@
{
config,
pkgs,
...
}: {
home.packages = with pkgs; [
eww
lm_sensors
];
home.file."${config.xdg.configHome}/eww" = {
source = ./eww;
recursive = true;
};
}

View file

@ -1,5 +0,0 @@
In order to develop these widgets (with live reloading) do the following:
1. Kill the original eww daemon using `eww kill`
2. Start the new daemon using `eww open spraggins --config ~/.dotfiles/homes/x86_64-linux/christopher@cobalt/config/eww `
3. Now all changes to the original dotfiles defining the config will be hot-reloaded

View file

@ -1,121 +0,0 @@
// Installed via `npm install @catppuccin/palette`.
// File copied from `node_modules/@catppuccin/palette/scss`.
// Copied here so that we don't need to run npm install for
// eww configuration. Also this file shouldn't really change
// ever, so it's fine to include it statically.
$palette: (
"latte": (
"rosewater": #dc8a78,
"flamingo": #dd7878,
"pink": #ea76cb,
"mauve": #8839ef,
"red": #d20f39,
"maroon": #e64553,
"peach": #fe640b,
"yellow": #df8e1d,
"green": #40a02b,
"teal": #179299,
"sky": #04a5e5,
"sapphire": #209fb5,
"blue": #1e66f5,
"lavender": #7287fd,
"text": #4c4f69,
"subtext1": #5c5f77,
"subtext0": #6c6f85,
"overlay2": #7c7f93,
"overlay1": #8c8fa1,
"overlay0": #9ca0b0,
"surface2": #acb0be,
"surface1": #bcc0cc,
"surface0": #ccd0da,
"base": #eff1f5,
"mantle": #e6e9ef,
"crust": #dce0e8,
),
"frappe": (
"rosewater": #f2d5cf,
"flamingo": #eebebe,
"pink": #f4b8e4,
"mauve": #ca9ee6,
"red": #e78284,
"maroon": #ea999c,
"peach": #ef9f76,
"yellow": #e5c890,
"green": #a6d189,
"teal": #81c8be,
"sky": #99d1db,
"sapphire": #85c1dc,
"blue": #8caaee,
"lavender": #babbf1,
"text": #c6d0f5,
"subtext1": #b5bfe2,
"subtext0": #a5adce,
"overlay2": #949cbb,
"overlay1": #838ba7,
"overlay0": #737994,
"surface2": #626880,
"surface1": #51576d,
"surface0": #414559,
"base": #303446,
"mantle": #292c3c,
"crust": #232634,
),
"macchiato": (
"rosewater": #f4dbd6,
"flamingo": #f0c6c6,
"pink": #f5bde6,
"mauve": #c6a0f6,
"red": #ed8796,
"maroon": #ee99a0,
"peach": #f5a97f,
"yellow": #eed49f,
"green": #a6da95,
"teal": #8bd5ca,
"sky": #91d7e3,
"sapphire": #7dc4e4,
"blue": #8aadf4,
"lavender": #b7bdf8,
"text": #cad3f5,
"subtext1": #b8c0e0,
"subtext0": #a5adcb,
"overlay2": #939ab7,
"overlay1": #8087a2,
"overlay0": #6e738d,
"surface2": #5b6078,
"surface1": #494d64,
"surface0": #363a4f,
"base": #24273a,
"mantle": #1e2030,
"crust": #181926,
),
"mocha": (
"rosewater": #f5e0dc,
"flamingo": #f2cdcd,
"pink": #f5c2e7,
"mauve": #cba6f7,
"red": #f38ba8,
"maroon": #eba0ac,
"peach": #fab387,
"yellow": #f9e2af,
"green": #a6e3a1,
"teal": #94e2d5,
"sky": #89dceb,
"sapphire": #74c7ec,
"blue": #89b4fa,
"lavender": #b4befe,
"text": #cdd6f4,
"subtext1": #bac2de,
"subtext0": #a6adc8,
"overlay2": #9399b2,
"overlay1": #7f849c,
"overlay0": #6c7086,
"surface2": #585b70,
"surface1": #45475a,
"surface0": #313244,
"base": #1e1e2e,
"mantle": #181825,
"crust": #11111b,
),
);

View file

@ -1,102 +0,0 @@
@use "sass:map";
@import "catppuccin";
@mixin icon {
font-family: "Font Awesome 6 Pro Dutone";
font-weight: 900;
font-size: 22px;
}
$font-family: "";
$used-palette: "frappe";
$colors: map.get($palette, $used-palette);
$gradient:
"rosewater", "flamingo", "pink", "mauve", "red", "maroon", "peach",
"yellow", "green", "teal", "sky";
@each $name, $color in $colors {
.color-#{$name} {
color: $color;
}
.bg-#{$name} {
background: $color;
}
}
@for $i from 1 through length($gradient) {
$color: map.get($colors, nth($gradient, $i));
.gradient-#{$i} {
color: $color;
}
.gradient-#{$i}:hover {
color: desaturate($color: $color, $amount: 20);
}
.bg-gradient-#{$i} {
background: $color;
}
}
* {
all: unset;
}
.spraggins {
padding: 5px 15px 0;
font-family: $font-family;
color: map.get($colors, "text");
}
.box {
background: map.get($colors, "base");
border-radius: 4px;
// border: 2px solid $blue;
padding: 0 12px;
}
.icon {
@include icon;
&.smol {
font-size: 14px;
}
}
.time {
font-size: 18px;
}
.date {
font-size: 12px;
}
.workspaceButton {
&.active {
color: white;
}
&.empty {
font-weight: 300;
opacity: 0.3;
}
&.empty.active {
opacity: 0.6;
}
}
.sys {
padding: 8px 0;
label {
padding: 0 8px;
}
.icon {
font-size: 19px;
}
}

View file

@ -1,96 +0,0 @@
(include './variables.yuck')
(defwidget workspaceButton [workspace]
(box
(eventbox
:class "workspaceButton icon gradient-${workspace.id} ${workspace.id == activeWorkspace ? 'active' : ''} ${workspace.windows == 0 ? 'empty' : ''}"
:cursor "pointer"
; :visible {workspace.windows != 0 || workspace.id == activeWorkspace}
"${workspace.name}")))
(defwidget applauncher []
(box
(eventbox
:class "icon gradient-10 applauncher"
:cursor "pointer"
:onclick "tofi-drun | xargs hyprctl dispatch exec --"
"\\ue196")))
(defwidget left []
(box :class "box" :space-evenly false
(applauncher)
(box :style "padding-left: 25px;" :spacing 8
(for space in workspaces
(workspaceButton :workspace space)))))
(defwidget sysinfo []
(box :space-evenly false :class "sys"
(children)))
(defwidget system []
(box :space-evenly false :spacing 8
(sysinfo
(label
:class "icon intern bg-teal color-crust"
:text "\\uf2db")
(box :class "bg-crust color-text" :space-evenly false
"${round(EWW_CPU.avg, 2)} %"
(label
:class "color-overlay0"
:style "padding: 0;"
:text " |")
"${temps.cpu}"))
(sysinfo
(label
:class "icon intern bg-maroon color-base"
:text "\\uf538")
(label
:class "bg-surface0 color-text"
:text "${memory.used}"))
(sysinfo
(label
:class "icon intern bg-surface1 color-blue"
:text "\\uf0a0")
(label
:class "bg-surface2 color-text"
:text "${round(EWW_DISK["/"].used_perc, 2)} %"))
(sysinfo
(label :class "icon color-overlay2" :text "\\uf1b2")
(label
:class "color-overlay2"
:style "padding-left: 0;"
:text "${pkgCount}"))))
(defwidget right []
(box :spacing 20 :halign "end" :hexpand true :space-evenly false
(box :class "box"
(system))
(box :class "box time" :space-evenly false :spacing 10
(label
:valign "center"
:class "icon gradient-5"
:text "\\uf017")
(label
:valign "center"
:text "${time.hour}:${time.min}")
(label
:valign "center"
:class "date"
:text "${date}"))))
(defwidget layout []
(box
:class "layout"
:orientation "horizontal"
:space-evenly false
(left)
(right)))
(defwindow spraggins
:monitor 1
:stacking "bg"
:windowtype "normal"
:wm-ignore true
:exclusive true
:geometry (geometry :width "100%" :height "45")
(layout))

View file

@ -1,23 +0,0 @@
#!/usr/bin/env bash
MONITOR=$1
if [ -z "$MONITOR" ]; then
echo "Usage: $0 <monitor>"
exit 1
fi
PREFIX="$MONITOR"
if [ "$MONITOR" == 0 ]; then
PREFIX=""
fi
# Output the currently selected workspace
workspace () {
hyprctl monitors -j | jq ".[] | select(.id == $MONITOR) | .activeWorkspace.id"
}
workspace
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
workspace
done

View file

@ -1,21 +0,0 @@
#!/usr/bin/env bash
MONITOR=$1
if [ -z "$MONITOR" ]; then
echo "Usage: $0 <monitor>"
exit 1
fi
KANJI='["一","二","三","四","五","六","七","八","九"]'
ICONS='["\\ue0ee","\\ue0ef","\\ue0f0","\\ue0f1","\\ue0f2","\\ue0f3","\\ue0f4","\\ue0f5","\\ue0f6"]'
spaces () {
WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq "[.[] | select(.monitorID == $MONITOR)] | map({ key: (.id | tostring), value: .windows }) | from_entries")
seq 1 9 | jq --argjson windows "${WORKSPACE_WINDOWS}" --argjson kanji "${ICONS}" --slurp -Mc 'map({id: ., name: ($kanji[. - 1]), windows: ($windows[. | tostring]//0)})'
}
spaces
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
spaces
done

View file

@ -1,19 +0,0 @@
#!/usr/bin/env bash
total="$(free -m | grep Mem | awk '{ print $2 }')"
used="$(free -m | grep Mem | awk '{ print $3 }')"
free=$(expr $total - $used)
total_human=$(numfmt --to=iec --format="%.1f" $(( $total * 1000 * 1000 )))
used_human=$(numfmt --to=iec --format="%.1f" $(( $used * 1000 * 1000 )))
free_human=$(numfmt --to=iec --format="%.1f" $(( $free * 1000 * 1000 )))
if [ "$1" = "total" ]; then
echo $total_human
elif [ "$1" = "used" ]; then
echo $used_human
elif [ "$1" = "free" ]; then
echo $free_human
elif [ "$1" = "json" ]; then
jo total=$total_human used=$used_human free=$free_human
fi

View file

@ -1,6 +0,0 @@
#!/usr/bin/env bash
global_pkgs=$(cat /etc/current-system-packages | wc -l)
hm_pkgs=$(cat /home/christopher/.cache/current-home-manager-packages | wc -l)
echo $(( $global_pkgs + $hm_pkgs ))

View file

@ -1,5 +0,0 @@
#!/usr/bin/env bash
cpu=$(sensors | grep 'Tctl' | head -n 1 | awk '{ print $2 }' | sed 's/\+\([0-9]\+\.\?[0-9]*\)/\1 /')
jo cpu="$cpu"

View file

@ -1,20 +0,0 @@
(defpoll time :interval "5s" :initial `{"hour":"00","min":"00"}`
`date +'{"hour":"%H","min":"%M"}'`)
(defpoll date :interval "5s" :initial ``
`date +'%a, %b %d'`)
(defpoll pkgCount :interval "1m" :initial `0`
`./scripts/pkgs`)
(defpoll temps :interval "2s" :initial "{}"
`./scripts/temps`)
(defpoll memory :interval "2s" :initial "{}"
`./scripts/memory json`)
(deflisten workspaces :initial "[{}]"
`./scripts/get-workspaces 0`)
(deflisten activeWorkspace
`./scripts/get-active-workspace 0`)

View file

@ -1,249 +0,0 @@
{
pkgs,
inputs,
...
}: let
inputPkg = inputName: pluginName: inputs.${inputName}.packages.${pkgs.system}.${pluginName};
in {
home.packages = with pkgs; [
wl-clipboard
cliphist # Wayland clipboard
hyprpicker # Color picker
hyprpaper # Wallpaper utility
hyprlandPlugins.borders-plus-plus
];
services.hyprpaper = {
enable = true;
settings.splash = false;
};
wayland.windowManager.hyprland = {
enable = true;
# systemd.variables = ["--all"];
package = inputPkg "hyprland" "hyprland";
plugins = [
(inputPkg "split-monitor-workspaces" "split-monitor-workspaces")
# (inputPkg "hypridle" "hypridle")
];
extraConfig = ''
# See https://wiki.hyprland.org/Configuring/Monitors
monitor=desc:Samsung Electric Company C49HG9x HTRJ901269, 3840x1080, 0x0, 1 # Left
monitor=desc:Ancor Communications Inc ASUS VE278 C5LMTF047320, 1920x1080, 3840x-610, 1, transform, 1 # Right
# Any other random monitor
monitor=,preferred,auto,1
# Gaps for eww
monitor=DP-3,addreserved,40,0,0,0
# monitor=,addreserved,40,0,0,0
# Single tiled windows in a workspace on my main monitor
# should be displayed with a padding on both sides
workspace=w[t1] m[1],gapsout:15 840 15 840
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
exec-once = ibus-daemon -drxR
# exec-once = hyprpaper & # Wallpaper util
exec-once = swaync & # Notification center
exec-once = udiskie # Automatic mounting of USBs
# exec-once = eval $(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) &
exec-once = sleep 1; ${pkgs._elements.select-wallpapers}/bin/select-wallpapers
exec-once = eww daemon
exec-once = eww open spraggins
exec-once = sleep 10; eww open spraggins # Open again after a while because the wallpaper will display on top once that is done
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# Some default env vars.
env = XCURSOR_SIZE,28
env = HYPRCURSOR_THEME,rose-pine-hyprcursor
env = HYPRCURSOR_SIZE,28
# env = WLR_NO_HARDWARE_CURSORS,1
env = NIXOS_OZONE_WL,1
env = LIBVA_DRIVER_NAME,radeonsi
env = __GLX_VENDOR_LIBRARY_NAME,radeonsi
env = NVD_BACKEND,direct
debug {
disable_logs = false
}
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us
kb_variant = intl
kb_model =
kb_options =
kb_rules =
follow_mouse = 2
touchpad {
natural_scroll = no
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
cursor {
no_hardware_cursors = true
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 8
gaps_out = 15
border_size = 3
col.active_border = rgba(bf616aee) rgba(ebcb8bee) 45deg
col.inactive_border = rgba(5e81acaa)
layout = dwindle
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 5
blur {
enabled = true
xray = true
size = 4
noise = 0.3
passes = 2
}
shadow {
enabled = true
range = 4
render_power = 3
color = 0xee1a1a1a
}
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
plugin {
split-monitor-workspaces {
count = 10
}
borders-plus-plus {
add_borders = 3
col.border_1 = rgb(000000)
col.border_2 = rgba(5e81acaa)
col.border_3 = rgb(000000)
border_size_1 = 1
border_size_2 = 3
border_size_3 = 1
natural_rounding = yes
}
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
# new_is_master = true
slave_count_for_center_master = 2
orientation = center
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
}
windowrule = float, class:(.*zeal.*)
windowrule = center 1, class:(.*zeal.*)
windowrule = size 50% 80%, class:(.*zeal.*)
windowrule = minsize 1400 500, class:(.*zeal.*)
windowrule = opacity 0.9, class:(.*zeal.*)
windowrule = float, class:(.*speedcrunch.*)
windowrule = center 1, class:(.*speedcrunch.*)
windowrule = size 30% 60%, class:(.*speedcrunch.*)
windowrule = opacity 0.9, class:(.*speedcrunch.*)
windowrule = float, title:DevTools
windowrule = opacity 0.9, class:(.*kitty.*)
windowrule=nofocus,class:^jetbrains-(?!toolbox),floating:1,title:^win\d+$
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, C, exec, ${pkgs._elements.spawn-term}/bin/spawn-term
bind = $mainMod, W, killactive,
# bind = $mainMod, M, exit,
bind = $mainMod, M, fullscreen, 1
bind = $mainMod, E, exec, thunar
bind = $mainMod, V, togglefloating,
bind = $mainMod, G, exec, ${pkgs._elements.tofi-hg}/bin/tofi-hg
bind = $mainMod, D, exec, ${pkgs._elements.quick-zeal}/bin/quick-zeal
bind = $mainMod, space, exec, tofi-drun | xargs hyprctl dispatch exec --
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, split-workspace, 1
bind = $mainMod, 2, split-workspace, 2
bind = $mainMod, 3, split-workspace, 3
bind = $mainMod, 4, split-workspace, 4
bind = $mainMod, 5, split-workspace, 5
bind = $mainMod, 6, split-workspace, 6
bind = $mainMod, 7, split-workspace, 7
bind = $mainMod, 8, split-workspace, 8
bind = $mainMod, 9, split-workspace, 9
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, split-movetoworkspacesilent, 1
bind = $mainMod SHIFT, 2, split-movetoworkspacesilent, 2
bind = $mainMod SHIFT, 3, split-movetoworkspacesilent, 3
bind = $mainMod SHIFT, 4, split-movetoworkspacesilent, 4
bind = $mainMod SHIFT, 5, split-movetoworkspacesilent, 5
bind = $mainMod SHIFT, 6, split-movetoworkspacesilent, 6
bind = $mainMod SHIFT, 7, split-movetoworkspacesilent, 7
bind = $mainMod SHIFT, 8, split-movetoworkspacesilent, 8
bind = $mainMod SHIFT, 9, split-movetoworkspacesilent, 9
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
'';
};
}

View file

@ -41,7 +41,6 @@
tofi-hg
open-url
generate-wallpaper
select-wallpapers
];
};

View file

@ -1,7 +1,6 @@
{pkgs, ...}: {
home.packages = with pkgs; [
firefox
vivaldi
];
xdg.mimeApps = {

View file

@ -1,4 +1,8 @@
{pkgs, ...}: {
{
pkgs,
inputs,
...
}: {
home.packages = with pkgs; [
gnupg
unzip
@ -9,6 +13,8 @@
solaar # Logitech mouse driver
btop # Better resource monitor
bottom # System resource monitor
grim # Screenshots
slurp # Region selection
# GUI
vesktop # Discord client
@ -19,12 +25,14 @@
filezilla # FTP Client
orca-slicer # Bambu Lab Slicer + Control
krita # Drawing software
inputs.affinity-nix.packages.${pkgs.system}.v3 # Affinity
mochi # SRS flashcards
thunderbird # Email client
speedcrunch # GUI calculator app
naps2 # Scanning
vcv-rack # Eurorack simulator
davinci-resolve # Video editor
cider-2 # Apple music player
feh # Image viewer
xarchiver # Archive viewer/extractor

View file

@ -13,6 +13,7 @@
];
})
gamescope
gamemode # performance mode
mangohud # performance overlays
alvr

View file

@ -14,6 +14,10 @@
keep-outputs = true;
trusted-users = ["root" "@wheel"];
substituters = [
"https://cache.nixos.org/"
];
};
nixpkgs = {

View file

@ -7,7 +7,8 @@ in {
./programs
./shell/aliases.nix
./shell/prompt.nix
# ./shell/nu
./shell/nu
./shell/fish
];
# add environment variables

View file

@ -0,0 +1,35 @@
{
pkgs,
config,
...
}: {
programs.fish = {
enable = true;
shellAliases = config.home.shellAliases;
};
# config = ''
# export PATH="$HOME/code/hausgold/snippets/bin:$PATH"
# export PATH="$HOME/.bun/bin:$HOME/.npm/bin:$PATH"
# art()
# {
# if [ -f "./vendor/bin/sail" ];
# then
# ./vendor/bin/sail artisan "$@"
# else
# php artisan "$@"
# fi
# }
# sail()
# {
# if [ -f "./vendor/bin/sail" ];
# then
# ./vendor/bin/sail "$@"
# else
# echo "Sail is not installed. Run 'composer require laravel/sail' to install it."
# fi
# }
# '';
}

View file

@ -38,7 +38,7 @@
## alias fixer start https://www.nushell.sh/cookbook/external_completers.html#alias-completions
let expanded_alias = scope aliases
| where name == $spans.0
| get -o 0.expansion
| get -i 0.expansion
let spans = if $expanded_alias != null {
$spans

View file

@ -4,7 +4,7 @@ in {
programs.oh-my-posh = {
enable = true;
enableNushellIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
# Original settings taken from `catppuccin_frappe`, and adjusted to my
# likings and usage.

View file

@ -1,39 +0,0 @@
{
config,
pkgs,
...
}: {
home.packages = [pkgs.antigen];
# Antigen (Zsh Plugin Manager)
home.file.".antigenrc".text = ''
# Load oh-my-zsh
antigen use oh-my-zsh
# Load bundles from the default oh-my-zsh repo
antigen bundle git
antigen bundle docker
antigen bundle command-not-found
# antigen bundle vi-mode
# antigen bundle gh # gh autocompletion
# antigen bundle 1password
# antigen bundle marlonrichert/zsh-autocomplete@main
# antigen bundle supercrabtree/k
antigen bundle fzf
antigen bundle zoxide
antigen bundle safe-paste
antigen bundle colored-man-pages
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
# Configure a default theme
THEME="https://github.com/caiogondim/bullet-train-oh-my-zsh-theme bullet-train"
# Enable the configured theme
# eval "antigen theme $THEME"
# eval "$(starship init zsh)"
# And we're done
antigen apply
'';
}

View file

@ -1,49 +0,0 @@
{
pkgs,
config,
...
}: {
imports = [
./antigen.nix
];
programs.zoxide.enableZshIntegration = true;
programs.zsh = {
enable = true;
oh-my-zsh.enable = true;
shellAliases = config.home.shellAliases;
# Add our own binaries to the PATH variable
initContent = ''
# Load Antigen as our package manager.
# The .antigenrc file is copied via the fixtures.nix
source ${pkgs.antigen.outPath}/share/antigen/antigen.zsh
antigen init ~/.antigenrc
export PATH="$HOME/code/hausgold/snippets/bin:$PATH"
export PATH="$HOME/.bun/bin:$HOME/.npm/bin:$PATH"
art()
{
if [ -f "./vendor/bin/sail" ];
then
./vendor/bin/sail artisan "$@"
else
php artisan "$@"
fi
}
sail()
{
if [ -f "./vendor/bin/sail" ];
then
./vendor/bin/sail "$@"
else
echo "Sail is not installed. Run 'composer require laravel/sail' to install it."
fi
}
'';
};
}

View file

@ -2,15 +2,10 @@
pkgs,
config,
lib,
inputs,
...
}:
with lib; let
cfg = config.elements.wm;
tuigreet = "${pkgs.tuigreet}/bin/tuigreet";
hyprland-pkg = inputs.hyprland.packages.${pkgs.system}.hyprland;
hyprland-portal-pkg = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
hyprland-session = "${hyprland-pkg}/share/wayland-sessions";
in {
options.elements = {
wm = {
@ -20,50 +15,38 @@ in {
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
swaynotificationcenter
inputs.rose-pine-hyprcursor.packages.${pkgs.system}.default
xwayland-satellite
hyprshot
kdePackages.discover
kdePackages.kclock
kdePackages.kcharselect
kdePackages.kolourpaint
kdePackages.ksystemlog
wayland-utils
wl-clipboard
libsForQt5.qtstyleplugin-kvantum
# xwayland-satellite
];
programs.hyprland = {
services.xserver = {
enable = true;
package = hyprland-pkg;
portalPackage = hyprland-portal-pkg;
# SDDM is broken
displayManager.gdm = {
enable = true;
wayland = true;
};
};
services.desktopManager.plasma6.enable = true;
services.displayManager.defaultSession = "plasma";
# services.displayManager.sddm.enable = true;
# services.displayManager.sddm.wayland.enable = true;
# services.displayManager.sddm.wayland.compositor = "kwin";
# xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk];
security = {
polkit.enable = true;
pam.services.swaylock = {};
};
xdg.portal = {
config.common.default = ["hyprland"];
config.hyprland.default = ["wlr" "gtk"];
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
wlr.enable = true;
};
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${tuigreet} --asterisks --time --remember --remember-session --sessions ${hyprland-session}";
user = "greeter";
};
};
};
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal";
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
};
}

View file

@ -0,0 +1,4 @@
{channels, ...}: final: prev: {
# Pull the following packages from unstable instead
inherit (channels.unstable) kitty nu fish cider-2;
}

View file

@ -1,5 +1,3 @@
#!/usr/bin/env bash
# Function to open the default browser with a specified profile
open_browser() {
local profile="$1"
@ -24,5 +22,5 @@ if [[ $1 == "https://github.com/hausgold"* ]]; then
open_browser "Work" "$@"
else
# Otherwise just use the default profile
open_browser "Default" "$@"
open_browser "default" "$@"
fi

View file

@ -1,18 +0,0 @@
{pkgs, ...}:
pkgs.writeTextFile rec {
name = "select-wallpapers";
destination = "/bin/${name}";
executable = true;
text = ''
#!/usr/bin/env nu
let wallpaper_dir = "/home/christopher/Wallpapers"
let landscape = (ls $"($wallpaper_dir)/Landscape" | shuffle | get name | first)
let portrait = (ls $"($wallpaper_dir)/Portrait" | shuffle | get name | first)
hyprctl hyprpaper reload $"DP-3,($landscape)"
hyprctl hyprpaper reload $"DP-1,($portrait)"
'';
}

View file

@ -1,5 +1,25 @@
{pkgs, ...}:
pkgs.writeShellApplication {
pkgs.writeTextFile rec {
name = "spawn-term";
text = builtins.readFile ./spawn-term;
destination = "/bin/${name}";
executable = true;
text = ''
#!/usr/bin/env nu
let focused_window = (niri msg --json windows | from json | where { $in.is_focused == true } | first)
if ($focused_window | get app_id) == "kitty" {
let child_pid = (pgrep -P $"($focused_window | get pid)" | tail -1)
if ($child_pid | is-empty) {
kitty
exit 0
}
let path = ($"/proc/($child_pid)/cwd" | path expand)
kitty --directory $path
} else {
kitty
}
'';
}

View file

@ -1,27 +0,0 @@
#!/usr/bin/env bash
ACTIVE_WINDOW=$(hyprctl activewindow -j )
ACTIVE_CLASS=$(echo "$ACTIVE_WINDOW" | jq -r .initialClass)
if [[ $ACTIVE_CLASS == *"kitty"* ]]
then
PID=$(echo "$ACTIVE_WINDOW" | jq -r .pid)
if [[ "$PID" == "" ]]
then
kitty
fi
CHILD_PID=$(pgrep -P "$PID" | tail -1)
if [[ "$PID" == "" ]]
then
kitty
fi
pushd "/proc/${CHILD_PID}/cwd"
SHELL_CWD=$(pwd -P)
popd
kitty --directory "$SHELL_CWD"
else
kitty
fi

View file

@ -34,8 +34,8 @@ with lib._elements; {
qt = {
enable = true;
platformTheme = "gnome";
style = "adwaita-dark";
platformTheme = "qt5ct";
style = "kvantum";
};
networking = {
@ -125,8 +125,6 @@ with lib._elements; {
];
};
logind.settings.Login.RuntimeDirectorySize = "6G";
# Smartcard support, necessary for Yubikey logins
pcscd.enable = true;
};