diff options
author | Tim Keller <tjk@tjkeller.xyz> | 2024-10-02 22:07:10 -0500 |
---|---|---|
committer | Tim Keller <tjk@tjkeller.xyz> | 2024-10-02 22:07:10 -0500 |
commit | 4730b215fdc4095800fedfdf690c12fec994bb6b (patch) | |
tree | 3c746ece0089625a8093d4ae6bf1149ea903b7dc /modules/hosts | |
parent | 34b0bb8df42194a0ea433592e3cac27546f0af4e (diff) | |
download | nixos-4730b215fdc4095800fedfdf690c12fec994bb6b.tar.xz nixos-4730b215fdc4095800fedfdf690c12fec994bb6b.zip |
more reorganizing and modularizing
Diffstat (limited to 'modules/hosts')
-rw-r--r-- | modules/hosts/T430/configuration.nix | 27 | ||||
-rw-r--r-- | modules/hosts/T430/hardware-configuration.nix | 33 |
2 files changed, 60 insertions, 0 deletions
diff --git a/modules/hosts/T430/configuration.nix b/modules/hosts/T430/configuration.nix new file mode 100644 index 0000000..a8744ba --- /dev/null +++ b/modules/hosts/T430/configuration.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: { + imports = [ ./hardware-configuration.nix ]; + networking.hostName = "T430"; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.timmy = { + description = "Tim Keller"; + isNormalUser = true; + extraGroups = [ "wheel" "docker" ]; # Enable ‘sudo’ for the user. + packages = with pkgs; [ + ]; + }; + + # TODO this does not function + boot.initrd.systemd.extraBin = { + sh = "${pkgs.dash}/bin/dash"; + vim = "${pkgs.neovim}/bin/nvim"; + }; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + system.stateVersion = "24.05"; +} diff --git a/modules/hosts/T430/hardware-configuration.nix b/modules/hosts/T430/hardware-configuration.nix new file mode 100644 index 0000000..206a525 --- /dev/null +++ b/modules/hosts/T430/hardware-configuration.nix @@ -0,0 +1,33 @@ +# 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" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/b991914b-3a4c-4248-9472-b5403729601a"; + fsType = "btrfs"; + }; + + 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.enp0s25.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} |