feat(oksys): add hw config

This commit is contained in:
Updater 2023-12-20 04:00:02 -05:00
parent 0661fd0940
commit 5f1bb9299d
4 changed files with 48 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{config, ...}: { {config, ...}: {
imports = [ imports = [
#./hardware-configuration.nix ./hardware-configuration.nix
../../modules/tailscale.nix ../../modules/tailscale.nix

View file

@ -0,0 +1,45 @@
{
config,
modulesPath,
...
}: {
nixpkgs.hostPlatform = "x86_64-linux";
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
services.logind.lidSwitchExternalPower = "ignore";
boot = {
loader = {
timeout = 2;
grub = {
enable = true;
device = "/dev/sda";
};
};
initrd.availableKernelModules = [
"uhci_hcd"
"ehci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
};
zramSwap.enable = true;
hardware.cpu.intel.updateMicrocode = config.hardware.enableRedistributableFirmware;
}

View file

@ -6,6 +6,7 @@
}: let }: let
caddy = caddy-plugins.packages.${pkgs.system}.default; caddy = caddy-plugins.packages.${pkgs.system}.default;
in { in {
# FIXME: doesn't close on shutdown
imports = [caddy-plugins.nixosModules.default]; imports = [caddy-plugins.nixosModules.default];
environment.systemPackages = [caddy]; environment.systemPackages = [caddy];
users.users.${config.vars.user}.extraGroups = ["caddy"]; users.users.${config.vars.user}.extraGroups = ["caddy"];

View file

@ -6,6 +6,7 @@
}: let }: let
headscale-flake = headscale.packages.${pkgs.system}.headscale; headscale-flake = headscale.packages.${pkgs.system}.headscale;
in { in {
# FIXME: no permissions
environment.systemPackages = [headscale-flake]; environment.systemPackages = [headscale-flake];
users.users.${config.vars.user}.extraGroups = ["headscale"]; users.users.${config.vars.user}.extraGroups = ["headscale"];