adding desktop config
This commit is contained in:
commit
3a345929b9
21 files changed
+1131
No files matched your search
@@ -0,0 +1,23 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.my.defaults;
|
||||
mkCmdOption = description: lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
inherit description;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.defaults = {
|
||||
terminal = mkCmdOption "Command for the default terminal ($TERMINAL).";
|
||||
browser = mkCmdOption "Command for the default browser ($BROWSER).";
|
||||
editor = mkCmdOption "Command for the default editor ($EDITOR and $VISUAL).";
|
||||
};
|
||||
|
||||
config.home.sessionVariables = lib.mkMerge [
|
||||
(lib.mkIf (cfg.terminal != null) { TERMINAL = cfg.terminal; })
|
||||
(lib.mkIf (cfg.browser != null) { BROWSER = cfg.browser; })
|
||||
(lib.mkIf (cfg.editor != null) { EDITOR = cfg.editor; VISUAL = cfg.editor; })
|
||||
];
|
||||
}
|
||||
Reference in new issue
Block a user