Difference between revisions of "Plasma-Manager"

From NixOS Wiki
Jump to: navigation, search
(DRAFT)
(DRAFT)
Line 1: Line 1:
 
Plasma-Manager lets your write down your KDE settings. It mimics the style and syntax of configuration.nix. If you have more than a handful of computers it can help you set them up consistently. It's also useful if you reinstall your OS or change PC's.
 
Plasma-Manager lets your write down your KDE settings. It mimics the style and syntax of configuration.nix. If you have more than a handful of computers it can help you set them up consistently. It's also useful if you reinstall your OS or change PC's.
  
Plasma-Manager is an add-in for Home Manager. Home Manager is like [https://www.chezmoi.io/ Chezmoi] or [https://tamerlan.dev/how-i-manage-my-dotfiles-using-gnu-stow/ GNU Stow]. It lets you write down and version control your dotfiles. It also lets you install packages for yourself rather than system-wide. You do not need to be proficient with Home Manager to use Plasma-Manager. Also, you do not need to replace Chzemoi/Stow if you use it. (The author personally uses Chezmoi for dotfiles and Plasma-Manager for KDE.)
+
Plasma-Manager is an add-in for Home Manager. Home Manager is like [https://www.chezmoi.io/ Chezmoi] or [https://tamerlan.dev/how-i-manage-my-dotfiles-using-gnu-stow/ GNU Stow]. It lets you write down and version control your dotfiles in a unified location. Home Manager also lets you install packages for yourself rather than system-wide. You do not need to be proficient with Home Manager to use Plasma-Manager. Also, you do not need to replace Chzemoi/Stow if you use it. (The author personally uses Chezmoi for dotfiles and Plasma-Manager for KDE.)
  
== How to setup Standalone Home Manager ==
+
== How to setup Standalone Plasma-Manager ==
  
 
In this context the term Standalone means you are installing it in your home directory. You do not need to change your configuration.nix. Also, you do not need to be a member of the wheel group nor do you need sudo.
 
In this context the term Standalone means you are installing it in your home directory. You do not need to change your configuration.nix. Also, you do not need to be a member of the wheel group nor do you need sudo.
Line 9: Line 9:
 
'''1) Add Channels as Your User'''
 
'''1) Add Channels as Your User'''
  
Set the release URL to match your installed NixOS. It doesn't matter if you use Channels or Flakes to manage the OS.
+
Set the release URL to match your <u>currently installed</u> NixOS. It doesn't matter if you use Channels or Flakes to manage the OS.
  
 
<syntaxHighlight lang=shell>
 
<syntaxHighlight lang=shell>
Line 17: Line 17:
 
</syntaxHighlight>
 
</syntaxHighlight>
  
'''2) Install Standalone Home Manager'''
+
'''2) Install Standalone Plasma-Manager'''
 +
 
 +
This will install Home Manager, Plasma-Manager, and create a default configuration file at ~/.config/home-manager/home.nix.
  
 
<syntaxHighlight lang=shell>
 
<syntaxHighlight lang=shell>
Line 23: Line 25:
 
</syntaxHighlight>
 
</syntaxHighlight>
  
'''3) Edit this file to suit your needs'''
+
'''3) Edit Home Manager home.nix file to suit your needs'''
 +
 
 +
An example Plasma-Manager configuration is below.
  
 
'''4) Apply the Changes'''
 
'''4) Apply the Changes'''
Line 33: Line 37:
 
'''5) Verify and Customize'''
 
'''5) Verify and Customize'''
  
# - Import existing settings
+
Review the output for any errors. If none, logout of KDE and log back in to affect the changes. <u>You should always logout of KDE to apply Plasma-Manager changes.</u>
1) `nix run github:nix-community/plasma-manager/trunk#rc2nix > plasma.nix`
+
 
2) Manually merge the output into your home.nix
+
== Import Existing Settings ==
# - How to troubleshoot
+
 
#   1) Review the output of `home-manager switch`
+
The utility rc2nix will export many of your existing KDE settings. They are formatted for Plasma-Manager's configFile option.
#   2) Check logs: `journalctl --user -u home-manager.service`
+
 
#
+
You may reduce complexity and save yourself time by narrowing your focus to settings that you made. Disregard the many and various default settings.
# References
+
 
# - Plasma options: https://nix-community.github.io/plasma-manager/options.xhtml
+
Ideally you should transcribe configFile settings to native Plasma-Manager options. The Plasma-Manager authors expended a lot of time and care to ensure their options are successful. Reserve configFile options as a fallback or when there is no native Plasma-Manager option.
# - Examples: https://github.com/search?q=programs.plasma+language%3Anix&type=code
+
 
 +
'''1) Run rc2nix'''
 +
 
 +
<syntaxHighlight lang=shell>
 +
nix run github:nix-community/plasma-manager/trunk#rc2nix > plasma.nix
 +
</syntaxHighlight>
 +
 
 +
''' 2) Manually merge the output into your home.nix'''
 +
 
 +
== Troubleshoot ==
 +
 
 +
In general you can troubleshoot Plasma-Manager by following this pattern:
 +
 
 +
# Review the output of `home-manager switch`
 +
# Check logs: `journalctl --user -u home-manager.service`
  
 +
== References ==
  
 +
[https://github.com/search?q=programs.plasma+language%3Anix&type=code Plasma-Manager Configuration Examples]
  
 +
[https://nix-community.github.io/plasma-manager/options.xhtml Plasma-Manager Options]
  
 
[[Category:Desktop Environment]]
 
[[Category:Desktop Environment]]
 
[[Category:Cookbook]]
 
[[Category:Cookbook]]
 
[[Category:Configuration Management]]
 
[[Category:Configuration Management]]

Revision as of 14:18, 29 August 2025

Plasma-Manager lets your write down your KDE settings. It mimics the style and syntax of configuration.nix. If you have more than a handful of computers it can help you set them up consistently. It's also useful if you reinstall your OS or change PC's.

Plasma-Manager is an add-in for Home Manager. Home Manager is like Chezmoi or GNU Stow. It lets you write down and version control your dotfiles in a unified location. Home Manager also lets you install packages for yourself rather than system-wide. You do not need to be proficient with Home Manager to use Plasma-Manager. Also, you do not need to replace Chzemoi/Stow if you use it. (The author personally uses Chezmoi for dotfiles and Plasma-Manager for KDE.)

How to setup Standalone Plasma-Manager

In this context the term Standalone means you are installing it in your home directory. You do not need to change your configuration.nix. Also, you do not need to be a member of the wheel group nor do you need sudo.

1) Add Channels as Your User

Set the release URL to match your currently installed NixOS. It doesn't matter if you use Channels or Flakes to manage the OS.

nix-channel --add https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz home-manager
nix-channel --add https://github.com/nix-community/plasma-manager/archive/trunk.tar.gz plasma-manager
nix-channel --update

2) Install Standalone Plasma-Manager

This will install Home Manager, Plasma-Manager, and create a default configuration file at ~/.config/home-manager/home.nix.

nix-shell '<home-manager>' -A install

3) Edit Home Manager home.nix file to suit your needs

An example Plasma-Manager configuration is below.

4) Apply the Changes

home-manager switch

5) Verify and Customize

Review the output for any errors. If none, logout of KDE and log back in to affect the changes. You should always logout of KDE to apply Plasma-Manager changes.

Import Existing Settings

The utility rc2nix will export many of your existing KDE settings. They are formatted for Plasma-Manager's configFile option.

You may reduce complexity and save yourself time by narrowing your focus to settings that you made. Disregard the many and various default settings.

Ideally you should transcribe configFile settings to native Plasma-Manager options. The Plasma-Manager authors expended a lot of time and care to ensure their options are successful. Reserve configFile options as a fallback or when there is no native Plasma-Manager option.

1) Run rc2nix

nix run github:nix-community/plasma-manager/trunk#rc2nix > plasma.nix

2) Manually merge the output into your home.nix

Troubleshoot

In general you can troubleshoot Plasma-Manager by following this pattern:

  1. Review the output of `home-manager switch`
  2. Check logs: `journalctl --user -u home-manager.service`

References

Plasma-Manager Configuration Examples

Plasma-Manager Options