From 221a39e8653994962936068f8cdd11ada0236e0c Mon Sep 17 00:00:00 2001 From: Jeremy Janella Date: Thu, 14 May 2026 15:09:05 -0400 Subject: [PATCH 1/5] thinkpad conf --- ...on.nix => alien-hardware-configuration.nix | 1 + ...iguration.nix => default-configuration.nix | 14 +++---- flake.lock | 18 ++++----- flake.nix | 20 +++++++++- thinkpad-hardware-configuration.nix | 39 +++++++++++++++++++ 5 files changed, 72 insertions(+), 20 deletions(-) rename hardware-configuration.nix => alien-hardware-configuration.nix (98%) rename configuration.nix => default-configuration.nix (98%) create mode 100644 thinkpad-hardware-configuration.nix diff --git a/hardware-configuration.nix b/alien-hardware-configuration.nix similarity index 98% rename from hardware-configuration.nix rename to alien-hardware-configuration.nix index 3fafb78..49f014c 100644 --- a/hardware-configuration.nix +++ b/alien-hardware-configuration.nix @@ -13,6 +13,7 @@ boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; + networking.hostName = "alien"; # systemd.services.heat-room = { # description = "Morning room heating"; # after = [ "graphical-session.target" ]; diff --git a/configuration.nix b/default-configuration.nix similarity index 98% rename from configuration.nix rename to default-configuration.nix index 7f233c3..a0e2f52 100644 --- a/configuration.nix +++ b/default-configuration.nix @@ -1,12 +1,7 @@ # Edit this configuration file to define what should be installed on your system. Help is available in the configuration.nix(5) man page, on https://search.nixos.org/options and in the NixOS manual (`nixos-help`). { config, lib, pkgs, inputs, ... }: -{ - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - +{ nixpkgs.config.allowUnfree = true; nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -28,7 +23,6 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = "alien"; time.timeZone = "America/Toronto"; @@ -236,7 +230,6 @@ firefox neovim wget - networkmanager gnome-disk-utility dunst libnotify @@ -331,7 +324,10 @@ ports = [2121]; settings.X11Forwarding = true; }; + networking.firewall.allowedTCPPorts = [2121]; + networking.networkmanager.enable = true; + programs.nm-applet.enable = true; # Binaries auto linked programs.nix-ld.enable = true; @@ -391,4 +387,4 @@ # # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . system.stateVersion = "25.11"; # Did you read the comment? -} \ No newline at end of file +} diff --git a/flake.lock b/flake.lock index 5ed5ae7..13dace6 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1775425411, - "narHash": "sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo=", + "lastModified": 1778606796, + "narHash": "sha256-P2krpSkFVYJ89bgsnAZ9RtQiGwiTW77sfSJp9SEDscM=", "owner": "nix-community", "repo": "home-manager", - "rev": "0d02ec1d0a05f88ef9e74b516842900c41f0f2fe", + "rev": "e1fd7350f4410972bcb8c42a697d8c924ffe642a", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1776067740, - "narHash": "sha256-B35lpsqnSZwn1Lmz06BpwF7atPgFmUgw1l8KAV3zpVQ=", + "lastModified": 1778430510, + "narHash": "sha256-Ti+ZBvW6yrWWAg2szExVTwCd4qOJ3KlVr1tFHfyfi8Q=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7e495b747b51f95ae15e74377c5ce1fe69c1765f", + "rev": "8fd9daa3db09ced9700431c5b7ad0e8ba199b575", "type": "github" }, "original": { @@ -39,11 +39,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1775710090, - "narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=", + "lastModified": 1778443072, + "narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4c1018dae018162ec878d42fec712642d214fdfa", + "rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6fec3be..8f9d4ea 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,23 @@ nixosConfigurations."alien" = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ - ./configuration.nix + ./default-configuration.nix + ./alien-hardware-configuration.nix + home-manager.nixosModules.home-manager + { + nixpkgs.overlays = [ + (final: prev: { + ollama = nixpkgs-unstable.legacyPackages.${prev.system}.ollama; + }) + ]; + } + ]; + }; + nixosConfigurations."thinkpad" = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + ./default-configuration.nix + ./thinkpad-hardware-configuration.nix home-manager.nixosModules.home-manager { nixpkgs.overlays = [ @@ -30,4 +46,4 @@ ]; }; }; -} \ No newline at end of file +} diff --git a/thinkpad-hardware-configuration.nix b/thinkpad-hardware-configuration.nix new file mode 100644 index 0000000..7b27cda --- /dev/null +++ b/thinkpad-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 = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.initrd.luks.devices."cryptroot" = { + device = "/dev/disk/by-uuid/8f79adab-ca08-497b-921a-ee386ad03cfc"; + preLVM = true; + }; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + networking.hostName = "thinkpad"; + + fileSystems."/" = + { device = "/dev/mapper/vg0-root"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/06C1-B3A3"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = + [ { device = "/dev/mapper/vg0-swap"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} + From bfc067c31ff183b528efa23473c34d5a59d44e91 Mon Sep 17 00:00:00 2001 From: Jeremy Janella Date: Thu, 14 May 2026 15:58:48 -0400 Subject: [PATCH 2/5] no niri --- default-configuration.nix | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/default-configuration.nix b/default-configuration.nix index a0e2f52..6f98816 100644 --- a/default-configuration.nix +++ b/default-configuration.nix @@ -5,7 +5,7 @@ nixpkgs.config.allowUnfree = true; nix.settings.experimental-features = [ "nix-command" "flakes" ]; - programs.hyprland.enable = true; + # programs.hyprland.enable = true; programs.steam = { enable = true; remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play @@ -67,7 +67,7 @@ programs.waybar = { - enable = true; + enable = false; settings = { mainBar = { layer = "top"; @@ -251,7 +251,7 @@ fonts.packages = [ pkgs.nerd-fonts.jetbrains-mono ]; - programs.niri.enable = true; + programs.niri.enable = false; boot.initrd.kernelModules = [ "amdgpu" ]; environment.sessionVariables = { @@ -288,17 +288,17 @@ server.port = 6742; }; services.udisks2.enable = true; # Enable gnome-disks - services.displayManager.sddm.enable = true; # Enable display manager - services.displayManager.sddm.wayland.enable = true; # Wayland + # services.displayManager.sddm.enable = true; # Enable display manager + # services.displayManager.sddm.wayland.enable = true; # Wayland services.mullvad-vpn.package = pkgs.mullvad-vpn; # arr services.resolved.enable = true; # for mullvad # programs.ssh.startAgent = true; # Enable SSH tools - programs.thunar.enable = true; # file manager + # programs.thunar.enable = true; # file manager programs.wireshark.enable = true; - virtualisation.waydroid.enable = true; # android :0 + # virtualisation.waydroid.enable = true; # android :0 nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ @@ -355,8 +355,16 @@ ]; + services.displayManager.gdm.enable = true; + services.desktopManager.gnome.enable = true; + services.gnome.core-apps.enable = true; + services.gnome.core-developer-tools.enable = false; + services.gnome.games.enable = false; + environment.gnome.excludePackages = with pkgs; [ gnome-tour gnome-user-docs ]; + + # bootloader device - boot.loader.grub.device = "/dev/sda"; + # boot.loader.grub.device = "/dev/sda"; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; From 5e807ce9d012966c4f3bdb9e05dcb5df71e214e4 Mon Sep 17 00:00:00 2001 From: Jeremy Janella Date: Thu, 14 May 2026 17:37:19 -0400 Subject: [PATCH 3/5] slack --- default-configuration.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/default-configuration.nix b/default-configuration.nix index 6f98816..b5078f2 100644 --- a/default-configuration.nix +++ b/default-configuration.nix @@ -222,6 +222,7 @@ mpv # arrr wireshark obs-studio + slack ]; }; @@ -308,6 +309,7 @@ "steam-run" "furmark" "burpsuite" + "slack" ]; # Some programs need SUID wrappers, can be configured further or are From 0c40aecab767284a13eabb2f159ee8559e08417d Mon Sep 17 00:00:00 2001 From: Jeremy Janella Date: Fri, 15 May 2026 16:55:43 -0400 Subject: [PATCH 4/5] wireguard & phone rdp --- default-configuration.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/default-configuration.nix b/default-configuration.nix index b5078f2..16c1113 100644 --- a/default-configuration.nix +++ b/default-configuration.nix @@ -187,7 +187,7 @@ users.users.jeremy = { isNormalUser = true; - extraGroups = [ "wheel" "docker" "wireshark" ]; # Enable sudo + extraGroups = [ "wheel" "docker" "wireshark" "adbusers"]; # Enable sudo shell = pkgs.bash; home = "/home/jeremy"; createHome = true; @@ -223,6 +223,9 @@ wireshark obs-studio slack + scrcpy # phone rdp + android-tools # phone rdp + wireguard-tools ]; }; From 70773fd8e4c9fd5f7da7d7058b2e7a49fde4835a Mon Sep 17 00:00:00 2001 From: Jeremy Janella Date: Sat, 16 May 2026 23:17:48 -0400 Subject: [PATCH 5/5] thinkpad config and wifi --- default-configuration.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/default-configuration.nix b/default-configuration.nix index 16c1113..69d97fd 100644 --- a/default-configuration.nix +++ b/default-configuration.nix @@ -187,7 +187,7 @@ users.users.jeremy = { isNormalUser = true; - extraGroups = [ "wheel" "docker" "wireshark" "adbusers"]; # Enable sudo + extraGroups = [ "wheel" "docker" "wireshark" "adbusers" "plugdev" ]; shell = pkgs.bash; home = "/home/jeremy"; createHome = true; @@ -226,6 +226,7 @@ scrcpy # phone rdp android-tools # phone rdp wireguard-tools + blender # drone ]; }; @@ -248,7 +249,7 @@ pavucontrol # PulseAudio Volume Control bluez # Bluetooth support bluez-tools # Bluetooth tools - + usbutils # for lsusb xwayland-satellite # xwayland support fuzzel # menu ]; @@ -368,6 +369,16 @@ environment.gnome.excludePackages = with pkgs; [ gnome-tour gnome-user-docs ]; + # udev rules for pyocd for UTAT + services.udev.extraRules = '' + SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="374e", MODE="0666", GROUP="plugdev" + SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="374b", MODE="0666", GROUP="plugdev" + SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="374f", MODE="0666", GROUP="plugdev" + SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="3753", MODE="0666", GROUP="plugdev" + ''; + + + # bootloader device # boot.loader.grub.device = "/dev/sda";