nixos module to start kiwmi at boot
this is here for my convenience, I make no claims of practicality or beauty (it uses nix-shell and hardcodes pathnames)
This commit is contained in:
parent
a8f7448245
commit
6d4dfbe029
58
module.nix
Normal file
58
module.nix
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
systemd.services."eufon" = {
|
||||||
|
wants = [
|
||||||
|
"systemd-machined.service"
|
||||||
|
"accounts-daemon.service"
|
||||||
|
"systemd-udev-settle.service"
|
||||||
|
"dbus.socket"
|
||||||
|
];
|
||||||
|
aliases = [ "display-manager.service" ];
|
||||||
|
after = [
|
||||||
|
"rc-local.service"
|
||||||
|
"systemd-machined.service"
|
||||||
|
"systemd-user-sessions.service"
|
||||||
|
"getty@tty2.service"
|
||||||
|
"plymouth-quit.service"
|
||||||
|
"plymouth-start.service"
|
||||||
|
"systemd-logind.service"
|
||||||
|
"systemd-udev-settle.service"
|
||||||
|
];
|
||||||
|
conflicts = [
|
||||||
|
"getty@tty2.service"
|
||||||
|
"plymouth-quit.service"
|
||||||
|
];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig =
|
||||||
|
let run-eufon = pkgs.writeScript "run-eufon" ''
|
||||||
|
#!${pkgs.bash}/bin/bash
|
||||||
|
source ${config.system.build.setEnvironment}
|
||||||
|
${pkgs.dbus}/bin/dbus-run-session /home/dan/src/eufon/run.sh
|
||||||
|
systemd-cat echo "dbus-run-session $?"
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
WorkingDirectory = "/home/dan/src/eufon";
|
||||||
|
TTYPath = "/dev/tty2";
|
||||||
|
TTYReset = "yes";
|
||||||
|
TTYVHangup = "yes";
|
||||||
|
TTYVTDisallocate = "yes";
|
||||||
|
PAMName = "login";
|
||||||
|
StandardInput = "tty";
|
||||||
|
StandardError = "journal";
|
||||||
|
StandardOutput = "journal";
|
||||||
|
User = "dan";
|
||||||
|
ExecStart = run-eufon;
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
environment = {
|
||||||
|
NIX_PATH = "nixpkgs=${<nixpkgs>}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
];
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
services.logind.extraConfig = ''
|
||||||
|
HandlePowerKey=ignore
|
||||||
|
'';
|
||||||
|
}
|
@ -5,5 +5,11 @@ in (p.overrideAttrs (o:{
|
|||||||
shellHook = ''
|
shellHook = ''
|
||||||
export LUA_PATH=`lua -e 'print(package.path)'`
|
export LUA_PATH=`lua -e 'print(package.path)'`
|
||||||
export LUA_CPATH=`lua -e 'print(package.cpath)'`
|
export LUA_CPATH=`lua -e 'print(package.cpath)'`
|
||||||
|
# this is a shell function mostly so that I can comment it out
|
||||||
|
# to experiment with starting sway or tinywl or something else
|
||||||
|
# to see how they behave if kiwmi is being weird
|
||||||
|
start_eufon(){
|
||||||
|
kiwmi -c init.lua;
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
})).override { debug = true; }
|
})).override { debug = true; }
|
||||||
|
Loading…
Reference in New Issue
Block a user