From 279293f008d93b1f4bd239725706957145fd47a4 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 27 Jan 2023 14:53:07 -0600 Subject: [PATCH] adding hoid --- flake.nix | 15 ++- system/hoid/configuration.nix | 101 +++++++++++++++++++ system/hoid/hardware-configuration.nix | 39 +++++++ system/{ => shen}/configuration.nix | 0 system/{ => shen}/hardware-configuration.nix | 0 5 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 system/hoid/configuration.nix create mode 100644 system/hoid/hardware-configuration.nix rename system/{ => shen}/configuration.nix (100%) rename system/{ => shen}/hardware-configuration.nix (100%) diff --git a/flake.nix b/flake.nix index 07a15e4..a1d19f4 100644 --- a/flake.nix +++ b/flake.nix @@ -31,7 +31,20 @@ inherit system; pkgs = pkgsForSystem; modules = [ - ./system/configuration.nix + ./system/shen/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.chris = import ./chris/home.nix; + } + ]; + }; + hoid = lib.nixosSystem { + inherit system; + pkgs = pkgsForSystem; + modules = [ + ./system/hoid/configuration.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; diff --git a/system/hoid/configuration.nix b/system/hoid/configuration.nix new file mode 100644 index 0000000..e204f1a --- /dev/null +++ b/system/hoid/configuration.nix @@ -0,0 +1,101 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + boot.kernelPackages = pkgs.linuxPackages_latest; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.efi.efiSysMountPoint = "/boot/efi"; + + networking.hostName = "hoid"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "America/Chicago"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.utf8"; + + # Configure keymap in X11 + services.xserver = { + layout = "us"; + xkbVariant = ""; + }; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.chris = { + isNormalUser = true; + description = "Chris"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; []; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + wget + git + rclone + rsync + fd + bat + ripgrep + curl + iputils + btop + htop + yt-dlp + tmux + exa + ]; + + programs.fish.enable = true; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "22.05"; # Did you read the comment? + +} diff --git a/system/hoid/hardware-configuration.nix b/system/hoid/hardware-configuration.nix new file mode 100644 index 0000000..04d8256 --- /dev/null +++ b/system/hoid/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" "ehci_pci" "ahci" "usbhid" "usb_storage" "ums_realtek" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/ce704db3-2585-46fc-af3f-8caba66c7d71"; + fsType = "ext4"; + }; + + fileSystems."/boot/efi" = + { device = "/dev/disk/by-uuid/E7D2-7D56"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/075fe688-dfad-4f8f-a92c-122246bc5da2"; } + ]; + + # 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.enp2s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/system/configuration.nix b/system/shen/configuration.nix similarity index 100% rename from system/configuration.nix rename to system/shen/configuration.nix diff --git a/system/hardware-configuration.nix b/system/shen/hardware-configuration.nix similarity index 100% rename from system/hardware-configuration.nix rename to system/shen/hardware-configuration.nix