bump version
This commit is contained in:
parent
b3744b41ce
commit
add25d866d
6 changed files with 33 additions and 70 deletions
|
@ -7,7 +7,6 @@
|
|||
./hardware-configuration.nix
|
||||
./network.nix
|
||||
../sops.nix
|
||||
../clash.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
sops = {
|
||||
secrets.clash_subscription_link = {
|
||||
owner = "xin";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.timers."clash-config-update" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnUnitActiveSec = "1d";
|
||||
Unit = "clash-config-update.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."clash-config-update" = {
|
||||
script = ''
|
||||
${pkgs.curl}/bin/curl $(${pkgs.coreutils}/bin/cat ${config.sops.secrets.clash_subscription_link.path}) > /tmp/config.yaml && mv /tmp/config.yaml /home/xin/.config/clash/
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User= "xin";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.clash = {
|
||||
enable = true;
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.ExecStart = "${pkgs.clash}/bin/clash -d /home/xin/.config/clash";
|
||||
};
|
||||
|
||||
}
|
|
@ -10,13 +10,11 @@
|
|||
];
|
||||
|
||||
imports = [
|
||||
../clash.nix
|
||||
../sops.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
clash
|
||||
];
|
||||
|
||||
# Use mirror for binary cache
|
||||
|
@ -59,4 +57,4 @@
|
|||
hashedPassword = "$y$j9T$KEOMZBlXtudOYWq/elAdI.$Vd3X8rjEplbuRBeZPp.8/gpL3zthpBNjhBR47wFc8D4";
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue