Did A BUNCH of semantic refactoring.
Added i3blocks config; not active.
This commit is contained in:
parent
dd1bd44945
commit
a5349ca647
|
|
@ -1,24 +1,35 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
rec {
|
||||||
scripts = ../../scripts;
|
|
||||||
extra = ../../extra;
|
|
||||||
terminal = pkgs.alacritty;
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
|
../../snippets/defaults.nix
|
||||||
../../snippets/gammastep.nix
|
../../snippets/gammastep.nix
|
||||||
../../snippets/kdeconnect.nix
|
../../snippets/kdeconnect.nix
|
||||||
../../snippets/ssh.nix
|
../../snippets/ssh.nix
|
||||||
../../snippets/zsh.nix
|
../../snippets/zsh.nix
|
||||||
../../snippets/taskwarrior.nix
|
../../snippets/taskwarrior.nix
|
||||||
|
../../snippets/kakoune.nix
|
||||||
../../snippets/clifm.nix
|
../../snippets/clifm.nix
|
||||||
../../snippets/git.nix
|
../../snippets/git.nix
|
||||||
|
../../snippets/sway.nix
|
||||||
|
../../snippets/waybar.nix
|
||||||
|
# ../../snippets/i3blocks.nix
|
||||||
|
../../snippets/firefox.nix
|
||||||
|
../../snippets/thunderbird.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.username = "alice";
|
home.username = "alice";
|
||||||
home.homeDirectory = "/home/alice";
|
home.homeDirectory = "/home/alice";
|
||||||
|
|
||||||
home.stateVersion = "23.11";
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
|
# Configure default applications
|
||||||
|
defaultPrograms = with pkgs; {
|
||||||
|
terminal = alacritty;
|
||||||
|
editor = kakoune;
|
||||||
|
browser = firefox;
|
||||||
|
mail = thunderbird;
|
||||||
|
};
|
||||||
|
|
||||||
# Configure cursor
|
# Configure cursor
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
package = pkgs.vanilla-dmz;
|
package = pkgs.vanilla-dmz;
|
||||||
|
|
@ -78,7 +89,7 @@ in {
|
||||||
] ++ # Basic utilities
|
] ++ # Basic utilities
|
||||||
[ bitwarden-cli htop snore hledger hledger-ui ]
|
[ bitwarden-cli htop snore hledger hledger-ui ]
|
||||||
++ # Personalized selection of command-line (CLI/TUI) apps
|
++ # Personalized selection of command-line (CLI/TUI) apps
|
||||||
[ terminal ] ++ # Terminal emulator
|
[ defaultPrograms.terminal ] ++ # Terminal emulator
|
||||||
[
|
[
|
||||||
evince
|
evince
|
||||||
imv
|
imv
|
||||||
|
|
@ -139,13 +150,6 @@ in {
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
|
|
||||||
wayland.windowManager.sway = import ../../snippets/sway.nix {
|
|
||||||
inherit scripts extra config lib pkgs terminal;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.waybar =
|
|
||||||
import ../../snippets/waybar.nix { inherit scripts config lib pkgs terminal; };
|
|
||||||
|
|
||||||
programs.swaylock = {
|
programs.swaylock = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = { font-size = 14; };
|
settings = { font-size = 14; };
|
||||||
|
|
@ -167,14 +171,11 @@ in {
|
||||||
# configure fonts correctly
|
# configure fonts correctly
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
xdg.configFile."fontconfig/conf.d/20-default.fonts.conf".source =
|
xdg.configFile."fontconfig/conf.d/20-default.fonts.conf".source =
|
||||||
"${extra}/20-default-fonts.conf";
|
../../extra/20-default-fonts.conf;
|
||||||
|
|
||||||
# terminal emulator
|
# terminal emulator
|
||||||
programs.alacritty.enable = true;
|
programs.alacritty.enable = true;
|
||||||
|
|
||||||
programs.kakoune = import ../../snippets/kakoune.nix pkgs;
|
|
||||||
xdg.configFile."kak-lsp/kak-lsp.toml".source =
|
|
||||||
../../snippets/kakoune/kak-lsp.toml;
|
|
||||||
xdg.desktopEntries.kakoune = {
|
xdg.desktopEntries.kakoune = {
|
||||||
name = "Kakoune";
|
name = "Kakoune";
|
||||||
genericName = "Text Editor";
|
genericName = "Text Editor";
|
||||||
|
|
@ -229,8 +230,4 @@ in {
|
||||||
"-d 3"
|
"-d 3"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.firefox = import ../../snippets/firefox.nix { inherit pkgs; };
|
|
||||||
|
|
||||||
programs.thunderbird = import ../../snippets/thunderbird.nix;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
31
snippets/defaults.nix
Normal file
31
snippets/defaults.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ lib, pkgs, ... } :
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
options.defaultPrograms = {
|
||||||
|
terminal = mkOption {
|
||||||
|
type = types.nullOr types.package;
|
||||||
|
default = null;
|
||||||
|
description = "Terminal emulator";
|
||||||
|
example = pkgs.alacritty;
|
||||||
|
};
|
||||||
|
editor = mkOption {
|
||||||
|
type = types.nullOr types.package;
|
||||||
|
default = null;
|
||||||
|
description = "Text editor";
|
||||||
|
example = pkgs.kakoune;
|
||||||
|
};
|
||||||
|
browser = mkOption {
|
||||||
|
type = types.nullOr types.package;
|
||||||
|
default = null;
|
||||||
|
description = "Web browser";
|
||||||
|
example = pkgs.firefox;
|
||||||
|
};
|
||||||
|
mail = mkOption {
|
||||||
|
type = types.nullOr types.package;
|
||||||
|
default = null;
|
||||||
|
description = "Email client";
|
||||||
|
example = pkgs.thunderbird;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{ pkgs }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles = {
|
profiles = {
|
||||||
default = {
|
default = {
|
||||||
|
|
@ -94,4 +96,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
45
snippets/i3blocks.nix
Normal file
45
snippets/i3blocks.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
|
rec {
|
||||||
|
programs.i3blocks = {
|
||||||
|
enable = true;
|
||||||
|
bars = {
|
||||||
|
top = {
|
||||||
|
# The title block
|
||||||
|
title = {
|
||||||
|
interval = "persist";
|
||||||
|
command = "ls";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
bottom = {
|
||||||
|
time = {
|
||||||
|
command = "date +%r";
|
||||||
|
interval = 1;
|
||||||
|
};
|
||||||
|
# Make sure this block comes after the time block
|
||||||
|
date = lib.hm.dag.entryAfter [ "time" ] {
|
||||||
|
command = "date +%d";
|
||||||
|
interval = 5;
|
||||||
|
};
|
||||||
|
# And this block after the example block
|
||||||
|
example = lib.hm.dag.entryAfter [ "date" ] {
|
||||||
|
command = "echo hi $(date +%s)";
|
||||||
|
interval = 3;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
wayland.windowManager.sway.config.bars = [
|
||||||
|
{
|
||||||
|
statusCommand = "${pkgs.lib.getExe config.programs.i3blocks.package}"; # -c ${config.xdg.}";
|
||||||
|
position = "top";
|
||||||
|
fonts = config.wayland.windowManager.sway.config.fonts;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
statusCommand = "${pkgs.lib.getExe config.programs.i3blocks.package} -c bottom";
|
||||||
|
position = "bottom";
|
||||||
|
fonts = config.wayland.windowManager.sway.config.fonts;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.kakoune = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
plugins = with pkgs.kakounePlugins;
|
plugins = with pkgs.kakounePlugins;
|
||||||
|
|
@ -92,4 +94,36 @@
|
||||||
eval %sh{kak-lsp --kakoune -s $kak_session}
|
eval %sh{kak-lsp --kakoune -s $kak_session}
|
||||||
lsp-enable
|
lsp-enable
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."kak-lsp/kak-lsp.toml".source =
|
||||||
|
./kakoune/kak-lsp.toml;
|
||||||
|
|
||||||
|
xdg.desktopEntries.kakoune = {
|
||||||
|
name = "Kakoune";
|
||||||
|
genericName = "Text Editor";
|
||||||
|
comment = "Edit text files";
|
||||||
|
icon = "kak";
|
||||||
|
exec = "kak %F";
|
||||||
|
terminal = true;
|
||||||
|
mimeType = [
|
||||||
|
"text/english"
|
||||||
|
"text/plain"
|
||||||
|
"text/x-makefile"
|
||||||
|
"text/x-c++hdr"
|
||||||
|
"text/x-c++src"
|
||||||
|
"text/x-chdr"
|
||||||
|
"text/x-csrc"
|
||||||
|
"text/x-java"
|
||||||
|
"text/x-moc"
|
||||||
|
"text/x-pascal"
|
||||||
|
"text/x-tcl"
|
||||||
|
"text/x-tex"
|
||||||
|
"application/x-shellscript"
|
||||||
|
"text/x-c"
|
||||||
|
"text/x-c++"
|
||||||
|
"text/x-devicetree-source"
|
||||||
|
];
|
||||||
|
categories = [ "Utility" "TextEditor" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,23 @@
|
||||||
{ scripts, extra, config, lib, pkgs, terminal, ... }@inputs:
|
{ lib, pkgs, ... }@inputs:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
extra = ../extra;
|
||||||
|
scripts = ../scripts;
|
||||||
dynscreenshot = pkgs.writeShellScript "dynscreenshot"
|
dynscreenshot = pkgs.writeShellScript "dynscreenshot"
|
||||||
(builtins.readFile "${scripts}/dynscreenshot.sh");
|
(builtins.readFile "${scripts}/dynscreenshot.sh");
|
||||||
changebrightness = pkgs.writeShellScript "changebrightness"
|
changebrightness = pkgs.writeShellScript "changebrightness"
|
||||||
(builtins.readFile "${scripts}/changebrightness.sh");
|
(builtins.readFile "${scripts}/changebrightness.sh");
|
||||||
mod = config.wayland.windowManager.sway.config.modifier;
|
mod = "Mod4";
|
||||||
dmenuCommand = builtins.readFile "${scripts}/dmenu.sh";
|
dmenuCommand = builtins.readFile "${scripts}/dmenu.sh";
|
||||||
shutdownMenu = pkgs.writeShellScript "shutdownmenu"
|
shutdownMenu = pkgs.writeShellScript "shutdownmenu"
|
||||||
(builtins.readFile "${scripts}/shutdownmenu.sh");
|
(builtins.readFile "${scripts}/shutdownmenu.sh");
|
||||||
backgroundImage = "${extra}/kuwaitboat.jpg";
|
backgroundImage = "${extra}/kuwaitboat.jpg";
|
||||||
in {
|
in {
|
||||||
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = rec {
|
config = rec {
|
||||||
terminal = "${pkgs.lib.getExe inputs.terminal}";
|
terminal = "${pkgs.lib.getExe inputs.config.defaultPrograms.terminal}";
|
||||||
modifier = "Mod4";
|
modifier = mod;
|
||||||
fonts = {
|
fonts = {
|
||||||
names = [ "Red Hat Display" ];
|
names = [ "Red Hat Display" ];
|
||||||
style = "Regular";
|
style = "Regular";
|
||||||
|
|
@ -32,12 +35,6 @@ in {
|
||||||
xkb_variant = ",eng";
|
xkb_variant = ",eng";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
bars = let config = config;
|
|
||||||
in [{
|
|
||||||
command = "${pkgs.lib.getExe pkgs.waybar}";
|
|
||||||
position = "top";
|
|
||||||
inherit fonts;
|
|
||||||
}];
|
|
||||||
window = {
|
window = {
|
||||||
border = 2;
|
border = 2;
|
||||||
titlebar = true;
|
titlebar = true;
|
||||||
|
|
@ -75,7 +72,7 @@ in {
|
||||||
"${mod}+Shift+l" = "exec swaylock -f";
|
"${mod}+Shift+l" = "exec swaylock -f";
|
||||||
} // { });
|
} // { });
|
||||||
menu = "j4-dmenu-desktop --no-generic --term=${
|
menu = "j4-dmenu-desktop --no-generic --term=${
|
||||||
pkgs.lib.getExe inputs.terminal
|
terminal
|
||||||
} --dmenu='${dmenuCommand}'";
|
} --dmenu='${dmenuCommand}'";
|
||||||
focus.followMouse = false;
|
focus.followMouse = false;
|
||||||
};
|
};
|
||||||
|
|
@ -112,4 +109,5 @@ in {
|
||||||
bindswitch --reload --locked lid:off output $laptop enable
|
bindswitch --reload --locked lid:off output $laptop enable
|
||||||
'' + # Clamshell mode
|
'' + # Clamshell mode
|
||||||
"";
|
"";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{ ... }: {
|
||||||
|
programs.thunderbird = {
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles = { main = { isDefault = true; }; };
|
profiles = { main = { isDefault = true; }; };
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
{ scripts, config, lib, pkgs, terminal, ... }:
|
{ pkgs, config, ... }:
|
||||||
|
|
||||||
let terminalExec = "${pkgs.lib.getExe terminal} -e";
|
let terminalExec = "${pkgs.lib.getExe config.defaultPrograms.terminal} -e";
|
||||||
in {
|
in
|
||||||
|
rec {
|
||||||
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = [{
|
settings = [{
|
||||||
modules-left = [ "sway/workspaces" ];
|
modules-left = [ "sway/workspaces" ];
|
||||||
|
|
@ -139,4 +141,11 @@ in {
|
||||||
min-width: 30px;
|
min-width: 30px;
|
||||||
}
|
}
|
||||||
'' + "";
|
'' + "";
|
||||||
|
};
|
||||||
|
|
||||||
|
wayland.windowManager.sway.config.bars = [{
|
||||||
|
command = "${pkgs.lib.getExe config.programs.waybar.package}";
|
||||||
|
position = "top";
|
||||||
|
fonts = config.wayland.windowManager.sway.config.fonts;
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue