Nixpkgs/Reviewing changes: Difference between revisions

From NixOS Wiki
imported>Artturin
mNo edit summary
imported>Artturin
No edit summary
Line 7: Line 7:


== Modules ==
== Modules ==
You may use the rev instead of the branchname, the rev will get redownloaded when changed but the branch wont be redownloaded


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 12: Line 14:


imports = let
imports = let
   pkgsReview = builtins.fetchTarball {
   pkgsReview = builtins.fetchzip {
     url = "https://github.com/USERNAME/nixpkgs/archive/BRANCHNAME.tar.gz";
     url = "https://github.com/USERNAME/nixpkgs/archive/BRANCHNAME.tar.gz";
   };
   };

Revision as of 17:36, 13 August 2021

1

Packages

Modules

You may use the rev instead of the branchname, the rev will get redownloaded when changed but the branch wont be redownloaded

disabledModules = [ "module.nix" ];

imports = let
  pkgsReview = builtins.fetchzip {
    url = "https://github.com/USERNAME/nixpkgs/archive/BRANCHNAME.tar.gz";
  };
in [
  (import "${pkgsReview}/nixos/modules/module.nix")
];


for example

disabledModules = [ "config/swap.nix" "tasks/filesystems.nix" ];

imports = let
  pkgsReview = builtins.fetchTarball {
    url = "https://github.com/Artturin/nixpkgs/archive/add-swap-options.tar.gz";
  };
in [
  (import "${pkgsReview}/nixos/modules/config/swap.nix")
  (import "${pkgsReview}/nixos/modules/tasks/filesystems.nix")
];

  swapDevices = [
    { "device" = "/swapfile"; "options" = [ "nofail" "noatime" ]; "priority" =  0; "discardPolicy" = "once"; }
  ];