Auto update the flake input every day (#13)
This commit is contained in:
commit
dd94741063
|
@ -16,9 +16,22 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment = {
|
||||||
less
|
systemPackages = with pkgs; [
|
||||||
wyrdgard.neovim
|
less
|
||||||
];
|
wyrdgard.neovim
|
||||||
|
];
|
||||||
|
variables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
SUDOEDITOR = "nvim";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
wyrdgard.home = {
|
||||||
|
extraOptions = {
|
||||||
|
# Use Neovim for Git diffs.
|
||||||
|
programs.fish.shellAliases.vimdiff = "nvim -d";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
33
modules/nixos/system/autoUpgrade/default.nix
Normal file
33
modules/nixos/system/autoUpgrade/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.wyrdgard;
|
||||||
|
let
|
||||||
|
cfg = config.wyrdgard.system.autoUpgrade;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.wyrdgard.system.autoUpgrade = with types; {
|
||||||
|
enable = mkEnableOption "Enable auto-upgrade";
|
||||||
|
time = mkOpt str "02:00" "Time to run auto-upgrade";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
system.autoUpgrade = {
|
||||||
|
enable = true;
|
||||||
|
flake = inputs.self.outPath;
|
||||||
|
flags = [
|
||||||
|
"--update-input"
|
||||||
|
"nixpkgs"
|
||||||
|
"--print-build-logs"
|
||||||
|
];
|
||||||
|
dates = cfg.time;
|
||||||
|
randomizedDelaySec = "45min";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -28,7 +28,7 @@ let
|
||||||
pkgs.runCommandNoCC "propagated-icon"
|
pkgs.runCommandNoCC "propagated-icon"
|
||||||
{
|
{
|
||||||
passthru = {
|
passthru = {
|
||||||
fileName = cfg.icon.fileName;
|
inherit (fileName);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
|
|
|
@ -24,9 +24,15 @@ with lib.wyrdgard;
|
||||||
_1password = enabled;
|
_1password = enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.hardware = {
|
system = {
|
||||||
bluetooth = enabled;
|
autoUpgrade = {
|
||||||
gpu.nvidia = enabled;
|
enable = true;
|
||||||
|
time = "10:00";
|
||||||
|
};
|
||||||
|
hardware = {
|
||||||
|
bluetooth = enabled;
|
||||||
|
gpu.nvidia = enabled;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue