added wallpaper as flake input

+19 -1
flake.lock
···
"patchelf": "patchelf",
"ryan-cv": "ryan-cv",
"ryan-website": "ryan-website",
-
"twitcher": "twitcher"
+
"twitcher": "twitcher",
+
"wallpapers": "wallpapers"
}
},
"ryan-cv": {
···
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
+
}
+
},
+
"wallpapers": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1686522804,
+
"narHash": "sha256-EoBk7YX/nqus5eal7K4DVUkQI+n5Em4ApP2CX1uzf/c=",
+
"ref": "main",
+
"rev": "82796072518780cac51b3b06341ada3a2b45a060",
+
"revCount": 1,
+
"type": "git",
+
"url": "ssh://git@git.freumh.org/ryan/wallpapers.git"
+
},
+
"original": {
+
"ref": "main",
+
"type": "git",
+
"url": "ssh://git@git.freumh.org/ryan/wallpapers.git"
}
}
},
+19 -3
flake.nix
···
patchelf.url = "github:nixos/patchelf/ea2fca765c";
eeww.url = "github:RyanGibb/eeww/nixos";
aeon.url = "github:RyanGibb/aeon";
-
+
wallpapers = {
+
url ="git+ssh://git@git.freumh.org/ryan/wallpapers.git?ref=main";
+
flake = false;
+
};
eilean.url ="git+https://git@git.freumh.org/ryan/eilean-nix.git?ref=main";
# eilean.url ="github:RyanGibb/eilean-nix/main";
ryan-website.url = "git+https://git@git.freumh.org/ryan/website.git";
···
aeon.inputs.nixpkgs.follows = "nixpkgs";
};
-
outputs = { self, nixpkgs, nixpkgs-unstable, eilean, home-manager, ryan-website, patchelf, twitcher, nixos-hardware, eeww, aeon, ... }@inputs: rec {
-
+
outputs = {
+
self,
+
nixpkgs,
+
nixpkgs-unstable,
+
nixos-hardware,
+
home-manager,
+
patchelf,
+
eeww,
+
aeon,
+
wallpapers,
+
eilean,
+
ryan-website,
+
twitcher,
+
...
+
}@inputs: rec {
nixosConfigurations =
let
hosts = builtins.attrNames (builtins.readDir ./hosts);
+2 -2
modules/personal/gui/i3.nix
···
-
{ pkgs, config, lib, ... }:
+
{ pkgs, config, lib, wallpapers, ... }:
let cfg = config.personal.gui; in
{
options.personal.gui.i3 = lib.mkEnableOption "i3";
config = lib.mkIf cfg.i3 {
-
home-manager.users.${config.custom.username} = import ../home/i3.nix;
+
home-manager.users.${config.custom.username} = import ../home/i3.nix { inherit pkgs lib wallpapers; };
services.xserver = {
enable = true;
+2 -2
modules/personal/gui/sway.nix
···
-
{ pkgs, config, lib, ... }:
+
{ pkgs, config, lib, wallpapers, ... }:
let cfg = config.personal.gui; in
{
options.personal.gui.sway = lib.mkEnableOption "sway";
config = lib.mkIf cfg.sway {
-
home-manager.users.${config.custom.username} = import ../home/sway.nix;
+
home-manager.users.${config.custom.username} = import ../home/sway.nix { inherit pkgs lib wallpapers; };
programs.sway =
let
+6 -2
modules/personal/home/i3.nix
···
-
{ pkgs, config, lib, ... }:
+
{ pkgs, lib, wallpapers, ... }:
let replacements = {
wm = "i3";
···
wallpaper = ''
'';
set_wallpaper = ''
-
feh --bg-fill $WALLPAPER_DIR/default
+
feh --bg-fill $HOME/.cache/wallpaper
'';
locker = "xsecurelock";
enable_output = "xrandr --output $laptop_output --auto";
···
# idling
home.pointerCursor.x11.enable = true;
+
+
home.sessionVariables = {
+
WALLPAPER_DIR = wallpapers;
+
};
home.file = {
".xinitrc".text = ''
+4 -2
modules/personal/home/sway.nix
···
-
{ pkgs, lib, ... }:
+
{ pkgs, lib, wallpapers, ... }:
let replacements = {
wm = "sway";
···
locked = "--locked";
polkit_gnome = "${pkgs.polkit_gnome}";
set_wallpaper = ''
-
swaymsg "output * bg $WALLPAPER_DIR/default fill #2e3440"
+
swaymsg "output * bg $HOME/.cache/wallpaper fill #2e3440"
'';
locker = "swaylock -f -i ~/pictures/wallpapers/default";
enable_output = "swaymsg output $laptop_output enable";
···
# for screensharing
XDG_SESSION_TYPE = "wayland";
XDG_CURRENT_DESKTOP = "sway";
+
+
WALLPAPER_DIR = wallpapers;
};
home.file = {
+1 -3
modules/personal/home/wm/scripts/set_random_wallpaper.sh
···
#!/usr/bin/env bash
-
WALLPAPER_DIR=~/pictures/wallpapers
-
-
ln -sf "$(find $WALLPAPER_DIR -type f | sort -R | tail -1)" $WALLPAPER_DIR/default
+
ln -sf "$(find $WALLPAPER_DIR -type f | sort -R | tail -1)" $HOME/.cache/wallpaper
@set_wallpaper@
+3 -5
modules/personal/home/wm/scripts/set_selected_wallpaper.sh
···
#!/usr/bin/env bash
-
WALLPAPER_DIR=$HOME/pictures/wallpapers
-
-
WALLPAPER=$(ls $WALLPAPER_DIR | while read A ; do echo -en "$A\x00icon\x1f$WALLPAPER_DIR/$A\n"; done | rofi -dmenu -p "$(basename "$(readlink -f $WALLPAPER_DIR/default)")") || exit 1
+
WALLPAPER=$(ls $WALLPAPER_DIR | while read A ; do echo -en "$A\x00icon\x1f$WALLPAPER_DIR/$A\n"; done | rofi -dmenu -p "$(basename "$(readlink -f $HOME/.cache/wallpaper)")") || exit 1
# for wofi:
-
# WALLPAPER=$(ls $WALLPAPER_DIR | while read A ; do echo -en "img:$WALLPAPER_DIR/${A}:text:${A}\n"; done | wofi -d -I -p "$(basename "$(readlink -f $WALLPAPER_DIR/default)")") || exit 1I
+
# WALLPAPER=$(ls $WALLPAPER_DIR | while read A ; do echo -en "img:$WALLPAPER_DIR/${A}:text:${A}\n"; done | wofi -d -I -p "$(basename "$(readlink -f $HOME/.cache/wallpaper)")") || exit 1I
# but very slow...
# from https://dotfiles.cloudninja.pw/scripts/wofipaper
-
ln -sf "$WALLPAPER_DIR/$WALLPAPER" $WALLPAPER_DIR/default || exit 1
+
ln -sf "$WALLPAPER_DIR/$WALLPAPER" $HOME/.cache/wallpaper || exit 1
@set_wallpaper@
+1 -3
modules/personal/home/wm/scripts/set_wallpaper.sh
···
#!/usr/bin/env bash
-
WALLPAPER_DIR=~/pictures/wallpapers
-
WALLPAPER="$1"
echo $WALLPAPER
-
ln -sf "$WALLPAPER" $WALLPAPER_DIR/default || exit 1
+
ln -sf "$WALLPAPER" $HOME/.cache/wallpaper || exit 1
@set_wallpaper@