Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to user profiles are not applied upon rebuilding #486

Open
heraldofsolace opened this issue Oct 3, 2022 · 1 comment
Open

Changes to user profiles are not applied upon rebuilding #486

heraldofsolace opened this issue Oct 3, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@heraldofsolace
Copy link

heraldofsolace commented Oct 3, 2022

I have got digga working in my repo here. The only (structural) change I made was to put the user modules and profiles in a directory home. I changed users/modules and users/profiles in flake.nix to home/profiles and home/modules and it works fine. But the problem is when I modify an existing profile under home/profiles and run nixos-rebuild.

Expected Behavior

I expect the changes to be applied.

Current Behavior

The modification isn't activated.

To be clear -

  1. If I add a new profile under home/profiles and add it to my user in flake.nix, it works.
  2. If I edit an existing profile under home/profiles (for example, let's say I edit home/profiles/shells/fish/default.nix and add a new alias.) it doesn't work. The modifications are not applied but the rest of the changes (if any) are applied.
  3. This doesn't happen for system profiles. Any new profile or edited profile in system/profiles gets applied immediately.

Steps to Reproduce

  1. Edit a profile in home/profiles.
  2. Run nixos-rebuild.

Additional Context

Not sure if it helps, but I removed the Darwin stuff because I don't use a darwin machine.

Your Environment

[user@system:~]$ nix run nixpkgs#nix-info -- -m; nix flake metadata
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.70, NixOS, 22.05 (Quokka), 22.05.20221001.9cac458`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.9.1`
 - channels(root): `"nixos-22.05"`
 - channels(aniket): `"home-manager-22.05.tar.gz"`
 - nixpkgs: `/nix/store/pm6k6p4fpx6f29y0mp57i5kn8zylilvn-source`

Resolved URL:  git+file:///home/aniket/nix-dots
Locked URL:    git+file:///home/aniket/nix-dots?ref=refs%2fheads%2fmain&rev=c474b33136f623856473cf1499b42620046bc9b3
Description:   A highly structured configuration database.
Path:          /nix/store/jls6m27nfwrf64xnji6412zxfqkdi286-source
Revision:      c474b33136f623856473cf1499b42620046bc9b3
Revisions:     9
Last modified: 2022-10-03 18:47:58
Inputs:
├───agenix: github:ryantm/agenix/6acb1fe5f8597d5ce63fc82bc7fcac7774b1cdf0
│   └───nixpkgs follows input 'nixos'
├───deploy: github:serokell/deploy-rs/41f15759dd8b638e7b4f299730d94d5aa46ab7eb
│   ├───flake-compat: github:edolstra/flake-compat/64a525ee38886ab9028e6f61790de0832aa3ef03
│   ├───nixpkgs follows input 'nixos'
│   └───utils: github:numtide/flake-utils/0f8662f1319ad6abf89b3380dd2722369fc51ade
├───digga: github:divnix/digga/d1193743a535d7fbbc7f3eda4e51295b10bd4d2c
│   ├───blank: github:divnix/blank/5a5d2684073d9f563072ed07c871d577a6c614a8
│   ├───darwin: github:LnL7/nix-darwin/2f2bdf658d2b79bada78dc914af99c53cad37cba
│   │   └───nixpkgs follows input 'digga/nixpkgs'
│   ├───deploy follows input 'deploy'
│   ├───devshell: github:numtide/devshell/899ca4629020592a13a46783587f6e674179d1db
│   │   ├───flake-utils: github:numtide/flake-utils/846b2ae0fc4cc943637d3d1def4454213e203cba
│   │   └───nixpkgs follows input 'digga/nixpkgs'
│   ├───flake-compat: github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8
│   ├───flake-utils-plus: github:gytis-ivaskevicius/flake-utils-plus/6271cf3842ff9c8a9af9e3508c547f86bc77d199
│   │   └───flake-utils: github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797
│   ├───home-manager follows input 'home'
│   ├───latest: github:nixos/nixpkgs/b39924fc7764c08ae3b51beef9a3518c414cdb7d
│   ├───nixlib follows input 'nixos'
│   ├───nixpkgs follows input 'nixos'
│   └───nixpkgs-unstable: github:nixos/nixpkgs/334ec8b503c3981e37a04b817a70e8d026ea9e84
├───grub2-themes: github:vinceliuice/grub2-themes/c6e2967f06549d760332476b11d9c83d1778ded8
│   └───nixpkgs follows input 'nixpkgs'
├───home: github:nix-community/home-manager/4a3d01fb53f52ac83194081272795aa4612c2381
│   └───nixpkgs follows input 'nixos'
├───homeage: github:jordanisaacs/homeage/dd98c460175a0781ad0b51f4392de97c5454a5c4
│   └───nixpkgs follows input 'nixpkgs'
├───latest: github:nixos/nixpkgs/10ecda252ce1b3b1d6403caeadbcc8f30d5ab796
├───naersk: github:nmattia/naersk/6944160c19cb591eb85bbf9b2f2768a935623ed3
│   └───nixpkgs follows input 'nixos'
├───nixos: github:nixos/nixpkgs/9cac45850280978a21a3eb67b15a18f34cbffa2d
├───nixos-generators: github:nix-community/nixos-generators/adccd191a0e83039d537e021f19495b7bad546a1
│   ├───nixlib: github:nix-community/nixpkgs.lib/28a5b0557f14124608db68d3ee1f77e9329e9dd5
│   └───nixpkgs: github:NixOS/nixpkgs/7fad01d9d5a3f82081c00fb57918d64145dc904c
├───nixos-hardware: github:nixos/nixos-hardware/3024c67a2e9a35450558426c42e7419ab37efd95
├───nixpkgs: path:/nix/store/if56vv9237zafkzgzcdkqxf2lmp86myq-source?lastModified=0&narHash=sha256-tp9nXo1%2fIdN%2fxN9m06ryy0QUAEfoN6K56ObM%2f1QTAjc=
├───nur: path:/nix/store/q73xmg8mhgmji9yc814s331yf5jf0wbh-source?lastModified=0&narHash=sha256-VQ6WbHqinb9H8DiKswbxVNrYkkig4TrRYUadM1htsrc=
└───nvfetcher: github:berberman/nvfetcher/9763ad40d59a044e90726653d9253efaeeb053b2
    ├───flake-compat: github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8
    ├───flake-utils: github:numtide/flake-utils/c0e246b9b83f637f4681389ecabcb2681b4f3af0
    └───nixpkgs follows input 'nixos'
@heraldofsolace heraldofsolace added the bug Something isn't working label Oct 3, 2022
@heraldofsolace
Copy link
Author

I took a look at the home-manager-aniket.service which apparently finished successfully. I ran the ExecStart argument of that service

/nix/store/2r8796zkrhqjlszn5wi112ma3jg5wzdy-hm-setup-env /nix/store/jmzyxw6sc52vwr8av2m1j5w1nms9zqk1-home-manager-generation/

And it worked! I tried multiple times and seems like running the command manually works but when it is run via systemd it doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant