From b12f254b90b993dfc5cc3f2218e909f6e23e72a5 Mon Sep 17 00:00:00 2001 From: Ashhhleyyy Date: Wed, 14 Aug 2024 20:39:37 +0100 Subject: [PATCH] feat: more niri stuffs --- flake.nix | 1 + home/ash/niri.nix | 42 +++++++++++++++++++++++++---------- home/ash/waybar/config | 0 home/ash/waybar/style.css | 4 ++-- hosts/lea/configuration.nix | 8 ------- hosts/loona/configuration.nix | 5 +++++ roles/niri.nix | 3 +++ 7 files changed, 41 insertions(+), 22 deletions(-) create mode 100644 home/ash/waybar/config diff --git a/flake.nix b/flake.nix index 1f31aee..89a3376 100644 --- a/flake.nix +++ b/flake.nix @@ -141,6 +141,7 @@ ./home/ash/alex.nix ./home/ash/desktop.nix ./home/ash/emacs.nix + ./home/ash/niri.nix ./home/ash/obs.nix ./home/ash/intellij.nix ./home/ash/lutris.nix diff --git a/home/ash/niri.nix b/home/ash/niri.nix index 1e466df..3a1af8f 100644 --- a/home/ash/niri.nix +++ b/home/ash/niri.nix @@ -3,6 +3,7 @@ settings = { input = { focus-follows-mouse.enable = true; + keyboard.xkb.layout = "gb"; }; layout = { gaps = 8; @@ -163,7 +164,7 @@ # "custom/music" ]; "modules-right" = [ - "pulseaudio" + "wireplumber" "backlight" "battery" "clock" @@ -195,8 +196,8 @@ "clock" = { "timezone" = "Europe/London"; "tooltip-format" = "{:%Y %B}\n{calendar}"; - "format-alt" = " {:%d/%m/%Y}"; - "format" = " {:%H:%M}"; + "format-alt" = " {:%d/%m/%Y}"; + "format" = "󰥔 {:%H:%M}"; }; "backlight" = { "device" = "intel_backlight"; @@ -209,19 +210,21 @@ "critical" = 15; }; "format" = "{icon}"; - "format-charging" = ""; - "format-plugged" = ""; + "format-charging" = "{icon} 󰚥"; + "format-plugged" = "󰐧"; "format-alt" = "{icon}"; - "format-icons" = ["" "" "" "" "" "" "" "" "" "" "" ""]; + "format-icons" = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ""]; }; - "pulseaudio" = { + "wireplumber" = { # "scroll-step" = 1, # %, can be a float "format" = "{icon} {volume}%"; - "format-muted" = ""; + "format-muted" = " {volume}%"; "format-icons" = { "default" = ["" "" " "]; }; - "on-click" = "pavucontrol"; + }; + "wireplumber#source" = { + format = " {source}"; }; "custom/lock" = { "tooltip" = false; @@ -230,7 +233,7 @@ }; "custom/power" = { "tooltip" = false; - "on-click" = "wlogout &"; + "on-click" = "niri msg action quit"; "format" = "Logout"; }; }]; @@ -245,12 +248,27 @@ Unit = { Description = "swaybg"; PartOf = ["graphical-session.target"]; - After = ["graphical-session.target"]; + After = ["niri.service"]; Requisite = ["graphical-session.target"]; }; Service = { - ExecStart = "${pkgs.swaybg}/bin/swaybg -i $HOME/wallpaper.png"; + ExecStart = "${pkgs.swaybg}/bin/swaybg -i /home/ash/wallpaper.png"; Restart = "on-failure"; }; }; + + systemd.user.services."pam_kwallet_init" = { + Unit = { + Description = "Unlock kwallet on login"; + PartOf = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + After = ["niri.service"]; + }; + Service = { + ExecStart = "${pkgs.kwallet-pam}/libexec/pam_kwallet_init"; + Type = "simple"; + Restart = "no"; + Slice = "background.slice"; + }; + }; } diff --git a/home/ash/waybar/config b/home/ash/waybar/config new file mode 100644 index 0000000..e69de29 diff --git a/home/ash/waybar/style.css b/home/ash/waybar/style.css index 39cb5d9..ece1578 100644 --- a/home/ash/waybar/style.css +++ b/home/ash/waybar/style.css @@ -30,7 +30,7 @@ @define-color rosewater #f5e0dc; * { - font-family: FantasqueSansMono Nerd Font; + font-family: Maple Mono NF; font-size: 17px; min-height: 0; } @@ -128,4 +128,4 @@ #tray { margin-right: 1rem; border-radius: 1rem; -} \ No newline at end of file +} diff --git a/hosts/lea/configuration.nix b/hosts/lea/configuration.nix index 540655a..68998c6 100644 --- a/hosts/lea/configuration.nix +++ b/hosts/lea/configuration.nix @@ -17,12 +17,6 @@ networking.hostName = "lea"; - networking.networkmanager.enable = true; - - time.timeZone = "Europe/London"; - - i18n.defaultLocale = "en_GB.UTF-8"; - services.xserver = { layout = "gb"; xkbVariant = ""; @@ -32,8 +26,6 @@ nix.settings.trusted-users = [ "@wheel" ]; - users.users.ash.extraGroups = [ "networkmanager" ]; - nixpkgs.config.allowUnfree = true; environment.systemPackages = with pkgs; [ diff --git a/hosts/loona/configuration.nix b/hosts/loona/configuration.nix index ed019ff..394a481 100644 --- a/hosts/loona/configuration.nix +++ b/hosts/loona/configuration.nix @@ -6,6 +6,7 @@ ../../common/tailscale.nix ../../common/tpm.nix ../../roles/libvirt.nix + ../../roles/niri.nix ../../roles/podman.nix ./hardware-configuration.nix ]; @@ -54,6 +55,10 @@ hardware.rtl-sdr.enable = true; users.users.ash.extraGroups = ["plugdev"]; hardware.usb-modeswitch.enable = true; + services.udev.packages = with pkgs; [ + platformio-core + openocd + ]; programs.steam.enable = true; nixpkgs.config.allowUnfree = true; diff --git a/roles/niri.nix b/roles/niri.nix index 0581147..7d7f24a 100644 --- a/roles/niri.nix +++ b/roles/niri.nix @@ -10,5 +10,8 @@ }; }; programs.niri.enable = true; + services.gnome.gnome-keyring.enable = lib.mkForce false; hardware.graphics.enable = true; + + programs.nm-applet.enable = true; }