Add Astral host

This commit is contained in:
Nettika 2025-10-03 10:32:05 -07:00
parent c2399507d3
commit b3be9bbad9
9 changed files with 198 additions and 138 deletions

71
hosts/astral/default.nix Normal file
View file

@ -0,0 +1,71 @@
{ nixosModules, modulesPath, lib, config, pkgs, ... }: {
imports = with nixosModules; [
"${modulesPath}/virtualisation/amazon-image.nix"
nettika
];
boot.loader.grub.device = lib.mkForce "/dev/nvme0n1";
nix = {
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
settings.trusted-users = [ "@wheel" ];
};
networking = {
hostName = "astral";
domain = "recipes.leaf.ninja";
firewall.allowedTCPPorts = [ 80 443 ];
networkmanager.enable = true;
};
users.defaultUserShell = pkgs.fish;
security.sudo.wheelNeedsPassword = false;
environment.variables.EDITOR = "nano";
services.caddy = {
enable = true;
virtualHosts = {
"${config.networking.domain}".extraConfig = ''
reverse_proxy localhost:8008
header Strict-Transport-Security "max-age=63072000; includeSubDomains;"
'';
};
};
programs.fish.enable = true;
programs.git = {
enable = true;
lfs.enable = true;
config = {
init.defaultBranch = "master";
user = {
email = "git@nettika.cat";
name = "Nettika";
};
credential.helper = "store";
};
};
programs.nano = {
enable = true;
nanorc = ''
set autoindent
set linenumbers
'';
};
documentation.man.generateCaches = false;
promptEmoji = "";
time.timeZone = "America/Los_Angeles";
system.stateVersion = "23.05";
}

16
hosts/default.nix Normal file
View file

@ -0,0 +1,16 @@
{ self, nixpkgs, phps, agenix, ... }:
let inherit (nixpkgs.lib) nixosSystem;
in {
marauder = nixosSystem {
system = "x86_64-linux";
modules = [ ./marauder ];
specialArgs = {
inherit (self) nixosModules;
inherit phps agenix;
};
};
astral = nixosSystem {
system = "x86_64-linux";
modules = [ ./astral ];
};
}

View file

@ -1,4 +1,4 @@
{ pkgs, phps, ... }:
{ pkgs, nixosModules, phps, agenix, ... }:
let
fortune = pkgs.writeShellScript "cgi" ''
echo "Content-type: text/html"
@ -9,27 +9,50 @@ let
${pkgs.ffmpeg}/bin/ffmpeg -v error -stats -hide_banner -i "$1" -c copy -f null -
'';
in {
imports = [ ./backup.nix ];
imports = [
./backup.nix
nixosModules.nettika
nixosModules.promptmoji
agenix.nixosModules.default
];
nix = {
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
settings = {
trusted-users = [ "@wheel" ];
experimental-features = [ "nix-command" "flakes" ];
};
};
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.variables.EDITOR = "nano";
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
documentation.man.generateCaches = false;
environment.variables = {
VISUAL = "code --wait";
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
};
environment.variables.VISUAL = "code --wait";
age.identityPaths = [ "/home/nettika/.ssh/id_ed25519" ];
networking = {
hostName = "marauder";
firewall.enable = false;
networkmanager.enable = true;
};
security.sudo.wheelNeedsPassword = false;
users.defaultUserShell = pkgs.fish;
programs.fish.enable = true;
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/648c6539-892c-40d7-8b07-23fe760df02a";
@ -95,6 +118,7 @@ in {
krita
openscad-unstable
bambu-studio
orca-slicer
# Multimedia
vlc
@ -134,8 +158,32 @@ in {
mullvad-vpn
qbittorrent
system-config-printer
openssl
pkg-config
agenix.packages.x86_64-linux.default
];
programs.git = {
enable = true;
lfs.enable = true;
config = {
init.defaultBranch = "master";
user = {
email = "git@nettika.cat";
name = "Nettika";
};
credential.helper = "store";
};
};
programs.nano = {
enable = true;
nanorc = ''
set autoindent
set linenumbers
'';
};
programs.steam = {
enable = true;
remotePlay.openFirewall = true;