Nixpkgs/Reviewing changes

From NixOS Wiki
Revision as of 17:36, 13 August 2021 by imported>Artturin

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"; }
  ];