Compare commits
3 Commits
3900d617fa
...
83481b5291
| Author | SHA1 | Date | |
|---|---|---|---|
| 83481b5291 | |||
| a553958bb9 | |||
| d16b22d2b5 |
@@ -17,8 +17,6 @@ in
|
|||||||
../../common/configuration.nix
|
../../common/configuration.nix
|
||||||
../../modules/nix/cache-client.nix
|
../../modules/nix/cache-client.nix
|
||||||
../../modules/nix/remote-builder-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
|
../../modules/nix/docker-data.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -120,23 +118,23 @@ systemd.timers.nextcloud = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Create nextcloud cron scheduled task
|
# Create nextcloud cron scheduled task
|
||||||
systemd.services.docker-prune = {
|
# systemd.services.docker-prune = {
|
||||||
description = "Prune docker data";
|
# description = "Prune docker data";
|
||||||
script = ''${pkgs.docker} system prune --volumes --all --force'';
|
# script = ''${pkgs.docker} system prune --volumes --all'';
|
||||||
serviceConfig = {
|
# serviceConfig = {
|
||||||
Type = "oneshot";
|
# Type = "oneshot";
|
||||||
User = "nixos";
|
# User = "nixos";
|
||||||
};
|
# };
|
||||||
path = with pkgs; [ docker docker-compose ];
|
# path = with pkgs; [ docker docker-compose ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
systemd.timers.docker-prune = {
|
# systemd.timers.docker-prune = {
|
||||||
wantedBy = [ "timers.target" ];
|
# wantedBy = [ "timers.target" ];
|
||||||
timerConfig = {
|
# timerConfig = {
|
||||||
OnCalendar = "monthly";
|
# OnCalendar = "monthly";
|
||||||
Persistent = true;
|
# Persistent = true;
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
|
|
||||||
# create update task
|
# 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
|
#Add sym links to data on users home folder
|
||||||
system.userActivationScripts.createDockerSymlink.text = ''
|
#system.userActivationScripts.createDockerSymlink.text = ''
|
||||||
ln -sf /mnt/docker-config /home/nixos/docker
|
# ln -sf /mnt/docker/config /home/nixos/docker
|
||||||
'';
|
#'';
|
||||||
#system.userActivationScripts.createSetupSymlink.text = ''
|
#system.userActivationScripts.createSetupSymlink.text = ''
|
||||||
# ln -sf /mnt/docker-persistent-data/setup /home/nixos/setup
|
# ln -sf /mnt/docker-persistent-data/setup /home/nixos/setup
|
||||||
#'';
|
#'';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
fileSystems."/mnt/docker-config" = {
|
fileSystems."/mnt/docker/config" = {
|
||||||
device = "server:/tank/docker/config";
|
device = "server:/tank/docker/config";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/docker-databases" = {
|
fileSystems."/mnt/docker/databases" = {
|
||||||
device = "server:/tank/docker/databases";
|
device = "server:/tank/docker/databases";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/docker-volumes" = {
|
fileSystems."/mnt/docker/volumes" = {
|
||||||
device = "server:/tank/docker/volumes";
|
device = "server:/tank/docker/volumes";
|
||||||
fsType = "nfs";
|
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