mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-21 22:03:19 +01:00
104 lines
3.6 KiB
Nix
104 lines
3.6 KiB
Nix
# Import nixpkgs with niv. https://dataswamp.org/~solene/2022-01-12-nix-niv-shell.html#_Create_a_shell.nix_file
|
|
let
|
|
sources = import ./nix/sources.nix;
|
|
in
|
|
{
|
|
# Colmena config: https://colmena.cli.rs/0.4/tutorial/index.html#basic-configuration
|
|
# Colmena local node: https://colmena.cli.rs/0.4/features/apply-local.html
|
|
|
|
meta = {
|
|
# Pin the Nixpkgs version with niv.
|
|
# Note: You can also override Nixpkgs by node.
|
|
nixpkgs = import sources.nixpkgs {};
|
|
};
|
|
|
|
defaults = { ... }: {
|
|
# This module will be imported by all hosts.
|
|
};
|
|
|
|
#
|
|
# LOCAL DEPLOYMENT
|
|
#
|
|
|
|
yodaTux = { name, nodes, ... }: {
|
|
# Import the per-host configuration file.
|
|
imports = [ ./hosts/${name}/configuration.nix ];
|
|
|
|
deployment.keys.smtpd = {
|
|
# When non-null, contents of the specified file will be deployed to the specified key on the target machine.
|
|
# https://github.com/NixOS/nixops/blob/fc9b55c55da62f949028143b974f67fdc7f40c8b/nix/keys.nix#L58
|
|
keyFile = ./secrets/smtpd;
|
|
|
|
destDir = "/secrets"; # Default: /run/keys
|
|
# smtpd user. https://github.com/NixOS/nixpkgs/blob/360a7d31c30abefdc490d203f80e3221b7a24af2/nixos/modules/services/mail/opensmtpd.nix#L93C7-L93C12
|
|
user = "smtpd"; # Default: root
|
|
#group = "smtpd"; # Default: root
|
|
permissions = "0400"; # Default: 0600
|
|
|
|
uploadAt = "pre-activation"; # Default: pre-activation, Alternative: post-activation
|
|
};
|
|
|
|
deployment = {
|
|
# Local deployment.
|
|
allowLocalDeployment = true;
|
|
targetHost = null;
|
|
};
|
|
};
|
|
|
|
yodaTab = { name, nodes, ... }: {
|
|
# Import the per-host configuration file.
|
|
imports = [ ./hosts/${name}/configuration.nix ];
|
|
|
|
deployment.keys.smtpd = {
|
|
# When non-null, contents of the specified file will be deployed to the specified key on the target machine.
|
|
# https://github.com/NixOS/nixops/blob/fc9b55c55da62f949028143b974f67fdc7f40c8b/nix/keys.nix#L58
|
|
keyFile = ./secrets/smtpd;
|
|
|
|
destDir = "/secrets"; # Default: /run/keys
|
|
# smtpd user. https://github.com/NixOS/nixpkgs/blob/360a7d31c30abefdc490d203f80e3221b7a24af2/nixos/modules/services/mail/opensmtpd.nix#L93C7-L93C12
|
|
user = "smtpd"; # Default: root
|
|
#group = "smtpd"; # Default: root
|
|
permissions = "0400"; # Default: 0600
|
|
|
|
uploadAt = "pre-activation"; # Default: pre-activation, Alternative: post-activation
|
|
};
|
|
|
|
deployment = {
|
|
# Local deployment.
|
|
allowLocalDeployment = true;
|
|
targetHost = null;
|
|
};
|
|
};
|
|
|
|
#
|
|
# SSH DEPLOYMENT
|
|
#
|
|
|
|
yodaYoga = { name, nodes, ... }: {
|
|
# Import the per-host configuration file.
|
|
imports = [ ./hosts/${name}/configuration.nix ];
|
|
|
|
deployment.keys.smtpd = {
|
|
# When non-null, contents of the specified file will be deployed to the specified key on the target machine.
|
|
# https://github.com/NixOS/nixops/blob/fc9b55c55da62f949028143b974f67fdc7f40c8b/nix/keys.nix#L58
|
|
keyFile = ./secrets/smtpd;
|
|
|
|
destDir = "/secrets"; # Default: /run/keys
|
|
# smtpd user. https://github.com/NixOS/nixpkgs/blob/360a7d31c30abefdc490d203f80e3221b7a24af2/nixos/modules/services/mail/opensmtpd.nix#L93C7-L93C12
|
|
user = "smtpd"; # Default: root
|
|
#group = "smtpd"; # Default: root
|
|
permissions = "0400"; # Default: 0600
|
|
|
|
uploadAt = "pre-activation"; # Default: pre-activation, Alternative: post-activation
|
|
};
|
|
|
|
deployment = {
|
|
# SSH deployment.
|
|
targetHost = "p1st.de";
|
|
targetPort = 2224;
|
|
|
|
# tags = [ "production" ];
|
|
};
|
|
};
|
|
}
|