From 00da286651d6a098c1bdc3e327e7382911d686fc Mon Sep 17 00:00:00 2001 From: martyTF Date: Sun, 22 Feb 2026 11:21:07 +0100 Subject: [PATCH] i thinkpad therefore i am --- configuration.nix | 2 +- hosts/marty-latitude/default.nix | 1 + hosts/marty-pc/default.nix | 1 + hosts/marty-server/default.nix | 1 + hosts/marty-thinkpad/default.nix | 39 +++++++++++++ hosts/marty-thinkpad/hardware.nix | 42 ++++++++++++++ hosts/marty-thinkpad/home.nix | 96 +++++++++++++++++++++++++++++++ 7 files changed, 181 insertions(+), 1 deletion(-) create mode 100644 hosts/marty-thinkpad/default.nix create mode 100644 hosts/marty-thinkpad/hardware.nix create mode 100644 hosts/marty-thinkpad/home.nix diff --git a/configuration.nix b/configuration.nix index 162789c..8549096 100644 --- a/configuration.nix +++ b/configuration.nix @@ -32,5 +32,5 @@ # 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 = "25.11"; # Did you read the comment? + # system.stateVersion = "25.11"; # Did you read the comment? } diff --git a/hosts/marty-latitude/default.nix b/hosts/marty-latitude/default.nix index f70da1e..d0996fc 100644 --- a/hosts/marty-latitude/default.nix +++ b/hosts/marty-latitude/default.nix @@ -35,4 +35,5 @@ light.enable = true; }; services.flatpak.enable = true; +system.stateVersion = "25.11"; # Did you read the comment? } diff --git a/hosts/marty-pc/default.nix b/hosts/marty-pc/default.nix index 1a6ba06..b2b3eb4 100644 --- a/hosts/marty-pc/default.nix +++ b/hosts/marty-pc/default.nix @@ -74,4 +74,5 @@ vial ]; }; +system.stateVersion = "25.11"; # Did you read the comment? } diff --git a/hosts/marty-server/default.nix b/hosts/marty-server/default.nix index 8cf2c59..8403779 100644 --- a/hosts/marty-server/default.nix +++ b/hosts/marty-server/default.nix @@ -32,4 +32,5 @@ imports = [ ./hardware.nix ]; virtualisation.docker.enable = true; + system.stateVersion = "25.11"; # Did you read the comment? } diff --git a/hosts/marty-thinkpad/default.nix b/hosts/marty-thinkpad/default.nix new file mode 100644 index 0000000..0905ee9 --- /dev/null +++ b/hosts/marty-thinkpad/default.nix @@ -0,0 +1,39 @@ +{ + config, + lib, + pkgs, + home-manager, + inputs, + ... +}: + +{ + networking = { + hostName = "marty-thinkpad"; + }; + + home-manager = { + extraSpecialArgs = { inherit inputs; }; + useGlobalPkgs = true; + useUserPackages = true; + users = { + marty = import ./home.nix; + }; + }; + + main-user = { + userName = "marty"; + shell = pkgs.fish; + }; + + imports = [ + ./hardware.nix + # ../../modules/server/nginx.nix + ]; + + programs = { + light.enable = true; + }; + services.flatpak.enable = true; + system.stateVersion = "24.11"; # Did you read the comment? +} diff --git a/hosts/marty-thinkpad/hardware.nix b/hosts/marty-thinkpad/hardware.nix new file mode 100644 index 0000000..fb851bb --- /dev/null +++ b/hosts/marty-thinkpad/hardware.nix @@ -0,0 +1,42 @@ +# 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 = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/4920cf79-5972-4eaa-ba1a-56cac062320f"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/B7C8-039D"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/a9df5515-da5f-41fa-a371-31eec40dac73"; } + ]; + + # 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.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wwp0s29u1u6i6.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/marty-thinkpad/home.nix b/hosts/marty-thinkpad/home.nix new file mode 100644 index 0000000..269e2af --- /dev/null +++ b/hosts/marty-thinkpad/home.nix @@ -0,0 +1,96 @@ +{ + config, + pkgs, + inputs, + lib, + ... +}: + +{ + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "marty"; + home.homeDirectory = "/home/marty"; + + # This value determines the Home Manager release that your configuration is + # compatible with. This helps avoid breakage when a new Home Manager release + # introduces backwards incompatible changes. + # + # You should not change this value, even if you update Home Manager. If you do + # want to update the value, then make sure to first check the Home Manager + # release notes. + home.stateVersion = "25.11"; # Please read the comment before changing. + + # The home.packages option allows you to install Nix packages into your + # environment. + + programs.fish.enable = true; + + home.packages = with pkgs; [ + # # Adds the 'hello' command to your environment. It prints a friendly + # # "Hello, world!" when run. + # hello + + # # It is sometimes useful to fine-tune packages, for example, by applying + # # overrides. You can do that directly here, just don't forget the + # # parentheses. Maybe you want to install Nerd Fonts with a limited number of + # # fonts? + # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) + + # # You can also create simple shell scripts directly inside your + # # configuration. For example, this adds a command 'my-hello' to your + # # environment: + # (pkgs.writeShellScriptBin "my-hello" '' + # echo "Hello, ${config.home.username}!" + # '') + ]; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; + + # # You can also set the file content immediately. + # ".gradle/gradle.properties".text = '' + # org.gradle.console=verbose + # org.gradle.daemon.idletimeout=3600000 + # ''; + }; + + # Home Manager can also manage your environment variables through + # 'home.sessionVariables'. These will be explicitly sourced when using a + # shell provided by Home Manager. If you don't want to manage your shell + # through Home Manager then you have to manually source 'hm-session-vars.sh' + # located at either + # + # ~/.nix-profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # /etc/profiles/per-user/marty/etc/profile.d/hm-session-vars.sh + # + + device.type.laptop = true; + + desktop.hyprland = { + monitors = [ + "desc:AU Optronics 0x313E,1600x900@60,0x0,1" + ]; + }; + + imports = [ + inputs.walker.homeManagerModules.default + inputs.noctalia.homeModules.default + ./../../modules + + ]; + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +}