From ae002a43700a74db64cae9e8e8e9d79fd215f4df Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Sun, 29 Dec 2024 16:57:36 -0600 Subject: [PATCH] added crontab for auto updating --- .gitignore | 2 ++ README.md | 2 +- configuration.nix | 7 +++++++ flake.nix | 6 ++---- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 44660b3..59d1c24 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ # git.nix *.env .devenv + +*.log \ No newline at end of file diff --git a/README.md b/README.md index c873192..311cdc7 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ nix-channel --update && nix-shell -p git Then build the system from the flake ```shell -nixos-rebuild switch --flake git+https://gitea.john-stream.com/john/ad-nix#ad-nix +nixos-rebuild switch --flake git+https://gitea.john-stream.com/john/ad-nix#ad-nix --impure ``` ### Secrets diff --git a/configuration.nix b/configuration.nix index 41f81b7..54fee11 100644 --- a/configuration.nix +++ b/configuration.nix @@ -35,4 +35,11 @@ services.vscode-server.enable = true; services.openssh.enable = true; services.tailscale.enable = true; + + services.cron = { + enable = true; + systemCronJobs = [ + "30 2 * * * /run/current-system/sw/bin/nfs > /etc/nixos/auto_update.log 2>&1" + ]; + }; } diff --git a/flake.nix b/flake.nix index 24fde4c..4c1f244 100644 --- a/flake.nix +++ b/flake.nix @@ -33,8 +33,6 @@ userSettings = { gitUserName = "John Lancaster"; gitUserEmail = "32917998+jsl12@users.noreply.github.com"; - adRepo = "https://github.com/jsl12/appdaemon"; - adBranch = "hass"; userName = "appdaemon"; adHome = "/home/appdaemon"; }; @@ -45,7 +43,7 @@ system = "x86_64-linux"; timeZone = "America/Chicago"; locale = "en_US.UTF-8"; - pythonVersion = "3.11.10"; # This is largely irrelevant because uv will handle it + # pythonVersion = "3.11.10"; # This is largely irrelevant because uv will handle it }; pkgs = args.nixpkgs.legacyPackages.${systemSettings.system}; @@ -97,7 +95,7 @@ # https://devenv.sh/supported-languages/python/ languages.python = { enable = true; - version = systemSettings.pythonVersion; + # version = systemSettings.pythonVersion; uv = { enable = true; package = pkgs.uv;