2020-08-09 18:32:27 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
2020-08-16 21:05:10 +00:00
|
|
|
cfg = config.elkowar.base;
|
2020-08-24 13:57:25 +00:00
|
|
|
elkowar_local = import ../local/default.nix {};
|
2020-08-16 21:05:10 +00:00
|
|
|
sources = import ../nix/sources.nix;
|
2020-08-25 22:26:00 +00:00
|
|
|
|
|
|
|
addFlags = package: name: flags: pkgs.symlinkJoin {
|
|
|
|
name = name;
|
|
|
|
paths = [ package ];
|
|
|
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
|
|
|
postBuild = ''
|
|
|
|
wrapProgram $out/bin/${name} --add-flags "${flags}"
|
|
|
|
'';
|
|
|
|
};
|
2020-08-09 18:32:27 +00:00
|
|
|
in
|
|
|
|
{
|
2020-08-16 21:05:10 +00:00
|
|
|
options.elkowar.base = {
|
2020-08-09 18:32:27 +00:00
|
|
|
enable = lib.mkEnableOption "Basic profile enabled";
|
2020-08-11 15:56:16 +00:00
|
|
|
enableFish = lib.mkEnableOption "Fish shell";
|
|
|
|
enableZsh = lib.mkEnableOption "Zsh shell";
|
2020-08-24 13:57:25 +00:00
|
|
|
includeNiceToHaves = lib.mkEnableOption "Add nice-to-have, non-essential programs";
|
2020-08-25 22:26:00 +00:00
|
|
|
includeHaskellDev = lib.mkEnableOption "Include large haskell development packages";
|
2020-08-09 18:32:27 +00:00
|
|
|
};
|
|
|
|
|
2020-08-16 21:05:10 +00:00
|
|
|
imports = [ ./term ./generalConfig.nix ];
|
2020-08-11 14:25:46 +00:00
|
|
|
|
2020-08-09 18:32:27 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2020-08-11 14:25:46 +00:00
|
|
|
elkowar.programs.tmux.enable = true;
|
2020-08-11 15:56:16 +00:00
|
|
|
elkowar.programs.zsh.enable = cfg.enableZsh;
|
|
|
|
elkowar.programs.fish.enable = cfg.enableFish;
|
|
|
|
elkowar.generalConfig.shellAbbrs = {
|
2020-08-16 21:05:10 +00:00
|
|
|
vim = "nvim";
|
2020-08-24 13:57:25 +00:00
|
|
|
cxmonad = "cd ~/.xmonad && nvim /home/leon/.xmonad/lib/Config.hs && cd -";
|
2020-08-16 21:05:10 +00:00
|
|
|
cnix = "cd ~/nixpkgs/ && nvim home.nix && cd -";
|
2020-08-24 13:57:25 +00:00
|
|
|
cvim = "cd ~/.config/nvim/ && nvim init.vim && cd -";
|
2020-08-11 15:56:16 +00:00
|
|
|
|
2020-08-16 21:05:10 +00:00
|
|
|
gaa = "git add --all";
|
|
|
|
gc = "git commit -m ";
|
|
|
|
gp = "git push";
|
2020-08-24 13:57:25 +00:00
|
|
|
gst = "git status";
|
2020-08-11 14:25:46 +00:00
|
|
|
};
|
|
|
|
|
2020-08-24 13:57:25 +00:00
|
|
|
home.packages = with pkgs; lib.mkMerge [
|
|
|
|
[
|
|
|
|
sources.manix
|
|
|
|
direnv
|
|
|
|
rnix-lsp
|
|
|
|
niv
|
|
|
|
exa
|
|
|
|
trash-cli
|
|
|
|
ripgrep
|
|
|
|
fd
|
|
|
|
jq
|
2020-08-25 22:26:00 +00:00
|
|
|
nodejs
|
|
|
|
nodePackages.bash-language-server
|
|
|
|
nodePackages.dockerfile-language-server-nodejs
|
2020-09-07 19:04:03 +00:00
|
|
|
cargo-outdated
|
2020-09-25 18:56:00 +00:00
|
|
|
manix
|
|
|
|
catimg
|
|
|
|
bat
|
2020-08-09 18:32:27 +00:00
|
|
|
|
2020-08-24 13:57:25 +00:00
|
|
|
cachix
|
|
|
|
]
|
|
|
|
(
|
|
|
|
lib.mkIf cfg.includeNiceToHaves [
|
2020-08-25 22:26:00 +00:00
|
|
|
(addFlags glow "glow" "--style ~/.config/glowStyle.json")
|
|
|
|
mdcat
|
2020-08-24 13:57:25 +00:00
|
|
|
haskellPackages.nix-tree
|
|
|
|
cloc
|
|
|
|
fet-sh
|
|
|
|
github-cli
|
|
|
|
websocat
|
|
|
|
gtop
|
2020-08-25 22:26:00 +00:00
|
|
|
nix-prefetch
|
2020-09-20 08:29:51 +00:00
|
|
|
cargo-bloat
|
|
|
|
sccache
|
|
|
|
bpytop
|
|
|
|
cargo-watch
|
|
|
|
cargo-expand
|
2020-09-25 18:56:00 +00:00
|
|
|
gdbgui
|
|
|
|
lldb
|
2020-11-01 12:51:00 +00:00
|
|
|
zola
|
2020-11-07 13:05:49 +00:00
|
|
|
python38Packages.pylint
|
2020-11-14 22:32:12 +00:00
|
|
|
gitAndTools.gitflow
|
|
|
|
gitAndTools.tig
|
|
|
|
gitAndTools.gitui
|
2020-12-25 10:53:37 +00:00
|
|
|
#pakcs
|
|
|
|
rlwrap
|
|
|
|
irssi
|
|
|
|
hexchat
|
|
|
|
swiPrologWithGui
|
|
|
|
kmonad
|
2021-01-02 16:33:37 +00:00
|
|
|
gitAndTools.delta
|
|
|
|
git-fuzzy
|
2020-08-25 22:26:00 +00:00
|
|
|
]
|
|
|
|
)
|
|
|
|
(
|
|
|
|
lib.mkIf cfg.includeHaskellDev [
|
|
|
|
cabal2nix
|
|
|
|
cabal-install
|
2020-12-25 10:53:37 +00:00
|
|
|
ormolu
|
2020-08-24 13:57:25 +00:00
|
|
|
]
|
|
|
|
)
|
2020-08-09 18:32:27 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
programs = {
|
|
|
|
home-manager.enable = true;
|
|
|
|
htop.enable = true;
|
|
|
|
|
2020-08-16 21:05:10 +00:00
|
|
|
|
2020-08-09 18:32:27 +00:00
|
|
|
fzf = {
|
|
|
|
enable = true;
|
2020-08-11 15:56:16 +00:00
|
|
|
enableFishIntegration = cfg.enableFish;
|
|
|
|
enableZshIntegration = cfg.enableZsh;
|
2020-08-09 18:32:27 +00:00
|
|
|
defaultCommand = "rg --files";
|
|
|
|
fileWidgetCommand = "fd --type f";
|
|
|
|
changeDirWidgetCommand = "rg --files --null | xargs -0 dirname | sort -u";
|
|
|
|
};
|
|
|
|
|
|
|
|
direnv = {
|
|
|
|
enable = true;
|
2020-08-11 15:56:16 +00:00
|
|
|
enableFishIntegration = cfg.enableFish;
|
|
|
|
enableZshIntegration = cfg.enableZsh;
|
2020-08-09 18:32:27 +00:00
|
|
|
enableNixDirenvIntegration = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
home = {
|
|
|
|
sessionVariables = rec {
|
|
|
|
LOCALE_ARCHIVE_2_11 = "${pkgs.glibcLocales}/lib/locale/locale-archive";
|
|
|
|
LOCALE_ARCHIVE_2_27 = "${pkgs.glibcLocales}/lib/locale/locale-archive";
|
|
|
|
LOCALE_ARCHIVE = "/usr/bin/locale";
|
|
|
|
|
|
|
|
EDITOR = "nvim";
|
|
|
|
VISUAL = "nvim";
|
|
|
|
GIT_EDITOR = EDITOR;
|
|
|
|
};
|
|
|
|
username = "leon";
|
|
|
|
homeDirectory = "/home/leon";
|
|
|
|
|
|
|
|
stateVersion = "20.09";
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|