hosts/youko: init

This commit is contained in:
Nikodem Rabuliński 2024-12-17 22:18:04 +01:00
parent 590ccec966
commit e2014034bb
Signed by: nrabulinski
SSH key fingerprint: SHA256:eJRdE3KzMWWk9zrksGEv8+v6F+VqUVR++z2SSPyiL0I
4 changed files with 104 additions and 0 deletions

View file

@ -14,6 +14,7 @@
# ./installer
./ude
./kogata
./youko
];
builders =

26
hosts/youko/default.nix Normal file
View file

@ -0,0 +1,26 @@
{
configurations.nixos.youko = {
imports = [
./disks.nix
./hardware.nix
];
nixpkgs.hostPlatform = "x86_64-linux";
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
};
networking.networkmanager.enable = true;
settei.user.config =
{ lib, ... }:
{
programs.git.signing = lib.mkForce {
key = null;
signByDefault = false;
};
};
};
}

58
hosts/youko/disks.nix Normal file
View file

@ -0,0 +1,58 @@
{
disko.devices.disk.main = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
esp = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
settings.allowDiscards = true;
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes =
let
mountOptions = [
"noatime"
"compress=zstd"
];
in
{
"/root" = {
inherit mountOptions;
mountpoint = "/";
};
"/home" = {
inherit mountOptions;
mountpoint = "/home";
};
"/nix" = {
inherit mountOptions;
mountpoint = "/nix";
};
"/swap" = {
mountpoint = "/.swapvol";
swap.swapfile.size = "16G";
};
};
};
};
};
};
};
};
}

19
hosts/youko/hardware.nix Normal file
View file

@ -0,0 +1,19 @@
{
boot = {
initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
kernelModules = [
"kvm-amd"
"i2c-dev"
];
};
services.smartd.enable = true;
hardware.cpu.amd.updateMicrocode = true;
}