mirror of
https://github.com/librephoenix/nixos-config
synced 2025-07-01 12:34:36 +05:30
Condensed home.nix into many more modules!
This commit is contained in:
parent
3fd5341fbe
commit
4a44c06a43
19
user/app/browser/brave.nix
Normal file
19
user/app/browser/brave.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Module installing librewolf as default browser
|
||||
home.packages = [ pkgs.brave ];
|
||||
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = "brave-browser.desktop";
|
||||
"x-scheme-handler/http" = "brave-browser.desktop";
|
||||
"x-scheme-handler/https" = "brave-browser.desktop";
|
||||
"x-scheme-handler/about" = "brave-browser.desktop";
|
||||
"x-scheme-handler/unknown" = "brave-browser.desktop";
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
DEFAULT_BROWSER = "${pkgs.brave}/bin/brave";
|
||||
};
|
||||
|
||||
}
|
42
user/app/browser/librewolf.nix
Normal file
42
user/app/browser/librewolf.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Module installing librewolf as default browser
|
||||
home.packages = [ pkgs.librewolf ];
|
||||
|
||||
home.file.".librewolf/librewolf.overrides.cfg".text = ''
|
||||
defaultPref("font.name.serif.x-western","Inconsolata");
|
||||
defaultPref("font.size.variable.x-western",20);
|
||||
defaultPref("browser.toolbars.bookmarks.visibility","always");
|
||||
defaultPref("privacy.resisttFingerprinting.letterboxing", true);
|
||||
defaultPref("network.http.referer.XOriginPolicy",2);
|
||||
defaultPref("privacy.clearOnShutdown.history",false);
|
||||
defaultPref("privacy.clearOnShutdown.downloads",false);
|
||||
defaultPref("privacy.clearOnShutdown.cookies",false);
|
||||
defaultPref("gfx.webrender.software.opengl",true);
|
||||
defaultPref("webgl.disabled",false);
|
||||
pref("font.name.serif.x-western","Inconsolata");
|
||||
pref("font.size.variable.x-western",20);
|
||||
pref("browser.toolbars.bookmarks.visibility","always");
|
||||
pref("privacy.resisttFingerprinting.letterboxing", true);
|
||||
pref("network.http.referer.XOriginPolicy",2);
|
||||
pref("privacy.clearOnShutdown.history",false);
|
||||
pref("privacy.clearOnShutdown.downloads",false);
|
||||
pref("privacy.clearOnShutdown.cookies",false);
|
||||
pref("gfx.webrender.software.opengl",true);
|
||||
pref("webgl.disabled",false);
|
||||
'';
|
||||
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = "librewolf.desktop";
|
||||
"x-scheme-handler/http" = "librewolf.desktop";
|
||||
"x-scheme-handler/https" = "librewolf.desktop";
|
||||
"x-scheme-handler/about" = "librewolf.desktop";
|
||||
"x-scheme-handler/unknown" = "librewolf.desktop";
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
DEFAULT_BROWSER = "${pkgs.librewolf}/bin/librewolf";
|
||||
};
|
||||
|
||||
}
|
17
user/app/dmenu-scripts/networkmanager-dmenu.nix
Normal file
17
user/app/dmenu-scripts/networkmanager-dmenu.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = [ pkgs.networkmanager_dmenu ];
|
||||
|
||||
home.file.".config/networkmanager-dmenu/config.ini".text = ''
|
||||
[dmenu]
|
||||
dmenu_command = rofi -show dmenu
|
||||
compact = True
|
||||
wifi_chars = ▂▄▆█
|
||||
list_saved = True
|
||||
|
||||
[editor]
|
||||
terminal = alacritty
|
||||
# gui_if_available = <True or False> (Default: True)
|
||||
'';
|
||||
}
|
|
@ -7,10 +7,12 @@ in
|
|||
enable = true;
|
||||
doomPrivateDir = ./.;
|
||||
};
|
||||
|
||||
home.file.".emacs.d/themes/doom-stylix-theme.el".source = config.lib.stylix.colors {
|
||||
template = builtins.readFile ./themes/doom-stylix-theme.el.mustache;
|
||||
extension = ".el";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
git
|
||||
nodejs
|
||||
|
@ -18,6 +20,8 @@ in
|
|||
jshon
|
||||
aria
|
||||
hledger
|
||||
hunspell hunspellDicts.en_US-large
|
||||
pandoc
|
||||
nodePackages.mermaid-cli
|
||||
(python3.withPackages (p: with p; [
|
||||
pandas
|
||||
|
@ -27,6 +31,11 @@ in
|
|||
pymupdf
|
||||
markdown
|
||||
]))];
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "emacsclient";
|
||||
};
|
||||
|
||||
home.file.".emacs.d/eaf" = {
|
||||
source = "${eaf}";
|
||||
recursive = true;
|
||||
|
|
|
@ -1616,10 +1616,12 @@ in
|
|||
enable = true;
|
||||
doomPrivateDir = ./.;
|
||||
};
|
||||
|
||||
home.file.".emacs.d/themes/doom-stylix-theme.el".source = config.lib.stylix.colors {
|
||||
template = builtins.readFile ./themes/doom-stylix-theme.el.mustache;
|
||||
extension = ".el";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
git
|
||||
nodejs
|
||||
|
@ -1627,6 +1629,8 @@ in
|
|||
jshon
|
||||
aria
|
||||
hledger
|
||||
hunspell hunspellDicts.en_US-large
|
||||
pandoc
|
||||
nodePackages.mermaid-cli
|
||||
(python3.withPackages (p: with p; [
|
||||
pandas
|
||||
|
@ -1636,6 +1640,11 @@ in
|
|||
pymupdf
|
||||
markdown
|
||||
]))];
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "emacsclient";
|
||||
};
|
||||
|
||||
home.file.".emacs.d/eaf" = {
|
||||
source = "${eaf}";
|
||||
recursive = true;
|
||||
|
|
8
user/app/flatpak/flatpak.nix
Normal file
8
user/app/flatpak/flatpak.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = [ pkgs.flatpak ];
|
||||
home.sessionVariables = {
|
||||
XDG_DATA_DIRS = "$XDG_DATA_DIRS:/usr/share:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share"; # lets flatpak work
|
||||
};
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{ config, lib, pkgs, myName, myEmail, ... }:
|
||||
|
||||
{
|
||||
home.packages = [ pkgs.git ];
|
||||
programs.git.enable = true;
|
||||
programs.git.userName = myName;
|
||||
programs.git.userEmail = myEmail;
|
||||
|
|
23
user/app/keepass/keepass.nix
Normal file
23
user/app/keepass/keepass.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(self: super:
|
||||
{
|
||||
keepmenu = super.keepmenu.overrideAttrs (oldAttrs: rec {
|
||||
pname = "keepmenu";
|
||||
version = "1.3.1";
|
||||
src = super.python3Packages.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-AGuJY7IirzIjcu/nY9CzeOqU1liwcRijYLi8hGN/pRg=";
|
||||
};
|
||||
});
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
keepassxc
|
||||
keepmenu
|
||||
];
|
||||
}
|
18
user/app/virtualization/virtualization.nix
Normal file
18
user/app/virtualization/virtualization.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Various packages related to virtualization, compatability and sandboxing
|
||||
home.packages = with pkgs; [
|
||||
# Virtual Machines and wine
|
||||
libvirt
|
||||
virt-manager
|
||||
qemu_full
|
||||
lxc
|
||||
swtpm
|
||||
bottles
|
||||
|
||||
# Filesystems
|
||||
dosfstools
|
||||
];
|
||||
|
||||
}
|
148
user/home.nix
148
user/home.nix
|
@ -6,41 +6,23 @@
|
|||
home.username = myName;
|
||||
home.homeDirectory = myHomeDir;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super:
|
||||
{
|
||||
keepmenu = super.keepmenu.overrideAttrs (oldAttrs: rec {
|
||||
pname = "keepmenu";
|
||||
version = "1.3.1";
|
||||
src = super.python3Packages.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-AGuJY7IirzIjcu/nY9CzeOqU1liwcRijYLi8hGN/pRg=";
|
||||
};
|
||||
});
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [
|
||||
./wm/xmonad/xmonad.nix # My xmonad config
|
||||
./shell/sh.nix # My zsh and bash config
|
||||
./shell/cli-collection.nix # Useful CLI apps
|
||||
./bin/phoenix.nix # My nix command wrapper
|
||||
./bin/ytsub-wrappers.nix # My ytsub wrapper
|
||||
./app/doom-emacs/doom.nix # My doom emacs config
|
||||
./app/ranger/ranger.nix # My ranger file manager config
|
||||
./app/terminal/alacritty.nix # My alacritty config
|
||||
./app/terminal/kitty.nix # My kitty config
|
||||
./app/git/git.nix # My git config
|
||||
./app/keepass/keepass.nix # My password manager
|
||||
./app/browser/librewolf.nix # My default browser
|
||||
./app/games/games.nix # Various videogame apps
|
||||
./app/virtualization/virtualization.nix # Virtual machines
|
||||
./app/flatpak/flatpak.nix # Flatpaks
|
||||
./style/stylix.nix # Styling and themes for my apps
|
||||
./lang/cc/cc.nix # C and C++ tools
|
||||
#./lang/rust/rust.nix # Rust tools
|
||||
#./lang/python/python.nix # Python
|
||||
#./lang/python/python-packages.nix # Extra Python packages I want
|
||||
./lang/haskell/haskell.nix # Haskell tools
|
||||
#./lang/android/android.nix # Android developement
|
||||
./lang/godot/godot.nix # Game development
|
||||
];
|
||||
|
||||
|
@ -50,17 +32,12 @@
|
|||
# Core
|
||||
zsh
|
||||
alacritty
|
||||
kitty
|
||||
librewolf
|
||||
brave
|
||||
dmenu
|
||||
rofi
|
||||
keepmenu
|
||||
networkmanager_dmenu
|
||||
feh
|
||||
git
|
||||
syncthing
|
||||
flameshot
|
||||
|
||||
# Office
|
||||
libreoffice-qt
|
||||
|
@ -68,6 +45,7 @@
|
|||
xournalpp
|
||||
gnome.geary
|
||||
gnome.gnome-calendar
|
||||
gnome.seahorse
|
||||
newsflash
|
||||
#autokey
|
||||
protonmail-bridge
|
||||
|
@ -79,6 +57,7 @@
|
|||
vlc
|
||||
mpv
|
||||
yt-dlp
|
||||
freetube
|
||||
blender
|
||||
obs-studio
|
||||
libsForQt5.kdenlive
|
||||
|
@ -86,83 +65,14 @@
|
|||
mediainfo
|
||||
libmediainfo
|
||||
mediainfo-gui
|
||||
freetube
|
||||
audio-recorder
|
||||
pavucontrol
|
||||
gtkcord4
|
||||
|
||||
# Command Line
|
||||
neofetch lolcat cowsay
|
||||
cava
|
||||
gnugrep gnused
|
||||
xorg.xkill
|
||||
killall
|
||||
libnotify
|
||||
bat exa fd bottom ripgrep
|
||||
rsync
|
||||
systeroid
|
||||
tmux
|
||||
htop
|
||||
hwinfo
|
||||
unzip
|
||||
octave
|
||||
brightnessctl
|
||||
w3m
|
||||
fzf
|
||||
hunspell hunspellDicts.en_US-large
|
||||
pandoc
|
||||
(pkgs.callPackage ./pkgs/ytsub.nix { })
|
||||
(pkgs.callPackage ./pkgs/pokemon-colorscripts.nix { })
|
||||
|
||||
# Various dev packages
|
||||
texinfo
|
||||
libffi zlib
|
||||
nodePackages.ungit
|
||||
|
||||
# Compositor and Desktop Utils
|
||||
picom
|
||||
alttab
|
||||
xorg.xcursorthemes
|
||||
|
||||
# X Utils
|
||||
xdotool
|
||||
xclip
|
||||
ddcutil
|
||||
sct
|
||||
caffeine-ng
|
||||
|
||||
# Wayland Utils
|
||||
# xdg-desktop-portal-wlr
|
||||
# wtype
|
||||
# wl-clipboard-x11
|
||||
# xorg.xlsclients
|
||||
# glfw-wayland
|
||||
# swayidle
|
||||
# swaylock
|
||||
# wlsunset
|
||||
# wayshot
|
||||
# wev
|
||||
|
||||
# TODO Configure pipewire audio server
|
||||
|
||||
# Virtual Machines and wine
|
||||
libvirt
|
||||
virt-manager
|
||||
qemu_full
|
||||
lxc
|
||||
swtpm
|
||||
bottles
|
||||
|
||||
# Security
|
||||
keepassxc
|
||||
gnome.seahorse
|
||||
protonvpn-gui
|
||||
|
||||
# Filesystems
|
||||
dosfstools
|
||||
|
||||
# Extra packages
|
||||
flatpak
|
||||
];
|
||||
|
||||
services.syncthing.enable = true;
|
||||
|
@ -190,47 +100,7 @@
|
|||
XDG_BOOK_DIR = "${config.home.homeDirectory}/Media/Books";
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".librewolf/librewolf.overrides.cfg".text = ''
|
||||
defaultPref("font.name.serif.x-western","Inconsolata");
|
||||
defaultPref("font.size.variable.x-western",20);
|
||||
defaultPref("browser.toolbars.bookmarks.visibility","always");
|
||||
defaultPref("privacy.resisttFingerprinting.letterboxing", true);
|
||||
defaultPref("network.http.referer.XOriginPolicy",2);
|
||||
defaultPref("privacy.clearOnShutdown.history",false);
|
||||
defaultPref("privacy.clearOnShutdown.downloads",false);
|
||||
defaultPref("privacy.clearOnShutdown.cookies",false);
|
||||
defaultPref("gfx.webrender.software.opengl",true);
|
||||
defaultPref("webgl.disabled",false);
|
||||
pref("font.name.serif.x-western","Inconsolata");
|
||||
pref("font.size.variable.x-western",20);
|
||||
pref("browser.toolbars.bookmarks.visibility","always");
|
||||
pref("privacy.resisttFingerprinting.letterboxing", true);
|
||||
pref("network.http.referer.XOriginPolicy",2);
|
||||
pref("privacy.clearOnShutdown.history",false);
|
||||
pref("privacy.clearOnShutdown.downloads",false);
|
||||
pref("privacy.clearOnShutdown.cookies",false);
|
||||
pref("gfx.webrender.software.opengl",true);
|
||||
pref("webgl.disabled",false);
|
||||
'';
|
||||
|
||||
home.file.".config/networkmanager-dmenu/config.ini".text = ''
|
||||
[dmenu]
|
||||
dmenu_command = rofi -show dmenu
|
||||
compact = True
|
||||
wifi_chars = ▂▄▆█
|
||||
list_saved = True
|
||||
|
||||
[editor]
|
||||
terminal = alacritty
|
||||
# gui_if_available = <True or False> (Default: True)
|
||||
'';
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "emacsclient";
|
||||
XDG_DATA_DIRS = "$XDG_DATA_DIRS:/usr/share:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share"; # lets flatpak work
|
||||
};
|
||||
|
||||
# extra packages
|
||||
xdg.mime.enable = true;
|
||||
xdg.mimeApps.enable = true;
|
||||
|
||||
}
|
||||
|
|
31
user/shell/cli-collection.nix
Normal file
31
user/shell/cli-collection.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Collection of useful CLI apps
|
||||
home.packages = with pkgs; [
|
||||
# Command Line
|
||||
neofetch lolcat cowsay
|
||||
cava
|
||||
gnugrep gnused
|
||||
killall
|
||||
libnotify
|
||||
bat exa fd bottom ripgrep
|
||||
rsync
|
||||
tmux
|
||||
htop
|
||||
hwinfo
|
||||
unzip
|
||||
octave
|
||||
brightnessctl
|
||||
w3m
|
||||
fzf
|
||||
pandoc
|
||||
(pkgs.callPackage ../pkgs/ytsub.nix { })
|
||||
(pkgs.callPackage ../pkgs/pokemon-colorscripts.nix { })
|
||||
];
|
||||
|
||||
imports = [
|
||||
../bin/phoenix.nix # My nix command wrapper
|
||||
../bin/ytsub-wrappers.nix # My ytsub wrapper
|
||||
];
|
||||
}
|
|
@ -29,4 +29,10 @@ in
|
|||
enableCompletion = true;
|
||||
shellAliases = myAliases;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
neofetch lolcat cowsay
|
||||
gnugrep gnused
|
||||
bat exa bottom fd
|
||||
];
|
||||
}
|
||||
|
|
|
@ -2,7 +2,39 @@
|
|||
|
||||
{
|
||||
|
||||
imports = [ ../picom/picom.nix ];
|
||||
imports = [ ../picom/picom.nix
|
||||
../../lang/haskell/haskell.nix
|
||||
../../app/terminal/alacritty.nix
|
||||
../../app/terminal/kitty.nix
|
||||
../../app/dmenu-scripts/networkmanager-dmenu.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
xmobar
|
||||
dunst
|
||||
pamixer
|
||||
autorandr
|
||||
alacritty
|
||||
kitty
|
||||
dmenu
|
||||
rofi
|
||||
keepmenu
|
||||
networkmanager_dmenu
|
||||
pavucontrol
|
||||
feh
|
||||
flameshot
|
||||
alttab
|
||||
xdotool
|
||||
xclip
|
||||
ddcutil
|
||||
sct
|
||||
libnotify
|
||||
xorg.xkill
|
||||
killall
|
||||
bottom
|
||||
brightnessctl
|
||||
xorg.xcursorthemes
|
||||
];
|
||||
|
||||
home.file.".config/xmonad/xmonad.hs".source = ./xmonad.hs;
|
||||
home.file.".config/xmonad/startup.sh".source = ./startup.sh;
|
||||
|
@ -17,13 +49,6 @@
|
|||
extension = "";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
xmobar
|
||||
dunst
|
||||
pamixer
|
||||
autorandr
|
||||
];
|
||||
|
||||
services.autorandr.enable = true;
|
||||
programs.autorandr.enable = true;
|
||||
programs.autorandr.profiles = {
|
||||
|
|
|
@ -778,7 +778,39 @@ In order to have Nix put my xmonad/xmobar configuration in the proper places, I
|
|||
|
||||
{
|
||||
|
||||
imports = [ ../picom/picom.nix ];
|
||||
imports = [ ../picom/picom.nix
|
||||
../../lang/haskell/haskell.nix
|
||||
../../app/terminal/alacritty.nix
|
||||
../../app/terminal/kitty.nix
|
||||
../../app/dmenu-scripts/networkmanager-dmenu.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
xmobar
|
||||
dunst
|
||||
pamixer
|
||||
autorandr
|
||||
alacritty
|
||||
kitty
|
||||
dmenu
|
||||
rofi
|
||||
keepmenu
|
||||
networkmanager_dmenu
|
||||
pavucontrol
|
||||
feh
|
||||
flameshot
|
||||
alttab
|
||||
xdotool
|
||||
xclip
|
||||
ddcutil
|
||||
sct
|
||||
libnotify
|
||||
xorg.xkill
|
||||
killall
|
||||
bottom
|
||||
brightnessctl
|
||||
xorg.xcursorthemes
|
||||
];
|
||||
|
||||
home.file.".config/xmonad/xmonad.hs".source = ./xmonad.hs;
|
||||
home.file.".config/xmonad/startup.sh".source = ./startup.sh;
|
||||
|
@ -793,13 +825,6 @@ In order to have Nix put my xmonad/xmobar configuration in the proper places, I
|
|||
extension = "";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
xmobar
|
||||
dunst
|
||||
pamixer
|
||||
autorandr
|
||||
];
|
||||
|
||||
services.autorandr.enable = true;
|
||||
programs.autorandr.enable = true;
|
||||
programs.autorandr.profiles = {
|
||||
|
|
Loading…
Reference in a new issue