NixOS system configuration: Difference between revisions

m minor fix of typo
Rpqt (talk | contribs)
m Add quotes to URL literals
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[NixOS]] uses a declarative configuration system that allows users to manage their entire operating system setup including installed packages, system services, user accounts, hardware settings, and more through configuration files. This page serves as an overview of how to work with and manage NixOS system configurations.
[[NixOS]] uses a declarative configuration system that allows users to manage their entire operating system setup including installed packages, system services, user accounts, hardware settings, and more thorough configuration files. This page serves as an overview of how to work with and manage NixOS system configurations.


For an introduction to declarative configuration, see the [[Overview of the NixOS Linux distribution#Declarative Configuration]] and the {{NixOS Manual|name=NixOS official manual|anchor=#ch-configuration}}.
For an introduction to declarative configuration, see the [[Overview of the NixOS Linux distribution#Declarative Configuration]] and the {{NixOS Manual|name=NixOS official manual|anchor=#ch-configuration}}.
Line 70: Line 70:
<nowiki>
<nowiki>
{
{
   inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
   inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
   outputs = { self, nixpkgs }: {
   outputs = { self, nixpkgs }: {
     # replace 'joes-desktop' with your hostname here.
     # replace 'joes-desktop' with your hostname here.
Line 87: Line 87:
{{file|flake.nix|nix|<nowiki>
{{file|flake.nix|nix|<nowiki>
{
{
   inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
   inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
   inputs.home-manager.url = github:nix-community/home-manager;
   inputs.home-manager.url = "github:nix-community/home-manager";


   outputs = { self, nixpkgs, ... }@inputs: {
   outputs = { self, nixpkgs, ... }@inputs: {
Line 187: Line 187:


  inputs = {
  inputs = {
     nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
     nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
     nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
     nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
   };
   };
Line 199: Line 199:
             nixpkgs.overlays = [
             nixpkgs.overlays = [
               (final: prev: {
               (final: prev: {
                 unstable = nixpkgs-unstable.legacyPackages.${prev.system};
                 unstable = import nixpkgs-unstable {
                # use this variant if unfree packages are needed:
                  inherit (final) config;
                # unstable = import nixpkgs-unstable {
                  inherit (final.stdenv.hostPlatform) system;
                #  inherit prev;
                 };
                #  system = prev.system;
                 #  config.allowUnfree = true;
                # };
               })
               })
             ];
             ];