Make configuration more modular
This commit is contained in:
parent
2995c006ed
commit
384da2a640
17 changed files with 97 additions and 72 deletions
|
@ -7,37 +7,12 @@
|
||||||
imports = [
|
imports = [
|
||||||
./modules/alacritty.nix
|
./modules/alacritty.nix
|
||||||
./modules/autorandr.nix
|
./modules/autorandr.nix
|
||||||
|
./modules/copyq.nix
|
||||||
|
./modules/dunst.nix
|
||||||
./modules/espanso.nix
|
./modules/espanso.nix
|
||||||
|
./modules/feh.nix
|
||||||
|
./modules/flameshot.nix
|
||||||
./modules/i3.nix
|
./modules/i3.nix
|
||||||
|
./modules/rofi.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
services.dunst = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
global = {
|
|
||||||
follow = "keyboard";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.copyq.enable = true;
|
|
||||||
|
|
||||||
services.flameshot = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
General = {
|
|
||||||
disabledTrayIcon = false;
|
|
||||||
saveAfterCopy = true;
|
|
||||||
savePath = "/home/${username}/Pictures/Screenshots";
|
|
||||||
showHelp = false;
|
|
||||||
uiColor = "#60a5fa";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.feh.enable = true;
|
|
||||||
|
|
||||||
programs.rofi.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
3
lib/nixos/home-manager/modules/copyq.nix
Normal file
3
lib/nixos/home-manager/modules/copyq.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
services.copyq.enable = true;
|
||||||
|
}
|
11
lib/nixos/home-manager/modules/dunst.nix
Normal file
11
lib/nixos/home-manager/modules/dunst.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
services.dunst = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
follow = "keyboard";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
3
lib/nixos/home-manager/modules/feh.nix
Normal file
3
lib/nixos/home-manager/modules/feh.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
programs.feh.enable = true;
|
||||||
|
}
|
15
lib/nixos/home-manager/modules/flameshot.nix
Normal file
15
lib/nixos/home-manager/modules/flameshot.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{username, ...}: {
|
||||||
|
services.flameshot = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
disabledTrayIcon = false;
|
||||||
|
saveAfterCopy = true;
|
||||||
|
savePath = "/home/${username}/Pictures/Screenshots";
|
||||||
|
showHelp = false;
|
||||||
|
uiColor = "#60a5fa";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
3
lib/nixos/home-manager/modules/rofi.nix
Normal file
3
lib/nixos/home-manager/modules/rofi.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
programs.rofi.enable = true;
|
||||||
|
}
|
|
@ -28,7 +28,6 @@ with pkgs; [
|
||||||
php82
|
php82
|
||||||
php82Packages.composer
|
php82Packages.composer
|
||||||
pv
|
pv
|
||||||
ripgrep
|
|
||||||
rustywind
|
rustywind
|
||||||
tldr
|
tldr
|
||||||
tree
|
tree
|
||||||
|
|
|
@ -13,48 +13,17 @@
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
(import ./modules/neovim.nix {inherit inputs;})
|
(import ./modules/neovim.nix {inherit inputs;})
|
||||||
|
./modules/bat.nix
|
||||||
|
./modules/bin.nix
|
||||||
|
./modules/direnv.nix
|
||||||
|
./modules/fzf.nix
|
||||||
./modules/git.nix
|
./modules/git.nix
|
||||||
|
./modules/lsd.nix
|
||||||
|
./modules/nnn.nix
|
||||||
|
./modules/phpactor.nix
|
||||||
|
./modules/ripgrep.nix
|
||||||
./modules/starship.nix
|
./modules/starship.nix
|
||||||
./modules/tmux.nix
|
./modules/tmux.nix
|
||||||
./modules/zsh.nix
|
./modules/zsh.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.fzf = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.bat.enable = true;
|
|
||||||
|
|
||||||
home.file."logo.txt" = {
|
|
||||||
source = pkgs.copyPathToStore "${self}/logo.txt";
|
|
||||||
target = "logo.txt";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.lsd.enable = true;
|
|
||||||
|
|
||||||
programs.nnn.enable = true;
|
|
||||||
|
|
||||||
programs.direnv = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
nix-direnv.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.sessionPath = ["$HOME/.config/bin"];
|
|
||||||
|
|
||||||
xdg.configFile."ripgrep/config".text = ''
|
|
||||||
--follow
|
|
||||||
--smart-case
|
|
||||||
'';
|
|
||||||
|
|
||||||
xdg.configFile.bin = {
|
|
||||||
source = ../../bin;
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile.phpactor = {
|
|
||||||
source = ../../config/phpactor;
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
3
lib/shared/modules/bat.nix
Normal file
3
lib/shared/modules/bat.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
programs.bat.enable = true;
|
||||||
|
}
|
8
lib/shared/modules/bin.nix
Normal file
8
lib/shared/modules/bin.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
home.sessionPath = ["$HOME/.config/bin"];
|
||||||
|
|
||||||
|
xdg.configFile.bin = {
|
||||||
|
source = ../../../bin;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
}
|
7
lib/shared/modules/direnv.nix
Normal file
7
lib/shared/modules/direnv.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
}
|
6
lib/shared/modules/fzf.nix
Normal file
6
lib/shared/modules/fzf.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
3
lib/shared/modules/lsd.nix
Normal file
3
lib/shared/modules/lsd.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
programs.lsd.enable = true;
|
||||||
|
}
|
3
lib/shared/modules/nnn.nix
Normal file
3
lib/shared/modules/nnn.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
programs.nnn.enable = true;
|
||||||
|
}
|
6
lib/shared/modules/phpactor.nix
Normal file
6
lib/shared/modules/phpactor.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
xdg.configFile.phpactor = {
|
||||||
|
source = ../../../config/phpactor;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
}
|
8
lib/shared/modules/ripgrep.nix
Normal file
8
lib/shared/modules/ripgrep.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [ripgrep];
|
||||||
|
|
||||||
|
xdg.configFile."ripgrep/config".text = ''
|
||||||
|
--follow
|
||||||
|
--smart-case
|
||||||
|
'';
|
||||||
|
}
|
|
@ -1,6 +1,9 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: let
|
||||||
|
inherit (pkgs) tmuxPlugins;
|
||||||
|
in {
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
terminal = "tmux-256color";
|
terminal = "tmux-256color";
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
@ -99,7 +102,7 @@
|
||||||
set -g @resurrect-strategy-nvim 'session'
|
set -g @resurrect-strategy-nvim 'session'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
plugins = with pkgs; [
|
plugins = [
|
||||||
tmuxPlugins.resurrect
|
tmuxPlugins.resurrect
|
||||||
tmuxPlugins.vim-tmux-navigator
|
tmuxPlugins.vim-tmux-navigator
|
||||||
tmuxPlugins.yank
|
tmuxPlugins.yank
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue