diff --git a/home-manager/home.nix b/home-manager/home.nix index 738be94..c3a281e 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -21,6 +21,7 @@ in ./firefox.nix ./vscode.nix ./waybar.nix + ./wallpaper.nix ./swaylock.nix ./swaync.nix ]; @@ -61,6 +62,19 @@ in exec swaylock ''; }) + (pkgs.writeShellApplication { + name = "shell.nix"; + text = '' + cat > shell.nix < {} }: pkgs.mkShell { + buildInputs = with pkgs; [ ]; + packages = with pkgs; [ ]; + } + EOF + + echo "use nix" > .envrc + ''; + }) ] ++ import ./common-packages.nix { inherit pkgs inputs; }; # Nicely reload system units when changing configs diff --git a/home-manager/wallpaper.nix b/home-manager/wallpaper.nix new file mode 100644 index 0000000..6f9a19b --- /dev/null +++ b/home-manager/wallpaper.nix @@ -0,0 +1,33 @@ +{ pkgs, config, ... }: + + +let + pkg = (import + (pkgs.fetchFromGitHub { + owner = "Noratrieb"; + repo = "wallpapersc"; + rev = "ce0def46fd0ae8d36b65ede91e068c4bca2cf9a6"; + hash = "sha256-GSBFoAElnkh0+adIqSPKwJlyYiwp4NDhsOpT+SoZv5I="; + })) + { inherit pkgs; }; +in +{ + systemd.user.services.wallpapersc = { + Unit = { + Description = "wallpaper daemon"; + PartOf = [ + config.wayland.systemd.target + ]; + After = [ config.wayland.systemd.target ]; + ConditionEnvironment = "WAYLAND_DISPLAY"; + }; + Service = { + ExecStart = "${pkg}/bin/wallpapersc"; + Restart = "on-failure"; + }; + + Install.WantedBy = [ + config.wayland.systemd.target + ]; + }; +}