mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2024-11-27 00:53:09 +01:00
17 lines
376 B
Nix
17 lines
376 B
Nix
{
|
|
pkgs,
|
|
host,
|
|
username,
|
|
...
|
|
}:
|
|
|
|
pkgs.writeShellScriptBin "themechange" ''
|
|
if [[ ! $@ ]];then
|
|
echo "No Theme Given"
|
|
else
|
|
replacement="$1"
|
|
sed -i "/^\s*theme[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$replacement\"/" /home/${username}/zaneyos/hosts/${host}/variables.nix
|
|
kitty -e pkexec nixos-rebuild switch --flake /home/${username}/zaneyos
|
|
fi
|
|
''
|