!
This commit is contained in:
parent
8063dde861
commit
a2b552cc08
2 changed files with 17 additions and 7 deletions
|
|
@ -31,7 +31,7 @@
|
||||||
] ++ lib.optional (hwconfig.useImpermanence) ./modules/impermanence;
|
] ++ lib.optional (hwconfig.useImpermanence) ./modules/impermanence;
|
||||||
facter.reportPath = ./facter.json;
|
facter.reportPath = ./facter.json;
|
||||||
kylekrein.services.autoUpgrade = {
|
kylekrein.services.autoUpgrade = {
|
||||||
enable = false;
|
enable = true;
|
||||||
pushUpdates = false;
|
pushUpdates = false;
|
||||||
configDir = "/etc/nixos-config";
|
configDir = "/etc/nixos-config";
|
||||||
user = "root";
|
user = "root";
|
||||||
|
|
@ -163,8 +163,17 @@
|
||||||
graphics = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
Experimental = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.blueman.enable = true;
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,8 @@ done
|
||||||
remainingArgs=${POSITIONAL_ARGS[@]}
|
remainingArgs=${POSITIONAL_ARGS[@]}
|
||||||
set -- "${POSITIONAL_ARGS[@]}" # restore positional parameters
|
set -- "${POSITIONAL_ARGS[@]}" # restore positional parameters
|
||||||
|
|
||||||
|
if [ $update = true ]; then
|
||||||
|
|
||||||
if [ -z "${flakeDir}" ]; then
|
if [ -z "${flakeDir}" ]; then
|
||||||
echo "Flake directory not specified. Use '--flake <path>' or set \$FLAKE_DIR."
|
echo "Flake directory not specified. Use '--flake <path>' or set \$FLAKE_DIR."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -75,16 +77,15 @@ cd $flakeDir
|
||||||
echo "Pulling the latest version of the repository..."
|
echo "Pulling the latest version of the repository..."
|
||||||
/run/wrappers/bin/sudo -u $user /run/current-system/sw/bin/git pull
|
/run/wrappers/bin/sudo -u $user /run/current-system/sw/bin/git pull
|
||||||
|
|
||||||
if [ $update = true ]; then
|
|
||||||
echo "Updating flake.lock..."
|
echo "Updating flake.lock..."
|
||||||
/run/wrappers/bin/sudo -u $user /run/current-system/sw/bin/nix flake update --commit-lock-file && /run/wrappers/bin/sudo -u $user /run/current-system/sw/bin/git push
|
/run/wrappers/bin/sudo -u $user /run/current-system/sw/bin/nix flake update --commit-lock-file && /run/wrappers/bin/sudo -u $user /run/current-system/sw/bin/git push
|
||||||
else
|
|
||||||
echo "Skipping 'nix flake update'..."
|
|
||||||
fi
|
|
||||||
|
|
||||||
options="--flake $flakeDir $remainingArgs --use-remote-sudo --log-format multiline-with-logs"
|
options="--flake $flakeDir $remainingArgs --use-remote-sudo --log-format multiline-with-logs"
|
||||||
|
|
||||||
echo "Running this operation: nixos-rebuild $operation $options"
|
echo "Running this operation: nixos-rebuild $operation $options"
|
||||||
/run/wrappers/bin/sudo -u root /run/current-system/sw/bin/nixos-rebuild $operation $options
|
/run/wrappers/bin/sudo -u root /run/current-system/sw/bin/nixos-rebuild $operation $options
|
||||||
|
else
|
||||||
|
echo "Skipping 'nix flake update'..."
|
||||||
|
/run/wrappers/bin/sudo -u root /run/current-system/sw/bin/nixos-rebuild $operation --flake github:kylekrein/nixos-config
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue