massicot: bump version
This commit is contained in:
commit
a056bf6539
7 changed files with 40 additions and 72 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";
|
||||
};
|
||||
|
||||
}
|
|
@ -46,5 +46,11 @@
|
|||
];
|
||||
hashedPassword = "$y$j9T$JOJn97hZndiDamUmmT.iq.$ue7gNZz/b14ur8GhyutOCvFjsv.3rcsHmk7m.WRk6u7";
|
||||
};
|
||||
|
||||
security.sudo.extraRules = [
|
||||
{ users = [ "xin" ];
|
||||
commands = [ { command = "ALL"; options = [ "NOPASSWD" ]; } ];
|
||||
}
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -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