<alexarice[m]>
Is there a nice way to create home-directory files that aren't symlinked? I'm trying to create systemd service files but systemd doesn't follow symlinks apparently
<alexarice[m]>
ah I should probably use the systemd module
evanjs| has joined #home-manager
evanjs| has quit [Ping timeout: 245 seconds]
hmpffff has joined #home-manager
hmpffff has quit [Client Quit]
tdeo has quit [Quit: Quit]
tdeo has joined #home-manager
mexisme has quit [Ping timeout: 252 seconds]
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 244 seconds]
<rycee>
alexarice: Yeah, for systemd units you'll want to use the systemd module.
<rycee>
alexarice: There is not currently any nice way to create real files. My usual recommendation would be to create an activation block and copy the file into place yourself.
<alexarice[m]>
rycee: systemd module solved the issue, out of interest how does it get round the issue as systemd didn't seem to like files symlinked from nix store
mexisme has joined #home-manager
<rycee>
IIRC you need `writeTextDir` for them, not `writeTextFile`.
<rycee>
No worries. Thanks for being a conscientious tester :-)
pie_ has quit [Ping timeout: 244 seconds]
<davidtwco>
rycee: having an issue: when testing that setting "bind.address" to a path and not setting "bind.port" works (does not assert) because the assert checks if "bind.address" is a path and then checks if "bind.port" is null, it causes an error that "bind.port" is used but not set. How can I test that it is not used without using it myself?
<davidtwco>
I've stumbled upon "isDefined" used in nixpkgs but I don't know how I'd get the path to the option - "options.programs.ssh.matchBlocks.[????].bind.port"?
<davidtwco>
The same issue happens when I try to test for the absence of an assertion, I need to make sure that ".port" is provided everywhere after adding the "home.file.result.text" snippet.
<rycee>
Hmm, maybe could use the ? operator?
<davidtwco>
That might have done the trick.
<rycee>
I wonder if not the port option should have `default = null` though.
<rycee>
If it is valid to leave it unset…
<rycee>
Have to step out for a while. Cya.
evanjs| has joined #home-manager
__monty__ has quit [Read error: Connection reset by peer]
__monty__ has joined #home-manager
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 245 seconds]
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 264 seconds]
evanjs^ has joined #home-manager
evanjs| has quit [Ping timeout: 264 seconds]
evanjs^ has quit [Read error: Connection reset by peer]
evanjs| has joined #home-manager
__monty__ has quit [Read error: Connection reset by peer]
zeta_0 has joined #home-manager
<zeta_0>
last time i tried to change home-managers path it threw error when i did a rebuild, i want to be able to access home.nix quickly from from my `/home/user/` quickly with emacs, so what is the exact path that i need to specify?
<zeta_0>
rycee: i just need to copy and paste my home.nix after i change the path, andchange the path in configuration.nix to that path as well right?
<rycee>
zeta_0: Hmm, not certain I understand what you are trying to do. Access `home.nix` quickly from Emacs?
<rycee>
With the `home-manager` tool you can use a custom path to the configuration file using the `-f` option. For example `home-manager -f ~/my-conf.nix switch`.
<zeta_0>
rycee: well when i type `ctrl-x-f` in emacs it brings me to `find-file: ` prompt in emacs which then shows the `~/` prompt so i then have to type `.config/nixpkgs/home.nix` to open home.nix, i want to change the home-manager path so i can quickly type `home.nix` in emacs? https://rycee.gitlab.io/home-manager/options.html#opt-programs.home-manager.path
<rycee>
Ah, ok. No the `programs.home-manager.path` points out the path to HM itself, not the configuration file. If you want an alternative path to the configuration file you need the `-f` command line argument.
<rycee>
But perhaps a better solution is to make it easier for you to open the `~/.config/nixpkgs/home.nix` file in Emacs.
<zeta_0>
rycee: this is just for convenience so i can quickly open home.nix in emacs, it will save me a lot of time in the long run
<rycee>
For example, I use the Emacs package `recentf` together with `ivy-switch-buffer`. So I just do `C-x b` and start typing "home.nix" and the file should show up high in the list.
<rycee>
Well, actually. In my case `~/.config/nixpkgs/home.nix` is a symlink into my dotfiles repo where I keep my configuration named in the format `<hostname>.<username>.nix`.
<zeta_0>
rycee: oh ok, i'll look into it a little more to see which solution i want, thanks for the tips