Reformat, refactor

This commit is contained in:
James Eversole 2023-06-08 21:25:22 -05:00
parent f5aca1b90b
commit 639baeb70a
3 changed files with 43 additions and 77 deletions

View File

@ -1,17 +1,20 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }: {
{ imports = [ ./hardware-configuration.nix ];
imports = [
./hardware-configuration.nix
];
boot.loader.systemd-boot.enable = true; boot = {
boot.loader.efi.canTouchEfiVariables = true; loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
};
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix = {
buildMachines = [ ];
distributedBuilds = false;
settings.experimental-features = [ "nix-command" "flakes" ];
};
networking = { networking = {
hostName = "eve-psr-nix0"; hostName = "eve-psr-nix0";
firewall = { firewall = {
allowedTCPPorts = [ 22 80 443 ]; allowedTCPPorts = [ 22 80 443 ];
allowedUDPPorts = [ 22 80 443 ]; allowedUDPPorts = [ 22 80 443 ];
}; };
@ -20,63 +23,30 @@
time.timeZone = "America/Chicago"; time.timeZone = "America/Chicago";
services.openssh.enable = true; services.openssh.enable = true;
virtualisation.docker = { virtualisation.docker = {
enable = true; enable = true;
liveRestore = false; liveRestore = false;
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ git pciutils vim wget ];
git
pciutils
vim
wget
];
programs.zsh.enable = true;
programs.zsh.enable = true; users = {
users.defaultUserShell = pkgs.zsh; defaultUserShell = pkgs.zsh;
users.users = { users = {
sezycei = { sezycei = {
isNormalUser = true; isNormalUser = true;
initialPassword = "bootMaster"; initialPassword = "bootMaster";
extraGroups = [ "wheel" "docker" ]; extraGroups = [ "wheel" "docker" ];
packages = with pkgs; [ packages = with pkgs; [ byobu tmux stack ];
byobu };
tmux torrent = {
stack isNormalUser = true;
]; initialPassword = "torrentUserTemp";
}; };
torrent = {
isNormalUser = true;
initialPassword = "torrentUserTemp";
}; };
}; };
# NixBuild.net Configuration
programs.ssh.extraConfig = ''
Host eu.nixbuild.net
PubkeyAcceptedKeyTypes ssh-ed25519
IdentityFile /home/sezycei/.ssh/nixbuilds
'';
programs.ssh.knownHosts = {
nixbuild = {
hostNames = [ "eu.nixbuild.net" ];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM";
};
};
nix = {
distributedBuilds = false;
buildMachines = [
{ hostName = "eu.nixbuild.net";
system = "x86_64-linux";
maxJobs = 100;
supportedFeatures = [ "benchmark" "big-parallel" ];
}
];
};
system.stateVersion = "22.11"; system.stateVersion = "22.11";
} }

View File

@ -1,15 +1,11 @@
{ {
inputs = { inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; };
nixpkgs.url = "nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }: { outputs = { self, nixpkgs }: {
nixosConfigurations = { nixosConfigurations = {
eve-psr-nix0 = nixpkgs.lib.nixosSystem { eve-psr-nix0 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [ ./configuration.nix ];
./configuration.nix
];
}; };
}; };
}; };

View File

@ -4,24 +4,23 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-label/NIXROOT"; device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-label/NIXBOOT"; device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ ]; swapDevices = [ ];
@ -35,5 +34,6 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }