forked from emily/nixfiles
Add emilia to hosts
This commit is contained in:
parent
4ffe117269
commit
ab50d3e1c0
3 changed files with 125 additions and 0 deletions
36
config/hosts/emilia/configuration.nix
Normal file
36
config/hosts/emilia/configuration.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ ... }:{
|
||||
imports = [
|
||||
../../common
|
||||
../../profiles/headless.nix
|
||||
../../profiles/physical.nix
|
||||
../../services/forgejo.nix
|
||||
../../services/nginx.nix
|
||||
../../services/uptime-kuma.nix
|
||||
../../services/vaultwarden.nix
|
||||
./disko.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
boot.initrd.supportedFilesystems = [ "btrfs" ];
|
||||
|
||||
kyouma.machine-type.physical = true;
|
||||
kyouma.nginx.defaultForbidden = "uptime.kyouma.net";
|
||||
|
||||
networking.hostName = "emilia";
|
||||
systemd.network.networks."98-eth-default" = {
|
||||
matchConfig.Type = "ether";
|
||||
matchConfig.Name = "enp0s31f6";
|
||||
networkConfig = {
|
||||
IPv6AcceptRA = false;
|
||||
};
|
||||
addresses = [
|
||||
{ addressConfig.Address = "95.217.83.107/26"; }
|
||||
{ addressConfig.Address = "2a01:4f9:4a:1f5f::1/64"; }
|
||||
];
|
||||
routes = [
|
||||
{ routeConfig.Gateway = "95.217.83.65"; }
|
||||
{ routeConfig.Gateway = "fe80::1"; }
|
||||
];
|
||||
};
|
||||
|
||||
}
|
80
config/hosts/emilia/disko.nix
Normal file
80
config/hosts/emilia/disko.nix
Normal file
|
@ -0,0 +1,80 @@
|
|||
{ inputs, ... }: {
|
||||
imports = [
|
||||
inputs.disko.nixosModules.disko
|
||||
];
|
||||
disko.devices = {
|
||||
disk.bb-nvme0n1 = {
|
||||
device = "/dev/disk/by-id/nvme-eui.343337304e4032870025384100000001";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
BOOT = {
|
||||
type = "EF00";
|
||||
size = "512M";
|
||||
content = {
|
||||
type = "mdraid";
|
||||
name = "boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "/dev/disk/by-partlabel/disk-aa-nvme1n1-root" "-f" "-d raid1" "-m raid1" ];
|
||||
subvolumes = {
|
||||
"nixos" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"var" = {
|
||||
mountpoint = "/var";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
disk.aa-nvme1n1 = {
|
||||
device = "/dev/disk/by-id/nvme-eui.343337304d8021880025384500000001";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
BOOT = {
|
||||
type = "EF00";
|
||||
size = "512M";
|
||||
content = {
|
||||
type = "mdraid";
|
||||
name = "boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
mdadm.boot = {
|
||||
type = "mdadm";
|
||||
level = 1;
|
||||
metadata = "1.0";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" "defaults" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
9
config/hosts/emilia/hardware-configuration.nix
Normal file
9
config/hosts/emilia/hardware-configuration.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ modulesPath, ... }: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
}
|
||||
|
Loading…
Reference in a new issue