Extract more modules

This commit is contained in:
Leonardo Eugênio 2022-10-18 22:41:40 -03:00
parent 64e43f4535
commit 15135aecee
6 changed files with 181 additions and 158 deletions

View file

@ -76,47 +76,13 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
git
pinentry-curses pinentry-curses
firefox
vscode
micro
fd
bc
du-dust
kakoune
kak-lsp
pavucontrol pavucontrol
tdesktop
# recomended by nixwiki
alacritty # gpu accelerated terminal
glib # gsettings glib # gsettings
usbutils usbutils
# dracula-theme # gtk theme # dracula-theme # gtk theme
gnome3.adwaita-icon-theme # default gnome cursors gnome3.adwaita-icon-theme # default gnome cursors
orchis_theme_compact
pulseaudio
docker-compose
gnumake
mariadb
php74
nodePackages.intelephense
nodePackages.typescript-language-server
nodejs
nodePackages.yarn
nodePackages.less
nodePackages.less-plugin-clean-css
nodePackages.uglify-js
trunk
wasm-bindgen-cli
sqlx-cli
nodePackages.sass
]; ];
services.geoclue2.enable = true; services.geoclue2.enable = true;

35
user/firefox.nix Normal file
View file

@ -0,0 +1,35 @@
{ config, pkgs, lib, font, ... }:
let inherit (import ./variables.nix) key theme color accent font;
in {
config = {
programs.firefox = {
enable = true;
package = pkgs.firefox;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
darkreader
ublock-origin
tree-style-tab
sponsorblock
duckduckgo-privacy-essentials
];
profiles = {
main = {
isDefault = true;
settings = {
"devtools.theme" = "dark";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.tabs.inTitlebar" = 0;
"media.ffmpeg.vaapi.enabled" = true;
"media.ffvpx.enabled" = false;
"media.av1.enabled" = false;
"gfx.webrender.all" = true;
};
userChrome = ''
#tabbrowser-tabs { visibility: collapse !important; }
'';
};
};
};
};
}

View file

@ -7,6 +7,7 @@ in {
./helix.nix ./helix.nix
./kakoune.nix ./kakoune.nix
./fish.nix ./fish.nix
./firefox.nix
./sway.nix ./sway.nix
./hyprland.nix ./hyprland.nix
./alacritty.nix ./alacritty.nix
@ -14,6 +15,8 @@ in {
./qutebrowser ./qutebrowser
./gpg.nix ./gpg.nix
./rofi.nix ./rofi.nix
./mpv.nix
./mangohud.nix
./rnnoise.nix ./rnnoise.nix
inputs.hyprland.homeManagerModules.default inputs.hyprland.homeManagerModules.default
]; ];
@ -21,46 +24,39 @@ in {
# paths it should manage. # paths it should manage.
home.username = "lelgenio"; home.username = "lelgenio";
home.homeDirectory = "/home/lelgenio"; home.homeDirectory = "/home/lelgenio";
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "22.05";
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
alacritty
terminal # see flake.nix terminal # see flake.nix
## CLI
btop btop
exa exa
fd fd
bc
du-dust
p7zip p7zip
tealdeer tealdeer
speedtest-cli micro
deluge
_diffr _diffr
kak-pager
br # bulk rename br # bulk rename
# text manipulation
## text manipulation
sd sd
ripgrep ripgrep
translate-shell translate-shell
# desktop
kanshi
# xfce.thunar # xfce.thunar
gnome.nautilus gnome.nautilus
pass pass
wpass wpass
_gpg-unlock _gpg-unlock
# media
## media
yt-dlp yt-dlp
ffmpeg ffmpeg
imagemagick imagemagick
mpv
mpc-cli mpc-cli
helvum helvum
gimp gimp
@ -69,19 +65,22 @@ in {
blender blender
libreoffice libreoffice
godot godot
# pulse_sink
#games ## games
# lutris-unwrapped # lutris-unwrapped
# steam # steam # It's enabled in the system config
# chat
## chat
tdesktop tdesktop
# discord # I'm using webcord, see home.activation
thunderbird thunderbird
# Theming # discord # I'm using webcord, see home.activation
## Theming
orchis_theme_compact orchis_theme_compact
papirus_red papirus_red
libsForQt5.qtstyleplugins libsForQt5.qtstyleplugins
qt5.qtsvg qt5.qtsvg
## fonts ## fonts
liberation_ttf liberation_ttf
hack-font hack-font
@ -89,12 +88,31 @@ in {
fira-code fira-code
nerdfonts_fira_hack nerdfonts_fira_hack
material-wifi-icons material-wifi-icons
## Network ## Network
speedtest-cli
nmap nmap
miniupnpc miniupnpc
# Programming deluge
## Programming
vscode vscode
rustup rustup
docker-compose
gnumake
mariadb
php74
nodePackages.intelephense
nodePackages.typescript-language-server
nodejs
nodePackages.yarn
nodePackages.less
nodePackages.sass
nodePackages.less-plugin-clean-css
nodePackages.uglify-js
# cargo # cargo
cargo-edit cargo-edit
cargo-feature cargo-feature
@ -104,6 +122,10 @@ in {
pkgs.unstable.rust-analyzer pkgs.unstable.rust-analyzer
gcc gcc
nixfmt nixfmt
trunk
wasm-bindgen-cli
sqlx-cli
]; ];
home.sessionVariables = { home.sessionVariables = {
@ -129,35 +151,6 @@ in {
in "${preview_opts} ${color_opts}"; in "${preview_opts} ${color_opts}";
}; };
programs.bash = { enable = true; }; programs.bash = { enable = true; };
programs.firefox = {
enable = true;
package = pkgs.firefox;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
darkreader
ublock-origin
tree-style-tab
sponsorblock
duckduckgo-privacy-essentials
];
profiles = {
main = {
isDefault = true;
settings = {
"devtools.theme" = "dark";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.tabs.inTitlebar" = 0;
"media.ffmpeg.vaapi.enabled" = true;
"media.ffvpx.enabled" = false;
"media.av1.enabled" = false;
"gfx.webrender.all" = true;
};
userChrome = ''
#tabbrowser-tabs { visibility: collapse !important; }
'';
};
};
};
home.activation = { home.activation = {
install_flatpaks = lib.hm.dag.entryAfter [ "writeBoundary" ] '' install_flatpaks = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD flatpak $VERBOSE_ARG remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo || true $DRY_RUN_CMD flatpak $VERBOSE_ARG remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo || true
@ -205,60 +198,6 @@ in {
# # style.name = "gtk2"; # # style.name = "gtk2";
# }; # };
programs.mangohud = {
enable = true;
enableSessionWide = true;
settings = {
toggle_fps_limit = "F1";
legacy_layout = "false";
gpu_stats = true;
gpu_temp = true;
gpu_core_clock = true;
gpu_mem_clock = true;
gpu_power = true;
gpu_load_change = true;
gpu_load_value = "50,90";
gpu_load_color = "FFFFFF,FFAA7F,CC0000";
gpu_text = "GPU";
cpu_stats = true;
cpu_temp = true;
cpu_power = true;
cpu_mhz = true;
cpu_load_change = true;
core_load_change = true;
cpu_load_value = "50,90";
cpu_load_color = "FFFFFF,FFAA7F,CC0000";
cpu_color = "2e97cb";
cpu_text = "CPU";
io_stats = true;
io_read = true;
io_write = true;
io_color = "a491d3";
swap = true;
vram = true;
vram_color = "ad64c1";
ram = true;
ram_color = "c26693";
fps = true;
engine_color = "eb5b5b";
gpu_color = "2e9762";
wine_color = "eb5b5b";
frame_timing = "1";
frametime_color = "00ff00";
media_player_color = "ffffff";
background_alpha = "0.8";
font_size = "24";
background_color = "020202";
position = "top-left";
text_color = "ffffff";
round_corners = "10";
toggle_hud = "Shift_R+F12";
toggle_logging = "Shift_L+F12";
output_folder = "/home/lelgenio";
};
};
services.syncthing = { services.syncthing = {
enable = true; enable = true;
tray.enable = true; tray.enable = true;
@ -289,21 +228,6 @@ in {
Install = { WantedBy = [ "sway-session.target" ]; }; Install = { WantedBy = [ "sway-session.target" ]; };
}; };
}; };
programs.mpv.enable = true;
programs.mpv.config = {
# ytdl-format='best';
ytdl_path="yt-dlp";
ytdl-format="bestvideo[height<=1080][vcodec!=vp9]+bestaudio/best";
ytdl-raw-options="cookies=~/.cache/cookies-youtube-com.txt,mark-watched=";
osd-fractions=true;
save-position-on-quit=true;
keep-open=true;
cache=true;
cache-pause-initial=true;
cache-pause-wait=10;
};
# My bemenu wrapper # My bemenu wrapper
xdg.configFile = { xdg.configFile = {
"bmenu.conf".text = '' "bmenu.conf".text = ''
@ -321,4 +245,14 @@ in {
set hf "${accent.fg}" set hf "${accent.fg}"
''; '';
}; };
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "22.05";
} }

View file

@ -121,7 +121,14 @@ in {
})); }));
}; };
home.file = { ".config/kak-lsp/kak-lsp.toml".source = ./kak/kak-lsp.toml; }; home.file = { ".config/kak-lsp/kak-lsp.toml".source = ./kak/kak-lsp.toml; };
home.packages = with pkgs; [ kakoune terminal ranger bmenu ]; home.packages = with pkgs; [
kakoune
terminal
ranger
bmenu
kak-lsp
kak-pager
];
home.sessionVariables = { home.sessionVariables = {
EDITOR = "kak"; EDITOR = "kak";
# Some plugins(kak_ansi) like to compile stuff # Some plugins(kak_ansi) like to compile stuff

60
user/mangohud.nix Normal file
View file

@ -0,0 +1,60 @@
{ config, pkgs, lib, font, ... }:
let inherit (import ./variables.nix) key theme color accent font;
in {
config = {
programs.mangohud = {
enable = true;
enableSessionWide = true;
settings = {
toggle_fps_limit = "F1";
legacy_layout = "false";
gpu_stats = true;
gpu_temp = true;
gpu_core_clock = true;
gpu_mem_clock = true;
gpu_power = true;
gpu_load_change = true;
gpu_load_value = "50,90";
gpu_load_color = "FFFFFF,FFAA7F,CC0000";
gpu_text = "GPU";
cpu_stats = true;
cpu_temp = true;
cpu_power = true;
cpu_mhz = true;
cpu_load_change = true;
core_load_change = true;
cpu_load_value = "50,90";
cpu_load_color = "FFFFFF,FFAA7F,CC0000";
cpu_color = "2e97cb";
cpu_text = "CPU";
io_stats = true;
io_read = true;
io_write = true;
io_color = "a491d3";
swap = true;
vram = true;
vram_color = "ad64c1";
ram = true;
ram_color = "c26693";
fps = true;
engine_color = "eb5b5b";
gpu_color = "2e9762";
wine_color = "eb5b5b";
frame_timing = "1";
frametime_color = "00ff00";
media_player_color = "ffffff";
background_alpha = "0.8";
font_size = "24";
background_color = "020202";
position = "top-left";
text_color = "ffffff";
round_corners = "10";
toggle_hud = "Shift_R+F12";
toggle_logging = "Shift_L+F12";
output_folder = "/home/lelgenio";
};
};
};
}

21
user/mpv.nix Normal file
View file

@ -0,0 +1,21 @@
_: {
config = {
programs.mpv = {
enable = true;
config = {
# ytdl-format='best';
ytdl_path = "yt-dlp";
ytdl-format = "bestvideo[height<=1080][vcodec!=vp9]+bestaudio/best";
ytdl-raw-options =
"cookies=~/.cache/cookies-youtube-com.txt,mark-watched=";
osd-fractions = true;
save-position-on-quit = true;
keep-open = true;
cache = true;
cache-pause-initial = true;
cache-pause-wait = 10;
};
};
};
}