From 01fa00f5e73531bddf4dae2814b52b9f16c12157 Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Fri, 1 Dec 2023 21:06:32 -0800 Subject: [PATCH] Added a systemd unit to update the Sovran Book Pro --- .../Sovran_SystemsOS_Light_Updater_Script.nix | 26 +++++++++++++++++++ modules/modules.nix | 1 + 2 files changed, 27 insertions(+) create mode 100644 modules/Sovran_SystemsOS_Light_Updater_Script.nix diff --git a/modules/Sovran_SystemsOS_Light_Updater_Script.nix b/modules/Sovran_SystemsOS_Light_Updater_Script.nix new file mode 100644 index 0000000..853240f --- /dev/null +++ b/modules/Sovran_SystemsOS_Light_Updater_Script.nix @@ -0,0 +1,26 @@ +{ config, pkgs, lib, ... }: + +{ + +systemd.services.Sovran_SystemsOS_Light_Updater = { + + script = '' + + cd /etc/nixos && flatpak update && nix flake update && nixos-rebuild switch + + ''; + + unitConfig = { + Type = "simple"; + }; + + serviceConfig = { + RemainAfterExit = "no"; + Type = "oneshot"; + }; + + wantedBy = [ "multi-user.target" ]; + + }; + +} \ No newline at end of file diff --git a/modules/modules.nix b/modules/modules.nix index 83c5230..22502bc 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -5,6 +5,7 @@ imports = [ ./Sovran_SystemsOS_Light_File_Fixes_And_New_Services.nix + ./Sovran_SystemsOS_Light_Updater_Script.nix ]; } \ No newline at end of file