Skip to content

Changing system configuration from home? #169

@Octelly

Description

@Octelly

First, I am aware that this can not be done directly and it's not what I'm asking for.


I would like a way of checking homeConfigurations from the nixosConfigurations side. The goal would be, to for example check if a user has a DE enabled, so that it can be added to system packages in the nixosConfiguration.

I haveoctelly.programs.mpv.enable = true; in homes/x86_64-linux/octelly@vmware-nixos (test option). I've done some probing and found that:

  • loading the flake in repl and checking nixosConfigurations.vmware-nixos.config.snowfallorg.users.octelly.home.config.octelly.programs.mpv.enable returns false
  • loading the flake in repl and checking homeConfigurations."octelly@vmware-nixos".options.octelly.programs.mpv.enable.value, however I'm not aware of a documented way of accessing self

I thought of writing per-user NixOS modules, so that a system could set options like target.graphics = true; and users could have their modules that would then for example snowfallorg.users.octelly.home.config.programs.plasma = true;, but that feels like a dirty fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions