This commit is contained in:
catvayor 2024-06-25 10:54:31 +02:00
parent 5ce5243fb8
commit c7631bdf96
7 changed files with 174 additions and 0 deletions

View file

@ -143,6 +143,16 @@ in
];
};
kat-son =
{ name, nodes, ... }:
{
deployment.targetHost = "son.kat";
imports = [
./machines/kat-son
(users.root { ssh = true; })
];
};
kat-iso =
{
name,

View file

@ -130,6 +130,10 @@
vm = "192.168.122.4";
sshport = null;
};
"son.katvayor.net" = {
vm = "192.168.122.5";
sshport = null;
};
};
in
{

View file

@ -0,0 +1,97 @@
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{
config,
lib,
pkgs,
...
}:
{
imports = [
./hardware-configuration.nix
./disks.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.supportedFilesystems = [ "bcachefs" ];
boot.kernelPackages = pkgs.linuxPackages_latest;
time.timeZone = "Europe/Paris";
networking = {
interfaces."enp1s0" = {
useDHCP = false;
ipv4.addresses = [
{
address = "192.168.122.5";
prefixLength = 24;
}
];
ipv6.addresses = [
{
address = "fe80::5";
prefixLength = 64;
}
];
};
defaultGateway = "192.168.122.1";
defaultGateway6 = {
address = "fe80::1";
interface = "enp1s0";
};
nameservers = [
"192.168.122.1"
"fe80::1%enp1s0"
];
};
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "fr";
};
services.dbus.packages = with pkgs; [ dconf ];
nixpkgs.config.allowUnfree = true;
programs.zsh.enable = true;
environment.systemPackages = with pkgs; [
wget
nix-search-cli
git
btop
ranger
screen
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
services.openssh.enable = true;
networking.firewall.enable = false;
security.acme = {
acceptTerms = true;
defaults.email = "root@katvayor.net";
};
services.nginx = {
enable = true;
virtualHosts = {
"son.katvayor.net" = {
enableACME = true;
addSSL = true;
};
};
};
system.stateVersion = "23.11"; # Did you read the comment?
}

View file

@ -0,0 +1,32 @@
{
disko.devices = {
disk = {
vda = {
device = "/dev/vda";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
type = "EF00";
size = "100M";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "bcachefs";
mountpoint = "/";
};
};
};
};
};
};
};
}

View file

@ -0,0 +1,25 @@
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.initrd.availableKernelModules = [
"ahci"
"xhci_pci"
"virtio_pci"
"sr_mod"
"virtio_blk"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -66,6 +66,7 @@
"traque.katvayor.net" = 22001;
"betamail.katvayor.net" = 22002;
"test.traque.katvayor.net" = null;
"son.katvayor.net" = null;
};
in
{

View file

@ -37,6 +37,11 @@
hostname = "fe80::4%%virbr0";
proxyJump = "r86s.kat";
};
"son.kat" = {
user = "root";
hostname = "fe80::5%%virbr0";
proxyJump = "r86s.kat";
};
"sas.ens" = {
user = "lbailly";