This commit is contained in:
commit
95a533c876
451 changed files with 18255 additions and 0 deletions
10
docs/modules/home/bemenu.md
Normal file
10
docs/modules/home/bemenu.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# bemenu
|
||||
|
||||
`bemenu` is a dynamic menu library and client program inspired by dmenu.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/bemenu).
|
||||
If you use this repository's [Hyprland module](./hyprland.md), it is enabled by default.
|
||||
|
||||
## References
|
||||
|
||||
- [GitHub](https://github.com/Cloudef/bemenu)
|
||||
17
docs/modules/home/common.md
Normal file
17
docs/modules/home/common.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Common
|
||||
|
||||
The common module sets some opinionated defaults.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/common).
|
||||
|
||||
It is recommended to import it in your Home Manager configuration as some synix modules may depend on it:
|
||||
|
||||
```nix
|
||||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.synix.homeModules.common
|
||||
];
|
||||
}
|
||||
```
|
||||
65
docs/modules/home/gemini-cli.md
Normal file
65
docs/modules/home/gemini-cli.md
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
# Gemini CLI
|
||||
|
||||
An open-source AI agent that brings the power of Gemini directly into your terminal.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/gemini-cli).
|
||||
|
||||
## References
|
||||
|
||||
- [GitHub](https://github.com/google-gemini/gemini-cli)
|
||||
- [CLI Docs](https://github.com/google-gemini/gemini-cli/tree/main/docs/cli)
|
||||
|
||||
## Setup
|
||||
|
||||
The package must be set by you. Easiest option is to use the synix overlay:
|
||||
|
||||
```nix
|
||||
{ inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.synix.homeModules.gemini-cli
|
||||
];
|
||||
|
||||
programs.gemini-cli = {
|
||||
enable = true;
|
||||
package = pkgs.synix.gemini-cli;
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Gemini CLI reads environment variables, such as your API key, from `~/.gemini/.env`. You can manage it with sops-nix:
|
||||
|
||||
```nix
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
sops.secrets.gemini-api-key = { };
|
||||
sops.templates.gemini-cli-env = {
|
||||
content = ''
|
||||
GEMINI_API_KEY=${config.sops.placeholder.gemini-api-key}
|
||||
'';
|
||||
path = config.home.homeDirectory + "/.gemini/.env";
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Set `gemini-api-key` in your `secrets.yaml`:
|
||||
|
||||
> Replace `abc123` with your Gemini API key.
|
||||
|
||||
```yaml
|
||||
gemini-api-key: abc123
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
These are some common warnings and errors you might encounter when using Gemini CLI:
|
||||
|
||||
### Error saving user settings file
|
||||
|
||||
```
|
||||
Error saving user settings file: Error: EROFS: read-only file system, open '/home/you/.gemini/settings.json'
|
||||
```
|
||||
|
||||
This is intended behavior.
|
||||
51
docs/modules/home/gpg.md
Normal file
51
docs/modules/home/gpg.md
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
# GPG
|
||||
|
||||
This module sets some defaults for gpg, mainly to let your gpg-agent handle ssh keys.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/gpg).
|
||||
|
||||
## SSH Setup
|
||||
|
||||
### GPG
|
||||
|
||||
You need a GPG authentication subkey. Follow the steps below to create one. If you already have a GPG key, skip to step 2.
|
||||
|
||||
#### 1. Generate a new GPG key
|
||||
|
||||
```sh
|
||||
gpg --full-gen-key --allow-freeform-uid
|
||||
```
|
||||
|
||||
1. Select `1` as the type of key.
|
||||
1. Select `4096` for the keysize.
|
||||
1. Select `0` to choose 'Never expire'.
|
||||
1. Enter your name, email address, and a comment (if you want). Select `0` for 'Okay'.
|
||||
|
||||
#### 2. Create an authentication subkey
|
||||
|
||||
```sh
|
||||
gpg --expert --edit-key KEY-ID
|
||||
```
|
||||
|
||||
1. At the new `gpg>` prompt, enter: `addkey`
|
||||
1. When prompted, enter your passphrase.
|
||||
1. When asked for the type of key you want, select: (8) RSA (set your own capabilities).
|
||||
1. Enter `S` to toggle the ‘Sign’ action off.
|
||||
1. Enter `E` to toggle the ‘Encrypt’ action off.
|
||||
1. Enter `A` to toggle the ‘Authenticate’ action on. The output should now include Current allowed actions: Authenticate, with nothing else on that line.
|
||||
1. Enter `Q` to continue.
|
||||
1. When asked for a keysize, choose `4096`.
|
||||
1. Select `0` to choose 'Never expire'.
|
||||
1. Once the key is created, enter `quit` to leave the gpg prompt, and `y` at the prompt to save changes.
|
||||
|
||||
### HM config
|
||||
|
||||
```nix
|
||||
imports = [
|
||||
inputs.synix.homeModules.gpg
|
||||
];
|
||||
|
||||
services.gpg-agent.sshKeys = [ "YOUR_AUTH_SUBKEY_KEYGRIP" ];
|
||||
```
|
||||
|
||||
> Get the keygrip of your authentication subkey with: `gpg -K --with-keygrip`
|
||||
153
docs/modules/home/hyprland.md
Normal file
153
docs/modules/home/hyprland.md
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
# Hyprland
|
||||
|
||||
This module extends the options of and sets some defaults for [Hyprland](https://hyprland.org/):
|
||||
|
||||
- XDG Desktop Portal for screen sharing on Wayland
|
||||
- XDG mime support and user directories
|
||||
- enable Waybar as status bar
|
||||
- enable dunst as notification service
|
||||
- some [packages](https://git.sid.ovh/sid/synix/blob/master/modules/home/hyprland/packages.nix)
|
||||
- [keybindings](https://git.sid.ovh/sid/synix/blob/master/modules/home/hyprland/binds/default.nix)
|
||||
- manage default applications via the new `applications` option
|
||||
|
||||
> Always import both NixOS and Home Manager modules from `synix` when using Hyprland.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/hyprland).
|
||||
|
||||
## Keybindings
|
||||
|
||||
The ["Master Layout"](https://wiki.hyprland.org/Configuring/Master-Layout/) is the only supported window layout.
|
||||
|
||||
> `$mod`, `modifier` or `SUPER` refer to the same key which is the Windows key by default.
|
||||
|
||||
Keybinding | Function
|
||||
---|---
|
||||
`SUPER SHIFT c` | Kill active window
|
||||
`SUPER 0..9` | Focus workspace 1-10 (`0` maps to workspace 10)
|
||||
`SUPER SHIFT 0..9` | Move active window to workspace 1-10
|
||||
`SUPER CTRL 0..9` | Focus workspace 1-10 on active monitor (moves if necessary)
|
||||
`SUPER Tab` | Focus previous workspace on active monitor
|
||||
`SUPER SHIFT Tab` | Move active window to previous workspace on active monitor
|
||||
`SUPER Comma` | Focus left monitor
|
||||
`SUPER Period` | Focus right monitor
|
||||
`SUPER SHIFT Comma` | Move active workspace to left monitor
|
||||
`SUPER SHIFT Period` | Move active workspace to right monitor
|
||||
`SUPER SHIFT Return` | Make active window master
|
||||
`SUPER CTRL Return` | Focus master window
|
||||
`SUPER j` | Focus next window
|
||||
`SUPER k` | Focus previous window
|
||||
`SUPER SHIFT j` | Swap active window with the next window
|
||||
`SUPER SHIFT k` | Swap active window with the previous window
|
||||
`SUPER h` | Decrease horizontal space of master stack
|
||||
`SUPER l` | Increase horizontal space of master stack
|
||||
`SUPER SHIFT h` | Shrink active window vertically
|
||||
`SUPER SHIFT l` | Expand active window vertically
|
||||
`SUPER i` | Add active window to master stack
|
||||
`SUPER SHIFT i` | Remove active window from master stack
|
||||
`SUPER o` | Toggle between left and top orientation
|
||||
`SUPER Left` | Focus window to the left
|
||||
`SUPER Right` | Focus window to the right
|
||||
`SUPER Up` | Focus upper window
|
||||
`SUPER Down` | Focus lower window
|
||||
`SUPER SHIFT Left` | Swap active window with window to the left
|
||||
`SUPER SHIFT Right` | Swap active window with window to the right
|
||||
`SUPER SHIFT Up` | Swap active window with upper window
|
||||
`SUPER SHIFT Down` | Swap active window with lower window
|
||||
`SUPER f` | Toggle floating for active window
|
||||
`SUPER CTRL f` | Toggle floating for all windows on workspace
|
||||
`SUPER SHIFT f` | Toggle fullscreen for active window
|
||||
`SUPER LMB` | Move window by dragging
|
||||
`SUPER RMB` | Resize window by dragging
|
||||
|
||||
Some [media keys](https://git.sid.ovh/sid/synix/blob/master/modules/home/hyprland/binds/mediakeys.nix) are also supported.
|
||||
|
||||
## Default applications
|
||||
|
||||
For clarification purposes, let's define the following terms:
|
||||
|
||||
- `<application>`: The literal name of the application/program. For example, `firefox`.
|
||||
- `<category>`: The category of the application. For example, `browser`.
|
||||
- `<exec-field-code>`: Available options are listed [here](https://specifications.freedesktop.org/desktop-entry-spec/latest/exec-variables.html). For example, `%U`.
|
||||
|
||||
To add default applications to Hyprland, you need to do the following steps:
|
||||
|
||||
### 1. Look for an existing category
|
||||
|
||||
Check if a fitting category for your application exists in [`applications/default.nix`](https://git.sid.ovh/sid/synix/blob/master/modules/home/hyprland/applications/default.nix).
|
||||
Categories are listed under `options.wayland.windowManager.hyprland.applications`, for example:
|
||||
|
||||
```nix
|
||||
# ...
|
||||
emailclient = mkAppAttrs {
|
||||
default = "thunderbird";
|
||||
bind = [ "$mod, m, exec, ${emailclient}" ];
|
||||
};
|
||||
|
||||
filemanager = mkAppAttrs {
|
||||
default = "lf";
|
||||
bind = [ "$mod, e, exec, ${terminal} -T ${filemanager} -e ${filemanager}" ];
|
||||
windowRule = [
|
||||
"float, title:^${filemanager}$"
|
||||
"size 50% 50%, title:^${filemanager}$"
|
||||
];
|
||||
};
|
||||
# ...
|
||||
```
|
||||
|
||||
If no fitting category exists, create a new one and assign a default application with optional binds and window rules.
|
||||
|
||||
### 2. Create a directory to configure the application in
|
||||
|
||||
```nix
|
||||
# applications/<application>/default.nix
|
||||
|
||||
{ inputs, outputs, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.wayland.windowManager.hyprland;
|
||||
app = cfg.applications.<category>;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# Import a module if available.
|
||||
outputs.homeModules.<application> # or `inputs.synix.homeModules.<application>`
|
||||
];
|
||||
|
||||
config = mkIf (cfg.enable && app == "<application>") {
|
||||
programs.<application> = {
|
||||
enable = true;
|
||||
# Add more config here if needed.
|
||||
};
|
||||
|
||||
# Define a desktop entry if the app's module or package does not ship with one
|
||||
xdg.desktopEntries.<application> = {
|
||||
name = "<application>"; # Use capital letters. For example, "Firefox".
|
||||
genericName = "<category>"; # Be a bit more specific. For example, "Web Browser".
|
||||
exec = "<application> <exec-field-code>"; # Program to execute, possibly with arguments.
|
||||
terminal = false; # Whether the program runs in a terminal window.
|
||||
mimeType = [ "<mime1>" "<mime2>" ]; # The MIME type(s) supported by this application. For example, "text/html".
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
> The function [`genMimeAssociations`](https://git.sid.ovh/sid/synix/blob/master/modules/home/hyprland/applications/genMimeAssociations.nix) might be useful here. See [`feh`'s config](https://git.sid.ovh/sid/synix/blob/master/modules/home/hyprland/applications/feh/default.nix) as an example.
|
||||
|
||||
> Available MIME types can be found [here](https://www.iana.org/assignments/media-types/media-types.xhtml).
|
||||
|
||||
### 3. Import the directory
|
||||
|
||||
You then need to import this directory in [`applications/default.nix`](https://git.sid.ovh/sid/synix/blob/master/modules/home/hyprland/applications/default.nix).
|
||||
Look for the comment `# add your application directories here`:
|
||||
|
||||
```nix
|
||||
# applications/default.nix
|
||||
|
||||
imports = [
|
||||
./lf
|
||||
./thunderbird
|
||||
# add your application directories here
|
||||
];
|
||||
```
|
||||
10
docs/modules/home/kitty.md
Normal file
10
docs/modules/home/kitty.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Kitty
|
||||
|
||||
`kitty` is a cross-platform, fast, feature-rich, GPU based terminal emulator.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/kitty).
|
||||
If you use this repository's [Hyprland module](./hyprland.md), it is enabled by default.
|
||||
|
||||
## References
|
||||
|
||||
- [GitHub](https://github.com/kovidgoyal/kitty)
|
||||
11
docs/modules/home/lf.md
Normal file
11
docs/modules/home/lf.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# lf
|
||||
|
||||
> Note: This module is not actively maintained. Expect things to break!
|
||||
|
||||
`lf` is a terminal file manager.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/lf).
|
||||
|
||||
## References
|
||||
|
||||
- [GitHub](https://github.com/gokcehan/lf)
|
||||
10
docs/modules/home/networkmanager-dmenu.md
Normal file
10
docs/modules/home/networkmanager-dmenu.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# networkmanager-dmenu
|
||||
|
||||
networkmanager-dmenu allows you to control NetworkManager via dmenu.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/networkmanager-dmenu).
|
||||
If you use this repository's [Hyprland module](./hyprland.md), it is enabled by default.
|
||||
|
||||
## References
|
||||
|
||||
- [GitHub](https://github.com/firecat53/networkmanager-dmenu)
|
||||
75
docs/modules/home/nextcloud-sync.md
Normal file
75
docs/modules/home/nextcloud-sync.md
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
# Nextcloud sync client
|
||||
|
||||
Because every other client sucks.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/nextcloud-sync).
|
||||
|
||||
## Setup
|
||||
|
||||
This is an example home config:
|
||||
|
||||
```nix
|
||||
{ inputs, config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.synix.homeModules.nextcloud-sync
|
||||
];
|
||||
|
||||
services.nextcloud-sync = {
|
||||
enable = true;
|
||||
remote = "cloud.sid.ovh"; # just the URL without `https://`
|
||||
passwordFile = config.sops.secrets.nextcloud.path;
|
||||
connections = [ # absolute paths without trailing /
|
||||
{
|
||||
local = "/home/sid/aud";
|
||||
remote = "/aud";
|
||||
}
|
||||
{
|
||||
local = "/home/sid/doc";
|
||||
remote = "/doc";
|
||||
}
|
||||
{
|
||||
local = "/home/sid/img";
|
||||
remote = "/img";
|
||||
}
|
||||
{
|
||||
local = "/home/sid/vid";
|
||||
remote = "/vid";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
You can manually sync by running:
|
||||
|
||||
```bash
|
||||
nextcloud-sync-all
|
||||
```
|
||||
|
||||
This will synchronize all defined connections.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Each listed connection spawns a systemd user service and timer. Using the example above, we get:
|
||||
|
||||
```plaintext
|
||||
nextcloud-sync-aud.service
|
||||
nextcloud-sync-aud.timer
|
||||
nextcloud-sync-doc.service
|
||||
nextcloud-sync-doc.timer
|
||||
nextcloud-sync-img.service
|
||||
nextcloud-sync-img.timer
|
||||
nextcloud-sync-vid.service
|
||||
nextcloud-sync-vid.timer
|
||||
```
|
||||
|
||||
Check their status to know what might go wrong:
|
||||
|
||||
```bash
|
||||
systemctl --user status nextcloud-sync-doc.service
|
||||
journalctl --user -xeu nextcloud-sync-doc.service
|
||||
```
|
||||
97
docs/modules/home/nixvim.md
Normal file
97
docs/modules/home/nixvim.md
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
# Nixvim
|
||||
|
||||
This module provides some defaults to quickly set up Nixvim with some plugins.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/nixvim).
|
||||
|
||||
## Config
|
||||
|
||||
Here is an example configuration:
|
||||
|
||||
```nix
|
||||
# flake.nix
|
||||
inputs = {
|
||||
nixvim.url = "github:nix-community/nixvim";
|
||||
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
```
|
||||
|
||||
```nix
|
||||
# home/YOU/default.nix
|
||||
{ inputs, lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.synix.homeModules.stylix # This module works great with stylix
|
||||
inputs.synix.homeMmodules.nixvim # You need to import this module
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
#colorschemes.SCHEME.enable = true; # If you do not use the stylix module, set a scheme manually
|
||||
# This module provides defaults for the following plugins.
|
||||
# They are all enabled by default.
|
||||
plugins = {
|
||||
cmp.enable = true; # Auto completion
|
||||
dap.enable = true; # Debugging
|
||||
lsp.enable = true; # Language server
|
||||
lualine.enable = true; # Statusline
|
||||
luasnip.enable = true; # Coding snippets
|
||||
markdown-preview.enable = true; # Markdown preview in Browser
|
||||
telescope.enable = true; # Fuzzy finder
|
||||
treesitter.enable = true; # Syntax highlighting
|
||||
trouble.enable = true; # Diagnostic messages
|
||||
};
|
||||
};
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
scheme = "dracula"; # This automatically sets the nixvim scheme as well
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
## Keymaps
|
||||
|
||||
This module sets some keymaps. Here are some important ones:
|
||||
|
||||
> `<leader>` defaults to the space key
|
||||
|
||||
key | action
|
||||
---|---
|
||||
`<leader>pv` | ex command (file explorer)
|
||||
`<leader>s` | search and replace
|
||||
`<C-a>` | select whole buffer
|
||||
`<leader>ss` | toggle spell checking
|
||||
`<leader>se` | switch to english spell checking
|
||||
`<leader>sg` | switch to german spell checking
|
||||
`z=` | correction suggestions for a misspelled word
|
||||
`zg` | add word to spell list
|
||||
`<C-CR>` | confirm selection in completion menu
|
||||
`<Tab>` | select next item in completion menu
|
||||
`<S-Tab>` | select previous item in completion menu
|
||||
`gd` | go to definition
|
||||
`K` | display more information about word under cursor
|
||||
`<leader>bl` | list buffers
|
||||
`<C-S-J>` | next buffer
|
||||
`<C-S-K>` | previous buffer
|
||||
`<leader>fb` or `<C-e>` | open file browser
|
||||
`<leader>ff` | find files by name
|
||||
`<leader>fg` or `<C-f>` | find files containing string
|
||||
`<leader>xd` | toggle diagnostics
|
||||
`<leader>xq` | toggle quick fix list
|
||||
`<leader>m` | run make command
|
||||
`<leader>xl` | toggle loclist list
|
||||
`<leader>xx` | toggle diagnostics list
|
||||
`<leader>xq` | toggle quifick list
|
||||
`<C-A-J>` | previous quickfix item
|
||||
`<C-A-K>` | next quickfix item
|
||||
`<leader>ca` | apply code action
|
||||
|
||||
See [keymaps.nix](https://git.sid.ovh/sid/synix/blob/master/modules/home/nixvim/keymaps.nix) and [plugins](https://git.sid.ovh/sid/synix/blob/master/modules/home/nixvim/plugins/) for more details.
|
||||
|
||||
These commands do not have keymaps yet but might be useful anyway:
|
||||
|
||||
command | action
|
||||
---|---
|
||||
`:MarkdownPreview` | live render the current markdown buffer
|
||||
84
docs/modules/home/password-manager.md
Normal file
84
docs/modules/home/password-manager.md
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
# Password Manager
|
||||
|
||||
This module will automatically install [`pass`](https://www.passwordstore.org/) as your password manager. It also provides a custom version of [`passmenu`](https://git.zx2c4.com/password-store/tree/contrib/dmenu/passmenu) using `bemenu` for Wayland sessions called `passmenu-bemenu` and configures [passff](https://codeberg.org/PassFF/passff) for your web browser.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/password-manager).
|
||||
|
||||
## Setup
|
||||
|
||||
It is assumed that you have a GPG key.
|
||||
|
||||
### HM config
|
||||
|
||||
```nix
|
||||
imports = [
|
||||
inputs.synix.homeModules.passwordManager
|
||||
];
|
||||
|
||||
programs.passwordManager = {
|
||||
enable = true;
|
||||
key = "YOUR_GPG_KEYGRIP";
|
||||
wayland = true; # if you are using Wayland
|
||||
};
|
||||
```
|
||||
|
||||
> Get your keygrip with `gpg -K --with-keygrip`
|
||||
|
||||
### Password Store
|
||||
|
||||
`pass` uses a Password Store to manage your password files. If this is your first time using `pass`, follow option _a)_. If you already have a remote git repository to store your password-store, follow option _b)_.
|
||||
|
||||
#### a) Initialize a new Password Store
|
||||
|
||||
Read the introduction and setup guide on the [pass home page](https://passwordstore.org).
|
||||
|
||||
#### b) Cloning your remote password-store repository
|
||||
|
||||
The following guide assumes that you have your private GPG key on a luks encrypted USB partition which is needed to access your remote repo through ssh.
|
||||
|
||||
1. **Identify the USB device**:
|
||||
Identify the device name for your USB drive using the `lsblk` or `fdisk -l` command.
|
||||
|
||||
```bash
|
||||
lsblk
|
||||
```
|
||||
|
||||
Look for the device corresponding to your USB drive (e.g., `/dev/sdb1`).
|
||||
|
||||
2. **Unlock the LUKS partition**:
|
||||
Unlock the LUKS partition with the `cryptsetup luksOpen` command. Replace `/dev/sdX1` with the actual device name of your USB partition.
|
||||
|
||||
```bash
|
||||
sudo cryptsetup luksOpen /dev/sdX1 crypt
|
||||
```
|
||||
|
||||
You will be prompted to enter the passphrase for the LUKS partition.
|
||||
|
||||
3. **Mount the unlocked partition**:
|
||||
Mount the unlocked LUKS partition to access the files.
|
||||
|
||||
```bash
|
||||
sudo mount /dev/mapper/crypt /mnt
|
||||
```
|
||||
|
||||
4. **Import the GPG key**:
|
||||
Use the `gpg --import` command to import the GPG key from the mounted USB partition.
|
||||
|
||||
```bash
|
||||
gpg --import /mnt/path/to/privatekey.gpg
|
||||
```
|
||||
|
||||
5. **Unmount and close the LUKS partition**:
|
||||
After importing the key, unmount the partition and close the LUKS mapping.
|
||||
|
||||
```bash
|
||||
sudo umount /mnt
|
||||
sudo cryptsetup luksClose crypt
|
||||
```
|
||||
|
||||
6. **Clone your password store repository**:
|
||||
Clone your password store repository using the `git clone` command, for example:
|
||||
|
||||
```bash
|
||||
git clone ssh://example.tld:/home/you/git/password-store.git ~/.local/share/password-store
|
||||
```
|
||||
99
docs/modules/home/sops.md
Normal file
99
docs/modules/home/sops.md
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
# Sops
|
||||
|
||||
For more information on how to use this module, see the [Sops NixOS module documentation](../nixos/sops.md).
|
||||
|
||||
For extensive documentation, read the [Readme on GitHub](https://github.com/Mic92/sops-nix/blob/master/README.md).
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/sops).
|
||||
|
||||
## 1. Generate an age key
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/sops/age
|
||||
age-keygen -o ~/.config/sops/age/keys.txt
|
||||
```
|
||||
|
||||
> Take note of your public key. You can print it again with:
|
||||
> `age-keygen -y ~/.config/sops/age/keys.txt`
|
||||
|
||||
|
||||
## 2. Edit `.sops.yaml`
|
||||
|
||||
This file manages access to all secrets in this repository (NixOS and Home Manager configurations).
|
||||
|
||||
```bash
|
||||
vim ~/.config/nixos/.sops.yaml
|
||||
```
|
||||
|
||||
Add your public key under `keys` and set creation rules for your config:
|
||||
|
||||
```yaml
|
||||
keys:
|
||||
- &you age12zlz6lvcdk6eqaewfylg35w0syh58sm7gh53q5vvn7hd7c6nngyseftjxl
|
||||
creation_rules:
|
||||
- path_regex: users/you/home/secrets/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *you
|
||||
```
|
||||
|
||||
## 3. Create a `secrets` directory
|
||||
|
||||
This directory in your Home Manager configuration will hold your secrets and sops configuration.
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/nixos/users/$(whoami)/home/secrets
|
||||
```
|
||||
|
||||
## 4. Create a sops file
|
||||
|
||||
A sops file contains secrets in plain text. This file will then be encrypted with age. Make sure to follow the path regex in the creation rules.
|
||||
|
||||
```bash
|
||||
cd ~/.config/nixos
|
||||
sops users/$(whoami)/home/secrets/secrets.yaml
|
||||
```
|
||||
|
||||
```yaml
|
||||
# Files must always have a string value
|
||||
example-key: example-value
|
||||
# Nesting the key results in the creation of directories.
|
||||
myservice:
|
||||
my_subdir:
|
||||
my_secret: password1
|
||||
```
|
||||
|
||||
## 5. Deploy the secrets to the Nix store
|
||||
|
||||
Define your secrets under `sops.secrets`.
|
||||
|
||||
```bash
|
||||
vim ~/.config/nixos/users/$(whoami)/home/secrets/default.nix
|
||||
```
|
||||
|
||||
```nix
|
||||
{
|
||||
sops.secrets.example-key = {};
|
||||
sops.secrets."myservice/my_subdir/my_secret" = {};
|
||||
}
|
||||
```
|
||||
|
||||
## 6. Reference secrets in your Home Manager configuration
|
||||
|
||||
Now you can use these secrets in your Home Manager configuration:
|
||||
|
||||
```nix
|
||||
{ outputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./secrets
|
||||
|
||||
outputs.homeModules.sops # includes all necessary configuration for sops-nix
|
||||
];
|
||||
|
||||
someOption.secretFile = config.sops.secrets.example-key.path;
|
||||
|
||||
anotherOption.passwordFile = config.sops.secrets."myservice/my_subdir/my_secret".path;
|
||||
}
|
||||
```
|
||||
90
docs/modules/home/stylix.md
Normal file
90
docs/modules/home/stylix.md
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
# Stylix
|
||||
|
||||
This module wraps [stylix](https://github.com/nix-community/stylix), a theming framework for NixOS, Home Manager, nix-darwin, and Nix-on-Droid.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/stylix).
|
||||
|
||||
## References
|
||||
|
||||
- [docs](https://nix-community.github.io/stylix/)
|
||||
|
||||
## Usage
|
||||
|
||||
Add stylix to your flake inputs:
|
||||
|
||||
```nix
|
||||
inputs = {
|
||||
stylix.url = "github:nix-community/stylix";
|
||||
stylix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
```
|
||||
|
||||
For example, in your home configuration, set:
|
||||
|
||||
```nix
|
||||
imports = [ inputs.synix.homeModules.stylix ];
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
scheme = "SCHEME";
|
||||
};
|
||||
```
|
||||
|
||||
Replace `SCHEME` with the name of your scheme. Available schemes are listed as `validSchemes` in [our stylix module](https://git.sid.ovh/sid/synix/tree/master/modules/home/stylix/default.nix).
|
||||
|
||||
## Create a scheme
|
||||
|
||||
You can create your own scheme in `schemes/<scheme>.yaml`. To make it available via `stylix.scheme`, you need to add it to `validSchemes` and `customSchemes` in [the module's `default.nix`](https://git.sid.ovh/sid/synix/tree/master/modules/home/stylix/default.nix). Make sure that the resulting scheme name is a valid [colorscheme in nixvim](https://github.com/nix-community/nixvim/tree/main/plugins/colorschemes).
|
||||
|
||||
It is recommended to set colors according to their purpose / name. This means that `base00` should always be a rather dark color for the background and `base08` a reddish color.
|
||||
|
||||
```yaml
|
||||
# <scheme>.yaml
|
||||
system: "base16"
|
||||
name: "SCHEME"
|
||||
author: "AUTHOR"
|
||||
description: "A dark theme inspired by the SCHEME color scheme."
|
||||
slug: "SCHEME-theme"
|
||||
variant: "dark"
|
||||
palette:
|
||||
base00: "080808" # background
|
||||
base01: "323437" # alternate background
|
||||
base02: "9e9e9e" # selection background
|
||||
base03: "bdbdbd" # comments
|
||||
base04: "b2ceee" # alternate text
|
||||
base05: "c6c6c6" # default text
|
||||
base06: "e4e4e4" # light foreground
|
||||
base07: "eeeeee" # light background
|
||||
base08: "ff5454" # error / red
|
||||
base09: "cf87e8" # urgent / orange
|
||||
base0A: "8cc85f" # warning / yellow
|
||||
base0B: "e3c78a" # green
|
||||
base0C: "79dac8" # cyan
|
||||
base0D: "80a0ff" # blue
|
||||
base0E: "36c692" # magenta
|
||||
base0F: "74b2ff" # brown
|
||||
```
|
||||
|
||||
Refer to [Stylix's style guide](https://stylix.danth.me/styling.html) for more information on where and how these colors will be used.
|
||||
|
||||
You can preview your color schemes with the [base16-viewer](https://sesh.github.io/base16-viewer/) (*Disable your dark reader*) or `print-colors` - a Python script to view color schemes in the terminal:
|
||||
|
||||
```bash
|
||||
print-colors PATH/TO/colors.yaml
|
||||
```
|
||||
|
||||
## Wallpaper
|
||||
|
||||
You can set a wallpaper with:
|
||||
|
||||
```nix
|
||||
stylix.image = ./path/to/wallpaper.png;
|
||||
```
|
||||
|
||||
This can be any image as a PNG file. You might want to take a look at [some Nix themed wallpapers](https://github.com/NixOS/nixos-artwork/tree/master/wallpapers) or [nix-wallpaper](https://github.com/lunik1/nix-wallpaper/tree/master) to create your own wallpaper with the Nix logo and custom colors.
|
||||
|
||||
Or create a solid color image with:
|
||||
|
||||
```bash
|
||||
convert -size 3840x2160 "xc:#080808" wallpaper.png
|
||||
```
|
||||
11
docs/modules/home/virtualisation.md
Normal file
11
docs/modules/home/virtualisation.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# Virtualisation
|
||||
|
||||
Home Manager module to go with the [Virtualisation NixOS module](../nixos/virtualisation.md).
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/virtualisation).
|
||||
|
||||
## Setup
|
||||
|
||||
1. Import this module in your Home Manager configuration and the corresponding [NixOS module](../nixos/virtualisation.md) in your NixOS configuration.
|
||||
1. Rebuild and reboot: `rebuild all && sudo reboot now`
|
||||
1. Start the default network: `virsh net-autostart default`
|
||||
10
docs/modules/home/waybar.md
Normal file
10
docs/modules/home/waybar.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Waybar
|
||||
|
||||
Waybar is a highly customizable Wayland bar for Sway and Wlroots based compositors.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/waybar).
|
||||
If you use this repository's [Hyprland module](./hyprland.md), it is enabled by default.
|
||||
|
||||
## References
|
||||
|
||||
- [GitHub](https://github.com/Alexays/Waybar)
|
||||
13
docs/modules/home/yazi.md
Normal file
13
docs/modules/home/yazi.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# yazi
|
||||
|
||||
Terminal file manager written in Rust.
|
||||
|
||||
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/yazi).
|
||||
If you use this repository's [Hyprland module](./hyprland.md), it is enabled by default.
|
||||
|
||||
## References
|
||||
|
||||
- [GitHub](https://github.com/sxyazi/yazi)
|
||||
- [docs](https://yazi-rs.github.io/docs/quick-start)
|
||||
- [default keybindings](https://github.com/sxyazi/yazi/blob/shipped/yazi-config/preset/keymap-default.toml)
|
||||
- [Plugins in Nixpkgs](https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=yaziPlugins)
|
||||
Loading…
Add table
Add a link
Reference in a new issue