ft (wip): big initial config
This commit is contained in:
47
hosts/nixbook/default.nix
Normal file
47
hosts/nixbook/default.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
];
|
||||
|
||||
networking.hostName = "nixbook";
|
||||
system.stateVersion = "26.05";
|
||||
|
||||
boot.initrd.luks.devices."luks-082cc474-c00a-46c5-b140-4b7ccc2e6958".device = "/dev/disk/by-uuid/082cc474-c00a-46c5-b140-4b7ccc2e6958";
|
||||
|
||||
services.power-profiles-daemon.enable = true;
|
||||
|
||||
hardware.bluetooth.powerOnBoot = false;
|
||||
|
||||
users.users.djai.packages = with pkgs; [
|
||||
steam
|
||||
];
|
||||
|
||||
# BELOW IS OLD!! remove as we make more modular
|
||||
# custom certificates
|
||||
# TODO: move certs to secrets, make this a module not a host based thing
|
||||
security.pki.certificateFiles = [
|
||||
./certs/npm-caddy-private.crt
|
||||
./certs/npm-caddy-public.crt
|
||||
./certs/npm-caddy-shared.crt
|
||||
];
|
||||
|
||||
# TODO: move to secrets
|
||||
# tunnel
|
||||
networking.wg-quick.interfaces = {
|
||||
npm = {
|
||||
address = ["10.8.0.3/32"];
|
||||
privateKeyFile = "/root/wireguard-keys/npm";
|
||||
peers = [{
|
||||
publicKey = "YlQfDLqOET0RCTfbeRTDUicF/RA6dic/ThHLy25w4nQ=";
|
||||
presharedKeyFile = "/root/wireguard-keys/npm_preshared";
|
||||
allowedIPs = ["10.9.11.0/24" "10.8.0.0/24"];
|
||||
endpoint = "wg-easy.u.djairo.dev:51820";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
||||
35
hosts/nixbook/hardware-configuration.nix
Normal file
35
hosts/nixbook/hardware-configuration.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
# 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" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/luks-9902aae8-b296-4d67-8349-eab712cfefa4";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-9902aae8-b296-4d67-8349-eab712cfefa4".device = "/dev/disk/by-uuid/9902aae8-b296-4d67-8349-eab712cfefa4";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2589-CE74";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/mapper/luks-082cc474-c00a-46c5-b140-4b7ccc2e6958"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Reference in New Issue
Block a user