PatOS is born!
This commit is contained in:
parent
0f3b2072f4
commit
44d8f9c90d
12 changed files with 383 additions and 0 deletions
modules
63
modules/sysupdate.nix
Normal file
63
modules/sysupdate.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ config, ... }: {
|
||||
systemd.sysupdate = {
|
||||
enable = true;
|
||||
|
||||
transfers = {
|
||||
"10-uki" = {
|
||||
Source = {
|
||||
MatchPattern = [
|
||||
"${config.boot.uki.name}_@v.efi.xz"
|
||||
];
|
||||
|
||||
# We could fetch updates from the network as well:
|
||||
#
|
||||
# Path = "https://download.example.com/";
|
||||
# Type = "url-file";
|
||||
Path = "/var/updates/";
|
||||
Type = "regular-file";
|
||||
};
|
||||
Target = {
|
||||
InstancesMax = 2;
|
||||
MatchPattern = [
|
||||
"${config.boot.uki.name}_@v.efi"
|
||||
];
|
||||
|
||||
Mode = "0444";
|
||||
Path = "/EFI/Linux";
|
||||
PathRelativeTo = "boot";
|
||||
|
||||
Type = "regular-file";
|
||||
};
|
||||
Transfer = {
|
||||
ProtectVersion = "%A";
|
||||
};
|
||||
};
|
||||
|
||||
"20-store" = {
|
||||
Source = {
|
||||
MatchPattern = [
|
||||
"store_@v.img.xz"
|
||||
];
|
||||
# Path = "https://download.example.com/";
|
||||
# Type = "url-file";
|
||||
Path = "/var/updates/";
|
||||
Type = "regular-file";
|
||||
};
|
||||
|
||||
Target = {
|
||||
InstancesMax = 2;
|
||||
|
||||
# This doesn't work, because / is a tmpfs and the heuristic is not that smart.
|
||||
#
|
||||
# Path = "auto";
|
||||
Path = "/dev/sda";
|
||||
|
||||
MatchPattern = "store_@v";
|
||||
|
||||
Type = "partition";
|
||||
ReadOnly = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue