diff --git a/flake.lock b/flake.lock index be1b290..64f5555 100644 --- a/flake.lock +++ b/flake.lock @@ -25,11 +25,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1751670728, - "narHash": "sha256-lh+Fjz110EZVsg72qWAE7yCtSOJiTnYCv14OgyCoRZw=", + "lastModified": 1751705516, + "narHash": "sha256-Y099OGYWYHtpYFP4offuV6rldBnpUv4CYk+HwuaQwLU=", "owner": "catppuccin", "repo": "nix", - "rev": "f07078deae3c9f896ed3aa8bd4b114d9ab59dce8", + "rev": "719bb50ca2c99bc9c077669a48bfd9815493a11d", "type": "github" }, "original": { @@ -263,11 +263,11 @@ ] }, "locked": { - "lastModified": 1751693185, - "narHash": "sha256-+LKghTO5wWBcR/MJAeoSarWR7c7dO6GyA8+jM8DHV08=", + "lastModified": 1751729568, + "narHash": "sha256-ay7O1jjalUxkL23QWLv9C2s8rdVGs3hUOPZClIbUHKs=", "owner": "nix-community", "repo": "home-manager", - "rev": "36c57c6a1d03a5efbf5e23c04dbe21259d25f992", + "rev": "f117b383dd591fd579bce5ee7bac07a3fdc1d050", "type": "github" }, "original": { @@ -528,11 +528,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1751271578, - "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", + "lastModified": 1751637120, + "narHash": "sha256-xVNy/XopSfIG9c46nRmPaKfH1Gn/56vQ8++xWA8itO4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", + "rev": "5c724ed1388e53cc231ed98330a60eb2f7be4be3", "type": "github" }, "original": { @@ -552,11 +552,11 @@ "systems": "systems_4" }, "locked": { - "lastModified": 1751492444, - "narHash": "sha256-26NgRXwhNM2x4hrok0C3CqSf2v0vi9byONNON5PzbHQ=", + "lastModified": 1751746175, + "narHash": "sha256-6JABU+UMkaL4c+ZJRQYyFyIkm9ry1fOkhNQgSSjK5OM=", "owner": "nix-community", "repo": "nixvim", - "rev": "239d331bb48673dfd00d7187654892471cd60d44", + "rev": "ef0fa015a8236241bdcc27f32e6a4aa537d96cf8", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 887aeca..aba7637 100644 --- a/flake.nix +++ b/flake.nix @@ -34,7 +34,6 @@ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "widevine-cdm" ]; colmena = { - # colmenaHive = colmena.lib.makeHive { meta = { nixpkgs = import nixpkgs { system = "x86_64-linux"; }; specialArgs = { inherit inputs outputs; }; @@ -50,7 +49,6 @@ smaug = import ./hosts/smaug/colmena.nix; w1 = import ./hosts/w1/colmena.nix; # w2 = import ./hosts/w2/colmena.nix; - # t2 = import ./hosts/t2/colmena.nix; }; nixosConfigurations = { diff --git a/home/gui/files/sway/t2 b/home/gui/files/sway/t2 deleted file mode 100644 index dbad73b..0000000 --- a/home/gui/files/sway/t2 +++ /dev/null @@ -1,375 +0,0 @@ -# For T2 -set $mod Mod1 -set $terminal_path /home/don/bin/mynewterm -set $snd_sink alsa_output.usb-Corsair_CORSAIR_VOID_ELITE_Wireless_Gaming_Dongle-00.iec958-stereo - -set $lock /home/don/bin/lock.sh -exec_always sway-audio-idle-inhibit -exec swayidle -w \ - timeout 300 $lock \ - timeout 360 'swaymsg "output * dpms off"' \ - resume 'swaymsg "output * dpms on"' \ - before-sleep $lock - -floating_modifier $mod - -hide_edge_borders both -titlebar_border_thickness 0 -titlebar_padding 5 0 -font pango:JetBrains Mono 8 - -workspace_auto_back_and_forth yes - -set $laptop DSI-1 -output $laptop scale 1.1 -output * bg /home/don/nixos/hosts/fan-table-device-box-wallpaper.jpg fill -output $laptop transform 90 -input 1046:911:Goodix_Capacitive_TouchScreen map_to_output $laptop -bindswitch --reload --locked lid:on output $laptop disable -bindswitch --reload --locked lid:off output $laptop enable - -title_align center -# Music control -bindsym XF86AudioPlay exec --no-startup-id control-music --pause -bindsym Control+Shift+F7 exec --no-startup-id control-music --pause -bindsym XF86AudioNext exec --no-startup-id control-music --next -bindsym Control+Shift+F2 exec --no-startup-id control-music --next -bindsym XF86AudioPrev exec --no-startup-id control-music --prev -bindsym Control+Shift+F1 exec --no-startup-id control-music --prev -bindsym XF86AudioStop exec --no-startup-id control-music --stop - -# change volume or toggle mute -#bindsym XF86AudioRaiseVolume exec amixer -q -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks -#bindsym XF86AudioLowerVolume exec amixer -q -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks -#bindsym XF86AudioMute exec amixer -q -D pulse sset Master toggle && pkill -RTMIN+1 i3blocks - -#bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set 10%+ -#bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 10%- -# Brightness -bindsym XF86MonBrightnessDown exec light -U 10 -bindsym Control+Shift+F5 exec light -U 10 -bindsym XF86MonBrightnessUp exec light -A 10 -bindsym Control+Shift+F6 exec light -A 10 - -# Volume -bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% -bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% -bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle -bindsym Control+Shift+F10 exec pactl set-sink-volume @DEFAULT_SINK@ +5% -bindsym Control+Shift+F9 exec pactl set-sink-volume @DEFAULT_SINK@ -5% -bindsym Control+Shift+F8 exec pactl set-sink-mute @DEFAULT_SINK@ toggle - -# start a terminal -bindsym $mod+Return exec --no-startup-id $HOME/bin/mynewterm - -# kill focused window -bindsym $mod+Shift+q kill - -# start dmenu (a program launcher) -set $menu_command fuzzel -set $bemenu_options -i --nb "#3f3f3f" --nf "#dcdccc" -fn "pango:JetBrains Mono 8" -set $menu dmenu-wl_path | bemenu $bemenu_options| xargs swaymsg exec -- -bindsym $mod+Shift+d exec $menu - -# Screenshots: -# Super+P: Current window -# Super+Shift+p: Select area -# Super+Alt+p Current output -# Super+Ctrl+p Select a window - -bindsym Mod4+p exec grimshot --notify save active -bindsym Mod4+Shift+p exec grimshot --notify save area -bindsym Mod4+Mod1+p exec grimshot --notify save output -bindsym Mod4+Ctrl+p exec grimshot --notify save window - -# rofi app and window launchers -bindsym $mod+p exec --no-startup-id $menu -bindsym menu exec $menu_command -bindsym $mod+Shift+w exec dwifi -bindsym $mod+d exec --no-startup-id $menu -bindsym $mod+t exec --no-startup-id $HOME/bin/mynewterm -e ttmenu - -# change focus -bindsym $mod+j focus left -bindsym $mod+k focus down -bindsym $mod+l focus up -bindsym $mod+semicolon focus right - -# alternatively, you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# move focused window -bindsym $mod+Shift+j move left -bindsym $mod+Shift+k move down -bindsym $mod+Shift+l move up -bindsym $mod+Shift+semicolon move right - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# split in horizontal orientation -bindsym $mod+Shift+h split h -# split in vertical orientation -bindsym $mod+Shift+v split v - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# change gaps interactively -bindsym $mod+minus gaps inner current minus 2 -bindsym $mod+plus gaps inner current plus 2 - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -#bindsym $mod+Shift+f focus mode_toggle -bindsym $mod+Shift+F floating enable; resize set 590 px 333 px; sticky enable; move window to position 1330 px 745 px - -# switch to workspace -bindsym $mod+F1 workspace 1 -bindsym $mod+F2 workspace 2 -bindsym $mod+F3 workspace 3 -bindsym $mod+F4 workspace 4 -bindsym $mod+F5 workspace 5 -bindsym $mod+F6 workspace 6 -bindsym $mod+F7 workspace 7 -bindsym $mod+F8 workspace 8 -bindsym $mod+F9 workspace 9 -bindsym $mod+F10 workspace 10 - -# move focused container to workspace -bindsym $mod+Shift+F1 move container to workspace 1 -bindsym $mod+Shift+F2 move container to workspace 2 -bindsym $mod+Shift+F3 move container to workspace 3 -bindsym $mod+Shift+F4 move container to workspace 4 -bindsym $mod+Shift+F5 move container to workspace 5 -bindsym $mod+Shift+F6 move container to workspace 6 -bindsym $mod+Shift+F7 move container to workspace 7 -bindsym $mod+Shift+F8 move container to workspace 8 -bindsym $mod+Shift+F9 move container to workspace 9 -bindsym $mod+Shift+F10 move container to workspace 10 - -# reload the configuration file -bindsym $mod+Shift+c reload -# restart sway inplace (preserves your layout/session, can be used to upgrade sway) -bindsym $mod+Shift+r reload -# exit sway (logs you out of your sway session) -bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' - -# shortcuts for common system configuration tasks -bindsym $mod+Shift+s exec mate-control-center - -# Fancy logout -set $mode_system System (l) lock, (e) logout, (a) goaway, (s) suspend, (h) hibernate, (r) reboot, (CTRL+s) shutdown - -mode "$mode_system" { - bindsym l exec --no-startup-id $lock, mode "default" - bindsym e exec --no-startup-id swaymsg exit, mode "default" - bindsym a exec --no-startup-id $HOME/bin/goaway, mode "default" - bindsym s exec --no-startup-id systemctl suspend, mode "default" - bindsym h exec --no-startup-id systemctl hibernate, mode "default" - bindsym r exec --no-startup-id systemctl reboot, mode "default" - bindsym Ctrl+s exec --no-startup-id systemctl poweroff -i, mode "default" - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} - -bindsym $mod+BackSpace mode "$mode_system" -# resize window (you can also use the mouse for that) -mode "Resize Mode" { - # These bindings trigger as soon as you enter the resize mode - bindsym Left resize shrink width 6 px or 6 ppt - bindsym Down resize grow height 6 px or 6 ppt - bindsym Up resize shrink height 6 px or 6 ppt - bindsym Right resize grow width 6 px or 6 ppt - - bindsym Shift+Left resize shrink width 12 px or 12 ppt - bindsym Shift+Down resize grow height 12 px or 12 ppt - bindsym Shift+Up resize shrink height 12 px or 12 ppt - bindsym Shift+Right resize grow width 12 px or 12 ppt - - bindsym h resize shrink width 6 px or 6 ppt - bindsym k resize grow height 6 px or 6 ppt - bindsym j resize shrink height 6 px or 6 ppt - bindsym l resize grow width 6 px or 6 ppt - - bindsym Shift+h resize shrink width 12 px or 12 ppt - bindsym Shift+k resize grow height 12 px or 12 ppt - bindsym Shift+j resize shrink height 12 px or 12 ppt - bindsym Shift+l resize grow width 12 px or 12 ppt - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" -} -bindsym $mod+r mode "Resize Mode" - -# Disable titlebar -default_border none -default_floating_border pixel 1 - -# Only enable gaps on a workspace when there is at least one container -smart_gaps on - -# Enable popup during fullscreen -popup_during_fullscreen smart - -# window focus follows your mouse movements as the mouse crosses window borders -focus_follows_mouse yes - -# Configure the bar -bar { - swaybar_command waybar - position bottom - hidden_state hide - mode dock - modifier Mod4 -} - -# To get the app_id of the focused window use: -# $ sleep 2 ; swaymsg -t get_tree | jq -r '..|try select(.focused == true)' -assign [class="^Wfica$"] 3 -assign [class="zoom"] 5 -assign [title="^Zoom"] 5 -assign [class="^mpv$"] 9 -assign [app_id="^mpv$"] 9 -assign [app_id="sublime-music"] 9 -assign [app_id="Supersonic"] 9 -assign [class="Supersonic"] 9 -assign [class="Sonixd"] 9 -assign [class="feishin"] 9 -assign [app_id="firefox"] 2 -assign [app_id="org.qutebrowser.qutebrowser"] 2 -assign [class="^darktable$"] 4 -assign [class="^Darktable$"] 4 -assign [app_id="^org.telegram.desktop"] 6 -assign [title="^Signal"] 6 -assign [title="^Tootle"] 6 -assign [title="^Element"] 6 -assign [app_id="thunderbird" instance="eminder"] floating enable -assign [class="^Slack$"] 6 -assign [class="^gotktrik$"] 6 -assign [app_id="com.github.iwalton3.jellyfin-media-player"] 8 -assign [title="Jellyfin Media Player"] 8 - -for_window { - #[class="^Authy Desktop$"] floating enable - [title="ttmenu"] move scratchpad - #[class="^Slack$"] floating enable - #[class="^Slack$"] move scratchpad - [class="evolution-alarm-notify"] sticky enable - [class="KTimer"] floating enable sticky enable - [class="feh"] floating enable sticky enable - #[class="obsidian"] floating enable - #[class="obsidian"] move scratchpad - [title="Reminders"] floating enable - [title="Reminders"] sticky enable - [title="^Print$"] floating disable -} - -input type:touchpad { - tap enabled - click_method clickfinger - middle_emulation enabled - dwt enabled - tap_button_map lrm -} -# Custom keys -bindsym $mod+Shift+n exec swaync-client -t -sw -bindsym $mod+m move scratchpad -bindsym $mod+Shift+m exec --no-startup-id "mua" -bindsym $mod+o scratchpad show -bindsym Mod4+l exec --no-startup-id "~/bin/lock.sh -m" -bindsym Mod4+Shift+l exec --no-startup-id "~/bin/lock.sh -m -t" -bindsym Mod4+w exec --no-startup-id "randbg-1" -bindsym $mod+Control+d exec --no-startup-id "dovideo.sh" -bindsym Mod4+Tab focus right -bindsym Mod4+Shift+Tab focus left - -bindsym $mod+Control+h move workspace to output left -bindsym $mod+Control+j move workspace to output down -bindsym $mod+Control+k move workspace to output up -bindsym $mod+Control+l move workspace to output right -bindsym $mod+Shift+Control+h move container to output left -bindsym $mod+Shift+Control+j move container to output down -bindsym $mod+Shift+Control+k move container to output up -bindsym $mod+Shift+Control+l move container to output right - -bindsym $mod+Shift+x floating enable, sticky enable, resize set 50 ppt 50 ppt, move position 0 px 0 px - -bindsym $mod+Shift+Return exec --no-startup-id $HOME/bin/myterm -bindsym $mod+x [urgent=latest] focus - -##-## # class border bground text indicator child_border -##-## client.focused #6272A4 #6272A4 #F8F8F2 #6272A4 #6272A4 -##-## client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A -##-## client.unfocused #282A36 #282A36 #BFBFBF #282A36 #282A36 -##-## client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555 -##-## client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36 - -# Set inner/outer gaps -gaps inner 0 -gaps outer 0 - -# Hide titlebar on windows: -default_border pixel 1 - -# Default Font -font pango:Noto Sans Regular 10 - -# Thin borders: -smart_borders on - -# Title format for windows -for_window [shell="xdg_shell"] title_format "%title (%app_id)" -for_window [shell="x_wayland"] title_format "%class - %title" - -# class border bground text indicator child_border -client.focused #6272A4 #6272A4 #F8F8F2 #6272A4 #6272A4 -client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A -client.unfocused #282A36 #282A36 #BFBFBF #282A36 #282A36 -client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555 -client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36 -client.background #F8F8F2 - -exec pasystray -exec_always keyctl link @u @s -exec shikane -exec wayland-pipewire-idle-inhibit -exec_always shikanectl reload -exec kitty --title ttmenu -e ttmenu-loop -seat * hide_cursor 8000 -exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK - -exec dbus-update-activation-environment --all 2>/dev/null && dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK -exec --no-startup-id udiskie --tray -exec wl-paste -t text --watch clipman store -exec configure-gtk -exec sonixd -exec dovideo.sh -exec auto-start -exec swaync -exec nm-applet -exec randbg -exec kdeconnect-indicator -exec myweb -exec myterm -exec headset-charge-indicator.py -exec blueberry-tray -#exec ktimer -exec wlsunset -l 29.74 -L -95.77 diff --git a/home/gui/sway.nix b/home/gui/sway.nix index 162370f..d51e42d 100644 --- a/home/gui/sway.nix +++ b/home/gui/sway.nix @@ -1,6 +1,378 @@ -{ inputs, pkgs, hostname, outputs, osConfig, ... }: { - xdg.configFile."sway/config".source = - ./files/sway/${osConfig.networking.hostName}; +{ inputs, pkgs, hostname, outputs, config, osConfig, ... }: { + xdg.configFile."sway/config".text = '' + # For ${osConfig.networking.hostName} + set $mod Mod1 + set $terminal_path /home/don/bin/mynewterm + set $snd_sink alsa_output.usb-Corsair_CORSAIR_VOID_ELITE_Wireless_Gaming_Dongle-00.iec958-stereo + + set $lock /home/don/bin/lock.sh + exec_always sway-audio-idle-inhibit + exec swayidle -w \ + timeout 300 $lock \ + timeout 360 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + before-sleep $lock + + floating_modifier $mod + + hide_edge_borders both + titlebar_border_thickness 0 + titlebar_padding 5 0 + font pango:JetBrains Mono 8 + + workspace_auto_back_and_forth yes + + set $laptop eDP-1 + output $laptop scale ${osConfig.variables.swayScale} + output * bg /home/don/nixos/hosts/fan-table-device-box-wallpaper.jpg fill + bindswitch --reload --locked lid:on output $laptop disable + bindswitch --reload --locked lid:off output $laptop enable + + title_align center + # Music control + bindsym XF86AudioPlay exec --no-startup-id control-music --pause + bindsym Control+Shift+F7 exec --no-startup-id control-music --pause + bindsym XF86AudioNext exec --no-startup-id control-music --next + bindsym Control+Shift+F2 exec --no-startup-id control-music --next + bindsym XF86AudioPrev exec --no-startup-id control-music --prev + bindsym Control+Shift+F1 exec --no-startup-id control-music --prev + bindsym XF86AudioStop exec --no-startup-id control-music --stop + + # change volume or toggle mute + #bindsym XF86AudioRaiseVolume exec amixer -q -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks + #bindsym XF86AudioLowerVolume exec amixer -q -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks + #bindsym XF86AudioMute exec amixer -q -D pulse sset Master toggle && pkill -RTMIN+1 i3blocks + + #bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set 10%+ + #bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 10%- + # Brightness + bindsym XF86MonBrightnessDown exec light -U 10 + bindsym Control+Shift+F5 exec light -U 10 + bindsym XF86MonBrightnessUp exec light -A 10 + bindsym Control+Shift+F6 exec light -A 10 + + # Volume + bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% + bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% + bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle + bindsym Control+Shift+F10 exec pactl set-sink-volume @DEFAULT_SINK@ +5% + bindsym Control+Shift+F9 exec pactl set-sink-volume @DEFAULT_SINK@ -5% + bindsym Control+Shift+F8 exec pactl set-sink-mute @DEFAULT_SINK@ toggle + + # start a terminal + bindsym $mod+Return exec --no-startup-id $HOME/bin/mynewterm + + # kill focused window + bindsym $mod+Shift+q kill + + # start dmenu (a program launcher) + set $menu_command fuzzel + set $bemenu_options -i --nb "#3f3f3f" --nf "#dcdccc" -fn "pango:JetBrains Mono 8" + set $menu dmenu-wl_path | bemenu $bemenu_options| xargs swaymsg exec -- + bindsym $mod+Shift+d exec $menu + + # Screenshots: + # Super+P: Current window + # Super+Shift+p: Select area + # Super+Alt+p Current output + # Super+Ctrl+p Select a window + + bindsym Mod4+p exec grimshot --notify save active + bindsym Mod4+Shift+p exec grimshot --notify save area + bindsym Mod4+Mod1+p exec grimshot --notify save output + bindsym Mod4+Ctrl+p exec grimshot --notify save window + + # rofi app and window launchers + bindsym $mod+p exec --no-startup-id $menu + bindsym menu exec $menu_command + bindsym $mod+Shift+w exec dwifi + bindsym $mod+d exec --no-startup-id $menu + bindsym $mod+t exec --no-startup-id $HOME/bin/mynewterm -e ttmenu + + # change focus + bindsym $mod+j focus left + bindsym $mod+k focus down + bindsym $mod+l focus up + bindsym $mod+semicolon focus right + + # alternatively, you can use the cursor keys: + bindsym $mod+Left focus left + bindsym $mod+Down focus down + bindsym $mod+Up focus up + bindsym $mod+Right focus right + + # move focused window + bindsym $mod+Shift+j move left + bindsym $mod+Shift+k move down + bindsym $mod+Shift+l move up + bindsym $mod+Shift+semicolon move right + + # alternatively, you can use the cursor keys: + bindsym $mod+Shift+Left move left + bindsym $mod+Shift+Down move down + bindsym $mod+Shift+Up move up + bindsym $mod+Shift+Right move right + + # split in horizontal orientation + bindsym $mod+Shift+h split h + # split in vertical orientation + bindsym $mod+Shift+v split v + + # enter fullscreen mode for the focused container + bindsym $mod+f fullscreen toggle + + # change gaps interactively + bindsym $mod+minus gaps inner current minus 2 + bindsym $mod+plus gaps inner current plus 2 + + # change container layout (stacked, tabbed, toggle split) + bindsym $mod+s layout stacking + bindsym $mod+w layout tabbed + bindsym $mod+e layout toggle split + + # toggle tiling / floating + bindsym $mod+Shift+space floating toggle + + # change focus between tiling / floating windows + #bindsym $mod+Shift+f focus mode_toggle + bindsym $mod+Shift+F floating enable; resize set 590 px 333 px; sticky enable; move window to position 1330 px 745 px + + # switch to workspace + bindsym $mod+F1 workspace 1 + bindsym $mod+F2 workspace 2 + bindsym $mod+F3 workspace 3 + bindsym $mod+F4 workspace 4 + bindsym $mod+F5 workspace 5 + bindsym $mod+F6 workspace 6 + bindsym $mod+F7 workspace 7 + bindsym $mod+F8 workspace 8 + bindsym $mod+F9 workspace 9 + bindsym $mod+F10 workspace 10 + + # move focused container to workspace + bindsym $mod+Shift+F1 move container to workspace 1 + bindsym $mod+Shift+F2 move container to workspace 2 + bindsym $mod+Shift+F3 move container to workspace 3 + bindsym $mod+Shift+F4 move container to workspace 4 + bindsym $mod+Shift+F5 move container to workspace 5 + bindsym $mod+Shift+F6 move container to workspace 6 + bindsym $mod+Shift+F7 move container to workspace 7 + bindsym $mod+Shift+F8 move container to workspace 8 + bindsym $mod+Shift+F9 move container to workspace 9 + bindsym $mod+Shift+F10 move container to workspace 10 + + # reload the configuration file + bindsym $mod+Shift+c reload + # restart sway inplace (preserves your layout/session, can be used to upgrade sway) + bindsym $mod+Shift+r reload + # exit sway (logs you out of your sway session) + bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' + + # shortcuts for common system configuration tasks + bindsym $mod+Shift+s exec mate-control-center + + # Fancy logout + set $mode_system System (l) lock, (e) logout, (a) goaway, (s) suspend, (h) hibernate, (r) reboot, (CTRL+s) shutdown + + mode "$mode_system" { + bindsym l exec --no-startup-id $lock, mode "default" + bindsym e exec --no-startup-id swaymsg exit, mode "default" + bindsym a exec --no-startup-id $HOME/bin/goaway, mode "default" + bindsym s exec --no-startup-id systemctl suspend, mode "default" + bindsym h exec --no-startup-id systemctl hibernate, mode "default" + bindsym r exec --no-startup-id systemctl reboot, mode "default" + bindsym Ctrl+s exec --no-startup-id systemctl poweroff -i, mode "default" + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" + } + + bindsym $mod+BackSpace mode "$mode_system" + # resize window (you can also use the mouse for that) + mode "Resize Mode" { + # These bindings trigger as soon as you enter the resize mode + bindsym Left resize shrink width 6 px or 6 ppt + bindsym Down resize grow height 6 px or 6 ppt + bindsym Up resize shrink height 6 px or 6 ppt + bindsym Right resize grow width 6 px or 6 ppt + + bindsym Shift+Left resize shrink width 12 px or 12 ppt + bindsym Shift+Down resize grow height 12 px or 12 ppt + bindsym Shift+Up resize shrink height 12 px or 12 ppt + bindsym Shift+Right resize grow width 12 px or 12 ppt + + bindsym h resize shrink width 6 px or 6 ppt + bindsym k resize grow height 6 px or 6 ppt + bindsym j resize shrink height 6 px or 6 ppt + bindsym l resize grow width 6 px or 6 ppt + + bindsym Shift+h resize shrink width 12 px or 12 ppt + bindsym Shift+k resize grow height 12 px or 12 ppt + bindsym Shift+j resize shrink height 12 px or 12 ppt + bindsym Shift+l resize grow width 12 px or 12 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" + } + bindsym $mod+r mode "Resize Mode" + + # Disable titlebar + default_border none + default_floating_border pixel 1 + + # Only enable gaps on a workspace when there is at least one container + smart_gaps on + + # Enable popup during fullscreen + popup_during_fullscreen smart + + # window focus follows your mouse movements as the mouse crosses window borders + focus_follows_mouse yes + + # Configure the bar + bar { + swaybar_command waybar + position bottom + hidden_state hide + mode dock + modifier Mod4 + } + + # To get the app_id of the focused window use: + # $ sleep 2 ; swaymsg -t get_tree | jq -r '..|try select(.focused == true)' + assign [class="^Wfica$"] 3 + assign [class="zoom"] 5 + assign [title="^Zoom"] 5 + assign [class="^mpv$"] 9 + assign [app_id="^mpv$"] 9 + assign [app_id="sublime-music"] 9 + assign [app_id="Supersonic"] 9 + assign [class="Supersonic"] 9 + assign [class="Sonixd"] 9 + assign [class="feishin"] 9 + assign [app_id="firefox"] 2 + assign [app_id="org.qutebrowser.qutebrowser"] 2 + assign [class="^darktable$"] 4 + assign [class="^Darktable$"] 4 + assign [app_id="^org.telegram.desktop"] 6 + assign [title="^Signal"] 6 + assign [title="^Tootle"] 6 + assign [title="^Element"] 6 + assign [app_id="thunderbird" instance="eminder"] floating enable + assign [class="^Slack$"] 6 + assign [class="^gotktrik$"] 6 + assign [app_id="com.github.iwalton3.jellyfin-media-player"] 8 + assign [title="Jellyfin Media Player"] 8 + + for_window { + #[class="^Authy Desktop$"] floating enable + [title="ttmenu"] move scratchpad + #[class="^Slack$"] floating enable + #[class="^Slack$"] move scratchpad + [class="evolution-alarm-notify"] sticky enable + [class="KTimer"] floating enable sticky enable + [class="feh"] floating enable sticky enable + #[class="obsidian"] floating enable + #[class="obsidian"] move scratchpad + [title="Reminders"] floating enable + [title="Reminders"] sticky enable + [title="^Print$"] floating disable + } + + input type:touchpad { + tap enabled + click_method clickfinger + middle_emulation enabled + dwt enabled + tap_button_map lrm + } + # Custom keys + bindsym $mod+Shift+n exec swaync-client -t -sw + bindsym $mod+m move scratchpad + bindsym $mod+Shift+m exec --no-startup-id "mua" + bindsym $mod+o scratchpad show + bindsym Mod4+l exec --no-startup-id "~/bin/lock.sh -m" + bindsym Mod4+Shift+l exec --no-startup-id "~/bin/lock.sh -m -t" + bindsym Mod4+w exec --no-startup-id "randbg-1" + bindsym $mod+Control+d exec --no-startup-id "dovideo.sh" + bindsym Mod4+Tab focus right + bindsym Mod4+Shift+Tab focus left + + bindsym $mod+Control+h move workspace to output left + bindsym $mod+Control+j move workspace to output down + bindsym $mod+Control+k move workspace to output up + bindsym $mod+Control+l move workspace to output right + bindsym $mod+Shift+Control+h move container to output left + bindsym $mod+Shift+Control+j move container to output down + bindsym $mod+Shift+Control+k move container to output up + bindsym $mod+Shift+Control+l move container to output right + + bindsym $mod+Shift+x floating enable, sticky enable, resize set 50 ppt 50 ppt, move position 0 px 0 px + + bindsym $mod+Shift+Return exec --no-startup-id $HOME/bin/myterm + bindsym $mod+x [urgent=latest] focus + + ##-## # class border bground text indicator child_border + ##-## client.focused #6272A4 #6272A4 #F8F8F2 #6272A4 #6272A4 + ##-## client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A + ##-## client.unfocused #282A36 #282A36 #BFBFBF #282A36 #282A36 + ##-## client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555 + ##-## client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36 + + # Set inner/outer gaps + gaps inner 0 + gaps outer 0 + + # Hide titlebar on windows: + default_border pixel 1 + + # Default Font + font pango:Noto Sans Regular 10 + + # Thin borders: + smart_borders on + + # Title format for windows + for_window [shell="xdg_shell"] title_format "%title (%app_id)" + for_window [shell="x_wayland"] title_format "%class - %title" + + # class border bground text indicator child_border + client.focused #6272A4 #6272A4 #F8F8F2 #6272A4 #6272A4 + client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A + client.unfocused #282A36 #282A36 #BFBFBF #282A36 #282A36 + client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555 + client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36 + client.background #F8F8F2 + + exec pasystray + exec_always keyctl link @u @s + exec shikane + exec wayland-pipewire-idle-inhibit + exec_always shikanectl reload + exec kitty --title ttmenu -e ttmenu-loop + seat * hide_cursor 8000 + exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK + + exec dbus-update-activation-environment --all 2>/dev/null && dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK + exec --no-startup-id udiskie + exec wl-paste -t text --watch clipman store + exec configure-gtk + exec sonixd + exec dovideo.sh + exec auto-start + exec swaync + exec nm-applet + exec randbg + exec kdeconnect-indicator + exec myweb + exec myterm + exec headset-charge-indicator.py + exec blueberry-tray + exec wlsunset -l 29.74 -L -95.77 + ''; programs = { swaylock = { diff --git a/hosts/ace/default.nix b/hosts/ace/default.nix index a537c65..6c06ee5 100644 --- a/hosts/ace/default.nix +++ b/hosts/ace/default.nix @@ -3,13 +3,9 @@ ./hardware-configuration.nix # ../disko/mmcblk.nix ../workstation - ../workstation/kvm.nix - ../workstation/games - ../wm - ../../home/work - ../../home/gui/gnome-calenar.nix ]; networking.hostName = "ace"; + variables.swayScale = "0.75"; roles = { citrix.enable = false; diff --git a/hosts/book/default.nix b/hosts/book/default.nix index 6fb6da8..2ee0e2a 100644 --- a/hosts/book/default.nix +++ b/hosts/book/default.nix @@ -4,13 +4,9 @@ ./hardware-configuration.nix # ../disko/mmcblk.nix ../workstation - ../workstation/kvm.nix - ../workstation/games - ../wm - ../../home/work - ../../home/gui/gnome-calenar.nix ]; networking.hostName = "book"; + variables.swayScale = "1.5"; roles = { citrix.enable = true; diff --git a/hosts/dragon/default.nix b/hosts/dragon/default.nix index 02b5282..d6a92fe 100644 --- a/hosts/dragon/default.nix +++ b/hosts/dragon/default.nix @@ -6,13 +6,9 @@ inputs.nixos-hardware.nixosModules.common-pc-laptop inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd ../workstation - ../workstation/kvm.nix - ../workstation/games - ../wm - ../../home/work - ../../home/gui/gnome-calenar.nix ]; networking.hostName = "dragon"; + variables.swayScale = "1.0"; roles = { citrix.enable = false; diff --git a/hosts/eve/default.nix b/hosts/eve/default.nix index 389ffb4..2f61350 100644 --- a/hosts/eve/default.nix +++ b/hosts/eve/default.nix @@ -4,13 +4,9 @@ ./hardware-configuration.nix # ../disko/mmcblk.nix ../workstation - ../workstation/kvm.nix - ../workstation/games - ../wm - ../../home/work - ../../home/gui/gnome-calenar.nix ]; networking.hostName = "eve"; + variables.swayScale = "1.5"; roles = { citrix.enable = false; diff --git a/hosts/loki/default.nix b/hosts/loki/default.nix index b1de6cc..f1b696e 100644 --- a/hosts/loki/default.nix +++ b/hosts/loki/default.nix @@ -4,14 +4,10 @@ ./hardware-configuration.nix # ../disko/nvme.nix ../workstation - ../workstation/kvm.nix - ../workstation/games - ../wm - ../../home/work - ../../home/gui/gnome-calenar.nix ]; networking.hostName = "loki"; boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + variables.swayScale = "1.1"; roles = { citrix.enable = true; diff --git a/hosts/pocket2/default.nix b/hosts/pocket2/default.nix index 27d58c7..fc8b8bc 100644 --- a/hosts/pocket2/default.nix +++ b/hosts/pocket2/default.nix @@ -6,12 +6,9 @@ inputs.nixos-hardware.nixosModules.common-pc-laptop inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd ../workstation - ../workstation/kvm.nix - ../workstation/games - ../wm - ../../home/work ]; networking.hostName = "pocket2"; + variables.swayScale = "1.7"; roles = { citrix.enable = false; diff --git a/hosts/smaug/default.nix b/hosts/smaug/default.nix index 7276053..2b6d0db 100644 --- a/hosts/smaug/default.nix +++ b/hosts/smaug/default.nix @@ -4,13 +4,9 @@ ./hardware-configuration.nix # ../disko/sda.nix ../workstation - ../workstation/kvm.nix - ../workstation/games - ../wm - ../../home/work - ../../home/gui/gnome-calenar.nix ]; networking.hostName = "smaug"; + variables.swayScale = "0.75"; roles = { citrix.enable = false; @@ -21,7 +17,7 @@ games.enable = true; wine.enable = false; tlp.enable = true; - gnome-calendar.enable = false; + gnome-calendar.enable = true; }; wm = { sway.enable = true; diff --git a/hosts/t2/colmena.nix b/hosts/t2/colmena.nix deleted file mode 100644 index 755457f..0000000 --- a/hosts/t2/colmena.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ inputs, outputs, lib, config, pkgs, ... }: { - imports = [ ./default.nix ]; - deployment = { tags = [ "arm" ]; }; -} diff --git a/hosts/t2/default.nix b/hosts/t2/default.nix deleted file mode 100644 index 48cbbf6..0000000 --- a/hosts/t2/default.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ inputs, outputs, lib, config, pkgs, ... }: { - imports = [ ./hardware-configuration.nix ../workstation ../wm ]; - networking.hostName = "t2"; -} diff --git a/hosts/t2/hardware-configuration.nix b/hosts/t2/hardware-configuration.nix deleted file mode 100644 index 30a5aac..0000000 --- a/hosts/t2/hardware-configuration.nix +++ /dev/null @@ -1,29 +0,0 @@ -# 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, ... }: { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - boot.initrd.availableKernelModules = [ ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/mmcblk0p2"; - fsType = "ext4"; - }; - - swapDevices = [ ]; - - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlu1.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; - nixpkgs.config.allowUnsupportedSystem = true; -} diff --git a/hosts/t2/ssh_host_ed25519_key b/hosts/t2/ssh_host_ed25519_key deleted file mode 100644 index 329acc2..0000000 Binary files a/hosts/t2/ssh_host_ed25519_key and /dev/null differ diff --git a/hosts/t2/ssh_host_ed25519_key.pub b/hosts/t2/ssh_host_ed25519_key.pub deleted file mode 100644 index 6bb147c..0000000 --- a/hosts/t2/ssh_host_ed25519_key.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM3pLmWhWH4AqvkWH8F/WzGjnaSSI4zDrSksglnndlir root@nixos diff --git a/hosts/t2/ssh_host_rsa_key b/hosts/t2/ssh_host_rsa_key deleted file mode 100644 index f6f16eb..0000000 Binary files a/hosts/t2/ssh_host_rsa_key and /dev/null differ diff --git a/hosts/t2/ssh_host_rsa_key.pub b/hosts/t2/ssh_host_rsa_key.pub deleted file mode 100644 index 9036c8c..0000000 --- a/hosts/t2/ssh_host_rsa_key.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDtKcCPmsA7mi8bvRntYvbvHSpteUjf10VEWVNx8ESqrCd0cCxSdOlRbJDBZ+KBlRDqVUPSM5JEqn+ioYQXJT6E/Eu4VQyr8xuQXz2MSnqJJvC54SoFo31Sw/VFS5SL+OZS9h7rxSpZbd97Fj+PBsUrQI2HYY1r7/aT14u4D5zFIBkLuCINl38u4MqWiaScHbh/0n2PT/cgwssTl4axZrRPf5kXUohb2h2MJKP1au02wdImmbzkcREeSXawbhICRSa+/uAYVRU0bKqv1dM3F1cn1f5EXrFxkLJ5O3KT3bJPRwnIs2stwd+Q7PG2wRkbMOKeNw1CxgIkO1LnluFZzZrsGBJzQR5W63wJ6o3iMHxS5IFI7wXc1CflCqjgsNV2Cby1uJoQQnSdQ5xJO1goYRmc4sIdRZa7Z6ttH9mPFvND1p1YHjjM/xqig7vHy6CJ0hYI5RVbf/QHxVGf0JflDNfw9QL7d9H/+N79WrcIbuFbWCTNXRMDprf5PX+ZlIGcqh44zByQM5Qaakhp26fZYtb5oDSxOkj8mN09FO410h1t1Rm/HAEUIQUghdeKjiZcbhjr+SHuhvrITqZH710Y/rbnluW6l4LY8AJC7ctf1L9CICnPIQhy1J9MSPS91kS/OOoFIRseBu5lUvwXfFCH8RcIa3bJIVh8eo+be6ERe1M8Ww== root@nixos diff --git a/hosts/vars.nix b/hosts/vars.nix new file mode 100644 index 0000000..ee8dc05 --- /dev/null +++ b/hosts/vars.nix @@ -0,0 +1,8 @@ +{ lib, ... }: { + options = { + variables = lib.mkOption { + type = lib.types.attrs; + default = { }; + }; + }; +} diff --git a/hosts/wm/greetd/default.nix b/hosts/wm/greetd/default.nix index 102319b..719b039 100644 --- a/hosts/wm/greetd/default.nix +++ b/hosts/wm/greetd/default.nix @@ -10,6 +10,7 @@ # }; services.greetd = { enable = true; + # package = "greetd.wlgreet"; settings = { default_session = { command = diff --git a/hosts/wm/sway/default.nix b/hosts/wm/sway/default.nix index b54973b..e6edca4 100644 --- a/hosts/wm/sway/default.nix +++ b/hosts/wm/sway/default.nix @@ -42,7 +42,7 @@ in { rofi slurp sway - sway-audio-idle-inhibit + # sway-audio-idle-inhibit sway-contrib.grimshot swayidle swayimg @@ -60,6 +60,5 @@ in { wrapperFeatures.gtk = true; }; }; - services.greetd.package = "greetd.wlgreet"; }; } diff --git a/hosts/workstation/default.nix b/hosts/workstation/default.nix index 439f609..7dc6b3b 100644 --- a/hosts/workstation/default.nix +++ b/hosts/workstation/default.nix @@ -28,17 +28,23 @@ in { }; imports = [ inputs.catppuccin.nixosModules.catppuccin + # ./tailscale.nix ../../home ../../home/gui - ./../themes.nix + ../../home/gui/gnome-calenar.nix + ../../home/work + ../vars.nix + ../wm ../wm/greetd + ../workstation/games + ../workstation/kvm.nix + ../themes.nix ./detect-reboot-needed.nix - ./systemd.nix - # ./tailscale.nix - ./upgrade-diff.nix ./kmscon.nix - ./wine.nix + ./systemd.nix ./tlp.nix + ./upgrade-diff.nix + ./wine.nix ]; networking = { @@ -229,9 +235,7 @@ in { # Allow unfree packages nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfreePredicate = true; - # pkg: - # builtins.elem (lib.getName pkg) [ "widevine-cdm" ]; - nixpkgs.config.permittedInsecurePackages = [ "electron-33.4.11" ]; + nixpkgs.config.permittedInsecurePackages = [ "libxml2-2.13.8" ]; fonts.packages = with pkgs; [ anonymousPro diff --git a/justfile b/justfile index 9ea4ef8..28106a7 100644 --- a/justfile +++ b/justfile @@ -121,7 +121,7 @@ ci: oldschool: @nixfmt . &> nixos-switch.log || ( cat nixos-switch.log && false ) @rm -f nixos-switch.log - @doas nixos-rebuild switch --flake .#{{HOSTNAME}} + @doas nixos-rebuild switch --impure --flake .#{{HOSTNAME}} # Reboot on hostname reboot hostname=(HOSTNAME):