Skip to content

Commit 2b04e04

Browse files
committed
desktop customization first draft, code block addons
1 parent 672d18c commit 2b04e04

File tree

2 files changed

+78
-25
lines changed

2 files changed

+78
-25
lines changed

docs/user-docs/desktop-customization/index.md

Lines changed: 70 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,62 +17,90 @@ To create a `.desktoprc` file, open a text editor of your choice and create a ne
1717
For example, here's how to do it with the Konsole terminal and Kate text editor:
1818

1919
1. Press Ctrl+Alt+T
20-
2. Run `$ kate ~/remote/.desktoprc`
21-
3.
20+
2. Run `kate ~/remote/.desktoprc`
21+
3. Paste the following line: `nix run home-manager -- switch --flake ~/remote/home-manager`
2222
4. Ctrl+S to save
2323

24+
Now, after logging in, the computer will switch to the flake within that directory.
25+
2426
## Home Manager Flake
2527

26-
Now, we're going to create a directory on `~/remote` that will set up NixOS
28+
We will first create a directory on `~/remote` that will set up NixOS
2729
Home Manager via a Nix Flake.
2830

2931
`mkdir ~/remote/home-manager`
3032

31-
`kate ~/remote/home-manager/flake.nix`
33+
Now, we will generate basic `flake.nix` and `home.nix` files in that directory we just made with the next command.
3234

33-
Paste the following default configuration into the empty `flake.nix` file, replacing `USER` with your ocf username:
35+
`nix run home-manager/master -- init ~/remote/home-manager`
3436

35-
```
36-
{
37-
description = "Default OCF Home Manager Configuration"
38-
39-
inputs = {
40-
# Specify the source of Home Manager and Nixpkgs.
41-
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
42-
home-manager = {
43-
url = "github:nix-community/home-manager";
44-
inputs.nixpkgs.follows = "nixpkgs";
45-
};
37+
## Plasma Manager
38+
39+
The default desktop environment on the OCF desktops is KDE Plasma. To make configuration management easier on KDE, we will use a home manager module called [plasma-manager](https://github.com/nix-community/plasma-manager).
40+
41+
First, you'll want to add `plasma-manager` to your `flake.nix` file like so:
42+
43+
``` nix title="flake.nix" hl_lines="7-11 15 26-29"
44+
inputs = {
45+
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
46+
home-manager = {
47+
url = "github:nix-community/home-manager";
48+
inputs.nixpkgs.follows = "nixpkgs";
4649
};
50+
plasma-manager = {
51+
url = "github:nix-community/plasma-manager";
52+
inputs.nixpkgs.follows = "nixpkgs";
53+
inputs.home-manager.follows = "home-manager";
54+
};
55+
};
4756
48-
outputs = { nixpkgs, home-manager, ...}:
57+
outputs =
58+
inputs@{ nixpkgs, home-manager, plasma-manager, ... }:
4959
let
5060
system = "x86_64-linux";
5161
pkgs = nixpkgs.legacyPackages.${system};
5262
in
5363
{
54-
homeConfigurations."USER" = home-manager.lib.homeManagerConfiguration {
64+
homeConfigurations."YOURUSERNAME" = home-manager.lib.homeManagerConfiguration {
5565
inherit pkgs;
5666
5767
# Specify your home configuration modules here, for example,
5868
# the path to your home.nix.
59-
modules = [ ./home.nix ];
69+
modules = [
70+
plasma-manager.homeModules.plasma-manager
71+
./home.nix
72+
];
6073
6174
# Optionally use extraSpecialArgs
6275
# to pass through arguments to home.nix
6376
};
64-
formatter.${system} = pkgs.nixpkgs-fmt;
6577
};
6678
}
6779
```
6880

69-
Now, we're going to create a basic `home.nix` file, where the majority of our customization will later take place.
81+
Then, re-apply the flake with `nix run home-manager -- switch --flake ~/remote/home-manager`. You should see some terminal output, with some lines about the new inputs getting successfully added! You can now begin customizing your desktop. Be sure to save the files you've changed and run that command each time you want to refresh your configuration.
82+
83+
If you're having trouble understanding Nix syntax, check out the Nix documentation on [Names and Values](https://nix.dev/tutorials/nix-language.html#names-and-values).
84+
85+
## System light/dark mode
7086

71-
More resources:
87+
Insert the following in your `home.nix` file to change the system theme to dark:
7288

73-
[Home Manager Manual - Nix Flakes](https://nix-community.github.io/home-manager/index.xhtml#ch-nix-flakes)
89+
``` nix title="home.nix"
90+
programs.plasma = {
91+
enable = true;
7492
75-
## Debugging and monitoring:
93+
workspace = {
94+
lookAndFeel = "org.kde.breezedark.desktop";
95+
iconTheme = "Papirus-Dark";
96+
};
97+
```
98+
99+
## Setting the wallpaper
100+
## Custom KDE cursor
101+
102+
103+
## Debugging and Monitoring
76104

77105
You can look at the logs and outputs from your desktoprc by running `$ systemctl —user status desktoprc.service` or `$ journalctl —user desktoprc.service`.
78106

@@ -81,4 +109,21 @@ You can look at the logs and outputs from your desktoprc by running `$ systemctl
81109
## Sample Configs from OCF Staff
82110
- laksith: [.desktoprc](https://github.com/laksith19/ocf-desktoprc/), [home manager flake](https://github.com/laksith19/ocf-home-manager)
83111

84-
- jaysa: [.desktoprc](), [home manager flake]()
112+
- jaysa: [.desktoprc](), [home manager flake]()o
113+
114+
## Resources
115+
116+
Searches:
117+
118+
- [Nixpkgs Search](https://search.nixos.org/packages)
119+
- [NixOS Options Search](https://search.nixos.org/options?)
120+
- [Home Manager Option Search](https://home-manager-options.extranix.com/)
121+
122+
Wikis:
123+
124+
- [wiki.nixos.org](https://wiki.nixos.org/wiki/NixOS_Wiki)
125+
- [nixos.wiki](https://nixos.wiki/wiki/Main_Page)
126+
127+
Relevant Reading:
128+
129+
- [Home Manager Manual - Nix Flakes](https://nix-community.github.io/home-manager/index.xhtml#ch-nix-flakes)

mkdocs.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ theme:
1313
- navigation.top
1414
- search.suggest
1515
- search.share
16+
- content.code.copy
1617
font:
1718
text: Roboto
1819
code: Meslo
@@ -41,6 +42,13 @@ markdown_extensions:
4142
- toc:
4243
permalink: true
4344
- pymdownx.tilde
45+
- pymdownx.highlight:
46+
anchor_linenums: true
47+
line_spans: __span
48+
pygments_lang_class: true
49+
- pymdownx.inlinehilite
50+
- pymdownx.snippets
51+
- pymdownx.superfences
4452
plugins:
4553
- search
4654
- git-revision-date-localized:

0 commit comments

Comments
 (0)