adds docker to dnsc-vps-sm

This commit is contained in:
Dennis 2025-07-07 09:09:28 +02:00
parent 1736bb1e6d
commit c93db5a8f0
3 changed files with 34 additions and 11 deletions

View file

@ -5,7 +5,8 @@
config,
pkgs,
...
}: {
}:
{
imports = [
./hardware-configuration.nix
./networking.nix
@ -14,6 +15,7 @@
../../modules/vaultwarden
../../modules/uptime-kuma
../../modules/homepage
../../modules/docker
];
# Secrets
@ -42,11 +44,11 @@
# Launch fish shell
programs.bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
@ -64,7 +66,7 @@
networking.firewall = {
enable = true;
allowedTCPPorts = [
80
80
443
];
ipBasedAllowedTCPPorts = [
@ -78,13 +80,16 @@
}
];
};
# My user account
users.users.dennis = {
description = "dennis";
initialPassword = "admin";
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
extraGroups = [
"wheel"
"networkmanager"
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILvXWZOPOJJDAoF+Sx/ZLoAVu6G/7/MAWoknBgMAzjul dennis@dnsc-mac"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKnmuxDkpDIku5t1Tykz21u78xoQ7LJR8JEcfth32LGu dennis@dnsc-work"
@ -101,7 +106,10 @@
};
# Enable new Nix CLI and flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Install system wide packages
environment.systemPackages = with pkgs; [
@ -109,6 +117,7 @@
btop
neovim
wget
docker-compose
];
# Programs
@ -160,6 +169,9 @@
virtualHosts."home.dnsc.io".extraConfig = ''
reverse_proxy localhost:9001
'';
virtualHosts."split.dnsc.io".extraConfig = ''
reverse_proxy localhost:9002
'';
};
# Environment variables
@ -175,4 +187,3 @@
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11";
}