summaryrefslogtreecommitdiff
path: root/modules/profiles/dev/default.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
committerAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
commite6ed60548397627bf10f561f9438201dbba0a36e (patch)
treef9a84c5957d2cc4fcd148065ee9365a0c851ae1c /modules/profiles/dev/default.nix
parent9ac64328603d44bd272175942d3ea3eaadcabd04 (diff)
2024-04-21
Diffstat (limited to 'modules/profiles/dev/default.nix')
-rw-r--r--modules/profiles/dev/default.nix94
1 files changed, 94 insertions, 0 deletions
diff --git a/modules/profiles/dev/default.nix b/modules/profiles/dev/default.nix
new file mode 100644
index 0000000..eab447c
--- /dev/null
+++ b/modules/profiles/dev/default.nix
@@ -0,0 +1,94 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+with lib;
+let
+ cfg = config.nixfiles.modules.profiles.dev;
+in
+{
+ imports = attrValues (modulesIn ./.);
+
+ options.nixfiles.modules.profiles.dev.enable = mkEnableOption "Catch-all profile for stuff related to software development and etc.";
+
+ config = mkIf cfg.enable {
+ nixfiles.modules = {
+ bat.enable = true;
+ curl.enable = true;
+ direnv.enable = true;
+ editorconfig.enable = true;
+ git.client.enable = true;
+ nmap.enable = true;
+ wget.enable = true;
+ };
+
+ hm = {
+ home = {
+ sessionVariables = rec {
+ CABAL_DIR = "${config.dirs.data}/cabal";
+ CABAL_CONFIG = pkgs.writeText "cabal-config" ''
+ repository hackage.haskell.org
+ url: https://hackage.haskell.org/
+ secure: True
+
+ jobs: $ncpus
+
+ remote-repo-cache: ${CABAL_DIR}/packages
+
+ world-file: ${CABAL_DIR}/world
+
+ logs-dir: ${CABAL_DIR}/logs
+ build-summary: ${CABAL_DIR}/logs/build.log
+
+ installdir: ${CABAL_DIR}/bin
+ extra-prog-path: ${CABAL_DIR}/bin
+ '';
+ STACK_ROOT = "${config.dirs.data}/stack";
+
+ RUSTUP_HOME = "${config.dirs.data}/rustup";
+ CARGO_HOME = "${config.dirs.data}/cargo";
+
+ GOPATH = "${config.dirs.data}/go";
+ GORE_HOME = "${config.dirs.data}/gore";
+
+ PYTHONSTARTUP = ./pystartup.py;
+ };
+
+ packages = with pkgs; [
+ age
+ htmlq
+ httpie
+ hydra-check
+ jq
+ logcli
+ nix-update
+ nixpkgs-review
+ sops
+ yq
+ ];
+
+ language = {
+ collate = "C";
+ messages = "C";
+ };
+ };
+
+ xdg.configFile = {
+ "gdb/gdbinit".source = ./gdbinit;
+ "ghc/ghci.conf".source = ./ghci.conf;
+ };
+ };
+
+ programs.wireshark = {
+ enable = true;
+ package = pkgs.wireshark;
+ };
+
+ my.extraGroups = [
+ "kvm"
+ "wireshark"
+ ];
+ };
+}