Archive Legacy Setup And Add Ansible Control Plane
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
};
|
||||
|
||||
boot = {
|
||||
tmp.cleanOnBoot = true;
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
systemd.network.wait-online.anyInterface = true;
|
||||
|
||||
systemd.services.nix-daemon.environment = {
|
||||
HTTPS_PROXY = "http://192.168.1.10:10172";
|
||||
HTTP_PROXY = "http://192.168.1.10:10172";
|
||||
NO_PROXY = "localhost,127.0.0.0/8,::1,192.168.1.0/24";
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Moscow";
|
||||
|
||||
i18n.defaultLocale = "ru_RU.UTF-8";
|
||||
i18n.supportedLocales = [
|
||||
"ru_RU.UTF-8/UTF-8"
|
||||
"en_US.UTF-8/UTF-8"
|
||||
];
|
||||
|
||||
users.users.ada = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.bashInteractive;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"docker"
|
||||
];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIWNsUQmppB6cQccXX1ZaBbFIcmM6RmghsTVbG9TgoZB ada@ada-x1"
|
||||
];
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
PubkeyAuthentication = true;
|
||||
};
|
||||
};
|
||||
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [ "ada" ];
|
||||
commands = [
|
||||
{
|
||||
command = "/run/current-system/sw/bin/nixos-rebuild";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
restic
|
||||
resticprofile
|
||||
htop
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /opt/services 0755 ada users - -"
|
||||
"Z /opt/services - ada users - -"
|
||||
"d /opt/data 0755 ada users - -"
|
||||
"d /opt/configs 0755 ada users - -"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
daemon.settings = {
|
||||
registry-mirrors = [
|
||||
"https://mirror.gcr.io"
|
||||
"https://dockerhub.timeweb.cloud"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker-compose
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
qemu.package = pkgs.qemu_kvm;
|
||||
};
|
||||
|
||||
users.users.ada.extraGroups = [ "libvirtd" ];
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
services.zerotierone = {
|
||||
enable = true;
|
||||
joinNetworks = [ "743993800fa5a34c" ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user