mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 18:19:09 +00:00
users/foo-dogsquared/setups/development: init
This commit is contained in:
parent
a26aa49614
commit
3a49474a5f
@ -14,17 +14,15 @@
|
|||||||
doom-emacs.enable = true;
|
doom-emacs.enable = true;
|
||||||
email.enable = true;
|
email.enable = true;
|
||||||
email.thunderbird.enable = true;
|
email.thunderbird.enable = true;
|
||||||
git.enable = true;
|
|
||||||
keys.gpg.enable = true;
|
keys.gpg.enable = true;
|
||||||
keys.ssh.enable = true;
|
keys.ssh.enable = true;
|
||||||
research.enable = true;
|
research.enable = true;
|
||||||
shell.enable = true;
|
|
||||||
terminal-multiplexer.enable = true;
|
|
||||||
vs-code.enable = true;
|
vs-code.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
setups = {
|
setups = {
|
||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
|
development.enable = true;
|
||||||
fonts.enable = true;
|
fonts.enable = true;
|
||||||
music.enable = true;
|
music.enable = true;
|
||||||
};
|
};
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
./programs/vs-code.nix
|
./programs/vs-code.nix
|
||||||
|
|
||||||
./setups/desktop.nix
|
./setups/desktop.nix
|
||||||
|
./setups/development.nix
|
||||||
./setups/fonts.nix
|
./setups/fonts.nix
|
||||||
./setups/music.nix
|
./setups/music.nix
|
||||||
];
|
];
|
||||||
|
@ -0,0 +1,57 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
userCfg = config.users.foo-dogsquared;
|
||||||
|
cfg = userCfg.setups.development;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.users.foo-dogsquared.setups.development.enable =
|
||||||
|
lib.mkEnableOption "foo-dogsquared's software development setup";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||||
|
{
|
||||||
|
users.foo-dogsquared.programs = {
|
||||||
|
shell.enable = lib.mkDefault true;
|
||||||
|
git.enable = lib.mkDefault true;
|
||||||
|
terminal-multiplexer.enable = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
|
||||||
|
profiles.dev = {
|
||||||
|
enable = true;
|
||||||
|
extras.enable = true;
|
||||||
|
coreutils-replacement.enable = true;
|
||||||
|
shell.enable = true;
|
||||||
|
servers.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
cachix # Compile no more by using someone's binary cache!
|
||||||
|
diffoscope # Oversized caffeine grinder.
|
||||||
|
regex-cli # Save some face of confusion for yourself.
|
||||||
|
dt # Get that functional gawk.
|
||||||
|
recode # Convert between different encodings.
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
(lib.mkIf userCfg.programs.git.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
diffoscope
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.git.settings = {
|
||||||
|
config.difftool.prompt = false;
|
||||||
|
|
||||||
|
# Yeah, let's use this oversized diff tool, shall we?
|
||||||
|
# Also, this config is based from this tip.
|
||||||
|
# https://lists.reproducible-builds.org/pipermail/diffoscope/2016-April/000193.html
|
||||||
|
config.difftool."diffoscope".cmd = ''
|
||||||
|
"if [ $LOCAL = /dev/null ]; then diffoscope --new-file $REMOTE; else diffoscope $LOCAL $REMOTE; fi"
|
||||||
|
'';
|
||||||
|
|
||||||
|
config.difftool."diffoscope-html".cmd = ''
|
||||||
|
"if [ $LOCAL = /dev/null ]; then diffoscope --new-file $REMOTE --html - | cat; else diffoscope $LOCAL $REMOTE --html - | cat; fi"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user