mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
nix: add vps setup
This commit is contained in:
parent
028a52d9ff
commit
50015669e1
10 changed files with 433 additions and 0 deletions
69
nix/hosts/thought/configuration.nix
Normal file
69
nix/hosts/thought/configuration.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./disko-config.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 2048; # MB
|
||||
}
|
||||
];
|
||||
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Kyiv";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
networking = {
|
||||
hostName = "vps";
|
||||
useDHCP = true;
|
||||
# Interface names will be auto-detected in hardware-configuration.nix
|
||||
# Using generic DHCP setting
|
||||
interfaces = {};
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [80 443];
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
htop
|
||||
tmux
|
||||
];
|
||||
|
||||
services = {
|
||||
caddy.enable = true;
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue