diff options
| -rw-r--r-- | systems/thinkpad-laptop/hardware.nix | 39 | ||||
| -rw-r--r-- | systems/thinkpad-laptop/system.nix | 66 | ||||
| -rw-r--r-- | users/thinkpad-laptop/lucas.nix | 61 |
3 files changed, 166 insertions, 0 deletions
diff --git a/systems/thinkpad-laptop/hardware.nix b/systems/thinkpad-laptop/hardware.nix new file mode 100644 index 0000000..b0470aa --- /dev/null +++ b/systems/thinkpad-laptop/hardware.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" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/56d54c43-c0bd-4cdc-b2e7-2e1abd16b904"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/3016-9300"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + 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.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/systems/thinkpad-laptop/system.nix b/systems/thinkpad-laptop/system.nix new file mode 100644 index 0000000..43dc5bd --- /dev/null +++ b/systems/thinkpad-laptop/system.nix @@ -0,0 +1,66 @@ +{config, ...}: { + imports = [./hardware.nix]; + + general-settings = { + hostname = "thinkpad-laptop"; + locale = "en_US.UTF-8"; + timezone = "America/New_York"; + stateVersion = "24.11"; + }; + + age.secrets.lucas-user-password.file = ../../secrets/lucas-user-password.age; + + users.users."lucas" = { + hashedPasswordFile = config.age.secrets.lucas-user-password.path; + isNormalUser = true; + description = "lucas"; + extraGroups = [ + "networkmanager" + "wheel" + "audio" + "video" + "libvirtd" + ]; + }; + + features = { + gui = { + apps = { + steam.enable = true; + # vmware.enable = true; + }; + desktops = { + niri.enable = true; + }; + }; + cli = { + shells.nushell.enable = true; + utils = { + nh = { + enable = true; + flake = "/home/lucas/Sync/setup"; + }; + }; + }; + services = { + core.systemd-boot.enable = true; + hardware = { + bluetooth.enable = true; + iwd.enable = true; + pipewire.enable = true; + }; + extra = { + plymouth.enable = true; + sddm.enable = true; + syncthing-client = { + enable = true; + username = "lucas"; + }; + udisks2.enable = true; + }; + bundles = { + printing.enable = true; + }; + }; + }; +} diff --git a/users/thinkpad-laptop/lucas.nix b/users/thinkpad-laptop/lucas.nix new file mode 100644 index 0000000..bd6ba38 --- /dev/null +++ b/users/thinkpad-laptop/lucas.nix @@ -0,0 +1,61 @@ +{ + pkgs, + lib, + ... +}: { + home = { + username = "lucas"; + homeDirectory = "/home/lucas"; + stateVersion = "24.11"; + + packages = with pkgs; [ + tor-browser + onlyoffice-desktopeditors + calibre + + # My custom neovim package. + custom-neovim + neovide + ]; + }; + aesthetics = { + enable = true; + enableAllTargets = true; + hasGui = true; + theme = "oxocarbon"; + }; + programs.helix.package = lib.mkForce pkgs.helix; # Building helix takes too much power + features = { + gui = { + apps = { + foot.enable = true; + librewolf.enable = true; + qutebrowser.enable = true; + }; + desktops.niri.enable = true; + }; + cli = { + shells.nushell.enable = true; + apps = { + btop.enable = true; + helix.enable = true; + zellij.enable = true; + lazygit.enable = true; + }; + utils = { + git.enable = true; + pandoc.enable = true; + ssh.enable = true; + }; + bundles = { + go-env.enable = true; + }; + scripts = { + spiral.enable = true; + }; + }; + services = { + udiskie.enable = true; + }; + }; +} |
