From 11bbb2a99fb6a8741522830d8d3e9c2d90d4e5d5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 23 Jan 2025 14:37:58 +0100 Subject: ... --- hosts/sif/default.nix | 34 ++----------------------------- hosts/sif/greetd/.gitattributes | 1 + hosts/sif/greetd/default.nix | 44 +++++++++++++++++++++++++++++++++++++++++ hosts/sif/greetd/wallpaper.png | 3 +++ hosts/sif/mail/default.nix | 2 +- 5 files changed, 51 insertions(+), 33 deletions(-) create mode 100644 hosts/sif/greetd/.gitattributes create mode 100644 hosts/sif/greetd/default.nix create mode 100644 hosts/sif/greetd/wallpaper.png (limited to 'hosts') diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix index 655b2e9c..7db46c67 100644 --- a/hosts/sif/default.nix +++ b/hosts/sif/default.nix @@ -12,7 +12,7 @@ let in { imports = with flake.nixosModules.systemProfiles; [ ./hw.nix - ./mail ./libvirt + ./mail ./libvirt ./greetd tmpfs-root bcachefs initrd-all-crypto-modules default-locale openssh rebuild-machines niri-unstable networkmanager flakeInputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1 flakeInputs.impermanence.nixosModules.impermanence @@ -470,39 +470,8 @@ in { exportConfiguration = true; }; libinput.enable = true; - - greetd = { - enable = true; - # settings.default_session.command = let - # cfg = config.programs.regreet; - # in pkgs.writeShellScript "greeter" '' - # modprobe -r nvidia_drm - - # exec ${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} ${lib.escapeShellArgs cfg.cageArgs} -- ${lib.getExe cfg.package} - # ''; - }; }; - programs.regreet = { - enable = true; - theme = { - package = pkgs.equilux-theme; - name = "Equilux-compact"; - }; - iconTheme = { - package = pkgs.paper-icon-theme; - name = "Paper-Mono-Dark"; - }; - font = { - package = pkgs.fira; - name = "Fira Sans"; - # size = 6; - }; - cageArgs = [ "-s" "-m" "last" ]; - settings = { - GTK.application_prefer_dark_theme = true; - }; - }; programs.niri.enable = true; systemd.tmpfiles.settings = { @@ -702,6 +671,7 @@ in { services.dbus.packages = with pkgs; [ dbus dconf + xdg-desktop-portal-gtk ]; services.udisks2.enable = true; diff --git a/hosts/sif/greetd/.gitattributes b/hosts/sif/greetd/.gitattributes new file mode 100644 index 00000000..3e1848c2 --- /dev/null +++ b/hosts/sif/greetd/.gitattributes @@ -0,0 +1 @@ +wallpaper.png filter=lfs diff=lfs merge=lfs -text diff --git a/hosts/sif/greetd/default.nix b/hosts/sif/greetd/default.nix new file mode 100644 index 00000000..f609fc05 --- /dev/null +++ b/hosts/sif/greetd/default.nix @@ -0,0 +1,44 @@ +{ pkgs, ... }: +{ + config = { + services.greetd = { + enable = true; + # settings.default_session.command = let + # cfg = config.programs.regreet; + # in pkgs.writeShellScript "greeter" '' + # modprobe -r nvidia_drm + + # exec ${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} ${lib.escapeShellArgs cfg.cageArgs} -- ${lib.getExe cfg.package} + # ''; + }; + programs.regreet = { + enable = true; + theme = { + package = pkgs.equilux-theme; + name = "Equilux-compact"; + }; + iconTheme = { + package = pkgs.paper-icon-theme; + name = "Paper-Mono-Dark"; + }; + font = { + package = pkgs.fira; + name = "Fira Sans"; + # size = 6; + }; + cageArgs = [ "-s" "-m" "last" ]; + settings = { + GTK.application_prefer_dark_theme = true; + widget.clock.format = "%F %H:%M:%S%:z"; + background = { + path = pkgs.runCommand "wallpaper.png" { + buildInputs = with pkgs; [ imagemagick ]; + } '' + magick ${./wallpaper.png} -filter Gaussian -resize 6.25% -define filter:sigma=2.5 -resize 1600% "$out" + ''; + fit = "Cover"; + }; + }; + }; + }; +} diff --git a/hosts/sif/greetd/wallpaper.png b/hosts/sif/greetd/wallpaper.png new file mode 100644 index 00000000..f6f6c818 --- /dev/null +++ b/hosts/sif/greetd/wallpaper.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe030fabe1a9adcfc0742e794abe9b595831c1b1b9653f3f9794901297413ffa +size 6073128 diff --git a/hosts/sif/mail/default.nix b/hosts/sif/mail/default.nix index f36cd599..8d6cd705 100644 --- a/hosts/sif/mail/default.nix +++ b/hosts/sif/mail/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: { services.postfix = { enable = true; -- cgit v1.2.3