bump version

This commit is contained in:
xinyangli 2023-11-15 07:50:26 +00:00
parent b3744b41ce
commit add25d866d
6 changed files with 33 additions and 70 deletions

View file

@ -7,7 +7,6 @@
./hardware-configuration.nix
./network.nix
../sops.nix
../clash.nix
];
# Bootloader.

View file

@ -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";
};
}

View file

@ -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";
};
}
}