Skip to content

Instantly share code, notes, and snippets.

@LinArcX LinArcX/xinitrc
Created Apr 6, 2019

Embed
What would you like to do?
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.xinitrc;
in
{
meta.maintainers = [ maintainers.rycee ];
options = {
xinitrc = {
enable = mkEnableOption "X init";
defaultSession = mkOption {
type = types.str;
default = "i3";
example = "i3";
description = ''
Default session
'';
};
};
};
config = mkIf cfg.enable {
home.file.".xinitrc".text = ''
session=${1:-${cfg.defaultSession}}
case $session in
i3|i3wm ) exec i3;;
kde ) exec startkde;;
xfce|xfce4 ) exec startxfce4;;
* ) exec $1;;
esac
'';
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.