mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-01-10 06:28:12 +01:00
15 lines
372 B
Nix
15 lines
372 B
Nix
{ pkgs, ... }:
|
|
|
|
let
|
|
inherit (import ../../options.nix) flakeDir hostname;
|
|
in
|
|
pkgs.writeShellScriptBin "themechange" ''
|
|
if [[ ! $@ ]];then
|
|
echo "No Theme Given"
|
|
else
|
|
replacement="$1"
|
|
sed -i "/^\s*theme[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$replacement\"/" ${flakeDir}/options.nix
|
|
kitty -e pkexec nixos-rebuild switch --flake ${flakeDir}
|
|
fi
|
|
''
|