split home conf into modules
This commit is contained in:
parent
f5524baf8e
commit
0ab3bf5dd0
|
|
@ -33,6 +33,10 @@
|
||||||
};
|
};
|
||||||
homeConfigurations.ahnwuoa = home-manager.lib.homeManagerConfiguration {
|
homeConfigurations.ahnwuoa = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
extraSpecialArgs = rec {
|
||||||
|
username = "ahnwuoa";
|
||||||
|
homeDirectory = "/home/${username}";
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
user/home.nix
|
user/home.nix
|
||||||
overlays
|
overlays
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, username, homeDirectory, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
username = "ahnwuoa";
|
|
||||||
homeDirectory = "/home/${username}";
|
|
||||||
mkln = x: config.lib.file.mkOutOfStoreSymlink "${homeDirectory}/.local/nixos/user/${x}";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./xdg.nix
|
||||||
|
./theme.nix
|
||||||
|
];
|
||||||
|
|
||||||
home.username = username;
|
home.username = username;
|
||||||
home.homeDirectory = homeDirectory;
|
home.homeDirectory = homeDirectory;
|
||||||
|
|
||||||
|
|
@ -88,82 +88,5 @@ in
|
||||||
pwninit
|
pwninit
|
||||||
patchelf
|
patchelf
|
||||||
];
|
];
|
||||||
xdg.configFile.alacritty.source = mkln "config/alacritty";
|
|
||||||
xdg.configFile.awesome.source = mkln "config/awesome";
|
|
||||||
xdg.configFile.bash.source = mkln "config/bash";
|
|
||||||
xdg.configFile.fcitx5.source = config/fcitx5;
|
|
||||||
xdg.configFile.fontconfig.source = config/fontconfig;
|
|
||||||
xdg.configFile."gdb/gdbinit.py".source = config/gdb/gdbinit.py;
|
|
||||||
xdg.configFile."gdb/gdbinit".text = ''
|
|
||||||
source ${pkgs.pwndbg}/share/pwndbg/gdbinit.py
|
|
||||||
source ~/.config/gdb/gdbinit.py
|
|
||||||
'';
|
|
||||||
xdg.configFile.git.source = config/git;
|
|
||||||
xdg.configFile.lsd.source = config/lsd;
|
|
||||||
xdg.configFile.picom.source = config/picom;
|
|
||||||
xdg.configFile.python.source = config/python;
|
|
||||||
xdg.configFile.qt5ct.source = config/qt5ct;
|
|
||||||
xdg.configFile.readline.source = config/readline;
|
|
||||||
xdg.configFile."starship.toml".source = config/starship.toml;
|
|
||||||
xdg.configFile.sx.source = mkln "config/sx";
|
|
||||||
xdg.configFile."tmux/tmux.conf".text = (builtins.readFile config/tmux/tmux.conf) + ''
|
|
||||||
run ${pkgs.tmuxPlugins.vim-tmux-navigator.rtp}
|
|
||||||
run ${pkgs.tmuxPlugins.sessionist.rtp}
|
|
||||||
'';
|
|
||||||
fonts.fontconfig.enable = false;
|
|
||||||
qt = {
|
|
||||||
enable = true;
|
|
||||||
platformTheme.name = "qtct";
|
|
||||||
style.name = "breeze";
|
|
||||||
style.package = pkgs.libsForQt5.breeze-qt5;
|
|
||||||
};
|
|
||||||
gtk = {
|
|
||||||
enable = true;
|
|
||||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
|
||||||
gtk2.extraConfig = "gtk-recent-files-max-age = 0";
|
|
||||||
gtk3.extraConfig = { gtk-recent-files-limit = 0; };
|
|
||||||
theme = {
|
|
||||||
name = "Breeze";
|
|
||||||
package = pkgs.libsForQt5.breeze-gtk;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
home.pointerCursor = {
|
|
||||||
name = "breeze_cursors";
|
|
||||||
package = pkgs.libsForQt5.breeze-qt5;
|
|
||||||
size = 24;
|
|
||||||
gtk.enable = true;
|
|
||||||
};
|
|
||||||
home.file.".icons/default/index.theme".enable = false;
|
|
||||||
home.file.".icons/breeze_cursors".enable = false;
|
|
||||||
xdg.mimeApps.enable = true;
|
|
||||||
xdg.mimeApps.defaultApplications = let
|
|
||||||
image = "nsxiv.desktop";
|
|
||||||
browser = "firefox.desktop";
|
|
||||||
text = "nvim.desktop";
|
|
||||||
media = "mpv.desktop";
|
|
||||||
in {
|
|
||||||
"image/jpeg" = image;
|
|
||||||
"image/png" = image;
|
|
||||||
"image/gif" = media;
|
|
||||||
|
|
||||||
"audio/mpeg" = media;
|
|
||||||
"audio/ogg" = media;
|
|
||||||
"audio/vorbis" = media;
|
|
||||||
"audio/x-vorbis+ogg" = media;
|
|
||||||
|
|
||||||
"video/mp4" = media;
|
|
||||||
"video/mpeg" = media;
|
|
||||||
|
|
||||||
"text/plain" = text;
|
|
||||||
"application/xml" = text;
|
|
||||||
};
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
configPackages = [ pkgs.libsForQt5.xdg-desktop-portal-kde ];
|
|
||||||
extraPortals = [ pkgs.libsForQt5.xdg-desktop-portal-kde ];
|
|
||||||
config.common.default = "kde";
|
|
||||||
};
|
|
||||||
xdg.dataFile."recently-used.xbel".text = "";
|
|
||||||
xdg.dataFile."RecentDocuments".text = "";
|
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.05";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
27
user/theme.nix
Normal file
27
user/theme.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "qtct";
|
||||||
|
style.name = "breeze";
|
||||||
|
style.package = pkgs.libsForQt5.breeze-qt5;
|
||||||
|
};
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
gtk2.extraConfig = "gtk-recent-files-max-age = 0";
|
||||||
|
gtk3.extraConfig = { gtk-recent-files-limit = 0; };
|
||||||
|
theme = {
|
||||||
|
name = "Breeze";
|
||||||
|
package = pkgs.libsForQt5.breeze-gtk;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home.pointerCursor = {
|
||||||
|
name = "breeze_cursors";
|
||||||
|
package = pkgs.libsForQt5.breeze-qt5;
|
||||||
|
size = 24;
|
||||||
|
gtk.enable = true;
|
||||||
|
};
|
||||||
|
home.file.".icons/default/index.theme".enable = false;
|
||||||
|
home.file.".icons/breeze_cursors".enable = false;
|
||||||
|
}
|
||||||
60
user/xdg.nix
Normal file
60
user/xdg.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
{ config, pkgs, homeDirectory, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
mkln = x: config.lib.file.mkOutOfStoreSymlink "${homeDirectory}/.local/nixos/user/${x}";
|
||||||
|
in {
|
||||||
|
xdg.configFile.alacritty.source = mkln "config/alacritty";
|
||||||
|
xdg.configFile.awesome.source = mkln "config/awesome";
|
||||||
|
xdg.configFile.bash.source = mkln "config/bash";
|
||||||
|
xdg.configFile.fcitx5.source = config/fcitx5;
|
||||||
|
xdg.configFile.fontconfig.source = config/fontconfig;
|
||||||
|
xdg.configFile."gdb/gdbinit.py".source = config/gdb/gdbinit.py;
|
||||||
|
xdg.configFile."gdb/gdbinit".text = ''
|
||||||
|
source ${pkgs.pwndbg}/share/pwndbg/gdbinit.py
|
||||||
|
source ~/.config/gdb/gdbinit.py
|
||||||
|
'';
|
||||||
|
xdg.configFile.git.source = config/git;
|
||||||
|
xdg.configFile.lsd.source = config/lsd;
|
||||||
|
xdg.configFile.picom.source = config/picom;
|
||||||
|
xdg.configFile.python.source = config/python;
|
||||||
|
xdg.configFile.qt5ct.source = config/qt5ct;
|
||||||
|
xdg.configFile.readline.source = config/readline;
|
||||||
|
xdg.configFile."starship.toml".source = config/starship.toml;
|
||||||
|
xdg.configFile.sx.source = mkln "config/sx";
|
||||||
|
xdg.configFile."tmux/tmux.conf".text = (builtins.readFile config/tmux/tmux.conf) + ''
|
||||||
|
run ${pkgs.tmuxPlugins.vim-tmux-navigator.rtp}
|
||||||
|
run ${pkgs.tmuxPlugins.sessionist.rtp}
|
||||||
|
'';
|
||||||
|
fonts.fontconfig.enable = false;
|
||||||
|
gtk.gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||||
|
xdg.dataFile."recently-used.xbel".text = "";
|
||||||
|
xdg.dataFile."RecentDocuments".text = "";
|
||||||
|
xdg.mimeApps.enable = true;
|
||||||
|
xdg.mimeApps.defaultApplications = let
|
||||||
|
image = "nsxiv.desktop";
|
||||||
|
browser = "firefox.desktop";
|
||||||
|
text = "nvim.desktop";
|
||||||
|
media = "mpv.desktop";
|
||||||
|
in {
|
||||||
|
"image/jpeg" = image;
|
||||||
|
"image/png" = image;
|
||||||
|
"image/gif" = media;
|
||||||
|
|
||||||
|
"audio/mpeg" = media;
|
||||||
|
"audio/ogg" = media;
|
||||||
|
"audio/vorbis" = media;
|
||||||
|
"audio/x-vorbis+ogg" = media;
|
||||||
|
|
||||||
|
"video/mp4" = media;
|
||||||
|
"video/mpeg" = media;
|
||||||
|
|
||||||
|
"text/plain" = text;
|
||||||
|
"application/xml" = text;
|
||||||
|
};
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
configPackages = [ pkgs.libsForQt5.xdg-desktop-portal-kde ];
|
||||||
|
extraPortals = [ pkgs.libsForQt5.xdg-desktop-portal-kde ];
|
||||||
|
config.common.default = "kde";
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue