feat: begin writing user config

This commit is contained in:
oddlama 2022-12-14 01:41:03 +01:00
parent abe369ba0a
commit 4b4268b537
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
14 changed files with 209 additions and 94 deletions

View file

@ -10,18 +10,21 @@
nixos-hardware.common-pc-laptop
nixos-hardware.common-pc-laptop-ssd
../../core
../../dev
../../hardware/efi.nix
../../modules/efi.nix
../../modules/laptop.nix
../../modules/yubikey.nix
../../modules/zfs.nix
../../users/oddlama
#./state.nix
./fs.nix
./net.nix
];
boot = {
initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
kernelModules = [];
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
supportedFilesystems = ["zfs"];
tmpOnTmpfs = true;
};
@ -31,22 +34,7 @@
packages = with pkgs; [terminus_font];
};
fileSystems = {
"/" = {
device = "rpool/root/nixos";
fsType = "zfs";
options = ["zfsutil" "X-mount.mkdir"];
};
"/boot" = {
device = "/dev/disk/by-uuid/91ED-0E13";
fsType = "vfat";
};
};
swapDevices = [
{device = "/dev/disk/by-uuid/1122527a-71d3-4ec7-8d41-65d0c8494b04";}
];
environment.systemPackages = with pkgs; [wireguard-tools powertop];
hardware = {
enableRedistributableFirmware = true;
@ -55,37 +43,10 @@
opengl.enable = true;
};
networking = {
hostId = "4313abca";
hostName = "nom";
wireless.iwd.enable = true;
};
powerManagement.cpuFreqGovernor = "powersave";
services = {
fwupd.enable = true;
smartd.enable = true;
};
systemd.network.networks = {
wired = {
DHCP = "yes";
matchConfig.MACAddress = "00:00:00:00:00:00";
dhcpV4Config.RouteMetric = 10;
dhcpV6Config.RouteMetric = 10;
};
wireless = {
DHCP = "yes";
matchConfig.MACAddress = "00:00:00:00:00:00";
dhcpV4Config.RouteMetric = 40;
dhcpV6Config.RouteMetric = 40;
};
};
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.root = {
initialHashedPassword = "$6$EBo/CaxB.dQoq2W8$lo2b5vKgJlLPdGGhEqa08q3Irf1Zd1PcFBCwJOrG8lqjwbABkn1DEhrMh1P3ezwnww2HusUBuZGDSMa4nvSQg1";
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA5Uq+CDy5Pmt3If5M6d8K/Q7HArU6sZ7sgoj3T521Wm"];
};
}

18
hosts/nom/fs.nix Normal file
View file

@ -0,0 +1,18 @@
{config, ...}: {
fileSystems = {
"/" = {
device = "rpool/root/nixos";
fsType = "zfs";
options = ["zfsutil" "X-mount.mkdir"];
};
"/boot" = {
device = "/dev/disk/by-uuid/91ED-0E13";
fsType = "vfat";
};
};
swapDevices = [
{device = "/dev/disk/by-uuid/1122527a-71d3-4ec7-8d41-65d0c8494b04";}
];
}

22
hosts/nom/net.nix Normal file
View file

@ -0,0 +1,22 @@
{
networking = {
hostId = "4313abca";
hostName = "nom";
wireless.iwd.enable = true;
};
systemd.network.networks = {
wired = {
DHCP = "yes";
matchConfig.MACAddress = "00:00:00:00:00:00";
dhcpV4Config.RouteMetric = 10;
dhcpV6Config.RouteMetric = 10;
};
wireless = {
DHCP = "yes";
matchConfig.MACAddress = "00:00:00:00:00:00";
dhcpV4Config.RouteMetric = 40;
dhcpV6Config.RouteMetric = 40;
};
};
}