Compare commits

..

1 commit

Author SHA1 Message Date
sid
951182f6df initial commit
All checks were successful
Flake check / flake-check (pull_request) Successful in 4m23s
2026-03-30 12:35:50 +02:00
207 changed files with 1990 additions and 3485 deletions

1
.envrc
View file

@ -1,2 +1 @@
# shellcheck shell=bash
use flake use flake

View file

@ -1,10 +1,9 @@
---
name: Build tests name: Build tests
on: on:
pull_request: pull_request:
branches: branches:
- release-* - release-25.11
jobs: jobs:
build-hosts: build-hosts:

View file

@ -1,4 +1,3 @@
---
name: Deploy docs name: Deploy docs
on: on:
@ -19,8 +18,5 @@ jobs:
STORE_PATH=$(nix build .#synix-docs --print-out-paths --no-link) STORE_PATH=$(nix build .#synix-docs --print-out-paths --no-link)
echo "STORE_PATH=$STORE_PATH" >> $GITHUB_ENV echo "STORE_PATH=$STORE_PATH" >> $GITHUB_ENV
- name: Check external links
run: nix run nixpkgs#lychee -- --exclude-loopback docs/
- name: Update symlink - name: Update symlink
run: ln -sfn ${{ env.STORE_PATH }} /var/www/doc run: ln -sfn ${{ env.STORE_PATH }} /var/www/doc

View file

@ -1,8 +1,6 @@
---
name: Flake check name: Flake check
on: on: [pull_request]
pull_request:
jobs: jobs:
flake-check: flake-check:
@ -13,8 +11,5 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Check formatting
run: nix fmt -- --check
- name: Run flake check - name: Run flake check
run: nix flake check --impure --all-systems run: nix flake check --impure

View file

@ -27,7 +27,7 @@ Add this repo to your flake inputs:
inputs.synix.url = "git+https://git.sid.ovh/sid/synix.git"; inputs.synix.url = "git+https://git.sid.ovh/sid/synix.git";
``` ```
See the [documentation](https://doc.sid.ovh) for a full setup guide. See the [documentation](https://doc.sid.ovh/synix) for a full setup guide.
## Templates ## Templates

View file

@ -11,6 +11,9 @@ HOSTNAME=""
# Templates with Home Manager configurations # Templates with Home Manager configurations
HM_CONFIGS=("hyprland") HM_CONFIGS=("hyprland")
# This will get overwritten by the derivation
TEMPLATES_DIR=""
# Print usage information # Print usage information
usage() { usage() {
cat <<EOF cat <<EOF

View file

@ -6,7 +6,7 @@
home-manager, home-manager,
hostname, hostname,
nix, nix,
nixos-rebuild-ng, nixos-rebuild,
... ...
}: }:
@ -25,6 +25,6 @@ writeShellApplication {
home-manager home-manager
hostname hostname
nix nix
nixos-rebuild-ng nixos-rebuild
]; ];
} }

View file

@ -1,21 +1,15 @@
#!/usr/bin/env bash
# NixOS and standalone Home Manager rebuild script # NixOS and standalone Home Manager rebuild script
# Defaults # Defaults
FLAKE_PATH="${REBUILD_FLAKE_PATH:-${FLAKE_PATH:-$HOME/.config/nixos}}" # Default flake path FLAKE_PATH="$HOME/.config/nixos" # Default flake path
USER="${REBUILD_USER:-$(whoami)}" # Default username HOME_USER="$(whoami)" # Default username. Used to identify the Home Manager configuration
HOST="${REBUILD_HOST:-$(hostname)}" # Default hostname NIXOS_HOST="$(hostname)" # Default hostname. Used to identify the NixOS and Home Manager configuration
BUILD_HOST="${REBUILD_BUILD_HOST:-}" # Default build host BUILD_HOST="" # Default build host. Empty means localhost
TARGET_HOST="${REBUILD_TARGET_HOST:-}" # Default target host TARGET_HOST="" # Default target host. Empty means localhost
UPDATE="${REBUILD_UPDATE:-0}" # Default to not update UPDATE=0 # Default to not update flake repositories
UPDATE_INPUTS="${REBUILD_UPDATE_INPUTS:-}" # Default list of inputs UPDATE_INPUTS="" # Default list of inputs to update. Empty means all
ROLLBACK="${REBUILD_ROLLBACK:-0}" # Default to not rollback ROLLBACK=0 # Default to not rollback
SHOW_TRACE="${REBUILD_SHOW_TRACE:-0}" # Default to not show trace SHOW_TRACE=0 # Default to not show detailed error messages
# Output functions
_status() { echo -e "\033[0;34m> $1\033[0m"; }
success() { echo -e "\033[0;32m$1\033[0m"; }
error() { echo -e "\033[0;31mError: $1\033[0m" >&2; exit 1; }
# Function to display the help message # Function to display the help message
Help() { Help() {
@ -29,7 +23,7 @@ Help() {
echo " help Show this help message" echo " help Show this help message"
echo echo
echo "Options (for NixOS and Home Manager):" echo "Options (for NixOS and Home Manager):"
echo " -H, --host <host> Specify the hostname (as in 'nixosConfiguraions.<host>'). Default: $HOST" echo " -H, --host <host> Specify the hostname (as in 'nixosConfiguraions.<host>'). Default: $NIXOS_HOST"
echo " -p, --path <path> Set the path to the flake directory. Default: $FLAKE_PATH" echo " -p, --path <path> Set the path to the flake directory. Default: $FLAKE_PATH"
echo " -U, --update [inputs] Update all flake inputs. Optionally provide comma-separated list of inputs to update instead." echo " -U, --update [inputs] Update all flake inputs. Optionally provide comma-separated list of inputs to update instead."
echo " -r, --rollback Don't build the new configuration, but use the previous generation instead" echo " -r, --rollback Don't build the new configuration, but use the previous generation instead"
@ -40,50 +34,47 @@ Help() {
echo " -T, --target-host <user@example.com> Deploy the configuration to a remote host via SSH. If '--host' is specified, it will be used as the target host." echo " -T, --target-host <user@example.com> Deploy the configuration to a remote host via SSH. If '--host' is specified, it will be used as the target host."
echo echo
echo "Home Manager only options:" echo "Home Manager only options:"
echo " -u, --user <user> Specify the username (as in 'homeConfigurations.<user>@<host>'). Default: $USER" echo " -u, --user <user> Specify the username (as in 'homeConfigurations.<user>@<host>'). Default: $HOME_USER"
}
# Function to handle errors
error() {
echo "Error: $1"
exit 1
} }
# Function to rebuild NixOS configuration # Function to rebuild NixOS configuration
Rebuild_nixos() { Rebuild_nixos() {
local FLAKE="$FLAKE_PATH#$HOST" local FLAKE="$FLAKE_PATH#$NIXOS_HOST"
# Construct rebuild command # Construct rebuild command
local CMD=("nixos-rebuild" "switch" "--sudo") local CMD=("nixos-rebuild" "switch" "--sudo")
[[ -n "$TARGET_HOST" || -n "$BUILD_HOST" ]] && CMD+=("--ask-sudo-password")
CMD+=("--flake" "$FLAKE") CMD+=("--flake" "$FLAKE")
[ "$ROLLBACK" = 1 ] && CMD+=("--rollback") [ "$ROLLBACK" = 1 ] && CMD+=("--rollback")
[ "$SHOW_TRACE" = 1 ] && CMD+=("--show-trace") [ "$SHOW_TRACE" = 1 ] && CMD+=("--show-trace")
[ -n "$BUILD_HOST" ] && CMD+=("--build-host" "$BUILD_HOST") [ -n "$BUILD_HOST" ] && CMD+=("--build-host" "$BUILD_HOST")
if [ "$HOST" != "$(hostname)" ] && [ -z "$TARGET_HOST" ]; then if [ "$NIXOS_HOST" != "$(hostname)" ] && [ -z "$TARGET_HOST" ]; then
TARGET_HOST="$HOST" TARGET_HOST="$NIXOS_HOST"
_status "Using '$TARGET_HOST' as target host." echo "Using '$TARGET_HOST' as target host."
fi fi
[ -n "$TARGET_HOST" ] && CMD+=("--target-host" "$TARGET_HOST") [ -n "$TARGET_HOST" ] && CMD+=("--target-host" "$TARGET_HOST")
[[ -n "$TARGET_HOST" || -n "$BUILD_HOST" ]] && CMD+=("--ask-sudo-password")
# Build config first so we can diff it
local BUILD_CMD=("nixos-rebuild" "build" "--no-build-output" "--flake" "$FLAKE")
[ "$SHOW_TRACE" = 1 ] && BUILD_CMD+=("--show-trace")
[ -n "$BUILD_HOST" ] && BUILD_CMD+=("--build-host" "$BUILD_HOST")
# Rebuild NixOS configuration
if [ "$ROLLBACK" = 0 ]; then if [ "$ROLLBACK" = 0 ]; then
_status "Building NixOS configuration '$FLAKE'..." echo "Rebuilding NixOS configuration '$FLAKE'..."
_status "Executing command: ${BUILD_CMD[*]}"
"${BUILD_CMD[@]}" || error "NixOS build failed"
_status "Switching to new NixOS configuration"
else else
_status "Rolling back to last NixOS generation" echo "Rolling back to last NixOS generation..."
fi fi
sudo -v echo "Executing command: ${CMD[*]}"
_status "Executing command: ${CMD[*]}"
"${CMD[@]}" || error "NixOS rebuild failed" "${CMD[@]}" || error "NixOS rebuild failed"
success "NixOS rebuild completed successfully." echo "NixOS rebuild completed successfully."
} }
# Function to rebuild Home Manager configuration # Function to rebuild Home Manager configuration
Rebuild_home() { Rebuild_home() {
local FLAKE="$FLAKE_PATH#$USER@$HOST" local FLAKE="$FLAKE_PATH#$HOME_USER@$NIXOS_HOST"
if [ -n "$BUILD_HOST" ] || [ -n "$TARGET_HOST" ]; then if [ -n "$BUILD_HOST" ] || [ -n "$TARGET_HOST" ]; then
error "Remote building is not supported for Home Manager." error "Remote building is not supported for Home Manager."
@ -100,27 +91,21 @@ Rebuild_home() {
[ "$SHOW_TRACE" = 1 ] && CMD+=("--show-trace") [ "$SHOW_TRACE" = 1 ] && CMD+=("--show-trace")
fi fi
# Build config first so we can diff it # Rebuild Home Manager configuration
if [ "$ROLLBACK" = 0 ]; then if [ "$ROLLBACK" = 0 ]; then
local BUILD_CMD=("home-manager" "build" "--no-out-link" "--flake" "$FLAKE") echo "Rebuilding Home Manager configuration '$FLAKE'..."
[ "$SHOW_TRACE" = 1 ] && BUILD_CMD+=("--show-trace")
_status "Building Home Manager configuration '$FLAKE'..."
_status "Executing command: ${BUILD_CMD[*]}"
"${BUILD_CMD[@]}" || error "Home Manager build failed"
_status "Switching to new Home Manager configuration"
else else
_status "Rolling back to last Home Manager generation" echo "Rolling back to last Home Manager generation..."
fi fi
_status "Executing command: ${CMD[*]}" echo "Executing command: ${CMD[*]}"
"${CMD[@]}" || error "Home Manager rebuild failed" "${CMD[@]}" || error "Home Manager rebuild failed"
success "Home Manager rebuild completed successfully." echo "Home Manager rebuild completed successfully."
} }
# Function to update flake repositories # Function to Update flake repositories
Update() { Update() {
_status "Updating flake inputs..." echo "Updating flake inputs..."
# Construct update command as an array # Construct update command as an array
local CMD=("nix" "flake" "update" "--flake" "$FLAKE_PATH") local CMD=("nix" "flake" "update" "--flake" "$FLAKE_PATH")
@ -132,18 +117,17 @@ Update() {
done done
fi fi
_status "Executing command: ${CMD[*]}" echo "Executing command: ${CMD[*]}"
"${CMD[@]}" || error "Failed to update flake repositories" "${CMD[@]}" || error "Failed to update flake repositories"
success "Flake repositories updated successfully." echo "Flake repositories updated successfully."
} }
# Parse command-line options # Parse command-line options
if [[ -z "${1:-}" ]]; then if [[ -z "${1:-}" ]]; then
echo -e "\033[0;31mError: No command specified. Printing help page.\033[0m" >&2 echo "Error: No command specified. Printing help page."
Help Help
exit 1 exit 1
fi fi
COMMAND=$1 COMMAND=$1
shift shift
@ -157,7 +141,7 @@ while [ $# -gt 0 ]; do
case "${1:-}" in case "${1:-}" in
-H|--host) -H|--host)
if [ -n "${2:-}" ]; then if [ -n "${2:-}" ]; then
HOST="$2" NIXOS_HOST="$2"
shift 2 shift 2
else else
error "-H|--host option requires an argument" error "-H|--host option requires an argument"
@ -165,7 +149,7 @@ while [ $# -gt 0 ]; do
;; ;;
-u|--user) -u|--user)
if [ -n "${2:-}" ]; then if [ -n "${2:-}" ]; then
USER="$2" HOME_USER="$2"
shift 2 shift 2
else else
error "-u|--user option requires an argument" error "-u|--user option requires an argument"
@ -214,7 +198,9 @@ while [ $# -gt 0 ]; do
fi fi
;; ;;
*) *)
error "Unknown option '$1'" echo "Error: Unknown option '$1'"
Help
exit 1
;; ;;
esac esac
done done
@ -241,10 +227,10 @@ fi
[ "$UPDATE" = 1 ] && Update [ "$UPDATE" = 1 ] && Update
case "$COMMAND" in case "$COMMAND" in
nixos|os) nixos)
Rebuild_nixos Rebuild_nixos
;; ;;
home|hm) home)
Rebuild_home Rebuild_home
;; ;;
all) all)
@ -252,6 +238,9 @@ case "$COMMAND" in
Rebuild_home Rebuild_home
;; ;;
*) *)
error "Unknown command '$COMMAND'" echo "Error: Unknown command '$COMMAND'"
echo "Printing help page:"
Help
exit 1
;; ;;
esac esac

View file

@ -1,4 +1,3 @@
#!/usr/bin/env bash
SYSTEM="x86_64-linux" SYSTEM="x86_64-linux"
IGNORE_PACKAGES=( IGNORE_PACKAGES=(
"pyman" "pyman"

View file

@ -1,6 +1,6 @@
# Add NixOS and Home Manager configurations # Add NixOS and Home Manager configurations
Choose a configuration template from [this list](https://git.sid.ovh/sid/synix/src/branch/release-25.11/templates/nix-configs). Choose a configuration template from [this list](https://git.sid.ovh/sid/synix/tree/master/apps/create/templates).
Run the `create` script to add your desired configuration template to your nix-config flake: Run the `create` script to add your desired configuration template to your nix-config flake:
@ -14,7 +14,7 @@ nix --experimental-features "nix-command flakes" run git+https://git.sid.ovh/sid
-f ~/.config/nixos -f ~/.config/nixos
``` ```
> Change the architecture if needed. Supported architectures are listet under `supportedSystems` inside [`flake.nix`](https://git.sid.ovh/sid/synix/src/branch/release-25.11/flake.nix). > Change the architecture if needed. Supported architectures are listet under `supportedSystems` inside [`flake.nix`](https://git.sid.ovh/sid/synix/blob/master/flake.nix).
See the script's help page for reference: See the script's help page for reference:

View file

@ -1,6 +1,6 @@
# Create your own nix-config flake # Create your own nix-config flake
Create an empty directory and apply a [nix-config template](https://git.sid.ovh/sid/synix/src/branch/release-25.11/templates/nix-configs) to it: Create an empty directory and apply a [nix-config template](https://git.sid.ovh/sid/synix/tree/master/templates/nix-config) to it:
```bash ```bash
mkdir -p ~/.config/nixos mkdir -p ~/.config/nixos

View file

@ -1,6 +1,6 @@
# Installation Guide # Installation Guide
This guide will walk you through installing NixOS using the provided installation script [`install.sh`](https://git.sid.ovh/sid/synix/src/branch/release-25.11/apps/install/install.sh). This guide will walk you through installing NixOS using the provided installation script [`install.sh`](https://git.sid.ovh/sid/synix/blob/master/apps/install/install.sh).
## Prerequisites ## Prerequisites
@ -114,8 +114,7 @@ git clone YOUR_GIT_REPO_URL ~/.config/nixos
Home Manager is not installed by default. Enter the development shell to apply the configuration: Home Manager is not installed by default. Enter the development shell to apply the configuration:
```bash ```bash
nix --experimental-features "nix-command flakes" develop git+https://git.sid.ovh/sid/synix#devShells.x86_64-linux.install-hm \ nix-shell ~/.config/nixos/shell.nix --run 'rebuild home'
--command "rebuild home"
``` ```
### 8. Reboot your System ### 8. Reboot your System

View file

@ -2,7 +2,7 @@
`bemenu` is a dynamic menu library and client program inspired by dmenu. `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/src/branch/release-25.11/modules/home/bemenu). 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. If you use this repository's [Hyprland module](./hyprland.md), it is enabled by default.
## References ## References

View file

@ -2,7 +2,7 @@
The common module sets some opinionated defaults. The common module sets some opinionated defaults.
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/home/common). 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: It is recommended to import it in your Home Manager configuration as some synix modules may depend on it:

View 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.

View file

@ -2,7 +2,7 @@
This module sets some defaults for gpg, mainly to let your gpg-agent handle ssh keys. 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/src/branch/release-25.11/modules/home/gpg). View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/gpg).
## SSH Setup ## SSH Setup

View file

@ -6,17 +6,17 @@ This module extends the options of and sets some defaults for [Hyprland](https:/
- XDG mime support and user directories - XDG mime support and user directories
- enable Waybar as status bar - enable Waybar as status bar
- enable dunst as notification service - enable dunst as notification service
- some [packages](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/home/hyprland/packages.nix) - some [packages](https://git.sid.ovh/sid/synix/blob/master/modules/home/hyprland/packages.nix)
- [keybindings](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/home/hyprland/binds/default.nix) - [keybindings](https://git.sid.ovh/sid/synix/blob/master/modules/home/hyprland/binds/default.nix)
- manage default applications via the new `applications` option - manage default applications via the new `applications` option
> Always import both NixOS and Home Manager modules from `synix` when using Hyprland. > 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/src/branch/release-25.11/modules/home/hyprland). View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/hyprland).
## Keybindings ## Keybindings
The ["Master Layout"](https://wiki.hypr.land/Configuring/Layouts/Master-Layout/) is the only supported window layout. 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. > `$mod`, `modifier` or `SUPER` refer to the same key which is the Windows key by default.
@ -59,7 +59,7 @@ Keybinding | Function
`SUPER LMB` | Move window by dragging `SUPER LMB` | Move window by dragging
`SUPER RMB` | Resize window by dragging `SUPER RMB` | Resize window by dragging
Some [media keys](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/home/hyprland/binds/mediakeys.nix) are also supported. Some [media keys](https://git.sid.ovh/sid/synix/blob/master/modules/home/hyprland/binds/mediakeys.nix) are also supported.
## Default applications ## Default applications
@ -73,7 +73,7 @@ To add default applications to Hyprland, you need to do the following steps:
### 1. Look for an existing category ### 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/src/branch/release-25.11/modules/home/hyprland/applications/default.nix). 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: Categories are listed under `options.wayland.windowManager.hyprland.applications`, for example:
```nix ```nix
@ -133,13 +133,13 @@ in
} }
``` ```
> The function [`genMimeAssociations`](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/home/hyprland/applications/genMimeAssociations.nix) might be useful here. See [`feh`'s config](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/home/hyprland/applications/feh/default.nix) as an example. > 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). > Available MIME types can be found [here](https://www.iana.org/assignments/media-types/media-types.xhtml).
### 3. Import the directory ### 3. Import the directory
You then need to import this directory in [`applications/default.nix`](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/home/hyprland/applications/default.nix). 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`: Look for the comment `# add your application directories here`:
```nix ```nix

View file

@ -2,7 +2,7 @@
`kitty` is a cross-platform, fast, feature-rich, GPU based terminal emulator. `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/src/branch/release-25.11/modules/home/kitty). 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. If you use this repository's [Hyprland module](./hyprland.md), it is enabled by default.
## References ## References

11
docs/modules/home/lf.md Normal file
View 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)

View file

@ -2,7 +2,7 @@
networkmanager-dmenu allows you to control NetworkManager via dmenu. networkmanager-dmenu allows you to control NetworkManager via dmenu.
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/home/networkmanager-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. If you use this repository's [Hyprland module](./hyprland.md), it is enabled by default.
## References ## References

View 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
```

View file

@ -2,7 +2,7 @@
This module provides some defaults to quickly set up Nixvim with some plugins. 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/src/branch/release-25.11/modules/home/nixvim). View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/nixvim).
## Config ## Config
@ -88,7 +88,7 @@ key | action
`<C-A-K>` | next quickfix item `<C-A-K>` | next quickfix item
`<leader>ca` | apply code action `<leader>ca` | apply code action
See [keymaps.nix](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/home/nixvim/keymaps.nix) and [plugins](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/home/nixvim/plugins/) for more details. 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: These commands do not have keymaps yet but might be useful anyway:

View file

@ -2,7 +2,7 @@
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. 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/src/branch/release-25.11/modules/home/password-manager). View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/password-manager).
## Setup ## Setup

View file

@ -4,7 +4,7 @@ For more information on how to use this module, see the [Sops NixOS module docum
For extensive documentation, read the [Readme on GitHub](https://github.com/Mic92/sops-nix/blob/master/README.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/src/branch/release-25.11/modules/home/sops). View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/sops).
## 1. Generate an age key ## 1. Generate an age key

View file

@ -2,7 +2,7 @@
This module wraps [stylix](https://github.com/nix-community/stylix), a theming framework for NixOS, Home Manager, nix-darwin, and Nix-on-Droid. 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/src/branch/release-25.11/modules/home/stylix). View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/stylix).
## References ## References
@ -30,11 +30,11 @@ stylix = {
}; };
``` ```
Replace `SCHEME` with the name of your scheme. Available schemes are listed as `validSchemes` in [our stylix module](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/home/stylix/default.nix). 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 ## 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/src/branch/release-25.11/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/colorschemes). 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. 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.

View file

@ -2,7 +2,7 @@
Home Manager module to go with the [Virtualisation NixOS module](../nixos/virtualisation.md). 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/src/branch/release-25.11/modules/home/virtualisation). View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/virtualisation).
## Setup ## Setup

View file

@ -2,7 +2,7 @@
Waybar is a highly customizable Wayland bar for Sway and Wlroots based compositors. 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/src/branch/release-25.11/modules/home/waybar). 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. If you use this repository's [Hyprland module](./hyprland.md), it is enabled by default.
## References ## References

View file

@ -2,7 +2,7 @@
Terminal file manager written in Rust. Terminal file manager written in Rust.
View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/home/hyprland/applications/yazi). 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. If you use this repository's [Hyprland module](./hyprland.md), it is enabled by default.
## References ## References

View file

@ -2,7 +2,7 @@
PipeWire is a server for handling audio, video streams, and hardware on Linux. PipeWire is a server for handling audio, video streams, and hardware on Linux.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/audio). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/audio).
## References ## References

View file

@ -2,7 +2,7 @@
Baibot is a Matrix AI bot. Baibot is a Matrix AI bot.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/baibot). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/baibot).
## References ## References

View file

@ -4,7 +4,7 @@
This module allows you to automount cifs shares after the login of the specified user. The remote has to have a running samba server. This module allows you to automount cifs shares after the login of the specified user. The remote has to have a running samba server.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/cifsMount). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/cifsMount).
## Config ## Config

View file

@ -2,7 +2,7 @@
The common module sets some opinionated defaults. The common module sets some opinionated defaults.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/common). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/common).
It is recommended to import it in your NixOS configuration as some synix modules may depend on it: It is recommended to import it in your NixOS configuration as some synix modules may depend on it:

View file

@ -2,7 +2,7 @@
This module lets you set some defaults for a device type. This module lets you set some defaults for a device type.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/device). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/device).
Available devices are: Available devices are:

View file

@ -4,4 +4,4 @@
This module sets up a simple ftp web server behind a reverse proxy (`ftp.domain.tld` by default). This module sets up a simple ftp web server behind a reverse proxy (`ftp.domain.tld` by default).
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/ftp-webserver). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/ftp-webserver).

View file

@ -2,7 +2,7 @@
A feature-complete Web UI for Headscale. A feature-complete Web UI for Headscale.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/headplane). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/headplane).
## References ## References
@ -19,7 +19,7 @@ Provide the following entries to your `secrets.yaml`:
```yaml ```yaml
headplane: headplane:
cookie_secret: abc123 cookie_secret: abc123
api_key: abc123 agent_pre_authkey: abc123
``` ```
Generate your cookie secret with: Generate your cookie secret with:
@ -28,7 +28,7 @@ Generate your cookie secret with:
nix-shell -p openssl --run "openssl rand -hex 16" nix-shell -p openssl --run "openssl rand -hex 16"
``` ```
Generate your agent `api_key` with: Generate your agent pre-authkey with:
```bash ```bash
sudo headscale users create headplane-agent sudo headscale users create headplane-agent

View file

@ -2,7 +2,7 @@
Headscale is an open source, self-hosted implementation of the Tailscale control server. Headscale is an open source, self-hosted implementation of the Tailscale control server.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/headscale). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/headscale).
## References ## References

View file

@ -2,7 +2,7 @@
I2P is an End-to-End encrypted and anonymous Internet. I2P is an End-to-End encrypted and anonymous Internet.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/i2pd). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/i2pd).
## References ## References

View file

@ -2,7 +2,7 @@
Jellyfin is a free and open-source media server and suite of multimedia applications. Jellyfin is a free and open-source media server and suite of multimedia applications.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/jellyfin). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/jellyfin).
## References ## References

View file

@ -2,8 +2,8 @@
Jirafeau is a project that allows "one-click filesharing", making it easy to upload a file and give it a unique link. Jirafeau is a project that allows "one-click filesharing", making it easy to upload a file and give it a unique link.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/jirafeau). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/jirafeau).
## References ## References
- [docs](https://github.com/Newlode/jirafeau) - [docs](https://github.com/Newlode/jirafeauhttps://github.com/Newlode/jirafeau)

View file

@ -2,7 +2,7 @@
A simple NixOS mailserver. A simple NixOS mailserver.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/mailserver). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/mailserver).
## References ## References

View file

@ -2,7 +2,7 @@
Synapse is a [Matrix](https://matrix.org/) homeserver. Matrix is an open network for secure, decentralised communication. Synapse is a [Matrix](https://matrix.org/) homeserver. Matrix is an open network for secure, decentralised communication.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/matrix-synapse). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/matrix-synapse).
## References ## References
@ -40,7 +40,7 @@ nix-shell -p livekit --run "livekit-server generate-keys | tail -1 | awk '{print
## Config ## Config
[Coturn has its own module](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/matrix-synapse), making it easy to outsource to a small VPS with a static IPv4 address. [Coturn has its own module](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/matrix-synapse), making it easy to outsource to a small VPS with a static IPv4 address.
If you do so, both machines need the secret `coturn/static-auth-secret`. If you do so, both machines need the secret `coturn/static-auth-secret`.
In the following example, both services run on the same machine: In the following example, both services run on the same machine:

View file

@ -4,7 +4,7 @@ A plugin-based Matrix bot system.
> Warning: Maubot uses [deprecated `libolm`](https://github.com/mautrix/go/issues/262). > Warning: Maubot uses [deprecated `libolm`](https://github.com/mautrix/go/issues/262).
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/maubot). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/maubot).
## References ## References

View file

@ -2,7 +2,7 @@
A simple MCP-to-OpenAPI proxy server. A simple MCP-to-OpenAPI proxy server.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/mcpo). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/mcpo).
## References ## References
@ -10,7 +10,7 @@ View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/bra
## Configuration ## Configuration
You have to provide a package, for example from [synix](https://git.sid.ovh/sid/synix/src/branch/release-25.11/pkgs/mcpo/default.nix). You have to provide a package, for example from [synix](https://git.sid.ovh/sid/synix/tree/master/pkgs/mcpo/default.nix).
Setting `mcpServers` is required. The following example runs a NixOS MCP server using [mcp-nixos](https://github.com/utensils/mcp-nixos). Setting `mcpServers` is required. The following example runs a NixOS MCP server using [mcp-nixos](https://github.com/utensils/mcp-nixos).
@ -43,6 +43,6 @@ Each tool will be accessible under its own unique route `127.0.0.1:8000/<mcp-ser
## Open WebUI Integration ## Open WebUI Integration
Follow the [official Open WebUI integration documentation starting at *Step 2*](https://docs.openwebui.com/features/extensibility/plugin/tools/openapi-servers/open-webui#step-2-connect-tool-server-in-open-webui). Follow the [official Open WebUI integration documentation starting at *Step 2*](https://docs.openwebui.com/openapi-servers/open-webui/#step-2-connect-tool-server-in-open-webui).
In Open WebUI, users have to set *Function Calling* to *Native* in *Settings* > *General* > *Advanced Parameters*. Then, they can enable MCP servers in a chat by clicking *More* (the plus sign) in the bottom left of the prompt window. In Open WebUI, users have to set *Function Calling* to *Native* in *Settings* > *General* > *Advanced Parameters*. Then, they can enable MCP servers in a chat by clicking *More* (the plus sign) in the bottom left of the prompt window.

View file

@ -2,7 +2,7 @@
Miniflux is a minimalist and opinionated feed reader. Miniflux is a minimalist and opinionated feed reader.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/miniflux). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/miniflux).
## References ## References

View file

@ -2,7 +2,7 @@
This module automates user creation for normal users. This module automates user creation for normal users.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/normalUsers). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/normalUsers).
## Config ## Config

View file

@ -4,7 +4,7 @@ NixOS module that configures your Nvidia GPU with proprietary drivers.
> Tested on Turing and Ampere. Should work with most modern Nvidia GPUs. > Tested on Turing and Ampere. Should work with most modern Nvidia GPUs.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/nvidia). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/nvidia).
## Setup ## Setup

View file

@ -2,13 +2,13 @@
Open WebUI is an extensible, self-hosted AI interface that adapts to your workflow, all while operating entirely offline. Open WebUI is an extensible, self-hosted AI interface that adapts to your workflow, all while operating entirely offline.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/open-webui-oci). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/open-webui-oci).
## References ## References
- [Homepage](https://openwebui.com/) - [Homepage](https://openwebui.com/)
- [GitHub](https://github.com/open-webui/open-webui) - [GitHub](https://github.com/open-webui/open-webui)
- [Environment Configuration](https://docs.openwebui.com/reference/env-configuration/) - [Environment Configuration](https://docs.openwebui.com/getting-started/env-configuration/)
- [Nixpkgs Docker tools](https://github.com/NixOS/nixpkgs/blob/master/doc/build-helpers/images/dockertools.section.md) - [Nixpkgs Docker tools](https://github.com/NixOS/nixpkgs/blob/master/doc/build-helpers/images/dockertools.section.md)
## Configuration ## Configuration

View file

@ -4,4 +4,4 @@
This module sets up a printing server with a web interface. This module sets up a printing server with a web interface.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/print-server). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/print-server).

View file

@ -2,7 +2,7 @@
A simple CalDAV and CardDAV server. A simple CalDAV and CardDAV server.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/radicale). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/radicale).
## References ## References

View file

@ -2,7 +2,7 @@
RSS-Bridge is a PHP web application. It generates web feeds for websites that don't have one. RSS-Bridge is a PHP web application. It generates web feeds for websites that don't have one.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/rss-bridge). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/rss-bridge).
## References ## References

View file

@ -2,7 +2,7 @@
Atomic secret provisioning for NixOS based on sops. Atomic secret provisioning for NixOS based on sops.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/sops). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/sops).
## References ## References

View file

@ -0,0 +1,36 @@
# Tailscale
Private WireGuard networks made easy.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/tailscale).
## References
- [Website](https://tailscale.com/)
- [GitHub](https://github.com/tailscale/tailscale)
- [Documents](https://tailscale.com/kb/1017/install)
## Sops
Provide the following entries to your `secrets.yaml`:
> Replace `abc123` with your actual secrets
```yaml
tailscale:
auth-key: abc123
```
## Config
```nix
{
imports = [ inputs.synix.nixosModules.tailscale ];
services.tailscale = {
enable = true;
enableSSH = true;
loginServer = "<your-headscale-instance>";
};
}
```

View file

@ -2,7 +2,7 @@
Virtualisation using QEMU via libvirt and managed through Virt-manager with VFIO support. Virtualisation using QEMU via libvirt and managed through Virt-manager with VFIO support.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/virtualisation). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/virtualisation).
## Overview ## Overview

View file

@ -2,4 +2,4 @@
A very simple module to serve a static web page behind a reverse proxy using nginx. A very simple module to serve a static web page behind a reverse proxy using nginx.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/webPage). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/webPage).

View file

@ -2,7 +2,7 @@
Windows inside a Docker container. Windows inside a Docker container.
View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/src/branch/release-25.11/modules/nixos/windows-oci). View the [*synix* NixOS module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/nixos/windows-oci).
## References ## References

36
flake.lock generated
View file

@ -202,11 +202,11 @@
}, },
"flake-schemas": { "flake-schemas": {
"locked": { "locked": {
"lastModified": 1776384880, "lastModified": 1770913512,
"narHash": "sha256-28Cg9HI/IwFHUm5fZyMEGCQ94L3Il6K4OfHeRf0b+Zw=", "narHash": "sha256-jRC1qRoRCrMjDalVfUMHFlKSkkA2q0RZWTDW0LsquoA=",
"owner": "DeterminateSystems", "owner": "DeterminateSystems",
"repo": "flake-schemas", "repo": "flake-schemas",
"rev": "b852751d29c6e09919f25c1e10754646bdc181c9", "rev": "3c464b0e09cb44c6e073c41dd1d834980c3e0b24",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -258,11 +258,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778507602, "lastModified": 1772024342,
"narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=", "narHash": "sha256-+eXlIc4/7dE6EcPs9a2DaSY3fTA9AE526hGqkNID3Wg=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a", "rev": "6e34e97ed9788b17796ee43ccdbaf871a5c2b476",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -349,11 +349,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1779506708, "lastModified": 1772020340,
"narHash": "sha256-QOD/CNm196nCJRheux/URi4/HE66fthdOMqCJoPP1Y0=", "narHash": "sha256-aqBl3GNpCadMoJ/hVkWTijM1Aeilc278MjM+LA3jK6g=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "3ee51fbdac8c8bdfe1e7e1fcaba6520a563f394f", "rev": "36e38ca0d9afe4c55405fdf22179a5212243eecc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -465,11 +465,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1779467186, "lastModified": 1771903837,
"narHash": "sha256-nOesoDCiXcUftqbRBMz9tt4blI5PvljMWbm3kuCA+0s=", "narHash": "sha256-sdaqdnsQCv3iifzxwB22tUwN/fSHoN7j2myFW5EIkGk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b77b3de8775677f84492abe84635f87b0e153f0f", "rev": "e764fc9a405871f1f6ca3d1394fb422e0a0c3951",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -511,11 +511,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1779900588, "lastModified": 1772140017,
"narHash": "sha256-b/yda4uMmjpw4uhXI4d0JNv09WtGoXis2JjD5l1Qbts=", "narHash": "sha256-wFUc9tn5Ik11oL009BkVnj4NxsY63UbZjhOyEqCsIQE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "dd8bdde89853bfb3eae0eb28e3d3a9320b3b8a3c", "rev": "be0fea0af0e8cfadb3995dd7bb3a167bc012e935",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -605,11 +605,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1778680496, "lastModified": 1771788390,
"narHash": "sha256-tUq1WASV0dHLv3j18log8V6Esq0NYkXuzNH2EHsstcg=", "narHash": "sha256-RzBpBwn93GWxLjacTte+ngwwg0L/BVOg4G/sSIeK3Rw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "stylix", "repo": "stylix",
"rev": "fc5bec2e44678eeaa221d566d447a0257a884737", "rev": "ebb238f14d6f930068be4718472da3105fd5d3bf",
"type": "github" "type": "github"
}, },
"original": { "original": {

190
flake.nix
View file

@ -3,6 +3,7 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nix.url = "github:DeterminateSystems/nix-src/flake-schemas"; nix.url = "github:DeterminateSystems/nix-src/flake-schemas";
flake-schemas.url = "github:DeterminateSystems/flake-schemas"; flake-schemas.url = "github:DeterminateSystems/flake-schemas";
git-hooks.url = "github:cachix/git-hooks.nix"; git-hooks.url = "github:cachix/git-hooks.nix";
@ -28,69 +29,50 @@
... ...
}@inputs: }@inputs:
let let
inherit (self) outputs; supportedSystems = [
systems = [
"x86_64-linux" "x86_64-linux"
"aarch64-linux" # For testing only. Use at your own risk. "aarch64-linux" # For testing only. Use at your own risk.
]; ];
lib = nixpkgs.lib.extend (_final: _prev: { inherit (self.lib) utils; }); forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
mkPkgs = nixpkgsFor = forAllSystems (
{ system:
system,
config ? { },
}:
import nixpkgs { import nixpkgs {
inherit system; inherit system;
inherit config;
overlays = [ overlays = [
self.overlays.modifications self.overlays.default
self.overlays.additions
inputs.nix.overlays.default inputs.nix.overlays.default
(final: prev: { synix = self.overlays.additions final prev; })
]; ];
}; }
forAllSystems =
function:
lib.genAttrs systems (
system:
function (mkPkgs {
inherit system;
})
); );
mkNixosConfiguration = test = {
system: modules: system = "x86_64-linux";
nixpkgs.lib.nixosSystem { lib = nixpkgs.lib.extend (final: prev: self.outputs.lib or { });
inherit system modules; inputs = inputs // {
specialArgs = { synix = self;
inherit inputs outputs lib;
};
};
mkHomeConfiguration =
system: modules:
inputs.home-manager.lib.homeManagerConfiguration {
pkgs = mkPkgs { inherit system; };
inherit modules;
extraSpecialArgs = {
inherit inputs outputs;
}; };
outputs = { };
overlays = [
self.overlays.default
self.overlays.additions
self.overlays.modifications
(final: prev: { synix = self.packages."${final.system}"; })
];
}; };
in in
{ {
inherit (inputs.flake-schemas) schemas; inherit (inputs.flake-schemas) schemas;
apps = forAllSystems ( apps = forAllSystems (
pkgs: system:
let let
mkApp = name: description: { pkgs = nixpkgs.legacyPackages.${system};
mkApp = name: desc: {
type = "app"; type = "app";
program = pkgs.lib.getExe (pkgs.callPackage ./apps/${name} { }); program = pkgs.lib.getExe (pkgs.callPackage ./apps/${name} { });
meta.description = description; meta.description = desc;
}; };
in in
{ {
@ -104,17 +86,13 @@
); );
lib = { lib = {
utils = import ./lib/utils.nix { inherit (nixpkgs) lib; }; utils = import ./lib/utils.nix { lib = nixpkgs.lib; };
helpers = {
inherit mkPkgs;
};
}; };
packages = forAllSystems ( packages = forAllSystems (
pkgs: system:
let let
inherit (pkgs.stdenv.hostPlatform) system; allArchs = import ./pkgs { pkgs = nixpkgs.legacyPackages.${system}; };
allArchs = import ./pkgs { inherit pkgs; };
x64only = x64only =
if system == "x86_64-linux" then if system == "x86_64-linux" then
{ {
@ -133,26 +111,56 @@
# test configs # test configs
nixosConfigurations = { nixosConfigurations = {
nixos-hyprland = mkNixosConfiguration "x86_64-linux" [ ./tests/build/nixos-hyprland ]; nixos-hyprland = nixpkgs.lib.nixosSystem {
nixos-server = mkNixosConfiguration "x86_64-linux" [ ./tests/build/nixos-server ]; inherit (test) system;
modules = [
./tests/build/nixos-hyprland
{ nixpkgs.overlays = test.overlays; }
];
specialArgs = {
inherit (test) inputs outputs lib;
};
};
nixos-server = nixpkgs.lib.nixosSystem {
inherit (test) system;
modules = [
./tests/build/nixos-server
{ nixpkgs.overlays = test.overlays; }
];
specialArgs = {
inherit (test) inputs outputs lib;
};
};
}; };
homeConfigurations = { homeConfigurations = {
hm-hyprland = mkHomeConfiguration "x86_64-linux" [ ./tests/build/hm-hyprland ]; hm-hyprland = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
inherit (test) overlays system;
};
extraSpecialArgs = {
inherit (test) inputs outputs;
};
modules = [
./tests/build/hm-hyprland
];
};
}; };
devShells = forAllSystems ( devShells = forAllSystems (
pkgs: system:
let let
inherit (pkgs.stdenv.hostPlatform) system; pkgs = nixpkgsFor.${system};
inherit (self.checks.${system}.pre-commit-check) shellHook enabledPackages;
in in
{ {
default = pkgs.mkShell { default =
let
inherit (self.checks.${system}.pre-commit-check) shellHook enabledPackages;
in
pkgs.mkShell {
inherit shellHook; inherit shellHook;
nativeBuildInputs = [ nativeBuildInputs = [
enabledPackages enabledPackages
pkgs.nix pkgs.nix
pkgs.lychee
] ]
++ (with pkgs; [ ++ (with pkgs; [
(python313.withPackages ( (python313.withPackages (
@ -165,69 +173,63 @@
)) ))
]); ]);
}; };
nix-config = pkgs.mkShell {
inherit shellHook;
nativeBuildInputs = [ enabledPackages ];
};
install-hm = pkgs.mkShell {
NIX_CONFIG = "extra-experimental-features = nix-command flakes";
nativeBuildInputs = [ pkgs.home-manager ];
};
} }
); );
formatter = forAllSystems ( formatter = forAllSystems (
pkgs: system:
let let
inherit (pkgs.stdenv.hostPlatform) system; pkgs = nixpkgs.legacyPackages.${system};
inherit (self.checks.${system}.pre-commit-check.config) package configFile; config = self.checks.${system}.pre-commit-check.config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}
'';
in in
pkgs.writeShellScriptBin "pre-commit-run" "${pkgs.lib.getExe package} run --all-files --config ${configFile}" pkgs.writeShellScriptBin "pre-commit-run" script
); );
checks = forAllSystems ( checks = forAllSystems (
pkgs: system:
let let
inherit (pkgs.stdenv.hostPlatform) system; pkgs = nixpkgs.legacyPackages.${system};
flakePkgs = self.packages.${system};
overlaidPkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.modifications ];
};
in in
{ {
pre-commit-check = inputs.git-hooks.lib.${system}.run { pre-commit-check = inputs.git-hooks.lib.${system}.run {
src = ./.; src = ./.;
hooks = { hooks = {
actionlint.enable = true; nixfmt.enable = true;
nixfmt = {
enable = true;
settings.width = 120;
};
shellcheck.enable = true;
statix.enable = true;
yamllint = {
enable = true;
excludes = [
"secrets.yaml"
"modules/home/stylix/schemes/*.yaml"
];
settings.configData = "{rules: {line-length: {max: 120}}}";
}; };
}; };
build-packages = pkgs.linkFarm "flake-packages-${system}" flakePkgs;
build-overlays = pkgs.linkFarm "flake-overlays-${system}" {
kicad = overlaidPkgs.kicad;
}; };
build-additions = pkgs.linkFarm "added-packages-${system}" self.packages.${system};
build-modifications = pkgs.linkFarm "modified-packages-${system}" (
lib.filterAttrs (_: v: lib.isDerivation v) (self.overlays.modifications pkgs pkgs)
);
synapse-test = synapse-test =
let let
testPkgs = mkPkgs { testPkgs = import nixpkgs {
inherit system; inherit system;
config.permittedInsecurePackages = [ "olm-3.2.16" ]; config.permittedInsecurePackages = [ "olm-3.2.16" ];
}; };
in in
testPkgs.testers.runNixOSTest ./tests/run/synapse.nix; testPkgs.testers.runNixOSTest ./tests/run/synapse.nix;
open-webui-oci-test = pkgs.testers.runNixOSTest ./tests/run/open-webui-oci.nix;
# librechat-oci-test = pkgs.testers.runNixOSTest ./tests/run/librechat-oci.nix; # FIXME: unable to copy from source docker://quay.io/mongo:7.0 # NOTE: disabled for now since the test takes too long to execute
# open-webui-oci-test =
# let
# testPkgs = import nixpkgs {
# inherit system;
# };
# in
# testPkgs.testers.runNixOSTest ./tests/run/open-webui-oci.nix;
} }
); );
hydraJobs = { hydraJobs = {
@ -287,10 +289,6 @@
path = ./templates/dev/rs-hello; path = ./templates/dev/rs-hello;
description = "Rust hello world template."; description = "Rust hello world template.";
}; };
stm32-blink = {
path = ./templates/dev/stm32-blink;
description = "STM32G4 blink template with libopencm3.";
};
}; };
}; };
} }

View file

@ -1,4 +1,3 @@
---
site_name: synix docs site_name: synix docs
repo_url: https://git.sid.ovh/sid/synix repo_url: https://git.sid.ovh/sid/synix
site_url: https://doc.sid.ovh/synix site_url: https://doc.sid.ovh/synix
@ -59,6 +58,7 @@ nav:
- radicale: modules/nixos/radicale.md - radicale: modules/nixos/radicale.md
- rss-bridge: modules/nixos/rss-bridge.md - rss-bridge: modules/nixos/rss-bridge.md
- sops: modules/nixos/sops.md - sops: modules/nixos/sops.md
- tailscale: modules/nixos/tailscale.md
- virtualisation: modules/nixos/virtualisation.md - virtualisation: modules/nixos/virtualisation.md
- webPage: modules/nixos/webpage.md - webPage: modules/nixos/webpage.md
- Home Manager: - Home Manager:
@ -68,6 +68,7 @@ nav:
- hyprland: modules/home/hyprland.md - hyprland: modules/home/hyprland.md
- kitty: modules/home/kitty.md - kitty: modules/home/kitty.md
- networkmanager-dmenu: modules/home/networkmanager-dmenu.md - networkmanager-dmenu: modules/home/networkmanager-dmenu.md
- nextcloud-sync: modules/home/nextcloud-sync.md
- nixvim: modules/home/nixvim.md - nixvim: modules/home/nixvim.md
- password-manager: modules/home/password-manager.md - password-manager: modules/home/password-manager.md
- sops: modules/home/sops.md - sops: modules/home/sops.md

View file

@ -1,4 +1,3 @@
#!/usr/bin/env bash
# change directory with fzf # change directory with fzf
# Usage: cdf [optional_relative_path] # Usage: cdf [optional_relative_path]
# - If no argument, searches from $HOME. # - If no argument, searches from $HOME.
@ -68,8 +67,7 @@ function cdf() {
"--preview=tree -C {} | head -50" "--preview=tree -C {} | head -50"
"--preview-window=right:50%:wrap" "--preview-window=right:50%:wrap"
) )
local selected local selected=$(find "${find_args[@]}" 2>/dev/null | fzf "${fzf_args[@]}")
selected=$(find "${find_args[@]}" 2>/dev/null | fzf "${fzf_args[@]}")
if [[ -n "$selected" ]]; then if [[ -n "$selected" ]]; then
cd "$selected" || echo "Failed to cd into '$selected'" cd "$selected" || echo "Failed to cd into '$selected'"

View file

@ -1,7 +0,0 @@
#!/usr/bin/env bash
# find and replace strings with rg
# Usage: fr OLD NEW
fr() {
rg -lF "$1" | xargs sed -i "s|$1|$2|g"
}

View file

@ -12,7 +12,6 @@ in
PROMPT='%F{green}%n%f@%F{blue}%m%f %B%1~%b > ' PROMPT='%F{green}%n%f@%F{blue}%m%f %B%1~%b > '
RPROMPT='[%F{yellow}%?%f]' RPROMPT='[%F{yellow}%?%f]'
'' ''
+ builtins.readFile ./cdf.sh + builtins.readFile ./cdf.sh;
+ builtins.readFile ./fr.sh;
}; };
} }

View file

@ -1,48 +0,0 @@
{
inputs,
config,
lib,
pkgs,
...
}:
let
cfg = config.wayland.windowManager.hyprland;
app = cfg.applications.password-manager.default;
inherit (lib) mkDefault mkIf;
in
{
imports = [ ../../../rofi-rbw ];
config = mkIf (cfg.enable && app == "rofi-rbw") {
programs = {
rbw = {
enable = true;
settings = {
# email = "you@example.tld"; # You have to set this in your config
pinentry = mkDefault pkgs.pinentry-gnome3;
lock_timeout = mkDefault 3600;
};
};
rofi-rbw = {
enable = true;
package = mkDefault pkgs.rofi-rbw-wayland;
settings = {
selector = mkDefault "bemenu";
selector-args = mkDefault "-i -l 20";
action = mkDefault "copy";
typing-key-delay = mkDefault 0;
};
};
librewolf = mkIf config.programs.librewolf.enable {
profiles.default.extensions.packages =
with inputs.nur.legacyPackages."${pkgs.stdenv.hostPlatform.system}".repos.rycee.firefox-addons; [
bitwarden
];
};
};
};
}

View file

@ -22,7 +22,7 @@ let
{ {
default = mkOption { default = mkOption {
type = types.str; type = types.str;
inherit default; default = default;
description = "The default application to use for the ${default}."; description = "The default application to use for the ${default}.";
}; };
bind = mkOption { bind = mkOption {
@ -38,8 +38,12 @@ let
}; };
# generate lists of all binds and window rules and remove empty strings # generate lists of all binds and window rules and remove empty strings
binds = filter (s: s != "") (builtins.concatLists (map (app: app.bind or [ "" ]) (attrValues apps))); binds = filter (s: s != "") (
windowrules = filter (s: s != "") (builtins.concatLists (map (app: app.windowrule or [ "" ]) (attrValues apps))); builtins.concatLists (map (app: app.bind or [ "" ]) (attrValues apps))
);
windowrules = filter (s: s != "") (
builtins.concatLists (map (app: app.windowrule or [ "" ]) (attrValues apps))
);
inherit (lib) inherit (lib)
attrValues attrValues
@ -52,10 +56,8 @@ let
in in
{ {
imports = [ imports = [
./bitwarden
./bemenu ./bemenu
./dmenu-bluetooth ./dmenu-bluetooth
./dunst-toggle
./element-desktop ./element-desktop
./feh ./feh
./kitty ./kitty
@ -133,11 +135,6 @@ in
bind = [ "$mod SHIFT, m, exec, ${terminal} -T ${musicplayer} -e ${musicplayer}" ]; bind = [ "$mod SHIFT, m, exec, ${terminal} -T ${musicplayer} -e ${musicplayer}" ];
}; };
notifications = mkAppAttrs {
default = "dunst-toggle";
bind = [ "$mod, Backspace, exec, ${notifications}" ];
};
networksettings = mkAppAttrs { networksettings = mkAppAttrs {
default = "networkmanager_dmenu"; default = "networkmanager_dmenu";
bind = [ "$mod SHIFT, n, exec, ${networksettings}" ]; bind = [ "$mod SHIFT, n, exec, ${networksettings}" ];

View file

@ -1,18 +0,0 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.wayland.windowManager.hyprland;
app = cfg.applications.notifications.default;
inherit (lib) mkIf;
in
{
config = mkIf (cfg.enable && app == "dunst-toggle") {
home.packages = [ (import ./dunst-toggle.nix { inherit config pkgs; }) ];
};
}

View file

@ -1,11 +0,0 @@
{ config, pkgs, ... }:
let
dunst = "${pkgs.dunst}/bin/dunstctl";
pkill = "${pkgs.procps}/bin/pkill";
signal = "${toString config.programs.waybar.settings.mainBar."custom/notifications".signal}";
in
pkgs.writeShellScriptBin "dunst-toggle" ''
${dunst} set-paused toggle
${pkill} -RTMIN+${signal} waybar
''

View file

@ -9,7 +9,7 @@ let
cfg = config.wayland.windowManager.hyprland; cfg = config.wayland.windowManager.hyprland;
app = cfg.applications.rssreader.default; app = cfg.applications.rssreader.default;
reloadTime = "${toString config.programs.newsboat.reloadTime}"; reloadTime = "${toString config.programs.newsboat.reloadTime}";
newsboat-reload = import ./newsboat-reload.nix { inherit config pkgs; }; newsboat-reload = (import ./newsboat-reload.nix { inherit config pkgs; });
inherit (lib) mkIf; inherit (lib) mkIf;
in in
@ -27,11 +27,9 @@ in
timers.newsboat-reload = { timers.newsboat-reload = {
Unit.Description = "Reload newsboat every ${reloadTime} minutes"; Unit.Description = "Reload newsboat every ${reloadTime} minutes";
Timer = { Timer.OnBootSec = "10sec";
OnBootSec = "10sec"; Timer.OnUnitActiveSec = "${reloadTime}min";
OnUnitActiveSec = "${reloadTime}min"; Timer.Unit = "newsboat-reload.service";
Unit = "newsboat-reload.service";
};
Install.WantedBy = [ "timers.target" ]; Install.WantedBy = [ "timers.target" ];
}; };

View file

@ -5,6 +5,6 @@ let
notify = "${pkgs.libnotify}/bin/notify-send"; notify = "${pkgs.libnotify}/bin/notify-send";
signal = "${toString config.programs.waybar.settings.mainBar."custom/newsboat".signal}"; signal = "${toString config.programs.waybar.settings.mainBar."custom/newsboat".signal}";
in in
pkgs.writeShellScriptBin "newsboat-reload" '' (pkgs.writeShellScriptBin "newsboat-reload" ''
${notify} -u low 'Newsboat' 'Reloading RSS feeds...' && ${newsboat} -x reload && ${notify} -u low 'Newsboat' 'RSS feeds reloaded.' && pkill -RTMIN+${signal} waybar ${notify} -u low 'Newsboat' 'Reloading RSS feeds...' && ${newsboat} -x reload && ${notify} -u low 'Newsboat' 'RSS feeds reloaded.' && pkill -RTMIN+${signal} waybar
'' '')

View file

@ -14,7 +14,9 @@ in
{ {
config = mkIf (cfg.enable && app == "presentation-mode-bemenu") { config = mkIf (cfg.enable && app == "presentation-mode-bemenu") {
home.packages = [ home.packages = [
(pkgs.writeShellScriptBin "presentation-mode-bemenu" (builtins.readFile ./presentation-mode-bemenu.sh)) (pkgs.writeShellScriptBin "presentation-mode-bemenu" (
builtins.readFile ./presentation-mode-bemenu.sh
))
]; ];
}; };
} }

View file

@ -1,6 +1,5 @@
#!/usr/bin/env bash
# Variables # Variables
mapfile -t DISPLAYS < <(hyprctl monitors | grep -E '^Monitor' | awk '{print $2}') DISPLAYS=( $(hyprctl monitors | grep -E '^Monitor' | awk '{print $2}') )
EXTEND_RIGHT="Extend to right of main" EXTEND_RIGHT="Extend to right of main"
EXTEND_LEFT="Extend to left of main" EXTEND_LEFT="Extend to left of main"
MIRROR="Mirror main" MIRROR="Mirror main"

View file

@ -5,7 +5,7 @@
let let
screenshotDir = "${config.xdg.userDirs.pictures}/screenshots"; screenshotDir = "${config.xdg.userDirs.pictures}/screenshots";
in in
pkgs.writeShellScriptBin "screenshot" '' (pkgs.writeShellScriptBin "screenshot" ''
mkdir -p ${screenshotDir} mkdir -p ${screenshotDir}
${pkgs.hyprshot}/bin/hyprshot --mode $1 --output-folder ${screenshotDir} --filename screenshot_$(date +"%Y-%m-%d_%H-%M-%S").png ${pkgs.hyprshot}/bin/hyprshot --mode $1 --output-folder ${screenshotDir} --filename screenshot_$(date +"%Y-%m-%d_%H-%M-%S").png
'' '')

View file

@ -27,7 +27,7 @@ in
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
settings = { settings = {
bind = binds; bind = binds;
bindm = import ./mouse.nix; bindm = (import ./mouse.nix);
}; };
}; };
}; };

View file

@ -9,20 +9,18 @@ let
inherit (lib) mkForce; inherit (lib) mkForce;
in in
{ {
home = { home.pointerCursor = {
pointerCursor = {
name = mkForce "Bibata-Original-Ice"; name = mkForce "Bibata-Original-Ice";
size = mkForce 24; size = mkForce 24;
package = mkForce pkgs.bibata-cursors; package = mkForce pkgs.bibata-cursors;
}; };
packages = [ pkgs.hyprcursor ]; home.packages = [ pkgs.hyprcursor ];
sessionVariables = { home.sessionVariables = {
HYPRCURSOR_THEME = config.home.pointerCursor.name; HYPRCURSOR_THEME = config.home.pointerCursor.name;
HYPRCURSOR_SIZE = toString config.home.pointerCursor.size; HYPRCURSOR_SIZE = toString config.home.pointerCursor.size;
}; };
};
# wayland.windowManager.hyprland.cursor.no_hardware_cursors = true; # wayland.windowManager.hyprland.cursor.no_hardware_cursors = true;
} }

View file

@ -78,6 +78,12 @@ in
# auto discover fonts in `home.packages` # auto discover fonts in `home.packages`
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
# notifications
services.dunst = {
enable = mkDefault true;
waylandDisplay = config.home.sessionVariables.WAYLAND_DISPLAY;
};
# install some applications # install some applications
home.packages = import ./packages.nix { inherit pkgs; }; # use programs.PACKAGE or services.SERVICE when possible home.packages = import ./packages.nix { inherit pkgs; }; # use programs.PACKAGE or services.SERVICE when possible
@ -88,19 +94,11 @@ in
fi fi
''; '';
# notifications services.udiskie = {
services = {
dunst = {
enable = mkDefault true;
waylandDisplay = config.home.sessionVariables.WAYLAND_DISPLAY;
};
udiskie = {
enable = mkDefault true; enable = mkDefault true;
tray = mkDefault "never"; tray = mkDefault "never";
}; };
network-manager-applet.enable = mkDefault true; services.network-manager-applet.enable = mkDefault true;
};
}; };
} }

View file

@ -3,30 +3,15 @@
let let
cfg = config.wayland.windowManager.hyprland; cfg = config.wayland.windowManager.hyprland;
nonCenterFloatingClasses = [ inherit (builtins) toString;
"Gimp"
"steam"
"KiCad"
];
nonCenterFloatingClassesRegex = concatStringsSep "|" nonCenterFloatingClasses;
inherit (builtins) concatStringsSep toString;
inherit (lib) mkDefault; inherit (lib) mkDefault;
in in
{ {
# Do not add binds here. Use `./binds/default.nix` instead. # Do not add binds here. Use `./binds/default.nix` instead.
"$mod" = cfg.modifier; "$mod" = cfg.modifier;
exec-once = [
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # dbus package comes from NixOS module option `services.dbus.dbusPackage` [1]
"gnome-keyring-daemon --start --components=secrets" # gnome-keyring package comes from NixOS module `services.gnome.gnome-keyring` [1]
];
# 1: see Hyprland NixOS module
windowrule = [ windowrule = [
# "float, class:^(${nonCenterFloatingClassesRegex})$" "center, floating:1, not class:^(Gimp)$, not class:^(steam)$"
"center, floating:1, class:^(?!.*(${nonCenterFloatingClassesRegex})).*$"
"float, title:^(Open|Save) Files?$" "float, title:^(Open|Save) Files?$"
"noborder, onworkspace:w[t1]" "noborder, onworkspace:w[t1]"
"bordersize ${toString cfg.settings.general.border_size}, floating:1" "bordersize ${toString cfg.settings.general.border_size}, floating:1"
@ -39,12 +24,6 @@ in
"noblur, class:^(xwaylandvideobridge)$" "noblur, class:^(xwaylandvideobridge)$"
]; ];
gesture = [
"3, horizontal, workspace"
"3, up, dispatcher, exec, bemenu-run" # TODO: move to hyprland.applications
"4, swipe, move"
];
# Layouts # Layouts
general.layout = mkDefault "master"; general.layout = mkDefault "master";
master = { master = {

View file

@ -20,10 +20,8 @@ in
enable = mkDefault true; enable = mkDefault true;
createDirectories = mkDefault true; createDirectories = mkDefault true;
}; };
portal = { portal.enable = mkDefault true;
enable = mkDefault true; portal.extraPortals = [ portal ];
extraPortals = [ portal ]; portal.configPackages = [ portal ];
configPackages = [ portal ];
};
}; };
} }

View file

@ -19,13 +19,13 @@ let
in in
{ {
urls = [ { template = engine.url; } ]; urls = [ { template = engine.url; } ];
inherit (engine) icon; icon = engine.icon;
updateInterval = if (isUrl engine.icon) then every_day else null; updateInterval = if (isUrl engine.icon) then every_day else null;
definedAliases = optional (engine ? alias) engine.alias; definedAliases = optional (engine ? alias) engine.alias;
}; };
transformedEngines = mapAttrs' (name: engine: { transformedEngines = mapAttrs' (name: engine: {
inherit name; name = name;
value = transformEngine engine; value = transformEngine engine;
}) engines; }) engines;
@ -79,7 +79,7 @@ in
profiles.default.search.engines = mapAttrs (_: name: transformedEngines.${name}) ( profiles.default.search.engines = mapAttrs (_: name: transformedEngines.${name}) (
listToAttrs ( listToAttrs (
map (name: { map (name: {
inherit name; name = name;
value = name; value = name;
}) cfg.searchEngines }) cfg.searchEngines
) )

View file

@ -1,71 +1,79 @@
[ [
# cursor navigation
{ {
options.desc = "scroll down, recenter"; # scroll down, recenter
key = "<C-d>"; key = "<C-d>";
action = "<C-d>zz"; action = "<C-d>zz";
mode = "n"; mode = "n";
} }
{ {
options.desc = "scroll up, recenter"; # scroll up, recenter
key = "<C-u>"; key = "<C-u>";
action = "<C-u>zz"; action = "<C-u>zz";
mode = "n"; mode = "n";
} }
# searching
{ {
options.desc = "center cursor after search next"; # center cursor after search next
key = "n"; key = "n";
action = "nzzzv"; action = "nzzzv";
mode = "n"; mode = "n";
} }
{ {
options.desc = "center cursor after search previous"; # center cursor after search previous
key = "N"; key = "N";
action = "Nzzzv"; action = "Nzzzv";
mode = "n"; mode = "n";
} }
{ {
options.desc = "ex command"; # ex command
key = "<leader>pv"; key = "<leader>pv";
action = "<cmd>Ex<CR>"; action = "<cmd>Ex<CR>";
mode = "n"; mode = "n";
} }
# search and replace
{ {
options.desc = "search and replace word under cursor"; # search and replace word under cursor
key = "<leader>s"; key = "<leader>s";
action = ":%s/<C-r><C-w>/<C-r><C-w>/gI<Left><Left><Left>"; action = ":%s/<C-r><C-w>/<C-r><C-w>/gI<Left><Left><Left>";
mode = "n"; mode = "n";
} }
# search and replace selected text
{ {
key = "<leader>s"; key = "<leader>s";
action = "y:%s/<C-r>0/<C-r>0/gI<Left><Left><Left>"; action = "y:%s/<C-r>0/<C-r>0/gI<Left><Left><Left>";
mode = "v"; mode = "v";
} }
# clipboard operations
{ {
options.desc = "copy to system clipboard in visual mode"; # copy to system clipboard in visual mode
key = "<C-c>"; key = "<C-c>";
action = ''"+y ''; action = ''"+y '';
mode = "v"; mode = "v";
} }
{ {
options.desc = "paste from system clipboard in visual mode"; # paste from system clipboard in visual mode
key = "<C-v>"; key = "<C-v>";
action = ''"+p ''; action = ''"+p '';
mode = "v"; mode = "v";
} }
{ {
options.desc = "yank to system clipboard"; # yank to system clipboard
key = "<leader>Y"; key = "<leader>Y";
action = "+Y"; action = "+Y";
mode = "n"; mode = "n";
} }
{ {
options.desc = "replace selected text with clipboard content"; # replace selected text with clipboard content
key = "<leader>p"; key = "<leader>p";
action = "_dP"; action = "_dP";
mode = "x"; mode = "x";
} }
{ {
options.desc = "delete without copying to clipboard"; # delete without copying to clipboard
key = "<leader>d"; key = "<leader>d";
action = "_d"; action = "_d";
mode = [ mode = [
@ -73,184 +81,267 @@
"v" "v"
]; ];
} }
# line operations
{ {
options.desc = "move lines down in visual mode"; # move lines down in visual mode
key = "J"; key = "J";
action = ":m '>+1<CR>gv=gv"; action = ":m '>+1<CR>gv=gv";
mode = "v"; mode = "v";
} }
{ {
options.desc = "move lines up in visual mode"; # move lines up in visual mode
key = "K"; key = "K";
action = ":m '<-2<CR>gv=gv"; action = ":m '<-2<CR>gv=gv";
mode = "v"; mode = "v";
} }
{ {
options.desc = "join lines"; # join lines
key = "J"; key = "J";
action = "mzJ`z"; action = "mzJ`z";
mode = "n"; mode = "n";
} }
# quickfix
{ {
options.desc = "Run make command"; # Run make command
key = "<leader>m"; key = "<leader>m";
action = "<cmd>:make<CR>"; action = "<cmd>:make<CR>";
mode = "n"; mode = "n";
} }
{ {
options.desc = "previous quickfix item"; # previous quickfix item
key = "<C-A-J>"; key = "<C-A-J>";
action = "<cmd>cprev<CR>zz"; action = "<cmd>cprev<CR>zz";
mode = "n"; mode = "n";
} }
{ {
options.desc = "next quickfix item"; # next quickfix item
key = "<C-A-K>"; key = "<C-A-K>";
action = "<cmd>cnext<CR>zz"; action = "<cmd>cnext<CR>zz";
mode = "n"; mode = "n";
} }
# location list navigation
{ {
options.desc = "previous location list item"; # previous location list item
key = "<leader>j"; key = "<leader>j";
action = "<cmd>lprev<CR>zz"; action = "<cmd>lprev<CR>zz";
mode = "n"; mode = "n";
} }
{ {
options.desc = "next location list item"; # next location list item
key = "<leader>k"; key = "<leader>k";
action = "<cmd>lnext<CR>zz"; action = "<cmd>lnext<CR>zz";
mode = "n"; mode = "n";
} }
# disabling keys
{ {
options.desc = "disable the 'Q' key"; # disable the 'Q' key
key = "Q"; key = "Q";
action = "<nop>"; action = "<nop>";
mode = "n"; mode = "n";
} }
# text selection
{ {
options.desc = "select whole buffer"; # select whole buffer
key = "<C-a>"; key = "<C-a>";
action = "ggVG"; action = "ggVG";
mode = "n"; mode = "n";
} }
# window operations
{ {
options.desc = "focus next window"; # focus next window
key = "<C-j>"; key = "<C-j>";
action = ":wincmd W<CR>"; action = ":wincmd W<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
{ {
options.desc = "focus next window"; # focus previous window
key = "<Tab>";
action = ":wincmd W<CR>";
mode = "n";
}
{
options.desc = "focus previous window";
key = "<C-k>"; key = "<C-k>";
action = ":wincmd w<CR>"; action = ":wincmd w<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
# window size adjustments
{ {
options.desc = "focus previous window"; # increase window width
key = "<S-Tab>";
action = ":wincmd w<CR>";
mode = "n";
}
{
options.desc = "increase window width";
key = "<C-l>"; key = "<C-l>";
action = ":vertical resize +5<CR>"; action = ":vertical resize +5<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
{ {
options.desc = "decrease window width"; # decrease window width
key = "<C-h>"; key = "<C-h>";
action = ":vertical resize -5<CR>"; action = ":vertical resize -5<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
# window closing and opening
{ {
options.desc = "close current window"; # close current window
key = "<leader-S>c"; key = "<leader-S>c";
action = ":q<CR>"; action = ":q<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
{ {
options.desc = "new vertical split at $HOME"; # new vertical split at $HOME
key = "<leader>n"; key = "<leader>n";
action = ":vsp $HOME<CR>"; action = ":vsp $HOME<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
# window split orientation toggling
{ {
options.desc = "toggle split orientation"; # toggle split orientation
key = "<leader>t"; key = "<leader>t";
action = ":wincmd T<CR>"; action = ":wincmd T<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
# spell checking
{ {
options.desc = "toggle spell checking"; # toggle spell checking
key = "<leader>ss"; key = "<leader>ss";
action = ":setlocal spell!<CR>"; action = ":setlocal spell!<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
{ {
options.desc = "switch to english spell checking"; # switch to english spell checking
key = "<leader>se"; key = "<leader>se";
action = ":setlocal spelllang=en_us<CR>"; action = ":setlocal spelllang=en_us<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
{ {
options.desc = "switch to german spell checking"; # switch to german spell checking
key = "<leader>sg"; key = "<leader>sg";
action = ":setlocal spelllang=de_20<CR>"; action = ":setlocal spelllang=de_20<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
{ {
options.desc = "move to next misspelling"; # move to next misspelling
key = "]s"; key = "]s";
action = "]szz"; action = "]szz";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
{ {
options.desc = "move to previous misspelling"; # move to previous misspelling
key = "[s"; key = "[s";
action = "[szz"; action = "[szz";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
{ {
options.desc = "correction suggestions for a misspelled word"; # correction suggestions for a misspelled word
key = "z="; key = "z=";
action = "z="; action = "z=";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
{ {
options.desc = "adding words to the dictionary"; # adding words to the dictionary
key = "zg"; key = "zg";
action = "zg"; action = "zg";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
# buffer navigation
{ {
options.desc = "next buffer"; # next buffer
key = "<C-S-J>"; key = "<C-S-J>";
action = ":bnext<CR>"; action = ":bnext<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
{ {
options.desc = "previous buffer"; # previous buffer
key = "<C-S-K>"; key = "<C-S-K>";
action = ":bprevious<CR>"; action = ":bprevious<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
{ {
options.desc = "close current buffer"; # close current buffer
key = "<leader>bd"; key = "<leader>bd";
action = ":bdelete<CR>"; action = ":bdelete<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
{ {
options.desc = "apply code action"; # apply code action
key = "<leader>ca"; key = "<leader>ca";
action = ":lua vim.lsp.buf.code_action()<CR>"; action = ":lua vim.lsp.buf.code_action()<CR>";
options = {
noremap = true;
silent = true;
};
mode = "n"; mode = "n";
} }
] ]

View file

@ -3,17 +3,14 @@
{ {
imports = [ imports = [
./cmp.nix ./cmp.nix
./diffview.nix
./lsp.nix ./lsp.nix
./gitsigns.nix
./lualine.nix ./lualine.nix
./telescope.nix ./telescope.nix
./treesitter.nix # ./treesitter.nix # HOTFIX: does not build
./trouble.nix ./trouble.nix
]; ];
config.programs.nixvim.plugins = { config.programs.nixvim.plugins = {
which-key.enable = lib.mkDefault true;
markdown-preview.enable = lib.mkDefault true; markdown-preview.enable = lib.mkDefault true;
# warning: Nixvim: `plugins.web-devicons` was enabled automatically because the following plugins are enabled. This behaviour is deprecated. Please explicitly define `plugins.web-devicons.enable` # warning: Nixvim: `plugins.web-devicons` was enabled automatically because the following plugins are enabled. This behaviour is deprecated. Please explicitly define `plugins.web-devicons.enable`
web-devicons.enable = true; web-devicons.enable = true;

View file

@ -1,59 +0,0 @@
{ config, lib, ... }:
let
cfg = config.programs.nixvim;
plugin = cfg.plugins.diffview;
inherit (lib) mkDefault mkIf;
in
{
config = {
programs.nixvim = {
plugins.diffview = {
enable = mkDefault true;
};
# highlight = mkIf plugin.enable {
# DiffAdd = {
# bg = "#2d4a2d";
# fg = "NONE";
# };
# DiffDelete = {
# bg = "#4a2d2d";
# fg = "NONE";
# };
# DiffChange = {
# bg = "#2d3a4a";
# fg = "NONE";
# };
# DiffText = {
# bg = "#1a5a1a";
# fg = "NONE";
# };
# };
keymaps = mkIf plugin.enable [
{
mode = "n";
key = "<leader>gd";
action.__raw = ''
function()
local lib = require("diffview.lib")
local view = lib.get_current_view()
if view then
vim.cmd("DiffviewClose")
else
vim.cmd("DiffviewOpen")
end
end
'';
options = {
noremap = true;
silent = true;
desc = "toggle git diff";
};
}
];
};
};
}

View file

@ -1,104 +0,0 @@
{ config, lib, ... }:
let
cfg = config.programs.nixvim;
plugin = cfg.plugins.gitsigns;
inherit (lib) mkDefault mkIf;
in
{
config = {
programs.nixvim = {
plugins.gitsigns = {
enable = mkDefault true;
settings = {
current_line_blame = mkDefault false;
current_line_blame_opts = {
virt_text = mkDefault true;
virt_text_pos = mkDefault "eol";
};
signcolumn = mkDefault true;
signs = {
add.text = mkDefault "+";
change.text = mkDefault "";
changedelete.text = mkDefault "~";
delete.text = mkDefault "-";
topdelete.text = mkDefault "-";
untracked.text = mkDefault "?";
};
watch_gitdir.follow_files = mkDefault true;
};
};
keymaps = mkIf plugin.enable [
{
mode = "n";
key = "<leader>hs";
action.__raw = "function() require('gitsigns').stage_hunk() end";
options = {
noremap = true;
silent = true;
desc = "stage hunk";
};
}
{
mode = "v";
key = "<leader>hs";
action.__raw = ''
function()
require('gitsigns').stage_hunk({vim.fn.line('.'), vim.fn.line('v')})
end
'';
options = {
noremap = true;
silent = true;
desc = "stage selected hunks";
};
}
{
mode = "n";
key = "<leader>hu";
action.__raw = "function() require('gitsigns').undo_stage_hunk() end";
options = {
noremap = true;
silent = true;
desc = "undo stage hunk";
};
}
{
mode = "n";
key = "<leader>hS";
action.__raw = "function() require('gitsigns').stage_buffer() end";
options = {
noremap = true;
silent = true;
desc = "stage buffer";
};
}
{
mode = "n";
key = "<leader>hr";
action.__raw = "function() require('gitsigns').reset_hunk() end";
options = {
noremap = true;
silent = true;
desc = "reset hunk";
};
}
{
mode = "v";
key = "<leader>hr";
action.__raw = ''
function()
require('gitsigns').reset_hunk({vim.fn.line('.'), vim.fn.line('v')})
end
'';
options = {
noremap = true;
silent = true;
desc = "reset selected hunks";
};
}
];
};
};
}

View file

@ -16,31 +16,6 @@ in
programs.nixvim = { programs.nixvim = {
plugins.telescope = { plugins.telescope = {
enable = mkDefault true; enable = mkDefault true;
settings = {
defaults = {
vimgrep_arguments = [
"rg"
"--color=never"
"--no-heading"
"--with-filename"
"--line-number"
"--column"
"--smart-case"
"--hidden"
];
file_ignore_patterns = [
"^.git/"
"^.direnv/"
"^.cache/"
"^node_modules/"
];
};
pickers = {
find_files = {
hidden = true;
};
};
};
extensions = { extensions = {
file-browser.enable = mkDefault true; file-browser.enable = mkDefault true;
fzf-native.enable = mkDefault true; fzf-native.enable = mkDefault true;

View file

@ -16,8 +16,7 @@ in
{ {
config = { config = {
programs.nixvim = { programs.nixvim = {
plugins = { plugins.treesitter = {
treesitter = {
enable = mkDefault true; enable = mkDefault true;
nixvimInjections = mkDefault true; nixvimInjections = mkDefault true;
settings = { settings = {
@ -26,9 +25,8 @@ in
indent.enable = mkDefault true; indent.enable = mkDefault true;
}; };
}; };
treesitter-context = mkIf plugin.enable { enable = mkDefault true; }; plugins.treesitter-context = mkIf plugin.enable { enable = mkDefault true; };
treesitter-textobjects = mkIf plugin.enable { enable = mkDefault true; }; plugins.treesitter-textobjects = mkIf plugin.enable { enable = mkDefault true; };
};
}; };
# Fix for: ERROR `cc` executable not found. # Fix for: ERROR `cc` executable not found.

View file

@ -2,7 +2,7 @@
let let
spellDir = config.xdg.dataHome + "/nvim/site/spell"; spellDir = config.xdg.dataHome + "/nvim/site/spell";
baseUrl = "https://vim.ftp.fu-berlin.de/runtime/spell"; baseUrl = "http://ftp.de.vim.org/runtime/spell";
in in
{ {
home.file = { home.file = {
@ -12,7 +12,7 @@ in
url = baseUrl + "/de.utf-8.spl"; url = baseUrl + "/de.utf-8.spl";
sha256 = "sha256-c8cQfqM5hWzb6SHeuSpFk5xN5uucByYdobndGfaDo9E="; sha256 = "sha256-c8cQfqM5hWzb6SHeuSpFk5xN5uucByYdobndGfaDo9E=";
}; };
target = spellDir + "/de.utf-8.spl"; target = spellDir + "/de.utf8.spl";
}; };
de-sug = { de-sug = {
enable = true; enable = true;
@ -20,7 +20,7 @@ in
url = baseUrl + "/de.utf-8.sug"; url = baseUrl + "/de.utf-8.sug";
sha256 = "sha256-E9Ds+Shj2J72DNSopesqWhOg6Pm6jRxqvkerqFcUqUg="; sha256 = "sha256-E9Ds+Shj2J72DNSopesqWhOg6Pm6jRxqvkerqFcUqUg=";
}; };
target = spellDir + "/de.utf-8.sug"; target = spellDir + "/de.utf8.sug";
}; };
}; };
} }

View file

@ -9,7 +9,7 @@
let let
cfg = config.programs.passwordManager; cfg = config.programs.passwordManager;
passmenuScript = pkgs.writeShellScriptBin "passmenu-bemenu" (builtins.readFile ./passmenu); # TODO: override original passmenu script coming from pass itself passmenuScript = pkgs.writeShellScriptBin "passmenu-bemenu" (builtins.readFile ./passmenu); # TODO: override original passmenu script coming from pass itself
inherit (pkgs) passff-host; passff-host = pkgs.passff-host;
inherit (lib) inherit (lib)
mkDefault mkDefault

View file

@ -17,7 +17,6 @@ let
"moonfly" "moonfly"
"nord" "nord"
"oxocarbon" "oxocarbon"
"generate-from-image"
]; ];
# schemes names in `pkgs.base16-schemes` that need a suffix # schemes names in `pkgs.base16-schemes` that need a suffix
needsSuffix = [ needsSuffix = [
@ -29,7 +28,13 @@ let
"moonfly" "moonfly"
"oxocarbon" "oxocarbon"
]; ];
schemeName = if builtins.elem cfg.scheme needsSuffix then "${cfg.scheme}-${cfg.polarity}" else cfg.scheme; schemeName =
if builtins.elem cfg.scheme needsSuffix then "${cfg.scheme}-${cfg.polarity}" else cfg.scheme;
scheme =
if builtins.elem cfg.scheme customSchemes then
./schemes/${schemeName}.yaml
else
"${pkgs.base16-schemes}/share/themes/${schemeName}.yaml";
inherit (lib) inherit (lib)
mkDefault mkDefault
@ -51,8 +56,6 @@ in
description = '' description = ''
Base16 color scheme name. Available options are: Base16 color scheme name. Available options are:
${toString validSchemes} ${toString validSchemes}
"generate-from-image" generates a color scheme from `stylix.image`
''; '';
}; };
}; };
@ -67,12 +70,7 @@ in
stylix = { stylix = {
autoEnable = mkDefault true; autoEnable = mkDefault true;
base16Scheme = mkIf (cfg.scheme != "generate-from-image") ( base16Scheme = scheme;
if builtins.elem cfg.scheme customSchemes then
./schemes/${schemeName}.yaml
else
"${pkgs.base16-schemes}/share/themes/${schemeName}.yaml"
);
fonts = { fonts = {
monospace = mkDefault { monospace = mkDefault {
package = pkgs.hack-font; package = pkgs.hack-font;

View file

@ -4,13 +4,11 @@ let
cfg = config.stylix; cfg = config.stylix;
target = cfg.targets.nixvim; target = cfg.targets.nixvim;
inherit (lib) mkIf optionalAttrs; inherit (lib) mkIf;
in in
{ {
config = mkIf cfg.enable { config = mkIf cfg.enable {
stylix.targets.nixvim.enable = false; stylix.targets.nixvim.enable = false;
programs.nixvim.colorschemes = optionalAttrs (cfg.scheme != "generate-from-image") { programs.nixvim.colorschemes."${cfg.scheme}".enable = !target.enable;
"${cfg.scheme}".enable = !target.enable;
};
}; };
} }

View file

@ -71,11 +71,11 @@ in
#workspaces { #workspaces {
color: ${colors.base05}; color: ${colors.base05};
background: ${colors.base00};
} }
#workspaces button { #workspaces button {
padding: ${halfgaps}px; padding: ${halfgaps}px;
color: ${colors.base05};
} }
#workspaces button.active { #workspaces button.active {

View file

@ -56,7 +56,6 @@ let
}; };
# Add your custom modules here # Add your custom modules here
"custom/notifications" = import ./modules/notifications.nix { inherit lib pkgs; };
"custom/newsboat" = import ./modules/newsboat.nix { inherit lib pkgs; }; "custom/newsboat" = import ./modules/newsboat.nix { inherit lib pkgs; };
"pulseaudio#input" = import ./modules/pulseaudio/input.nix { inherit lib pkgs; }; "pulseaudio#input" = import ./modules/pulseaudio/input.nix { inherit lib pkgs; };
"pulseaudio#output" = import ./modules/pulseaudio/output.nix { inherit lib pkgs; }; "pulseaudio#output" = import ./modules/pulseaudio/output.nix { inherit lib pkgs; };
@ -96,13 +95,11 @@ in
"disk" "disk"
"pulseaudio#input" "pulseaudio#input"
"pulseaudio#output" "pulseaudio#output"
"custom/notifications"
"tray" "tray"
]; ];
inherit inherit
"custom/newsboat" "custom/newsboat"
"custom/notifications"
"hyprland/language" "hyprland/language"
"hyprland/workspaces" "hyprland/workspaces"
"pulseaudio#input" "pulseaudio#input"
@ -132,7 +129,5 @@ in
}; };
}; };
}; };
services.batsignal.enable = builtins.elem "battery" cfg.settings.mainBar.modules-right;
}; };
} }

View file

@ -10,13 +10,13 @@ let
let let
newsboat = "${pkgs.newsboat}/bin/newsboat"; newsboat = "${pkgs.newsboat}/bin/newsboat";
in in
pkgs.writeShellScriptBin "newsboat-print-unread" '' (pkgs.writeShellScriptBin "newsboat-print-unread" ''
UNREAD=$(${newsboat} -x print-unread | awk '{print $1}') UNREAD=$(${newsboat} -x print-unread | awk '{print $1}')
if [[ $UNREAD -gt 0 ]]; then if [[ $UNREAD -gt 0 ]]; then
printf " %i" "$UNREAD" printf " %i" "$UNREAD"
fi fi
''; '');
inherit (lib) mkDefault; inherit (lib) mkDefault;
in in

View file

@ -1,27 +0,0 @@
{ pkgs, lib, ... }:
let
inherit (lib) mkDefault;
dunst = "${pkgs.dunst}/bin/dunstctl";
in
{
format = mkDefault "{icon}";
format-icons = {
unmuted = mkDefault "";
muted = mkDefault "";
};
return-type = mkDefault "json";
exec = mkDefault (
pkgs.writeShellScript "notifications" ''
is_paused=$(${dunst} is-paused)
if [ "$is_paused" = "true" ]; then
echo '{"alt": "muted", "class": "muted"}'
else
echo '{"alt": "unmuted", "class": "unmuted"}'
fi
''
);
on-click = mkDefault "dunst-toggle";
interval = mkDefault "once";
signal = mkDefault 12;
}

View file

@ -1,4 +1,3 @@
#!/usr/bin/env bash
TIMER_FILE="/tmp/timer" # file to store the current time TIMER_FILE="/tmp/timer" # file to store the current time
SIGNAL=11 # signal number to send to status bar SIGNAL=11 # signal number to send to status bar
STATUS_BAR="waybar" # Support for more status bars? STATUS_BAR="waybar" # Support for more status bars?
@ -17,7 +16,7 @@ start_timer() {
notify-send "Timer Started" "Your countdown timer has been started." notify-send "Timer Started" "Your countdown timer has been started."
trap "exit" INT TERM trap "exit" INT TERM
trap 'rm -f -- "$TIMER_FILE"' EXIT trap "rm -f -- '$TIMER_FILE'" EXIT
while [ $total_seconds -gt 0 ]; do while [ $total_seconds -gt 0 ]; do
hours=$(( total_seconds / 3600 )) hours=$(( total_seconds / 3600 ))
@ -63,7 +62,7 @@ if [ "$1" = "start" ]; then
MINUTES=${MINUTES:-0} MINUTES=${MINUTES:-0}
SECONDS=${SECONDS:-0} SECONDS=${SECONDS:-0}
start_timer "$HOURS" "$MINUTES" "$SECONDS" start_timer $HOURS $MINUTES $SECONDS
elif [ "$1" = "stop" ]; then elif [ "$1" = "stop" ]; then
notify-send "Timer Stopped" "Your countdown timer has been stopped." notify-send "Timer Stopped" "Your countdown timer has been stopped."

View file

@ -6,19 +6,19 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
lact lact
nvtopPackages.amd nvtopPackages.amd
rocmPackages.clr.icd
rocmPackages.hipcc rocmPackages.hipcc
rocmPackages.miopen rocmPackages.miopen
rocmPackages.rocm-runtime rocmPackages.rocm-runtime
rocmPackages.rocm-smi rocmPackages.rocm-smi
rocmPackages.rocminfo rocmPackages.rocminfo
]; ];
# environment.variables.ROC_ENABLE_PRE_VEGA = "1"; # for Polaris # environment.variables.ROC_ENABLE_PRE_VEGA = "1"; # for Polaris
hardware.amdgpu.opencl.enable = true; hardware.amdgpu.opencl.enable = true;
hardware.graphics.extraPackages = with pkgs; [ rocmPackages.clr.icd ];
systemd.packages = with pkgs; [ lact ]; systemd.packages = with pkgs; [ lact ];
systemd.services.lactd.wantedBy = [ "multi-user.target" ]; systemd.services.lactd.wantedBy = [ "multi-user.target" ];
} }

View file

@ -4,16 +4,10 @@ let
inherit (lib) mkDefault; inherit (lib) mkDefault;
in in
{ {
hardware = { hardware.bluetooth.enable = mkDefault true;
bluetooth = { hardware.bluetooth.powerOnBoot = mkDefault false;
enable = mkDefault true; hardware.bluetooth.settings.General.Enable = mkDefault "Source,Sink,Media,Socket";
powerOnBoot = mkDefault false; hardware.bluetooth.settings.General.Experimental = mkDefault true;
settings.General = {
Enable = mkDefault "Source,Sink,Media,Socket";
Experimental = mkDefault true;
};
};
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
blueman blueman

View file

@ -84,6 +84,8 @@ in
) { } cfg.remotes; ) { } cfg.remotes;
# Ensure that all cifs-mount services are started with the graphical session # Ensure that all cifs-mount services are started with the graphical session
systemd.user.targets.graphical-session.wants = map (remote: "cifs-mount-${remote.shareName}.service") cfg.remotes; systemd.user.targets.graphical-session.wants = map (
remote: "cifs-mount-${remote.shareName}.service"
) cfg.remotes;
}; };
} }

View file

@ -1,20 +0,0 @@
{ lib, pkgs, ... }:
{
boot = {
# fix CVE-2026-31431
kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.18.22") (lib.mkDefault pkgs.linuxPackages_6_18);
# fix CVE-2026-43500
extraModprobeConfig = ''
install esp4 ${pkgs.coreutils}/bin/false
install esp6 ${pkgs.coreutils}/bin/false
install rxrpc ${pkgs.coreutils}/bin/false
'';
blacklistedKernelModules = [
"esp4"
"esp6"
"rxrpc"
];
};
}

View file

@ -1,6 +1,5 @@
{ {
imports = [ imports = [
./boot.nix
./environment.nix ./environment.nix
./htop.nix ./htop.nix
./nationalization.nix ./nationalization.nix

View file

@ -9,8 +9,7 @@ let
inherit (lib) mkDefault optionals; inherit (lib) mkDefault optionals;
in in
{ {
environment = { environment.systemPackages =
systemPackages =
with pkgs; with pkgs;
[ [
cryptsetup cryptsetup
@ -48,7 +47,7 @@ in
pkgs.kitty.terminfo pkgs.kitty.terminfo
]; ];
shellAliases = { environment.shellAliases = {
l = "ls -lh"; l = "ls -lh";
ll = "ls -lAh"; ll = "ls -lAh";
ports = "ss -tulpn"; ports = "ss -tulpn";
@ -57,11 +56,8 @@ in
}; };
# saves one instance of nixpkgs. # saves one instance of nixpkgs.
ldso32 = null; environment.ldso32 = null;
};
boot = { boot.tmp.cleanOnBoot = mkDefault true;
tmp.cleanOnBoot = mkDefault true; boot.initrd.systemd.enable = mkDefault (!config.boot.swraid.enable && !config.boot.isContainer);
initrd.systemd.enable = mkDefault (!config.boot.swraid.enable && !config.boot.isContainer);
};
} }

View file

@ -2,13 +2,16 @@
# avoid TOFU MITM # avoid TOFU MITM
programs.ssh.knownHosts = { programs.ssh.knownHosts = {
"github.com".hostNames = [ "github.com" ]; "github.com".hostNames = [ "github.com" ];
"github.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl"; "github.com".publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl";
"gitlab.com".hostNames = [ "gitlab.com" ]; "gitlab.com".hostNames = [ "gitlab.com" ];
"gitlab.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAfuCHKVTjquxvt6CM6tdG4SLp1Btn/nOeHHE5UOzRdf"; "gitlab.com".publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAfuCHKVTjquxvt6CM6tdG4SLp1Btn/nOeHHE5UOzRdf";
"git.sr.ht".hostNames = [ "git.sr.ht" ]; "git.sr.ht".hostNames = [ "git.sr.ht" ];
"git.sr.ht".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMZvRd4EtM7R+IHVMWmDkVU3VLQTSwQDSAvW0t2Tkj60"; "git.sr.ht".publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMZvRd4EtM7R+IHVMWmDkVU3VLQTSwQDSAvW0t2Tkj60";
}; };
# TODO: add synix # TODO: add synix
} }

View file

@ -42,8 +42,12 @@ in
static-auth-secret-file = mkIf cfg.sops config.sops.secrets."coturn/static-auth-secret".path; static-auth-secret-file = mkIf cfg.sops config.sops.secrets."coturn/static-auth-secret".path;
realm = mkDefault "turn.${config.networking.domain}"; realm = mkDefault "turn.${config.networking.domain}";
cert = mkIf (!cfg.no-tls && cfg.sops) "${config.security.acme.certs.${cfg.realm}.directory}/full.pem"; cert =
pkey = mkIf (!cfg.no-tls && cfg.sops) "${config.security.acme.certs.${cfg.realm}.directory}/key.pem"; mkIf (!cfg.no-tls && cfg.sops)
"${config.security.acme.certs.${cfg.realm}.directory}/full.pem";
pkey =
mkIf (!cfg.no-tls && cfg.sops)
"${config.security.acme.certs.${cfg.realm}.directory}/key.pem";
extraConfig = '' extraConfig = ''
# ban private IP ranges # ban private IP ranges

View file

@ -14,7 +14,6 @@
i2pd = import ./i2pd; i2pd = import ./i2pd;
jellyfin = import ./jellyfin; jellyfin = import ./jellyfin;
jirafeau = import ./jirafeau; jirafeau = import ./jirafeau;
librechat-oci = import ./librechat-oci;
mailserver = import ./mailserver; mailserver = import ./mailserver;
matrix-synapse = import ./matrix-synapse; matrix-synapse = import ./matrix-synapse;
maubot = import ./maubot; maubot = import ./maubot;
@ -22,7 +21,6 @@
miniflux = import ./miniflux; miniflux = import ./miniflux;
nginx = import ./nginx; nginx = import ./nginx;
normalUsers = import ./normalUsers; normalUsers = import ./normalUsers;
nostr-relay = import ./nostr-relay;
nvidia = import ./nvidia; nvidia = import ./nvidia;
ollama = import ./ollama; ollama = import ./ollama;
open-webui-oci = import ./open-webui-oci; open-webui-oci = import ./open-webui-oci;
@ -35,4 +33,5 @@
virtualisation = import ./virtualisation; virtualisation = import ./virtualisation;
webPage = import ./webPage; webPage = import ./webPage;
windows-oci = import ./windows-oci; windows-oci = import ./windows-oci;
zfs = import ./zfs;
} }

Some files were not shown because too many files have changed in this diff Show more