Modify topgrade to work on nixos with flakes
This commit is contained in:
parent
a314cd3734
commit
d3d1dd5cce
@ -11,18 +11,23 @@ inputs,
|
|||||||
system, # The system architecture for this host (eg. `x86_64-linux`).
|
system, # The system architecture for this host (eg. `x86_64-linux`).
|
||||||
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
||||||
format, # A normalized name for the system target (eg. `iso`).
|
format, # A normalized name for the system target (eg. `iso`).
|
||||||
virtual
|
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
||||||
, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
|
||||||
systems, # An attribute map of your defined hosts.
|
systems, # An attribute map of your defined hosts.
|
||||||
|
|
||||||
# All other arguments come from the module system.
|
# All other arguments come from the module system.
|
||||||
config, ... }:
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.modules.topgrade;
|
let
|
||||||
in {
|
cfg = config.modules.topgrade;
|
||||||
options.modules.topgrade = { enable = mkOption { default = false; }; };
|
in
|
||||||
|
{
|
||||||
|
options.modules.topgrade = {
|
||||||
|
enable = mkOption { default = false; };
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.topgrade = {
|
programs.topgrade = {
|
||||||
@ -33,11 +38,14 @@ in {
|
|||||||
misc.assume_yes = true;
|
misc.assume_yes = true;
|
||||||
misc.no_retry = true;
|
misc.no_retry = true;
|
||||||
|
|
||||||
# pre_commands."Update dotfiles flake" = "home-update-flake";
|
linux.nix_arguments = "--flake /home/julian/.dotfiles";
|
||||||
|
|
||||||
git = {
|
git = {
|
||||||
# Additional git repositories to pull
|
# Additional git repositories to pull
|
||||||
repos = [ "~/.dotfiles" "~/dev/*" ];
|
repos = [
|
||||||
|
"~/.dotfiles"
|
||||||
|
"~/dev/*"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user