Completely reformat to satisfy nixfmt

This commit is contained in:
Greg Hellings
2024-10-19 01:20:46 -05:00
parent 7abb613f20
commit a71eb7485a
56 changed files with 1749 additions and 1393 deletions
+7 -9
View File
@@ -1,8 +1,9 @@
{ pkgs
, lib
, host ? "most"
, nixvim
, ...
{
pkgs,
lib,
host ? "most",
nixvim,
...
}:
{
@@ -12,15 +13,12 @@
./modules
] ++ lib.optionals (builtins.pathExists ./hosts/${host}) [ ./hosts/${host} ];
programs.tmux = {
enable = true;
keyMode = "vi";
terminal = "xterm-256color";
customPaneNavigationAndResize = true;
extraConfig = (lib.strings.concatStringsSep "\n" [
"bind P paste-buffer"
]);
extraConfig = (lib.strings.concatStringsSep "\n" [ "bind P paste-buffer" ]);
};
home.stateVersion = "23.05";
+2 -1
View File
@@ -1,3 +1,4 @@
{ ... }:
{ }
{
}
+1 -3
View File
@@ -3,7 +3,5 @@
{
greg.vscodium.enable = true;
home.packages = with pkgs; [
brew
];
home.packages = with pkgs; [ brew ];
}
+11 -6
View File
@@ -15,16 +15,18 @@
matchBlocks =
let
nas = { user = "admin"; };
owned = { user = "greg"; };
nas = {
user = "admin";
};
owned = {
user = "greg";
};
in
{
inherit nas;
"*" = {
dynamicForwards = [{
port = 10240;
}];
dynamicForwards = [ { port = 10240; } ];
};
"10.42.1.4" = lib.hm.dag.entryBefore [ "10.42.*" ] nas;
@@ -33,7 +35,10 @@
chronicles = nas;
"chronicles.thehellings.lan" = lib.hm.dag.entryBefore [ "*.thehellings.lan" ] nas;
gh = { user = "git"; hostname = "github.com"; };
gh = {
user = "git";
hostname = "github.com";
};
"src" = {
user = "gitlab";
hostname = "git.thehellings.lan";
+9 -2
View File
@@ -1,9 +1,16 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
{
# The Hack font is used in the Fugitive sidebars
fonts.fontconfig.enable = true;
home.packages = [ (pkgs.nerdfonts.override { fonts = [ "Hack" ]; }) ];
programs.nixvim = (import ./vim/config.nix { inherit config pkgs lib; }) // { enable = true; };
programs.nixvim = (import ./vim/config.nix { inherit config pkgs lib; }) // {
enable = true;
};
}
+6 -4
View File
@@ -67,9 +67,11 @@
};
configHeader = builtins.readFile ./xonsh_header.xsh;
configFooter = (builtins.readFile ./xonsh_footer.xsh) + (builtins.concatStringsSep "\n" [
"with open('${pkgs.stdenv.cc}/nix-support/dynamic-linker', 'r') as fp:"
" $NIX_LD = fp.read().strip()"
]);
configFooter =
(builtins.readFile ./xonsh_footer.xsh)
+ (builtins.concatStringsSep "\n" [
"with open('${pkgs.stdenv.cc}/nix-support/dynamic-linker', 'r') as fp:"
" $NIX_LD = fp.read().strip()"
]);
};
}
+9 -5
View File
@@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
packages = with pkgs; [
bruno # but let's not talk about it
@@ -16,10 +21,9 @@ let
zed-editor
];
in
with lib; {
with lib;
{
options.greg.development = mkEnableOption "Setup necessary development packages";
config = mkIf config.greg.development {
home.packages = packages;
};
config = mkIf config.greg.development { home.packages = packages; };
}
+122 -109
View File
@@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
cfg = config.greg.gnome;
@@ -6,115 +11,123 @@ in
{
options.greg.gnome = lib.mkEnableOption "Enable Gnome support and settings";
config = (lib.mkIf cfg {
programs.gnome-terminal = lib.mkIf (pkgs.system != "x86_64-darwin") {
enable = true;
showMenubar = true;
themeVariant = "dark";
profile."95f3c68e-82f3-4f44-ac85-6e075fed80b0" = {
default = true;
customCommand = "xonsh -st best";
loginShell = true;
scrollbackLines = 65535;
transparencyPercent = 50;
visibleName = "greg";
config = (
lib.mkIf cfg {
programs.gnome-terminal = lib.mkIf (pkgs.system != "x86_64-darwin") {
enable = true;
showMenubar = true;
themeVariant = "dark";
profile."95f3c68e-82f3-4f44-ac85-6e075fed80b0" = {
default = true;
customCommand = "xonsh -st best";
loginShell = true;
scrollbackLines = 65535;
transparencyPercent = 50;
visibleName = "greg";
};
};
};
dconf.settings = {
"org/gnome/Disks" = {
image-dir-uri = "file:///home/greg/Downloads";
dconf.settings = {
"org/gnome/Disks" = {
image-dir-uri = "file:///home/greg/Downloads";
};
"org/gnome/desktop/interface" = {
clock-show-weekday = true;
color-scheme = "default";
cursor-size = 24;
toolbar-style = "text";
};
"org/gnome/desktop/screensaver" = {
lock-delay = "uint32 0";
lock-enabled = false;
};
"org/gnome/desktop/wm/keybindings" = {
switch-applications = [ ];
switch-applications-backward = [ ];
switch-windows = [ "<Alt>Tab" ];
switch-windows-backward = [ "<Shift><Alt>Tab" ];
};
"org/gnome/desktop/wm/preferences" = {
button-layout = "icon:minimize,maximize,close";
};
"org/gnome/file-roller/listing" = {
list-mode = "as-folder";
name-coloumn-width = 302;
show-path = true;
sort-method = "name";
sort-type = "ascending";
};
"org/gnome/nautilus/preferences" = {
default-folder-viewer = "icon-view";
search-filter-time-type = "last_modified";
search-view = "list-view";
};
"org/gnome/shell" = {
enabled-extensions = [
"appindicatorsupport@rgcjonas.gmail.com"
"Vitals@CoreCoding.com"
"window-list@gnome-shell-extensions.gcampax.github.com"
"gsconnect@andyholmes.github.io"
];
favorite-apps = [
"org.gnome.Calendar.desktop"
"org.gnome.Nautilus.desktop"
"org.gnome.Terminal.desktop"
"firefox.desktop"
"vlc.desktop"
];
remember-mount-password = true;
};
"org/gnome/shell/extensions/vitals" = {
hot-sensors = [
"_memory_usage_"
"_system_load_1m_"
"__network-rx_max__"
"_temperature_k10temp_tccd1_"
"_temperature_k10temp_tctl_"
];
};
"org/gnome/shell/overrides" = {
attach-modal-dialogs = true;
dynamic-workspaces = true;
edge-tiling = true;
focus-change-on-pointer-rest = true;
workspaces-only-on-primary = true;
};
"org/gnome/shell/weather" = {
automation-location = true;
locations = "[<(uint32 2, <('Midlothian / Waxahachie, Mid-Way Regional Airport', 'KJWY', false, [(0.5664611473274288, -1.691437359323684)], @a(dd) [])>)>]";
};
"org/gnome/shell/window-switcher" = {
app-icon-mode = "both";
current-workspace-only = true;
};
"org/gtk/settings/file-chooser" = {
location-mode = "path-bar";
show-hidden = false;
show-size-column = true;
sort-column = "modified";
sort-directories-first = false;
sort-order = "descending";
};
"org/virt-manager/virt-manager/confirm" = {
delete-storage = true;
forcepoweroff = false;
};
"org/virt-manager/virt-manager/details" = {
show-toolbar = true;
};
"org/virt-manager/virt-manager/connections" = {
autoconnect = [
"qemu:///session"
"qemu:///system"
];
uris = [
"qemu:///session"
"qemu:///system"
];
};
};
"org/gnome/desktop/interface" = {
clock-show-weekday = true;
color-scheme = "default";
cursor-size = 24;
toolbar-style = "text";
};
"org/gnome/desktop/screensaver" = {
lock-delay = "uint32 0";
lock-enabled = false;
};
"org/gnome/desktop/wm/keybindings" = {
switch-applications = [ ];
switch-applications-backward = [ ];
switch-windows = [ "<Alt>Tab" ];
switch-windows-backward = [ "<Shift><Alt>Tab" ];
};
"org/gnome/desktop/wm/preferences" = {
button-layout = "icon:minimize,maximize,close";
};
"org/gnome/file-roller/listing" = {
list-mode = "as-folder";
name-coloumn-width = 302;
show-path = true;
sort-method = "name";
sort-type = "ascending";
};
"org/gnome/nautilus/preferences" = {
default-folder-viewer = "icon-view";
search-filter-time-type = "last_modified";
search-view = "list-view";
};
"org/gnome/shell" = {
enabled-extensions = [
"appindicatorsupport@rgcjonas.gmail.com"
"Vitals@CoreCoding.com"
"window-list@gnome-shell-extensions.gcampax.github.com"
"gsconnect@andyholmes.github.io"
];
favorite-apps = [
"org.gnome.Calendar.desktop"
"org.gnome.Nautilus.desktop"
"org.gnome.Terminal.desktop"
"firefox.desktop"
"vlc.desktop"
];
remember-mount-password = true;
};
"org/gnome/shell/extensions/vitals" = {
hot-sensors = [
"_memory_usage_"
"_system_load_1m_"
"__network-rx_max__"
"_temperature_k10temp_tccd1_"
"_temperature_k10temp_tctl_"
];
};
"org/gnome/shell/overrides" = {
attach-modal-dialogs = true;
dynamic-workspaces = true;
edge-tiling = true;
focus-change-on-pointer-rest = true;
workspaces-only-on-primary = true;
};
"org/gnome/shell/weather" = {
automation-location = true;
locations = "[<(uint32 2, <('Midlothian / Waxahachie, Mid-Way Regional Airport', 'KJWY', false, [(0.5664611473274288, -1.691437359323684)], @a(dd) [])>)>]";
};
"org/gnome/shell/window-switcher" = {
app-icon-mode = "both";
current-workspace-only = true;
};
"org/gtk/settings/file-chooser" = {
location-mode = "path-bar";
show-hidden = false;
show-size-column = true;
sort-column = "modified";
sort-directories-first = false;
sort-order = "descending";
};
"org/virt-manager/virt-manager/confirm" = {
delete-storage = true;
forcepoweroff = false;
};
"org/virt-manager/virt-manager/details" = {
show-toolbar = true;
};
"org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///session" "qemu:///system" ];
uris = [ "qemu:///session" "qemu:///system" ];
};
};
});
}
);
}
+6 -1
View File
@@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
{
options.greg.pypackage = lib.mkOption {
description = "Enable Gnome support and settings";
+91 -82
View File
@@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
cfg = config.greg.sway;
@@ -9,98 +14,102 @@ let
term = "${pkgs.alacritty}/bin/alacritty";
msg = "${pkgs.sway}/bin/swaymsg";
sleep = "${pkgs.coreutils}/bin/sleep";
workstation1 = pkgs.writeScriptBin "workstation1" (builtins.concatStringsSep "\n" [
"${msg} \"workspace 1 ; exec ${pkgs.firefox}/bin/firefox ; split horizontal ; exec ${pkgs.element-desktop}/bin/element-desktop \""
"${sleep} 1"
"${msg} '[app_id=\"firefox\"]' move left"
"${msg} '[instance=\"element\"]' \"layout tabbed ; exec ${term} \""
"${msg} '[app_id=\"firefox\"]' move left"
"${sleep} 0.3"
"${msg} '[app_id=\"Alacritty\" workspace=\"1\"]' move right"
"${msg} '[app_id=\"firefox\"]' resize grow width 300 px"
]);
workstation2 = pkgs.writeScriptBin "workstation2" (builtins.concatStringsSep "\n" [
"${sleep} 5"
"${msg} \"workspace 2 ; exec ${term} ; layout tabbed\""
]);
workstation1 = pkgs.writeScriptBin "workstation1" (
builtins.concatStringsSep "\n" [
"${msg} \"workspace 1 ; exec ${pkgs.firefox}/bin/firefox ; split horizontal ; exec ${pkgs.element-desktop}/bin/element-desktop \""
"${sleep} 1"
"${msg} '[app_id=\"firefox\"]' move left"
"${msg} '[instance=\"element\"]' \"layout tabbed ; exec ${term} \""
"${msg} '[app_id=\"firefox\"]' move left"
"${sleep} 0.3"
"${msg} '[app_id=\"Alacritty\" workspace=\"1\"]' move right"
"${msg} '[app_id=\"firefox\"]' resize grow width 300 px"
]
);
workstation2 = pkgs.writeScriptBin "workstation2" (
builtins.concatStringsSep "\n" [
"${sleep} 5"
"${msg} \"workspace 2 ; exec ${term} ; layout tabbed\""
]
);
in
{
options.greg.sway = lib.mkEnableOption "Enable Sway support and settings";
config = (lib.mkIf cfg {
programs.swaylock.enable = true;
config = (
lib.mkIf cfg {
programs.swaylock.enable = true;
wayland.windowManager.sway =
let
mod = config.wayland.windowManager.sway.config.modifier;
in
{
enable = true;
config = rec {
#fonts.size = 10.0;
keybindings = lib.mkOptionDefault {
"Mod4+l" = "exec ${pkgs.swaylock}/bin/swaylock -c 000000";
"Mod4+h" = "exec ${pkgs.qpwgraph}/bin/qpwgraph -x /home/greg/sound/headphones.qpwgraph -m";
"Mod4+m" = "exec ${pkgs.qpwgraph}/bin/qpwgraph -x /home/greg/sound/monitor.qpwgraph -m";
"Mod4+b" = "exec ${pkgs.qpwgraph}/bin/qpwgraph -x /home/greg/sound/both.qpwgraph -m";
wayland.windowManager.sway =
let
mod = config.wayland.windowManager.sway.config.modifier;
in
{
enable = true;
config = rec {
#fonts.size = 10.0;
keybindings = lib.mkOptionDefault {
"Mod4+l" = "exec ${pkgs.swaylock}/bin/swaylock -c 000000";
"Mod4+h" = "exec ${pkgs.qpwgraph}/bin/qpwgraph -x /home/greg/sound/headphones.qpwgraph -m";
"Mod4+m" = "exec ${pkgs.qpwgraph}/bin/qpwgraph -x /home/greg/sound/monitor.qpwgraph -m";
"Mod4+b" = "exec ${pkgs.qpwgraph}/bin/qpwgraph -x /home/greg/sound/both.qpwgraph -m";
"${mod}+Shift+Return" = file_browser.path;
};
modifier = "Mod1";
output = {
"Samsung Electric Company S24E650 H4ZN600985" = {
mode = "1920x1200";
transform = "90";
pos = "0 0";
"${mod}+Shift+Return" = file_browser.path;
};
"ViewSonic Corporation VA2252 Series VMT201800925" = {
mode = "1920x1080";
pos = "200 1920";
modifier = "Mod1";
output = {
"Samsung Electric Company S24E650 H4ZN600985" = {
mode = "1920x1200";
transform = "90";
pos = "0 0";
};
"ViewSonic Corporation VA2252 Series VMT201800925" = {
mode = "1920x1080";
pos = "200 1920";
};
};
terminal = term;
startup = [
{ command = "${workstation1}/bin/workstation1"; }
{ command = "${workstation2}/bin/workstation2"; }
];
};
extraOptions = [ "--unsupported-gpu" ];
extraSessionCommands = ''
export WLR_NO_HARDWARE_CURSORS=1
'';
systemd.enable = true;
wrapperFeatures = {
base = true;
gtk = true;
};
terminal = term;
startup = [
{ command = "${workstation1}/bin/workstation1"; }
{ command = "${workstation2}/bin/workstation2"; }
];
};
extraOptions = [
"--unsupported-gpu"
];
extraSessionCommands = ''
export WLR_NO_HARDWARE_CURSORS=1
'';
systemd.enable = true;
wrapperFeatures = {
base = true;
gtk = true;
home.pointerCursor = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
size = 12;
x11 = {
enable = true;
defaultCursor = "Adwaita";
};
};
home.pointerCursor = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
size = 12;
x11 = {
enable = true;
defaultCursor = "Adwaita";
};
};
home.packages = with pkgs; [
arj
dpkg
kate
kget
krename
file_browser.pkg
p7zip
plocate
rpm
qpwgraph
xorg.xev
xorg.xmodmap
xxdiff
];
});
home.packages = with pkgs; [
arj
dpkg
kate
kget
krename
file_browser.pkg
p7zip
plocate
rpm
qpwgraph
xorg.xev
xorg.xmodmap
xxdiff
];
}
);
}
+36 -36
View File
@@ -4,7 +4,8 @@ let
cfg = config.programs.xonsh;
in
with lib; {
with lib;
{
options = {
programs.xonsh = {
enable = mkEnableOption "Enable the xonsh program";
@@ -12,34 +13,36 @@ with lib; {
sessionVariables = mkOption {
type = types.attrs;
default = { };
example = { XONSH_TRACE_SUBPROC = true; };
example = {
XONSH_TRACE_SUBPROC = true;
};
description = ''
Environment variables that will be set for the Xonsh session.
'';
Environment variables that will be set for the Xonsh session.
'';
};
aliases = mkOption {
type = types.attrsOf types.str;
default = { };
example = literalExpression ''
{
ll = "ls -l";
la = "ls -a";
}
'';
{
ll = "ls -l";
la = "ls -a";
}
'';
description = ''
An attribute set that maps aliases (the top level attribute names in
this option) to command strings or directly to build outputs.
'';
An attribute set that maps aliases (the top level attribute names in
this option) to command strings or directly to build outputs.
'';
};
configHeader = mkOption {
type = types.lines;
default = "";
example = literalExpression ''
import os
import sys
'';
import os
import sys
'';
description = "An arbitrary string to put at the top of the config file";
};
@@ -47,11 +50,11 @@ with lib; {
type = types.lines;
default = "";
example = literalExpression ''
def _some_method(args):
do_command()
some_other_thing()
aliases['some_method'] = _some_method
'';
def _some_method(args):
do_command()
some_other_thing()
aliases['some_method'] = _some_method
'';
description = "An arbitrary string to put at the end of the config file";
};
};
@@ -59,29 +62,26 @@ with lib; {
config =
let
shortAliases = concatStringsSep "\n" (
mapAttrsToList (k: v: "aliases['${k}']=r'${v}'") cfg.aliases
);
shortAliases = concatStringsSep "\n" (mapAttrsToList (k: v: "aliases['${k}']=r'${v}'") cfg.aliases);
listToPythonList =
let
listInternals = args:
concatStringsSep "\n" (map (v: "'${v}'") args);
listInternals = args: concatStringsSep "\n" (map (v: "'${v}'") args);
in
list: "[${listInternals list}]";
sessionVars = concatStringsSep "\n" (
mapAttrsToList
(k: v:
if builtins.typeOf v == "string" then
"\$${k} = '${v}'"
else if builtins.typeOf v == "list" then
"\$${k} = ${listToPythonList}"
else if builtins.typeOf v == "int" then
"\$${k} = ${toString v}"
else ""
)
cfg.sessionVariables
mapAttrsToList (
k: v:
if builtins.typeOf v == "string" then
"\$${k} = '${v}'"
else if builtins.typeOf v == "list" then
"\$${k} = ${listToPythonList}"
else if builtins.typeOf v == "int" then
"\$${k} = ${toString v}"
else
""
) cfg.sessionVariables
);
in