{"id":793,"date":"2025-02-12T22:54:06","date_gmt":"2025-02-12T22:54:06","guid":{"rendered":"https:\/\/www.woodcentral.com\/-\/peter\/?p=793"},"modified":"2026-06-05T09:50:14","modified_gmt":"2026-06-05T09:50:14","slug":"nixos-configuration-nix","status":"publish","type":"post","link":"https:\/\/www.woodcentral.com\/-\/peter\/nixos-configuration-nix\/","title":{"rendered":"NixOS configuration.nix"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Here&#8217;s my <a href=\"https:\/\/nixos.org\/\">NixOS<\/a> configuration for a <a href=\"https:\/\/thinkpads.com\/t61\/\">ThinkPad T61<\/a> using the <a href=\"https:\/\/lxqt-project.org\/\">LXQt desktop<\/a>:<\/p>\n\n\n\n<pre># Edit this configuration file to define what should be installed on\n# your system.  Help is available in the configuration.nix(5) man page\n# and in the NixOS manual (accessible by running \u2018nixos-help\u2019).\n\n{ config, pkgs, ... }:\n\n{\n  imports =\n    [ # Include the results of the hardware scan.\n      .\/hardware-configuration.nix\n    ];\n\n  # Bootloader.\n  boot.loader.grub.enable = true;\n  boot.loader.grub.device = \"\/dev\/sda\";\n  boot.loader.grub.useOSProber = true;\n\n  networking.hostName = \"nixos\"; # Define your hostname.\n  # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.\n\n  # Configure network proxy if necessary\n  # networking.proxy.default = \"http:\/\/user:password@proxy:port\/\";\n  # networking.proxy.noProxy = \"127.0.0.1,localhost,internal.domain\";\n\n  # Enable networking\n  networking.networkmanager.enable = true;\n\n  # Enable network manager applet\n  programs.nm-applet.enable = true;\n\n  # Set your time zone.\n  time.timeZone = \"America\/New_York\";\n\n  # Select internationalisation properties.\n  i18n.defaultLocale = \"en_US.UTF-8\";\n\n  i18n.extraLocaleSettings = {\n    LC_ADDRESS = \"en_US.UTF-8\";\n    LC_IDENTIFICATION = \"en_US.UTF-8\";\n    LC_MEASUREMENT = \"en_US.UTF-8\";\n    LC_MONETARY = \"en_US.UTF-8\";\n    LC_NAME = \"en_US.UTF-8\";\n    LC_NUMERIC = \"en_US.UTF-8\";\n    LC_PAPER = \"en_US.UTF-8\";\n    LC_TELEPHONE = \"en_US.UTF-8\";\n    LC_TIME = \"en_US.UTF-8\";\n  };\n\n  # Enable the X11 windowing system.\n  services.xserver.enable = true;\n\n  # Enable the LXQT Desktop Environment.\n  services.xserver.displayManager.lightdm.enable = true;\n  services.xserver.desktopManager.lxqt.enable = true;\n\n  # Configure keymap in X11\n  services.xserver.xkb = {\n    layout = \"us\";\n    variant = \"\";\n  };\n\n  # Enable CUPS to print documents.\n  services.printing.enable = true;\n\nservices.tlp = {\n  enable = true;\n};\n\nservices.power-profiles-daemon.enable = false;\n\nnixpkgs.overlays = [\n  (final: prev: {\n    tlp = prev.tlp.overrideAttrs (old: {\n      makeFlags = (old.makeFlags or [ ]) ++ [\n        \"TLP_ULIB=\/lib\/udev\"\n        \"TLP_NMDSP=\/lib\/NetworkManager\/dispatcher.d\"\n        \"TLP_SYSD=\/lib\/systemd\/system\"\n        \"TLP_SDSL=\/lib\/systemd\/system-sleep\"\n        \"TLP_ELOD=\/lib\/elogind\/system-sleep\"\n        \"TLP_CONFDPR=\/share\/tlp\/deprecated.conf\"\n        \"TLP_FISHCPL=\/share\/fish\/vendor_completions.d\"\n        \"TLP_ZSHCPL=\/share\/zsh\/site-functions\"\n      ];\n    });\n  })\n];\n  \n  \n  \nhardware.bluetooth.enable = true;\nhardware.bluetooth.powerOnBoot = true;\nservices.blueman.enable = true;\n#sound.mediaKeys.enable = true;\n\n  # Enable sound with pipewire.\n  hardware.pulseaudio.enable = false;\n  security.rtkit.enable = true;\n  services.pipewire = {\n    enable = true;\n    alsa.enable = true;\n    alsa.support32Bit = true;\n    pulse.enable = true;\n    # If you want to use JACK applications, uncomment this\n    #jack.enable = true;\n\n    # use the example session manager (no others are packaged yet so this is enabled by default,\n    # no need to redefine it in your config for now)\n    #media-session.enable = true;\n  };\n\n  # Enable touchpad support (enabled default in most desktopManager).\n  # services.xserver.libinput.enable = true;\n\n  # Define a user account. Don't forget to set a password with \u2018passwd\u2019.\n  users.users.user = {\n    isNormalUser = true;\n    description = \"user\";\n    extraGroups = [ \"networkmanager\" \"wheel\" ];\n    packages = with pkgs; [\n    #  thunderbird\n    ];\n  };\n\n  # Enable automatic login for the user.\n  services.xserver.displayManager.autoLogin.enable = true;\n  services.xserver.displayManager.autoLogin.user = \"user\";\n\n  # Install firefox.\n  programs.firefox.enable = true;\n\n  # Allow unfree packages\n  nixpkgs.config.allowUnfree = true;\n\n  # List packages installed in system profile. To search, run:\n  # $ nix search wget\n\n\n\n  environment.systemPackages = with pkgs; [    \n\n\tabcde\n\tabiword\n\taudacious\n\tasunder\t\n\tbrave\n\tchromium\n\tclipgrab\n\tfalkon\n\tfeatherpad\n\tffmpeg\n\tfilezilla\n\tgeany\n\tgnumeric\n\tgparted\n\thtop\n\timapsync\n\tisoimagewriter\n\tjwm\n\tkdePackages.falkon\n\tlame\n\tlibrewolf\t\n\tlxqt.qlipper\n\tnomacs\n\tnyxt\n\tpinta\n\tputty\n\tqalculate-qt\n\tqview\t\n\tranger\n\tsimplescreenrecorder\n\tthunderbird\t\n\ttldr\n\tunzip\n\tvlc\n\txfce.xfburn\n\tzim\n\tzip\n\t\t\n\tsystem-config-printer # GUI for managing printers\n\thplip # HP printer and scanner tools\n\thplipWithPlugin # HP plugin for proprietary features (if needed)\t\n\t\t\n\tlxqt.pavucontrol-qt\n\tlibsForQt5.kmix\n\tpasystray\n\tlinuxKernel.packages.linux_lqx.tp_smapi\n\ttlp\n    \t\n  ];\n\n\n\n\n  # Enable CUPS for printing support\n  #$services.printing.enable = true;\n  services.printing.drivers = [ pkgs.hplip ]; # HP driver for OfficeJet Pro 6830\n\n  # Enable Avahi for printer discovery\n  services.avahi.enable = true;\n  services.avahi.nssmdns = true; # Allows .local domain resolution\n  services.avahi.openFirewall = true; # Open firewall for Avahi\n\n  # Enable SANE for scanning support (optional)\n  hardware.sane.enable = true;\n  hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ]; # HP scanning backend\n\n  # Optional: Enable Samba for Windows printer sharing\n  services.samba.enable = true;\n  services.samba.openFirewall = true;\n\n\n\n\n  # Some programs need SUID wrappers, can be configured further or are\n  # started in user sessions.\n  # programs.mtr.enable = true;\n  # programs.gnupg.agent = {\n  #   enable = true;\n  #   enableSSHSupport = true;\n  # };\n\n  # List services that you want to enable:\n\n  # Enable the OpenSSH daemon.\n  # services.openssh.enable = true;\n\n  # Open ports in the firewall.\n  # networking.firewall.allowedTCPPorts = [ ... ];\n  # networking.firewall.allowedUDPPorts = [ ... ];\n  # Or disable the firewall altogether.\n  # networking.firewall.enable = false;\n\n  # This value determines the NixOS release from which the default\n  # settings for stateful data, like file locations and database versions\n  # on your system were taken. It\u2018s perfectly fine and recommended to leave\n  # this value at the release version of the first install of this system.\n  # Before changing this value read the documentation for this option\n  # (e.g. man configuration.nix or on https:\/\/nixos.org\/nixos\/options.html).\n  system.stateVersion = \"24.11\"; # Did you read the comment?\n\n\n}\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s my NixOS configuration for a ThinkPad T61 using the LXQt desktop: # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running \u2018nixos-help\u2019). { config, pkgs, &#8230; }: { imports = [ # &#8230; <a title=\"NixOS configuration.nix\" class=\"read-more\" href=\"https:\/\/www.woodcentral.com\/-\/peter\/nixos-configuration-nix\/\" aria-label=\"Read more about NixOS configuration.nix\">Read more<\/a><\/p>\n","protected":false},"author":7,"featured_media":806,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,2],"tags":[],"class_list":["post-793","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-technology"],"_links":{"self":[{"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/posts\/793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/comments?post=793"}],"version-history":[{"count":0,"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/posts\/793\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/media\/806"}],"wp:attachment":[{"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/media?parent=793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/categories?post=793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/tags?post=793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}