different-name / nix-files

My NixOS configuration files
GNU General Public License v3.0
3 stars 0 forks source link

Replace hardcoded username #14

Closed different-name closed 2 months ago

different-name commented 2 months ago

An option should be used for the username instead

different-name commented 2 months ago

Added in https://github.com/Different-Name/nix-files/commit/fa0f21247f856b4f4a0b673046ca7f03e768e41e

Username can be defined using nix-files.user like so: https://github.com/Different-Name/nix-files/blob/fa0f21247f856b4f4a0b673046ca7f03e768e41e/system/global/core/user.nix#L6

The disk-configuration.nix files were a bit tricky, they wont have access to the username when using disko to partition the disks, but I don't think they need it at that time. The username is only used for mounting /home/${user}/.steam and /home/${user}/.local/share/Steam, I don't believe that's used during partitioning and file system creation. The username will be available by the time nixos-install is run, and I believe that's where it would be needed

I'm not going to reinstall to test that now though, I'll reopen the issue if I encounter problems with this later