This commit is contained in:
Lucy Hochkamp 2024-11-06 21:47:58 +01:00
parent 71acefb35a
commit 7ffa34c604
5 changed files with 470 additions and 193 deletions

View file

@ -7,6 +7,7 @@ let
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKZ0hlF6EFQXpw74kkpoA8vxMX6vVDTnpM41rCDXRMuo" # daedalusvm "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKZ0hlF6EFQXpw74kkpoA8vxMX6vVDTnpM41rCDXRMuo" # daedalusvm
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC6xx1IWlRoSQvCUZ+iyzekjFjoXBKmDT4Kxww4Tl+63" # iPad "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC6xx1IWlRoSQvCUZ+iyzekjFjoXBKmDT4Kxww4Tl+63" # iPad
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJmN2QRbwQyeUChQ0ZxNzjNnUZTOUVbM4kDEGfEtmufc" # iPhone "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJmN2QRbwQyeUChQ0ZxNzjNnUZTOUVbM4kDEGfEtmufc" # iPhone
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID/oMAi5jyQsNohfhcSH2ItisTpBGB0WtYTVxJYKKqhj" # theseus
]; ];
server = user ++ hosts.ds9 ++ hosts.picard; server = user ++ hosts.ds9 ++ hosts.picard;
client = user; client = user;

View file

@ -16,12 +16,21 @@
boot.initrd.luks.devices.cryptroot.device = "/dev/disk/by-uuid/4cd8dbb3-8eea-48ff-87b1-92945be291ac"; boot.initrd.luks.devices.cryptroot.device = "/dev/disk/by-uuid/4cd8dbb3-8eea-48ff-87b1-92945be291ac";
programs.fuse.userAllowOther = true; programs.fuse.userAllowOther = true;
programs.sway.enable = true; programs.sway.enable = true;
programs.sway.extraSessionCommands = ''
export NIXOS_OZONE_WL=1
'';
# start bt
hardware.bluetooth.enable = true;
services.blueman.enable = true;
# end bt
programs.light.enable = true;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.networkmanager.wifi.backend = "iwd"; networking.networkmanager.wifi.backend = "iwd";
services.displayManager.sddm.enable = true; services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true; services.displayManager.sddm.wayland.enable = true;
services.upower.enable = true; services.upower.enable = true;
users.users.ragon.extraGroups = [ "networkmanager" ]; users.users.ragon.extraGroups = [ "networkmanager" "video" ];
environment.systemPackages = [ environment.systemPackages = [
pkgs.wezterm pkgs.wezterm
]; ];
@ -41,6 +50,8 @@
../../hm-modules/zellij ../../hm-modules/zellij
../../hm-modules/cli.nix ../../hm-modules/cli.nix
./swaycfg.nix ./swaycfg.nix
./river.nix
./kanshi.nix
../../hm-modules/files.nix ../../hm-modules/files.nix
]; ];
ragon.helix.enable = true; ragon.helix.enable = true;
@ -64,6 +75,11 @@ config.color_scheme = 'Gruvbox Dark (Gogh)'
-- and finally, return the configuration to wezterm -- and finally, return the configuration to wezterm
return config return config
''; '';
home.packages = [
pkgs.element-desktop # this is not a place of honor
pkgs.plexamp
pkgs.firefox
];
# home.persistence."/persistent/home/ragon" = # home.persistence."/persistent/home/ragon" =

55
hosts/theseus/kanshi.nix Normal file
View file

@ -0,0 +1,55 @@
{ pkgs, inputs, options, lib, ... }:
let
# TODO: have a list of workspaces and operate on that
moveWs = output: workspaceStart: workspaceEnd: map
(x: ''${pkgs.sway}/bin/swaymsg workspace ${toString x}:${toString x} ouptut "${output}", workspace ${toString x}:${toString x}, move workspace to "${output}"'')
(lib.range workspaceStart workspaceEnd);
in
{
services.kanshi = {
enable = true;
settings = [
{
profile.name = "undocked";
profile.outputs = [
{
criteria = "eDP-1";
adaptiveSync = true;
scale = 1.25;
mode = "2880x1920@120Hz";
}
];
}
{
profile.name = "docked_home";
profile.outputs = [
{
criteria = "eDP-1";
adaptiveSync = true;
scale = 2.0;
mode = "2880x1920@120Hz";
}
{
criteria = "Dell Inc. Dell S2716DG #ASM2LrMXJiXd";
adaptiveSync = true;
position = "1440,0";
scale = 1.0;
mode = "2560x1440@119.998Hz";
}
{
criteria = "Acer Technologies KG271U TATEE0018511";
adaptiveSync = true;
position = "4000,0";
scale = 1.0;
mode = "2560x1440@74.924Hz";
}
];
profile.exec = lib.flatten [
(moveWs "eDP-1" 1 3)
(moveWs "Dell Inc. Dell S2716DG #ASM2LrMXJiXd" 4 7)
(moveWs "Acer Technologies KG271U TATEE0018511" 8 10)
];
}
];
};
}

214
hosts/theseus/river.nix Normal file
View file

@ -0,0 +1,214 @@
{ lib, pkgs, config, inputs, ... }: {
home.packages = with pkgs; [
helvum
brightnessctl
dconf
];
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
};
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome.gnome-themes-extra;
};
iconTheme = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
};
cursorTheme = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
};
};
# qt = {
# enable = true;
# platformTheme = "gnome";
# style = "adwaita-dark";
# };
programs.waybar = {
enable = true;
systemd.enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 20;
modules-left = [ "river/tags" "river/mode" "river/layout" ];
modules-center = [ "river/window" ];
modules-right = [ "wireplumber" "upower" "backlight" "cpu" "temperature" "memory" "disk" "network" "clock" ];
wireplumber = {
"format" = "{volume}% {icon}";
"format-muted" = "";
"on-click" = "helvum";
"format-icons" = [ "" "" "" ];
};
"backlight" = {
"device" = "amdgpu_bl1";
"format" = "{percent}% {icon}";
"format-icons" = [ "" "" ];
};
"cpu" = {
"interval" = 10;
"format" = "{}% ";
"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}";
};
disk = {
format = "{specific_used:0.0f}/{specific_total:0.0f} GB 󰋊";
unit = "GB";
path = "/persistent";
};
"network" = {
"format" = "{ifname}";
"format-wifi" = "{essid} ({signalStrength}%) ";
"format-ethernet" = "{ipaddr}/{cidr} 󰊗";
"format-disconnected" = "";
"tooltip-format" = "{ifname} via {gwaddr} 󰊗";
"tooltip-format-wifi" = "{essid} ({signalStrength}%) ";
"tooltip-format-ethernet" = "{ifname} ";
"tooltip-format-disconnected" = "Disconnected";
"max-length" = 50;
};
};
};
};
wayland.windowManager.river = {
enable = true;
systemd.enable = true;
xwayland.enable = true;
settings = {
map = {
normal = {
"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 right";
"Super+Control Comma" = "send-to-output 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
pow = n: i:
if i == 1 then n
else if i == 0 then 1
else n * pow n (i - 1);
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+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";
};
xcursor-theme = "Adwaita";
default-layout = "rivertile";
};
extraConfig = ''
rivertile -view-padding 3 -outer-padding 3 &
'';
};
}

View file

@ -1,20 +1,11 @@
{ pkgs, config, inputs, ... }: { { pkgs, config, inputs, ... }: {
imports = [ inputs.ironbar.homeManagerModules.default ]; imports = [ inputs.ironbar.homeManagerModules.default ];
gtk = {
enable = true;
# font.size = 10;
theme.name = "adwaita-dark";
};
qt = {
enable = true;
style.name = "adwaita-dark";
};
home.packages = with pkgs; [ home.packages = with pkgs; [
slurp slurp
grim grim
mako mako
firefox firefox
light # light installed via programs.light
playerctl playerctl
jq jq
rofi rofi
@ -123,6 +114,8 @@
]; ];
}; };
}; };
# TODO: change to home-manager module somehow
home.file.".config/sway/config".text = '' home.file.".config/sway/config".text = ''
set $mod Mod4 set $mod Mod4
set $term wezterm set $term wezterm
@ -131,6 +124,8 @@
set $menu rofi -show drun -run-command 'swaymsg exec -- {cmd}' set $menu rofi -show drun -run-command 'swaymsg exec -- {cmd}'
set $lock swaylock -c 000000 set $lock swaylock -c 000000
exec --no-statup-id ${pkgs.kanshi}/bin/kanshi
set $cl_high #009ddc set $cl_high #009ddc
set $cl_indi #d9d8d8 set $cl_indi #d9d8d8
set $cl_back #231f20 set $cl_back #231f20
@ -156,10 +151,10 @@
exec --no-startup-id mako exec --no-startup-id mako
exec --no-startup-id ironbar exec --no-startup-id ironbar
input 12951:6505:ZSA_Technology_Labs_Moonlander_Mark_I { input * {
xkb_layout eu xkb_layout eu
} }
input * { input 12972:6:FRMW0004:00_32AC:0006_Consumer_Control {
xkb_layout us xkb_layout us
xkb_variant colemak_dh_iso xkb_variant colemak_dh_iso
xkb_options caps:escape xkb_options caps:escape
@ -167,10 +162,6 @@
input type:touchpad { input type:touchpad {
tap enabled tap enabled
} }
output eDP-1 {
scale 1
adaptive_sync on
}
bindsym $mod+Shift+Return exec $term bindsym $mod+Shift+Return exec $term
bindsym $mod+Space exec $menu bindsym $mod+Space exec $menu
bindsym $mod+Print exec $screenshot bindsym $mod+Print exec $screenshot
@ -249,31 +240,31 @@
bindsym $mod+Shift+e mode "$mode_system" bindsym $mod+Shift+e mode "$mode_system"
exec_always "pkill -f 'python3? .+/swaymonad.py'; swaymonad" exec_always "pkill -f 'python3? .+/swaymonad.py'; swaymonad"
bindsym $mod+Return nop promote_window bindsym $mod+Return nop promote_window
bindsym $mod+j nop focus_next_window bindsym $mod+j nop focus_next_window
bindsym $mod+k nop focus_prev_window bindsym $mod+k nop focus_prev_window
bindsym $mod+Down nop focus_next_window bindsym $mod+Down nop focus_next_window
bindsym $mod+Up nop focus_prev_window bindsym $mod+Up nop focus_prev_window
bindsym $mod+Shift+Left nop move left bindsym $mod+Shift+Left nop move left
bindsym $mod+Shift+Down nop move down bindsym $mod+Shift+Down nop move down
bindsym $mod+Shift+Up nop move up bindsym $mod+Shift+Up nop move up
bindsym $mod+Shift+Right nop move right bindsym $mod+Shift+Right nop move right
bindsym $mod+Shift+j nop swap_with_next_window bindsym $mod+Shift+j nop swap_with_next_window
bindsym $mod+Shift+k nop swap_with_prev_window bindsym $mod+Shift+k nop swap_with_prev_window
bindsym $mod+x nop reflectx bindsym $mod+x nop reflectx
bindsym $mod+y nop reflecty bindsym $mod+y nop reflecty
bindsym $mod+t nop transpose bindsym $mod+t nop transpose
bindsym $mod+f nop fullscreen bindsym $mod+f nop fullscreen
bindsym $mod+Comma nop increment_masters bindsym $mod+Comma nop increment_masters
bindsym $mod+Period nop decrement_masters bindsym $mod+Period nop decrement_masters
mode "resize" { mode "resize" {
bindsym Left resize shrink width 10px bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px bindsym Up resize shrink height 10px
@ -295,10 +286,10 @@ mode "resize" {
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
mode "layout" { mode "layout" {
bindsym t nop set_layout tall bindsym t nop set_layout tall
bindsym 2 nop set_layout 2_col bindsym 2 nop set_layout 2_col
bindsym 3 nop set_layout 3_col bindsym 3 nop set_layout 3_col
@ -306,12 +297,12 @@ mode "layout" {
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
# nop set_layout 2_col # nop set_layout 2_col
bindsym $mod+l mode "layout" bindsym $mod+l mode "layout"
mouse_warping container mouse_warping container
focus_wrapping no focus_wrapping no
''; '';
} }