Git Product home page Git Product logo

nix-flake's Introduction

What this is

This is a Nix flake that installs and configures xremap.

Flake allows running xremap as a system-wide service and as a user service (controlled by services.xremap.serviceMode option).

Flake implements xremap features that allow specifying per-application remapping. Following combinations are tested:

Scenario No features Sway Gnome X11 Hyprland
System ✔️ ✔️* ✖️ ✖️**
User ✔️ ✔️ ✔️ ✔️

✔️ – tested, works ✖️ – not implemented ❓ – not tested

*: Sway system mode requires restarting the system service after user logs in for the service to pick up the Sway socket.

**: Hyprland feature can be enabled, but the service cannot find a socket

How to use

As a module

  1. Add following to your flake.nix:

    {
        inputs.xremap-flake.url = "github:xremap/nix-flake";
    }
  2. Import the xremap-flake.nixosModules.default module.

  3. Configure the module options

Alternatively, flake application can be nix run to launch xremap without features.

Configuration

Following services.xremap options are exposed:

  • serviceMode – whether to run as user or system
  • withSway – whether to enable Sway support
  • withGnome – whether to enable Gnome support
  • withX11 – whether to enable X11 support
  • package – which package for xremap to use
  • config – configuration for xremap defined as Nix attribute set. See original repo for examples.
  • userId – user under which Sway IPC socket runs
  • userName – Name of user logging into graphical session
  • deviceName – the name of the device to be used. To find out the name, you can check /proc/bus/input/devices
  • watch – whether to watch for new devices

See examples in nixosConfigurations inside flake.nix.

Developemnt

The nix flake comes with a few VM presets that can be used to test some of the combinations. To run a specific VM:

nix run '.#nixosConfigurations.hyprland-user-dev.config.system.build.vm

where hyprland-user-dev is the name of the nixosConfiguration you want to launch

nix-flake's People

Contributors

vtimofeenko avatar shaunsingh avatar k0kubun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.