install docker and compose
This commit is contained in:
parent
afaf3c4697
commit
53d2343f04
|
@ -1,26 +1,10 @@
|
||||||
{ pkgs, inputs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
|
|
||||||
imports = [ inputs.arion.nixosModules.arion ];
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.arion
|
|
||||||
];
|
|
||||||
|
|
||||||
# Arion works with Docker, but for NixOS-based containers, you need Podman
|
|
||||||
# since NixOS 21.05.
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
podman = {
|
|
||||||
enable = true;
|
|
||||||
defaultNetwork.settings.dns_enabled = true;
|
|
||||||
};
|
|
||||||
docker = {
|
docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
storageDriver = "btrfs";
|
|
||||||
rootless = {
|
|
||||||
enable = true;
|
|
||||||
setSocketVariable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
environment.systemPackages = with pkgs; [
|
||||||
|
docker-compose
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
{ pkgs, lib, inputs, config, ... }:
|
{
|
||||||
let
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
admin_dbPasswordFile = lib.optionalString (lib.hasAttr "sops-nix" inputs) config.sops.secrets."software/postgres/admin_db/password".path;
|
admin_dbPasswordFile = lib.optionalString (lib.hasAttr "sops-nix" inputs) config.sops.secrets."software/postgres/admin_db/password".path;
|
||||||
initScript = pkgs.writeText "init.sh" ''
|
initScript = pkgs.writeText "init.sh" ''
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
@ -67,8 +72,7 @@ let
|
||||||
timezone = 'Etc/UTC'
|
timezone = 'Etc/UTC'
|
||||||
default_text_search_config = 'pg_catalog.english'
|
default_text_search_config = 'pg_catalog.english'
|
||||||
'';
|
'';
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
"software/postgres/admin_db/password" = {};
|
"software/postgres/admin_db/password" = {};
|
||||||
};
|
};
|
||||||
|
@ -121,7 +125,6 @@ in
|
||||||
};
|
};
|
||||||
ports = ["5432:5432"];
|
ports = ["5432:5432"];
|
||||||
volumes = [
|
volumes = [
|
||||||
|
|
||||||
# Mount pgdata to external zfs volume
|
# Mount pgdata to external zfs volume
|
||||||
"/mnt/postgres:/var/lib/postgresql/data"
|
"/mnt/postgres:/var/lib/postgresql/data"
|
||||||
|
|
||||||
|
@ -140,4 +143,3 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ in {
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"scanner"
|
"scanner"
|
||||||
"lp"
|
"lp"
|
||||||
|
"docker"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ in {
|
||||||
../common/optional/nfs-mounts/media.nix
|
../common/optional/nfs-mounts/media.nix
|
||||||
../common/optional/nfs-mounts/homeshare.nix
|
../common/optional/nfs-mounts/homeshare.nix
|
||||||
../common/optional/printing.nix
|
../common/optional/printing.nix
|
||||||
|
../common/optional/docker
|
||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
|
Loading…
Reference in New Issue