[Nix-dev] Using system.autoUpgrade with a git channel

John Ramsden johnramsden at riseup.net
Sat Jul 8 23:36:02 CEST 2017


Cool, might have to do some experimenting.

--
  John Ramsden


On Fri, Jul 7, 2017, at 08:35 PM, Danylo Hlynskyi wrote:
> I've seen this in a wild
> 
>  system.autoUpgrade.enable = true;
> system.autoUpgrade.flags = lib.mkForce
>   [ "--no-build-output"
>     "-I" "nixpkgs=/etc/nixos/nixpkgs-channels"
>   ];
> systemd.services.nixos-upgrade.path = [ pkgs.git ];
> systemd.services.nixos-upgrade.preStart = ''
>   cd /etc/nixos/nixpkgs-channels
>   ${pkgs.git}/bin/git pull
> '';
> 
> 
> 
> https://github.com/garbas/dotfiles/blob/a76e12166efa57edded8c381074104fefe5c7da6/nixos/floki.nix#L27-L36> 
> 2017-07-07 9:36 GMT+03:00 John Ramsden via nix-dev <nix-dev at lists.science.uu.nl>:>> Thanks that's helpful. In other words if I'm using a checked out git>>  repository I'm no longer able to use 'system.autoUpgrade'.
>> 
>>  --
>>    John Ramsden
>> 
>> On Thu, Jul 6, 2017, at 10:56 PM, Vladimír Čunát wrote:
>>  > On 07/07/2017 01:46 AM, John Ramsden via nix-dev wrote:
>>  > > I was also wondering what exactly the 'nixos-rebuild switch' command's>>  > > '--upgrade' flag does.
>>  >
>>  > It does
>>  > $ nix-channel --update nixos
>>  > Best see the source if you want details, as it's relatively simple:>>  > https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/installer/tools/nixos-rebuild.sh#L197>>  >
>>  > --Vladimir
>>  _______________________________________________
>>  nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> https://mailman.science.uu.nl/mailman/listinfo/nix-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170708/88a889c1/attachment.html>


More information about the nix-dev mailing list