refactor
This commit is contained in:
parent
c272eaf158
commit
b95a4366a4
|
|
@ -8,13 +8,13 @@
|
||||||
#nsxiv-rifle = [pkgs.nsxiv];
|
#nsxiv-rifle = [pkgs.nsxiv];
|
||||||
#screenshot = [pkgs.maim pkgs.xclip];
|
#screenshot = [pkgs.maim pkgs.xclip];
|
||||||
};
|
};
|
||||||
mkln = x: config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/nixos/user/bin/${x}";
|
ln = config.u.lib.ln "${config.u.confPath}/user/bin";
|
||||||
in {
|
in {
|
||||||
home.file = builtins.listToAttrs (
|
home.file = builtins.listToAttrs (
|
||||||
map
|
map
|
||||||
(x: {
|
(x: {
|
||||||
name = ".local/bin/${x}";
|
name = ".local/bin/${x}";
|
||||||
value = {source = mkln x;};
|
value = {source = ln x;};
|
||||||
})
|
})
|
||||||
(
|
(
|
||||||
builtins.filter
|
builtins.filter
|
||||||
|
|
|
||||||
|
|
@ -4,22 +4,20 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
mkln = x: config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/nixos/user/config/${x}";
|
ln = config.u.lib.ln "${config.u.confPath}/user/config";
|
||||||
tmuxConfig = config.u.tmux.extraConfig + lib.strings.concatMapStrings (x: "\nrun ${x.rtp}") config.u.tmux.plugins;
|
|
||||||
in {
|
in {
|
||||||
imports = [./kde];
|
imports = [
|
||||||
|
./kde
|
||||||
u.tmux.plugins = with pkgs.tmuxPlugins; [
|
./tmux
|
||||||
vim-tmux-navigator
|
|
||||||
sessionist
|
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.fontconfig.enable = false;
|
fonts.fontconfig.enable = false;
|
||||||
gtk.gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
gtk.gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||||
xresources.path = "${config.xdg.configHome}/Xresources";
|
xresources.path = "${config.xdg.configHome}/Xresources";
|
||||||
|
|
||||||
xdg.configFile.alacritty.source = mkln "alacritty";
|
xdg.configFile.alacritty.source = ln "alacritty";
|
||||||
xdg.configFile.awesome.source = mkln "awesome";
|
xdg.configFile.awesome.source = ln "awesome";
|
||||||
xdg.configFile.bash.source = mkln "bash";
|
xdg.configFile.bash.source = ln "bash";
|
||||||
xdg.configFile.fcitx5.source = ./fcitx5;
|
xdg.configFile.fcitx5.source = ./fcitx5;
|
||||||
xdg.configFile.fontconfig.source = ./fontconfig;
|
xdg.configFile.fontconfig.source = ./fontconfig;
|
||||||
xdg.configFile."gdb/gdbinit.py".source = gdb/gdbinit.py;
|
xdg.configFile."gdb/gdbinit.py".source = gdb/gdbinit.py;
|
||||||
|
|
@ -35,6 +33,5 @@ in {
|
||||||
xdg.configFile.qt5ct.source = ./qt5ct;
|
xdg.configFile.qt5ct.source = ./qt5ct;
|
||||||
xdg.configFile.readline.source = ./readline;
|
xdg.configFile.readline.source = ./readline;
|
||||||
xdg.configFile."starship.toml".source = ./starship.toml;
|
xdg.configFile."starship.toml".source = ./starship.toml;
|
||||||
xdg.configFile.sx.source = mkln "sx";
|
xdg.configFile.sx.source = ln "sx";
|
||||||
xdg.configFile."tmux/tmux.conf".text = (builtins.readFile tmux/tmux.conf) + tmuxConfig;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
14
user/config/tmux/default.nix
Normal file
14
user/config/tmux/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
tmuxConfig = config.u.tmux.extraConfig + lib.strings.concatMapStrings (x: "\nrun ${x.rtp}") config.u.tmux.plugins;
|
||||||
|
in {
|
||||||
|
u.tmux.plugins = with pkgs.tmuxPlugins; [
|
||||||
|
vim-tmux-navigator
|
||||||
|
sessionist
|
||||||
|
];
|
||||||
|
xdg.configFile."tmux/tmux.conf".text = (builtins.readFile ./tmux.conf) + tmuxConfig;
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
{lib, ...}: {
|
{config, lib, ...}: {
|
||||||
options.u = {
|
options.u = {
|
||||||
|
confPath = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
description = "path to nixos config";
|
||||||
|
default = "${config.home.homeDirectory}/.local/nixos";
|
||||||
|
};
|
||||||
tmux = {
|
tmux = {
|
||||||
plugins = lib.mkOption {
|
plugins = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.package;
|
type = lib.types.listOf lib.types.package;
|
||||||
|
|
@ -33,5 +38,14 @@
|
||||||
});
|
});
|
||||||
description = "list of file manager bookmarks";
|
description = "list of file manager bookmarks";
|
||||||
};
|
};
|
||||||
|
lib = lib.mkOption {
|
||||||
|
type = lib.types.attrs;
|
||||||
|
description = "library";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config.u.lib = rec {
|
||||||
|
ln = base: x: config.lib.file.mkOutOfStoreSymlink "${base}/${x}";
|
||||||
|
lnh = ln "${config.home.homeDirectory}";
|
||||||
|
lnn = ln "${config.u.confPath}";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
12
user/xdg.nix
12
user/xdg.nix
|
|
@ -34,12 +34,12 @@
|
||||||
config.common.default = "kde";
|
config.common.default = "kde";
|
||||||
};
|
};
|
||||||
home.file = let
|
home.file = let
|
||||||
mkln = x: config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/${x}";
|
ln = config.u.lib.lnh;
|
||||||
in {
|
in {
|
||||||
".local/home/.cache".source = mkln ".cache";
|
".local/home/.cache".source = ln ".cache";
|
||||||
".local/home/.config".source = mkln ".config";
|
".local/home/.config".source = ln ".config";
|
||||||
".local/home/.local".source = mkln ".local";
|
".local/home/.local".source = ln ".local";
|
||||||
".local/home/Desktop".source = mkln "Desktop";
|
".local/home/Desktop".source = ln "Desktop";
|
||||||
".local/home/Downloads".source = mkln "Downloads";
|
".local/home/Downloads".source = ln "Downloads";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue