format using nixpkgs-fmt
This commit is contained in:
parent
219fe2c565
commit
273cd93ea3
|
@ -99,7 +99,8 @@
|
|||
] ++ lib.optional (desktop == "sway") ./system/sway.nix
|
||||
++ lib.optional (desktop == "gnome") ./system/gnome.nix
|
||||
++ lib.optional (desktop == "kde") ./system/kde.nix;
|
||||
in {
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
i15 = lib.nixosSystem {
|
||||
inherit system specialArgs;
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
let
|
||||
btrfs_options = [ "compress=zstd:3" "noatime" ];
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
let
|
||||
btrfs_options = [ "compress=zstd:3" "noatime" ];
|
||||
btrfs_ssd = [ "ssd" "discard=async" ];
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
let
|
||||
btrfs_options = [ "compress=zstd:3" "noatime" ];
|
||||
btrfs_ssd = [ "ssd" "discard=async" ];
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(inputs@{ system, packages, ... }:
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }: {
|
||||
nixpkgs.overlays = [
|
||||
inputs.nur.overlay
|
||||
(import ../scripts)
|
||||
|
@ -34,7 +34,8 @@
|
|||
material-wifi-icons = final.stdenv.mkDerivation rec {
|
||||
name = "material-wifi-icons";
|
||||
src = inputs.material-wifi-icons;
|
||||
installPhase = let dest = "$out/share/fonts/${name}";
|
||||
installPhase =
|
||||
let dest = "$out/share/fonts/${name}";
|
||||
in ''
|
||||
mkdir -p ${dest}
|
||||
cp material-wifi.ttf ${dest}
|
||||
|
@ -51,4 +52,4 @@
|
|||
};
|
||||
})
|
||||
];
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
(final: prev:
|
||||
with prev;
|
||||
let
|
||||
with prev;
|
||||
let
|
||||
import_script = (_: path: import (path) { inherit pkgs lib; });
|
||||
create_script = (name: text: runtimeInputs:
|
||||
let
|
||||
|
@ -11,14 +11,17 @@
|
|||
${builtins.readFile text}
|
||||
'';
|
||||
};
|
||||
in (pkgs.writeShellApplication {
|
||||
in
|
||||
(pkgs.writeShellApplication {
|
||||
inherit name runtimeInputs;
|
||||
text = ''exec ${script_body} "$@"'';
|
||||
checkPhase = "";
|
||||
}));
|
||||
create_scripts =
|
||||
lib.mapAttrs (name: deps: create_script name ./${name} deps);
|
||||
in create_scripts {
|
||||
in
|
||||
create_scripts
|
||||
{
|
||||
br = [ ];
|
||||
bmenu = [ final.bemenu final.dhist fish j4-dmenu-desktop jq sway ];
|
||||
_diffr = [ diffr ];
|
||||
|
@ -37,4 +40,4 @@
|
|||
wdmenu = ./wdmenu.nix;
|
||||
wlauncher = ./wlauncher.nix;
|
||||
_gpg-unlock = ./_gpg-unlock.nix;
|
||||
})
|
||||
})
|
||||
|
|
|
@ -6,6 +6,7 @@ let
|
|||
rofi = "rofi -dmenu -sort";
|
||||
};
|
||||
menu_cmd = available_menus.${dmenu};
|
||||
in pkgs.writeShellScriptBin "wdmenu" ''
|
||||
in
|
||||
pkgs.writeShellScriptBin "wdmenu" ''
|
||||
exec ${menu_cmd} "$@"
|
||||
''
|
||||
|
|
|
@ -6,6 +6,7 @@ let
|
|||
rofi = "rofi -show drun -sort";
|
||||
};
|
||||
menu_cmd = available_menus.${dmenu};
|
||||
in pkgs.writeShellScriptBin "wlauncher" ''
|
||||
in
|
||||
pkgs.writeShellScriptBin "wlauncher" ''
|
||||
exec ${menu_cmd} "$@"
|
||||
''
|
||||
|
|
|
@ -6,6 +6,7 @@ let
|
|||
rofi = "rofi -show drun -sort";
|
||||
};
|
||||
menu_cmd = available_menus.${dmenu};
|
||||
in pkgs.writeShellScriptBin "wlauncher" ''
|
||||
in
|
||||
pkgs.writeShellScriptBin "wlauncher" ''
|
||||
exec ${menu_cmd} "$@"
|
||||
''
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
let
|
||||
main_ssh_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15";
|
||||
in {
|
||||
in
|
||||
{
|
||||
"rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
||||
"monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
||||
"lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ config, pkgs, inputs, ... }: {
|
||||
console = {
|
||||
font = "ter-120n";
|
||||
packages = [pkgs.terminus_font];
|
||||
packages = [ pkgs.terminus_font ];
|
||||
earlySetup = false;
|
||||
};
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
# gtk portal needed to make gtk apps happy
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
services.greetd = let
|
||||
services.greetd =
|
||||
let
|
||||
greetd_main_script = pkgs.writeShellScriptBin "main" ''
|
||||
${pkgs.dbus-sway-environment}/bin/dbus-sway-environment
|
||||
export XDG_CURRENT_DESKTOP=sway GTK_THEME="${pkgs.uservars.gtk_theme}" XCURSOR_THEME="${pkgs.uservars.cursor_theme}"
|
||||
|
@ -39,7 +40,8 @@
|
|||
xkb_options lv3:lsgt_switch,grp:shifts_toggle
|
||||
}
|
||||
'';
|
||||
in {
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
initial_session = {
|
||||
|
|
|
@ -38,12 +38,14 @@ in {
|
|||
hints = {
|
||||
alphabet = key.hints;
|
||||
enabled = [{
|
||||
regex = let
|
||||
regex =
|
||||
let
|
||||
mimes =
|
||||
"(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
|
||||
# I fucking hate regex, look at this bullshit
|
||||
delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^⟨⟩`'';
|
||||
in "${mimes}[${delimiters}]+";
|
||||
in
|
||||
"${mimes}[${delimiters}]+";
|
||||
command = "xdg-open";
|
||||
post_processing = true;
|
||||
mouse = {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
accounts.email.accounts = let
|
||||
accounts.email.accounts =
|
||||
let
|
||||
mkAccount = username: host: passName: {
|
||||
realName = "Leonardo Eugênio";
|
||||
address = "${username}@${host}";
|
||||
|
@ -23,8 +24,9 @@
|
|||
pass ${passName} | head -n1
|
||||
'');
|
||||
};
|
||||
in {
|
||||
"personal" = (mkAccount "lelgenio" "disroot.org" "disroot.org") // { primary = true; } ;
|
||||
in
|
||||
{
|
||||
"personal" = (mkAccount "lelgenio" "disroot.org" "disroot.org") // { primary = true; };
|
||||
"work" = mkAccount "leonardo" "wopus.com.br" "Trabalho/wopus_email/leonardo@wopus.com.br";
|
||||
};
|
||||
|
||||
|
|
|
@ -17,7 +17,8 @@ in {
|
|||
};
|
||||
make_extension = name: src:
|
||||
((pkgs.fetchFirefoxAddon { inherit name src; }));
|
||||
in lib.mapAttrsToList make_extension extensions_name_src;
|
||||
in
|
||||
lib.mapAttrsToList make_extension extensions_name_src;
|
||||
};
|
||||
profiles = {
|
||||
main = {
|
||||
|
|
|
@ -17,7 +17,8 @@ let
|
|||
preview_opts =
|
||||
"--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'";
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
@ -155,9 +155,11 @@ in {
|
|||
"thunar/".source = ./thunar;
|
||||
};
|
||||
|
||||
xdg.userDirs = let
|
||||
xdg.userDirs =
|
||||
let
|
||||
HOME = config.home.homeDirectory;
|
||||
in {
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@ in {
|
|||
config = {
|
||||
programs.kakoune = {
|
||||
enable = true;
|
||||
extraConfig = let
|
||||
extraConfig =
|
||||
let
|
||||
colors = lib.mapAttrs (_: lib.replaceStrings [ "#" ] [ "rgb:" ]) {
|
||||
accent_fg = accent.fg;
|
||||
accent_color = accent.color;
|
||||
|
@ -14,8 +15,10 @@ in {
|
|||
orange = color.normal.orange;
|
||||
brown = color.normal.brown;
|
||||
};
|
||||
in with colors;
|
||||
lib.concatStringsSep "\n" (map (lib.readFile) ([
|
||||
in
|
||||
with colors;
|
||||
lib.concatStringsSep "\n"
|
||||
(map (lib.readFile) ([
|
||||
./kak/filetypes.kak
|
||||
./kak/hooks.kak
|
||||
./kak/indent.kak
|
||||
|
@ -110,12 +113,14 @@ in {
|
|||
face global InlayHint ${bg_light}+buif
|
||||
|
||||
# Lsp
|
||||
'' + (lib.concatStringsSep "\n" (lib.mapAttrsToList (name: color: ''
|
||||
'' + (lib.concatStringsSep "\n" (lib.mapAttrsToList
|
||||
(name: color: ''
|
||||
face global HighlightDiagnostic${name} ${color},default+bu
|
||||
face global Diagnostic${name} ${color},default+bu
|
||||
face global TextDiagnostic${name} ${color},default+b
|
||||
face global InlayDiagnostic${name} ${color},default+br
|
||||
'') {
|
||||
'')
|
||||
{
|
||||
Error = "red";
|
||||
Warning = "yellow";
|
||||
Hint = "blue";
|
||||
|
|
|
@ -52,7 +52,8 @@ in {
|
|||
# workaround to allow overriding mimeapps file
|
||||
# btw, whatever it was that decided that damn file should always be written is an asshole
|
||||
xdg.configFile."mimeapps.list".force = true;
|
||||
xdg.mimeApps = let
|
||||
xdg.mimeApps =
|
||||
let
|
||||
|
||||
createMimeAssociation = (mime_prefix: application: mime_suffix: {
|
||||
"${mime_prefix}/${mime_suffix}" = application;
|
||||
|
@ -312,7 +313,8 @@ in {
|
|||
"x-theora"
|
||||
"x-theora+ogg"
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
defaultApplications = mimes;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{pkgs, config, ...}: {
|
||||
{ pkgs, config, ... }: {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
musicDirectory = config.home.homeDirectory + "/Música";
|
||||
|
|
|
@ -6,7 +6,8 @@ let
|
|||
let
|
||||
sign = if (idx < 2) then 1 else -1;
|
||||
axis = if ((lib.mod idx 2) != 0) then "y" else "x";
|
||||
in ''
|
||||
in
|
||||
''
|
||||
${key.${direction}} { shift_${axis}(${toString (sign * 10)}) }
|
||||
${lib.toUpper key.${direction}} { shift_${axis}(${toString (sign * 50)}) }
|
||||
@MONTAGE{
|
||||
|
@ -16,7 +17,8 @@ let
|
|||
}
|
||||
'');
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
# My bemenu wrapper
|
||||
xdg.configFile = {
|
||||
"pqivrc".text = ''
|
||||
|
|
|
@ -64,7 +64,8 @@ in {
|
|||
# Tabs
|
||||
########################################################
|
||||
|
||||
tabs = let
|
||||
tabs =
|
||||
let
|
||||
tabs_defaults = {
|
||||
odd = {
|
||||
fg = color.txt;
|
||||
|
@ -85,7 +86,8 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
bar = { bg = color.bg; };
|
||||
pinned = tabs_defaults;
|
||||
} // tabs_defaults;
|
||||
|
|
|
@ -4,10 +4,12 @@ in {
|
|||
config = {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland.override { plugins = with pkgs; [
|
||||
package = pkgs.rofi-wayland.override {
|
||||
plugins = with pkgs; [
|
||||
rofi-emoji
|
||||
rofi-file-browser
|
||||
];};
|
||||
];
|
||||
};
|
||||
extraConfig = {
|
||||
show-icons = true;
|
||||
modi = "drun,emoji";
|
||||
|
@ -17,7 +19,8 @@ in {
|
|||
kb-primary-paste = "Control+V,Shift+Insert";
|
||||
kb-secondary-paste = "Control+v,Insert";
|
||||
};
|
||||
theme = let
|
||||
theme =
|
||||
let
|
||||
# Use `mkLiteral` for string-like values that should show without
|
||||
# quotes, e.g.:
|
||||
# {
|
||||
|
@ -25,7 +28,8 @@ in {
|
|||
# bar = mkLiteral "abc"; => bar: abc;
|
||||
# };
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
in
|
||||
{
|
||||
"*" = {
|
||||
# foreground-color = mkLiteral color.txt;
|
||||
text-color = mkLiteral color.txt;
|
||||
|
|
|
@ -24,10 +24,12 @@ let
|
|||
systemctl --user start swayidle.service
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [ ./theme.nix ];
|
||||
config = {
|
||||
wayland.windowManager.sway = let
|
||||
wayland.windowManager.sway =
|
||||
let
|
||||
mod = "Mod4";
|
||||
menu = "wlauncher";
|
||||
terminal = "alacritty";
|
||||
|
@ -38,7 +40,8 @@ in {
|
|||
mergeAttrsSet = lib.foldAttrs (n: _: n) { };
|
||||
|
||||
forEachMerge = list: func: mergeAttrsSet (lib.forEach list func);
|
||||
in {
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
config = {
|
||||
bars = [ ];
|
||||
|
@ -48,7 +51,8 @@ in {
|
|||
smartBorders = "on";
|
||||
inner = 5;
|
||||
};
|
||||
colors = let
|
||||
colors =
|
||||
let
|
||||
acc = accent.color;
|
||||
fg_acc = accent.fg;
|
||||
fg_color = color.txt;
|
||||
|
@ -57,7 +61,8 @@ in {
|
|||
client = border: background: text: indicator: childBorder: {
|
||||
inherit border background text indicator childBorder;
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
focused = client acc acc fg_acc acc acc;
|
||||
focusedInactive = client bg_color bg_color fg_color bg_color bg_color;
|
||||
unfocused = client bg_color bg_color fg_color bg_color bg_color;
|
||||
|
@ -122,14 +127,17 @@ in {
|
|||
{ app_id = "WebCord"; }
|
||||
];
|
||||
};
|
||||
modes = let
|
||||
modes =
|
||||
let
|
||||
locked_binds =
|
||||
lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
||||
code_binds =
|
||||
lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
|
||||
return_mode = lib.mapAttrs (k: v: "${v}; mode default");
|
||||
in {
|
||||
audio = code_binds (locked_binds {
|
||||
in
|
||||
{
|
||||
audio = code_binds
|
||||
(locked_binds {
|
||||
${key.tabR} = "exec volumesh -i 10";
|
||||
${key.tabL} = "exec volumesh -d 10";
|
||||
${key.right} = "exec mpc next";
|
||||
|
@ -149,25 +157,30 @@ in {
|
|||
};
|
||||
floating = {
|
||||
modifier = "Mod4";
|
||||
criteria = [ { class = "file_picker"; } { app_id = "file_picker"; } ];
|
||||
criteria = [{ class = "file_picker"; } { app_id = "file_picker"; }];
|
||||
};
|
||||
keybindings = let
|
||||
keybindings =
|
||||
let
|
||||
# mod+1 to swich to workspace 1
|
||||
# mod+shift+1 to move to workspace 1
|
||||
workspace_binds = let
|
||||
workspace_binds =
|
||||
let
|
||||
workspaceBinds = map makeWorkspaceBinds (lib.range 1 10);
|
||||
makeWorkspaceBinds = (i:
|
||||
let
|
||||
key = toString (lib.mod i 10);
|
||||
workspaceNumber = toString i;
|
||||
in {
|
||||
in
|
||||
{
|
||||
"${mod}+${key}" = "workspace number ${workspaceNumber}";
|
||||
"${mod}+Shift+${key}" =
|
||||
"move container to workspace number ${workspaceNumber}";
|
||||
});
|
||||
in mergeAttrsSet workspaceBinds;
|
||||
in
|
||||
mergeAttrsSet workspaceBinds;
|
||||
|
||||
prev_next_binds = let
|
||||
prev_next_binds =
|
||||
let
|
||||
maybe_window = key:
|
||||
if (lib.strings.hasInfix "button" key) then
|
||||
"--whole-window"
|
||||
|
@ -194,11 +207,13 @@ in {
|
|||
"button5"
|
||||
"Tab"
|
||||
];
|
||||
in mergeAttrsSet (prev_binds ++ next_binds);
|
||||
in
|
||||
mergeAttrsSet (prev_binds ++ next_binds);
|
||||
|
||||
# focus, move, resize, (focus and move output)
|
||||
# for every direction with both arrow keys and vim keys
|
||||
movement_binds = let
|
||||
movement_binds =
|
||||
let
|
||||
directions = [ "Left" "Up" "Right" "Down" ];
|
||||
makeVimKeys = (k: key.${lib.toLower k});
|
||||
makeArrowKeys = (k: k);
|
||||
|
@ -209,12 +224,14 @@ in {
|
|||
Right = "grow width 20px";
|
||||
Down = "grow height 20px";
|
||||
}.${direction};
|
||||
in forEachMerge [ makeVimKeys makeArrowKeys ] (prefixFun:
|
||||
in
|
||||
forEachMerge [ makeVimKeys makeArrowKeys ] (prefixFun:
|
||||
forEachMerge directions (direction:
|
||||
let
|
||||
resize_cmd = makeResizeCommand direction;
|
||||
keyBind = prefixFun direction;
|
||||
in {
|
||||
in
|
||||
{
|
||||
# Move focus
|
||||
"${mod}+${keyBind}" = "focus ${direction}";
|
||||
# Move window
|
||||
|
@ -291,7 +308,8 @@ in {
|
|||
# "${mod}+Shift+e" =
|
||||
# "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
|
||||
};
|
||||
in mergeAttrsSet [
|
||||
in
|
||||
mergeAttrsSet [
|
||||
other_binds
|
||||
workspace_binds
|
||||
prev_next_binds
|
||||
|
|
|
@ -77,7 +77,8 @@ let
|
|||
};
|
||||
};
|
||||
};
|
||||
in rec {
|
||||
in
|
||||
rec {
|
||||
key = keys.colemak;
|
||||
|
||||
theme = themes.dark;
|
||||
|
|
|
@ -72,9 +72,11 @@ in {
|
|||
format = "<b>{:%H:%M %a %d/%m}</b>";
|
||||
tooltip = false;
|
||||
};
|
||||
mpd = let
|
||||
mpd =
|
||||
let
|
||||
mpc = "${pkgs.mpc-cli}/bin/mpc";
|
||||
in {
|
||||
in
|
||||
{
|
||||
format = "{stateIcon} {title} - {artist}";
|
||||
format-paused = "{stateIcon}";
|
||||
format-stopped = "";
|
||||
|
|
Loading…
Reference in a new issue