add a script to update my hosts
This commit is contained in:
parent
d90f3b548c
commit
9ed81a8e4b
|
@ -88,6 +88,21 @@ in
|
|||
HIGHLIGHT_STYLE = "solarized-light";
|
||||
};
|
||||
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
extraRules = [
|
||||
{
|
||||
users = [ "andreas" ];
|
||||
commands = [
|
||||
{
|
||||
command = "${pkgs.nixos-rebuild} -j auto switch";
|
||||
options = [ "SETENV" "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env xonsh
|
||||
|
||||
hosts = [
|
||||
"grav",
|
||||
"heimdall",
|
||||
"nixos-test-vm",
|
||||
]
|
||||
|
||||
for host in hosts:
|
||||
fqdn = "{}.2li.local".format(host)
|
||||
print(fqdn)
|
||||
print("-" * len(fqdn))
|
||||
ssh @(fqdn) 'cd .nixos && git pull && sudo rebuild'
|
||||
print("")
|
||||
print("")
|
Loading…
Reference in New Issue