home/fb4: Modularize
This commit is contained in:
parent
10e737c423
commit
e754de6051
|
@ -1,11 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../snippets/everywhere.nix
|
||||
../snippets/graphical.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
xautolock
|
||||
syncthing
|
||||
];
|
||||
}
|
17
home/hosts/fb4/home.nix
Normal file
17
home/hosts/fb4/home.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../snippets/everywhere.nix
|
||||
../../snippets/graphical.nix
|
||||
# ./syncthing.nix
|
||||
# ./nix-gc.nix
|
||||
# ./nix-update-channel.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
xautolock
|
||||
syncthing
|
||||
];
|
||||
|
||||
systemd.user.systemctlPath = "/usr/bin/systemctl";
|
||||
}
|
21
home/hosts/fb4/nix-gc.nix
Normal file
21
home/hosts/fb4/nix-gc.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
systemd.user = {
|
||||
services.nix-gc = {
|
||||
Unit = {
|
||||
Description = "Collect garbage";
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart="${pkgs.nix}/bin/nix-collect-garbage --delete-older-than 5d";
|
||||
};
|
||||
};
|
||||
timers.nix-gc = {
|
||||
Timer = {
|
||||
OnCalendar = "22:00";
|
||||
Persistent = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
21
home/hosts/fb4/nix-update-channel.nix
Normal file
21
home/hosts/fb4/nix-update-channel.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
systemd.user = {
|
||||
services.nix-update = {
|
||||
Unit = {
|
||||
Description = "Update nix-channel";
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart="${pkgs.nix}/bin/nix-channel --update";
|
||||
};
|
||||
};
|
||||
timers.nix-update = {
|
||||
Timer = {
|
||||
OnCalendar = "22:00";
|
||||
Persistent = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
19
home/hosts/fb4/syncthing.nix
Normal file
19
home/hosts/fb4/syncthing.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
systemd.user = {
|
||||
services.syncthing = {
|
||||
Unit = {
|
||||
Description = "Syncthing";
|
||||
ConditionHost = "fb04217";
|
||||
Wants= "syncthing-inotify.service";
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart="${pkgs.syncthing}/bin/syncthing -no-browser -no-restart -logflags=0";
|
||||
Restart="on-failure";
|
||||
SuccessExitStatus="3 4";
|
||||
RestartForceExitStatus="3 4";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue