add thinkpad

This commit is contained in:
Michael Thomson 2025-03-18 12:23:11 -04:00
parent 3aece1b9fb
commit 16a0c541b1
3 changed files with 63 additions and 60 deletions

View File

@ -11,23 +11,34 @@
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x220 inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
../../modules/nixos/bootloader.nix
../../modules/nixos/user.nix ../../modules/nixos/user.nix
../../modules/nixos/i3.nix ../../modules/nixos/ssh.nix
../../modules/nixos/bluetooth.nix
../../modules/nixos/hyprland.nix
../../modules/nixos/nm.nix ../../modules/nixos/nm.nix
../../modules/nixos/sound.nix ../../modules/nixos/sound.nix
../../modules/nixos/steam.nix
../../modules/nixos/env.nix ../../modules/nixos/env.nix
../../modules/nixos/1password.nix ../../modules/nixos/docker.nix
]; ];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
networking.hostName = "thinkpad"; networking.hostName = "thinkpad";
nix.settings = {
trusted-users = ["mthomson"];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
time.timeZone = "America/Toronto"; time.timeZone = "America/Toronto";
i18n.defaultLocale = "en_CA.UTF-8"; i18n.defaultLocale = "en_CA.UTF-8";
@ -40,6 +51,7 @@
wget wget
git git
curl curl
lsof
]; ];
home-manager = { home-manager = {

View File

@ -1,37 +1,37 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
config, imports =
lib, [ (modulesPath + "/installer/scan/not-detected.nix")
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci"]; boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = []; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-uuid/08ecde1d-02ae-4308-a6d1-93ec9361a2fc"; { device = "/dev/disk/by-uuid/6212512c-31fc-4366-9756-a0aa05fd3c20";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = [ fileSystems."/boot" =
{device = "/dev/disk/by-uuid/add2134a-831a-42bd-8822-8a4f0702aa06";} { device = "/dev/disk/by-uuid/A8AE-5CBB";
]; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (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 # 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`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View File

@ -4,45 +4,36 @@
... ...
}: { }: {
imports = [ imports = [
../../modules/home-manager/i3 ../../modules/home-manager/hyprland.nix
../../modules/home-manager/ssh ../../modules/home-manager/git.nix
../../modules/home-manager/git ../../modules/home-manager/nixvim.nix
../../modules/home-manager/nixvim ../../modules/home-manager/kitty.nix
../../modules/home-manager/wezterm ../../modules/home-manager/zsh.nix
../../modules/home-manager/zsh ../../modules/home-manager/tmux.nix
../../modules/home-manager/tmux ../../modules/home-manager/taskwarrior.nix
../../modules/home-manager/taskwarrior ../../modules/home-manager/email.nix
../../modules/home-manager/zoxide ../../modules/home-manager/syncthing.nix
../../modules/home-manager/zathura ../../modules/home-manager/bitwarden.nix
../../modules/home-manager/syncthing ../../modules/home-manager/kubernetes.nix
../../modules/home-manager/email ../../modules/home-manager/nix-index.nix
../../modules/home-manager/bitwarden.nix
../../modules/home-manager/direnv.nix
../../modules/home-manager/jq.nix
../../modules/home-manager/lazygit.nix
../../modules/home-manager/man.nix
]; ];
home.username = "mthomson"; home.username = "mthomson";
home.homeDirectory = "/home/mthomson"; home.homeDirectory = "/home/mthomson";
home.stateVersion = "23.11"; home.stateVersion = "23.11";
programs = {
direnv = {
enable = true;
enableZshIntegration = true; # see note on other shells below
nix-direnv.enable = true;
};
};
home.packages = with pkgs; [ home.packages = with pkgs; [
firefox firefox
gcc gcc
fzf
ripgrep
jq
unzip
pavucontrol
pasystray
networkmanagerapplet
_1password-cli
upower
acpi
]; ];
home.sessionVariables = {
STEAM_EXTRA_COMPAT_TOOLS_PATH = "\${HOME}/.steam/root/compatibilitytools.d";
};
programs.home-manager.enable = true; programs.home-manager.enable = true;
} }