diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index c2ff4cec169f..628a42ce1f00 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -11838,6 +11838,12 @@ githubId = 3992240; name = "Elijah Rum"; }; + x3ro = { + name = "^x3ro"; + email = "nix@x3ro.dev"; + github = "x3rAx"; + githubId = 2268851; + }; xaverdh = { email = "hoe.dom@gmx.de"; github = "xaverdh"; diff --git a/nixos/doc/manual/administration/containers.chapter.md b/nixos/doc/manual/administration/containers.chapter.md new file mode 100644 index 000000000000..ea51f91f698f --- /dev/null +++ b/nixos/doc/manual/administration/containers.chapter.md @@ -0,0 +1,28 @@ +# Container Management {#ch-containers} + +NixOS allows you to easily run other NixOS instances as *containers*. +Containers are a light-weight approach to virtualisation that runs +software in the container at the same speed as in the host system. NixOS +containers share the Nix store of the host, making container creation +very efficient. + +::: {.warning} +Currently, NixOS containers are not perfectly isolated from the host +system. This means that a user with root access to the container can do +things that affect the host. So you should not give container root +access to untrusted users. +::: + +NixOS containers can be created in two ways: imperatively, using the +command `nixos-container`, and declaratively, by specifying them in your +`configuration.nix`. The declarative approach implies that containers +get upgraded along with your host system when you run `nixos-rebuild`, +which is often not what you want. By contrast, in the imperative +approach, containers are configured and updated independently from the +host system. + +```{=docbook} + + + +``` diff --git a/nixos/doc/manual/administration/containers.xml b/nixos/doc/manual/administration/containers.xml deleted file mode 100644 index 8e0e300f367b..000000000000 --- a/nixos/doc/manual/administration/containers.xml +++ /dev/null @@ -1,34 +0,0 @@ - - Container Management - - NixOS allows you to easily run other NixOS instances as - containers. Containers are a light-weight approach to - virtualisation that runs software in the container at the same speed as in - the host system. NixOS containers share the Nix store of the host, making - container creation very efficient. - - - - Currently, NixOS containers are not perfectly isolated from the host system. - This means that a user with root access to the container can do things that - affect the host. So you should not give container root access to untrusted - users. - - - - NixOS containers can be created in two ways: imperatively, using the command - nixos-container, and declaratively, by specifying them in - your configuration.nix. The declarative approach implies - that containers get upgraded along with your host system when you run - nixos-rebuild, which is often not what you want. By - contrast, in the imperative approach, containers are configured and updated - independently from the host system. - - - - - diff --git a/nixos/doc/manual/administration/running.xml b/nixos/doc/manual/administration/running.xml index 24fd864956ff..d9fcc1aee263 100644 --- a/nixos/doc/manual/administration/running.xml +++ b/nixos/doc/manual/administration/running.xml @@ -16,6 +16,6 @@ - - + + diff --git a/nixos/doc/manual/administration/troubleshooting.chapter.md b/nixos/doc/manual/administration/troubleshooting.chapter.md new file mode 100644 index 000000000000..548456eaf6d6 --- /dev/null +++ b/nixos/doc/manual/administration/troubleshooting.chapter.md @@ -0,0 +1,12 @@ +# Troubleshooting {#ch-troubleshooting} + +This chapter describes solutions to common problems you might encounter +when you manage your NixOS system. + +```{=docbook} + + + + + +``` diff --git a/nixos/doc/manual/administration/troubleshooting.xml b/nixos/doc/manual/administration/troubleshooting.xml deleted file mode 100644 index d447b537335b..000000000000 --- a/nixos/doc/manual/administration/troubleshooting.xml +++ /dev/null @@ -1,16 +0,0 @@ - - Troubleshooting - - This chapter describes solutions to common problems you might encounter when - you manage your NixOS system. - - - - - - - diff --git a/nixos/doc/manual/configuration/config-syntax.chapter.md b/nixos/doc/manual/configuration/config-syntax.chapter.md new file mode 100644 index 000000000000..56d093c0f6e8 --- /dev/null +++ b/nixos/doc/manual/configuration/config-syntax.chapter.md @@ -0,0 +1,19 @@ +# Configuration Syntax {#sec-configuration-syntax} + +The NixOS configuration file `/etc/nixos/configuration.nix` is actually +a *Nix expression*, which is the Nix package manager's purely functional +language for describing how to build packages and configurations. This +means you have all the expressive power of that language at your +disposal, including the ability to abstract over common patterns, which +is very useful when managing complex systems. The syntax and semantics +of the Nix language are fully described in the [Nix +manual](https://nixos.org/nix/manual/#chap-writing-nix-expressions), but +here we give a short overview of the most important constructs useful in +NixOS configuration files. + +```{=docbook} + + + + +``` diff --git a/nixos/doc/manual/configuration/config-syntax.xml b/nixos/doc/manual/configuration/config-syntax.xml deleted file mode 100644 index d1351ff934e5..000000000000 --- a/nixos/doc/manual/configuration/config-syntax.xml +++ /dev/null @@ -1,25 +0,0 @@ - - Configuration Syntax - - The NixOS configuration file - /etc/nixos/configuration.nix is actually a Nix - expression, which is the Nix package manager’s purely functional - language for describing how to build packages and configurations. This means - you have all the expressive power of that language at your disposal, - including the ability to abstract over common patterns, which is very useful - when managing complex systems. The syntax and semantics of the Nix language - are fully described in the - Nix - manual, but here we give a short overview of the most important - constructs useful in NixOS configuration files. - - - - - - diff --git a/nixos/doc/manual/configuration/configuration.xml b/nixos/doc/manual/configuration/configuration.xml index 2461a5de73ad..b04316cfa48e 100644 --- a/nixos/doc/manual/configuration/configuration.xml +++ b/nixos/doc/manual/configuration/configuration.xml @@ -13,19 +13,19 @@ effect after you run nixos-rebuild. - - + + - + - + - + diff --git a/nixos/doc/manual/configuration/declarative-packages.section.md b/nixos/doc/manual/configuration/declarative-packages.section.md new file mode 100644 index 000000000000..337cdf8472e4 --- /dev/null +++ b/nixos/doc/manual/configuration/declarative-packages.section.md @@ -0,0 +1,46 @@ +# Declarative Package Management {#sec-declarative-package-mgmt} + +With declarative package management, you specify which packages you want +on your system by setting the option +[](#opt-environment.systemPackages). For instance, adding the +following line to `configuration.nix` enables the Mozilla Thunderbird +email application: + +```nix +environment.systemPackages = [ pkgs.thunderbird ]; +``` + +The effect of this specification is that the Thunderbird package from +Nixpkgs will be built or downloaded as part of the system when you run +`nixos-rebuild switch`. + +::: {.note} +Some packages require additional global configuration such as D-Bus or +systemd service registration so adding them to +[](#opt-environment.systemPackages) might not be sufficient. You are +advised to check the [list of options](#ch-options) whether a NixOS +module for the package does not exist. +::: + +You can get a list of the available packages as follows: + +```ShellSession +$ nix-env -qaP '*' --description +nixos.firefox firefox-23.0 Mozilla Firefox - the browser, reloaded +... +``` + +The first column in the output is the *attribute name*, such as +`nixos.thunderbird`. + +Note: the `nixos` prefix tells us that we want to get the package from +the `nixos` channel and works only in CLI tools. In declarative +configuration use `pkgs` prefix (variable). + +To "uninstall" a package, simply remove it from +[](#opt-environment.systemPackages) and run `nixos-rebuild switch`. + +```{=docbook} + + +``` diff --git a/nixos/doc/manual/configuration/declarative-packages.xml b/nixos/doc/manual/configuration/declarative-packages.xml deleted file mode 100644 index 8d321929f3f0..000000000000 --- a/nixos/doc/manual/configuration/declarative-packages.xml +++ /dev/null @@ -1,54 +0,0 @@ -
- Declarative Package Management - - - With declarative package management, you specify which packages you want on - your system by setting the option - . For instance, adding the - following line to configuration.nix enables the Mozilla - Thunderbird email application: - - = [ pkgs.thunderbird ]; - - The effect of this specification is that the Thunderbird package from Nixpkgs - will be built or downloaded as part of the system when you run - nixos-rebuild switch. - - - - - Some packages require additional global configuration such as D-Bus or systemd service registration so adding them to might not be sufficient. You are advised to check the list of options whether a NixOS module for the package does not exist. - - - - - You can get a list of the available packages as follows: - -$ nix-env -qaP '*' --description -nixos.firefox firefox-23.0 Mozilla Firefox - the browser, reloaded -... - - The first column in the output is the attribute name, - such as nixos.thunderbird. - - - Note: the nixos prefix tells us that we want to get the - package from the nixos channel and works only in CLI tools. - - In declarative configuration use pkgs prefix (variable). - - - - To “uninstall” a package, simply remove it from - and run - nixos-rebuild switch. - - - - - -
diff --git a/nixos/doc/manual/configuration/file-systems.chapter.md b/nixos/doc/manual/configuration/file-systems.chapter.md new file mode 100644 index 000000000000..901e2e4f181b --- /dev/null +++ b/nixos/doc/manual/configuration/file-systems.chapter.md @@ -0,0 +1,42 @@ +# File Systems {#ch-file-systems} + +You can define file systems using the `fileSystems` configuration +option. For instance, the following definition causes NixOS to mount the +Ext4 file system on device `/dev/disk/by-label/data` onto the mount +point `/data`: + +```nix +fileSystems."/data" = + { device = "/dev/disk/by-label/data"; + fsType = "ext4"; + }; +``` + +This will create an entry in `/etc/fstab`, which will generate a +corresponding [systemd.mount](https://www.freedesktop.org/software/systemd/man/systemd.mount.html) +unit via [systemd-fstab-generator](https://www.freedesktop.org/software/systemd/man/systemd-fstab-generator.html). +The filesystem will be mounted automatically unless `"noauto"` is +present in [options](#opt-fileSystems._name_.options). `"noauto"` +filesystems can be mounted explicitly using `systemctl` e.g. +`systemctl start data.mount`. Mount points are created automatically if they don't +already exist. For `device`, it's best to use the topology-independent +device aliases in `/dev/disk/by-label` and `/dev/disk/by-uuid`, as these +don't change if the topology changes (e.g. if a disk is moved to another +IDE controller). + +You can usually omit the file system type (`fsType`), since `mount` can +usually detect the type and load the necessary kernel module +automatically. However, if the file system is needed at early boot (in +the initial ramdisk) and is not `ext2`, `ext3` or `ext4`, then it's best +to specify `fsType` to ensure that the kernel module is available. + +::: {.note} +System startup will fail if any of the filesystems fails to mount, +dropping you to the emergency shell. You can make a mount asynchronous +and non-critical by adding `options = [ "nofail" ];`. +::: + +```{=docbook} + + +``` diff --git a/nixos/doc/manual/configuration/file-systems.xml b/nixos/doc/manual/configuration/file-systems.xml deleted file mode 100644 index 908b5d6c4681..000000000000 --- a/nixos/doc/manual/configuration/file-systems.xml +++ /dev/null @@ -1,58 +0,0 @@ - - File Systems - - You can define file systems using the - configuration option. For instance, the following definition causes NixOS to - mount the Ext4 file system on device - /dev/disk/by-label/data onto the mount point - /data: - -."/data" = - { device = "/dev/disk/by-label/data"; - fsType = "ext4"; - }; - - This will create an entry in /etc/fstab, which will - generate a corresponding - systemd.mount - unit via - systemd-fstab-generator. - The filesystem will be mounted automatically unless - "noauto" is present in options. - "noauto" filesystems can be mounted explicitly using - systemctl e.g. systemctl start - data.mount. - Mount points are created automatically if they don’t already exist. For - , - it’s best to use the topology-independent device aliases in - /dev/disk/by-label and - /dev/disk/by-uuid, as these don’t change if the - topology changes (e.g. if a disk is moved to another IDE controller). - - - You can usually omit the file system type - (), - since mount can usually detect the type and load the - necessary kernel module automatically. However, if the file system is needed - at early boot (in the initial ramdisk) and is not ext2, - ext3 or ext4, then it’s best to - specify to ensure that the kernel module is - available. - - - - System startup will fail if any of the filesystems fails to mount, dropping - you to the emergency shell. You can make a mount asynchronous and - non-critical by adding - options = [ - "nofail" ];. - - - - - diff --git a/nixos/doc/manual/configuration/networking.chapter.md b/nixos/doc/manual/configuration/networking.chapter.md new file mode 100644 index 000000000000..529dc0610bda --- /dev/null +++ b/nixos/doc/manual/configuration/networking.chapter.md @@ -0,0 +1,16 @@ +# Networking {#sec-networking} + +This section describes how to configure networking components +on your NixOS machine. + +```{=docbook} + + + + + + + + +``` + diff --git a/nixos/doc/manual/configuration/networking.xml b/nixos/doc/manual/configuration/networking.xml deleted file mode 100644 index 5dd0278569b9..000000000000 --- a/nixos/doc/manual/configuration/networking.xml +++ /dev/null @@ -1,20 +0,0 @@ - - Networking - - This section describes how to configure networking components on your NixOS - machine. - - - - - - - - - - - diff --git a/nixos/doc/manual/configuration/package-mgmt.chapter.md b/nixos/doc/manual/configuration/package-mgmt.chapter.md new file mode 100644 index 000000000000..a6c414be59a9 --- /dev/null +++ b/nixos/doc/manual/configuration/package-mgmt.chapter.md @@ -0,0 +1,18 @@ +# Package Management {#sec-package-management} + +This section describes how to add additional packages to your system. +NixOS has two distinct styles of package management: + +- *Declarative*, where you declare what packages you want in your + `configuration.nix`. Every time you run `nixos-rebuild`, NixOS will + ensure that you get a consistent set of binaries corresponding to + your specification. + +- *Ad hoc*, where you install, upgrade and uninstall packages via the + `nix-env` command. This style allows mixing packages from different + Nixpkgs versions. It's the only choice for non-root users. + +```{=docbook} + + +``` diff --git a/nixos/doc/manual/configuration/package-mgmt.xml b/nixos/doc/manual/configuration/package-mgmt.xml deleted file mode 100644 index 2f9395d26fa8..000000000000 --- a/nixos/doc/manual/configuration/package-mgmt.xml +++ /dev/null @@ -1,31 +0,0 @@ - - Package Management - - This section describes how to add additional packages to your system. NixOS - has two distinct styles of package management: - - - - Declarative, where you declare what packages you want - in your configuration.nix. Every time you run - nixos-rebuild, NixOS will ensure that you get a - consistent set of binaries corresponding to your specification. - - - - - Ad hoc, where you install, upgrade and uninstall - packages via the nix-env command. This style allows - mixing packages from different Nixpkgs versions. It’s the only choice - for non-root users. - - - - - - - diff --git a/nixos/doc/manual/configuration/profiles.chapter.md b/nixos/doc/manual/configuration/profiles.chapter.md new file mode 100644 index 000000000000..b4ae1b7d3faa --- /dev/null +++ b/nixos/doc/manual/configuration/profiles.chapter.md @@ -0,0 +1,34 @@ +# Profiles {#ch-profiles} + +In some cases, it may be desirable to take advantage of commonly-used, +predefined configurations provided by nixpkgs, but different from those +that come as default. This is a role fulfilled by NixOS\'s Profiles, +which come as files living in ``. That +is to say, expected usage is to add them to the imports list of your +`/etc/configuration.nix` as such: + +```nix +imports = [ + +]; +``` + +Even if some of these profiles seem only useful in the context of +install media, many are actually intended to be used in real installs. + +What follows is a brief explanation on the purpose and use-case for each +profile. Detailing each option configured by each one is out of scope. + +```{=docbook} + + + + + + + + + + + +``` diff --git a/nixos/doc/manual/configuration/profiles.xml b/nixos/doc/manual/configuration/profiles.xml deleted file mode 100644 index 6994c7e31705..000000000000 --- a/nixos/doc/manual/configuration/profiles.xml +++ /dev/null @@ -1,39 +0,0 @@ - - Profiles - - In some cases, it may be desirable to take advantage of commonly-used, - predefined configurations provided by nixpkgs, but different from those that - come as default. This is a role fulfilled by NixOS's Profiles, which come as - files living in <nixpkgs/nixos/modules/profiles>. - That is to say, expected usage is to add them to the imports list of your - /etc/configuration.nix as such: - - - imports = [ - <nixpkgs/nixos/modules/profiles/profile-name.nix> - ]; - - - Even if some of these profiles seem only useful in the context of install - media, many are actually intended to be used in real installs. - - - What follows is a brief explanation on the purpose and use-case for each - profile. Detailing each option configured by each one is out of scope. - - - - - - - - - - - - - diff --git a/nixos/doc/manual/development/development.xml b/nixos/doc/manual/development/development.xml index 670a391e3801..0b2ad60a878b 100644 --- a/nixos/doc/manual/development/development.xml +++ b/nixos/doc/manual/development/development.xml @@ -10,10 +10,10 @@ - + - + diff --git a/nixos/doc/manual/development/nixos-tests.chapter.md b/nixos/doc/manual/development/nixos-tests.chapter.md new file mode 100644 index 000000000000..2a4fdddeaa66 --- /dev/null +++ b/nixos/doc/manual/development/nixos-tests.chapter.md @@ -0,0 +1,13 @@ +# NixOS Tests {#sec-nixos-tests} + +When you add some feature to NixOS, you should write a test for it. +NixOS tests are kept in the directory `nixos/tests`, and are executed +(using Nix) by a testing framework that automatically starts one or more +virtual machines containing the NixOS system(s) required for the test. + +```{=docbook} + + + + +``` diff --git a/nixos/doc/manual/development/nixos-tests.xml b/nixos/doc/manual/development/nixos-tests.xml deleted file mode 100644 index 67dc09fc715f..000000000000 --- a/nixos/doc/manual/development/nixos-tests.xml +++ /dev/null @@ -1,20 +0,0 @@ - - NixOS Tests - - When you add some feature to NixOS, you should write a test for it. NixOS - tests are kept in the directory - nixos/tests, - and are executed (using Nix) by a testing framework that automatically starts - one or more virtual machines containing the NixOS system(s) required for the - test. - - - - - - diff --git a/nixos/doc/manual/development/writing-modules.chapter.md b/nixos/doc/manual/development/writing-modules.chapter.md new file mode 100644 index 000000000000..2e3c6b34f1f5 --- /dev/null +++ b/nixos/doc/manual/development/writing-modules.chapter.md @@ -0,0 +1,166 @@ +# Writing NixOS Modules {#sec-writing-modules} + +NixOS has a modular system for declarative configuration. This system +combines multiple *modules* to produce the full system configuration. +One of the modules that constitute the configuration is +`/etc/nixos/configuration.nix`. Most of the others live in the +[`nixos/modules`](https://github.com/NixOS/nixpkgs/tree/master/nixos/modules) +subdirectory of the Nixpkgs tree. + +Each NixOS module is a file that handles one logical aspect of the +configuration, such as a specific kind of hardware, a service, or +network settings. A module configuration does not have to handle +everything from scratch; it can use the functionality provided by other +modules for its implementation. Thus a module can *declare* options that +can be used by other modules, and conversely can *define* options +provided by other modules in its own implementation. For example, the +module +[`pam.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/security/pam.nix) +declares the option `security.pam.services` that allows other modules (e.g. +[`sshd.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/networking/ssh/sshd.nix)) +to define PAM services; and it defines the option `environment.etc` (declared by +[`etc.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/etc/etc.nix)) +to cause files to be created in `/etc/pam.d`. + +In [](#sec-configuration-syntax), we saw the following structure of +NixOS modules: + +```nix +{ config, pkgs, ... }: + +{ option definitions +} +``` + +This is actually an *abbreviated* form of module that only defines +options, but does not declare any. The structure of full NixOS modules +is shown in [Example: Structure of NixOS Modules](#ex-module-syntax). + +::: {#ex-module-syntax .example} +::: {.title} +**Example: Structure of NixOS Modules** +::: +```nix +{ config, pkgs, ... }: + +{ + imports = + [ paths of other modules + ]; + + options = { + option declarations + }; + + config = { + option definitions + }; +} +``` +::: + +The meaning of each part is as follows. + +- The first line makes the current Nix expression a function. The variable + `pkgs` contains Nixpkgs (by default, it takes the `nixpkgs` entry of + `NIX_PATH`, see the [Nix manual](https://nixos.org/manual/nix/stable/#sec-common-env) + for further details), while `config` contains the full system + configuration. This line can be omitted if there is no reference to + `pkgs` and `config` inside the module. + +- This `imports` list enumerates the paths to other NixOS modules that + should be included in the evaluation of the system configuration. A + default set of modules is defined in the file `modules/module-list.nix`. + These don\'t need to be added in the import list. + +- The attribute `options` is a nested set of *option declarations* + (described below). + +- The attribute `config` is a nested set of *option definitions* (also + described below). + +[Example: NixOS Module for the "locate" Service](#locate-example) +shows a module that handles the regular update of the "locate" database, +an index of all files in the file system. This module declares two +options that can be defined by other modules (typically the user's +`configuration.nix`): `services.locate.enable` (whether the database should +be updated) and `services.locate.interval` (when the update should be done). +It implements its functionality by defining two options declared by other +modules: `systemd.services` (the set of all systemd services) and +`systemd.timers` (the list of commands to be executed periodically by +`systemd`). + +::: {#locate-example .example} +::: {.title} +**Example: NixOS Module for the "locate" Service** +::: +```nix +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.locate; +in { + options.services.locate = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + If enabled, NixOS will periodically update the database of + files used by the locate command. + ''; + }; + + interval = mkOption { + type = types.str; + default = "02:15"; + example = "hourly"; + description = '' + Update the locate database at this interval. Updates by + default at 2:15 AM every day. + + The format is described in + systemd.time(7). + ''; + }; + + # Other options omitted for documentation + }; + + config = { + systemd.services.update-locatedb = + { description = "Update Locate Database"; + path = [ pkgs.su ]; + script = + '' + mkdir -m 0755 -p $(dirname ${toString cfg.output}) + exec updatedb \ + --localuser=${cfg.localuser} \ + ${optionalString (!cfg.includeStore) "--prunepaths='/nix/store'"} \ + --output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags} + ''; + }; + + systemd.timers.update-locatedb = mkIf cfg.enable + { description = "Update timer for locate database"; + partOf = [ "update-locatedb.service" ]; + wantedBy = [ "timers.target" ]; + timerConfig.OnCalendar = cfg.interval; + }; + }; +} +``` +::: + +```{=docbook} + + + + + + + + + +``` diff --git a/nixos/doc/manual/development/writing-modules.xml b/nixos/doc/manual/development/writing-modules.xml deleted file mode 100644 index 167976247091..000000000000 --- a/nixos/doc/manual/development/writing-modules.xml +++ /dev/null @@ -1,191 +0,0 @@ - - Writing NixOS Modules - - NixOS has a modular system for declarative configuration. This system - combines multiple modules to produce the full system - configuration. One of the modules that constitute the configuration is - /etc/nixos/configuration.nix. Most of the others live in - the - nixos/modules - subdirectory of the Nixpkgs tree. - - - Each NixOS module is a file that handles one logical aspect of the - configuration, such as a specific kind of hardware, a service, or network - settings. A module configuration does not have to handle everything from - scratch; it can use the functionality provided by other modules for its - implementation. Thus a module can declare options that - can be used by other modules, and conversely can define - options provided by other modules in its own implementation. For example, the - module - pam.nix - declares the option that allows other - modules (e.g. - sshd.nix) - to define PAM services; and it defines the option - (declared by - etc.nix) - to cause files to be created in /etc/pam.d. - - - In , we saw the following structure - of NixOS modules: - -{ config, pkgs, ... }: - -{ option definitions -} - - This is actually an abbreviated form of module that only - defines options, but does not declare any. The structure of full NixOS - modules is shown in . - - - Structure of NixOS Modules - -{ config, pkgs, ... }: - -{ - imports = - [ paths of other modules - ]; - - options = { - option declarations - }; - - config = { - option definitions - }; -} - - - The meaning of each part is as follows. - - - - This line makes the current Nix expression a function. The variable - pkgs contains Nixpkgs (by default, it takes the - nixpkgs entry of NIX_PATH, see the Nix - manual for further details), while config - contains the full system configuration. This line can be omitted if there - is no reference to pkgs and config - inside the module. - - - - - This list enumerates the paths to other NixOS modules that should be - included in the evaluation of the system configuration. A default set of - modules is defined in the file - modules/module-list.nix. These don't need to be added - in the import list. - - - - - The attribute options is a nested set of - option declarations (described below). - - - - - The attribute config is a nested set of - option definitions (also described below). - - - - - - shows a module that handles the regular - update of the “locate” database, an index of all files in the file - system. This module declares two options that can be defined by other modules - (typically the user’s configuration.nix): - (whether the database should be - updated) and (when the update - should be done). It implements its functionality by defining two options - declared by other modules: (the set of all - systemd services) and (the list of commands - to be executed periodically by systemd). - - - NixOS Module for the “locate” Service - -{ config, lib, pkgs, ... }: - -with lib; - -let - cfg = config.services.locate; -in { - options.services.locate = { - enable = mkOption { - type = types.bool; - default = false; - description = '' - If enabled, NixOS will periodically update the database of - files used by the locate command. - ''; - }; - - interval = mkOption { - type = types.str; - default = "02:15"; - example = "hourly"; - description = '' - Update the locate database at this interval. Updates by - default at 2:15 AM every day. - - The format is described in - systemd.time - 7. - ''; - }; - - # Other options omitted for documentation - }; - - config = { - systemd.services.update-locatedb = - { description = "Update Locate Database"; - path = [ pkgs.su ]; - script = - '' - mkdir -m 0755 -p $(dirname ${toString cfg.output}) - exec updatedb \ - --localuser=${cfg.localuser} \ - ${optionalString (!cfg.includeStore) "--prunepaths='/nix/store'"} \ - --output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags} - ''; - }; - - systemd.timers.update-locatedb = mkIf cfg.enable - { description = "Update timer for locate database"; - partOf = [ "update-locatedb.service" ]; - wantedBy = [ "timers.target" ]; - timerConfig.OnCalendar = cfg.interval; - }; - }; -} - - - - - - - - - - - - diff --git a/nixos/doc/manual/from_md/administration/containers.chapter.xml b/nixos/doc/manual/from_md/administration/containers.chapter.xml new file mode 100644 index 000000000000..afbd5b35aaa5 --- /dev/null +++ b/nixos/doc/manual/from_md/administration/containers.chapter.xml @@ -0,0 +1,31 @@ + + Container Management + + NixOS allows you to easily run other NixOS instances as + containers. Containers are a light-weight + approach to virtualisation that runs software in the container at + the same speed as in the host system. NixOS containers share the Nix + store of the host, making container creation very efficient. + + + + Currently, NixOS containers are not perfectly isolated from the + host system. This means that a user with root access to the + container can do things that affect the host. So you should not + give container root access to untrusted users. + + + + NixOS containers can be created in two ways: imperatively, using the + command nixos-container, and declaratively, by + specifying them in your configuration.nix. The + declarative approach implies that containers get upgraded along with + your host system when you run nixos-rebuild, + which is often not what you want. By contrast, in the imperative + approach, containers are configured and updated independently from + the host system. + + + + + diff --git a/nixos/doc/manual/from_md/administration/troubleshooting.chapter.xml b/nixos/doc/manual/from_md/administration/troubleshooting.chapter.xml new file mode 100644 index 000000000000..8bbb8a1fe729 --- /dev/null +++ b/nixos/doc/manual/from_md/administration/troubleshooting.chapter.xml @@ -0,0 +1,12 @@ + + Troubleshooting + + This chapter describes solutions to common problems you might + encounter when you manage your NixOS system. + + + + + + + diff --git a/nixos/doc/manual/from_md/configuration/config-syntax.chapter.xml b/nixos/doc/manual/from_md/configuration/config-syntax.chapter.xml new file mode 100644 index 000000000000..01446e53e38f --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/config-syntax.chapter.xml @@ -0,0 +1,21 @@ + + Configuration Syntax + + The NixOS configuration file + /etc/nixos/configuration.nix is actually a + Nix expression, which is the Nix package + manager’s purely functional language for describing how to build + packages and configurations. This means you have all the expressive + power of that language at your disposal, including the ability to + abstract over common patterns, which is very useful when managing + complex systems. The syntax and semantics of the Nix language are + fully described in the + Nix + manual, but here we give a short overview of the most + important constructs useful in NixOS configuration files. + + + + + + diff --git a/nixos/doc/manual/from_md/configuration/declarative-packages.section.xml b/nixos/doc/manual/from_md/configuration/declarative-packages.section.xml new file mode 100644 index 000000000000..da31f18d9233 --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/declarative-packages.section.xml @@ -0,0 +1,53 @@ +
+ Declarative Package Management + + With declarative package management, you specify which packages you + want on your system by setting the option + . For instance, + adding the following line to configuration.nix + enables the Mozilla Thunderbird email application: + + +environment.systemPackages = [ pkgs.thunderbird ]; + + + The effect of this specification is that the Thunderbird package + from Nixpkgs will be built or downloaded as part of the system when + you run nixos-rebuild switch. + + + + Some packages require additional global configuration such as + D-Bus or systemd service registration so adding them to + might not be + sufficient. You are advised to check the + list of options whether a NixOS + module for the package does not exist. + + + + You can get a list of the available packages as follows: + + +$ nix-env -qaP '*' --description +nixos.firefox firefox-23.0 Mozilla Firefox - the browser, reloaded +... + + + The first column in the output is the attribute + name, such as nixos.thunderbird. + + + Note: the nixos prefix tells us that we want to + get the package from the nixos channel and works + only in CLI tools. In declarative configuration use + pkgs prefix (variable). + + + To uninstall a package, simply remove it from + and run + nixos-rebuild switch. + + + +
diff --git a/nixos/doc/manual/from_md/configuration/file-systems.chapter.xml b/nixos/doc/manual/from_md/configuration/file-systems.chapter.xml new file mode 100644 index 000000000000..71441d8b4a5b --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/file-systems.chapter.xml @@ -0,0 +1,55 @@ + + File Systems + + You can define file systems using the fileSystems + configuration option. For instance, the following definition causes + NixOS to mount the Ext4 file system on device + /dev/disk/by-label/data onto the mount point + /data: + + +fileSystems."/data" = + { device = "/dev/disk/by-label/data"; + fsType = "ext4"; + }; + + + This will create an entry in /etc/fstab, which + will generate a corresponding + systemd.mount + unit via + systemd-fstab-generator. + The filesystem will be mounted automatically unless + "noauto" is present in + options. + "noauto" filesystems can be mounted + explicitly using systemctl e.g. + systemctl start data.mount. Mount points are + created automatically if they don’t already exist. For + device, it’s best to use the topology-independent + device aliases in /dev/disk/by-label and + /dev/disk/by-uuid, as these don’t change if the + topology changes (e.g. if a disk is moved to another IDE + controller). + + + You can usually omit the file system type + (fsType), since mount can + usually detect the type and load the necessary kernel module + automatically. However, if the file system is needed at early boot + (in the initial ramdisk) and is not ext2, + ext3 or ext4, then it’s best + to specify fsType to ensure that the kernel + module is available. + + + + System startup will fail if any of the filesystems fails to mount, + dropping you to the emergency shell. You can make a mount + asynchronous and non-critical by adding + options = [ "nofail" ];. + + + + + diff --git a/nixos/doc/manual/from_md/configuration/networking.chapter.xml b/nixos/doc/manual/from_md/configuration/networking.chapter.xml new file mode 100644 index 000000000000..2ed86ea3b589 --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/networking.chapter.xml @@ -0,0 +1,15 @@ + + Networking + + This section describes how to configure networking components on + your NixOS machine. + + + + + + + + + + diff --git a/nixos/doc/manual/from_md/configuration/package-mgmt.chapter.xml b/nixos/doc/manual/from_md/configuration/package-mgmt.chapter.xml new file mode 100644 index 000000000000..d3727edbe08d --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/package-mgmt.chapter.xml @@ -0,0 +1,28 @@ + + Package Management + + This section describes how to add additional packages to your + system. NixOS has two distinct styles of package management: + + + + + Declarative, where you declare what + packages you want in your configuration.nix. + Every time you run nixos-rebuild, NixOS will + ensure that you get a consistent set of binaries corresponding + to your specification. + + + + + Ad hoc, where you install, upgrade and + uninstall packages via the nix-env command. + This style allows mixing packages from different Nixpkgs + versions. It’s the only choice for non-root users. + + + + + + diff --git a/nixos/doc/manual/from_md/configuration/profiles.chapter.xml b/nixos/doc/manual/from_md/configuration/profiles.chapter.xml new file mode 100644 index 000000000000..6f5fc130c6a0 --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/profiles.chapter.xml @@ -0,0 +1,38 @@ + + Profiles + + In some cases, it may be desirable to take advantage of + commonly-used, predefined configurations provided by nixpkgs, but + different from those that come as default. This is a role fulfilled + by NixOS's Profiles, which come as files living in + <nixpkgs/nixos/modules/profiles>. That is + to say, expected usage is to add them to the imports list of your + /etc/configuration.nix as such: + + +imports = [ + <nixpkgs/nixos/modules/profiles/profile-name.nix> +]; + + + Even if some of these profiles seem only useful in the context of + install media, many are actually intended to be used in real + installs. + + + What follows is a brief explanation on the purpose and use-case for + each profile. Detailing each option configured by each one is out of + scope. + + + + + + + + + + + + + diff --git a/nixos/doc/manual/from_md/development/nixos-tests.chapter.xml b/nixos/doc/manual/from_md/development/nixos-tests.chapter.xml new file mode 100644 index 000000000000..b9ff2269676c --- /dev/null +++ b/nixos/doc/manual/from_md/development/nixos-tests.chapter.xml @@ -0,0 +1,14 @@ + + NixOS Tests + + When you add some feature to NixOS, you should write a test for it. + NixOS tests are kept in the directory + nixos/tests, and are executed (using Nix) by a + testing framework that automatically starts one or more virtual + machines containing the NixOS system(s) required for the test. + + + + + + diff --git a/nixos/doc/manual/from_md/development/writing-modules.chapter.xml b/nixos/doc/manual/from_md/development/writing-modules.chapter.xml new file mode 100644 index 000000000000..e33c24f4f12c --- /dev/null +++ b/nixos/doc/manual/from_md/development/writing-modules.chapter.xml @@ -0,0 +1,196 @@ + + Writing NixOS Modules + + NixOS has a modular system for declarative configuration. This + system combines multiple modules to produce the + full system configuration. One of the modules that constitute the + configuration is /etc/nixos/configuration.nix. + Most of the others live in the + nixos/modules + subdirectory of the Nixpkgs tree. + + + Each NixOS module is a file that handles one logical aspect of the + configuration, such as a specific kind of hardware, a service, or + network settings. A module configuration does not have to handle + everything from scratch; it can use the functionality provided by + other modules for its implementation. Thus a module can + declare options that can be used by other + modules, and conversely can define options + provided by other modules in its own implementation. For example, + the module + pam.nix + declares the option security.pam.services that + allows other modules (e.g. + sshd.nix) + to define PAM services; and it defines the option + environment.etc (declared by + etc.nix) + to cause files to be created in /etc/pam.d. + + + In , we saw the following + structure of NixOS modules: + + +{ config, pkgs, ... }: + +{ option definitions +} + + + This is actually an abbreviated form of module + that only defines options, but does not declare any. The structure + of full NixOS modules is shown in + Example: Structure of NixOS + Modules. + + + + Example: Structure of NixOS + Modules + + +{ config, pkgs, ... }: + +{ + imports = + [ paths of other modules + ]; + + options = { + option declarations + }; + + config = { + option definitions + }; +} + + + The meaning of each part is as follows. + + + + + The first line makes the current Nix expression a function. The + variable pkgs contains Nixpkgs (by default, + it takes the nixpkgs entry of + NIX_PATH, see the + Nix + manual for further details), while + config contains the full system + configuration. This line can be omitted if there is no reference + to pkgs and config inside + the module. + + + + + This imports list enumerates the paths to + other NixOS modules that should be included in the evaluation of + the system configuration. A default set of modules is defined in + the file modules/module-list.nix. These don't + need to be added in the import list. + + + + + The attribute options is a nested set of + option declarations (described below). + + + + + The attribute config is a nested set of + option definitions (also described below). + + + + + Example: NixOS Module for the + locate Service shows a module that handles the + regular update of the locate database, an index of + all files in the file system. This module declares two options that + can be defined by other modules (typically the user’s + configuration.nix): + services.locate.enable (whether the database + should be updated) and services.locate.interval + (when the update should be done). It implements its functionality by + defining two options declared by other modules: + systemd.services (the set of all systemd + services) and systemd.timers (the list of + commands to be executed periodically by systemd). + + + + Example: NixOS Module for the + locate Service + + +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.locate; +in { + options.services.locate = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + If enabled, NixOS will periodically update the database of + files used by the locate command. + ''; + }; + + interval = mkOption { + type = types.str; + default = "02:15"; + example = "hourly"; + description = '' + Update the locate database at this interval. Updates by + default at 2:15 AM every day. + + The format is described in + systemd.time(7). + ''; + }; + + # Other options omitted for documentation + }; + + config = { + systemd.services.update-locatedb = + { description = "Update Locate Database"; + path = [ pkgs.su ]; + script = + '' + mkdir -m 0755 -p $(dirname ${toString cfg.output}) + exec updatedb \ + --localuser=${cfg.localuser} \ + ${optionalString (!cfg.includeStore) "--prunepaths='/nix/store'"} \ + --output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags} + ''; + }; + + systemd.timers.update-locatedb = mkIf cfg.enable + { description = "Update timer for locate database"; + partOf = [ "update-locatedb.service" ]; + wantedBy = [ "timers.target" ]; + timerConfig.OnCalendar = cfg.interval; + }; + }; +} + + + + + + + + + + + diff --git a/nixos/doc/manual/from_md/installation/installing.chapter.xml b/nixos/doc/manual/from_md/installation/installing.chapter.xml new file mode 100644 index 000000000000..91ab71682977 --- /dev/null +++ b/nixos/doc/manual/from_md/installation/installing.chapter.xml @@ -0,0 +1,642 @@ + + Installing NixOS +
+ Booting the system + + NixOS can be installed on BIOS or UEFI systems. The procedure for + a UEFI installation is by and large the same as a BIOS + installation. The differences are mentioned in the steps that + follow. + + + The installation media can be burned to a CD, or now more + commonly, burned to a USB drive (see + ). + + + The installation media contains a basic NixOS installation. When + it’s finished booting, it should have detected most of your + hardware. + + + The NixOS manual is available by running + nixos-help. + + + You are logged-in automatically as nixos. The + nixos user account has an empty password so you + can use sudo without a password. + + + If you downloaded the graphical ISO image, you can run + systemctl start display-manager to start the + desktop environment. If you want to continue on the terminal, you + can use loadkeys to switch to your preferred + keyboard layout. (We even provide neo2 via + loadkeys de neo!) + + + If the text is too small to be legible, try + setfont ter-v32n to increase the font size. + + + To install over a serial port connect with + 115200n8 (e.g. + picocom -b 115200 /dev/ttyUSB0). When the + bootloader lists boot entries, select the serial console boot + entry. + +
+ Networking in the installer + + The boot process should have brought up networking (check + ip a). Networking is necessary for the + installer, since it will download lots of stuff (such as source + tarballs or Nixpkgs channel binaries). It’s best if you have a + DHCP server on your network. Otherwise configure networking + manually using ifconfig. + + + On the graphical installer, you can configure the network, wifi + included, through NetworkManager. Using the + nmtui program, you can do so even in a + non-graphical session. If you prefer to configure the network + manually, disable NetworkManager with + systemctl stop NetworkManager. + + + On the minimal installer, NetworkManager is not available, so + configuration must be perfomed manually. To configure the wifi, + first start wpa_supplicant with + sudo systemctl start wpa_supplicant, then run + wpa_cli. For most home networks, you need to + type in the following commands: + + +> add_network +0 +> set_network 0 ssid "myhomenetwork" +OK +> set_network 0 psk "mypassword" +OK +> set_network 0 key_mgmt WPA-PSK +OK +> enable_network 0 +OK + + + For enterprise networks, for example + eduroam, instead do: + + +> add_network +0 +> set_network 0 ssid "eduroam" +OK +> set_network 0 identity "myname@example.com" +OK +> set_network 0 password "mypassword" +OK +> set_network 0 key_mgmt WPA-EAP +OK +> enable_network 0 +OK + + + When successfully connected, you should see a line such as this + one + + +<3>CTRL-EVENT-CONNECTED - Connection to 32:85:ab:ef:24:5c completed [id=0 id_str=] + + + you can now leave wpa_cli by typing + quit. + + + If you would like to continue the installation from a different + machine you can use activated SSH daemon. You need to copy your + ssh key to either + /home/nixos/.ssh/authorized_keys or + /root/.ssh/authorized_keys (Tip: For + installers with a modifiable filesystem such as the sd-card + installer image a key can be manually placed by mounting the + image on a different machine). Alternatively you must set a + password for either root or + nixos with passwd to be + able to login. + +
+
+
+ Partitioning and formatting + + The NixOS installer doesn’t do any partitioning or formatting, so + you need to do that yourself. + + + The NixOS installer ships with multiple partitioning tools. The + examples below use parted, but also provides + fdisk, gdisk, + cfdisk, and cgdisk. + + + The recommended partition scheme differs depending if the computer + uses Legacy Boot or + UEFI. + +
+ UEFI (GPT) + + Here's an example partition scheme for UEFI, using + /dev/sda as the device. + + + + You can safely ignore parted's + informational message about needing to update /etc/fstab. + + + + + + Create a GPT partition table. + + +# parted /dev/sda -- mklabel gpt + + + + + Add the root partition. This will fill + the disk except for the end part, where the swap will live, + and the space left in front (512MiB) which will be used by + the boot partition. + + +# parted /dev/sda -- mkpart primary 512MiB -8GiB + + + + + Next, add a swap partition. The size + required will vary according to needs, here a 8GiB one is + created. + + +# parted /dev/sda -- mkpart primary linux-swap -8GiB 100% + + + + The swap partition size rules are no different than for + other Linux distributions. + + + + + + Finally, the boot partition. NixOS by + default uses the ESP (EFI system partition) as its + /boot partition. It uses the initially + reserved 512MiB at the start of the disk. + + +# parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB +# parted /dev/sda -- set 3 esp on + + + + + Once complete, you can follow with + . + +
+
+ Legacy Boot (MBR) + + Here's an example partition scheme for Legacy Boot, using + /dev/sda as the device. + + + + You can safely ignore parted's + informational message about needing to update /etc/fstab. + + + + + + Create a MBR partition table. + + +# parted /dev/sda -- mklabel msdos + + + + + Add the root partition. This will fill + the the disk except for the end part, where the swap will + live. + + +# parted /dev/sda -- mkpart primary 1MiB -8GiB + + + + + Finally, add a swap partition. The size + required will vary according to needs, here a 8GiB one is + created. + + +# parted /dev/sda -- mkpart primary linux-swap -8GiB 100% + + + + The swap partition size rules are no different than for + other Linux distributions. + + + + + + Once complete, you can follow with + . + +
+
+ Formatting + + Use the following commands: + + + + + For initialising Ext4 partitions: + mkfs.ext4. It is recommended that you + assign a unique symbolic label to the file system using the + option -L label, since this makes the + file system configuration independent from device changes. + For example: + + +# mkfs.ext4 -L nixos /dev/sda1 + + + + + For creating swap partitions: mkswap. + Again it’s recommended to assign a label to the swap + partition: -L label. For example: + + +# mkswap -L swap /dev/sda2 + + + + + UEFI systems + + + For creating boot partitions: mkfs.fat. + Again it’s recommended to assign a label to the boot + partition: -n label. For example: + + +# mkfs.fat -F 32 -n boot /dev/sda3 + + + + + For creating LVM volumes, the LVM commands, e.g., + pvcreate, vgcreate, + and lvcreate. + + + + + For creating software RAID devices, use + mdadm. + + + +
+
+
+ Installing + + + + Mount the target file system on which NixOS should be + installed on /mnt, e.g. + + +# mount /dev/disk/by-label/nixos /mnt + + + + + UEFI systems + + + Mount the boot file system on /mnt/boot, + e.g. + + +# mkdir -p /mnt/boot +# mount /dev/disk/by-label/boot /mnt/boot + + + + + If your machine has a limited amount of memory, you may want + to activate swap devices now + (swapon device). The installer (or rather, + the build actions that it may spawn) may need quite a bit of + RAM, depending on your configuration. + + +# swapon /dev/sda2 + + + + + You now need to create a file + /mnt/etc/nixos/configuration.nix that + specifies the intended configuration of the system. This is + because NixOS has a declarative + configuration model: you create or edit a description of the + desired configuration of your system, and then NixOS takes + care of making it happen. The syntax of the NixOS + configuration file is described in + , while a list of + available configuration options appears in + . A minimal example is shown in + Example: NixOS Configuration. + + + The command nixos-generate-config can + generate an initial configuration file for you: + + +# nixos-generate-config --root /mnt + + + You should then edit + /mnt/etc/nixos/configuration.nix to suit + your needs: + + +# nano /mnt/etc/nixos/configuration.nix + + + If you’re using the graphical ISO image, other editors may be + available (such as vim). If you have + network access, you can also install other editors – for + instance, you can install Emacs by running + nix-env -f '<nixpkgs>' -iA emacs. + + + + + BIOS systems + + + + You must set the option + to + specify on which disk the GRUB boot loader is to be + installed. Without it, NixOS cannot boot. + + + + + + UEFI systems + + + + You must set the option + + to true. + nixos-generate-config should do this + automatically for new configurations when booted in UEFI + mode. + + + You may want to look at the options starting with + boot.loader.efi + and + boot.loader.systemd-boot + as well. + + + + + + If there are other operating systems running on the machine + before installing NixOS, the + option can + be set to true to automatically add them to + the grub menu. + + + If you need to configure networking for your machine the + configuration options are described in + . In particular, while wifi + is supported on the installation image, it is not enabled by + default in the configuration generated by + nixos-generate-config. + + + Another critical option is fileSystems, + specifying the file systems that need to be mounted by NixOS. + However, you typically don’t need to set it yourself, because + nixos-generate-config sets it automatically + in + /mnt/etc/nixos/hardware-configuration.nix + from your currently mounted file systems. (The configuration + file hardware-configuration.nix is included + from configuration.nix and will be + overwritten by future invocations of + nixos-generate-config; thus, you generally + should not modify it.) Additionally, you may want to look at + Hardware + configuration for known-hardware at this point or after + installation. + + + + Depending on your hardware configuration or type of file + system, you may need to set the option + boot.initrd.kernelModules to include the + kernel modules that are necessary for mounting the root file + system, otherwise the installed system will not be able to + boot. (If this happens, boot from the installation media + again, mount the target file system on + /mnt, fix + /mnt/etc/nixos/configuration.nix and + rerun nixos-install.) In most cases, + nixos-generate-config will figure out the + required modules. + + + + + + Do the installation: + + +# nixos-install + + + This will install your system based on the configuration you + provided. If anything fails due to a configuration problem or + any other issue (such as a network outage while downloading + binaries from the NixOS binary cache), you can re-run + nixos-install after fixing your + configuration.nix. + + + As the last step, nixos-install will ask + you to set the password for the root user, + e.g. + + +setting root password... +New password: *** +Retype new password: *** + + + + For unattended installations, it is possible to use + nixos-install --no-root-passwd in order + to disable the password prompt entirely. + + + + + + If everything went well: + + +# reboot + + + + + You should now be able to boot into the installed NixOS. The + GRUB boot menu shows a list of available + configurations (initially just one). Every time you + change the NixOS configuration (see + Changing + Configuration), a new item is added to the menu. This + allows you to easily roll back to a previous configuration if + something goes wrong. + + + You should log in and change the root + password with passwd. + + + You’ll probably want to create some user accounts as well, + which can be done with useradd: + + +$ useradd -c 'Eelco Dolstra' -m eelco +$ passwd eelco + + + You may also want to install some software. This will be + covered in . + + + +
+
+ Installation summary + + To summarise, Example: + Commands for Installing NixOS on + /dev/sda shows a typical sequence of + commands for installing NixOS on an empty hard drive (here + /dev/sda). Example: + NixOS Configuration shows a corresponding configuration Nix + expression. + + + + Example: Example partition schemes for + NixOS on /dev/sda (MBR) + + +# parted /dev/sda -- mklabel msdos +# parted /dev/sda -- mkpart primary 1MiB -8GiB +# parted /dev/sda -- mkpart primary linux-swap -8GiB 100% + + + + Example: Example partition schemes for + NixOS on /dev/sda (UEFI) + + +# parted /dev/sda -- mklabel gpt +# parted /dev/sda -- mkpart primary 512MiB -8GiB +# parted /dev/sda -- mkpart primary linux-swap -8GiB 100% +# parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB +# parted /dev/sda -- set 3 esp on + + + + Example: Commands for Installing NixOS on + /dev/sda + + + With a partitioned disk. + + +# mkfs.ext4 -L nixos /dev/sda1 +# mkswap -L swap /dev/sda2 +# swapon /dev/sda2 +# mkfs.fat -F 32 -n boot /dev/sda3 # (for UEFI systems only) +# mount /dev/disk/by-label/nixos /mnt +# mkdir -p /mnt/boot # (for UEFI systems only) +# mount /dev/disk/by-label/boot /mnt/boot # (for UEFI systems only) +# nixos-generate-config --root /mnt +# nano /mnt/etc/nixos/configuration.nix +# nixos-install +# reboot + + + + Example: NixOS Configuration + + +{ config, pkgs, ... }: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + boot.loader.grub.device = "/dev/sda"; # (for BIOS systems only) + boot.loader.systemd-boot.enable = true; # (for UEFI systems only) + + # Note: setting fileSystems is generally not + # necessary, since nixos-generate-config figures them out + # automatically in hardware-configuration.nix. + #fileSystems."/".device = "/dev/disk/by-label/nixos"; + + # Enable the OpenSSH server. + services.sshd.enable = true; +} + +
+
+ Additional installation notes + + + + + +
+
diff --git a/nixos/doc/manual/installation/installation.xml b/nixos/doc/manual/installation/installation.xml index cc18a9c6e9ff..1d443bbd0ee1 100644 --- a/nixos/doc/manual/installation/installation.xml +++ b/nixos/doc/manual/installation/installation.xml @@ -11,7 +11,7 @@ - + diff --git a/nixos/doc/manual/installation/installing.chapter.md b/nixos/doc/manual/installation/installing.chapter.md new file mode 100644 index 000000000000..a0823b51e9cb --- /dev/null +++ b/nixos/doc/manual/installation/installing.chapter.md @@ -0,0 +1,479 @@ +# Installing NixOS {#sec-installation} + +## Booting the system {#sec-installation-booting} + +NixOS can be installed on BIOS or UEFI systems. The procedure for a UEFI +installation is by and large the same as a BIOS installation. The +differences are mentioned in the steps that follow. + +The installation media can be burned to a CD, or now more commonly, +"burned" to a USB drive (see [](#sec-booting-from-usb)). + +The installation media contains a basic NixOS installation. When it's +finished booting, it should have detected most of your hardware. + +The NixOS manual is available by running `nixos-help`. + +You are logged-in automatically as `nixos`. The `nixos` user account has +an empty password so you can use `sudo` without a password. + +If you downloaded the graphical ISO image, you can run `systemctl +start display-manager` to start the desktop environment. If you want +to continue on the terminal, you can use `loadkeys` to switch to your +preferred keyboard layout. (We even provide neo2 via `loadkeys de +neo`!) + +If the text is too small to be legible, try `setfont ter-v32n` to +increase the font size. + +To install over a serial port connect with `115200n8` (e.g. +`picocom -b 115200 /dev/ttyUSB0`). When the bootloader lists boot +entries, select the serial console boot entry. + +### Networking in the installer {#sec-installation-booting-networking} + +The boot process should have brought up networking (check `ip +a`). Networking is necessary for the installer, since it will +download lots of stuff (such as source tarballs or Nixpkgs channel +binaries). It's best if you have a DHCP server on your network. +Otherwise configure networking manually using `ifconfig`. + +On the graphical installer, you can configure the network, wifi +included, through NetworkManager. Using the `nmtui` program, you can do +so even in a non-graphical session. If you prefer to configure the +network manually, disable NetworkManager with +`systemctl stop NetworkManager`. + +On the minimal installer, NetworkManager is not available, so +configuration must be perfomed manually. To configure the wifi, first +start wpa_supplicant with `sudo systemctl start wpa_supplicant`, then +run `wpa_cli`. For most home networks, you need to type in the following +commands: + +```plain +> add_network +0 +> set_network 0 ssid "myhomenetwork" +OK +> set_network 0 psk "mypassword" +OK +> set_network 0 key_mgmt WPA-PSK +OK +> enable_network 0 +OK +``` + +For enterprise networks, for example *eduroam*, instead do: + +```plain +> add_network +0 +> set_network 0 ssid "eduroam" +OK +> set_network 0 identity "myname@example.com" +OK +> set_network 0 password "mypassword" +OK +> set_network 0 key_mgmt WPA-EAP +OK +> enable_network 0 +OK +``` + +When successfully connected, you should see a line such as this one + +```plain +<3>CTRL-EVENT-CONNECTED - Connection to 32:85:ab:ef:24:5c completed [id=0 id_str=] +``` + +you can now leave `wpa_cli` by typing `quit`. + +If you would like to continue the installation from a different machine +you can use activated SSH daemon. You need to copy your ssh key to +either `/home/nixos/.ssh/authorized_keys` or +`/root/.ssh/authorized_keys` (Tip: For installers with a modifiable +filesystem such as the sd-card installer image a key can be manually +placed by mounting the image on a different machine). Alternatively you +must set a password for either `root` or `nixos` with `passwd` to be +able to login. + +## Partitioning and formatting {#sec-installation-partitioning} + +The NixOS installer doesn't do any partitioning or formatting, so you +need to do that yourself. + +The NixOS installer ships with multiple partitioning tools. The examples +below use `parted`, but also provides `fdisk`, `gdisk`, `cfdisk`, and +`cgdisk`. + +The recommended partition scheme differs depending if the computer uses +*Legacy Boot* or *UEFI*. + +### UEFI (GPT) {#sec-installation-partitioning-UEFI} + +Here\'s an example partition scheme for UEFI, using `/dev/sda` as the +device. + +::: {.note} +You can safely ignore `parted`\'s informational message about needing to +update /etc/fstab. +::: + +1. Create a *GPT* partition table. + + ```ShellSession + # parted /dev/sda -- mklabel gpt + ``` + +2. Add the *root* partition. This will fill the disk except for the end + part, where the swap will live, and the space left in front (512MiB) + which will be used by the boot partition. + + ```ShellSession + # parted /dev/sda -- mkpart primary 512MiB -8GiB + ``` + +3. Next, add a *swap* partition. The size required will vary according + to needs, here a 8GiB one is created. + + ```ShellSession + # parted /dev/sda -- mkpart primary linux-swap -8GiB 100% + ``` + + ::: {.note} + The swap partition size rules are no different than for other Linux + distributions. + ::: + +4. Finally, the *boot* partition. NixOS by default uses the ESP (EFI + system partition) as its */boot* partition. It uses the initially + reserved 512MiB at the start of the disk. + + ```ShellSession + # parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB + # parted /dev/sda -- set 3 esp on + ``` + +Once complete, you can follow with +[](#sec-installation-partitioning-formatting). + +### Legacy Boot (MBR) {#sec-installation-partitioning-MBR} + +Here\'s an example partition scheme for Legacy Boot, using `/dev/sda` as +the device. + +::: {.note} +You can safely ignore `parted`\'s informational message about needing to +update /etc/fstab. +::: + +1. Create a *MBR* partition table. + + ```ShellSession + # parted /dev/sda -- mklabel msdos + ``` + +2. Add the *root* partition. This will fill the the disk except for the + end part, where the swap will live. + + ```ShellSession + # parted /dev/sda -- mkpart primary 1MiB -8GiB + ``` + +3. Finally, add a *swap* partition. The size required will vary + according to needs, here a 8GiB one is created. + + ```ShellSession + # parted /dev/sda -- mkpart primary linux-swap -8GiB 100% + ``` + + ::: {.note} + The swap partition size rules are no different than for other Linux + distributions. + ::: + +Once complete, you can follow with +[](#sec-installation-partitioning-formatting). + +### Formatting {#sec-installation-partitioning-formatting} + +Use the following commands: + +- For initialising Ext4 partitions: `mkfs.ext4`. It is recommended + that you assign a unique symbolic label to the file system using the + option `-L label`, since this makes the file system configuration + independent from device changes. For example: + + ```ShellSession + # mkfs.ext4 -L nixos /dev/sda1 + ``` + +- For creating swap partitions: `mkswap`. Again it's recommended to + assign a label to the swap partition: `-L label`. For example: + + ```ShellSession + # mkswap -L swap /dev/sda2 + ``` + +- **UEFI systems** + + For creating boot partitions: `mkfs.fat`. Again it's recommended + to assign a label to the boot partition: `-n label`. For + example: + + ```ShellSession + # mkfs.fat -F 32 -n boot /dev/sda3 + ``` + +- For creating LVM volumes, the LVM commands, e.g., `pvcreate`, + `vgcreate`, and `lvcreate`. + +- For creating software RAID devices, use `mdadm`. + +## Installing {#sec-installation-installing} + +1. Mount the target file system on which NixOS should be installed on + `/mnt`, e.g. + + ```ShellSession + # mount /dev/disk/by-label/nixos /mnt + ``` + +2. **UEFI systems** + + Mount the boot file system on `/mnt/boot`, e.g. + + ```ShellSession + # mkdir -p /mnt/boot + # mount /dev/disk/by-label/boot /mnt/boot + ``` + +3. If your machine has a limited amount of memory, you may want to + activate swap devices now (`swapon device`). + The installer (or rather, the build actions that it + may spawn) may need quite a bit of RAM, depending on your + configuration. + + ```ShellSession + # swapon /dev/sda2 + ``` + +4. You now need to create a file `/mnt/etc/nixos/configuration.nix` + that specifies the intended configuration of the system. This is + because NixOS has a *declarative* configuration model: you create or + edit a description of the desired configuration of your system, and + then NixOS takes care of making it happen. The syntax of the NixOS + configuration file is described in [](#sec-configuration-syntax), + while a list of available configuration options appears in + [](#ch-options). A minimal example is shown in + [Example: NixOS Configuration](#ex-config). + + The command `nixos-generate-config` can generate an initial + configuration file for you: + + ```ShellSession + # nixos-generate-config --root /mnt + ``` + + You should then edit `/mnt/etc/nixos/configuration.nix` to suit your + needs: + + ```ShellSession + # nano /mnt/etc/nixos/configuration.nix + ``` + + If you're using the graphical ISO image, other editors may be + available (such as `vim`). If you have network access, you can also + install other editors -- for instance, you can install Emacs by + running `nix-env -f '' -iA emacs`. + + BIOS systems + + : You *must* set the option [](#opt-boot.loader.grub.device) to + specify on which disk the GRUB boot loader is to be installed. + Without it, NixOS cannot boot. + + UEFI systems + + : You *must* set the option [](#opt-boot.loader.systemd-boot.enable) + to `true`. `nixos-generate-config` should do this automatically + for new configurations when booted in UEFI mode. + + You may want to look at the options starting with + [`boot.loader.efi`](#opt-boot.loader.efi.canTouchEfiVariables) and + [`boot.loader.systemd-boot`](#opt-boot.loader.systemd-boot.enable) + as well. + + If there are other operating systems running on the machine before + installing NixOS, the [](#opt-boot.loader.grub.useOSProber) + option can be set to `true` to automatically add them to the grub + menu. + + If you need to configure networking for your machine the + configuration options are described in [](#sec-networking). In + particular, while wifi is supported on the installation image, it is + not enabled by default in the configuration generated by + `nixos-generate-config`. + + Another critical option is `fileSystems`, specifying the file + systems that need to be mounted by NixOS. However, you typically + don't need to set it yourself, because `nixos-generate-config` sets + it automatically in `/mnt/etc/nixos/hardware-configuration.nix` from + your currently mounted file systems. (The configuration file + `hardware-configuration.nix` is included from `configuration.nix` + and will be overwritten by future invocations of + `nixos-generate-config`; thus, you generally should not modify it.) + Additionally, you may want to look at [Hardware configuration for + known-hardware](https://github.com/NixOS/nixos-hardware) at this + point or after installation. + + ::: {.note} + Depending on your hardware configuration or type of file system, you + may need to set the option `boot.initrd.kernelModules` to include + the kernel modules that are necessary for mounting the root file + system, otherwise the installed system will not be able to boot. (If + this happens, boot from the installation media again, mount the + target file system on `/mnt`, fix `/mnt/etc/nixos/configuration.nix` + and rerun `nixos-install`.) In most cases, `nixos-generate-config` + will figure out the required modules. + ::: + +5. Do the installation: + + ```ShellSession + # nixos-install + ``` + + This will install your system based on the configuration you + provided. If anything fails due to a configuration problem or any + other issue (such as a network outage while downloading binaries + from the NixOS binary cache), you can re-run `nixos-install` after + fixing your `configuration.nix`. + + As the last step, `nixos-install` will ask you to set the password + for the `root` user, e.g. + + ```plain + setting root password... + New password: *** + Retype new password: *** + ``` + + ::: {.note} + For unattended installations, it is possible to use + `nixos-install --no-root-passwd` in order to disable the password + prompt entirely. + ::: + +6. If everything went well: + + ```ShellSession + # reboot + ``` + +7. You should now be able to boot into the installed NixOS. The GRUB + boot menu shows a list of *available configurations* (initially just + one). Every time you change the NixOS configuration (see [Changing + Configuration](#sec-changing-config)), a new item is added to the + menu. This allows you to easily roll back to a previous + configuration if something goes wrong. + + You should log in and change the `root` password with `passwd`. + + You'll probably want to create some user accounts as well, which can + be done with `useradd`: + + ```ShellSession + $ useradd -c 'Eelco Dolstra' -m eelco + $ passwd eelco + ``` + + You may also want to install some software. This will be covered in + [](#sec-package-management). + +## Installation summary {#sec-installation-summary} + +To summarise, [Example: Commands for Installing NixOS on `/dev/sda`](#ex-install-sequence) +shows a typical sequence of commands for installing NixOS on an empty hard +drive (here `/dev/sda`). [Example: NixOS Configuration](#ex-config) shows a +corresponding configuration Nix expression. + +::: {#ex-partition-scheme-MBR .example} +::: {.title} +**Example: Example partition schemes for NixOS on `/dev/sda` (MBR)** +::: +```ShellSession +# parted /dev/sda -- mklabel msdos +# parted /dev/sda -- mkpart primary 1MiB -8GiB +# parted /dev/sda -- mkpart primary linux-swap -8GiB 100% +``` +::: + +::: {#ex-partition-scheme-UEFI .example} +::: {.title} +**Example: Example partition schemes for NixOS on `/dev/sda` (UEFI)** +::: +```ShellSession +# parted /dev/sda -- mklabel gpt +# parted /dev/sda -- mkpart primary 512MiB -8GiB +# parted /dev/sda -- mkpart primary linux-swap -8GiB 100% +# parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB +# parted /dev/sda -- set 3 esp on +``` +::: + +::: {#ex-install-sequence .example} +::: {.title} +**Example: Commands for Installing NixOS on `/dev/sda`** +::: +With a partitioned disk. + +```ShellSession +# mkfs.ext4 -L nixos /dev/sda1 +# mkswap -L swap /dev/sda2 +# swapon /dev/sda2 +# mkfs.fat -F 32 -n boot /dev/sda3 # (for UEFI systems only) +# mount /dev/disk/by-label/nixos /mnt +# mkdir -p /mnt/boot # (for UEFI systems only) +# mount /dev/disk/by-label/boot /mnt/boot # (for UEFI systems only) +# nixos-generate-config --root /mnt +# nano /mnt/etc/nixos/configuration.nix +# nixos-install +# reboot +``` +::: + +::: {#ex-config .example} +::: {.title} +**Example: NixOS Configuration** +::: +```ShellSession +{ config, pkgs, ... }: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + boot.loader.grub.device = "/dev/sda"; # (for BIOS systems only) + boot.loader.systemd-boot.enable = true; # (for UEFI systems only) + + # Note: setting fileSystems is generally not + # necessary, since nixos-generate-config figures them out + # automatically in hardware-configuration.nix. + #fileSystems."/".device = "/dev/disk/by-label/nixos"; + + # Enable the OpenSSH server. + services.sshd.enable = true; +} +``` +::: + +## Additional installation notes {#sec-installation-additional-notes} + +```{=docbook} + + + + + +``` diff --git a/nixos/doc/manual/installation/installing.xml b/nixos/doc/manual/installation/installing.xml deleted file mode 100644 index 6eb097f243ab..000000000000 --- a/nixos/doc/manual/installation/installing.xml +++ /dev/null @@ -1,616 +0,0 @@ - - Installing NixOS -
- Booting the system - - - NixOS can be installed on BIOS or UEFI systems. The procedure for a UEFI - installation is by and large the same as a BIOS installation. The - differences are mentioned in the steps that follow. - - - - The installation media can be burned to a CD, or now more commonly, "burned" - to a USB drive (see ). - - - - The installation media contains a basic NixOS installation. When it’s - finished booting, it should have detected most of your hardware. - - - - The NixOS manual is available by running nixos-help. - - - - You are logged-in automatically as nixos. - The nixos user account has an empty password so you - can use sudo without a password. - - - - If you downloaded the graphical ISO image, you can run systemctl - start display-manager to start the desktop environment. If you want to continue on the - terminal, you can use loadkeys to switch to your - preferred keyboard layout. (We even provide neo2 via loadkeys de - neo!) - - - - If the text is too small to be legible, try setfont ter-v32n - to increase the font size. - - - - To install over a serial port connect with 115200n8 - (e.g. picocom -b 115200 /dev/ttyUSB0). When the - bootloader lists boot entries, select the serial console boot entry. - - -
- Networking in the installer - - - The boot process should have brought up networking (check ip - a). Networking is necessary for the installer, since it will - download lots of stuff (such as source tarballs or Nixpkgs channel - binaries). It’s best if you have a DHCP server on your network. Otherwise - configure networking manually using ifconfig. - - - - On the graphical installer, you can configure the network, wifi included, - through NetworkManager. Using the nmtui program, you - can do so even in a non-graphical session. If you prefer to configure the - network manually, disable NetworkManager with - systemctl stop NetworkManager. - - - - On the minimal installer, NetworkManager is not available, so configuration - must be perfomed manually. To configure the wifi, first start wpa_supplicant - with sudo systemctl start wpa_supplicant, then run - wpa_cli. For most home networks, you need to type - in the following commands: - -> add_network -0 -> set_network 0 ssid "myhomenetwork" -OK -> set_network 0 psk "mypassword" -OK -> set_network 0 key_mgmt WPA-PSK -OK -> enable_network 0 -OK - - For enterprise networks, for example eduroam, instead do: - -> add_network -0 -> set_network 0 ssid "eduroam" -OK -> set_network 0 identity "myname@example.com" -OK -> set_network 0 password "mypassword" -OK -> set_network 0 key_mgmt WPA-EAP -OK -> enable_network 0 -OK - - When successfully connected, you should see a line such as this one - -<3>CTRL-EVENT-CONNECTED - Connection to 32:85:ab:ef:24:5c completed [id=0 id_str=] - - you can now leave wpa_cli by typing quit. - - - - If you would like to continue the installation from a different machine you - can use activated SSH daemon. You need to copy your ssh key to either - /home/nixos/.ssh/authorized_keys or - /root/.ssh/authorized_keys (Tip: For installers with a - modifiable filesystem such as the sd-card installer image a key can be manually - placed by mounting the image on a different machine). Alternatively you must set - a password for either root or nixos with - passwd to be able to login. - -
-
-
- Partitioning and formatting - - - The NixOS installer doesn’t do any partitioning or formatting, so you need - to do that yourself. - - - - The NixOS installer ships with multiple partitioning tools. The examples - below use parted, but also provides - fdisk, gdisk, - cfdisk, and cgdisk. - - - - The recommended partition scheme differs depending if the computer uses - Legacy Boot or UEFI. - - -
- UEFI (GPT) - - - Here's an example partition scheme for UEFI, using - /dev/sda as the device. - - - You can safely ignore parted's informational message - about needing to update /etc/fstab. - - - - - - - - - Create a GPT partition table. -# parted /dev/sda -- mklabel gpt - - - - - Add the root partition. This will fill the disk - except for the end part, where the swap will live, and the space left in - front (512MiB) which will be used by the boot partition. -# parted /dev/sda -- mkpart primary 512MiB -8GiB - - - - - Next, add a swap partition. The size required will - vary according to needs, here a 8GiB one is created. -# parted /dev/sda -- mkpart primary linux-swap -8GiB 100% - - - The swap partition size rules are no different than for other Linux - distributions. - - - - - - - Finally, the boot partition. NixOS by default uses - the ESP (EFI system partition) as its /boot - partition. It uses the initially reserved 512MiB at the start of the - disk. -# parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB -# parted /dev/sda -- set 3 esp on - - - - - - - Once complete, you can follow with - . - -
- -
- Legacy Boot (MBR) - - - Here's an example partition scheme for Legacy Boot, using - /dev/sda as the device. - - - You can safely ignore parted's informational message - about needing to update /etc/fstab. - - - - - - - - - Create a MBR partition table. -# parted /dev/sda -- mklabel msdos - - - - - Add the root partition. This will fill the the disk - except for the end part, where the swap will live. -# parted /dev/sda -- mkpart primary 1MiB -8GiB - - - - - Finally, add a swap partition. The size required - will vary according to needs, here a 8GiB one is created. -# parted /dev/sda -- mkpart primary linux-swap -8GiB 100% - - - The swap partition size rules are no different than for other Linux - distributions. - - - - - - - - - Once complete, you can follow with - . - -
- -
- Formatting - - - Use the following commands: - - - - For initialising Ext4 partitions: mkfs.ext4. It is - recommended that you assign a unique symbolic label to the file system - using the option , - since this makes the file system configuration independent from device - changes. For example: - -# mkfs.ext4 -L nixos /dev/sda1 - - - - - For creating swap partitions: mkswap. Again it’s - recommended to assign a label to the swap partition: . For example: - -# mkswap -L swap /dev/sda2 - - - - - - - UEFI systems - - - - For creating boot partitions: mkfs.fat. Again - it’s recommended to assign a label to the boot partition: - . For example: - -# mkfs.fat -F 32 -n boot /dev/sda3 - - - - - - - - For creating LVM volumes, the LVM commands, e.g., - pvcreate, vgcreate, and - lvcreate. - - - - - For creating software RAID devices, use mdadm. - - - - -
-
-
- Installing - - - - - Mount the target file system on which NixOS should be installed on - /mnt, e.g. - -# mount /dev/disk/by-label/nixos /mnt - - - - - - - - UEFI systems - - - - Mount the boot file system on /mnt/boot, e.g. - -# mkdir -p /mnt/boot -# mount /dev/disk/by-label/boot /mnt/boot - - - - - - - - - If your machine has a limited amount of memory, you may want to activate - swap devices now (swapon - device). The installer (or rather, - the build actions that it may spawn) may need quite a bit of RAM, - depending on your configuration. - -# swapon /dev/sda2 - - - - - You now need to create a file - /mnt/etc/nixos/configuration.nix that specifies the - intended configuration of the system. This is because NixOS has a - declarative configuration model: you create or edit a - description of the desired configuration of your system, and then NixOS - takes care of making it happen. The syntax of the NixOS configuration file - is described in , while a list - of available configuration options appears in - . A minimal example is shown in - . - - - The command nixos-generate-config can generate an - initial configuration file for you: - -# nixos-generate-config --root /mnt - You should then edit /mnt/etc/nixos/configuration.nix - to suit your needs: - -# nano /mnt/etc/nixos/configuration.nix - - If you’re using the graphical ISO image, other editors may be available - (such as vim). If you have network access, you can also - install other editors — for instance, you can install Emacs by running - nix-env -f '<nixpkgs>' -iA emacs. - - - - - BIOS systems - - - - You must set the option - to specify on which disk - the GRUB boot loader is to be installed. Without it, NixOS cannot boot. - - - - - - UEFI systems - - - - You must set the option - to - true. nixos-generate-config - should do this automatically for new configurations when booted in UEFI - mode. - - - You may want to look at the options starting with - - and - - as well. - - - - - - If there are other operating systems running on the machine before - installing NixOS, the - option can be set to true to automatically add them to - the grub menu. - - - If you need to configure networking for your machine the configuration - options are described in . In particular, - while wifi is supported on the installation image, it is not enabled by - default in the configuration generated by - nixos-generate-config. - - - Another critical option is , specifying the - file systems that need to be mounted by NixOS. However, you typically - don’t need to set it yourself, because - nixos-generate-config sets it automatically in - /mnt/etc/nixos/hardware-configuration.nix from your - currently mounted file systems. (The configuration file - hardware-configuration.nix is included from - configuration.nix and will be overwritten by future - invocations of nixos-generate-config; thus, you - generally should not modify it.) Additionally, you may want to look at - Hardware - configuration for known-hardware at this point or after - installation. - - - - - Depending on your hardware configuration or type of file system, you may - need to set the option to - include the kernel modules that are necessary for mounting the root file - system, otherwise the installed system will not be able to boot. (If this - happens, boot from the installation media again, mount the target file - system on /mnt, fix - /mnt/etc/nixos/configuration.nix and rerun - nixos-install.) In most cases, - nixos-generate-config will figure out the required - modules. - - - - - - Do the installation: - -# nixos-install - This will install your system based on the configuration you provided. - If anything fails due to a configuration problem or any other issue - (such as a network outage while downloading binaries from the NixOS - binary cache), you can re-run nixos-install after - fixing your configuration.nix. - - - As the last step, nixos-install will ask you to set the - password for the root user, e.g. - -setting root password... -New password: *** -Retype new password: *** - - - For unattended installations, it is possible to use - nixos-install --no-root-passwd in order to disable - the password prompt entirely. - - - - - - - If everything went well: - -# reboot - - - - - You should now be able to boot into the installed NixOS. The GRUB boot - menu shows a list of available configurations - (initially just one). Every time you change the NixOS configuration (see - Changing Configuration - ), a new item is added to the menu. This allows you to easily roll back to - a previous configuration if something goes wrong. - - - You should log in and change the root password with - passwd. - - - You’ll probably want to create some user accounts as well, which can be - done with useradd: - -$ useradd -c 'Eelco Dolstra' -m eelco -$ passwd eelco - - - You may also want to install some software. This will be covered - in . - - - -
-
- Installation summary - - - To summarise, shows a typical - sequence of commands for installing NixOS on an empty hard drive (here - /dev/sda). shows a - corresponding configuration Nix expression. - - - - Example partition schemes for NixOS on <filename>/dev/sda</filename> (MBR) - -# parted /dev/sda -- mklabel msdos -# parted /dev/sda -- mkpart primary 1MiB -8GiB -# parted /dev/sda -- mkpart primary linux-swap -8GiB 100% - - - - Example partition schemes for NixOS on <filename>/dev/sda</filename> (UEFI) - -# parted /dev/sda -- mklabel gpt -# parted /dev/sda -- mkpart primary 512MiB -8GiB -# parted /dev/sda -- mkpart primary linux-swap -8GiB 100% -# parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB -# parted /dev/sda -- set 3 esp on - - - - Commands for Installing NixOS on <filename>/dev/sda</filename> - - With a partitioned disk. - -# mkfs.ext4 -L nixos /dev/sda1 -# mkswap -L swap /dev/sda2 -# swapon /dev/sda2 -# mkfs.fat -F 32 -n boot /dev/sda3 # (for UEFI systems only) -# mount /dev/disk/by-label/nixos /mnt -# mkdir -p /mnt/boot # (for UEFI systems only) -# mount /dev/disk/by-label/boot /mnt/boot # (for UEFI systems only) -# nixos-generate-config --root /mnt -# nano /mnt/etc/nixos/configuration.nix -# nixos-install -# reboot - - - - - NixOS Configuration - -{ config, pkgs, ... }: { - imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - - = "/dev/sda"; # (for BIOS systems only) - = true; # (for UEFI systems only) - - # Note: setting fileSystems is generally not - # necessary, since nixos-generate-config figures them out - # automatically in hardware-configuration.nix. - #fileSystems."/".device = "/dev/disk/by-label/nixos"; - - # Enable the OpenSSH server. - services.sshd.enable = true; -} - - -
-
- Additional installation notes - - - - - - - - - - -
-
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 3bc7c01d7ac0..76cc4411baba 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -874,7 +874,6 @@ ./services/networking/wasabibackend.nix ./services/networking/websockify.nix ./services/networking/wg-quick.nix - ./services/networking/wicd.nix ./services/networking/wireguard.nix ./services/networking/wpa_supplicant.nix ./services/networking/xandikos.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 233e3ee848be..4db6efb75d82 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -27,6 +27,7 @@ with lib; (mkRemovedOptionModule [ "services" "mesos" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "services" "winstone" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "networking" "vpnc" ] "Use environment.etc.\"vpnc/service.conf\" instead.") + (mkRemovedOptionModule [ "networking" "wicd" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "environment" "blcr" "enable" ] "The BLCR module has been removed") (mkRemovedOptionModule [ "services" "beegfsEnable" ] "The BeeGFS module has been removed") (mkRemovedOptionModule [ "services" "beegfs" ] "The BeeGFS module has been removed") diff --git a/nixos/modules/services/amqp/rabbitmq.nix b/nixos/modules/services/amqp/rabbitmq.nix index 8fdfda9a66d8..dabd80312d9d 100644 --- a/nixos/modules/services/amqp/rabbitmq.nix +++ b/nixos/modules/services/amqp/rabbitmq.nix @@ -135,25 +135,14 @@ in description = "The list of directories containing external plugins"; }; - managementPlugin = mkOption { - description = "The options to run the management plugin"; - type = types.submodule { - options = { - enable = mkOption { - default = false; - type = types.bool; - description = '' - Whether to enable the management plugin - ''; - }; - port = mkOption { - default = 15672; - type = types.port; - description = '' - On which port to run the management plugin - ''; - }; - }; + managementPlugin = { + enable = mkEnableOption "the management plugin"; + port = mkOption { + default = 15672; + type = types.port; + description = '' + On which port to run the management plugin + ''; }; }; }; diff --git a/nixos/modules/services/cluster/kubernetes/kubelet.nix b/nixos/modules/services/cluster/kubernetes/kubelet.nix index 08f5cdfdf334..51b2b5f6eb0d 100644 --- a/nixos/modules/services/cluster/kubernetes/kubelet.nix +++ b/nixos/modules/services/cluster/kubernetes/kubelet.nix @@ -343,7 +343,7 @@ in }; # Allways include cni plugins - services.kubernetes.kubelet.cni.packages = [pkgs.cni-plugins]; + services.kubernetes.kubelet.cni.packages = [pkgs.cni-plugins pkgs.cni-plugin-flannel]; boot.kernelModules = ["br_netfilter" "overlay"]; diff --git a/nixos/modules/services/networking/wicd.nix b/nixos/modules/services/networking/wicd.nix deleted file mode 100644 index aa10a50f876a..000000000000 --- a/nixos/modules/services/networking/wicd.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -{ - - ###### interface - - options = { - - networking.wicd.enable = mkOption { - type = types.bool; - default = false; - description = '' - Whether to start wicd. Wired and - wireless network configurations can then be managed by - wicd-client. - ''; - }; - }; - - - ###### implementation - - config = mkIf config.networking.wicd.enable { - - environment.systemPackages = [pkgs.wicd]; - - systemd.services.wicd = { - after = [ "network-pre.target" ]; - before = [ "network.target" ]; - wants = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - script = "${pkgs.wicd}/sbin/wicd -f"; - }; - - services.dbus.enable = true; - services.dbus.packages = [pkgs.wicd]; - }; -} diff --git a/pkgs/applications/misc/notejot/default.nix b/pkgs/applications/misc/notejot/default.nix index e9d63701afa0..952a7b00d087 100644 --- a/pkgs/applications/misc/notejot/default.nix +++ b/pkgs/applications/misc/notejot/default.nix @@ -18,13 +18,13 @@ stdenv.mkDerivation rec { pname = "notejot"; - version = "3.1.2"; + version = "3.1.5"; src = fetchFromGitHub { owner = "lainsce"; repo = pname; rev = version; - hash = "sha256-Exg9HxV3cxySuT8ifVyZgoATQ/FAC8umj3smJ7W/5/Y="; + hash = "sha256-wsHQvN+sqAMs1QldiRoc9JlF4d54JFqNkqC+lyuHC7M="; }; nativeBuildInputs = [ diff --git a/pkgs/applications/misc/obsidian/default.nix b/pkgs/applications/misc/obsidian/default.nix index e4aebbd2ae2a..5b4444b19851 100644 --- a/pkgs/applications/misc/obsidian/default.nix +++ b/pkgs/applications/misc/obsidian/default.nix @@ -31,11 +31,11 @@ let in stdenv.mkDerivation rec { pname = "obsidian"; - version = "0.12.12"; + version = "0.12.15"; src = fetchurl { url = "https://github.com/obsidianmd/obsidian-releases/releases/download/v${version}/obsidian-${version}.tar.gz"; - sha256 = "sha256-zvWJvMmb0TlFYXrT2QUgMG6uleT42+y+F4bSZQ2ftnE="; + sha256 = "sha256-0pAwTkx89B6S0GPes2XXSRNdByIc+DwiI5HXoUqs/QE="; }; nativeBuildInputs = [ makeWrapper graphicsmagick ]; diff --git a/pkgs/applications/misc/taskopen/default.nix b/pkgs/applications/misc/taskopen/default.nix index 8933faf5fb01..88050d2f449d 100644 --- a/pkgs/applications/misc/taskopen/default.nix +++ b/pkgs/applications/misc/taskopen/default.nix @@ -1,20 +1,27 @@ -{ fetchurl, lib, stdenv, makeWrapper, which, perl, perlPackages }: +{ lib, stdenv, fetchFromGitHub, makeWrapper, which, perl, perlPackages }: -stdenv.mkDerivation { - name = "taskopen-1.1.4"; - src = fetchurl { - url = "https://github.com/ValiValpas/taskopen/archive/v1.1.4.tar.gz"; - sha256 = "774dd89f5c92462098dd6227e181268e5ec9930bbc569f25784000df185c71ba"; +stdenv.mkDerivation rec { + pname = "taskopen"; + version = "1.1.5"; + + src = fetchFromGitHub { + owner = "ValiValpas"; + repo = "taskopen"; + rev = "v${version}"; + sha256 = "sha256-/xf7Ph2KKiZ5lgLKk95nCgw/z9wIBmuWf3QGaNebgHg="; }; - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ which perl ] ++ (with perlPackages; [ JSON ]); - - installPhase = '' + postPatch = '' # We don't need a DESTDIR and an empty string results in an absolute path # (due to the trailing slash) which breaks the build. sed 's|$(DESTDIR)/||' -i Makefile + ''; + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ which ] + ++ (with perlPackages; [ JSON perl ]); + + installPhase = '' make PREFIX=$out make PREFIX=$out install ''; @@ -28,7 +35,7 @@ stdenv.mkDerivation { description = "Script for taking notes and open urls with taskwarrior"; homepage = "https://github.com/ValiValpas/taskopen"; platforms = platforms.linux; - license = lib.licenses.free ; + license = licenses.free; maintainers = [ maintainers.winpat ]; }; } diff --git a/pkgs/applications/networking/cluster/hubble/default.nix b/pkgs/applications/networking/cluster/hubble/default.nix new file mode 100644 index 000000000000..ebb0abfcbd28 --- /dev/null +++ b/pkgs/applications/networking/cluster/hubble/default.nix @@ -0,0 +1,22 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "hubble"; + version = "0.8.2"; + + src = fetchFromGitHub { + owner = "cilium"; + repo = pname; + rev = "v${version}"; + sha256 = "1n1930hlaflx7kzqbz7vvnxw9hrps84kqibaf2ixnjp998kqkl6d"; + }; + + vendorSha256 = null; + + meta = with lib; { + description = "Network, Service & Security Observability for Kubernetes using eBPF"; + license = licenses.asl20; + homepage = "https://github.com/cilium/hubble/"; + maintainers = with maintainers; [ humancalico ]; + }; +} diff --git a/pkgs/applications/networking/cluster/octant/default.nix b/pkgs/applications/networking/cluster/octant/default.nix index fabdc7d5ab5e..257c37ff328d 100644 --- a/pkgs/applications/networking/cluster/octant/default.nix +++ b/pkgs/applications/networking/cluster/octant/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "octant"; - version = "0.23.0"; + version = "0.24.0"; src = let @@ -19,10 +19,10 @@ stdenv.mkDerivation rec { }; in fetchsrc version { - x86_64-linux = "sha256-wnm4Zprlao+zbWVJNY4BsAT1fFMft7luyDaW2HfNotg="; - aarch64-linux = "sha256-eYvfLUelSrmdY9dbgAlPm7en88hsdCnejJGq2Gz4DN0="; - x86_64-darwin = "sha256-NXMQ4mbYfIK+arGWZVhQk5iAw6AZM9PAGJ9CEC/rmgA="; - aarch64-darwin = "sha256-WqlbiDV2CuBYr6IXQ8vaESxKNZGp9vBj683igazcmwM="; + x86_64-linux = "sha256-fvGVcp6SpHY0UuWurRuypDXbWEs565bK1Peg0Q4Y0m8="; + aarch64-linux = "sha256-7h8l4Pm34UCZ5NhD1scM1c5sM4ePGLDRGAQBfI5vSHI="; + x86_64-darwin = "sha256-2S+D5Gg98GEL5L6bC8ZUSEJXFs74ZaZlNkYHYJYZvqw="; + aarch64-darwin = "sha256-rEhMX+v2sjsmc1p22uscjIyhcnpv2fWjgEnU+lUq9RE="; }; dontConfigure = true; diff --git a/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix index a2be79f5589f..6d9f62e75ab3 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix @@ -1,3 +1,8 @@ +# Update instructions: +# +# To update `thunderbird-bin`'s `release_sources.nix`, run from the nixpkgs root: +# +# nix-shell maintainers/scripts/update.nix --argstr package pkgs.firefox-bin-unwrapped { stdenv, lib, fetchurl, config, makeWrapper , alsa-lib , at-spi2-atk diff --git a/pkgs/applications/networking/mailreaders/thunderbird/packages.nix b/pkgs/applications/networking/mailreaders/thunderbird/packages.nix index 314d2141de7e..0be69104a5fe 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird/packages.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird/packages.nix @@ -44,12 +44,12 @@ rec { thunderbird-78 = common rec { pname = "thunderbird"; - version = "78.13.0"; + version = "78.14.0"; application = "comm/mail"; binaryName = pname; src = fetchurl { url = "mirror://mozilla/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.xz"; - sha512 = "daee9ea9e57bdfce231a35029807f279a06f8790d71efc8998c78eb42d99a93cf98623170947df99202da038f949ba9111a7ff7adbd43c161794deb6791370a0"; + sha512 = "0zan30jvv45pd6i59l2kfyfjwivqk5qq6vyf77xhss2dk8qhk3mfrfxpfbkrab676l14b9hs09nr6ni1h1iwn82zx5k7fx5x8sh5dx6"; }; patches = [ ./no-buildconfig-78.patch diff --git a/pkgs/applications/science/electronics/openems/default.nix b/pkgs/applications/science/electronics/openems/default.nix index 64afe3222c2d..e7b947450acc 100644 --- a/pkgs/applications/science/electronics/openems/default.nix +++ b/pkgs/applications/science/electronics/openems/default.nix @@ -15,13 +15,10 @@ , withQcsxcad ? true , withMPI ? false , withHyp2mat ? true -, qcsxcad ? null -, hyp2mat ? null +, qcsxcad +, hyp2mat }: -assert withQcsxcad -> qcsxcad != null; -assert withHyp2mat -> hyp2mat != null; - stdenv.mkDerivation { pname = "openems"; version = "unstable-2020-02-15"; diff --git a/pkgs/applications/science/electronics/xoscope/default.nix b/pkgs/applications/science/electronics/xoscope/default.nix index 5052a3715ef4..7a9f58a0c6e3 100644 --- a/pkgs/applications/science/electronics/xoscope/default.nix +++ b/pkgs/applications/science/electronics/xoscope/default.nix @@ -1,18 +1,26 @@ -{lib, stdenv, fetchurl, gtk2, pkg-config}: +{ lib +, stdenv +, fetchurl +, gtk3 +, gtkdatabox +, fftw +, gnum4 +, comedilib +, alsa-lib +, pkg-config +}: stdenv.mkDerivation rec { - name = "xoscope-2.0"; + pname = "xoscope"; + version = "2.3"; src = fetchurl { - url = "mirror://sourceforge/xoscope/${name}.tgz"; - sha256 = "00xlvvqyw6l1ljbsx1vgx2v1jfh0xacz1a0yhq1dj6yxf5wh58x8"; + url = "mirror://sourceforge/xoscope/${pname}-${version}.tar.gz"; + sha256 = "0a5ycfc1qdmibvagc82r2mhv2i99m6pndy5i6ixas3j2297g6pgq"; }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ gtk2 ]; - - # from: https://aur.archlinux.org/packages.php?ID=12140&detail=1 - patches = [ ./gtkdepre.diff ]; + nativeBuildInputs = [ pkg-config gnum4 ]; + buildInputs = [ gtk3 gtkdatabox fftw comedilib alsa-lib ]; meta = { description = "Oscilloscope through the sound card"; diff --git a/pkgs/applications/science/electronics/xoscope/gtkdepre.diff b/pkgs/applications/science/electronics/xoscope/gtkdepre.diff deleted file mode 100644 index 993df9cb5503..000000000000 --- a/pkgs/applications/science/electronics/xoscope/gtkdepre.diff +++ /dev/null @@ -1,58 +0,0 @@ -diff -ru xoscope-2.0-old//gtkdatabox-0.6.0.0/gtk/gtkdatabox.c xoscope-2.0/gtkdatabox-0.6.0.0/gtk/gtkdatabox.c ---- xoscope-2.0-old//gtkdatabox-0.6.0.0/gtk/gtkdatabox.c 2010-06-07 10:42:24.000000000 +0200 -+++ xoscope-2.0/gtkdatabox-0.6.0.0/gtk/gtkdatabox.c 2010-06-07 10:45:40.000000000 +0200 -@@ -661,7 +661,7 @@ - static void - gtk_databox_calculate_hcanvas (GtkDatabox *box) - { -- if (!GTK_WIDGET_VISIBLE (box)) -+ if (!gtk_widget_get_visible (box)) - return; - - if (box->priv->adjX->page_size == 1.0) -@@ -698,7 +698,7 @@ - static void - gtk_databox_calculate_vcanvas (GtkDatabox *box) - { -- if (!GTK_WIDGET_VISIBLE (box)) -+ if (!gtk_widget_get_visible (box)) - return; - - if (box->priv->adjY->page_size == 1.0) -@@ -780,7 +780,7 @@ - gtk_databox_draw (box, event); - - gdk_draw_drawable (widget->window, -- widget->style->fg_gc[GTK_WIDGET_STATE (widget)], -+ widget->style->fg_gc[gtk_widget_get_state (widget)], - box->priv->canvas.pixmap, event->area.x, event->area.y, - event->area.x, event->area.y, event->area.width, - event->area.height); -@@ -940,7 +940,7 @@ - GtkWidget *widget = GTK_WIDGET (box); - - g_return_if_fail (GTK_IS_DATABOX (box)); -- g_return_if_fail (GTK_WIDGET_VISIBLE (widget)); -+ g_return_if_fail (gtk_widget_get_visible (widget)); - - gdk_draw_rectangle (box->priv->canvas.pixmap, widget->style->bg_gc[0], - TRUE, 0, 0, -@@ -1150,7 +1150,7 @@ - /* Copy a part of the pixmap to the screen */ - if (pixmapCopyRect) - gdk_draw_drawable (widget->window, -- widget->style->fg_gc[GTK_WIDGET_STATE (box)], -+ widget->style->fg_gc[gtk_widget_get_state (box)], - box->priv->canvas.pixmap, - pixmapCopyRect->x, - pixmapCopyRect->y, ---- xoscope-2.0-old//gtkdatabox-0.6.0.0/gtk/Makefile.in 2011-09-02 16:43:43.000000000 +0200 -+++ xoscope-2.0/gtkdatabox-0.6.0.0/gtk/Makefile.in 2011-09-02 16:43:57.000000000 +0200 -@@ -196,7 +196,6 @@ - -DG_DISABLE_DEPRECATED\ - -DGDK_DISABLE_DEPRECATED\ - -DGDK_PIXBUF_DISABLE_DEPRECATED\ -- -DGTK_DISABLE_DEPRECATED\ - `pkg-config gtk+-2.0 --cflags` - - all: all-am diff --git a/pkgs/applications/video/kodi-packages/inputstreamhelper/default.nix b/pkgs/applications/video/kodi-packages/inputstreamhelper/default.nix index fcf53e7a1694..7698e6619d91 100644 --- a/pkgs/applications/video/kodi-packages/inputstreamhelper/default.nix +++ b/pkgs/applications/video/kodi-packages/inputstreamhelper/default.nix @@ -2,11 +2,11 @@ buildKodiAddon rec { pname = "inputstreamhelper"; namespace = "script.module.inputstreamhelper"; - version = "0.5.5+matrix.1"; + version = "0.5.8+matrix.1"; src = fetchzip { url = "https://mirrors.kodi.tv/addons/matrix/${namespace}/${namespace}-${version}.zip"; - sha256 = "0y4xn3ygwv1kb7gya7iwdga0g9sa89snpnram0wwqzqn8wn2lyb4"; + sha256 = "xdsUzmz8ji9JcYLEUFWwvXq0Oig5i08VPQD93K8R9hk="; }; passthru = { diff --git a/pkgs/applications/video/kodi-packages/youtube/default.nix b/pkgs/applications/video/kodi-packages/youtube/default.nix index 8e57adbfb1af..7c16aa606f24 100644 --- a/pkgs/applications/video/kodi-packages/youtube/default.nix +++ b/pkgs/applications/video/kodi-packages/youtube/default.nix @@ -3,11 +3,11 @@ buildKodiAddon rec { pname = "youtube"; namespace = "plugin.video.youtube"; - version = "6.8.14+matrix.1"; + version = "6.8.17+matrix.1"; src = fetchzip { url = "https://mirrors.kodi.tv/addons/matrix/${namespace}/${namespace}-${version}.zip"; - sha256 = "1a18whh3fisprwipwhxf26kc958sxhwpvs8pxwq2sq96vr7b4xq7"; + sha256 = "AuYoUyv0DDtHnxFiNl3AF5jrMjuNRXdlJvw7d7b+yh8="; }; propagatedBuildInputs = [ diff --git a/pkgs/applications/virtualization/bochs/default.nix b/pkgs/applications/virtualization/bochs/default.nix index 5f3b31870dc1..41ab5ef2c990 100644 --- a/pkgs/applications/virtualization/bochs/default.nix +++ b/pkgs/applications/virtualization/bochs/default.nix @@ -100,6 +100,7 @@ stdenv.mkDerivation rec { "--enable-sb16" "--enable-show-ips" "--enable-smp" + "--enable-vmx=2" "--enable-svm" "--enable-trace-linking" "--enable-usb" diff --git a/pkgs/development/compilers/fstar/default.nix b/pkgs/development/compilers/fstar/default.nix index 0ef2e89f123a..dac50fc781bb 100644 --- a/pkgs/development/compilers/fstar/default.nix +++ b/pkgs/development/compilers/fstar/default.nix @@ -17,13 +17,13 @@ in stdenv.mkDerivation rec { pname = "fstar"; - version = "2021.08.27"; + version = "2021.09.11"; src = fetchFromGitHub { owner = "FStarLang"; repo = "FStar"; rev = "v${version}"; - sha256 = "1bf5hrv2nv0ljvdf6jhk59lw1ds3j5qkkcylgxwakylw30g8rxqb"; + sha256 = "1aqk6fx77zcb7mcm78dk4l4zzd323qiv7yc7hvc38494yf6gk8a0"; }; nativeBuildInputs = [ makeWrapper installShellFiles ]; diff --git a/pkgs/development/compilers/go/1.16.nix b/pkgs/development/compilers/go/1.16.nix index a97aa4fe80d6..f8cdf7198eef 100644 --- a/pkgs/development/compilers/go/1.16.nix +++ b/pkgs/development/compilers/go/1.16.nix @@ -51,11 +51,11 @@ in stdenv.mkDerivation rec { pname = "go"; - version = "1.16.7"; + version = "1.16.8"; src = fetchurl { url = "https://dl.google.com/go/go${version}.src.tar.gz"; - sha256 = "sha256-Gp8olNPYeHKfcEUHLzC+zr4kNSTPL85OCnskix4GVKw="; + sha256 = "sha256-jyqMJLeTN1syQ9+C/bDIOHSG3MioksocmRqpms4Ia5g="; }; # perl is used for testing go vet diff --git a/pkgs/development/libraries/abseil-cpp/default.nix b/pkgs/development/libraries/abseil-cpp/default.nix index a1610ce82624..072af53757bc 100644 --- a/pkgs/development/libraries/abseil-cpp/default.nix +++ b/pkgs/development/libraries/abseil-cpp/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "abseil-cpp"; - version = "20210324.1"; + version = "20210324.2"; src = fetchFromGitHub { owner = "abseil"; repo = "abseil-cpp"; rev = version; - sha256 = "16w63brfwgiayiyhvawsnr14xyy5hpp68k8fj0z6yk0bjzw6jvjw"; + sha256 = "0g9rbhk3mwjdfxk7cscd04vm8fphd5flz9yykpgvyy1nwa34zk3x"; }; patches = [ diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index 72c584d0fd47..4a9fce04214f 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -33,6 +33,13 @@ stdenv.mkDerivation rec { url = "https://github.com/grpc/grpc/commit/2f4cf1d9265c8e10fb834f0794d0e4f3ec5ae10e.patch"; sha256 = "0ams3jmgh9yzwmxcg4ifb34znamr7pb4qm0609kvil9xqvkqz963"; }) + + # Revert gRPC C++ Mutex to be an alias of Abseil, because it breaks dependent packages + (fetchpatch { + url = "https://github.com/grpc/grpc/commit/931f91b745cd5b2864a0d1787815871d0bd844ae.patch"; + sha256 = "0vc93g2i4982ys4gzyaxdv9ni25yk10sxq3n7fkz8dypy8sylck7"; + revert = true; + }) ]; nativeBuildInputs = [ cmake pkg-config ] diff --git a/pkgs/development/libraries/gtkdatabox/default.nix b/pkgs/development/libraries/gtkdatabox/default.nix index ddab0046b660..0cc510ce7313 100644 --- a/pkgs/development/libraries/gtkdatabox/default.nix +++ b/pkgs/development/libraries/gtkdatabox/default.nix @@ -1,22 +1,30 @@ -{ lib, stdenv, fetchurl, pkg-config, gtk2 }: +{ lib +, stdenv +, fetchurl +, pkg-config +, gtk3 +, pango +, cairo +}: stdenv.mkDerivation rec { - name = "gtkdatabox-0.9.3.1"; + pname = "gtkdatabox"; + version = "1.0.0"; src = fetchurl { - url = "mirror://sourceforge/gtkdatabox/${name}.tar.gz"; - sha256 = "1rdxnjgh6v3yjqgsfmamyzpfxckzchps4kqvvz88nifmd7ckhjfh"; + url = "mirror://sourceforge/gtkdatabox/${pname}-${version}.tar.gz"; + sha256 = "1qykm551bx8j8pfgxs60l2vhpi8lv4r8va69zvn2594lchh71vlb"; }; nativeBuildInputs = [ pkg-config ]; - propagatedBuildInputs = [ gtk2 ]; + propagatedBuildInputs = [ gtk3 pango cairo ]; meta = { description = "GTK widget for displaying large amounts of numerical data"; - - license = lib.licenses.lgpl2; - + homepage = "https://gtkdatabox.sourceforge.io/"; + license = lib.licenses.lgpl2Only; platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ yl3dy ]; }; } diff --git a/pkgs/development/libraries/libsigcxx/3.0.nix b/pkgs/development/libraries/libsigcxx/3.0.nix index edb74c807bfa..92229811207f 100644 --- a/pkgs/development/libraries/libsigcxx/3.0.nix +++ b/pkgs/development/libraries/libsigcxx/3.0.nix @@ -9,11 +9,11 @@ stdenv.mkDerivation rec { pname = "libsigc++"; - version = "3.0.6"; + version = "3.0.7"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "tw7c9GEWUcVKQm4QmxcZbh+hfaCQWSpQAOLRNMA6xc4="; + sha256 = "v76RwNCU6mu8bL05CbfZjGVh7qi22cDCWt2Qam6D1zM="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index 84590eee0b77..2d13b993fd28 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -91,7 +91,7 @@ stdenv.mkDerivation rec { fetchurl { url = "https://libvirt.org/sources/${pname}-${version}.tar.xz"; - sha256 = "sha256-l1VjqpfxBigg06SiRE4ANZ4jLahE9mJC6SrTzZ8o5kY="; + sha256 = "1cjj48dn4ww13ayicd2g863a5kz0sc5jlbv2991bj54dq6cn0q8v"; } else fetchFromGitLab { diff --git a/pkgs/development/libraries/vtk/9.x.nix b/pkgs/development/libraries/vtk/9.x.nix index e99ba34999e7..b95bcb2b8693 100644 --- a/pkgs/development/libraries/vtk/9.x.nix +++ b/pkgs/development/libraries/vtk/9.x.nix @@ -1,5 +1,5 @@ import ./generic.nix { majorVersion = "9.0"; - minorVersion = "1"; - sourceSha256 = "1ir2lq9i45ls374lcmjzw0nrm5l5hnm1w47lg8g8d0n2j7hsaf8v"; + minorVersion = "3"; + sourceSha256 = "vD65Ylsrjb/stgUqKrCR/JFAXeQzOw7GjzMjgVFU7Yo="; } diff --git a/pkgs/development/python-modules/blocksat-cli/default.nix b/pkgs/development/python-modules/blocksat-cli/default.nix index 1445c2046fb0..624d4f490e3c 100644 --- a/pkgs/development/python-modules/blocksat-cli/default.nix +++ b/pkgs/development/python-modules/blocksat-cli/default.nix @@ -13,11 +13,11 @@ buildPythonPackage rec { pname = "blocksat-cli"; - version = "0.3.2"; + version = "0.4.0"; src = fetchPypi { inherit pname version; - sha256 = "06ky5kahh8dm1d7ckid3fdwizvkh3g4aycm39r00kwxdlfca7bgf"; + sha256 = "sha256-g/V1//Jo8wnoOHEotF2ElVm+vzTIwZ6EzssJg6WJw6g="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/dropbox/default.nix b/pkgs/development/python-modules/dropbox/default.nix index 7406e6dc21b3..91317eb9f093 100644 --- a/pkgs/development/python-modules/dropbox/default.nix +++ b/pkgs/development/python-modules/dropbox/default.nix @@ -3,11 +3,11 @@ buildPythonPackage rec { pname = "dropbox"; - version = "11.18.0"; + version = "11.19.0"; src = fetchPypi { inherit pname version; - sha256 = "fa512c87521809e93502fc6a27b1d57ffbcef2281468c8f93575eab6a9ad5f05"; + sha256 = "a56d200c47d7cd19f697e232a616342b224079f43abf4748bc55fb0c1de4346f"; }; postPatch = '' diff --git a/pkgs/development/python-modules/flynt/default.nix b/pkgs/development/python-modules/flynt/default.nix new file mode 100644 index 000000000000..3c09106c94b8 --- /dev/null +++ b/pkgs/development/python-modules/flynt/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, astor +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "flynt"; + version = "0.66"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "ikamensh"; + repo = "flynt"; + rev = version; + hash = "sha256-DV433wqLjF5k4g8J7rj5gZfaw+Y4/TDOoFKo3eKDjZ4="; + }; + + propagatedBuildInputs = [ astor ]; + + checkInputs = [ pytestCheckHook ]; + + meta = with lib; { + description = "command line tool to automatically convert a project's Python code from old format style strings into Python 3.6+'s f-strings"; + homepage = "https://github.com/ikamensh/flynt"; + license = licenses.mit; + maintainers = with maintainers; [ cpcloud ]; + }; +} diff --git a/pkgs/development/python-modules/mitmproxy/default.nix b/pkgs/development/python-modules/mitmproxy/default.nix index e9c12548269f..f9535ac0f31f 100644 --- a/pkgs/development/python-modules/mitmproxy/default.nix +++ b/pkgs/development/python-modules/mitmproxy/default.nix @@ -45,14 +45,14 @@ buildPythonPackage rec { pname = "mitmproxy"; - version = "6.0.2"; + version = "7.0.2"; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "sha256-FyIZKFQtf6qvwo4+NzPa/KOmBCcdGJ3jCqxz26+S2e4="; + sha256 = "0y5zsay9b6xgibs6m4gckw63jip35vsdfajsh1nw2zcb2xs1a7qs"; }; propagatedBuildInputs = [ @@ -112,6 +112,9 @@ buildPythonPackage rec { disabledTests = [ # Tests require a git repository "test_get_version" + # https://github.com/mitmproxy/mitmproxy/commit/36ebf11916704b3cdaf4be840eaafa66a115ac03 + # Tests require terminal + "test_integration" ]; pythonImportsCheck = [ "mitmproxy" ]; diff --git a/pkgs/development/python-modules/mutf8/default.nix b/pkgs/development/python-modules/mutf8/default.nix index 4e456715266d..ce783bbb5ff9 100644 --- a/pkgs/development/python-modules/mutf8/default.nix +++ b/pkgs/development/python-modules/mutf8/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "mutf8"; - version = "1.0.4"; + version = "1.0.5"; disabled = pythonOlder "3.6"; @@ -15,7 +15,7 @@ buildPythonPackage rec { owner = "TkTech"; repo = pname; rev = "v${version}"; - sha256 = "sha256-99NL4mCvzQmDvaOI2M9PA8UUwIrrEtVHRmJqkd6hNd0="; + sha256 = "0blp6gb7q3f7if326xard8zlfg2rcmb3a7mxvaxgkvxigipjb9af"; }; checkInputs = [ diff --git a/pkgs/development/python-modules/pex/default.nix b/pkgs/development/python-modules/pex/default.nix index 92282d2eb46d..96eaa96aef85 100644 --- a/pkgs/development/python-modules/pex/default.nix +++ b/pkgs/development/python-modules/pex/default.nix @@ -6,11 +6,11 @@ buildPythonPackage rec { pname = "pex"; - version = "2.1.48"; + version = "2.1.49"; src = fetchPypi { inherit pname version; - sha256 = "5f6a489075c5bbecdb36a42249cd52cfd882e205242f80a1f1e2294951ab46e7"; + sha256 = "af536388eeede93111d8ef0af4a80cbb3d847c1a1470c6f34f3abe83deac1b91"; }; nativeBuildInputs = [ setuptools ]; diff --git a/pkgs/development/python-modules/relatorio/default.nix b/pkgs/development/python-modules/relatorio/default.nix index 9e673de92669..597eb37c7560 100644 --- a/pkgs/development/python-modules/relatorio/default.nix +++ b/pkgs/development/python-modules/relatorio/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "relatorio"; - version = "0.9.3"; + version = "0.10.0"; src = fetchPypi { inherit pname version; - sha256 = "1d5d08f5323a1cdf6d860cd13c3408482a822d9924899927a8c7cd2ebeaa8699"; + sha256 = "6b9390eab696bdf569639ff58794fb9ef8ff19f94feea5b505a6ba06d0cfd026"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/scp/default.nix b/pkgs/development/python-modules/scp/default.nix index a177d22f5d4f..cba6ddc0acf6 100644 --- a/pkgs/development/python-modules/scp/default.nix +++ b/pkgs/development/python-modules/scp/default.nix @@ -7,11 +7,11 @@ buildPythonPackage rec { pname = "scp"; - version = "0.13.6"; + version = "0.14.0"; src = fetchPypi { inherit pname version; - sha256 = "sha256-CnL514LpaLCbEU1WB/lrHxb+mUKFevs1U5nt1VNy/PE="; + sha256 = "ddbdb3ef8c068aa1fd37a5fa65a122a80673c9fd73fdc5668a4604f99ccf5943"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/tools/golangci-lint/default.nix b/pkgs/development/tools/golangci-lint/default.nix index 3512c1bf087c..2c37a5281b73 100644 --- a/pkgs/development/tools/golangci-lint/default.nix +++ b/pkgs/development/tools/golangci-lint/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "golangci-lint"; - version = "1.42.0"; + version = "1.42.1"; src = fetchFromGitHub { owner = "golangci"; repo = "golangci-lint"; rev = "v${version}"; - sha256 = "sha256-xwJZfWDtA/6HkYZmGyhL/44xU8qLmJ2kk3Uqft0yivE="; + sha256 = "sha256-lhpljK4odn+j+Cb3sp1/cMnBRrLNhWxVoRIO2PDqMHo="; }; - vendorSha256 = "sha256-lOVGyxQcWG99hO+Eff2cNA5gW4DhsDrBY5Ejj0s4v4Q="; + vendorSha256 = "sha256-Z4lNGWLKagKHbVOy6MiKyuSlXwUCYlkvnvk5zS4vl1A="; doCheck = false; diff --git a/pkgs/development/tools/sslmate/default.nix b/pkgs/development/tools/sslmate/default.nix index ede6364fa067..2371600a7f4f 100644 --- a/pkgs/development/tools/sslmate/default.nix +++ b/pkgs/development/tools/sslmate/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "sslmate"; - version = "1.7.1"; + version = "1.8.0"; src = fetchurl { url = "https://packages.sslmate.com/other/${pname}-${version}.tar.gz"; - sha256 = "1i56za41cfqlml9g787xqqs0r8jifd3y7ks9nf4k2dhhi4rijkj5"; + sha256 = "sha256-A1TkGi6b1psWflN0ogM1r/pYSVXcOi6aQEb6xtOsAsk="; }; makeFlags = [ "PREFIX=$(out)" ]; diff --git a/pkgs/games/astromenace/default.nix b/pkgs/games/astromenace/default.nix index cbe2385ea125..16b087d1e4d0 100644 --- a/pkgs/games/astromenace/default.nix +++ b/pkgs/games/astromenace/default.nix @@ -33,5 +33,6 @@ stdenv.mkDerivation rec { homepage = "https://www.viewizard.com/"; license = lib.licenses.gpl3; platforms = lib.platforms.linux; + mainProgram = "AstroMenace"; }; } diff --git a/pkgs/games/eduke32/default.nix b/pkgs/games/eduke32/default.nix index 8c7a79ff9822..c34922349612 100644 --- a/pkgs/games/eduke32/default.nix +++ b/pkgs/games/eduke32/default.nix @@ -1,6 +1,8 @@ { lib, stdenv, fetchurl, makeWrapper, pkg-config, nasm, makeDesktopItem , alsa-lib, flac, gtk2, libvorbis, libvpx, libGLU, libGL -, SDL2, SDL2_mixer }: +, SDL2, SDL2_mixer +, AGL, Cocoa, GLUT, OpenGL +}: let desktopItem = makeDesktopItem { @@ -16,21 +18,37 @@ let in stdenv.mkDerivation rec { pname = "eduke32"; - version = "20210722"; - rev = "9484"; - revExtra = "f3fea8c15"; + version = "20210910"; + rev = "9603"; + revExtra = "6c289cce4"; src = fetchurl { - url = "http://dukeworld.duke4.net/eduke32/synthesis/${version}-${rev}-${revExtra}/eduke32_src_${version}-${rev}-${revExtra}.tar.xz"; - sha256 = "0fdl2i465cl5x7129772ksx97lvim98m9009q5cfmf6scagj9pvz"; + url = "https://dukeworld.com/eduke32/synthesis/${version}-${rev}-${revExtra}/eduke32_src_${version}-${rev}-${revExtra}.tar.xz"; + sha256 = "sha256-/NQMsmT9z2N3KWBrP8hlGngQKJUgSP+vrNoFqJscRCk="; }; - buildInputs = [ alsa-lib flac gtk2 libvorbis libvpx libGL libGLU SDL2 SDL2_mixer ]; + buildInputs = [ + flac + libvorbis + libvpx + SDL2 + SDL2_mixer + ] ++ lib.optionals stdenv.isLinux [ + alsa-lib + gtk2 + libGL + libGLU + ] ++ lib.optionals stdenv.isDarwin [ + AGL + Cocoa + GLUT + OpenGL + ]; nativeBuildInputs = [ makeWrapper pkg-config ] ++ lib.optional (stdenv.hostPlatform.system == "i686-linux") nasm; - postPatch = '' + postPatch = lib.optionalString stdenv.isLinux '' substituteInPlace source/build/src/glbuild.cpp \ --replace libGLU.so ${libGLU}/lib/libGLU.so @@ -44,6 +62,9 @@ in stdenv.mkDerivation rec { makeFlags = [ "SDLCONFIG=${SDL2}/bin/sdl2-config" + ] ++ lib.optionals stdenv.isDarwin [ + # broken, see: https://github.com/NixOS/nixpkgs/issues/19098 + "LTO=0" ]; enableParallelBuilding = true; @@ -52,7 +73,7 @@ in stdenv.mkDerivation rec { runHook preInstall install -Dm755 -t $out/bin eduke32 mapster32 - + '' + lib.optionalString stdenv.isLinux '' makeWrapper $out/bin/eduke32 $out/bin/${wrapper} \ --set-default EDUKE32_DATA_DIR /var/lib/games/eduke32 \ --add-flags '-g "$EDUKE32_DATA_DIR/DUKE3D.GRP"' @@ -60,7 +81,16 @@ in stdenv.mkDerivation rec { cp -rv ${desktopItem}/share $out substituteInPlace $out/share/applications/eduke32.desktop \ --subst-var out + '' + lib.optionalString stdenv.isDarwin '' + mkdir -p $out/Applications/EDuke32.app/Contents/MacOS + mkdir -p $out/Applications/Mapster32.app/Contents/MacOS + cp -r platform/Apple/bundles/EDuke32.app/* $out/Applications/EDuke32.app/ + cp -r platform/Apple/bundles/Mapster32.app/* $out/Applications/Mapster32.app/ + + ln -sf $out/bin/eduke32 $out/Applications/EDuke32.app/Contents/MacOS/eduke32 + ln -sf $out/bin/mapster32 $out/Applications/Mapster32.app/Contents/MacOS/mapster32 + '' + '' runHook postInstall ''; @@ -68,8 +98,7 @@ in stdenv.mkDerivation rec { description = "Enhanched port of Duke Nukem 3D for various platforms"; homepage = "http://eduke32.com"; license = licenses.gpl2Plus; - maintainers = with maintainers; [ sander ]; - # Darwin is untested (supported by upstream) + maintainers = with maintainers; [ mikroskeem sander ]; platforms = platforms.all; }; } diff --git a/pkgs/games/quakespasm/default.nix b/pkgs/games/quakespasm/default.nix index 87ecd4601339..7dda3b40ae3a 100644 --- a/pkgs/games/quakespasm/default.nix +++ b/pkgs/games/quakespasm/default.nix @@ -1,27 +1,72 @@ -{ lib, stdenv, SDL, fetchurl, gzip, libvorbis, libmad, copyDesktopItems, makeDesktopItem }: +{ lib, stdenv, SDL, SDL2, fetchurl, gzip, libvorbis, libmad +, Cocoa, CoreAudio, CoreFoundation, IOKit, OpenGL +, copyDesktopItems, makeDesktopItem +, useSDL2 ? stdenv.isDarwin # TODO: CoreAudio fails to initialize with SDL 1.x for some reason. +}: stdenv.mkDerivation rec { pname = "quakespasm"; - majorVersion = "0.93"; - version = "${majorVersion}.2"; + version = "0.94.1"; src = fetchurl { - url = "mirror://sourceforge/quakespasm/quakespasm-${version}.tgz"; - sha256 = "0qm0j5drybvvq8xadfyppkpk3rxqsxbywzm6iwsjwdf0iia3gss5"; + url = "mirror://sourceforge/quakespasm/quakespasm-${version}.tar.gz"; + sha256 = "19grpvsk3ikjypx9j0gpfsx5wanrqxkgf8dwl9h6ab5c8wwmjcjp"; }; sourceRoot = "${pname}-${version}/Quake"; - nativeBuildInputs = [ copyDesktopItems ]; - buildInputs = [ - gzip SDL libvorbis libmad + patches = lib.optionals stdenv.isDarwin [ + # Makes Darwin Makefile use system libraries instead of ones from app bundle + ./quakespasm-darwin-makefile-improvements.patch ]; - buildFlags = [ "DO_USERDIRS=1" ]; + nativeBuildInputs = [ copyDesktopItems ]; + buildInputs = [ + gzip libvorbis libmad (if useSDL2 then SDL2 else SDL) + ] ++ lib.optionals stdenv.isDarwin [ + Cocoa CoreAudio IOKit OpenGL + ] ++ lib.optionals (stdenv.isDarwin && useSDL2) [ + CoreFoundation + ]; + + buildFlags = [ + "DO_USERDIRS=1" + # Makefile defaults, set here to enforce consistency on Darwin build + "USE_CODEC_WAVE=1" + "USE_CODEC_MP3=1" + "USE_CODEC_VORBIS=1" + "USE_CODEC_FLAC=0" + "USE_CODEC_OPUS=0" + "USE_CODEC_MIKMOD=0" + "USE_CODEC_UMX=0" + "MP3LIB=mad" + "VORBISLIB=vorbis" + ] ++ lib.optionals useSDL2 [ + "SDL_CONFIG=sdl2-config" + "USE_SDL2=1" + ]; + + makefile = if (stdenv.isDarwin) then "Makefile.darwin" else "Makefile"; preInstall = '' mkdir -p "$out/bin" substituteInPlace Makefile --replace "/usr/local/games" "$out/bin" + substituteInPlace Makefile.darwin --replace "/usr/local/games" "$out/bin" + ''; + + postInstall = lib.optionalString stdenv.isDarwin '' + # Let's build app bundle + mkdir -p $out/Applications/Quake.app/Contents/MacOS + mkdir -p $out/Applications/Quake.app/Contents/Resources + cp ../MacOSX/Info.plist $out/Applications/Quake.app/Contents/ + cp ../MacOSX/QuakeSpasm.icns $out/Applications/Quake.app/Contents/Resources/ + cp -r ../MacOSX/English.lproj $out/Applications/Quake.app/Contents/Resources/ + ln -sf $out/bin/quake $out/Applications/Quake.app/Contents/MacOS/quake + + substituteInPlace $out/Applications/Quake.app/Contents/Info.plist \ + --replace '>''${EXECUTABLE_NAME}' '>quake' + substituteInPlace $out/Applications/Quake.app/Contents/Info.plist \ + --replace '>''${PRODUCT_NAME}' '>QuakeSpasm' ''; enableParallelBuilding = true; @@ -47,7 +92,7 @@ stdenv.mkDerivation rec { and smoother mouse input - though no CD support. ''; - platforms = platforms.linux; - maintainers = with maintainers; [ m3tti ]; + platforms = platforms.unix; + maintainers = with maintainers; [ mikroskeem m3tti ]; }; } diff --git a/pkgs/games/quakespasm/quakespasm-darwin-makefile-improvements.patch b/pkgs/games/quakespasm/quakespasm-darwin-makefile-improvements.patch new file mode 100644 index 000000000000..0f8af7550ea4 --- /dev/null +++ b/pkgs/games/quakespasm/quakespasm-darwin-makefile-improvements.patch @@ -0,0 +1,92 @@ +--- a/Makefile.darwin 2021-09-12 14:42:51.000000000 +0300 ++++ b/Makefile.darwin 2021-09-12 15:09:16.000000000 +0300 +@@ -49,6 +49,7 @@ + LIPO ?= lipo + + STRIP ?= strip ++PKG_CONFIG ?= pkg-config + + CPUFLAGS= + LDFLAGS = +@@ -84,9 +85,6 @@ + USE_RPATH=1 + endif + CFLAGS += $(CPUFLAGS) +-ifeq ($(USE_RPATH),1) +-LDFLAGS+=-Wl,-rpath,@executable_path/../Frameworks +-endif + + ifneq ($(DEBUG),0) + DFLAGS += -DDEBUG +@@ -115,19 +113,14 @@ + # not relying on sdl-config command and assuming + # /Library/Frameworks/SDL.framework is available + SDL_CFLAGS =-D_GNU_SOURCE=1 -D_THREAD_SAFE +-SDL_CFLAGS+=-DSDL_FRAMEWORK -DNO_SDL_CONFIG + ifeq ($(USE_SDL2),1) +-SDL_FRAMEWORK_NAME = SDL2 ++SDL_CONFIG ?= sdl2-config + else +-SDL_FRAMEWORK_NAME = SDL +-endif +-# default to our local SDL[2].framework for build +-SDL_FRAMEWORK_PATH ?=../MacOSX +-ifneq ($(SDL_FRAMEWORK_PATH),) +-SDL_LIBS +=-F$(SDL_FRAMEWORK_PATH) +-SDL_CFLAGS+=-F$(SDL_FRAMEWORK_PATH) ++SDL_CONFIG ?= sdl2-config + endif +-SDL_LIBS +=-Wl,-framework,$(SDL_FRAMEWORK_NAME) -Wl,-framework,Cocoa ++SDL_CFLAGS := $(shell $(SDL_CONFIG) --cflags) ++SDL_LIBS := $(shell $(SDL_CONFIG) --libs) ++SDL_LIBS += -Wl,-framework,Cocoa + + NET_LIBS := + +@@ -164,38 +157,26 @@ + endif + ifeq ($(USE_CODEC_FLAC),1) + CFLAGS+= -DUSE_CODEC_FLAC +-CODEC_INC = -I../MacOSX/codecs/include +-CODEC_LINK= -L../MacOSX/codecs/lib + CODECLIBS+= -lFLAC + endif + ifeq ($(USE_CODEC_OPUS),1) +-CFLAGS+= -DUSE_CODEC_OPUS +-CODEC_INC = -I../MacOSX/codecs/include +-CODEC_LINK= -L../MacOSX/codecs/lib +-CODECLIBS+= -lopusfile -lopus -logg ++CFLAGS+= -DUSE_CODEC_OPUS $(shell $(PKG_CONFIG) --cflags opusfile) ++CODECLIBS+= $(shell $(PKG_CONFIG) --libs opusfile) + endif + ifeq ($(USE_CODEC_VORBIS),1) + CFLAGS+= -DUSE_CODEC_VORBIS $(cpp_vorbisdec) +-CODEC_INC = -I../MacOSX/codecs/include +-CODEC_LINK= -L../MacOSX/codecs/lib + CODECLIBS+= $(lib_vorbisdec) + endif + ifeq ($(USE_CODEC_MP3),1) + CFLAGS+= -DUSE_CODEC_MP3 +-CODEC_INC = -I../MacOSX/codecs/include +-CODEC_LINK= -L../MacOSX/codecs/lib + CODECLIBS+= $(lib_mp3dec) + endif + ifeq ($(USE_CODEC_MIKMOD),1) + CFLAGS+= -DUSE_CODEC_MIKMOD +-CODEC_INC = -I../MacOSX/codecs/include +-CODEC_LINK= -L../MacOSX/codecs/lib + CODECLIBS+= -lmikmod + endif + ifeq ($(USE_CODEC_XMP),1) + CFLAGS+= -DUSE_CODEC_XMP +-CODEC_INC = -I../MacOSX/codecs/include +-CODEC_LINK= -L../MacOSX/codecs/lib + CODECLIBS+= -lxmp + endif + ifeq ($(USE_CODEC_UMX),1) +@@ -332,3 +313,5 @@ + clean: + rm -f $(shell find . \( -name '*~' -o -name '#*#' -o -name '*.o' -o -name '*.res' -o -name $(DEFAULT_TARGET) \) -print) + ++install: quakespasm ++ install -D -m 755 quakespasm /usr/local/games/quake diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix index b2c303caa54f..63da5d7a2b78 100644 --- a/pkgs/games/steam/fhsenv.nix +++ b/pkgs/games/steam/fhsenv.nix @@ -100,6 +100,11 @@ in buildFHSUserEnv rec { libva pipewire.lib + # steamwebhelper + harfbuzz + libthai + pango + # Not formally in runtime but needed by some games at-spi2-atk at-spi2-core # CrossCode @@ -114,7 +119,7 @@ in buildFHSUserEnv rec { xorg.libpciaccess udev # shadow of the tomb raider - ## screeps dependencies + # screeps dependencies gtk3 dbus zlib @@ -123,7 +128,6 @@ in buildFHSUserEnv rec { cairo freetype gdk-pixbuf - pango fontconfig # friends options won't display "Launch Game" without it @@ -188,7 +192,6 @@ in buildFHSUserEnv rec { nss fontconfig cairo - pango expat dbus cups diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix index 23e78dd848ed..564fbca37ba8 100644 --- a/pkgs/os-specific/linux/sysdig/default.nix +++ b/pkgs/os-specific/linux/sysdig/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg -DluaL_getn(L,i)=((int)lua_objlen(L,i))"; preConfigure = '' - cmakeFlagsArray+=(-DCMAKE_EXE_LINKER_FLAGS="-ltbb -lcurl") + cmakeFlagsArray+=(-DCMAKE_EXE_LINKER_FLAGS="-ltbb -lcurl -labsl_synchronization") export INSTALL_MOD_PATH="$out" '' + optionalString (kernel != null) '' diff --git a/pkgs/servers/matrix-synapse/plugins/mjolnir-antispam.nix b/pkgs/servers/matrix-synapse/plugins/mjolnir-antispam.nix index fbd5c68baa16..b4247561da59 100644 --- a/pkgs/servers/matrix-synapse/plugins/mjolnir-antispam.nix +++ b/pkgs/servers/matrix-synapse/plugins/mjolnir-antispam.nix @@ -2,13 +2,13 @@ buildPythonPackage rec { pname = "matrix-synapse-mjolnir-antispam"; - version = "0.1.17"; + version = "0.1.19"; src = fetchFromGitHub { owner = "matrix-org"; repo = "mjolnir"; rev = "v${version}"; - sha256 = "sha256-uBI5AllXWgl3eL60WZ/j11Tt7QpY7CKcmFQOU74/Qjs="; + sha256 = "09g2h5qj725745ljxff4vh05zy7lzcmvdz0bkxxhpjhs48jdlq3k"; }; sourceRoot = "./source/synapse_antispam"; diff --git a/pkgs/servers/unpackerr/default.nix b/pkgs/servers/unpackerr/default.nix index 0d1505a91ca2..3eaf95a45182 100644 --- a/pkgs/servers/unpackerr/default.nix +++ b/pkgs/servers/unpackerr/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "unpackerr"; - version = "0.9.7"; + version = "0.9.8"; src = fetchFromGitHub { owner = "davidnewhall"; repo = "unpackerr"; rev = "v${version}"; - sha256 = "sha256-OJDFPSXbJffiKW1SmMptPxj69YU7cuOU1LgIiInurCM="; + sha256 = "08xcxs4qh25qsjaf6wivhpszl61zdp59hlkd57igf9fv4lywb41q"; }; - vendorSha256 = "sha256-n8gRefr+MyiSaATG1mZrS3lx4oDEfbQ1LQxQ6vp5l0Y="; + vendorSha256 = "0ilpg7xfll0c5lsv8zf4h3i72yabddkddih4d292hczyz9wi3j4z"; buildInputs = lib.optionals stdenv.isDarwin [ Cocoa WebKit ]; diff --git a/pkgs/servers/web-apps/wiki-js/default.nix b/pkgs/servers/web-apps/wiki-js/default.nix index fcab309118b9..c16f3a88b378 100644 --- a/pkgs/servers/web-apps/wiki-js/default.nix +++ b/pkgs/servers/web-apps/wiki-js/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "wiki-js"; - version = "2.5.201"; + version = "2.5.214"; src = fetchurl { url = "https://github.com/Requarks/wiki/releases/download/${version}/${pname}.tar.gz"; - sha256 = "sha256-k2G+jUne/lq0dRJsIQpWlRFg1Nq92bM28YkawKOKlsI="; + sha256 = "sha256-EXysHhEJ41LMLRueEoFr+SE9SdJEXMZLhJQSvZgToTg="; }; sourceRoot = "."; diff --git a/pkgs/shells/zsh/zsh-fzf-tab/darwin.patch b/pkgs/shells/zsh/zsh-fzf-tab/darwin.patch new file mode 100644 index 000000000000..54b6ce26138a --- /dev/null +++ b/pkgs/shells/zsh/zsh-fzf-tab/darwin.patch @@ -0,0 +1,11 @@ +diff --git a/modules/Src/aloxaf/fzftab.c b/modules/Src/aloxaf/fzftab.c +index 60b6330..91975d8 100644 +--- a/modules/Src/aloxaf/fzftab.c ++++ b/modules/Src/aloxaf/fzftab.c +@@ -1,6 +1,5 @@ + #include "fzftab.mdh" + #include "fzftab.pro" +-#include + #include + #include + #include diff --git a/pkgs/shells/zsh/zsh-fzf-tab/default.nix b/pkgs/shells/zsh/zsh-fzf-tab/default.nix index ccf60e6d76af..ad1b7d3d740c 100644 --- a/pkgs/shells/zsh/zsh-fzf-tab/default.nix +++ b/pkgs/shells/zsh/zsh-fzf-tab/default.nix @@ -15,6 +15,8 @@ in stdenv.mkDerivation rec { buildInputs = [ ncurses ]; + patches = lib.optionals stdenv.isDarwin [ ./darwin.patch ]; + postConfigure = '' pushd modules ./configure --disable-gdbm --without-tcsetpgrp @@ -40,6 +42,6 @@ in stdenv.mkDerivation rec { description = "Replace zsh's default completion selection menu with fzf!"; license = licenses.mit; maintainers = with maintainers; [ vonfry ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } diff --git a/pkgs/tools/backup/android-backup-extractor/default.nix b/pkgs/tools/backup/android-backup-extractor/default.nix new file mode 100644 index 000000000000..8572efe6107f --- /dev/null +++ b/pkgs/tools/backup/android-backup-extractor/default.nix @@ -0,0 +1,38 @@ +{ stdenv +, lib +, fetchurl +, makeWrapper +, jre +}: + +stdenv.mkDerivation rec { + pname = "android-backup-extractor"; + version = "20210909062443-4c55371"; + + src = fetchurl { + url = "https://github.com/nelenkov/android-backup-extractor/releases/download/${version}/abe.jar"; + sha256 = "0ms241kb4h9y9apr637sb4kw5mml40c1ac0q4jcxhnwr3dr05w1q"; + }; + + dontUnpack = true; + dontConfigure = true; + dontBuild = true; + + nativeBuildInputs = [ makeWrapper ]; + + buildInputs = [ jre ]; + + installPhase = '' + runHook preInstall + install -D $src $out/lib/android-backup-extractor/abe.jar + makeWrapper ${jre}/bin/java $out/bin/abe --add-flags "-cp $out/lib/android-backup-extractor/abe.jar org.nick.abe.Main" + runHook postInstall + ''; + + meta = with lib; { + description = "Utility to extract and repack Android backups created with adb backup"; + homepage = "https://github.com/nelenkov/android-backup-extractor"; + license = licenses.asl20; + maintainers = with maintainers; [ prusnak ]; + }; +} diff --git a/pkgs/tools/backup/zfs-autobackup/default.nix b/pkgs/tools/backup/zfs-autobackup/default.nix new file mode 100644 index 000000000000..f6a684084661 --- /dev/null +++ b/pkgs/tools/backup/zfs-autobackup/default.nix @@ -0,0 +1,33 @@ +{ lib, python3Packages }: + +let + pythonPackages = python3Packages; + +in +pythonPackages.buildPythonApplication rec { + pname = "zfs_autobackup"; + version = "3.1"; + + src = pythonPackages.fetchPypi { + inherit pname version; + sha256 = "42c22001717b3d7cfdae6297fedc11b2dd1eb2a4bd25b6bb1c9232dd3b70ad67"; + }; + + # argparse is part of the standardlib + prePatch = '' + substituteInPlace setup.py --replace "argparse" "" + ''; + + propagatedBuildInputs = with pythonPackages; [ colorama ]; + + # tests need zfs filesystem + doCheck = false; + pythonImportsCheck = [ "colorama" "argparse" ]; + + meta = with lib; { + homepage = "https://github.com/psy0rz/zfs_autobackup"; + description = "ZFS backup, replicationand snapshot tool"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ mschneider ]; + }; +} diff --git a/pkgs/tools/graphics/gnuplot/default.nix b/pkgs/tools/graphics/gnuplot/default.nix index b46fd88ab99d..741468dfd994 100644 --- a/pkgs/tools/graphics/gnuplot/default.nix +++ b/pkgs/tools/graphics/gnuplot/default.nix @@ -2,6 +2,7 @@ , cairo, gd, libcerf, pango, readline, zlib , withTeXLive ? false, texlive , withLua ? false, lua +, withCaca ? false, libcaca , libX11 ? null , libXt ? null , libXpm ? null @@ -33,6 +34,7 @@ in [ cairo gd libcerf pango readline zlib ] ++ lib.optional withTeXLive (texlive.combine { inherit (texlive) scheme-small; }) ++ lib.optional withLua lua + ++ lib.optional withCaca libcaca ++ lib.optionals withX [ libX11 libXpm libXt libXaw ] ++ lib.optionals withQt [ qtbase qtsvg ] ++ lib.optional withWxGTK wxGTK; @@ -46,7 +48,7 @@ in (if withX then "--with-x" else "--without-x") (if withQt then "--with-qt=qt5" else "--without-qt") (if aquaterm then "--with-aquaterm" else "--without-aquaterm") - ]; + ] ++ lib.optional withCaca "--with-caca"; CXXFLAGS = lib.optionalString (stdenv.isDarwin && withQt) "-std=c++11"; diff --git a/pkgs/tools/misc/quich/default.nix b/pkgs/tools/misc/quich/default.nix index ea4fbc7eead4..1b54eb01112c 100644 --- a/pkgs/tools/misc/quich/default.nix +++ b/pkgs/tools/misc/quich/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "quich"; - version = "3.1.0"; + version = "4.0.0"; src = fetchFromGitHub { owner = "Usbac"; repo = pname; rev = "v${version}"; - sha256 = "1n9c01q2v6g9wnmxp248yclhp8cxclnj0yyn1qrvjsn6srcpr22c"; + sha256 = "sha256-4gsSjLZ7Z4ErNqe86Fy5IrzLMfvDyY18sE0yBnj9bvM="; }; doCheck = true; diff --git a/pkgs/applications/networking/cluster/cni/plugin-flannel.nix b/pkgs/tools/networking/flannel/plugin.nix similarity index 93% rename from pkgs/applications/networking/cluster/cni/plugin-flannel.nix rename to pkgs/tools/networking/flannel/plugin.nix index 69a4718d6039..657be79b61bf 100644 --- a/pkgs/applications/networking/cluster/cni/plugin-flannel.nix +++ b/pkgs/tools/networking/flannel/plugin.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub }: buildGoModule { pname = "cni-plugin-flannel"; diff --git a/pkgs/tools/networking/linux-router/default.nix b/pkgs/tools/networking/linux-router/default.nix new file mode 100644 index 000000000000..a378a729c7b5 --- /dev/null +++ b/pkgs/tools/networking/linux-router/default.nix @@ -0,0 +1,81 @@ +{ stdenv, lib, fetchFromGitHub, makeWrapper + +# --- Runtime Dependencies --- +, bash, procps, iproute2, dnsmasq, iptables +, coreutils, flock, gawk, getopt, gnugrep, gnused, which +# `nmcli` is not required for create_ap. +# Use NetworkManager by default because it is very likely already present +, useNetworkManager ? true +, networkmanager + +# --- WiFi Hotspot Dependencies --- +, useWifiDependencies ? true +, hostapd, iw +# You only need this if 'iw' can not recognize your adapter. +, useWirelessTools ? true +, wirelesstools # for iwconfig +# To fall back to haveged if entropy is low. +# Defaulting to false because not having it does not break things. +# If it is really needed, warnings will be logged to journal. +, useHaveged ? false +, haveged +# You only need this if you wish to show WiFi QR codes in terminal +, useQrencode ? true +, qrencode +}: + +stdenv.mkDerivation rec { + pname = "linux-router"; + version = "0.6.2"; + + src = fetchFromGitHub { + owner = "garywill"; + repo = "linux-router"; + rev = "${version}"; + sha256 = "193bnlwmjxsk0cri6xdylf218qayldn02pdnppvbd39ls361776z"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + dontBuild = true; + + installPhase = with lib; let + binPath = makeBinPath ([ procps iproute2 getopt bash dnsmasq + iptables coreutils which flock gnugrep gnused gawk ] + ++ optional useNetworkManager networkmanager + ++ optional useWifiDependencies hostapd + ++ optional useWifiDependencies iw + ++ optional (useWifiDependencies && useWirelessTools) wirelesstools + ++ optional (useWifiDependencies && useHaveged) haveged + ++ optional (useWifiDependencies && useQrencode) qrencode); + in + '' + mkdir -p $out/bin/ $out/.bin-wrapped + mv lnxrouter $out/.bin-wrapped/lnxrouter + makeWrapper $out/.bin-wrapped/lnxrouter $out/bin/lnxrouter --prefix PATH : ${binPath} + ''; + + meta = with lib; { + homepage = "https://github.com/garywill/linux-router"; + description = "Set Linux as router / Wifi hotspot / proxy in one command"; + longDescription = '' + Features: + + - Create a NATed sub-network + - Provide Internet + - DHCP server and RA + - DNS server + - IPv6 (behind NATed LAN, like IPv4) + - Creating Wifi hotspot: + - Channel selecting + - Choose encryptions: WPA2/WPA, WPA2, WPA, No encryption + - Create AP on the same interface you are getting Internet (require same channel) + - Transparent proxy (redsocks) + - DNS proxy + - Compatible with NetworkManager (automatically set interface as unmanaged) + ''; + license = licenses.lgpl21; + maintainers = with maintainers; [ x3ro ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/tools/networking/networkmanager/libnma/default.nix b/pkgs/tools/networking/networkmanager/libnma/default.nix index 50fc66a8d68b..14a7e11aade1 100644 --- a/pkgs/tools/networking/networkmanager/libnma/default.nix +++ b/pkgs/tools/networking/networkmanager/libnma/default.nix @@ -24,13 +24,13 @@ stdenv.mkDerivation rec { pname = "libnma"; - version = "1.8.30"; + version = "1.8.32"; outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "1d5gzn7ss5vi0bhc8s4i5gsrck1ajslajam5jxfqazg094mffcys"; + sha256 = "Cle5Oi+tQ6zHY/Mg3Tp6k8QpsOMRjfpUnWeCTN3E6QU="; }; patches = [ diff --git a/pkgs/tools/networking/stuntman/default.nix b/pkgs/tools/networking/stuntman/default.nix new file mode 100644 index 000000000000..1825a3971a74 --- /dev/null +++ b/pkgs/tools/networking/stuntman/default.nix @@ -0,0 +1,45 @@ +{ stdenv, lib, fetchFromGitHub, openssl, boost }: + +stdenv.mkDerivation { + pname = "stuntman"; + version = "1.2.16"; + + src = fetchFromGitHub { + owner = "jselbie"; + repo = "stunserver"; + rev = "cfadf9c3836d5ae63a682913de24ba085df924f3"; + sha256 = "1gcx4zj44f0viddnn5klkmq0dgd29av5p06iyf9f1va4a3lk0cbg"; + }; + + buildInputs = [ + boost + openssl + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + mv stunserver $out/bin/ + mv stunclient $out/bin/ + + runHook postInstall + ''; + + doCheck = true; + checkPhase = '' + runHook preCheck + + ./stuntestcode + + runHook postCheck + ''; + + meta = with lib; { + description = "STUNTMAN - an open source STUN server and client"; + homepage = "http://www.stunprotocol.org/"; + license = licenses.asl20; + maintainers = with maintainers; [ mattchrist ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/networking/v2ray/default.nix b/pkgs/tools/networking/v2ray/default.nix index 33fbd5bc92f5..719e1d9b44f3 100644 --- a/pkgs/tools/networking/v2ray/default.nix +++ b/pkgs/tools/networking/v2ray/default.nix @@ -3,22 +3,22 @@ }: let - version = "4.41.1"; + version = "4.42.1"; src = fetchFromGitHub { owner = "v2fly"; repo = "v2ray-core"; rev = "v${version}"; - sha256 = "14zqvmf7xa4knmc57ck1ns0i0va0223qdp64qmm3q2w82dh9mnb8"; + sha256 = "19xkbkzv9bgj68kmvrxsdqzx40vlyvzl8nn2n19hwwmkrazqgf04"; }; - vendorSha256 = "sha256-K8gFF9TbhVgNOySz7nhPFIdSNWNYKUyFD0LIk6acnkc="; + vendorSha256 = "sha256-N1DYV0zSzCepkRMbcQUHqjITvmGahYKNn1uhL+csMSc="; assets = { # MIT licensed "geoip.dat" = let - geoipRev = "202107290023"; - geoipSha256 = "14xgy0bsamj2k4knfs1r453yp27wq8qmjqifq63zbp4lb9v8xnjy"; + geoipRev = "202109102251"; + geoipSha256 = "0qh8yf0m6sna3z5i2plbgw61q08qcfcx0l1z5bmwxijagf1yb7fa"; in fetchurl { url = "https://github.com/v2fly/geoip/releases/download/${geoipRev}/geoip.dat"; sha256 = geoipSha256; @@ -26,8 +26,8 @@ let # MIT licensed "geosite.dat" = let - geositeRev = "20210727125446"; - geositeSha256 = "14z1419dkbippm12z6gvwh3q1wd6x1p4sk6zp2i4qa408i1gc81c"; + geositeRev = "20210910080130"; + geositeSha256 = "0d6bzrs5mhca59j1w73kqw10jqkwic9ywm3jvszpd077qwh64dwn"; in fetchurl { url = "https://github.com/v2fly/domain-list-community/releases/download/${geositeRev}/dlc.dat"; sha256 = geositeSha256; diff --git a/pkgs/tools/networking/wicd/default.nix b/pkgs/tools/networking/wicd/default.nix deleted file mode 100644 index e4eb0a2cdc8c..000000000000 --- a/pkgs/tools/networking/wicd/default.nix +++ /dev/null @@ -1,121 +0,0 @@ -{ lib, stdenv, fetchurl, python2Packages -, wpa_supplicant, dhcp, dhcpcd, wirelesstools -, nettools, openresolv, iproute2, iputils }: - -let - inherit (python2Packages) python pygobject2 dbus-python pyGtkGlade pycairo; -in stdenv.mkDerivation rec { - pname = "wicd"; - version = "1.7.2.4"; - - src = fetchurl { - url = "https://launchpad.net/wicd/1.7/${version}/+download/${pname}-${version}.tar.gz"; - sha256 = "15ywgh60xzmp5z8l1kzics7yi95isrjg1paz42dvp7dlpdfzpzfw"; - }; - - buildInputs = with python2Packages; [ - python Babel urwid notify - ]; - - patches = [ - ./no-var-install.patch - ./pygtk.patch - ./no-optimization.patch - ./dhclient.patch - ./fix-app-icon.patch - ./fix-gtk-issues.patch - ./urwid-api-update.patch - ./fix-curses.patch - ]; - - # Should I be using pygtk's propagated build inputs? - # !!! Should use makeWrapper. - postPatch = '' - # We don't have "python2". - substituteInPlace wicd/wicd-daemon.py --replace 'misc.find_path("python2")' "'${python.interpreter}'" - - substituteInPlace in/scripts=wicd.in --subst-var-by TEMPLATE-DEFAULT $out/share/other/dhclient.conf.template.default - - sed -i "2iexport PATH=${lib.makeBinPath [ python wpa_supplicant dhcpcd dhcp wirelesstools nettools nettools iputils openresolv iproute2 ]}\$\{PATH:+:\}\$PATH" in/scripts=wicd.in - sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pygobject2}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd.in - sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-client.in - sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pygobject2})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-client.in - sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-gtk.in - sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pygobject2})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python}):$(toPythonPath ${python2Packages.notify})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-gtk.in - sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-cli.in - sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-cli.in - sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-curses.in - sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python}):$(toPythonPath ${python2Packages.urwid})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-curses.in - rm po/ast.po - ''; - - configurePhase = '' - python setup.py configure \ - --lib=$out/lib/ \ - --share=$out/share/ \ - --etc=/var/lib/wicd/ \ - --scripts=$out/etc/scripts/ \ - --pixmaps=$out/share/pixmaps/ \ - --images=$out/share/pixmaps/wicd/ \ - --encryption=$out/etc/encryption/templates/ \ - --bin=$out/bin/ \ - --sbin=$out/sbin/ \ - --backends=$out/share/backends/ \ - --daemon=$out/share/daemon/ \ - --curses=$out/share/curses/ \ - --gtk=$out/share/gtk/ \ - --cli=$out/share/cli/ \ - --networks=/var/lib/wicd/configurations/ \ - --resume=$out/etc/acpi/resume.d/ \ - --suspend=$out/etc/acpi/suspend.d/ \ - --pmutils=$out/lib/pm-utils/sleep.d/ \ - --dbus=$out/etc/dbus-1/system.d/ \ - --dbus-service=$out/etc/dbus-1/system-services/ \ - --systemd=$out/lib/systemd/ \ - --logrotate=$out/etc/logrotate.d/ \ - --desktop=$out/share/applications/ \ - --icons=$out/share/icons/hicolor/ \ - --translations=$out/share/locale/ \ - --autostart=$out/etc/xdg/autostart/ \ - --varlib=$out/var/lib/ \ - --docdir=$out/share/doc/ \ - --mandir=$out/share/man/ \ - --kdedir=$out/share/autostart/ \ - --python=${python}/bin/python \ - --distro=nix \ - --wicdgroup=users \ - --no-install-init \ - --no-install-kde \ - --no-install-acpi \ - --no-install-pmutils \ - ''; - - installPhase = '' - python setup.py install --prefix=$out --install-lib=$out/${python.sitePackages} - mkdir -p $out/share/other - cp other/dhclient.conf.template.default $out/share/other/dhclient.conf.template.default - - # Add a template for "WPA2 Enterprise" encryption as used, e.g., by the - # Eduroam network. Taken and adapted from - # . - cp -v "${./wpa2-ttls}" "$out/etc/encryption/templates/wpa2-ttls" - echo "wpa2-ttls" >> "$out/etc/encryption/templates/active" - ''; - - meta = with lib; { - homepage = "http://wicd.net/"; - description = "A wiredless and wired network manager"; - longDescription='' - A complete network connection manager - Wicd supports wired and wireless networks, and capable of - creating and tracking profiles for both. It has a - template-based wireless encryption system, which allows the user - to easily add encryption methods used. It ships with some common - encryption types, such as WPA and WEP. Wicd will automatically - connect at startup to any preferred network within range. - ''; - maintainers = [ maintainers.roconnor ]; - license = licenses.gpl2; - platforms = platforms.linux; - }; -} diff --git a/pkgs/tools/networking/wicd/dhclient.patch b/pkgs/tools/networking/wicd/dhclient.patch deleted file mode 100644 index fbda1caacb7a..000000000000 --- a/pkgs/tools/networking/wicd/dhclient.patch +++ /dev/null @@ -1,120 +0,0 @@ -diff -ruN wicd-1.7.2.4.orig/wicd/wicd-daemon.py wicd-1.7.2.4/wicd/wicd-daemon.py ---- wicd-1.7.2.4.orig/wicd/wicd-daemon.py 2013-06-22 18:55:02.641242947 +0000 -+++ wicd-1.7.2.4/wicd/wicd-daemon.py 2013-06-22 18:58:33.990244153 +0000 -@@ -69,6 +69,7 @@ - wireless_conf = os.path.join(wpath.etc, "wireless-settings.conf") - wired_conf = os.path.join(wpath.etc, "wired-settings.conf") - dhclient_conf = os.path.join(wpath.etc, "dhclient.conf.template") -+dhclient_conf_default = os.path.join(wpath.share, "other", "dhclient.conf.template.default") - - class WicdDaemon(dbus.service.Object): - """ The main wicd daemon class. -@@ -910,7 +911,7 @@ - - if not os.path.isfile(dhclient_conf): - print "dhclient.conf.template not found, copying..." -- shutil.copy(dhclient_conf + ".default", dhclient_conf) -+ shutil.copy(dhclient_conf_default, dhclient_conf) - # Hide the files, so the keys aren't exposed. - print "chmoding configuration files 0600..." - os.chmod(app_conf.get_config(), 0600)diff -ruN wicd-1.7.2.4.orig/wicd/wnettools.py wicd-1.7.2.4/wicd/wnettools.py ---- wicd-1.7.2.4.orig/wicd/wnettools.py 2013-03-30 21:47:19.804907552 +0000 -+++ wicd-1.7.2.4/wicd/wnettools.py 2013-03-31 08:44:37.572792110 +0000 -@@ -37,6 +37,7 @@ - import time - from string import maketrans, translate - -+import tempfile - import wpath - import misc - from misc import find_path -@@ -216,6 +217,7 @@ - self.flush_tool = None - self.link_detect = None - self.dhcp_object = None -+ self.dhclient_conf_path = None; - - def SetDebugMode(self, value): - """ If True, verbose output is enabled. """ -@@ -277,12 +279,6 @@ - cmd = "" - return (client, cmd) - -- # probably /var/lib/wicd/dhclient.conf with defaults -- dhclient_conf_path = os.path.join( -- wpath.varlib, -- 'dhclient.conf' -- ) -- - client_dict = { - "dhclient" : - {'connect' : r"%(cmd)s -cf %(dhclientconf)s %(iface)s", -@@ -307,41 +303,44 @@ - } - (client_name, cmd) = get_client_name(self.DHCP_CLIENT) - -- # cause dhclient doesn't have a handy dandy argument -- # for specifing the hostname to be sent -- if client_name == "dhclient" and flavor: -- if hostname == None: -- # will use the system hostname -- # we'll use that if there is hostname passed -- # that shouldn't happen, though -- hostname = '' -- print 'attempting to set hostname with dhclient' -- print 'using dhcpcd or another supported client may work better' -- dhclient_template = \ -- open(os.path.join(wpath.etc, 'dhclient.conf.template'), 'r') -- -- output_conf = open(dhclient_conf_path, 'w') -- -- for line in dhclient_template.readlines(): -- line = line.replace('$_HOSTNAME', hostname) -- output_conf.write(line) -- -- output_conf.close() -- dhclient_template.close() -- os.chmod(dhclient_conf_path, 0644) -- - if not client_name or not cmd: - print "WARNING: Failed to find a valid dhcp client!" - return "" - - if flavor == "connect": -+ # cause dhclient doesn't have a handy dandy argument -+ # for specifing the hostname to be sent -+ if client_name == "dhclient" and flavor: -+ if hostname == None: -+ # will use the system hostname -+ # we'll use that if there is hostname passed -+ # that shouldn't happen, though -+ hostname = '' -+ print 'attempting to set hostname with dhclient' -+ print 'using dhcpcd or another supported client may work better' -+ if not self.dhclient_conf_path: -+ _,self.dhclient_conf_path = tempfile.mkstemp() -+ print 'New dhclient conf path: %s ' % self.dhclient_conf_path -+ dhclient_template = \ -+ open(os.path.join(wpath.etc, 'dhclient.conf.template'), 'r') -+ -+ output_conf = open(self.dhclient_conf_path, 'w') -+ -+ for line in dhclient_template.readlines(): -+ line = line.replace('$_HOSTNAME', hostname) -+ output_conf.write(line) -+ -+ output_conf.close() -+ dhclient_template.close() -+ os.chmod(self.dhclient_conf_path, 0644) -+ - if not hostname: - hostname = os.uname()[1] - return client_dict[client_name]['connect'] % \ - { "cmd" : cmd, - "iface" : self.iface, - "hostname" : hostname, -- 'dhclientconf' : dhclient_conf_path } -+ 'dhclientconf' : self.dhclient_conf_path } - elif flavor == "release": - return client_dict[client_name]['release'] % {"cmd":cmd, "iface":self.iface} - else: diff --git a/pkgs/tools/networking/wicd/fix-app-icon.patch b/pkgs/tools/networking/wicd/fix-app-icon.patch deleted file mode 100644 index 31b47bb45881..000000000000 --- a/pkgs/tools/networking/wicd/fix-app-icon.patch +++ /dev/null @@ -1,19 +0,0 @@ -Someone forgot to pack wicd.png icon. We will replace it with existing one. - -diff -ruN wicd-1.7.2.4.orig/gtk/gui.py wicd-1.7.2.4/gtk/gui.py ---- wicd-1.7.2.4.orig/gtk/gui.py 2013-03-30 21:47:19.802907553 +0000 -+++ wicd-1.7.2.4/gtk/gui.py 2013-03-31 08:13:32.876871673 +0000 -@@ -205,8 +205,10 @@ - - self.status_area.hide_all() - -- if os.path.exists(os.path.join(wpath.images, "wicd.png")): -- self.window.set_icon_from_file(os.path.join(wpath.images, "wicd.png")) -+ if os.path.exists(os.path.join(wpath.images, "../../icons/hicolour/128x128/apps/wicd-gtk.png")): -+ self.window.set_icon_from_file(os.path.join(wpath.images, "../../icons/hicolor/128x128/apps/wicd-gtk.png")) -+ else: -+ print 'icon doesn\'t exist %s' % os.path.join(wpath.images, "../../icons/hicolor/128x128/apps/wicd-gtk.png") - self.statusID = None - self.first_dialog_load = True - self.is_visible = True - diff --git a/pkgs/tools/networking/wicd/fix-curses.patch b/pkgs/tools/networking/wicd/fix-curses.patch deleted file mode 100644 index 138dfbabfd5c..000000000000 --- a/pkgs/tools/networking/wicd/fix-curses.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/curses/wicd-curses.py 2015-01-27 22:35:25.414781192 -0300 -+++ b/curses/wicd-curses.py 2015-01-28 01:13:48.078904587 -0300 -@@ -1153,9 +1153,10 @@ - if not ui._started: - return False - -- input_data = ui.get_input_nonblocking() -+ ui.set_input_timeouts(max_wait=0) -+ input_data = ui.get_input() - # Resolve any "alarms" in the waiting -- self.handle_keys(input_data[1]) -+ self.handle_keys(input_data) - - # Update the screen - canvas = self.frame.render((self.size), True) diff --git a/pkgs/tools/networking/wicd/fix-gtk-issues.patch b/pkgs/tools/networking/wicd/fix-gtk-issues.patch deleted file mode 100644 index 31e553b46b50..000000000000 --- a/pkgs/tools/networking/wicd/fix-gtk-issues.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -ruN wicd-1.7.2.4.orig/gtk/gui.py wicd-1.7.2.4/gtk/gui.py ---- wicd-1.7.2.4.orig/gtk/gui.py 2013-03-31 17:01:29.367001288 +0000 -+++ wicd-1.7.2.4/gtk/gui.py 2013-03-31 17:55:20.826028396 +0000 -@@ -35,7 +35,7 @@ - from wicd import misc - from wicd import wpath - from wicd import dbusmanager --from wicd.misc import noneToString -+from wicd.misc import noneToString, _status_dict - from wicd.translations import _, language - import prefs - from prefs import PreferencesDialog -@@ -250,7 +250,7 @@ - - def handle_connection_results(self, results): - if results not in ['success', 'aborted'] and self.is_visible: -- error(self.window, language[results], block=False) -+ error(self.window, misc._status_dict[results], block=False) - - def create_adhoc_network(self, widget=None): - """ Shows a dialog that creates a new adhoc network. """ -diff -ruN wicd-1.7.2.4.orig/po/ru.po wicd-1.7.2.4/po/ru.po ---- wicd-1.7.2.4.orig/po/ru.po 2013-03-31 17:01:29.362001288 +0000 -+++ wicd-1.7.2.4/po/ru.po 2013-03-31 17:43:37.909022515 +0000 -@@ -173,7 +173,7 @@ - - #: wicd/misc.py:79 - msgid "Connection Failed: Bad password" --msgstr "Ошибка соединения: Неверный пароль:" -+msgstr "Ошибка соединения: Неверный пароль" - - #: wicd/misc.py:89 - msgid "Connection Failed: No DHCP offers received." -diff -ruN wicd-1.7.2.4.orig/wicd/misc.py wicd-1.7.2.4/wicd/misc.py ---- wicd-1.7.2.4.orig/wicd/misc.py 2013-03-31 17:01:29.369001288 +0000 -+++ wicd-1.7.2.4/wicd/misc.py 2013-03-31 17:23:56.822012593 +0000 -@@ -430,7 +430,9 @@ - """ Sanitize property names to be used in config-files. """ - allowed = string.ascii_letters + '_' + string.digits - table = string.maketrans(allowed, ' ' * len(allowed)) -- return s.translate(None, table) -+ #return s.translate(None, table) -+ #return s.translate(table) -+ return s - - def sanitize_escaped(s): - """ Sanitize double-escaped unicode strings. """ diff --git a/pkgs/tools/networking/wicd/no-optimization.patch b/pkgs/tools/networking/wicd/no-optimization.patch deleted file mode 100644 index 785cae7b6ed5..000000000000 --- a/pkgs/tools/networking/wicd/no-optimization.patch +++ /dev/null @@ -1,21 +0,0 @@ -With optimizations on, python will overwrite the nix store. - ---- wicd-1.7.0/in/scripts=wicd.in 2011-04-05 14:31:09.733096865 -0400 -+++ wicd-1.7.0/in/scripts=wicd.in 2011-04-05 14:31:16.397096864 -0400 -@@ -1,3 +1,3 @@ - #!/bin/bash - --exec %PYTHON% -O %SHARE%daemon/wicd-daemon.py $@ -+exec %PYTHON% -B %SHARE%daemon/wicd-daemon.py $@ - ---- wicd-1.7.2.4/wicd/wicd-daemon.py 2012-04-30 21:19:45.000000000 +0200 -+++ wicd-1.7.2.4/wicd/wicd-daemon.pynew 2013-03-14 21:35:23.250306592 +0100 -@@ -1812,7 +1812,7 @@ - daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect) - child_pid = None - if not no_poll: -- child_pid = Popen([wpath.python, "-O", -+ child_pid = Popen([wpath.python, "-B", - os.path.join(wpath.daemon, "monitor.py")], - shell=False, close_fds=True).pid - atexit.register(on_exit, child_pid) diff --git a/pkgs/tools/networking/wicd/no-var-install.patch b/pkgs/tools/networking/wicd/no-var-install.patch deleted file mode 100644 index b01f0e5a438a..000000000000 --- a/pkgs/tools/networking/wicd/no-var-install.patch +++ /dev/null @@ -1,17 +0,0 @@ -The install tries to create files in /var. This patch removes those steps. - ---- wicd-1.7.2.4/setup.py 2013-03-14 21:28:21.360580941 +0100 -+++ wicd-1.7.2.4/setup.py 2013-03-14 21:22:50.125721943 +0100 -@@ -505,11 +505,8 @@ - (wpath.dbus_service, ['other/org.wicd.daemon.service']), - (wpath.systemd, ['other/wicd.service']), - (wpath.logrotate, ['other/wicd.logrotate']), -- (wpath.log, [empty_file]), -- (wpath.etc, ['other/dhclient.conf.template.default']), - (wpath.encryption, [('encryption/templates/' + b) for b in - os.listdir('encryption/templates') if not b.startswith('.')]), -- (wpath.networks, [empty_file]), - (wpath.sbin, ['scripts/wicd']), - (wpath.daemon, ['wicd/monitor.py', 'wicd/wicd-daemon.py', - 'wicd/suspend.py', 'wicd/autoconnect.py']), - diff --git a/pkgs/tools/networking/wicd/pygtk.patch b/pkgs/tools/networking/wicd/pygtk.patch deleted file mode 100644 index f015e50d684a..000000000000 --- a/pkgs/tools/networking/wicd/pygtk.patch +++ /dev/null @@ -1,15 +0,0 @@ -For some reason nix's pygtk doesn't have a pygtk module so we remove the version check. -If this ever changes we could remove this patch. - ---- wicd-1.7.0/gtk/wicd-client.py 2009-09-01 11:05:31.000000000 -0400 -+++ wicd-1.7.0/gtk/wicd-client.py 2009-12-28 00:22:57.000000000 -0500 -@@ -43,9 +43,6 @@ - import atexit - from dbus import DBusException - --import pygtk --pygtk.require('2.0') -- - HAS_NOTIFY = True - try: - import pynotify diff --git a/pkgs/tools/networking/wicd/urwid-api-update.patch b/pkgs/tools/networking/wicd/urwid-api-update.patch deleted file mode 100644 index a794f6caaeee..000000000000 --- a/pkgs/tools/networking/wicd/urwid-api-update.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/curses/curses_misc.py -+++ a/curses/curses_misc.py -@@ -358,6 +358,19 @@ class ComboBox(urwid.WidgetWrap): - self.parent = None - self.ui = None - self.row = None -+ -+ @property -+ def focus(self): -+ return self._focus -+ -+ @focus.setter -+ def focus(self, index): -+ self._focus = index -+ -+ @focus.deleter -+ def focus(self): -+ del self._focus -+ - def set_list(self,list): - self.list = list diff --git a/pkgs/tools/networking/wicd/wpa2-ttls b/pkgs/tools/networking/wicd/wpa2-ttls deleted file mode 100644 index 650375cbbaae..000000000000 --- a/pkgs/tools/networking/wicd/wpa2-ttls +++ /dev/null @@ -1,20 +0,0 @@ -name = WPA2-TTLS -author = various contributors -version = 1 -require identity *Identity anonymous_identity *Anonymous_identity password *Password ca_cert *Path_to_CA_Cert -protected password *Password ------ -ctrl_interface=/run/wpa_supplicant -network={ - ssid="$_ESSID" - scan_ssid=$_SCAN - proto=WPA2 - key_mgmt=WPA-EAP - group=CCMP TKIP - eap=TTLS - identity="$_IDENTITY" - password="$_PASSWORD" - anonymous_identity="$_ANONYMOUS_IDENTITY" - ca_cert="$_CA_CERT" - phase2="auth=PAP" -} diff --git a/pkgs/tools/security/nuclei/default.nix b/pkgs/tools/security/nuclei/default.nix index cae010c5a19f..d02ac5503afd 100644 --- a/pkgs/tools/security/nuclei/default.nix +++ b/pkgs/tools/security/nuclei/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "nuclei"; - version = "2.5.0"; + version = "2.5.1"; src = fetchFromGitHub { owner = "projectdiscovery"; repo = pname; rev = "v${version}"; - sha256 = "sha256-6mZ8XstophadNk/3zJe2n3WL4u34jjnWh9m2qrt06hw="; + sha256 = "sha256-SdN8M3Mr3bywpBUwIVOIctYdkueq/0no4wlI7Ft8Uws="; }; - vendorSha256 = "sha256-tJ9cdZloTSXoytmMJ+6S5XAKHYs16SZmbUwZdmVnDzc="; + vendorSha256 = "sha256-Tz96AXGMyHNHG/3JrmZvisOEty/tDhoK1ZUngDSXOcc="; modRoot = "./v2"; subPackages = [ diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index a7b3a40a875e..fd4302a50c62 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -948,6 +948,7 @@ mapAliases ({ webkitgtk24x-gtk3 = throw "webkitgtk24x-gtk3 has been removed because it's insecure. Please use webkitgtk."; # added 2019-12-05 webkitgtk24x-gtk2 = throw "webkitgtk24x-gtk2 has been removed because it's insecure. Please use webkitgtk."; # added 2019-12-05 weechat-matrix-bridge = weechatScripts.weechat-matrix-bridge; # added 2018-09-06 + wicd = throw "wicd has been removed as it is abandoned."; # added 2021-09-11 wineStaging = wine-staging; # added 2018-01-08 winusb = woeusb; # added 2017-12-22 winstone = throw "winstone is not supported anymore. Alternatives are Jetty or Tomcat."; # added 2019-05-14 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5a0be5f8ff3f..694dbd04f0a6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -899,6 +899,10 @@ with pkgs; gofu = callPackage ../applications/misc/gofu { }; + linux-router = callPackage ../tools/networking/linux-router { }; + + linux-router-without-wifi = linux-router.override { useWifiDependencies = false; }; + metapixel = callPackage ../tools/graphics/metapixel { }; pferd = callPackage ../tools/misc/pferd {}; @@ -1105,6 +1109,8 @@ with pkgs; analog = callPackage ../tools/admin/analog {}; + android-backup-extractor = callPackage ../tools/backup/android-backup-extractor {}; + android-tools = lowPrio (callPackage ../tools/misc/android-tools { stdenv = if stdenv.targetPlatform.isAarch64 then gcc10Stdenv else stdenv; }); @@ -4881,6 +4887,7 @@ with pkgs; fgallery = callPackage ../tools/graphics/fgallery { }; flannel = callPackage ../tools/networking/flannel { }; + cni-plugin-flannel = callPackage ../tools/networking/flannel/plugin.nix {}; flare = callPackage ../games/flare { inherit (darwin.apple_sdk.frameworks) Cocoa; @@ -9319,6 +9326,8 @@ with pkgs; stunnel = callPackage ../tools/networking/stunnel { }; + stuntman = callPackage ../tools/networking/stuntman { }; + stutter = haskell.lib.justStaticExecutables haskellPackages.stutter; strongswan = callPackage ../tools/networking/strongswan { }; @@ -10356,8 +10365,6 @@ with pkgs; chase = callPackage ../tools/system/chase { }; - wicd = callPackage ../tools/networking/wicd { }; - wimlib = callPackage ../tools/archivers/wimlib { }; wipe = callPackage ../tools/security/wipe { }; @@ -10563,6 +10570,8 @@ with pkgs; zerofree = callPackage ../tools/filesystems/zerofree { }; + zfs-autobackup = callPackage ../tools/backup/zfs-autobackup { }; + zfsbackup = callPackage ../tools/backup/zfsbackup { }; zfstools = callPackage ../tools/filesystems/zfstools { }; @@ -16231,6 +16240,8 @@ with pkgs; http-parser = callPackage ../development/libraries/http-parser { }; + hubble = callPackage ../applications/networking/cluster/hubble { }; + hunspell = callPackage ../development/libraries/hunspell { }; hunspellDicts = recurseIntoAttrs (callPackages ../development/libraries/hunspell/dictionaries.nix {}); @@ -23954,7 +23965,6 @@ with pkgs; cni = callPackage ../applications/networking/cluster/cni {}; cni-plugins = callPackage ../applications/networking/cluster/cni/plugins.nix {}; - cni-plugin-flannel = callPackage ../applications/networking/cluster/cni/plugin-flannel.nix {}; dnsname-cni = callPackage ../applications/networking/cluster/dnsname-cni {}; @@ -29490,7 +29500,9 @@ with pkgs; ecwolf = callPackage ../games/ecwolf { }; - eduke32 = callPackage ../games/eduke32 { }; + eduke32 = callPackage ../games/eduke32 { + inherit (darwin.apple_sdk.frameworks) AGL Cocoa GLUT OpenGL; + }; egoboo = callPackage ../games/egoboo { }; @@ -29915,7 +29927,9 @@ with pkgs; quake3hires = callPackage ../games/quake3/content/hires.nix { }; - quakespasm = callPackage ../games/quakespasm { }; + quakespasm = callPackage ../games/quakespasm { + inherit (darwin.apple_sdk.frameworks) Cocoa CoreAudio CoreFoundation IOKit OpenGL; + }; vkquake = callPackage ../games/quakespasm/vulkan.nix { }; ioquake3 = callPackage ../games/quake3/ioquake { }; @@ -31206,7 +31220,9 @@ with pkgs; ngspice = callPackage ../applications/science/electronics/ngspice { }; - openems = callPackage ../applications/science/electronics/openems { }; + openems = callPackage ../applications/science/electronics/openems { + qcsxcad = libsForQt5.qcsxcad; + }; openroad = libsForQt5.callPackage ../applications/science/electronics/openroad { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cce7d2dab0f9..d0dd5eb8a1de 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2724,6 +2724,8 @@ in { flux-led = callPackage ../development/python-modules/flux-led { }; + flynt = callPackage ../development/python-modules/flynt { }; + fn = callPackage ../development/python-modules/fn { }; fnvhash = callPackage ../development/python-modules/fnvhash { }; diff --git a/pkgs/top-level/release-small.nix b/pkgs/top-level/release-small.nix index 47c47e04e1cc..66c6bb373484 100644 --- a/pkgs/top-level/release-small.nix +++ b/pkgs/top-level/release-small.nix @@ -166,7 +166,6 @@ with import ./release-lib.nix { inherit supportedSystems nixpkgsArgs; }; webkitgtk = linux; wget = all; which = all; - wicd = linux; wireshark = linux; wirelesstools = linux; wpa_supplicant = linux;