feat: Add anvil's config
This commit is contained in:
parent
b030b3a098
commit
964830082f
3 changed files with 80 additions and 62 deletions
19
anvil.nix
Normal file
19
anvil.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
networking.hostName = "anvil";
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
networking.firewall.allowedTCPPorts = [ 8384 ];
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."luks-1f261d60-dfb4-4f63-9c77-f331a007108b".device = "/dev/disk/by-uuid/1f261d60-dfb4-4f63-9c77-f331a007108b";
|
||||||
|
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
hostConfigs = {
|
hostConfigs = {
|
||||||
crossbox = [ ./sdr.nix ./syncthing.nix ./forgejo.nix ./radicale.nix ./ollama.nix ./docuseal.nix ./nginx.nix ];
|
crossbox = [ ./crossbox.nix ./sdr.nix ./syncthing.nix ./forgejo.nix ./radicale.nix ./ollama.nix ./docuseal.nix ./nginx.nix ];
|
||||||
anvil = [ ./sdr.nix ./syncthing.nix ];
|
anvil = [ ./anvil.nix ./sdr.nix ./vpn.nix ./syncthing.nix ./staging.nginx.nix ];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
] ++ hostConfigs.crossbox;
|
] ++ hostConfigs.anvil;
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
|
|
@ -19,16 +19,16 @@ in
|
||||||
options = "--delete-older-than 30d";
|
options = "--delete-older-than 30d";
|
||||||
};
|
};
|
||||||
|
|
||||||
# List packages installed in system profile.
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
cargo
|
cargo
|
||||||
|
chromium
|
||||||
curl
|
curl
|
||||||
docker-compose
|
docker-compose
|
||||||
gcc
|
gcc
|
||||||
git
|
git
|
||||||
gnupg
|
gnupg
|
||||||
imv
|
imv
|
||||||
lmstudio
|
mdbook
|
||||||
mpv
|
mpv
|
||||||
neovim
|
neovim
|
||||||
openssl
|
openssl
|
||||||
|
|
@ -37,6 +37,7 @@ in
|
||||||
exec ${pkgs.neovim}/bin/nvim "$@"
|
exec ${pkgs.neovim}/bin/nvim "$@"
|
||||||
'')
|
'')
|
||||||
pinentry-curses
|
pinentry-curses
|
||||||
|
python3
|
||||||
rsync
|
rsync
|
||||||
rustc
|
rustc
|
||||||
tldr
|
tldr
|
||||||
|
|
@ -53,17 +54,6 @@ in
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
rocmPackages.clr.icd # ROCm OpenCL runtime
|
|
||||||
rocmPackages.clr
|
|
||||||
rocmPackages.rocminfo
|
|
||||||
rocmPackages.rocm-runtime
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "crossbox";
|
|
||||||
# Enables wireless support via wpa_supplicant.
|
# Enables wireless support via wpa_supplicant.
|
||||||
# networking.wireless.enable = true;
|
# networking.wireless.enable = true;
|
||||||
|
|
||||||
|
|
@ -109,7 +99,7 @@ in
|
||||||
# XDG portal for screen sharing and other desktop features
|
# XDG portal for screen sharing and other desktop features
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
|
|
@ -123,8 +113,6 @@ in
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
|
||||||
services.pulseaudio.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -168,7 +156,6 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Install firefox system-wide as well
|
|
||||||
programs.firefox.enable = true;
|
programs.firefox.enable = true;
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
|
|
@ -190,12 +177,6 @@ in
|
||||||
# Polkit for privilege escalation
|
# Polkit for privilege escalation
|
||||||
#security.polkit.enable = true;
|
#security.polkit.enable = true;
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
|
||||||
|
|
||||||
system.stateVersion = "25.11";
|
|
||||||
|
|
||||||
# Crossbox Configuration
|
|
||||||
|
|
||||||
environment.shellAliases = {
|
environment.shellAliases = {
|
||||||
vi = "nvim";
|
vi = "nvim";
|
||||||
vim = "nvim";
|
vim = "nvim";
|
||||||
|
|
@ -222,44 +203,9 @@ in
|
||||||
dedicatedServer.openFirewall = true;
|
dedicatedServer.openFirewall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
PermitRootLogin = "no";
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
KbdInteractiveAuthentication = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Disable automatic suspend.
|
|
||||||
# Otherwise SSH tunnels and HDMI signals break.
|
|
||||||
services.logind = {
|
|
||||||
settings = {
|
|
||||||
Login = {
|
|
||||||
HandleLidSwitch = "ignore";
|
|
||||||
HandleHibernateKey = "ignore";
|
|
||||||
HandleSuspendKey = "ignore";
|
|
||||||
HandlePowerKey = "ignore";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Disable automatic suspend for SystemD.
|
# Disable automatic suspend for SystemD.
|
||||||
systemd.targets.sleep.enable = false;
|
systemd.targets.sleep.enable = false;
|
||||||
systemd.targets.suspend.enable = false;
|
systemd.targets.suspend.enable = false;
|
||||||
systemd.targets.hibernate.enable = false;
|
systemd.targets.hibernate.enable = false;
|
||||||
systemd.targets.hybrid-sleep.enable = false;
|
systemd.targets.hybrid-sleep.enable = false;
|
||||||
|
}
|
||||||
virtualisation.docker = {
|
|
||||||
enable = true;
|
|
||||||
autoPrune = {
|
|
||||||
enable = true;
|
|
||||||
dates = "weekly";
|
|
||||||
};
|
|
||||||
rootless = {
|
|
||||||
enable = true;
|
|
||||||
setSocketVariable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
53
crossbox.nix
Normal file
53
crossbox.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
networking.hostName = "crossbox";
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||||
|
services.pulseaudio.enable = false;
|
||||||
|
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
rocmPackages.clr.icd # ROCm OpenCL runtime
|
||||||
|
rocmPackages.clr
|
||||||
|
rocmPackages.rocminfo
|
||||||
|
rocmPackages.rocm-runtime
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# List services that you want to enable:
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Disable automatic suspend.
|
||||||
|
# Otherwise SSH tunnels and HDMI signals break.
|
||||||
|
services.logind = {
|
||||||
|
settings = {
|
||||||
|
Login = {
|
||||||
|
HandleLidSwitch = "ignore";
|
||||||
|
HandleHibernateKey = "ignore";
|
||||||
|
HandleSuspendKey = "ignore";
|
||||||
|
HandlePowerKey = "ignore";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
autoPrune = {
|
||||||
|
enable = true;
|
||||||
|
dates = "weekly";
|
||||||
|
};
|
||||||
|
rootless = {
|
||||||
|
enable = true;
|
||||||
|
setSocketVariable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue