Commit
This commit is contained in:
44
modules/hosts/orion/default.nix
Normal file
44
modules/hosts/orion/default.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{ lib, lux, ... }:
|
||||
{
|
||||
den.hosts.x86_64-linux.orion = {
|
||||
domain = "jelles.net";
|
||||
};
|
||||
|
||||
den.aspects.orion = {
|
||||
includes = with lux.services._; [
|
||||
caddy
|
||||
openssh
|
||||
vaultwarden
|
||||
radicale
|
||||
actual
|
||||
gitea
|
||||
|
||||
(
|
||||
{ user, ... }:
|
||||
{
|
||||
nixos.users.users."${user.name}".linger = true;
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.kitty
|
||||
];
|
||||
|
||||
networking = {
|
||||
firewall.enable = true;
|
||||
firewall.allowPing = false;
|
||||
nftables.enable = true;
|
||||
};
|
||||
|
||||
# Use ssh authorization for sudo instead of password
|
||||
security.pam = {
|
||||
sshAgentAuth.enable = true;
|
||||
services.sudo.sshAgentAuth = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
63
modules/hosts/orion/orion-disk-config.nix
Normal file
63
modules/hosts/orion/orion-disk-config.nix
Normal file
@@ -0,0 +1,63 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
den.aspects.orion = {
|
||||
nixos =
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [ inputs.disko.nixosModules.disko ];
|
||||
|
||||
disko.devices = {
|
||||
disk.disk1 = {
|
||||
device = lib.mkDefault "/dev/sda";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
esp = {
|
||||
name = "ESP";
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
name = "root";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "pool";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
pool = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%FREE";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
43
modules/hosts/orion/orion-hardware.nix
Normal file
43
modules/hosts/orion/orion-hardware.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/system.nix instead.
|
||||
{ ... }:
|
||||
{
|
||||
den.aspects.orion = {
|
||||
nixos =
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/hosts/polaris/default.nix
Normal file
17
modules/hosts/polaris/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ inputs, lux, ... }:
|
||||
{
|
||||
den.hosts.x86_64-linux.polaris = { };
|
||||
|
||||
den.aspects.polaris = {
|
||||
includes = [
|
||||
lux.workstation
|
||||
];
|
||||
|
||||
nixos.imports = with inputs.nixos-hardware.nixosModules; [
|
||||
common-pc
|
||||
common-pc-ssd
|
||||
common-cpu-amd
|
||||
common-gpu-amd
|
||||
];
|
||||
};
|
||||
}
|
||||
51
modules/hosts/polaris/polaris-hardware.nix
Normal file
51
modules/hosts/polaris/polaris-hardware.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{ inputs, den, ... }:
|
||||
{
|
||||
den.aspects.polaris = {
|
||||
nixos =
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/bda7f8b9-2b3d-4190-8518-baa50490227e";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/26FE-CA37";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user