update nix config

This commit is contained in:
fred 2025-08-12 11:53:58 -07:00
parent f610209aff
commit 07b7f0cc1f
34 changed files with 388 additions and 240 deletions

12
hosts/lap/boot.nix Normal file
View file

@ -0,0 +1,12 @@
{
boot.initrd.luks.devices = {
"luks-847548dd-10b5-46d1-82f4-bf982a32c1b5" = {
device = "/dev/disk/by-uuid/847548dd-10b5-46d1-82f4-bf982a32c1b5";
allowDiscards = true;
keyFileSize = 4096;
keyFile = "/dev/disk/by-id/usb-Generic-_SD_MMC_27B8RE273ED5E";
fallbackToPassword = true;
preLVM = false;
};
};
}

75
hosts/lap/default.nix Normal file
View file

@ -0,0 +1,75 @@
{ pkgs, inputs, config, lib, ... }:
let
nfs_opts = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=600" ];
hdd_opts = [ "nosuid" "nodev" "nofail" ];
in
{
imports =
[
./boot.nix
./hardware.nix
# ./desk_apps.nix
../../modules/common/default.nix
../../modules/common/system-d_boot.nix
../../modules/networking/ssh.nix
../../modules/networking/hosts.nix
../../modules/user
../../modules/apps/99_i3_config.nix
../../modules/dev/docker.nix
../../modules/dev/ruby.nix
../../modules/dev/utils.nix
../../modules/misc/polkit.nix
inputs.home-manager.nixosModules.default
inputs.sops-nix.nixosModules.sops
];
config = {
user = "fred";
host = "lap";
sops_file = "home.yaml";
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8";
environment.systemPackages = with pkgs; [
nfs-utils
ddcutil
input-remapper
xorg.xinit # for vnc server
];
networking.firewall.allowedUDPPorts = [ 5900 ]; # vnc-server
networking.firewall.allowedTCPPorts = [ 5900 ]; # vnc-server
#### NFS's ###
services.autofs = {
enable = true;
timeout = 60;
autoMaster = ''
/- /etc/autofs/auto.nfs_server --timeout=60
'';
};
environment.etc."autofs/auto.nfs_server" = {
text = ''
/nfs -rw,soft,rsize=8192,wsize=8192 nfs:/nfs
/solid -rw,soft,rsize=8192,wsize=8192 nfs:/solid
/docker -rw,soft,rsize=8192,wsize=8192 nfs:/docker
'';
mode = "0644";
};
services.tcsd.enable = false; # prevent sysinit-reactiviation.target hang when rebuilding flake
networking.enableIPv6 = false;
security.pki.certificates = [ (builtins.readFile ../../dotfiles/certs/mfCA.crt) ];
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = false;
services.blueman.enable = true;
system.stateVersion = "25.05";
};
}

45
hosts/lap/hardware.nix Normal file
View file

@ -0,0 +1,45 @@
# 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/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
# hardware.nvidia.open=false;
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f7766025-9e57-4b52-b47c-b158b3a894f2";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-847548dd-10b5-46d1-82f4-bf982a32c1b5".device = "/dev/disk/by-uuid/847548dd-10b5-46d1-82f4-bf982a32c1b5";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/B177-CFE7";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [{
device = "/var/lib/swapfile";
size = 8*1024;
}];
# 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.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp61s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}