auto upgrade
This commit is contained in:
parent
3ebaf47f26
commit
3e5352ac53
2 changed files with 35 additions and 1 deletions
|
@ -32,7 +32,14 @@
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
smolboi = nixpkgs.lib.nixosSystem {
|
smolboi = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [ ./systems/smolboi/configuration.nix ];
|
modules = [
|
||||||
|
./systems/smolboi/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.users.cdombroski = import ./systems/smolboi/home.nix;
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
orangepihole = nixpkgs.lib.nixosSystem {
|
orangepihole = nixpkgs.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
# # Adds the 'hello' command to your environment. It prints a friendly
|
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||||
# # "Hello, world!" when run.
|
# # "Hello, world!" when run.
|
||||||
# pkgs.hello
|
# pkgs.hello
|
||||||
|
@ -74,6 +75,32 @@
|
||||||
# '')
|
# '')
|
||||||
];
|
];
|
||||||
|
|
||||||
|
systemd.user = {
|
||||||
|
services = {
|
||||||
|
autoupgrade = {
|
||||||
|
Service = {
|
||||||
|
WorkingDirectory = "/home/cdombroski/work/nix-configs";
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.writeShellScript "upgrade-system" ''
|
||||||
|
${pkgs.nix}/bin/nix flake update
|
||||||
|
${pkgs.git}/bin/git add .
|
||||||
|
${pkgs.git}/bin/git commit -m "update flake"
|
||||||
|
${pkgs.git}/bin/git push
|
||||||
|
${pkgs.deploy-rs}/bin/deploy
|
||||||
|
''}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
timers = {
|
||||||
|
autoupgrade = {
|
||||||
|
Timer = {
|
||||||
|
OnCalendar = "daily";
|
||||||
|
};
|
||||||
|
Install.WantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||||
"discord"
|
"discord"
|
||||||
|
|
Loading…
Reference in a new issue