Make configuration more modular

This commit is contained in:
Oliver Davies 2024-03-16 22:12:53 +00:00
parent 2995c006ed
commit 384da2a640
17 changed files with 97 additions and 72 deletions

View file

@ -7,37 +7,12 @@
imports = [
./modules/alacritty.nix
./modules/autorandr.nix
./modules/copyq.nix
./modules/dunst.nix
./modules/espanso.nix
./modules/feh.nix
./modules/flameshot.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;
}

View file

@ -0,0 +1,3 @@
{
services.copyq.enable = true;
}

View file

@ -0,0 +1,11 @@
{
services.dunst = {
enable = true;
settings = {
global = {
follow = "keyboard";
};
};
};
}

View file

@ -0,0 +1,3 @@
{
programs.feh.enable = true;
}

View 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";
};
};
};
}

View file

@ -0,0 +1,3 @@
{
programs.rofi.enable = true;
}

View file

@ -28,7 +28,6 @@ with pkgs; [
php82
php82Packages.composer
pv
ripgrep
rustywind
tldr
tree

View file

@ -13,48 +13,17 @@
imports = [
(import ./modules/neovim.nix {inherit inputs;})
./modules/bat.nix
./modules/bin.nix
./modules/direnv.nix
./modules/fzf.nix
./modules/git.nix
./modules/lsd.nix
./modules/nnn.nix
./modules/phpactor.nix
./modules/ripgrep.nix
./modules/starship.nix
./modules/tmux.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;
};
}

View file

@ -0,0 +1,3 @@
{
programs.bat.enable = true;
}

View file

@ -0,0 +1,8 @@
{
home.sessionPath = ["$HOME/.config/bin"];
xdg.configFile.bin = {
source = ../../../bin;
recursive = true;
};
}

View file

@ -0,0 +1,7 @@
{
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
}

View file

@ -0,0 +1,6 @@
{
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
}

View file

@ -0,0 +1,3 @@
{
programs.lsd.enable = true;
}

View file

@ -0,0 +1,3 @@
{
programs.nnn.enable = true;
}

View file

@ -0,0 +1,6 @@
{
xdg.configFile.phpactor = {
source = ../../../config/phpactor;
recursive = true;
};
}

View file

@ -0,0 +1,8 @@
{pkgs, ...}: {
home.packages = with pkgs; [ripgrep];
xdg.configFile."ripgrep/config".text = ''
--follow
--smart-case
'';
}

View file

@ -1,6 +1,9 @@
{pkgs, ...}: {
{pkgs, ...}: let
inherit (pkgs) tmuxPlugins;
in {
programs.tmux = {
enable = true;
terminal = "tmux-256color";
extraConfig = ''
@ -99,7 +102,7 @@
set -g @resurrect-strategy-nvim 'session'
'';
plugins = with pkgs; [
plugins = [
tmuxPlugins.resurrect
tmuxPlugins.vim-tmux-navigator
tmuxPlugins.yank