| 7 Mar 2023 |
K900 | How about readlink -f $(which ps) then? | 19:01:11 |
henrik-ch | [i97henka@nixos:~/github]$ readlink -f $(which ps)
/nix/store/gkfgyv628y93jahpnpq22f4kcs0ixsh1-procps-3.3.16/bin/ps
| 19:01:38 |
Arson Copperflame | That is exactly the same derivation I have | 19:02:28 |
Arson Copperflame | Did you copy the ps command? If yes, try typing it manually. Something might have replaced the - with some other similar looking symbol | 19:03:27 |
henrik-ch | I did actually type it manually - let me copy it now. | 19:03:48 |
henrik-ch | [i97henka@nixos:~/github]$ ps -e | grep gpg
415 ? 00:00:00 gpg-agent
| 19:04:50 |
henrik-ch | No clue why that was different the second time around. | 19:05:04 |
henrik-ch | * No clue why that was different the second time around.
(I had problems typing the pipe sign, and had to delete out some funny sign, maybe that was it) | 19:06:33 |
henrik-ch | * No clue why that was different the second time around.
(I had problems typing the pipe sign, and had to delete out some funny sign, maybe that was it)
At least it's consistent now - I have typed it a second time with the same result. | 19:07:17 |
Arson Copperflame | At least we now know, that there's only one GPG-Agent running | 19:17:17 |
| 8 Mar 2023 |
henrik-ch | Thank you nzbr (they/it) and K900 for the help yesterday. Short update from me trying this morning. When I use the nixos user instead of the i97henka user that I have set up, it all works.
What I mean with "all works" is that I can run:
gpg --symmetric --cipher-algo AES256 file_with_secrets.env
| 08:29:15 |
K900 | Why do you even still have the nixos user | 08:29:33 |
K900 | Please just remove it entirely | 08:29:37 |
henrik-ch | Fair point.
As you suggested, I went the other way and eliminated the nixos user and ran only with i97henka. I couldn't get it working that way.
Let me try that one more time just to make sure. Doesn't make any sense that it would be different, right? | 08:31:09 |
henrik-ch | I have done the steps, and trying to get back to the i97henka user I got a home manager error - seems to have corrupted the git profile, not sure why.
Mar 08 08:36:51 nixos systemd[1]: Failed to start Home Manager environment for i97henka.
So what I did instead to get a fresh start, is change my user to i98henka.
It's embarrasing but a good result in the end; now I get the command working for the i98henka user. (gpg --symmetric --cipher-algo AES256 file_with_secrets.env)
I apologise for wasting your time on this K900 & nzbr (they/it)
| 08:59:08 |
K900 | You should probably look into why it's failing | 08:59:29 |
K900 | journalctl -u home-manager-i97henka will tell you | 08:59:38 |
henrik-ch | thank you, will check that out. | 08:59:49 |
henrik-ch | Firstly, sorry, this is a long-winded reply.
The journalctl for the i98henka user:
journalctl -u home-manager-i98henka
lines 1-16/16 (END)
Mar 08 08:40:55 nixos systemd[1]: Starting Home Manager environment for i98henka...
Mar 08 08:40:55 nixos hm-activate-i98henka[222]: Starting Home Manager activation
Mar 08 08:40:55 nixos hm-activate-i98henka[222]: Activating checkFilesChanged
Mar 08 08:40:55 nixos hm-activate-i98henka[222]: Activating checkLinkTargets
Mar 08 08:40:55 nixos hm-activate-i98henka[222]: Activating writeBoundary
Mar 08 08:40:55 nixos hm-activate-i98henka[222]: Activating installPackages
Mar 08 08:40:56 nixos hm-activate-i98henka[274]: replacing old 'home-manager-path'
Mar 08 08:40:56 nixos hm-activate-i98henka[274]: installing 'home-manager-path'
Mar 08 08:40:56 nixos hm-activate-i98henka[222]: Activating linkGeneration
Mar 08 08:40:56 nixos hm-activate-i98henka[222]: Cleaning up orphan links from /home/i98henka
Mar 08 08:40:56 nixos hm-activate-i98henka[222]: No change so reusing latest profile generation 1
Mar 08 08:40:56 nixos hm-activate-i98henka[222]: Creating home file links in /home/i98henka
Mar 08 08:40:56 nixos hm-activate-i98henka[222]: Activating onFilesChange
Mar 08 08:40:56 nixos hm-activate-i98henka[222]: Activating reloadSystemd
Mar 08 08:40:56 nixos hm-activate-i98henka[222]: User systemd daemon not running. Skipping reload.
Mar 08 08:40:56 nixos systemd[1]: Finished Home Manager environment for i98henka.
When on the i98 user, I can't get any info on i97 user:
[i98henka@nixos:~/github/hk-daily-digest]$ journalctl -u home-manager-i97henka
-- No entries --
Running sudo nixos-rebuild switch and replacing i98 user with i97 user.
[i97henka@nixos:~]$ journalctl -u home-manager-i97henka
lines 1-16/16 (END)...skipping...
Mar 08 09:30:20 nixos systemd[1]: Starting Home Manager environment for i97henka...
Mar 08 09:30:20 nixos hm-activate-i97henka[222]: Starting Home Manager activation
Mar 08 09:30:20 nixos hm-activate-i97henka[222]: Activating checkFilesChanged
Mar 08 09:30:20 nixos hm-activate-i97henka[222]: Activating checkLinkTargets
Mar 08 09:30:20 nixos hm-activate-i97henka[222]: Activating writeBoundary
Mar 08 09:30:20 nixos hm-activate-i97henka[222]: Activating installPackages
Mar 08 09:30:20 nixos hm-activate-i97henka[274]: replacing old 'home-manager-path'
Mar 08 09:30:20 nixos hm-activate-i97henka[274]: installing 'home-manager-path'
Mar 08 09:30:20 nixos hm-activate-i97henka[222]: Activating linkGeneration
Mar 08 09:30:20 nixos hm-activate-i97henka[222]: Cleaning up orphan links from /home/i97henka
Mar 08 09:30:20 nixos hm-activate-i97henka[222]: No change so reusing latest profile generation 12
Mar 08 09:30:20 nixos hm-activate-i97henka[222]: Creating home file links in /home/i97henka
Mar 08 09:30:20 nixos hm-activate-i97henka[295]: ln: failed to create symbolic link '/home/i97henka/.config/git/config': Permission denied
Mar 08 09:30:20 nixos systemd[1]: home-manager-i97henka.service: Main process exited, code=exited, status=1/FAILURE
Mar 08 09:30:20 nixos systemd[1]: home-manager-i97henka.service: Failed with result 'exit-code'.
Mar 08 09:30:20 nixos systemd[1]: Failed to start Home Manager environment for i97henka.
[i97henka@nixos:~/.config/git]$ ls -la
total 12
drwxr-xr-x 2 1001 users 4096 Mar 7 18:51 .
drwxr-xr-x 6 1001 users 4096 Feb 22 11:18 ..
lrwxrwxrwx 1 1001 users 81 Mar 7 18:51 config -> /nix/store/xch7kiqbxd7jn23vmr82ybw8521dhk1v-home-manager-files/.config/git/config
What do you think could be the best way for eliminating the home-manager i97 user error? I am hesitant to touch the /nix/store path, but maybe that is the way forward?
| 09:48:05 |
K900 | Just remove the symlink | 09:48:32 |
K900 | You don't need to remove the file it's pointing to | 09:48:44 |
henrik-ch | In reply to @k900:0upti.me You don't need to remove the file it's pointing to ok | 09:48:53 |
K900 | And you have clearly screwed up the permissions somehow | 09:48:59 |
K900 | As those are owned by user 1001 | 09:49:04 |
K900 | Which isn't even known | 09:49:13 |
henrik-ch | Thank you.
Do I have to remove much more than that? Please see ls and id command below:
[i97henka@nixos:~]$ ls -la
total 80
drwx------ 9 i97henka users 4096 Mar 7 18:51 .
drwxr-xr-x 5 root root 4096 Mar 8 08:40 ..
-rw------- 1 1001 users 8718 Mar 7 21:29 .bash_history
lrwxrwxrwx 1 1001 users 76 Mar 7 18:51 .bash_profile -> /nix/store/xch7kiqbxd7jn23vmr82ybw8521dhk1v-home-manager-files/.bash_profile
lrwxrwxrwx 1 1001 users 70 Mar 7 18:51 .bashrc -> /nix/store/xch7kiqbxd7jn23vmr82ybw8521dhk1v-home-manager-files/.bashrc
drwxr-xr-x 4 1001 users 4096 Mar 7 18:51 .cache
drwxr-xr-x 3 1001 users 4096 Feb 28 18:40 .cargo
drwxr-xr-x 6 1001 users 4096 Feb 22 11:18 .config
-rw-r--r-- 1 1001 users 286 Feb 20 08:40 .gitconfig
drwxr-xr-x 16 1001 users 4096 Mar 8 09:33 github
drwx------ 3 1001 users 4096 Mar 7 18:52 .gnupg
drwxr-xr-x 4 1001 users 4096 Feb 19 16:49 .local
drwxr-xr-x 2 1001 users 4096 Feb 17 18:34 .nix-defexpr
lrwxrwxrwx 1 1001 users 47 Feb 17 18:34 .nix-profile -> /nix/var/nix/profiles/per-user/i97henka/profile
lrwxrwxrwx 1 1001 users 71 Mar 7 18:51 .profile -> /nix/store/xch7kiqbxd7jn23vmr82ybw8521dhk1v-home-manager-files/.profile
-rw------- 1 1001 users 14052 Feb 22 13:14 .viminfo
[i97henka@nixos:~]$ id
uid=1000(i97henka) gid=100(users) groups=100(users),1(wheel)
| 09:52:32 |
K900 | You probably want to chown those to your user | 09:53:51 |
K900 | Or just chown -R 1000 . | 09:54:16 |
K900 | To change all of them | 09:54:21 |
henrik-ch | Yes, ran like this: sudo chown -R i97henka:users /home/i97henka/ Seems better now. | 10:00:44 |