Skip to content

Simplify NixOS Declarative Setup along with TUI support #109

@enesbala5

Description

@enesbala5

Is your feature request related to a problem? Please describe.
The section Using the TUI with Declarative Configuration seems much more complicated to me than it has to be. It requires multiple commands every time the configuration is to be updated.

Describe the solution you'd like

I would suggest for this alternative approach:

  • Optional: Copy the existing configuration to the new configuration folder

Only necessary if the app has been installed previously

cp -r ~/.config/hyprdynamicmonitors ~/config-folder/hyprdynamicmonitors
  • Optional: Remove the old .config folder

Only necessary if the app has been installed previously

rm -r ~/.config/hyprdynamicfolders
  • Create a symlink to the .config/hyprdynamicmonitors folder declaratively

This will make it so all updates are immediately "saved" in the correct place, the config-folder

 home.file = {
    ".config/hyprdynamicmonitors/" = {
      source = config.lib.file.mkOutOfStoreSymlink "$HOME/config-folder/hyprdynamicmonitors/";
      recursive = true;
    };
  • Run hyprdynamicmonitors run or just add it as a hyprland exec-once entry (systemd will not work due to a bug - view Note below)

  • Run hyprdynamicmonitors tui as usual - all changes should be applied as expected


NOTE: This will not work with the current home.hyprdynamicmonitors setup - the module tries to overwrite the file in the configPath provided. I have opened an issue about it - #110

Describe alternatives you've considered
If the home.hyprdynamicmonitors.configPath issue is resolved, I see no reason why the symlink is necessary in the first place - it would be easy to run the TUI with a --config path,

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions