Started migration towards flake-parts

Plus shit ton many changes I still had to commit
This commit is contained in:
Andrea Ciceri 2023-03-12 17:05:03 +01:00
parent 261b763848
commit f05ee0a658
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
18 changed files with 752 additions and 460 deletions

View file

@ -1,3 +1,3 @@
{
{lib, ...}: {
ccrEmacs.enable = true;
}

View file

@ -14,21 +14,21 @@
enableFXCastBridge = pkgs.system == "x86_64-linux";
};
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
privacy-badger
ublock-origin
tridactyl
octotree
octolinker
org-capture
browserpass
bypass-paywalls-clean
ghosttext # or edit-with-emacs?
# fx_cast # TODO make PR to rycee NUR repo
];
profiles.ccr = {
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
privacy-badger
ublock-origin
tridactyl
octotree
octolinker
org-capture
browserpass
bypass-paywalls-clean
ghosttext # or edit-with-emacs?
# fx_cast # TODO make PR to rycee NUR repo
];
settings = {
"browser.startup.homepage" = "https://search.privatevoid.net/";
"browser.startup.homepage" = "https://searx.be";
"browser.search.region" = "IT";
"browser.search.isUS" = false;
"distribution.searchplugins.defaultLocale" = "it-IT";

View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [wlrobs input-overlay];
};
}

View file

@ -14,7 +14,7 @@
nix-direnv.enable = true;
};
services.lorri.enable = true;
services.lorri.enable = false; # I'm not using it
programs.exa = {
enable = true;
@ -44,6 +44,55 @@
};
};
# Playing with it sometimes
programs.nushell = {
enable = true;
configFile.text = ''
let-env config = {
show_banner: false
ls: {
use_ls_colors: true # use the LS_COLORS environment variable to colorize output
clickable_links: true # enable or disable clickable links. Your terminal has to support links.
}
rm: {
always_trash: true # always act as if -t was given. Can be overridden with -p
}
cd: {
abbreviations: true # allows `cd s/o/f` to expand to `cd some/other/folder`
}
table: {
mode: compact # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
trim: {
methodology: wrapping # wrapping or truncating
wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
truncating_suffix: "..." # A suffix used by the 'truncating' methodology
}
}
history: {
max_size: 10000 # Session has to be reloaded for this to take effect
sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
file_format: "plaintext" # "sqlite" or "plaintext"
}
completions: {
case_sensitive: false # set to true to enable case-sensitive completions
quick: true # set this to false to prevent auto-selecting completions when only one remains
partial: true # set this to false to prevent partial filling of the prompt
algorithm: "prefix" # prefix or fuzzy
external: {
enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up my be very slow
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
completer: null # check 'carapace_completer' above as an example
}
}
filesize: {
metric: true # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard)
format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, zb, zib, auto
}
}
'';
};
programs.zsh = {
enable = true;
enableAutosuggestions = true;
@ -84,9 +133,6 @@
initExtra = ''
[[ -z $INSIDE_EMACS ]] && source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
'';
sessionVariables = {
EDITOR = "hx";
};
};
home.packages = with pkgs; [
@ -95,6 +141,6 @@
dig.dnsutils
zsh-completions
nix-zsh-completions
nom
# nom # FIXME disable on aarch64-linux, breaks everything :(
];
}

View file

@ -48,11 +48,20 @@
output = let
bg = "${./wallpaper.svg} fill";
in {
DP-1 = {
DP-2 = {
res = "1900x1200";
pos = "0 0";
inherit bg;
transform = "90";
};
DP-1 = {
res = "2560x1440";
pos = "1200 230";
inherit bg;
};
eDP-1 = {
res = "1920x1080";
pos = "3760 230";
inherit bg;
};
};
@ -97,16 +106,15 @@
${pkgs.wf-recorder}/bin/wf-recorder -g "$coords" -f "$filename"
wl-copy -t video/mp4 < $filename
'';
emacsclientAsTerminal = pkgs.writeShellScript "emacsclientAsTerminal" ''
emacsclient -c -F '\\'(name . "VTerm"))' -q --eval '\\'(vterm "/bin/zsh")'
'';
in
lib.mkOptionDefault {
"${modifier}+x" = "exec emacsclient -c";
"${modifier}+b" = "exec qutebrowser";
"${modifier}+s" = "exec ${screenshotScript}";
"${modifier}+g" = "exec ${screenrecordingScript}";
# "${modifier}+Shift+Enter" = "exec ${emacsclientAsTerminal}"; # FIXME
# "${modifier}+g" = "exec ${screenrecordingScript}"; # FIXME
"${modifier}+t" = ''
exec emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(vterm (getenv "SHELL"))'
'';
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +5%";
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
};