Restructure dotfiles
This commit is contained in:
parent
93260e3857
commit
7c0a2bf022
1 changed files with 99 additions and 93 deletions
|
@ -1,5 +1,7 @@
|
||||||
{ config, lib, pkgs, pkgs-unstable, ... }:
|
{ config, lib, pkgs, pkgs-unstable, ... }:
|
||||||
|
|
||||||
|
# Does basically the same thing that stow does, but using Nix.
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.sisyphus.users.tdpeuter;
|
cfg = config.sisyphus.users.tdpeuter;
|
||||||
user = config.users.users.tdpeuter.name;
|
user = config.users.users.tdpeuter.name;
|
||||||
|
@ -8,75 +10,80 @@ in {
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home-manager.users.tdpeuter = lib.mkIf config.sisyphus.programs.home-manager.enable {
|
home-manager.users.tdpeuter = lib.mkIf config.sisyphus.programs.home-manager.enable {
|
||||||
home = {
|
home = {
|
||||||
file = {
|
file = lib.mkMerge [
|
||||||
|
{
|
||||||
".config/alacritty" = {
|
".config/alacritty" = {
|
||||||
|
enable = false;
|
||||||
source = ../../../stow/alacritty/.config/alacritty;
|
source = ../../../stow/alacritty/.config/alacritty;
|
||||||
};
|
};
|
||||||
".config/dunst" = {
|
".config/dunst" = {
|
||||||
enable = config.sisyphus.desktop.sway.enable;
|
inherit (config.sisyphus.desktop.sway) enable;
|
||||||
source = ../../../stow/dunst/.config/dunst;
|
source = ../../../stow/dunst/.config/dunst;
|
||||||
};
|
};
|
||||||
".config/fuzzel" = {
|
".config/fuzzel" = {
|
||||||
source = ../../../stow/fuzzel/.config/fuzzel;
|
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
source = ../../../stow/fuzzel/.config/fuzzel;
|
||||||
};
|
};
|
||||||
".config/git" = {
|
".config/git" = {
|
||||||
source = ../../../stow/git/.config/git;
|
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
source = ../../../stow/git/.config/git;
|
||||||
};
|
};
|
||||||
".config/kitty" = {
|
".config/kitty" = {
|
||||||
source = ../../../stow/kitty/.config/kitty;
|
enable = false;
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
source = ../../../stow/kitty/.config/kitty;
|
||||||
};
|
};
|
||||||
".config/mako" = {
|
".config/mako" = {
|
||||||
|
enable = false;
|
||||||
source = ../../../stow/mako/.config/mako;
|
source = ../../../stow/mako/.config/mako;
|
||||||
};
|
};
|
||||||
".config/mpv" = {
|
".config/mpv" = {
|
||||||
source = ../../../stow/mpv/.config/mpv;
|
source = ../../../stow/mpv/.config/mpv;
|
||||||
};
|
};
|
||||||
".config/OpenRGB" = {
|
".config/OpenRGB" = {
|
||||||
enable = config.sisyphus.services.openrgb.enable;
|
inherit (config.sisyphus.services.openrgb) enable;
|
||||||
source = ../../../stow/openrgb/.config/OpenRGB;
|
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
source = ../../../stow/openrgb/.config/OpenRGB;
|
||||||
};
|
};
|
||||||
".config/sway" = {
|
".config/sway" = {
|
||||||
enable = config.sisyphus.desktop.sway.enable;
|
inherit (config.sisyphus.desktop.sway) enable;
|
||||||
source = ../../../stow/sway/.config/sway;
|
source = ../../../stow/sway/.config/sway;
|
||||||
};
|
};
|
||||||
".config/swayidle" = {
|
".config/swayidle" = {
|
||||||
enable = config.sisyphus.desktop.sway.enable;
|
inherit (config.sisyphus.desktop.sway) enable;
|
||||||
source = ../../../stow/swayidle/.config/swayidle;
|
source = ../../../stow/swayidle/.config/swayidle;
|
||||||
};
|
};
|
||||||
".config/swaylock" = {
|
".config/swaylock" = {
|
||||||
enable = config.sisyphus.desktop.sway.enable;
|
inherit (config.sisyphus.desktop.sway) enable;
|
||||||
source = ../../../stow/swaylock/.config/swaylock;
|
source = ../../../stow/swaylock/.config/swaylock;
|
||||||
};
|
};
|
||||||
".config/vifm" = {
|
".config/vifm" = {
|
||||||
source = ../../../stow/vifm/.config/vifm;
|
|
||||||
recursive = true; # Fix history and all working
|
recursive = true; # Fix history and all working
|
||||||
|
source = ../../../stow/vifm/.config/vifm;
|
||||||
};
|
};
|
||||||
".config/waybar" = {
|
".config/waybar" = {
|
||||||
enable = config.sisyphus.desktop.sway.enable;
|
inherit (config.sisyphus.desktop.sway) enable;
|
||||||
source = ../../../stow/waybar/.config/waybar;
|
source = ../../../stow/waybar/.config/waybar;
|
||||||
};
|
};
|
||||||
".config/zellij" = {
|
".config/zellij" = {
|
||||||
source = ../../../stow/zellij/.config/zellij;
|
source = ../../../stow/zellij/.config/zellij;
|
||||||
};
|
};
|
||||||
".oh-my-zsh" = {
|
".oh-my-zsh" = {
|
||||||
enable = (config.users.users.tdpeuter.shell == pkgs.zsh);
|
enable = config.users.users.tdpeuter.shell == pkgs.zsh;
|
||||||
source = "${pkgs.oh-my-zsh}/share/oh-my-zsh";
|
source = "${pkgs.oh-my-zsh}/share/oh-my-zsh";
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
".oh-my-zsh/themes/tdpeuter.zsh-theme" = {
|
".oh-my-zsh/themes/tdpeuter.zsh-theme" = {
|
||||||
enable = (config.users.users.tdpeuter.shell == pkgs.zsh);
|
enable = config.users.users.tdpeuter.shell == pkgs.zsh;
|
||||||
source = ../../../stow/zsh/.oh-my-zsh/themes/tdpeuter.zsh-theme;
|
source = ../../../stow/zsh/.oh-my-zsh/themes/tdpeuter.zsh-theme;
|
||||||
};
|
};
|
||||||
".ssh/config" = lib.mkIf config.sisyphus.programs.ssh.enable {
|
".ssh/config" = lib.mkIf config.sisyphus.programs.ssh.enable {
|
||||||
|
inherit (config.sisyphus.programs.ssh) enable;
|
||||||
source = ../../../stow/ssh/.ssh/config;
|
source = ../../../stow/ssh/.ssh/config;
|
||||||
};
|
};
|
||||||
".vim" = {
|
".vim" = {
|
||||||
source = ../../../stow/vim/.vim;
|
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
source = ../../../stow/vim/.vim;
|
||||||
};
|
};
|
||||||
".vim/autoload/plug.vim" = {
|
".vim/autoload/plug.vim" = {
|
||||||
source = "${pkgs.vimPlugins.vim-plug}/plug.vim";
|
source = "${pkgs.vimPlugins.vim-plug}/plug.vim";
|
||||||
|
@ -84,23 +91,22 @@ in {
|
||||||
".vimrc" = {
|
".vimrc" = {
|
||||||
source = ../../../stow/vim/.vimrc;
|
source = ../../../stow/vim/.vimrc;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
(lib.mkIf (config.users.users.tdpeuter.shell == pkgs.zsh) {
|
||||||
".zshrc" = {
|
".zshrc" = {
|
||||||
enable = (config.users.users.tdpeuter.shell == pkgs.zsh);
|
|
||||||
source = ../../../stow/zsh/.zshrc;
|
source = ../../../stow/zsh/.zshrc;
|
||||||
};
|
};
|
||||||
".zsh/plugins/cmdtime/cmdtime.plugin.zsh" = {
|
".zsh/plugins/cmdtime/cmdtime.plugin.zsh" = {
|
||||||
enable = (config.users.users.tdpeuter.shell == pkgs.zsh);
|
|
||||||
source = "${pkgs.cmdtime}/share/cmdtime/cmdtime.plugin.zsh";
|
source = "${pkgs.cmdtime}/share/cmdtime/cmdtime.plugin.zsh";
|
||||||
};
|
};
|
||||||
".zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" = {
|
".zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" = {
|
||||||
enable = (config.users.users.tdpeuter.shell == pkgs.zsh);
|
|
||||||
source = "${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh";
|
source = "${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh";
|
||||||
};
|
};
|
||||||
".zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" = {
|
".zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" = {
|
||||||
enable = (config.users.users.tdpeuter.shell == pkgs.zsh);
|
|
||||||
source = "${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh";
|
source = "${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh";
|
||||||
};
|
};
|
||||||
};
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue