Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 83481b5291 | |||
| a553958bb9 | |||
| d16b22d2b5 |
@@ -17,8 +17,6 @@ in
|
||||
../../common/configuration.nix
|
||||
../../modules/nix/cache-client.nix
|
||||
../../modules/nix/remote-builder-client.nix
|
||||
# ../../modules/nix/mount-docker-config.nix
|
||||
# ../../modules/nix/mount-docker-volumes.nix
|
||||
../../modules/nix/docker-data.nix
|
||||
];
|
||||
|
||||
@@ -120,23 +118,23 @@ systemd.timers.nextcloud = {
|
||||
};
|
||||
|
||||
# Create nextcloud cron scheduled task
|
||||
systemd.services.docker-prune = {
|
||||
description = "Prune docker data";
|
||||
script = ''${pkgs.docker} system prune --volumes --all --force'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "nixos";
|
||||
};
|
||||
path = with pkgs; [ docker docker-compose ];
|
||||
};
|
||||
# systemd.services.docker-prune = {
|
||||
# description = "Prune docker data";
|
||||
# script = ''${pkgs.docker} system prune --volumes --all'';
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# User = "nixos";
|
||||
# };
|
||||
# path = with pkgs; [ docker docker-compose ];
|
||||
# };
|
||||
|
||||
systemd.timers.docker-prune = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "monthly";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
# systemd.timers.docker-prune = {
|
||||
# wantedBy = [ "timers.target" ];
|
||||
# timerConfig = {
|
||||
# OnCalendar = "monthly";
|
||||
# Persistent = true;
|
||||
# };
|
||||
# };
|
||||
|
||||
# create update task
|
||||
|
||||
@@ -195,12 +193,19 @@ systemd.timers.docker-prune = {
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
# Create /mnt/docker
|
||||
#"d /mnt/docker 0755 root root -"
|
||||
|
||||
# Create /home/nixos/docker -> /mnt/docker-config
|
||||
"L+ /home/nixos/docker - - - - /mnt/docker/config"
|
||||
|
||||
];
|
||||
|
||||
#Add sym links to data on users home folder
|
||||
system.userActivationScripts.createDockerSymlink.text = ''
|
||||
ln -sf /mnt/docker-config /home/nixos/docker
|
||||
'';
|
||||
#system.userActivationScripts.createDockerSymlink.text = ''
|
||||
# ln -sf /mnt/docker/config /home/nixos/docker
|
||||
#'';
|
||||
#system.userActivationScripts.createSetupSymlink.text = ''
|
||||
# ln -sf /mnt/docker-persistent-data/setup /home/nixos/setup
|
||||
#'';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
fileSystems."/mnt/docker-config" = {
|
||||
fileSystems."/mnt/docker/config" = {
|
||||
device = "server:/tank/docker/config";
|
||||
fsType = "nfs";
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/docker-databases" = {
|
||||
fileSystems."/mnt/docker/databases" = {
|
||||
device = "server:/tank/docker/databases";
|
||||
fsType = "nfs";
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/docker-volumes" = {
|
||||
fileSystems."/mnt/docker/volumes" = {
|
||||
device = "server:/tank/docker/volumes";
|
||||
fsType = "nfs";
|
||||
|
||||
@@ -49,16 +49,4 @@
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/docker/test" = {
|
||||
device = "server:/tank/docker/nextcloud-data";
|
||||
fsType = "nfs";
|
||||
|
||||
options = [
|
||||
"nfsvers=4.2"
|
||||
"_netdev"
|
||||
"x-systemd.automount"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
fileSystems."/mnt/docker-config" = {
|
||||
device = "server:/tank/docker/config";
|
||||
fsType = "nfs";
|
||||
|
||||
options = [
|
||||
"nfsvers=4.2"
|
||||
"_netdev"
|
||||
"x-systemd.automount"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
fileSystems."/mnt/docker-databases" = {
|
||||
device = "server:/tank/docker/databases";
|
||||
fsType = "nfs";
|
||||
|
||||
options = [
|
||||
"nfsvers=4.2"
|
||||
"_netdev"
|
||||
"x-systemd.automount"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
fileSystems."/mnt/docker-volumes" = {
|
||||
device = "server:/tank/docker/volumes";
|
||||
fsType = "nfs";
|
||||
|
||||
options = [
|
||||
"nfsvers=4.2"
|
||||
"_netdev"
|
||||
"x-systemd.automount"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user