Compare commits
27 commits
main
...
aramis-tmp
| Author | SHA1 | Date | |
|---|---|---|---|
| 2c88edc511 | |||
| a371ab9406 | |||
| 452a1e9645 | |||
| 537e16501b | |||
| f02465091c | |||
| ba6d0ee918 | |||
| 8233f8e3d9 | |||
| 5381aa79de | |||
| 4086e94d3c | |||
| 457d4841ea | |||
| c2f07a6529 | |||
| 8e0ea3593c | |||
| 70f651c5fa | |||
| 6a7037f2a6 | |||
| 4d9bab8daf | |||
| ea818e8584 | |||
| 14299fc6e8 | |||
| b0fab6d576 | |||
| c7c593ff93 | |||
| 00da507446 | |||
| 8624f4c6ac | |||
| 3b7a119151 | |||
| b1169858cd | |||
| fe7b0a57a8 | |||
| 7a7da21a27 | |||
| c3603a6191 | |||
| d111734802 |
15 changed files with 180 additions and 123 deletions
|
|
@ -25,7 +25,7 @@
|
||||||
# Network-Manager applet
|
# Network-Manager applet
|
||||||
nm-applet.enable = true;
|
nm-applet.enable = true;
|
||||||
# Terminal
|
# Terminal
|
||||||
terminal.program = "alacritty";
|
terminal.default = "alacritty";
|
||||||
# Transmission remote
|
# Transmission remote
|
||||||
trgui.enable = true;
|
trgui.enable = true;
|
||||||
# Zathura document viewer
|
# Zathura document viewer
|
||||||
|
|
|
||||||
|
|
@ -48,15 +48,29 @@ in
|
||||||
"browser.bookmarks.showMobileBookmarks" = true; # Mobile bookmarks
|
"browser.bookmarks.showMobileBookmarks" = true; # Mobile bookmarks
|
||||||
"browser.download.useDownloadDir" = false; # Ask for download location
|
"browser.download.useDownloadDir" = false; # Ask for download location
|
||||||
"browser.in-content.dark-mode" = true; # Dark mode
|
"browser.in-content.dark-mode" = true; # Dark mode
|
||||||
|
"browser.ml.chat.enabled" = false; # No AI
|
||||||
|
"browser.ml.chat.menu" = false; # No AI
|
||||||
|
"browser.ml.chat.page" = false; # No AI
|
||||||
|
"browser.ml.chat.page.footerBadge" = false; # No AI
|
||||||
|
"browser.ml.chat.page.menuBadge" = false; # No AI
|
||||||
|
"browser.ml.chat.shortcuts" = false; # No AI
|
||||||
|
"browser.ml.chat.sidebar" = false; # No AI
|
||||||
|
"browser.ml.enable" = false; # No AI
|
||||||
|
"browser.ml.linkPreview.enabled" = false; # No AI
|
||||||
|
"browser.ml.pageAssist.enabled" = false; # No AI
|
||||||
"browser.newtabpage.activity-stream.feeds.section.topstories" = false; # Disable top stories
|
"browser.newtabpage.activity-stream.feeds.section.topstories" = false; # Disable top stories
|
||||||
"browser.newtabpage.activity-stream.feeds.sections" = false;
|
"browser.newtabpage.activity-stream.feeds.sections" = false;
|
||||||
"browser.newtabpage.activity-stream.feeds.system.topstories" = false; # Disable top stories
|
"browser.newtabpage.activity-stream.feeds.system.topstories" = false; # Disable top stories
|
||||||
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false; # Disable pocket
|
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false; # Disable pocket
|
||||||
|
"browser.tabs.groups.smart.enabled" = false; # No AI
|
||||||
|
"browser.tabs.groups.smart.userEnabled" = false; # No AI
|
||||||
"browser.urlbar.trimURLs" = false; # Always show the `http://` prefix
|
"browser.urlbar.trimURLs" = false; # Always show the `http://` prefix
|
||||||
|
"extensions.ml.enabled" = false; # No AI
|
||||||
"extensions.pocket.enabled" = false; # Disable pocket
|
"extensions.pocket.enabled" = false; # Disable pocket
|
||||||
"media.eme.enabled" = true; # Enable DRM
|
"media.eme.enabled" = true; # Enable DRM
|
||||||
"media.gmp-widevinecdm.enabled" = true; # Enable DRM
|
"media.gmp-widevinecdm.enabled" = true; # Enable DRM
|
||||||
"media.gmp-widevinecdm.visible" = true; # Enable DRM
|
"media.gmp-widevinecdm.visible" = true; # Enable DRM
|
||||||
|
"sidebar.notification.badge.aichat" = false; # No AI
|
||||||
"signon.autofillForms" = false; # Disable built-in form-filling
|
"signon.autofillForms" = false; # Disable built-in form-filling
|
||||||
"signon.rememberSignons" = false; # Disable built-in password manager
|
"signon.rememberSignons" = false; # Disable built-in password manager
|
||||||
"ui.systemUsesDarkTheme" = true; # Dark mode
|
"ui.systemUsesDarkTheme" = true; # Dark mode
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,21 @@
|
||||||
let
|
let
|
||||||
cfg = config.my.home.firefox.tridactyl;
|
cfg = config.my.home.firefox.tridactyl;
|
||||||
|
|
||||||
term = config.my.home.terminal.program;
|
term = config.my.home.terminal.default;
|
||||||
|
|
||||||
vimCommandLine = {
|
vimCommandLine =
|
||||||
alacritty = ''-e "vim" "%f" "+normal!%lGzv%c|"'';
|
let
|
||||||
# Termite wants the whole command in a single argument...
|
# Termite wants the whole command in a single argument...
|
||||||
termite = ''-e "vim %f '+normal!%lGzv%c|'"'';
|
brokenExecCommand = {
|
||||||
|
termite = true;
|
||||||
};
|
};
|
||||||
|
# Assume most other terminals are sane and not broken...
|
||||||
|
isBroken = brokenExecCommand.${term} or false;
|
||||||
|
in
|
||||||
|
if isBroken then
|
||||||
|
''-e "vim %f '+normal!%lGzv%c|'"''
|
||||||
|
else
|
||||||
|
''-e "vim" "%f" "+normal!%lGzv%c|"'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
@ -17,9 +25,9 @@ in
|
||||||
# Use my configured terminal
|
# Use my configured terminal
|
||||||
term
|
term
|
||||||
# Make it easy to pick out with a window class name
|
# Make it easy to pick out with a window class name
|
||||||
"--class tridactyl_editor"
|
"--title=tridactyl_editor"
|
||||||
# Open vim with the cursor in the correct position
|
# Open vim with the cursor in the correct position
|
||||||
vimCommandLine.${term}
|
vimCommandLine
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,18 +9,50 @@ in
|
||||||
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.less = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
config = ''
|
||||||
|
#command
|
||||||
|
# Quit without clearing the screen on `Q`
|
||||||
|
Q toggle-option -!^Predraw-on-quit\nq
|
||||||
|
|
||||||
|
#line-edit
|
||||||
|
# readline-style command editing
|
||||||
|
^p up
|
||||||
|
^n down
|
||||||
|
^b left
|
||||||
|
^f right
|
||||||
|
^a home
|
||||||
|
^e end
|
||||||
|
\eb word-left
|
||||||
|
\ef word-right
|
||||||
|
^w word-backspace
|
||||||
|
\ed word-delete
|
||||||
|
# Simulate delete to start/end of line by repeating word-wise actions
|
||||||
|
^u word-backspace ${lib.strings.replicate 100 "^w"}
|
||||||
|
^k word-delete ${lib.strings.replicate 100 "\\ed"}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
# My default pager
|
# My default pager
|
||||||
PAGER = "less";
|
PAGER = "less";
|
||||||
# Clear the screen on start and exit
|
# Set `LESS` in the environment so it overrides git's pager (and others)
|
||||||
LESS = "-R -+X -c";
|
LESS =
|
||||||
# Better XDG compliance
|
let
|
||||||
LESSHISTFILE = "${config.xdg.stateHome}/less/history";
|
options = {
|
||||||
|
# Always use the alternate screen (so that it is cleared on exit)
|
||||||
|
"+no-init" = true;
|
||||||
|
# Write text top-down, rather than from the bottom
|
||||||
|
clear-screen = true;
|
||||||
|
# Interpret (some) escape sequences
|
||||||
|
RAW-CONTROL-CHARS = true;
|
||||||
|
# Use colored text in search and UI
|
||||||
|
use-color = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
lib.concatStringsSep " " (lib.cli.toCommandLineGNU { } options);
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."lesskey".text = ''
|
|
||||||
# Quit without clearing the screen on `Q`
|
|
||||||
Q toggle-option -!^Predraw-on-quit\nq
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,22 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.home.terminal;
|
cfg = config.my.home.terminal.alacritty;
|
||||||
|
inherit (config.my.home.terminal) colors;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf (cfg.program == "alacritty") {
|
options.my.home.terminal = with lib; {
|
||||||
|
default = mkOption {
|
||||||
|
type = with types; nullOr (enum [ "alacritty" ]);
|
||||||
|
};
|
||||||
|
|
||||||
|
alacritty = {
|
||||||
|
enable = mkEnableOption "alacritty" // {
|
||||||
|
default = config.my.home.terminal.default == "alacritty";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
programs.alacritty = {
|
programs.alacritty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
@ -14,36 +27,36 @@ in
|
||||||
|
|
||||||
colors = {
|
colors = {
|
||||||
primary = {
|
primary = {
|
||||||
background = cfg.colors.background;
|
background = colors.background;
|
||||||
foreground = cfg.colors.foreground;
|
foreground = colors.foreground;
|
||||||
|
|
||||||
bright_foreground = cfg.colors.foregroundBold;
|
bright_foreground = colors.foregroundBold;
|
||||||
};
|
};
|
||||||
|
|
||||||
cursor = {
|
cursor = {
|
||||||
cursor = cfg.colors.cursor;
|
cursor = colors.cursor;
|
||||||
};
|
};
|
||||||
|
|
||||||
normal = {
|
normal = {
|
||||||
black = cfg.colors.black;
|
black = colors.black;
|
||||||
red = cfg.colors.red;
|
red = colors.red;
|
||||||
green = cfg.colors.green;
|
green = colors.green;
|
||||||
yellow = cfg.colors.yellow;
|
yellow = colors.yellow;
|
||||||
blue = cfg.colors.blue;
|
blue = colors.blue;
|
||||||
magenta = cfg.colors.magenta;
|
magenta = colors.magenta;
|
||||||
cyan = cfg.colors.cyan;
|
cyan = colors.cyan;
|
||||||
white = cfg.colors.white;
|
white = colors.white;
|
||||||
};
|
};
|
||||||
|
|
||||||
bright = {
|
bright = {
|
||||||
black = cfg.colors.blackBold;
|
black = colors.blackBold;
|
||||||
red = cfg.colors.redBold;
|
red = colors.redBold;
|
||||||
green = cfg.colors.greenBold;
|
green = colors.greenBold;
|
||||||
yellow = cfg.colors.yellowBold;
|
yellow = colors.yellowBold;
|
||||||
blue = cfg.colors.blueBold;
|
blue = colors.blueBold;
|
||||||
magenta = cfg.colors.magentaBold;
|
magenta = colors.magentaBold;
|
||||||
cyan = cfg.colors.cyanBold;
|
cyan = colors.cyanBold;
|
||||||
white = cfg.colors.whiteBold;
|
white = colors.whiteBold;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@ in
|
||||||
|
|
||||||
options.my.home = with lib; {
|
options.my.home = with lib; {
|
||||||
terminal = {
|
terminal = {
|
||||||
program = mkOption {
|
default = mkOption {
|
||||||
type = with types; nullOr (enum [ "alacritty" "termite" ]);
|
type = with types; nullOr (enum [ ]);
|
||||||
default = null;
|
default = null;
|
||||||
example = "termite";
|
example = "termite";
|
||||||
description = "Which terminal to use for home session";
|
description = "Which default terminal to use for home session";
|
||||||
};
|
};
|
||||||
|
|
||||||
colors = {
|
colors = {
|
||||||
|
|
@ -56,7 +56,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config.home.sessionVariables = lib.mkIf (cfg.program != null) {
|
config.home.sessionVariables = lib.mkIf (cfg.default != null) {
|
||||||
TERMINAL = cfg.program;
|
TERMINAL = cfg.default;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,22 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.home.terminal;
|
cfg = config.my.home.terminal.termite;
|
||||||
|
inherit (config.my.home.terminal) colors;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf (cfg.program == "termite") {
|
options.my.home.terminal = with lib; {
|
||||||
|
default = mkOption {
|
||||||
|
type = with types; nullOr (enum [ "termite" ]);
|
||||||
|
};
|
||||||
|
|
||||||
|
termite = {
|
||||||
|
enable = mkEnableOption "termite" // {
|
||||||
|
default = config.my.home.terminal.default == "termite";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
programs.termite = {
|
programs.termite = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
@ -24,11 +37,11 @@ in
|
||||||
|
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
backgroundColor = cfg.colors.background;
|
backgroundColor = colors.background;
|
||||||
cursorColor = cfg.colors.cursor;
|
cursorColor = colors.cursor;
|
||||||
foregroundColor = cfg.colors.foreground;
|
foregroundColor = colors.foreground;
|
||||||
foregroundBoldColor = cfg.colors.foregroundBold;
|
foregroundBoldColor = colors.foregroundBold;
|
||||||
colorsExtra = with cfg.colors; ''
|
colorsExtra = with colors; ''
|
||||||
# Normal colors
|
# Normal colors
|
||||||
color0 = ${black}
|
color0 = ${black}
|
||||||
color1 = ${red}
|
color1 = ${red}
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,9 @@ in
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
default = { ${config.my.home.terminal.program} = { }; };
|
default = { ${config.my.home.terminal.default} = { }; };
|
||||||
defaultText = literalExpression ''
|
defaultText = literalExpression ''
|
||||||
{ ''${config.my.home.terminal.program} = { }; };
|
{ ''${config.my.home.terminal.default} = { }; };
|
||||||
'';
|
'';
|
||||||
example = { xterm-256color = { }; };
|
example = { xterm-256color = { }; };
|
||||||
description = ''
|
description = ''
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ local function treesitter_try_attach(buf, language)
|
||||||
-- Syntax highlighting
|
-- Syntax highlighting
|
||||||
vim.treesitter.start(buf, language)
|
vim.treesitter.start(buf, language)
|
||||||
-- Indentation
|
-- Indentation
|
||||||
vim.bo.indentexpr = "v:lua.require('nvim-treesitter').indentexpr()"
|
vim.bo[buf].indentexpr = "v:lua.require('nvim-treesitter').indentexpr()"
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
mkRelatedOption = description: relatedWMs:
|
mkRelatedOption = description: relatedWMs:
|
||||||
let
|
let
|
||||||
|
|
@ -20,14 +20,14 @@ in
|
||||||
|
|
||||||
options.my.home.wm = with lib; {
|
options.my.home.wm = with lib; {
|
||||||
windowManager = mkOption {
|
windowManager = mkOption {
|
||||||
type = with types; nullOr (enum [ "i3" ]);
|
type = with types; nullOr (enum [ ]);
|
||||||
default = null;
|
default = null;
|
||||||
example = "i3";
|
example = "i3";
|
||||||
description = "Which window manager to use for home session";
|
description = "Which window manager to use for home session";
|
||||||
};
|
};
|
||||||
|
|
||||||
cursor = {
|
cursor = {
|
||||||
enable = mkRelatedOption "dunst configuration" [ "i3" ];
|
enable = mkRelatedOption "cursor configuration" [ "i3" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
dunst = {
|
dunst = {
|
||||||
|
|
@ -68,29 +68,14 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
screen-lock = {
|
screen-lock = {
|
||||||
enable = mkRelatedOption "automatic X screen locker" [ "i3" ];
|
enable = mkRelatedOption "automatic screen locker" [ "i3" ];
|
||||||
|
|
||||||
command = mkOption {
|
command = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "${lib.getExe pkgs.i3lock} -n -c 000000";
|
|
||||||
example = "\${lib.getExe pkgs.i3lock} -n -i lock.png";
|
example = "\${lib.getExe pkgs.i3lock} -n -i lock.png";
|
||||||
description = "Locker command to run";
|
description = "Locker command to run";
|
||||||
};
|
};
|
||||||
|
|
||||||
cornerLock = {
|
|
||||||
enable = my.mkDisableOption ''
|
|
||||||
Move mouse to upper-left corner to lock instantly, lower-right corner to
|
|
||||||
disable auto-lock.
|
|
||||||
'';
|
|
||||||
|
|
||||||
delay = mkOption {
|
|
||||||
type = types.int;
|
|
||||||
default = 5;
|
|
||||||
example = 15;
|
|
||||||
description = "How many seconds before locking this way";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
notify = {
|
notify = {
|
||||||
enable = my.mkDisableOption "Notify when about to lock the screen";
|
enable = my.mkDisableOption "Notify when about to lock the screen";
|
||||||
|
|
||||||
|
|
@ -100,17 +85,15 @@ in
|
||||||
example = 15;
|
example = 15;
|
||||||
description = ''
|
description = ''
|
||||||
How many seconds in advance should there be a notification.
|
How many seconds in advance should there be a notification.
|
||||||
This value must be at lesser than or equal to `cornerLock.delay`
|
|
||||||
when both options are enabled.
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
timeout = mkOption {
|
timeout = mkOption {
|
||||||
type = types.ints.between 1 60;
|
type = types.int;
|
||||||
default = 15;
|
default = 15;
|
||||||
example = 1;
|
example = 1;
|
||||||
description = "Inactive time interval to lock the screen automatically";
|
description = "Inactive time interval (in minutes) to lock the screen automatically";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ let
|
||||||
isEnabled = config.my.home.wm.windowManager == "i3";
|
isEnabled = config.my.home.wm.windowManager == "i3";
|
||||||
|
|
||||||
terminal =
|
terminal =
|
||||||
if config.my.home.terminal.program != null
|
if config.my.home.terminal.default != null
|
||||||
then config.my.home.terminal.program
|
then config.my.home.terminal.default
|
||||||
else "i3-sensible-terminal";
|
else "i3-sensible-terminal";
|
||||||
|
|
||||||
alt = "Mod1"; # `Alt` key
|
alt = "Mod1"; # `Alt` key
|
||||||
|
|
@ -47,15 +47,25 @@ let
|
||||||
if ${systemctlUser} is-active xautolock-session.service; then
|
if ${systemctlUser} is-active xautolock-session.service; then
|
||||||
${systemctlUser} stop --user xautolock-session.service
|
${systemctlUser} stop --user xautolock-session.service
|
||||||
xset s off
|
xset s off
|
||||||
|
xset s 0 0
|
||||||
|
xset -dpms
|
||||||
${notify} "Disabled Xautolock"
|
${notify} "Disabled Xautolock"
|
||||||
else
|
else
|
||||||
${systemctlUser} start xautolock-session.service
|
${systemctlUser} start xautolock-session.service
|
||||||
xset s on
|
xset s on
|
||||||
|
xset s 0 0
|
||||||
|
xset +dpms
|
||||||
${notify} "Enabled Xautolock"
|
${notify} "Enabled Xautolock"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
options.my.home.wm = with lib; {
|
||||||
|
windowManager = mkOption {
|
||||||
|
type = with types; nullOr (enum [ "i3" ]);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = lib.mkIf isEnabled {
|
config = lib.mkIf isEnabled {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
ambroisie.dragger # drag-and-drop from the CLI
|
ambroisie.dragger # drag-and-drop from the CLI
|
||||||
|
|
@ -65,6 +75,9 @@ in
|
||||||
xdotool # Used by 'rofi-rbw', in a mapping
|
xdotool # Used by 'rofi-rbw', in a mapping
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Set `i3lock` as the (default) lock command
|
||||||
|
my.home.wm.screen-lock.command = lib.mkDefault "${lib.getExe pkgs.i3lock} -n -c 000000";
|
||||||
|
|
||||||
xsession.windowManager.i3 = {
|
xsession.windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
@ -123,7 +136,7 @@ in
|
||||||
inherit modifier;
|
inherit modifier;
|
||||||
|
|
||||||
criteria = [
|
criteria = [
|
||||||
{ class = "^tridactyl_editor$"; }
|
{ title = "^tridactyl_editor$"; }
|
||||||
{ class = "^Blueman-.*$"; }
|
{ class = "^Blueman-.*$"; }
|
||||||
{ title = "^htop$"; }
|
{ title = "^htop$"; }
|
||||||
{ class = "^Thunderbird$"; instance = "Mailnews"; window_role = "filterlist"; }
|
{ class = "^Thunderbird$"; instance = "Mailnews"; window_role = "filterlist"; }
|
||||||
|
|
@ -387,5 +400,10 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Use a grey background
|
||||||
|
xsession.profileExtra = ''
|
||||||
|
${lib.getExe pkgs.xsetroot} -solid '#333333'
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ in
|
||||||
programs.rofi = {
|
programs.rofi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
terminal = config.my.home.terminal.program; # null by default
|
terminal = config.my.home.terminal.default; # null by default
|
||||||
|
|
||||||
package = pkgs.rofi.override {
|
package = pkgs.rofi.override {
|
||||||
plugins = with pkgs; [
|
plugins = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -2,32 +2,22 @@
|
||||||
let
|
let
|
||||||
cfg = config.my.home.wm.screen-lock;
|
cfg = config.my.home.wm.screen-lock;
|
||||||
|
|
||||||
notificationCmd =
|
lockNotifier = pkgs.writeShellApplication {
|
||||||
let
|
name = "lock-notifier";
|
||||||
duration = toString (cfg.notify.delay * 1000);
|
runtimeInputs = [
|
||||||
notifyCmd = "${lib.getExe pkgs.libnotify} -u critical -t ${duration}";
|
pkgs.libnotify
|
||||||
in
|
];
|
||||||
# Needs to be surrounded by quotes for systemd to launch it correctly
|
text = ''
|
||||||
''"${notifyCmd} -- 'Locking in ${toString cfg.notify.delay} seconds'"'';
|
duration=${toString cfg.notify.delay}
|
||||||
|
notify-send \
|
||||||
|
-u critical \
|
||||||
|
-t "$((duration * 1000))" -- \
|
||||||
|
"Locking in $duration seconds"
|
||||||
|
'';
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
assertions = [
|
|
||||||
{
|
|
||||||
assertion =
|
|
||||||
let
|
|
||||||
inherit (cfg) cornerLock notify;
|
|
||||||
bothEnabled = cornerLock.enable && notify.enable;
|
|
||||||
cornerLockHigherThanNotify = cornerLock.delay >= notify.delay;
|
|
||||||
in
|
|
||||||
bothEnabled -> cornerLockHigherThanNotify;
|
|
||||||
message = ''
|
|
||||||
`config.my.home.wm.notify.delay` cannot have a value higher than
|
|
||||||
`config.my.home.wm.cornerLock.delay`.
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
services.screen-locker = {
|
services.screen-locker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
@ -36,19 +26,11 @@ in
|
||||||
lockCmd = cfg.command;
|
lockCmd = cfg.command;
|
||||||
|
|
||||||
xautolock = {
|
xautolock = {
|
||||||
extraOptions = lib.optionals cfg.cornerLock.enable [
|
extraOptions = lib.optionals cfg.notify.enable [
|
||||||
# Mouse corners: instant lock on upper-left, never lock on lower-right
|
|
||||||
"-cornerdelay"
|
|
||||||
"${toString cfg.cornerLock.delay}"
|
|
||||||
"-cornerredelay"
|
|
||||||
"${toString cfg.cornerLock.delay}"
|
|
||||||
"-corners"
|
|
||||||
"+00-"
|
|
||||||
] ++ lib.optionals cfg.notify.enable [
|
|
||||||
"-notify"
|
"-notify"
|
||||||
"${toString cfg.notify.delay}"
|
"${toString cfg.notify.delay}"
|
||||||
"-notifier"
|
"-notifier"
|
||||||
notificationCmd
|
(lib.getExe lockNotifier)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.profiles.x;
|
cfg = config.my.profiles.x;
|
||||||
in
|
in
|
||||||
|
|
@ -10,12 +10,6 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
# Nice wallpaper
|
|
||||||
services.xserver.displayManager.lightdm.background =
|
|
||||||
let
|
|
||||||
wallpapers = "${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers";
|
|
||||||
in
|
|
||||||
"${wallpapers}/summer_1am/contents/images/2560x1600.jpg";
|
|
||||||
|
|
||||||
# X configuration
|
# X configuration
|
||||||
my.home.x.enable = true;
|
my.home.x.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Extra wireguard keys that are not hosts NixOS hosts
|
# Extra wireguard keys that are not hosts NixOS hosts
|
||||||
let
|
let
|
||||||
keys = import ../../../../keys;
|
keys = import ../../../../../keys;
|
||||||
|
|
||||||
all = [
|
all = [
|
||||||
keys.users.ambroisie
|
keys.users.ambroisie
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue