From b81a7a669a5c9d0f853af5dff5f1a14c5f5ad523 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Fri, 29 Sep 2023 10:32:24 +0200 Subject: [PATCH] systemd 254 arrived, switched back to sway --- flake.lock | 24 +++++++------- .../modules/networks/default.nix | 10 +++++- hosts/nuc/default.nix | 1 - hosts/nuc/modules/networks/default.nix | 8 ++++- hosts/thinkpad/default.nix | 8 ++++- hosts/thinkpad/modules/greetd/default.nix | 2 +- hosts/thinkpad/modules/networks/default.nix | 12 +++++-- users/rouven/default.nix | 2 +- users/rouven/modules/packages.nix | 1 + users/rouven/modules/wayland/default.nix | 4 +-- users/rouven/modules/wayland/river.nix | 1 + users/rouven/modules/wayland/shikane.nix | 31 +++++++++++++++++++ users/rouven/modules/wayland/sway.nix | 11 +++++-- users/rouven/modules/wayland/waybar.nix | 17 ++++------ 14 files changed, 96 insertions(+), 36 deletions(-) diff --git a/flake.lock b/flake.lock index 5ff55d3..247ae1d 100644 --- a/flake.lock +++ b/flake.lock @@ -236,11 +236,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1695555223, - "narHash": "sha256-YEJcTOg6Lt4lxKJxcir1TLN/OZYdCHFe7lXskJGhcHY=", + "lastModified": 1695886142, + "narHash": "sha256-5g5meWSsNT2lTRu6CJyOBFEzHe3GomjSDQyIwUm39AU=", "owner": "helix-editor", "repo": "helix", - "rev": "7702e130ba93f885ac56be5818b93c544a00538f", + "rev": "77fe8f214b15b8297a9f2f8ed929994559604d6c", "type": "github" }, "original": { @@ -255,11 +255,11 @@ ] }, "locked": { - "lastModified": 1695550077, - "narHash": "sha256-xoxR/iY69/3lTnnZDP6gf3J46DUKPcf+Y1jH03tfZXE=", + "lastModified": 1695738267, + "narHash": "sha256-LTNAbTQ96xSj17xBfsFrFS9i56U2BMLpD0BduhrsVkU=", "owner": "nix-community", "repo": "home-manager", - "rev": "a88df2fb101778bfd98a17556b3a2618c6c66091", + "rev": "0f4e5b4999fd6a42ece5da8a3a2439a50e48e486", "type": "github" }, "original": { @@ -371,11 +371,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1695541019, - "narHash": "sha256-rs++zfk41K9ArWkDAlmBDlGlKO8qeRIRzdjo+9SmNFI=", + "lastModified": 1695887975, + "narHash": "sha256-u3+5FR12dI305jCMb0fJNQx2qwoQ54lv1tPoEWp0hmg=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "61283b30d11f27d5b76439d43f20d0c0c8ff5296", + "rev": "adcfd6aa860d1d129055039696bc457af7d50d0e", "type": "github" }, "original": { @@ -448,11 +448,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1695360818, - "narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=", + "lastModified": 1695830400, + "narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e35dcc04a3853da485a396bdd332217d0ac9054f", + "rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2", "type": "github" }, "original": { diff --git a/hosts/falkenstein-1/modules/networks/default.nix b/hosts/falkenstein-1/modules/networks/default.nix index 7725623..4972bf4 100644 --- a/hosts/falkenstein-1/modules/networks/default.nix +++ b/hosts/falkenstein-1/modules/networks/default.nix @@ -14,7 +14,15 @@ useNetworkd = true; enableIPv6 = true; }; - services.resolved.dnssec = "true"; + services.resolved = { + dnssec = "true"; + fallbackDns = [ + "9.9.9.9" + "149.112.112.112" + "2620:fe::fe" + "2620:fe::9" + ]; + }; systemd.network = { enable = true; networks."10-loopback" = { diff --git a/hosts/nuc/default.nix b/hosts/nuc/default.nix index 8836cff..c17858e 100644 --- a/hosts/nuc/default.nix +++ b/hosts/nuc/default.nix @@ -49,7 +49,6 @@ i18n.defaultLocale = "en_US.UTF-8"; console = { - font = "Lat2-Terminus16"; keyMap = "dvorak"; }; diff --git a/hosts/nuc/modules/networks/default.nix b/hosts/nuc/modules/networks/default.nix index aee89eb..7e45280 100644 --- a/hosts/nuc/modules/networks/default.nix +++ b/hosts/nuc/modules/networks/default.nix @@ -8,7 +8,13 @@ }; services.resolved = { enable = true; - dnssec = "yes"; + dnssec = "true"; + fallbackDns = [ + "9.9.9.9" + "149.112.112.112" + "2620:fe::fe" + "2620:fe::9" + ]; # make room for the adguard dns extraConfig = '' [Resolve] diff --git a/hosts/thinkpad/default.nix b/hosts/thinkpad/default.nix index 6201ad6..0c1aa8d 100755 --- a/hosts/thinkpad/default.nix +++ b/hosts/thinkpad/default.nix @@ -11,6 +11,7 @@ ]; # Use the systemd-boot EFI boot loader. + # boot.initrd.systemd.additionalUpstreamUnits = [ "systemd-vconsole-setup.service" ]; boot = { # Lanzaboote currently replaces the systemd-boot module. # This setting is usually set to true in configuration.nix @@ -94,7 +95,8 @@ i18n.defaultLocale = "en_US.UTF-8"; console = { keyMap = "dvorak"; - font = "Lat2-Terminus16"; + # font = "Lat2-Terminus16"; + # earlySetup = true; colors = let colors = config.home-manager.users.rouven.colorScheme.colors; in [ colors.base00 @@ -129,6 +131,10 @@ sound.enable = true; #hardware.pulseaudio.enable = true; hardware.bluetooth.enable = true; + # hardware.opentabletdriver = { + # enable = true; + # daemon.enable = true; + # }; security = { polkit.enable = true; diff --git a/hosts/thinkpad/modules/greetd/default.nix b/hosts/thinkpad/modules/greetd/default.nix index 76f09bb..d4d18b7 100644 --- a/hosts/thinkpad/modules/greetd/default.nix +++ b/hosts/thinkpad/modules/greetd/default.nix @@ -4,7 +4,7 @@ enable = true; settings = { default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd river"; + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd sway"; }; }; }; diff --git a/hosts/thinkpad/modules/networks/default.nix b/hosts/thinkpad/modules/networks/default.nix index d40dfa3..3c5ddaf 100644 --- a/hosts/thinkpad/modules/networks/default.nix +++ b/hosts/thinkpad/modules/networks/default.nix @@ -11,8 +11,16 @@ owner = config.users.users.systemd-network.name; }; }; - # allow downgrade since fritzbox at home doesn't support it (yet?) - services.resolved.dnssec = "allow-downgrade"; + services.resolved = { + fallbackDns = [ + "9.9.9.9" + "149.112.112.112" + "2620:fe::fe" + "2620:fe::9" + ]; + # allow downgrade since fritzbox at home doesn't support it (yet?) + dnssec = "allow-downgrade"; + }; networking = { useNetworkd = true; hostName = "thinkpad"; diff --git a/users/rouven/default.nix b/users/rouven/default.nix index 0c6bd52..cd0e0ca 100644 --- a/users/rouven/default.nix +++ b/users/rouven/default.nix @@ -5,7 +5,7 @@ users.users.rouven = { description = "Rouven Seifert"; isNormalUser = true; - extraGroups = [ "wheel" "video" "libvirtd" "tss" ]; + extraGroups = [ "wheel" "video" "libvirtd" "tss" "input" ]; initialHashedPassword = "$6$X3XERQv28Nt1UUT5$MjdMBDuXyEwexkuKqmNFweez69q4enY5cjMXSbBxOc6Bq7Fhhp7OqmCm02k3OGjoZFXzPV9ZHuMSGKZOtwYIk1"; }; home-manager.useUserPackages = true; diff --git a/users/rouven/modules/packages.nix b/users/rouven/modules/packages.nix index d9d34bc..6570295 100644 --- a/users/rouven/modules/packages.nix +++ b/users/rouven/modules/packages.nix @@ -57,6 +57,7 @@ hcloud jq logseq + xournalpp # programming languages cargo diff --git a/users/rouven/modules/wayland/default.nix b/users/rouven/modules/wayland/default.nix index c0fddd3..41f422b 100644 --- a/users/rouven/modules/wayland/default.nix +++ b/users/rouven/modules/wayland/default.nix @@ -2,9 +2,8 @@ { imports = [ - # ./sway.nix + ./sway.nix ./breaktimer.nix - ./river.nix ./waybar.nix ./shikane.nix ]; @@ -15,6 +14,7 @@ swaynotificationcenter playerctl wdisplays + (libinput.override { eventGUISupport = true; }) ]; services.swayidle = { diff --git a/users/rouven/modules/wayland/river.nix b/users/rouven/modules/wayland/river.nix index a36eef4..88f560d 100644 --- a/users/rouven/modules/wayland/river.nix +++ b/users/rouven/modules/wayland/river.nix @@ -26,6 +26,7 @@ riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad drag enabled riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad middle-emulation enabled riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad accel-profile adaptive + riverctl spawn "${pkgs.swaybg}/bin/swaybg -i ${../../../../images/wallpaper.png} -m fill" diff --git a/users/rouven/modules/wayland/shikane.nix b/users/rouven/modules/wayland/shikane.nix index 694cce0..20ff3a7 100644 --- a/users/rouven/modules/wayland/shikane.nix +++ b/users/rouven/modules/wayland/shikane.nix @@ -33,6 +33,37 @@ } ]; } + { + # TODO home vertical + name = "home-vertical"; + output = [ + { + match = "eDP-1"; + enable = true; + position = { + x = 1080; + y = 0; + }; + } + { + match = "DP-3"; + enable = true; + position = { + x = 0; + y = 0; + }; + transform = "270"; + } + { + match = "HDMI-A-1"; + enable = true; + position = { + x = 3000; + y = 0; + }; + } + ]; + } { name = "external-monitor-default"; output = [ diff --git a/users/rouven/modules/wayland/sway.nix b/users/rouven/modules/wayland/sway.nix index 934bd91..80df45f 100644 --- a/users/rouven/modules/wayland/sway.nix +++ b/users/rouven/modules/wayland/sway.nix @@ -7,10 +7,13 @@ config = rec { startup = [ { - command = "${lib.getExe pkgs.swaybg} -i ${../../../../images/wallpaper.png}"; + command = "${lib.getExe pkgs.swaybg} -i ${../../../../images/wallpaper.png} -m fill"; } { - command = lib.getExe pkgs.autotiling-rs; + command = "${pkgs.autotiling-rs}/bin/autotiling-rs"; + } + { + command = ''swaymsg -t subscribe -m "['workspace']" | jq --unbuffered -r 'select(.change == "focus") | .current.output' | xargs -L1 swaymsg input 1386:884:Wacom_Intuos_S_Pen map_to_output''; } ]; modifier = "Mod4"; @@ -30,6 +33,7 @@ tap = "enabled"; drag = "enabled"; middle_emulation = "enabled"; + accel_profile = "adaptive"; }; }; keybindings = @@ -38,7 +42,7 @@ "Print" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area"; "XF86Launch2" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot save area - | ${lib.getExe pkgs.swappy} -f -"; "XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 10"; - "XF86MonBrightnessDown" = "exec ${kgs.light}/bin/light -U 10"; + "XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 10"; "XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"; "XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle"; "XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"; @@ -56,3 +60,4 @@ }; }; } + diff --git a/users/rouven/modules/wayland/waybar.nix b/users/rouven/modules/wayland/waybar.nix index cd758f5..0f56ffd 100644 --- a/users/rouven/modules/wayland/waybar.nix +++ b/users/rouven/modules/wayland/waybar.nix @@ -10,8 +10,7 @@ layer = "top"; position = "top"; height = 26; - # modules-left = [ "wlr/workspaces" "custom/spotifytitle" "hyprland/window" ]; - modules-left = [ "river/tags" "custom/spotifytitle" "river/window" ]; + modules-left = [ "sway/workspaces" "custom/spotifytitle" "sway/window" ]; modules-right = [ "network" "cpu" "pulseaudio" "battery" "tray" "custom/notification" "clock" ]; network = { format-wifi = " {essid} ({signalStrength}%)"; @@ -21,11 +20,11 @@ format-disconnected = "Disconnected ⚠"; format-alt = "{ifname}: {ipaddr}/{cidr}"; }; - "river/tags" = { + "sway/workspaces" = { format = "{icon}"; on-click = "activate"; }; - "river/window" = { + "sway/window" = { format = " {}"; # separate-outputs = true; }; @@ -114,22 +113,18 @@ background-color: transparent; } - #tags button { + #workspaces button { padding: 0 5px; background-color: transparent; color: #${config.colorScheme.colors.base05}; } - - #tags button.occupied { - box-shadow: inset 0 -3px #${config.colorScheme.colors.base05}; - } - #tags button.focused { + #workspaces button.focused { background-color: #${config.colorScheme.colors.base04}; box-shadow: inset 0 -3px #${config.colorScheme.colors.base05}; } - #tags button.urgent { + #workspaces button.urgent { background-color: #eb4d4b; }