move some nixos configuration to ./nixos/modules and ./nixos/configurations. try to find a good arch to conbine home-manager and nixos modules.

This commit is contained in:
Ulic-youthlic 2025-01-07 22:41:55 +08:00
parent 6be554822c
commit 64db779064
32 changed files with 534 additions and 635 deletions

View file

@ -73,42 +73,38 @@
wantedBy = [ "multi-user.target" ];
};
"update-dae-subscription-weekly" = {
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
ExecStartPre = [ "${config.systemd.package}/bin/systemctl stop dae.service" ];
ExecStartPost = [
"${config.systemd.package}/bin/systemctl start dae.service"
];
ExecStart =
let
script = pkgs.writeTextFile {
name = "update-dae-subscription-weekly";
executable = true;
destination = "/bin/script";
text = ''
${pkgs.coreutils}/bin/echo "Force subscription update..."
${pkgs.coreutils}/bin/mkdir -p /etc/proxy.d
${update}
'';
};
in
[
"${pkgs.bash}/bin/bash ${script}/bin/script"
];
};
};
# "update-dae-subscription-weekly" = {
# after = [ "network-online.target" ];
# wants = [ "network-online.target" ];
# wantedBy = [ "multi-user.target" ];
# serviceConfig = {
# Type = "oneshot";
# ExecStart =
# let
# script = pkgs.writeTextFile {
# name = "update-dae-subscription-weekly";
# executable = true;
# destination = "/bin/script";
# text = ''
# ${pkgs.coreutils}/bin/echo "Force subscription update..."
# ${pkgs.coreutils}/bin/mkdir -p /etc/proxy.d
# ${update}
# '';
# };
# in
# [
# "${pkgs.bash}/bin/bash ${script}/bin/script"
# ];
# };
# };
};
systemd.timers."dae-update" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "weekly";
Unit = "dae-update.service";
Persistent = true;
};
};
# systemd.timers."dae-update" = {
# wantedBy = [ "timers.target" ];
# timerConfig = {
# OnCalendar = "weekly";
# Unit = "dae-update.service";
# Persistent = true;
# };
# };
}