nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
6.7k stars 1.76k forks source link

nixos-manual-combined fails #254

Closed flokli closed 6 years ago

flokli commented 6 years ago

Currently, home-manager switch fails for me during creation of /nix/store/wx071hpzwxs22b382f3yrqx1v2p4ai6l-nixos-manual-combined.drv

with a lot of

element xref: validity error : IDREF attribute linkend references an unknown ID "foo"

errors:

I worked this around by setting

manual.manpages.enable = false;

in ~/.config/nixpkgs/home.nix.

`home-manager -I nixpkgs=$nixpkgs_dir switch`

``` these derivations will be built: /nix/store/wx071hpzwxs22b382f3yrqx1v2p4ai6l-nixos-manual-combined.drv /nix/store/nnnpdzk650pxs54db7cnyqxv0fc0221g-manual-olinkdb.drv /nix/store/qahlw40w6ysf5nq27af12v0gmxi8xmq6-nixos-manpages.drv /nix/store/5gy6h3sgj6nwajp72d5lkksnjahy1ljw-home-environment-manpages.drv /nix/store/gi89iw2zrw4djrc8cnhgqys56agiha15-home-manager-path.drv /nix/store/j43aqg7y35da98cr4wiyhxrvi0d9saff-activation-script.drv /nix/store/jp2sxpsx36sgwrvjif4bsiyr8vcs6nds-home-manager-generation.drv building '/nix/store/wx071hpzwxs22b382f3yrqx1v2p4ai6l-nixos-manual-combined.drv'... manual-combined.xml:2409: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.windowManager.xmonad.enable" 2405 2406 = true; 2407 = true; 2408 = true; 2409 = true; 2410 = true; 2411 = true; manual-combined.xml:1622: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.desktopManager.plasma5.enable" 1618 { config, pkgs, ... }: 1619 1620 { = true; 1621 = true; 1622 = true; 1623 } 1624 manual-combined.xml:2406: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.desktopManager.plasma5.enable" 2402 Otherwise, you can only log into a plain undecorated 2403 xterm window. Thus you should pick one or more of 2404 the following lines: 2405 2406 = true; 2407 = true; 2408 = true; manual-combined.xml:2422: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.displayManager.lightdm.enable" 2418 server) is SLiM. You can select an alternative one by picking one 2419 of the following lines: 2420 2421 = true; 2422 = true; 2423 2424 manual-combined.xml:2496: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.libinput.enable" 2492 2493 Support for Synaptics touchpads (found in many laptops such as 2494 the Dell Latitude series) can be enabled as follows: 2495 2496 = true; 2497 2498 The driver has many options (see ). For manual-combined.xml:1335: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.firewall.enable" 1331 These can be true or 1332 false, e.g. 1333 1334 1335 = true; 1336 = false; 1337 manual-combined.xml:2779: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.firewall.enable" 2775 both IPv4 and IPv6 traffic. It is enabled by default. It can be 2776 disabled as follows: 2777 2778 2779 = false; 2780 2781 manual-combined.xml:2411: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.windowManager.icewm.enable" 2407 = true; 2408 = true; 2409 = true; 2410 = true; 2411 = true; 2412 = true; 2413 manual-combined.xml:1336: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.firewall.allowPing" 1332 false, e.g. 1333 1334 1335 = true; 1336 = false; 1337 1338 manual-combined.xml:2809: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.firewall.allowPing" 2805 2806 Also of interest is 2807 2808 2809 = true; 2810 2811 manual-combined.xml:1405: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 1401 Packages collection, which is a set that can be accessed through 1402 the function argument pkgs. Typical uses: 1403 1404 1405 = 1406 [ pkgs.thunderbird 1407 pkgs.emacs manual-combined.xml:1608: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 1604 { config, pkgs, ... }: 1605 1606 { imports = [ ./vpn.nix ./kde.nix ]; 1607 = true; 1608 = [ pkgs.emacs ]; 1609 ... 1610 } manual-combined.xml:1628: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 1624 1625 1626 Note that both configuration.nix and 1627 kde.nix define the option 1628 . When multiple modules 1629 define an option, NixOS will try to merge the 1630 definitions. In the case of manual-combined.xml:1631: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 1627 kde.nix define the option 1628 . When multiple modules 1629 define an option, NixOS will try to merge the 1630 definitions. In the case of 1631 , that’s easy: the lists of 1632 packages can simply be concatenated. The value in 1633 configuration.nix is merged last, so for manual-combined.xml:1674: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 1670 input to that same function: that’s because Nix 1671 is a “lazy” language — it only computes values when they are needed. 1672 This works as long as no individual configuration value depends on 1673 itself.. For example, here is a module that adds 1674 some packages to only if 1675 is set to 1676 true somewhere else: manual-combined.xml:1681: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 1677 1678 1679 { config, pkgs, ... }: 1680 1681 { = 1682 if config. then 1683 [ pkgs.firefox manual-combined.xml:1944: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 1940 Declarative Package Management 1941 1942 With declarative package management, you specify which packages 1943 you want on your system by setting the option 1944 . For instance, adding the 1945 following line to configuration.nix enables the 1946 Mozilla Thunderbird email application: manual-combined.xml:1949: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 1945 following line to configuration.nix enables the 1946 Mozilla Thunderbird email application: 1947 1948 1949 = [ pkgs.thunderbird ]; 1950 1951 manual-combined.xml:1970: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 1966 nixos prefix allows distinguishing between 1967 different channels that you might have.) 1968 1969 To “uninstall” a package, simply remove it from 1970 and run 1971 nixos-rebuild switch. 1972 manual-combined.xml:1999: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 1995 has a dependency on GTK+ 2. If you want to build it against GTK+ 3, 1996 you can specify that as follows: 1997 1998 1999 = [ (pkgs.emacs.override { gtk = pkgs.gtk3; }) ]; 2000 2001 manual-combined.xml:2009: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 2005 gtk gets the value pkgs.gtk3, 2006 causing Emacs to depend on GTK+ 3. (The parentheses are necessary 2007 because in Nix, function application binds more weakly than list 2008 construction, so without them, 2009 would be a list with two 2010 elements.) 2011 manual-combined.xml:2022: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 2018 For instance, if you want to override the source code of Emacs, you 2019 can say: 2020 2021 2022 = [ 2023 (pkgs.emacs.overrideAttrs (oldAttrs: { 2024 name = "emacs-25.0-pre"; manual-combined.xml:2083: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 2079 manual. Finally, you add it to 2080 environment.systemPackages, e.g. 2081 2082 2083 = [ pkgs.my-package ]; 2084 2085 manual-combined.xml:2100: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 2096 GNU Hello 2097 package directly in configuration.nix: 2098 2099 2100 = 2101 let 2102 my-hello = with pkgs; stdenv.mkDerivation rec { manual-combined.xml:2116: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 2112 2113 Of course, you can also move the definition of 2114 my-hello into a separate Nix expression, e.g. 2115 2116 = [ (import ./my-hello.nix) ]; 2117 2118 where my-hello.nix contains: manual-combined.xml:2550: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-environment.systemPackages" 2546 2547 2548 Some Xfce programs are not installed automatically. 2549 To install them manually (system wide), put them into your 2550 . 2551 2552 manual-combined.xml:2661: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.openssh.enable" 2657 Secure shell (SSH) access to your machine can be enabled by 2658 setting: 2659 2660 2661 = true; 2662 2663 manual-combined.xml:2790: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.openssh.enable" 2786 = [ 80 443 ]; 2787 2788 2789 Note that TCP port 22 (ssh) is opened automatically if the SSH daemon 2790 is enabled (). UDP 2791 ports can be opened through 2792 . manual-combined.xml:3389: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.openssh.enable" 3385 root: 3386 3387 3388 # nixos-container create foo --config ' 3389 = true; 3390 users.extraUsers.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N…"]; 3391 ' manual-combined.xml:1239: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.enable" 1235 1236 1237 { config, pkgs, ... }: 1238 1239 { = true; 1240 = "alice@example.org"; 1241 = "/webroot"; manual-combined.xml:1251: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.enable" 1247 the document root. 1248 1249 Sets can be nested, and in fact dots in option names are 1250 shorthand for defining a set containing another set. For instance, 1251 defines a set named 1252 services that contains a set named 1253 httpd, which in turn contains an option definition manual-combined.xml:1607: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.enable" 1603 1604 { config, pkgs, ... }: 1605 1606 { imports = [ ./vpn.nix ./kde.nix ]; 1607 = true; 1608 = [ pkgs.emacs ]; 1609 ... manual-combined.xml:3459: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.enable" 3455 specify a new configuration on the command line: 3456 3457 3458 # nixos-container update foo --config ' 3459 = true; 3460 = "foo@example.org"; 3461 = [ 80 ]; manual-combined.xml:2804: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.firewall.allowedUDPPortRanges" 2800 ]; 2801 2802 2803 Similarly, UDP port ranges can be opened through 2804 . 2805 2806 Also of interest is manual-combined.xml:2219: element link: validity error : IDREF attribute linkend references an unknown ID "opt-users.users._name__.openssh.authorizedKeys.keys" 2215 isNormalUser = true; 2216 home = "/home/alice"; 2217 description = "Alice Foobar"; 2218 extraGroups = [ "wheel" "networkmanager" ]; 2219 openssh.authorizedKeys.keys = [ "ssh-dss AAAAB3Nza... alice@foobar" ]; 2220 }; 2221 manual-combined.xml:2674: element link: validity error : IDREF attribute linkend references an unknown ID "opt-users.users._name__.openssh.authorizedKeys.keys" 2670 a user as follows: 2671 2672 2673 2674 users.extraUsers.alice.openssh.authorizedKeys.keys = 2675 [ "ssh-dss AAAAB3NzaC1kc3MAAACBAPIkGWVEt4..." ]; 2676 manual-combined.xml:3390: element link: validity error : IDREF attribute linkend references an unknown ID "opt-users.users._name__.openssh.authorizedKeys.keys" 3386 3387 3388 # nixos-container create foo --config ' 3389 = true; 3390 users.extraUsers.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N…"]; 3391 ' 3392 manual-combined.xml:2216: element link: validity error : IDREF attribute linkend references an unknown ID "opt-users.users._name__.home" 2212 2213 2214 .alice = { 2215 isNormalUser = true; 2216 home = "/home/alice"; 2217 description = "Alice Foobar"; 2218 extraGroups = [ "wheel" "networkmanager" ]; manual-combined.xml:3584: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.nat.internalInterfaces" 3580 on the host: 3581 3582 3583 = true; 3584 = ["ve-+"]; 3585 = "eth0"; 3586 manual-combined.xml:2407: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.desktopManager.xfce.enable" 2403 xterm window. Thus you should pick one or more of 2404 the following lines: 2405 2406 = true; 2407 = true; 2408 = true; 2409 = true; manual-combined.xml:2527: element link: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.desktopManager.xfce.enable" 2523 2524 To enable the Xfce Desktop Environment, set 2525 2526 services.xserver.desktopManager = { 2527 xfce.enable = true; 2528 default = "xfce"; 2529 }; manual-combined.xml:2561: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.desktopManager.xfce.enable" 2557 To enable 2558 Thunar 2559 volume support, put 2560 2561 = true; 2562 2563 into your configuration.nix. manual-combined.xml:3583: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.nat.enable" 3579 IP address. This can be accomplished using the following configuration 3580 on the host: 3581 3582 3583 = true; 3584 = ["ve-+"]; 3585 = "eth0"; manual-combined.xml:2408: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.desktopManager.gnome3.enable" 2404 the following lines: 2405 2406 = true; 2407 = true; 2408 = true; 2409 = true; 2410 = true; manual-combined.xml:2701: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.defaultGateway" 2697 Typically you’ll also want to set a default gateway and set of name 2698 servers: 2699 2700 2701 = "192.168.1.1"; 2702 = [ "8.8.8.8" ]; 2703 manual-combined.xml:821: element link: validity error : IDREF attribute linkend references an unknown ID "opt-users.users._name__.initialHashedPassword" 817 account with sudo passwd -l root if you use 818 sudo) 819 820 821 users.extraUsers.root.initialHashedPassword = ""; 822 823 manual-combined.xml:1023: element link: validity error : IDREF attribute linkend references an unknown ID "opt-users.users._name__.initialHashedPassword" 1019 have set mutableUsers = false. Another way is to 1020 temporarily add the following to your configuration: 1021 1022 1023 users.extraUsers.your-user.initialHashedPassword = "test"; 1024 1025 manual-combined.xml:1621: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.displayManager.sddm.enable" 1617 1618 { config, pkgs, ... }: 1619 1620 { = true; 1621 = true; 1622 = true; 1623 } manual-combined.xml:2421: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.displayManager.sddm.enable" 2417 program that provides a graphical login prompt and manages the X 2418 server) is SLiM. You can select an alternative one by picking one 2419 of the following lines: 2420 2421 = true; 2422 = true; 2423 manual-combined.xml:2376: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.loader.grub.enableCryptodisk" 2372 2373 2374 Should grub be used as bootloader, and /boot is located 2375 on an encrypted partition, it is necessary to add the following grub option: 2376 = true; 2377 2378 manual-combined.xml:300: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.loader.grub.useOSProber" 296 297 298 If there are other operating systems running on the machine before 299 installing NixOS, the 300 option can be set to 301 true to automatically add them to the grub menu. 302 manual-combined.xml:2792: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.firewall.allowedUDPPorts" 2788 2789 Note that TCP port 22 (ssh) is opened automatically if the SSH daemon 2790 is enabled (). UDP 2791 ports can be opened through 2792 . 2793 2794 To open ranges of TCP ports: manual-combined.xml:2214: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-users.users" 2210 configuration.nix. For instance, the following 2211 states that a user account named alice shall exist: 2212 2213 2214 .alice = { 2215 isNormalUser = true; 2216 home = "/home/alice"; manual-combined.xml:2236: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-users.users" 2232 nixos-rebuild. 2233 2234 If you set to false, then the contents of 2235 /etc/passwd and /etc/group will be congruent to 2236 your NixOS configuration. For instance, if you remove a user from 2237 and run nixos-rebuild, the user account will cease to exist. Also, imperative commands for managing users 2238 and groups, such as useradd, are no longer available. Passwords may still be manual-combined.xml:2702: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.nameservers" 2698 servers: 2699 2700 2701 = "192.168.1.1"; 2702 = [ "8.8.8.8" ]; 2703 2704 manual-combined.xml:2624: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.networkmanager.enable" 2620 To facilitate network configuration, some desktop environments 2621 use NetworkManager. You can enable NetworkManager by setting: 2622 2623 2624 = true; 2625 2626 manual-combined.xml:2325: element link: validity error : IDREF attribute linkend references an unknown ID "opt-fileSystems._name__.fsType" 2321 topology changes (e.g. if a disk is moved to another IDE 2322 controller). 2323 2324 You can usually omit the file system type 2325 (), since mount can usually 2326 detect the type and load the necessary kernel module automatically. 2327 However, if the file system is needed at early boot (in the initial manual-combined.xml:3523: element link: validity error : IDREF attribute linkend references an unknown ID "opt-containers._name_.hostAddress" 3519 3520 3521 containers.database = { 3522 privateNetwork = true; 3523 hostAddress = "192.168.100.10"; 3524 localAddress = "192.168.100.11"; 3525 }; manual-combined.xml:2869: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.localCommands" 2865

2866 2867 Ad-Hoc Configuration 2868 2869 You can use to specify 2870 shell commands to be run at the end of 2871 network-setup.service. This is useful for doing manual-combined.xml:2876: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.localCommands" 2872 network configuration not covered by the existing NixOS modules. For 2873 instance, to statically configure an IPv6 address: 2874 2875 2876 = 2877 '' 2878 ip -6 addr add 2001:610:685:1::1/64 dev eth0 manual-combined.xml:3522: element link: validity error : IDREF attribute linkend references an unknown ID "opt-containers._name_.privateNetwork" 3518 give a container its own network as follows: 3519 3520 3521 containers.database = { 3522 privateNetwork = true; 3523 hostAddress = "192.168.100.10"; 3524 localAddress = "192.168.100.11"; manual-combined.xml:616: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.initrd.checkJournalingFS" 612 stopping your boot until you press *. 613 614 615 616 = false; 617 618 manual-combined.xml:2436: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.autorun" 2432 2433 The X server is started automatically at boot time. If you 2434 don’t want this to happen, you can set: 2435 2436 = false; 2437 2438 The X server can then be started manually: manual-combined.xml:1240: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.adminAddr" 1236 1237 { config, pkgs, ... }: 1238 1239 { = true; 1240 = "alice@example.org"; 1241 = "/webroot"; 1242 } manual-combined.xml:1646: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.adminAddr" 1642 loaded before any other kernel modules. 1643 1644 For other types of options, a merge may not be possible. For 1645 instance, if two modules define 1646 , 1647 nixos-rebuild will give an error: 1648 manual-combined.xml:1657: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.adminAddr" 1653 When that happens, it’s possible to force one definition take 1654 precedence over the others: 1655 1656 1657 = pkgs.lib.mkForce "bob@example.org"; 1658 1659 manual-combined.xml:3460: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.adminAddr" 3456 3457 3458 # nixos-container update foo --config ' 3459 = true; 3460 = "foo@example.org"; 3461 = [ 80 ]; 3462 ' manual-combined.xml:2218: element link: validity error : IDREF attribute linkend references an unknown ID "opt-users.users._name__.extraGroups" 2214 .alice = { 2215 isNormalUser = true; 2216 home = "/home/alice"; 2217 description = "Alice Foobar"; 2218 extraGroups = [ "wheel" "networkmanager" ]; 2219 openssh.authorizedKeys.keys = [ "ssh-dss AAAAB3Nza... alice@foobar" ]; 2220 }; manual-combined.xml:2634: element link: validity error : IDREF attribute linkend references an unknown ID "opt-users.users._name__.extraGroups" 2630 All users that should have permission to change network settings must 2631 belong to the networkmanager group: 2632 2633 2634 users.extraUsers.youruser.extraGroups = [ "networkmanager" ]; 2635 2636 manual-combined.xml:2897: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.kernelPackages" 2893 You can override the Linux kernel and associated packages using 2894 the option . For instance, this 2895 selects the Linux 3.10 kernel: 2896 2897 = pkgs.linuxPackages_3_10; 2898 2899 Note that this not only replaces the kernel, but also packages that manual-combined.xml:2429: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.xkbVariant" 2425 2426 You can set the keyboard layout (and optionally the layout variant): 2427 2428 = "de"; 2429 = "neo"; 2430 2431 manual-combined.xml:1172: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-system.autoUpgrade.channel" 1168 runs, see systemctl list-timers.) You can also 1169 specify a channel explicitly, e.g. 1170 1171 1172 = https://nixos.org/channels/nixos-17.03; 1173 1174 manual-combined.xml:1434: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.virtualHosts" 1430 to abstract. Take, for instance, this Apache HTTP Server configuration: 1431 1432 1433 { 1434 = 1435 [ { hostName = "example.org"; 1436 documentRoot = "/webroot"; manual-combined.xml:1466: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.virtualHosts" 1462 enableUserDir = true; 1463 }; 1464 in 1465 { 1466 = 1467 [ exampleOrgCommon 1468 (exampleOrgCommon // { manual-combined.xml:1489: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.virtualHosts" 1485 allowed. Thus, you also could have written: 1486 1487 1488 { 1489 = 1490 let exampleOrgCommon = ...; in 1491 [ exampleOrgCommon manual-combined.xml:1509: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.virtualHosts" 1505 the host name. This can be done as follows: 1506 1507 1508 { 1509 = 1510 let 1511 makeVirtualHost = name: manual-combined.xml:1536: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.virtualHosts" 1532 element in a list: 1533 1534 1535 { 1536 = 1537 let 1538 makeVirtualHost = ...; manual-combined.xml:1555: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.virtualHosts" 1551 function that takes a set as its argument, like this: 1552 1553 1554 { 1555 = 1556 let 1557 makeVirtualHost = { name, root }: manual-combined.xml:1717: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.virtualHosts" 1713 1714 nix-repl> config. 1715 "mandark" 1716 1717 nix-repl> map (x: x.hostName) config. 1718 [ "example.org" "example.gov" ] 1719 manual-combined.xml:2428: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.layout" 2424 2425 2426 You can set the keyboard layout (and optionally the layout variant): 2427 2428 = "de"; 2429 = "neo"; 2430 manual-combined.xml:2937: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.initrd.extraKernelModules" 2933 = [ "fuse" "kvm-intel" "coretemp" ]; 2934 2935 If the module is required early during the boot (e.g. to mount the 2936 root file system), you can use 2937 : 2938 2939 = [ "cifs" ]; manual-combined.xml:2939: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.initrd.extraKernelModules" 2935 If the module is required early during the boot (e.g. to mount the 2936 root file system), you can use 2937 : 2938 2939 = [ "cifs" ]; 2940 2941 This causes the specified modules and their dependencies to be added manual-combined.xml:1241: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.httpd.documentRoot" 1237 { config, pkgs, ... }: 1238 1239 { = true; 1240 = "alice@example.org"; 1241 = "/webroot"; 1242 } 1243 manual-combined.xml:1368: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-fileSystems" 1364 Sets were introduced above. They are name/value pairs 1365 enclosed in braces, as in the option definition 1366 1367 1368 ."/boot" = 1369 { device = "/dev/sda1"; 1370 fsType = "ext4"; manual-combined.xml:2311: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-fileSystems" 2307 device /dev/disk/by-label/data onto the mount 2308 point /data: 2309 2310 2311 ."/data" = 2312 { device = "/dev/disk/by-label/data"; 2313 fsType = "ext4"; manual-combined.xml:2371: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-fileSystems" 2367 configuration.nix: 2368 2369 2370 boot.initrd.luks.devices.crypted.device = "/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d"; 2371 ."/".device = "/dev/mapper/crypted"; 2372 2373 manual-combined.xml:2786: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.firewall.allowedTCPPorts" 2782 If the firewall is enabled, you can open specific TCP ports to the 2783 outside world: 2784 2785 2786 = [ 80 443 ]; 2787 2788 manual-combined.xml:3461: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.firewall.allowedTCPPorts" 3457 3458 # nixos-container update foo --config ' 3459 = true; 3460 = "foo@example.org"; 3461 = [ 80 ]; 3462 ' 3463 manual-combined.xml:2397: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.videoDrivers" 2393 driver from a set of X.org drivers (such as vesa 2394 and intel). You can also specify a driver 2395 manually, e.g. 2396 2397 = [ "r128" ]; 2398 2399 to enable X.org’s xf86-video-r128 driver. manual-combined.xml:2451: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.videoDrivers" 2447 NVIDIA provides a proprietary driver for its graphics cards that 2448 has better 3D performance than the X.org drivers. It is not enabled 2449 by default because it’s not free software. You can enable it as follows: 2450 2451 = [ "nvidia" ]; 2452 2453 Or if you have an older card, you may have to use one of the legacy drivers: manual-combined.xml:2455: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.videoDrivers" 2451 = [ "nvidia" ]; 2452 2453 Or if you have an older card, you may have to use one of the legacy drivers: 2454 2455 = [ "nvidiaLegacy340" ]; 2456 = [ "nvidiaLegacy304" ]; 2457 = [ "nvidiaLegacy173" ]; manual-combined.xml:2456: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.videoDrivers" 2452 2453 Or if you have an older card, you may have to use one of the legacy drivers: 2454 2455 = [ "nvidiaLegacy340" ]; 2456 = [ "nvidiaLegacy304" ]; 2457 = [ "nvidiaLegacy173" ]; 2458 manual-combined.xml:2457: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.videoDrivers" 2453 Or if you have an older card, you may have to use one of the legacy drivers: 2454 2455 = [ "nvidiaLegacy340" ]; 2456 = [ "nvidiaLegacy304" ]; 2457 = [ "nvidiaLegacy173" ]; 2458 2459 You may need to reboot after enabling this driver to prevent a clash manual-combined.xml:2477: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.videoDrivers" 2473 AMD provides a proprietary driver for its graphics cards that 2474 has better 3D performance than the X.org drivers. It is not enabled 2475 by default because it’s not free software. You can enable it as follows: 2476 2477 = [ "ati_unfree" ]; 2478 2479 You will need to reboot after enabling this driver to prevent a clash manual-combined.xml:2410: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.windowManager.twm.enable" 2406 = true; 2407 = true; 2408 = true; 2409 = true; 2410 = true; 2411 = true; 2412 = true; manual-combined.xml:3306: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-nix.gc.automatic" 3302 this unit automatically at certain points in time, for instance, every 3303 night at 03:15: 3304 3305 3306 = true; 3307 = "03:15"; 3308 manual-combined.xml:461: element link: validity error : IDREF attribute linkend references an unknown ID "opt-fileSystems._name__.device" 457 458 # Note: setting fileSystems is generally not 459 # necessary, since nixos-generate-config figures them out 460 # automatically in hardware-configuration.nix. 461 #fileSystems."/".device = "/dev/disk/by-label/nixos"; 462 463 # Enable the OpenSSH server. manual-combined.xml:2318: element link: validity error : IDREF attribute linkend references an unknown ID "opt-fileSystems._name__.device" 2314 }; 2315 2316 2317 Mount points are created automatically if they don’t already exist. 2318 For , it’s best to use the topology-independent 2319 device aliases in /dev/disk/by-label and 2320 /dev/disk/by-uuid, as these don’t change if the manual-combined.xml:2748: element link: validity error : IDREF attribute linkend references an unknown ID "opt-networking.interfaces._name__.ipv6.addresses" 2744 As with IPv4 networking interfaces are automatically configured via 2745 DHCPv6. You can configure an interface manually: 2746 2747 2748 networking.interfaces.eth0.ipv6.addresses = [ { 2749 address = "fe00:aa:bb:cc::2"; 2750 prefixLength = 64; manual-combined.xml:2370: element link: validity error : IDREF attribute linkend references an unknown ID "opt-boot.initrd.luks.devices._name__.device" 2366 as /, add the following to 2367 configuration.nix: 2368 2369 2370 boot.initrd.luks.devices.crypted.device = "/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d"; 2371 ."/".device = "/dev/mapper/crypted"; 2372 manual-combined.xml:2239: element link: validity error : IDREF attribute linkend references an unknown ID "opt-users.users._name__.hashedPassword" 2235 /etc/passwd and /etc/group will be congruent to 2236 your NixOS configuration. For instance, if you remove a user from 2237 and run nixos-rebuild, the user account will cease to exist. Also, imperative commands for managing users 2238 and groups, such as useradd, are no longer available. Passwords may still be 2239 assigned by setting the user's hashedPassword 2240 option. A hashed password can be generated using mkpasswd -m sha-512 2241 after installing the mkpasswd package. manual-combined.xml:2336: element link: validity error : IDREF attribute linkend references an unknown ID "opt-fileSystems._name__.options" 2332 2333 System startup will fail if any of the filesystems fails to mount, 2334 dropping you to the emergency shell. 2335 You can make a mount asynchronous and non-critical by adding 2336 options = [ "nofail" ];. 2337 2338 manual-combined.xml:350: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-users.mutableUsers" 346 347 348 349 350 To prevent the password prompt, set = false; in 351 configuration.nix, which allows unattended installation 352 necessary in automation. manual-combined.xml:2234: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-users.mutableUsers" 2230 a password. However, you can use the passwd program 2231 to set a password, which is retained across invocations of 2232 nixos-rebuild. 2233 2234 If you set to false, then the contents of 2235 /etc/passwd and /etc/group will be congruent to 2236 your NixOS configuration. For instance, if you remove a user from manual-combined.xml:1300: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.hostName" 1296 1297 Strings are enclosed in double quotes, e.g. 1298 1299 1300 = "dexter"; 1301 1302 manual-combined.xml:1714: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.hostName" 1710 1711 1712 $ nix-repl '<nixpkgs/nixos>' 1713 1714 nix-repl> config. 1715 "mandark" 1716 manual-combined.xml:2713: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.hostName" 2709 interface-name-cfg.service. 2710 The default gateway and name server configuration is performed by 2711 network-setup.service. 2712 2713 The host name is set using : 2714 2715 manual-combined.xml:2716: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.hostName" 2712 2713 The host name is set using : 2714 2715 2716 = "cartman"; 2717 2718 manual-combined.xml:2526: element link: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.desktopManager.default" 2522 2523 2524 To enable the Xfce Desktop Environment, set 2525 2526 services.xserver.desktopManager = { 2527 xfce.enable = true; 2528 default = "xfce"; manual-combined.xml:2528: element link: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.desktopManager.default" 2524 To enable the Xfce Desktop Environment, set 2525 2526 services.xserver.desktopManager = { 2527 xfce.enable = true; 2528 default = "xfce"; 2529 }; 2530 manual-combined.xml:1385: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.kernelModules" 1381 The important thing to note about lists is that list 1382 elements are separated by whitespace, like this: 1383 1384 1385 = [ "fuse" "kvm-intel" "coretemp" ]; 1386 1387 manual-combined.xml:1638: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.kernelModules" 1634 list-type options, it will appear at the end of the merged list. If 1635 you want it to appear first, you can use mkBefore: 1636 1637 1638 = mkBefore [ "kvm-intel" ]; 1639 1640 manual-combined.xml:1701: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.kernelModules" 1697 1698 $ nixos-option 1699 true 1700 1701 $ nixos-option 1702 [ "tun" "ipv6" "loop" ... ] 1703 manual-combined.xml:2931: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.kernelModules" 2927 m (to build something as a kernel module). 2928 2929 Kernel modules for hardware devices are generally loaded 2930 automatically by udev. You can force a module to 2931 be loaded via , e.g. 2932 2933 = [ "fuse" "kvm-intel" "coretemp" ]; manual-combined.xml:2933: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.kernelModules" 2929 Kernel modules for hardware devices are generally loaded 2930 automatically by udev. You can force a module to 2931 be loaded via , e.g. 2932 2933 = [ "fuse" "kvm-intel" "coretemp" ]; 2934 2935 If the module is required early during the boot (e.g. to mount the manual-combined.xml:2412: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.windowManager.i3.enable" 2408 = true; 2409 = true; 2410 = true; 2411 = true; 2412 = true; 2413 2414 manual-combined.xml:2666: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.openssh.permitRootLogin" 2662 2663 2664 By default, root logins using a password are disallowed. They can be 2665 disabled entirely by setting 2666 to 2667 "no". 2668 manual-combined.xml:2217: element link: validity error : IDREF attribute linkend references an unknown ID "opt-users.users._name__.description" 2213 2214 .alice = { 2215 isNormalUser = true; 2216 home = "/home/alice"; 2217 description = "Alice Foobar"; 2218 extraGroups = [ "wheel" "networkmanager" ]; 2219 openssh.authorizedKeys.keys = [ "ssh-dss AAAAB3Nza... alice@foobar" ]; manual-combined.xml:2733: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.enableIPv6" 2729 is used to automatically assign IPv6 addresses to all interfaces. You 2730 can disable IPv6 support globally by setting: 2731 2732 2733 = false; 2734 2735 manual-combined.xml:2829: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.wireless.enable" 2825 2826 NixOS will start wpa_supplicant for you if you enable this setting: 2827 2828 2829 = true; 2830 2831 manual-combined.xml:2256: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-users.groups" 2252 Groups can be specified similarly. The following states that a 2253 group named students shall exist: 2254 2255 2256 .students.gid = 1000; 2257 2258 manual-combined.xml:2797: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.firewall.allowedTCPPortRanges" 2793 2794 To open ranges of TCP ports: 2795 2796 2797 = [ 2798 { from = 4000; to = 4007; } 2799 { from = 8000; to = 8010; } manual-combined.xml:2691: element link: validity error : IDREF attribute linkend references an unknown ID "opt-networking.interfaces._name__.ipv4.addresses" 2687 interfaces. However, you can configure an interface manually as 2688 follows: 2689 2690 2691 networking.interfaces.eth0.ipv4.addresses = [ { 2692 address = "192.168.1.2"; 2693 prefixLength = 24; manual-combined.xml:1161: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-system.autoUpgrade.enable" 1157 You can keep a NixOS system up-to-date automatically by adding 1158 the following to configuration.nix: 1159 1160 1161 = true; 1162 1163 manual-combined.xml:3207: element link: validity error : IDREF attribute linkend references an unknown ID "opt-systemd.services._name_.serviceConfig" 3203 would get 1/1001 of the cgroup’s CPU time.) You can limit a service’s 3204 CPU share in configuration.nix: 3205 3206 3207 systemd.services.httpd.serviceConfig.CPUShares = 512; 3208 3209 manual-combined.xml:3221: element link: validity error : IDREF attribute linkend references an unknown ID "opt-systemd.services._name_.serviceConfig" 3217 configuration.nix; for instance, to limit 3218 httpd.service to 512 MiB of RAM (excluding swap): 3219 3220 3221 systemd.services.httpd.serviceConfig.MemoryLimit = "512M"; 3222 3223 manual-combined.xml:1410: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.postgresql.package" 1406 [ pkgs.thunderbird 1407 pkgs.emacs 1408 ]; 1409 1410 = pkgs.postgresql90; 1411 1412 manual-combined.xml:3504: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.postgresql.package" 3500 containers.database = 3501 { config = 3502 { config, pkgs, ... }: 3503 { = true; 3504 = pkgs.postgresql96; 3505 }; 3506 }; manual-combined.xml:2758: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.defaultGateway6" 2754 2755 For configuring a gateway, optionally with explicitly specified interface: 2756 2757 2758 = { 2759 address = "fe00::1"; 2760 interface = "enp0s3"; manual-combined.xml:1620: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.enable" 1616 1617 1618 { config, pkgs, ... }: 1619 1620 { = true; 1621 = true; 1622 = true; manual-combined.xml:1675: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.enable" 1671 is a “lazy” language — it only computes values when they are needed. 1672 This works as long as no individual configuration value depends on 1673 itself.. For example, here is a module that adds 1674 some packages to only if 1675 is set to 1676 true somewhere else: 1677 manual-combined.xml:1682: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.enable" 1678 1679 { config, pkgs, ... }: 1680 1681 { = 1682 if config. then 1683 [ pkgs.firefox 1684 pkgs.thunderbird manual-combined.xml:1698: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.enable" 1694 value of a configuration option is. The command 1695 allows you to find out: 1696 1697 1698 $ nixos-option 1699 true 1700 manual-combined.xml:2390: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.enable" 2386 2387 The X Window System (X11) provides the basis of NixOS’ graphical 2388 user interface. It can be enabled as follows: 2389 2390 = true; 2391 2392 The X server will automatically detect and use the appropriate video manual-combined.xml:749: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.loader.grub.extraEntries" 745 Ubuntu, you may want to add something like this to your 746 configuration.nix: 747 748 749 = '' 750 menuentry "Ubuntu" { 751 search --set=ubuntu --fs-uuid 3cc3e652-0c1f-4800-8451-033754f68e6e manual-combined.xml:279: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.loader.grub.device" 275 276 277 BIOS systems 278 You must set the option 279 to specify on which disk 280 the GRUB boot loader is to be installed. Without it, NixOS cannot 281 boot. manual-combined.xml:455: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.loader.grub.device" 451 # Include the results of the hardware scan. 452 ./hardware-configuration.nix 453 ]; 454 455 = "/dev/sda"; # (for BIOS systems only) 456 = true; # (for UEFI systems only) 457 manual-combined.xml:607: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.loader.grub.device" 603 Enable booting: 604 605 606 607 = "/dev/sda"; 608 609 manual-combined.xml:3503: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.postgresql.enable" 3499 3500 containers.database = 3501 { config = 3502 { config, pkgs, ... }: 3503 { = true; 3504 = pkgs.postgresql96; 3505 }; manual-combined.xml:1310: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.extraHosts" 1306 Multi-line strings can be enclosed in double 1307 single quotes, e.g. 1308 1309 1310 = 1311 '' 1312 127.0.0.2 other-localhost manual-combined.xml:3524: element link: validity error : IDREF attribute linkend references an unknown ID "opt-containers._name_.localAddress" 3520 3521 containers.database = { 3522 privateNetwork = true; 3523 hostAddress = "192.168.100.10"; 3524 localAddress = "192.168.100.11"; 3525 }; 3526 manual-combined.xml:1348: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.kernel.sysctl" 1344 1345 For example, 1346 1347 1348 ."net.ipv4.tcp_keepalive_time" = 60; 1349 1350 manual-combined.xml:2740: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.kernel.sysctl" 2736 You can disable IPv6 on a single interface using a normal sysctl (in this 2737 example, we use interface eth0): 2738 2739 2740 ."net.ipv6.conf.eth0.disable_ipv6" = true; 2741 2742 manual-combined.xml:2945: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.kernel.sysctl" 2941 This causes the specified modules and their dependencies to be added 2942 to the initial ramdisk. 2943 2944 Kernel runtime parameters can be set through 2945 , e.g. 2946 2947 ."net.ipv4.tcp_keepalive_time" = 120; manual-combined.xml:2947: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.kernel.sysctl" 2943 2944 Kernel runtime parameters can be set through 2945 , e.g. 2946 2947 ."net.ipv4.tcp_keepalive_time" = 120; 2948 2949 sets the kernel’s TCP keepalive time to 120 seconds. To see the manual-combined.xml:290: element link: validity error : IDREF attribute linkend references an unknown ID "opt-boot.loader.efi.canTouchEfiVariables" 286 nixos-generate-config should do this automatically for new 287 configurations when booted in 288 UEFI mode. 289 You may want to look at the options starting with 290 and 291 as well. 292 manual-combined.xml:2465: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-hardware.opengl.driSupport32Bit" 2461 2462 On 64-bit systems, if you want full acceleration for 32-bit 2463 programs such as Wine, you should also set the following: 2464 2465 = true; 2466 2467 manual-combined.xml:2485: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-hardware.opengl.driSupport32Bit" 2481 2482 On 64-bit systems, if you want full acceleration for 32-bit 2483 programs such as Wine, you should also set the following: 2484 2485 = true; 2486 2487 manual-combined.xml:3585: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.nat.externalInterface" 3581 3582 3583 = true; 3584 = ["ve-+"]; 3585 = "eth0"; 3586 3587 where eth0 should be replaced with the desired manual-combined.xml:2215: element link: validity error : IDREF attribute linkend references an unknown ID "opt-users.users._name__.isNormalUser" 2211 states that a user account named alice shall exist: 2212 2213 2214 .alice = { 2215 isNormalUser = true; 2216 home = "/home/alice"; 2217 description = "Alice Foobar"; manual-combined.xml:2834: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-networking.wireless.networks" 2830 2831 2832 NixOS lets you specify networks for wpa_supplicant declaratively: 2833 2834 = { 2835 echelon = { 2836 psk = "abcdefgh"; manual-combined.xml:3307: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-nix.gc.dates" 3303 night at 03:15: 3304 3305 3306 = true; 3307 = "03:15"; 3308 3309 manual-combined.xml:285: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.loader.systemd-boot.enable" 281 boot. 282 283 UEFI systems 284 You must set the option 285 to true. 286 nixos-generate-config should do this automatically for new 287 configurations when booted in manual-combined.xml:291: element link: validity error : IDREF attribute linkend references an unknown ID "opt-boot.loader.systemd-boot.enable" 287 configurations when booted in 288 UEFI mode. 289 You may want to look at the options starting with 290 and 291 as well. 292 293 manual-combined.xml:456: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-boot.loader.systemd-boot.enable" 452 ./hardware-configuration.nix 453 ]; 454 455 = "/dev/sda"; # (for BIOS systems only) 456 = true; # (for UEFI systems only) 457 458 # Note: setting fileSystems is generally not manual-combined.xml:2501: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-services.xserver.libinput.tapping" 2497 2498 The driver has many options (see ). For 2499 instance, the following disables tap-to-click behavior: 2500 2501 = false; 2502 2503 Note: the use of services.xserver.synaptics is deprecated since NixOS 17.09. manual-combined.xml fails to validate builder for '/nix/store/wx071hpzwxs22b382f3yrqx1v2p4ai6l-nixos-manual-combined.drv' failed with exit code 3 cannot build derivation '/nix/store/qahlw40w6ysf5nq27af12v0gmxi8xmq6-nixos-manpages.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/5gy6h3sgj6nwajp72d5lkksnjahy1ljw-home-environment-manpages.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/gi89iw2zrw4djrc8cnhgqys56agiha15-home-manager-path.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/jp2sxpsx36sgwrvjif4bsiyr8vcs6nds-home-manager-generation.drv': 1 dependencies couldn't be built error: build of '/nix/store/jp2sxpsx36sgwrvjif4bsiyr8vcs6nds-home-manager-generation.drv' failed ```

$nixpkgs_dir points to 84d11bd1fb89c2b6ce5e960f032e7fed86a5257d (nixpkgs master).

flokli commented 6 years ago

nix-build nixos/release.nix -A manual.x86_64-linux -I nixpkgs=$nixpkgs_dir succeeded, btw.

rycee commented 6 years ago

Hmm, I guess you are on unstable Nixpkgs? I suppose the docbook files there have changed around a bit again. I will try having a look during the weekend. Thanks for reporting!

grahamc commented 6 years ago

The change is in that the documentation now refers to IDs in the combined options.xml document, allowing cross-linking between the options in the text to the definitions of what they mean.

rycee commented 6 years ago

@grahamc Thanks for the clarification! That is a very useful feature for the documentation :+1:

@flokli The manual page should build OK now (I also added a very basic man page for home-manager)

Unfortunately the fix includes a fair amount of duplicate code from NixOS; basically the entire <nixpkgs/nixos/doc/manual/default.nix> file with some modifications. It does look possible to generalize this file somewhat though to be more "library-like" and therefore suitable for 3rd party use. I might look into this more when I have the time since it does seem like a very useful functionality for more projects.

ElvishJerricco commented 5 years ago

Unfortunately the fix includes a fair amount of duplicate code from NixOS; basically the entire <nixpkgs/nixos/doc/manual/default.nix> file with some modifications. It does look possible to generalize this file somewhat though to be more "library-like" and therefore suitable for 3rd party use. I might look into this more when I have the time since it does seem like a very useful functionality for more projects.

Yea, I'd love for a function generateManual :: Options -> Manual. I have several usecases for that. I don't think it needs to be so entwined with the Nixpkgs/NixOS internals.

nixos-discourse commented 3 years ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nixos-upgrade-or-nixos-rebuild-build-or-switch-fails-with-manual-combined-drv-failed-with-exit-code-3/11012/1