mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2025-07-09 13:53:34 +02:00
Compare commits
No commits in common. "eceb2ce4c7818df280cd71c7afd4886a04388a02" and "1caa0cc7be80b94acd636eec387b9c46acb7fedb" have entirely different histories.
eceb2ce4c7
...
1caa0cc7be
11
base/nix.nix
11
base/nix.nix
@ -1,4 +1,4 @@
|
||||
{ lib, config, inputs, ... }:
|
||||
{ inputs, ... }:
|
||||
{
|
||||
nix = {
|
||||
gc = {
|
||||
@ -21,16 +21,11 @@
|
||||
** use the same channel the system
|
||||
** was built with
|
||||
*/
|
||||
registry = lib.mkMerge [
|
||||
{
|
||||
registry = {
|
||||
"nixpkgs".flake = inputs.nixpkgs;
|
||||
"nixpkgs-unstable".flake = inputs.nixpkgs-unstable;
|
||||
}
|
||||
# We avoid the reference to self in vmVariant to get a stable system .outPath for equivalence testing
|
||||
(lib.mkIf (!config.virtualisation.isVmVariant) {
|
||||
"pvv-nix".flake = inputs.self;
|
||||
})
|
||||
];
|
||||
};
|
||||
nixPath = [
|
||||
"nixpkgs=${inputs.nixpkgs}"
|
||||
"unstable=${inputs.nixpkgs-unstable}"
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, inputs, pkgs, lib, ... }:
|
||||
{ inputs, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
inputUrls = lib.mapAttrs (input: value: value.url) (import "${inputs.self}/flake.nix").inputs;
|
||||
@ -26,8 +26,7 @@ in
|
||||
|
||||
# workaround for https://github.com/NixOS/nix/issues/6895
|
||||
# via https://git.lix.systems/lix-project/lix/issues/400
|
||||
environment.etc = lib.mkIf (!config.virtualisation.isVmVariant) {
|
||||
"current-system-flake-inputs.json".source
|
||||
environment.etc."current-system-flake-inputs.json".source
|
||||
= pkgs.writers.writeJSON "flake-inputs.json" (
|
||||
lib.flip lib.mapAttrs inputs (name: input:
|
||||
# inputs.*.sourceInfo sans outPath, since writeJSON will otherwise serialize sourceInfo like a derivation
|
||||
@ -35,5 +34,4 @@ in
|
||||
// { store-path = input.outPath; } # comment this line if you don't want to retain a store reference to the flake inputs
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
@ -169,9 +169,9 @@
|
||||
};
|
||||
|
||||
devShells = forAllSystems (system: {
|
||||
default = nixpkgs-unstable.legacyPackages.${system}.callPackage ./shell.nix { };
|
||||
default = nixpkgs.legacyPackages.${system}.callPackage ./shell.nix { };
|
||||
cuda = let
|
||||
cuda-pkgs = import nixpkgs-unstable {
|
||||
cuda-pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user