https://github.com/pucklaj/eruption-nix
Nix derivation and configuration for eruption
https://github.com/pucklaj/eruption-nix
eruption keyboard mouse nixos roccat
Last synced: 8 days ago
JSON representation
Nix derivation and configuration for eruption
- Host: GitHub
- URL: https://github.com/pucklaj/eruption-nix
- Owner: PucklaJ
- License: zlib
- Created: 2025-03-04T23:16:51.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-05T15:01:00.000Z (over 1 year ago)
- Last Synced: 2026-01-26T10:45:00.245Z (5 months ago)
- Topics: eruption, keyboard, mouse, nixos, roccat
- Language: Nix
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Eruption for NixOS
A nix derivation and relating services to run [eruption](https://github.com/eruption-project/eruption) on NixOS.
## Configuration
To set eruption up on NixOS you need to add the following to your nixos `configuration.nix`:
```nix
{ config, pkgs, ... }:
let
eruption = import (pkgs.fetchFromGitHub {
owner = "PucklaJ";
repo = "eruption-nix";
rev = "bf98eac32eaba0c7bf04d6a634d6858822af2890";
sha256 = "sha256-KDffFn2RAiUY3jNfdS1ofbqBDZeVpVgXByI1PhRqfSk=";
});
in
{
# D-Bus is required for the org.eruption dbus service
services.dbus.enable = true;
services.dbus.packages = [
eruption.eruption
];
# PolicyKit is needed to authentication of the dbus service
security.polkit.enable = true;
# udev for the custom udev rules
services.udev.enable = true;
services.udev.packages = [
eruption.eruption
];
# Install the binaries eruption, eruptionctl etc.
# This also installs the polkit actions required for dbus authentication
environment.systemPackages = with pkgs; [
gtk3
eruption.eruption
];
# Some files need to be set up directly on the root filesystem
environment.etc = eruption.etc // {
};
environment.variables = {
GSETTINGS_SCHEMA_DIR = "${pkgs.gtk3}/share/gsettings-schemas/gtk+3-${pkgs.gtk3.version}/glib-2.0/schemas";
};
systemd.services = eruption.system_services // {
};
systemd.user.services = eruption.user_services // {
};
}
```
Since currently the `eruption-install-files.service` removes the `/var/lib/eruption/profiles` folder a separate service to setup a modified profile is necessary:
```nix
...
systemd.services = eruption.system_services // {
"setup-eruption-profile" = {
description = "Setup current profile for Eruption";
after = [ "network.target" ];
before = [ "eruption.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
};
script = ''
mkdir -p /var/lib/eruption/profiles
ln -sf /path/to/profile-name.profile.state /var/lib/eruption/profiles/
'';
enable = true;
};
};
...
```