summary refs log tree commit diff
path: root/flake.nix
Commit message (Collapse)AuthorAge
* nixos: move default module location logic to `eval-config.nix`Naïm Favier2022-01-27
|
* Revert "pkgs.path: Avoid copying when used via flake"Robert Hensing2022-01-27
| | | | This reverts commit 813f9da8ab69f106055dd4a8fead7bc0a21a251b.
* Revert "flake.nix: Set nixpkgs.config.path"Robert Hensing2022-01-27
| | | | This reverts commit 0b222173dba00680074ef9e98a5bad224f62967e.
* flake.nix: Set nixpkgs.config.pathRobert Hensing2022-01-22
|
* pkgs.path: Avoid copying when used via flakeRobert Hensing2022-01-22
|
* Merge pull request #153211 from hercules-ci/minimal-nixosRobert Hensing2022-01-20
|\ | | | | Add minimal NixOS entrypoint
| * nixos/lib: init (experimental)Robert Hensing2022-01-07
| |
* | flake.nix: Remove redundant module lambdaRobert Hensing2021-12-17
| |
* | nixos: Make system.build.vm a standard attribute based on vmVariantRobert Hensing2021-12-17
| |
* | flake.nix: lib.nixosSystem: Set system.build.vm* with lib.mkDefaultRobert Hensing2021-12-17
| | | | | | | | | | This will help anyone who imports the qemu module themselves, to avoid a collision.
* | flake.nix: Deduplicate vmConfig, vmWithBootloaderConfigRobert Hensing2021-12-17
|/
* lib: add list of supported systems (#140428)Jonas Chevalier2021-10-05
| | | Adds the first 3 tiers of RFC0046 that are being used in flake.nix.
* flake.nix: Only add `_file`-key if position of `args.modules` is actually ↵Maximilian Bosch2021-07-18
| | | | | | | | | | | | | | | | known to the evaluator This happens if the evaluator "loses" the position of an attr-declaration[1] because of e.g. too many nested function-calls to build the final attr-set. While the actual issue should be fixed in Nix itself, this is IMHO a fair workaround to unblock affected users[2]. [1] https://github.com/NixOS/nixpkgs/commit/e14c24593420bb9057e7f38b40d17137eaeff9dd#commitcomment-53645936 [2] It seems as everyone using `divnix/digga` or `flake-utils-plus` are affected: * https://github.com/divnix/digga/issues/87
* flake/lib.nixosSystem: add `_file`-keys for error-locationMaximilian Bosch2021-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When inlining a module with a problematic declaration, you usually get get a not-so helpful error like this: $ cat flake.nix { description = "A very basic flake"; inputs.nixpkgs.url = path:../.; outputs = { self, nixpkgs }: { nixosConfigurations.foo = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ({ lib, ... }: { services.wrong = 2; }) { services.nginx.enable = true; } ]; }; }; } $ nixos-rebuild build --flake .#foo -L error: The option `services.wrong' does not exist. Definition values: - In `<unknown-file>': 2 While it's certainly possible to guess where this comes from, this is IMHO fairly confusing for beginners (and kinda reminds me of the infamous "infinite recursion at undefined position"-error). The module-system determines the position of a declaration using the `_file`-key: this is either `toString path` if `path` is e.g. a value from `imports = [ ./foo.nix ]` or the file used as `NIXOS_CONFIG` in `<nixpkgs/nixos>`. However such a mechanism doesn't exist (yet) for inlined flake modules, so I tried to implement this in a fairly basic way: * For non-path declarations, the position of `modules` inside the `flake.nix` which declares these modules is determined by doing `unsafeGetAttrPos` on the `modules`-argument of `lib.nixosSystem`. So the `flake.nix` from above would now raise the following error-message: $ nixos-rebuild build --flake .#foo -L error: The option `services.wrong' does not exist. Definition values: - In `/nix/store/4vi3nhqjyma73ygs4f93q38qjkhkaxw8-source/flake.nix': 2 Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com> Co-authored-by: Silvan Mosberger <github@infinisil.com> Co-authored-by: Robert Hensing <robert@roberthensing.nl>
* flake.nix: add aarch64-darwinMatthew Bauer2021-05-17
|
* nixos: fix "nixos-rebuild build-vm-with-bootloader" for EFI systemsBjørn Forsman2021-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (The first version of this change, in commit 39fad297fd, broke `nix-build -A nixosTests.installer.simpleUefiSystemdBoot`. This is the 2nd version, which hopefully does not break anything.) `nixos-rebuild build-vm-with-bootloader` currently fails with the default NixOS EFI configuration: $ cat >configuration.nix <<EOF { fileSystems."/".device = "/dev/sda1"; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; } EOF $ nixos-rebuild build-vm-with-bootloader -I nixos-config=$PWD/configuration.nix -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-20.09.tar.gz [...] insmod: ERROR: could not insert module /nix/store/1ibmgfr13r8b6xyn4f0wj115819f359c-linux-5.4.83/lib/modules/5.4.83/kernel/fs/efivarfs/efivarfs.ko.xz: No such device mount: /sys/firmware/efi/efivars: mount point does not exist. [ 1.908328] reboot: Power down builder for '/nix/store/dx2ycclyknvibrskwmii42sgyalagjxa-nixos-boot-disk.drv' failed with exit code 32 [...] Fix it by setting virtualisation.useEFIBoot = true when needed. Before: * release-20.03: successful build, unsuccessful run * release-20.09 (and master): unsuccessful build After: * Successful build and run. Fixes #107255
* flake.nix: allow inclusion of `nixpkgs` as `path:/.../`Maximilian Bosch2020-10-13
| | | | | | | | | | | | | | | | | | | | | When adding `nixpkgs` as flake-input using the `path`-fetcher, you currently get the following error since neither `lastModifiedDate` nor `lastModified` are stored in `flake.lock` for paths: ``` error: --- EvalError --------------------------------------------------------------------------- nix-build at: (48:71) in file: /nix/store/147clg8svaxyj7pl80ra9kmmm72mdg94-source/flake.nix 47| system.nixos.versionSuffix = 48| ".${final.substring 0 8 (self.lastModifiedDate or self.lastModified)}.${self.shortRev or "dirty"}"; | ^ 49| system.nixos.revision = final.mkIf (self ? rev) self.rev; attribute 'lastModified' missing ``` This patch adds the fallback-value `19700101` to `versionSuffix` if none of `lastModified{,Date}` are set in the lockfile.
* nixos-rebuild: add flake support for build-vmCole Helbling2020-09-17
| | | | | | This relies on users using `nixpkgs.lib.nixosSystem` to define their system; otherwise, the `vm` and `vmWithBootLoader` attributes will not exist.
* Merge pull request #92423 from Mic92/arm-flakesJörg Thalheim2020-07-28
|\ | | | | flake.nix: add armv6l/armv7l systems
| * flake.nix: add armv6l/armv7l systemsJörg Thalheim2020-07-06
| | | | | | | | We built at least armv7l on hydra, therefor nixpkgs should also expose it.
* | flake.nix: use lib.extendFabian Möller2020-07-23
|/ | | | | This preserves the nixosSystem function if another flake uses lib.extend itself.
* flake.nix: Remove edition fieldEelco Dolstra2020-06-08
|
* Don't pin 'nixpkgs' in the system registry by defaultEelco Dolstra2020-04-03
| | | | | Nixpkgs takes up a lot of disk space so we shouldn't do this by default.
* nix-daemon.nix: Add option nix.registryEelco Dolstra2020-04-02
| | | | | | | | | | | | | | | | | | | | | This allows you to specify the system-wide flake registry. One use is to pin 'nixpkgs' to the Nixpkgs version used to build the system: nix.registry.nixpkgs.flake = nixpkgs; where 'nixpkgs' is a flake input. This ensures that commands like $ nix run nixpkgs#hello pull in a minimum of additional store paths. You can also use this to redirect flakes, e.g. nix.registry.nixpkgs.to = { type = "github"; owner = "my-org"; repo = "my-nixpkgs"; };
* flake.nix: Add noteEelco Dolstra2020-02-10
|
* Fix 'nix flake check'Eelco Dolstra2020-02-10
|
* flake.nix: Handle missing rev attributeEelco Dolstra2020-02-05
| | | | Dirty trees no longer set 'rev', so we need to handle this.
* flake.nix: Support more systemsEelco Dolstra2020-02-05
|
* flake.nix: Remove packages, builders outputsEelco Dolstra2020-02-05
|
* epoch -> editionEelco Dolstra2020-02-05
|
* Export nixosModules.notDetectedEelco Dolstra2020-02-05
|
* nixosSystem: Automatically set version suffix from flakeEelco Dolstra2020-02-05
| | | | | | | E.g. $ nixos-version 19.03.20190913.af5eb77 (Koi)
* flake.nix: Remove obsolete name attributeEelco Dolstra2020-02-05
|
* Update flake interfaceEelco Dolstra2020-02-05
|
* Add flake outputs for the manualsEelco Dolstra2020-02-05
|
* flake.nix: Update epochEelco Dolstra2020-02-05
|
* flake.nix: provides -> outputsEelco Dolstra2020-02-05
|
* flake.nix: Add checkEelco Dolstra2020-02-05
|
* legacyPkgs -> legacyPackagesEelco Dolstra2020-02-05
|
* Export a function for building NixOS system configurationsEelco Dolstra2020-02-05
|
* flake.nix: Set system explicitly for nowEelco Dolstra2020-02-05
| | | | | Flakes now are evaluated in pure mode, so we can't rely on currentSystem anymore.
* Add flake.nixEelco Dolstra2020-02-05