commit e9d12acdd5b02e31f9c6e4388c012a7358927701 Author: James Eversole Date: Thu Jun 1 14:39:07 2023 -0500 init diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..cc91394 --- /dev/null +++ b/configuration.nix @@ -0,0 +1,82 @@ +{ config, lib, pkgs, ... }: +{ + imports = [ + ./hardware-configuration.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + networking = { + hostName = "eve-psr-nix0"; + firewall = { + allowedTCPPorts = [ 22 80 443 ]; + allowedUDPPorts = [ 22 80 443 ]; + }; + }; + + time.timeZone = "America/Chicago"; + + services.openssh.enable = true; + virtualisation.docker = { + enable = true; + liveRestore = false; + }; + + environment.systemPackages = with pkgs; [ + git + pciutils + vim + wget + ]; + + + programs.zsh.enable = true; + users.defaultUserShell = pkgs.zsh; + users.users = { + sezycei = { + isNormalUser = true; + initialPassword = "bootMaster"; + extraGroups = [ "wheel" "docker" ]; + 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"; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..3e0b0a8 --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1685564631, + "narHash": "sha256-8ywr3AkblY4++3lIVxmrWZFzac7+f32ZEhH/A8pNscI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4f53efe34b3a8877ac923b9350c874e3dcd5dc0a", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..a908eb5 --- /dev/null +++ b/flake.nix @@ -0,0 +1,16 @@ +{ + inputs = { + nixpkgs.url = "nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs }: { + nixosConfigurations = { + eve-psr-nix0 = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./configuration.nix + ]; + }; + }; + }; +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..9e7aa23 --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,39 @@ +# 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" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-label/NIXROOT"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-label/NIXBOOT"; + fsType = "vfat"; + }; + + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}