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,13 +1,16 @@
{ config, lib, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
];
{ config, lib, pkgs, ... }: {
imports = [ ./hardware-configuration.nix ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot = {
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 = {
hostName = "eve-psr-nix0";
@ -25,57 +28,24 @@
liveRestore = false;
};
environment.systemPackages = with pkgs; [
git
pciutils
vim
wget
];
environment.systemPackages = with pkgs; [ git pciutils vim wget ];
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
users.users = {
users = {
defaultUserShell = pkgs.zsh;
users = {
sezycei = {
isNormalUser = true;
initialPassword = "bootMaster";
extraGroups = [ "wheel" "docker" ];
packages = with pkgs; [
byobu
tmux
stack
];
packages = with pkgs; [ byobu tmux stack ];
};
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";

View File

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

View File

@ -4,22 +4,21 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (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.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-label/NIXROOT";
fileSystems."/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-label/NIXBOOT";
fileSystems."/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
@ -35,5 +34,6 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}