nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
7.15k stars 1.85k forks source link

autoUpgrade in home-manager #338

Open timokau opened 6 years ago

timokau commented 6 years ago

Nixos offers the autoUpgrade option to automatically do the equivalent of nix-channel --update && nixos-rebuild switch regularly. Should we do the same for home-manager?

rycee commented 6 years ago

Sound like a good idea. Assuming the programs.home-manager.path is set to a download location then in principle it could be done using a systemd user timer. I.e. similar to how it works when Home Manager is run as a NixOS module.

I'll think about how to best set it up.

timokau commented 6 years ago

It sounds like you are talking about updating home-manager itself. What I meant was updating the programs managed through home-manager.

ghost commented 5 years ago

I'd like to see this feature added too.

stale[bot] commented 3 years ago

Thank you for your contribution! I marked this issue as stale due to inactivity. If this remains inactive for another 7 days, I will close this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

If you have nothing of substance to add, please refrain from commenting and allow the bot close the issue. Also, don't be afraid to manually close an issue, even if it holds valuable information.

Closed issues stay in the system for people to search, read, cross-reference, or even reopen--nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

timokau commented 3 years ago

If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.

I would no longer use such a feature since I prefer to pin nixpkgs which requires explicit updates anyway. Therefore I'll follow the bot's guideline and close this. It seems like some other people were interested in this at some point. I can re-open this if somebody is interested in taking over.

spagy commented 3 years ago

heya, i'd still be interested in seeing this feature. is the right thing to open another issue or would it be possible to reopen this?

sumnerevans commented 3 years ago

@spagy there was an attempt to create an autoUpgrade service in #1365. Maybe you can try and resurrect that PR?

timokau commented 3 years ago

I'll reopen this for now. It seems like there is still interest and this issue can be used for tracking progress if there is any. I will unsubscribe though, so please ping me if necessary.

cyntheticfox commented 3 years ago

I think this could be pretty useful. I use flakes, but with an updating and testing GitHub action or something like that on the flake, automatic upgrades could be really nice, especially since I use some packages that rebuild often (a.k.a. neovim-nightly).

imincik commented 2 years ago

services.home-manager-auto-upgrade is already implemented in modules/services/home-manager-auto-upgrade.nix .

luxus commented 2 years ago

it should be support flakes

wyndon commented 2 years ago

I agree, it should support flakes.

Sulfyderz commented 1 week ago

Hello,

It should be great if services.home-manager.autoUpgrade could support aarch64-darwin or aarch64-apple-darwin (macOS). Any tips of how I can contribute or where I should start ?

Currently, it's not the case. It only supports linux as OS:

Failed assertions:
       - The module services.home-manager.autoUpgrade does not support your platform. It only supports

         - aarch64-linux
         - armv5tel-linux
         - armv6l-linux
         - armv7a-linux
         - armv7l-linux
         - i686-linux
         - loongarch64-linux
         - m68k-linux
         - microblaze-linux
         - microblazeel-linux
         - mips-linux
         - mips64-linux
         - mips64el-linux
         - mipsel-linux
         - powerpc64-linux
         - powerpc64le-linux
         - riscv32-linux
         - riscv64-linux
         - s390-linux
         - s390x-linux
         - x86_64-linux

It seems I have to call launchd instead of systemd inside of the home-manager-auto-upgrade.nix file.