From f4815424fa3116c37fb44d2b7e55c6cd65f29815 Mon Sep 17 00:00:00 2001 From: Grey Jones Date: Thu, 16 Jul 2026 23:59:35 +0100 Subject: [PATCH] reorganise config for laptop, set up remmina (rdp client) --- assets/dotfiles/niri.kdl | 7 +- assets/dotfiles/noctalia-state/settings.toml | 150 ++++++++++++++++-- ...group_rdp_takamaki_greyweather-dev.remmina | 110 +++++++++++++ global-configs/kitty.nix | 4 - global-configs/niri.nix | 13 ++ global-home.nix | 1 + hosts/kitagawa/default.nix | 33 +--- hosts/kitagawa/home.nix | 19 +++ hosts/kitagawa/modules/hardware-fixes.nix | 32 ++++ modules/window-managers/niri.nix | 2 + 10 files changed, 322 insertions(+), 49 deletions(-) create mode 100644 assets/dotfiles/remmina-presets/group_rdp_takamaki_greyweather-dev.remmina create mode 100644 hosts/kitagawa/modules/hardware-fixes.nix diff --git a/assets/dotfiles/niri.kdl b/assets/dotfiles/niri.kdl index 496d571..86e6d89 100644 --- a/assets/dotfiles/niri.kdl +++ b/assets/dotfiles/niri.kdl @@ -121,13 +121,14 @@ binds { spawn-at-startup "noctalia" window-rule { draw-border-with-background false - geometry-corner-radius 10.000000 10.000000 10.000000 10.000000 + geometry-corner-radius 8 8 5 5 clip-to-geometry true } window-rule { match app-id="^floorp$" match app-id="^code$" match app-id="^obsidian$" + match title="^takamaki$" app-id="^.*\\.Remmina$" open-maximized-to-edges true } window-rule { @@ -137,4 +138,8 @@ window-rule { gestures { hot-corners { off; }; } switch-events { lid-close { spawn "bash" "-c" "noctalia msg session lock && systemctl hibernate"; } +} +animations { + on + slowdown 1.4 } \ No newline at end of file diff --git a/assets/dotfiles/noctalia-state/settings.toml b/assets/dotfiles/noctalia-state/settings.toml index 1ef309f..b6e303c 100644 --- a/assets/dotfiles/noctalia-state/settings.toml +++ b/assets/dotfiles/noctalia-state/settings.toml @@ -1,4 +1,7 @@ -config_version = 1 +config_version = 2 + +[audio] +enable_sounds = true [backdrop] blur_intensity = 0.099999997764825821 @@ -6,13 +9,15 @@ tint_intensity = 0.14999999664723873 [bar.default] background_opacity = 0.79999998211860657 -center = [ "workspaces" ] +center = [ "active_window" ] +contact_shadow = true end = [ "tray", "notifications", "bluetooth", "network", "volume", "battery", "control-center" ] -margin_edge = 8 +margin_edge = 6 margin_ends = 80 margin_opposite_edge = 8 -start = [ "clock", "media" ] -thickness = 36 +radius = 8 +start = [ "clock", "media", "workspaces" ] +thickness = 38 widget_spacing = 16 [battery] @@ -30,7 +35,11 @@ widget_order = [ "desktop-widget-0000000000000005", "desktop-widget-0000000000000006", "desktop-widget-0000000000000007", - "desktop-widget-0000000000000008" + "desktop-widget-0000000000000008", + "desktop-widget-0000000000000009", + "desktop-widget-000000000000000a", + "desktop-widget-000000000000000b", + "desktop-widget-000000000000000c" ] [desktop_widgets.grid] @@ -138,6 +147,70 @@ widget_order = [ [desktop_widgets.widget.desktop-widget-0000000000000008.settings] background_opacity = 0.59999999999999998 + [desktop_widgets.widget.desktop-widget-0000000000000009] + box_height = 0.0 + box_width = 0.0 + cx = 173.0 + cy = 109.0 + output = "eDP-1" + rotation = 0.0 + type = "button" + + [desktop_widgets.widget.desktop-widget-0000000000000009.settings] + background = true + command = "ssh sakamoto .local/bin/wake-takamaki" + glyph = "coffee" + label = "Wake Takamaki" + variant = "default" + + [desktop_widgets.widget.desktop-widget-000000000000000a] + box_height = 0.0 + box_width = 0.0 + cx = 176.5 + cy = 173.0 + output = "eDP-1" + rotation = 0.0 + type = "button" + + [desktop_widgets.widget.desktop-widget-000000000000000a.settings] + background = true + command = "remmina -c /home/grey/.local/share/remmina/group_rdp_takamaki_greyweather-dev.remmina" + glyph = "binary-tree-2" + label = "Remote Desktop" + variant = "default" + + [desktop_widgets.widget.desktop-widget-000000000000000b] + box_height = 0.0 + box_width = 0.0 + cx = 154.0 + cy = 237.0 + output = "eDP-1" + rotation = 0.0 + type = "button" + + [desktop_widgets.widget.desktop-widget-000000000000000b.settings] + background = true + command = "ssh takamaki switch-os" + glyph = "switch-horizontal" + label = "Switch OS" + variant = "default" + + [desktop_widgets.widget.desktop-widget-000000000000000c] + box_height = 0.0 + box_width = 0.0 + cx = 188.5 + cy = 301.0 + output = "eDP-1" + rotation = 0.0 + type = "button" + + [desktop_widgets.widget.desktop-widget-000000000000000c.settings] + background = true + command = "ssh takamaki universal-shutdown" + glyph = "shutdown" + label = "Shutdown Takamaki" + variant = "default" + [idle] behavior_order = [ "lock", "screen-off", "Hibernate" ] pre_action_fade_seconds = 30 @@ -162,9 +235,14 @@ pre_action_fade_seconds = 30 auto_locate = true [lockscreen_widgets] -enabled = false +enabled = true schema_version = 2 -widget_order = [ "lockscreen-login-box@eDP-1" ] +widget_order = [ + "lockscreen-login-box@eDP-1", + "lockscreen-widget-0000000000000001", + "lockscreen-widget-0000000000000002", + "lockscreen-widget-0000000000000004" +] [lockscreen_widgets.grid] cell_size = 16 @@ -174,8 +252,8 @@ widget_order = [ "lockscreen-login-box@eDP-1" ] [lockscreen_widgets.widget."lockscreen-login-box@eDP-1"] box_height = 70.0 box_width = 400.0 - cx = 480.0 - cy = 421.0 + cx = 448.0 + cy = 557.0 output = "eDP-1" rotation = 0.0 type = "login_box" @@ -191,19 +269,53 @@ widget_order = [ "lockscreen-login-box@eDP-1" ] show_login_button = true show_password_hint = true + [lockscreen_widgets.widget.lockscreen-widget-0000000000000001] + box_height = 80.0 + box_width = 160.0 + cx = 336.0 + cy = 408.0 + output = "eDP-1" + rotation = 0.0 + type = "weather" + + [lockscreen_widgets.widget.lockscreen-widget-0000000000000002] + box_height = 112.0 + box_width = 352.0 + cx = 432.0 + cy = 296.0 + output = "eDP-1" + rotation = 0.0 + type = "clock" + + [lockscreen_widgets.widget.lockscreen-widget-0000000000000004] + box_height = 272.0 + box_width = 464.0 + cx = 1136.0 + cy = 432.0 + output = "eDP-1" + rotation = 0.0 + type = "sticker" + + [lockscreen_widgets.widget.lockscreen-widget-0000000000000004.settings] + background = false + image_path = "/home/grey/Pictures/wife.jpg" + opacity = 0.95000000000000007 + [nightlight] enabled = true temperature_day = 6000 temperature_night = 3800 +[plugins] +enabled = [] + [shell] corner_radius_scale = 1.2500000186264515 -external_ip_enabled = true niri_overview_type_to_launch_enabled = true polkit_agent = true [shell.animation] - speed = 1.4500000216066837 + speed = 1.5000000223517418 [shell.launcher] categories = false @@ -288,6 +400,13 @@ directory = "/home/grey/nixos/assets/wallpapers" theme_mode = "dark" wallpaper_scheme = "muted" +[widget.active_window] +enabled = true +icon_size = 15 +max_length = 400 +scale = 0.94999999999999996 +title_scroll = "on_hover" + [widget.battery] enabled = true @@ -298,9 +417,12 @@ enabled = true enabled = true [widget.control-center] -custom_image = "/nix/store/ipwy1cafn30wy2fnr9hfa13xyrvbrnca-noctalia-5.0.0/share/noctalia/assets/images/distros/nixos.svg" +custom_image = "/nix/store/5mywyh8lp60x9li5688q1m39rqvy0ckp-noctalia-5.0.0/share/noctalia/assets/images/distros/nixos.svg" enabled = true +[widget.custom_button_2] +type = "custom_button" + [widget.media] hide_when_no_media = true title_scroll = "always" @@ -322,4 +444,4 @@ mute_color = "on_surface" show_label = false [widget.workspaces] -minimal = true \ No newline at end of file +scale = 0.90000000000000013 \ No newline at end of file diff --git a/assets/dotfiles/remmina-presets/group_rdp_takamaki_greyweather-dev.remmina b/assets/dotfiles/remmina-presets/group_rdp_takamaki_greyweather-dev.remmina new file mode 100644 index 0000000..7842b5d --- /dev/null +++ b/assets/dotfiles/remmina-presets/group_rdp_takamaki_greyweather-dev.remmina @@ -0,0 +1,110 @@ +[remmina] +password=. +gateway_username= +smartcard_pin= +window_height=780 +notes_text= +vc= +preferipv6=0 +ssh_tunnel_loopback=1 +serialname= +tls-seclevel= +freerdp_log_level=INFO +scale=2 +printer_overrides= +name=takamaki +console=0 +colordepth=99 +scaler_expand=0 +smartcard-logon=0 +precommand= +security= +disable_fastpath=0 +left-handed=0 +multitransport=0 +ssh_tunnel_command_args= +group= +server=greyweather.dev +viewonly=0 +ssh_tunnel_certfile= +glyph-cache=0 +rdp_idle_keypress_combo=1 +disableclipboard=0 +rdp_idle_keypress_time=No +audio-output= +ssh_tunnel_command= +monitorids= +parallelpath= +disconnect-prompt=0 +gateway_server= +protocol=RDP +old-license=0 +labels= +ssh_tunnel_password= +resolution_mode=1 +cert_ignore=0 +assistance_mode=0 +pth= +loadbalanceinfo= +disableautoreconnect=0 +ssh_tunnel_enabled=1 +clientbuild= +serialpermissive=0 +postcommand= +clientname= +resolution_width=0 +allow_empty_pass=0 +drive= +relax-order-checks=0 +base-cred-for-gw=0 +gateway_domain= +network=none +rdp2tcp= +serialdriver= +rdp_reconnect_attempts= +domain= +profile-lock=0 +username=grey +restricted-admin=0 +force_multimon=0 +exec= +multimon=0 +serialpath= +gateway_password= +enable-autostart=0 +usb= +ssh_tunnel_passphrase= +shareparallel=0 +smartcardname= +disablepasswordstoring=0 +quality=1 +shareprinter=0 +viewmode=4 +span=0 +parallelname= +ssh_tunnel_auth=1 +keymap= +ssh_tunnel_username=grey +execpath= +shareserial=0 +resolution_height=0 +rdp_mouse_jitter=No +useproxyenv=0 +sharesmartcard=0 +freerdp_log_filters= +microphone= +timeout= +ssh_tunnel_privatekey=/home/grey/.ssh/id_takamaki +gwtransp=auto +ssh_tunnel_server=takamaki +ignore-tls-errors=1 +window_maximize=1 +forceipvx=0 +dvc= +gateway_usage=0 +keyboard_grab=1 +window_width=1536 +no-suppress=0 +websockets=0 +sound=local +disable-smooth-scrolling=0 diff --git a/global-configs/kitty.nix b/global-configs/kitty.nix index be897be..977061e 100644 --- a/global-configs/kitty.nix +++ b/global-configs/kitty.nix @@ -8,8 +8,4 @@ shellIntegration.enableBashIntegration = true; enableGitIntegration = true; }; - - programs.zsh.shellAliases = { - ssh = "kitten ssh"; - }; } \ No newline at end of file diff --git a/global-configs/niri.nix b/global-configs/niri.nix index ade0807..023a208 100644 --- a/global-configs/niri.nix +++ b/global-configs/niri.nix @@ -30,5 +30,18 @@ fi ln -s /home/grey/nixos/assets/dotfiles/noctalia-state/plugins /home/grey/.local/state/noctalia/plugins ''; + + symlinkNoctaliaConfig = lib.hm.dag.entryAfter ["writeBoundary"] '' + #!/bin/bash + if [ -f /home/grey/.config/noctalia/settings.toml ]; then + rm /home/grey/.config/noctalia/settings.toml + fi + ln -s /home/grey/nixos/assets/dotfiles/noctalia-state/settings.toml /home/grey/.config/noctalia/settings.toml + + if [ -d /home/grey/.config/noctalia/plugins ]; then + rm -rf /home/grey/.config/noctalia/plugins + fi + ln -s /home/grey/nixos/assets/dotfiles/noctalia-state/plugins /home/grey/.config/noctalia/plugins + ''; }; } \ No newline at end of file diff --git a/global-home.nix b/global-home.nix index ac70b0d..b18cbe7 100644 --- a/global-home.nix +++ b/global-home.nix @@ -16,6 +16,7 @@ bibata-cursors x264 speedtest-go + gparted ]; programs.git = { diff --git a/hosts/kitagawa/default.nix b/hosts/kitagawa/default.nix index 229ba46..41b7e71 100644 --- a/hosts/kitagawa/default.nix +++ b/hosts/kitagawa/default.nix @@ -14,8 +14,8 @@ in { ./hardware-configuration.nix "${modules-dir}/zsh.nix" "${modules-dir}/display-managers/lightdm.nix" - #"${modules-dir}/desktop-environments/gnome.nix" "${modules-dir}/window-managers/niri.nix" + ./modules/hardware-fixes.nix ]; boot.loader.limine = { @@ -23,39 +23,12 @@ in { maxGenerations = 10; }; + services.iio-niri.enable = true; + stylix.enable = true; stylix.image = ../../assets/wallpapers/kitagawa.jpg; stylix.polarity = "dark"; - systemd.sleep.settings.Sleep = { - AllowSuspend = "no"; - AllowHibernation = "yes"; - }; - - services.logind.settings.Login.HandleLidSwitch = "ignore"; - - systemd.services.disable-lid-wakeup = { - wantedBy = [ "multi-user.target" ]; - description = "Prevent the lid switch from waking laptop from hibernation"; - serviceConfig = { - Type = "simple"; - User = "root"; - ExecStart = "${pkgs.busybox}/bin/sh -c \"echo LID > /proc/acpi/wakeup\""; - }; - }; - - systemd.services.disable-tty-switch = { - wantedBy = [ "multi-user.target" ]; - description = "Prevent alt+arrow keys from switching tty"; - serviceConfig = { - Type = "simple"; - User = "root"; - ExecStart = "${pkgs.busybox}/bin/sh -c \"${pkgs.kbd}/bin/dumpkeys -k|grep -v Incr_Console|grep -v Decr_Console|${pkgs.kbd}/bin/loadkeys\""; - }; - }; - - services.udisks2.enable = true; - services.fprintd.enable = true; security.pam.services.login.fprintAuth = true; security.pam.services.sudo.fprintAuth = true; diff --git a/hosts/kitagawa/home.nix b/hosts/kitagawa/home.nix index bc1f4c5..8f8d555 100644 --- a/hosts/kitagawa/home.nix +++ b/hosts/kitagawa/home.nix @@ -36,6 +36,8 @@ in { kdePackages.filelight remmina freerdp + jmtpfs + loupe ]; stylix.targets.floorp.profileNames = [ "default" ]; @@ -100,4 +102,21 @@ in { }; }; }; + + programs.zsh.shellAliases = { + wake-takamaki = "ssh sakamoto .local/bin/wake-takamaki"; + shutdown-takamaki = "ssh takamaki global-shutdown"; + reboot-takamaki = "ssh takamaki global-reboot"; + switch-takamaki-os = "ssh takamaki switch-os"; + }; + + home.activation = { + linkRemminaPresets = lib.hm.dag.entryAfter ["writeBoundary"] '' + #!/bin/bash + if [ -d /home/grey/.local/share/remmina ]; then + rm -rf /home/grey/.local/share/remmina + fi + ln -s /home/grey/nixos/assets/dotfiles/remmina-presets /home/grey/.local/share/remmina + ''; + }; } diff --git a/hosts/kitagawa/modules/hardware-fixes.nix b/hosts/kitagawa/modules/hardware-fixes.nix new file mode 100644 index 0000000..51c7121 --- /dev/null +++ b/hosts/kitagawa/modules/hardware-fixes.nix @@ -0,0 +1,32 @@ +{ + pkgs, + config, + ... +}: { + systemd.sleep.settings.Sleep = { + AllowSuspend = "no"; + AllowHibernation = "yes"; + }; + + services.logind.settings.Login.HandleLidSwitch = "ignore"; + + systemd.services.disable-lid-wakeup = { + wantedBy = [ "multi-user.target" ]; + description = "Prevent the lid switch from waking laptop from hibernation"; + serviceConfig = { + Type = "simple"; + User = "root"; + ExecStart = "${pkgs.busybox}/bin/sh -c \"echo LID > /proc/acpi/wakeup\""; + }; + }; + + systemd.services.disable-tty-switch = { + wantedBy = [ "multi-user.target" ]; + description = "Prevent alt+arrow keys from switching tty"; + serviceConfig = { + Type = "simple"; + User = "root"; + ExecStart = "${pkgs.busybox}/bin/sh -c \"${pkgs.kbd}/bin/dumpkeys -k|grep -v Incr_Console|grep -v Decr_Console|${pkgs.kbd}/bin/loadkeys\""; + }; + }; +} diff --git a/modules/window-managers/niri.nix b/modules/window-managers/niri.nix index ae5adae..3838e24 100644 --- a/modules/window-managers/niri.nix +++ b/modules/window-managers/niri.nix @@ -15,6 +15,8 @@ services.upower.enable = true; + services.udisks2.enable = true; + programs.niri = { enable = true; useNautilus = true;