Compare commits
No commits in common. "5e2e28cbe9ab9682ec60fc4d0651cba59ee3b457" and "84e44962ee54606a8164f9162df90369c57da9a6" have entirely different histories.
5e2e28cbe9
...
84e44962ee
|
@ -1,14 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
boot = {
|
|
||||||
loader.systemd-boot.enable = true;
|
|
||||||
loader.systemd-boot.editor = false;
|
|
||||||
loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
|
||||||
kernelModules = [ "kvm-intel" ];
|
|
||||||
|
|
||||||
supportedFilesystems = [ "ntfs" ]; # for USB drives
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,12 +1,10 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports =
|
||||||
./boot.nix
|
[ # Include the results of the hardware scan.
|
||||||
./filesystems.nix
|
./hardware-configuration.nix
|
||||||
./hardware.nix
|
];
|
||||||
./networking.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
networking.hostId = "72885bb5";
|
networking.hostId = "72885bb5";
|
||||||
|
@ -20,8 +18,20 @@
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
nix.settings.trusted-users = [ "@wheel" ];
|
nix.settings.trusted-users = [ "@wheel" ];
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking.hostName = "kilgharrah"; # Define your hostname.
|
||||||
|
|
||||||
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
|
||||||
time.timeZone = "Europe/London";
|
time.timeZone = "Europe/London";
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
console.keyMap = "uk";
|
console.keyMap = "uk";
|
||||||
|
|
||||||
|
@ -42,7 +52,10 @@
|
||||||
|
|
||||||
age.secrets.user-password-kilgharrah-qenya.file = ../../secrets/user-password-kilgharrah-qenya.age;
|
age.secrets.user-password-kilgharrah-qenya.file = ../../secrets/user-password-kilgharrah-qenya.age;
|
||||||
users.users.qenya.hashedPasswordFile = config.age.secrets.user-password-kilgharrah-qenya.path;
|
users.users.qenya.hashedPasswordFile = config.age.secrets.user-password-kilgharrah-qenya.path;
|
||||||
users.users.qenya.extraGroups = [ "wheel" ];
|
users.users.qenya.extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
];
|
||||||
home-manager.users.qenya = {
|
home-manager.users.qenya = {
|
||||||
programs.vscode.enable = true;
|
programs.vscode.enable = true;
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
@ -52,6 +65,6 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,65 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
boot.initrd.luks.devices = {
|
|
||||||
"enc".device = "/dev/disk/by-uuid/b414aaba-0a36-4135-a7e1-dc9489286acd";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems = {
|
|
||||||
"/" = {
|
|
||||||
device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@" "compress=zstd" ];
|
|
||||||
};
|
|
||||||
"/home" = {
|
|
||||||
device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@home" "compress=zstd" ];
|
|
||||||
};
|
|
||||||
"/nix" = {
|
|
||||||
device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@nix" "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
"/swap" = {
|
|
||||||
device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@swap" "noatime" ];
|
|
||||||
};
|
|
||||||
"/root" = {
|
|
||||||
device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@root" "compress=zstd" ];
|
|
||||||
};
|
|
||||||
"/srv" = {
|
|
||||||
device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@srv" "compress=zstd" ];
|
|
||||||
};
|
|
||||||
"/var/cache" = {
|
|
||||||
device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@cache" "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
"/var/tmp" = {
|
|
||||||
device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@tmp" "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
"/var/log" = {
|
|
||||||
device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@log" "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
"/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/9582-E78D";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [{
|
|
||||||
device = "/swap/swapfile";
|
|
||||||
size = 32 * 1024;
|
|
||||||
}];
|
|
||||||
}
|
|
90
hosts/kilgharrah/hardware-configuration.nix
Normal file
90
hosts/kilgharrah/hardware-configuration.nix
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
# 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" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@" "compress=zstd" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/b414aaba-0a36-4135-a7e1-dc9489286acd";
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@home" "compress=zstd" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@nix" "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/swap" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@swap" "noatime" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/root" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@root" "compress=zstd" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/srv" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@srv" "compress=zstd" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/cache" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@cache" "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/tmp" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@tmp" "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/log" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@log" "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/9582-E78D";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# 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.enp2s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
|
@ -1,8 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
hardware.enableAllFirmware = true;
|
|
||||||
hardware.cpu.intel.updateMicrocode = true;
|
|
||||||
services.fwupd.enable = true;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
systemd.network.networks."10-wan" = {
|
|
||||||
matchConfig.Name = "enp2s0";
|
|
||||||
networkConfig = {
|
|
||||||
DHCP = "ipv4";
|
|
||||||
IPv6AcceptRA = true;
|
|
||||||
};
|
|
||||||
linkConfig.RequiredForOnline = "routable";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -52,3 +52,4 @@
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue