about summary refs log tree commit diff
path: root/modules/common/profiles
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/common/profiles
parent2024-04-18 (diff)
2024-04-21
Diffstat (limited to '')
-rw-r--r--modules/common/profiles/dev/containers.nix57
-rw-r--r--modules/common/profiles/headful.nix57
-rw-r--r--modules/common/profiles/headless.nix25
-rw-r--r--modules/profiles/default.nix (renamed from modules/common/profiles/default.nix)22
-rw-r--r--modules/profiles/dev/default.nix (renamed from modules/common/profiles/dev/default.nix)22
-rw-r--r--modules/profiles/dev/gdbinit (renamed from modules/common/profiles/dev/gdbinit)0
-rw-r--r--modules/profiles/dev/ghci.conf (renamed from modules/common/profiles/dev/ghci.conf)0
-rw-r--r--modules/profiles/dev/pystartup.py (renamed from modules/common/profiles/dev/pystartup.py)0
-rw-r--r--modules/profiles/dev/sql.nix (renamed from modules/common/profiles/dev/sql.nix)0
-rw-r--r--modules/profiles/email.nix (renamed from modules/common/profiles/email.nix)4
10 files changed, 35 insertions, 152 deletions
diff --git a/modules/common/profiles/dev/containers.nix b/modules/common/profiles/dev/containers.nix
deleted file mode 100644
index 8f3bfc6..0000000
--- a/modules/common/profiles/dev/containers.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{
-  config,
-  lib,
-  pkgs,
-  ...
-}:
-with lib;
-let
-  cfg = config.nixfiles.modules.profiles.dev.containers;
-in
-{
-  options.nixfiles.modules.profiles.dev.containers.enable =
-    mkEnableOption "Tools for working with containers and container orchestration"
-    // {
-      default = config.nixfiles.modules.profiles.dev.enable;
-    };
-
-  config = mkIf cfg.enable {
-    nixfiles.modules.common.shell.aliases = {
-      h = "helm";
-      k = "kubectl";
-      kns = "kubens";
-      ktx = "kubectx";
-    };
-
-    hm.home = {
-      sessionVariables = {
-        MINIKUBE_IN_STYLE = "false";
-        WERF_DEV = "true";
-        WERF_INSECURE_REGISTRY = "true";
-        WERF_LOG_DEBUG = "true";
-        WERF_LOG_PRETTY = "false";
-        WERF_LOG_VERBOSE = "true";
-        WERF_SYNCHRONIZATION = ":local";
-        WERF_TELEMETRY = "false";
-      };
-
-      packages = with pkgs; [
-        k9s
-        kubectl
-        kubectl-doctor
-        kubectl-images
-        kubectl-tree
-        kubectx
-        kubelogin-oidc
-        kubent
-        kubernetes-helm
-        kubespy
-        minikube
-        skopeo
-        stern
-        telepresence2
-        werf
-      ];
-    };
-  };
-}
diff --git a/modules/common/profiles/headful.nix b/modules/common/profiles/headful.nix
deleted file mode 100644
index cd29225..0000000
--- a/modules/common/profiles/headful.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{
-  config,
-  lib,
-  pkgs,
-  this,
-  ...
-}:
-with lib;
-let
-  cfg = config.nixfiles.modules.profiles.headful;
-in
-{
-  options.nixfiles.modules.profiles.headful.enable = mkEnableOption "headful profile" // {
-    default = this.isHeadful;
-  };
-
-  config = mkIf cfg.enable {
-    nixfiles.modules = {
-      profiles.dev.enable = true;
-
-      alacritty.enable = true;
-      aria2.enable = true;
-      emacs.enable = true;
-      mpv.enable = true;
-      openssh.client.enable = true;
-      password-store.enable = true;
-      vscode.enable = true;
-      zathura.enable = true;
-    };
-
-    hm = {
-      home = {
-        file.".digrc".text = ''
-          +answer
-          +multiline
-          +recurse
-        '';
-
-        packages = with pkgs; [
-          fd
-          ripgrep
-          sd
-          tldr
-        ];
-      };
-    };
-
-    environment.systemPackages = with pkgs; [
-      arping
-      dnsutils
-      inetutils
-      ldns
-      socat
-      tcpdump
-    ];
-  };
-}
diff --git a/modules/common/profiles/headless.nix b/modules/common/profiles/headless.nix
deleted file mode 100644
index 1f8096c..0000000
--- a/modules/common/profiles/headless.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-  config,
-  lib,
-  pkgs,
-  this,
-  ...
-}:
-with lib;
-let
-  cfg = config.nixfiles.modules.profiles.headless;
-in
-{
-  options.nixfiles.modules.profiles.headless.enable = mkEnableOption "headless profile" // {
-    default = this.isHeadless;
-  };
-
-  config = mkIf cfg.enable {
-    hm.home.file = {
-      ".hushlogin".text = "";
-      ".bash_history".source = config.hm.lib.file.mkOutOfStoreSymlink "/dev/null";
-    };
-
-    environment.systemPackages = with pkgs; [ alacritty.terminfo ];
-  };
-}
diff --git a/modules/common/profiles/default.nix b/modules/profiles/default.nix
index 79ce39d..e3002b0 100644
--- a/modules/common/profiles/default.nix
+++ b/modules/profiles/default.nix
@@ -10,12 +10,7 @@ let
   cfg = config.nixfiles.modules.profiles.default;
 in
 {
-  imports = [
-    ./dev
-    ./email.nix
-    ./headful.nix
-    ./headless.nix
-  ];
+  imports = attrValues (modulesIn ./.);
 
   options.nixfiles.modules.profiles.default.enable =
     mkEnableOption "The most default profile of them all."
@@ -34,6 +29,8 @@ in
       }
     ];
 
+    ark.directories = [ "/var/log" ];
+
     nixfiles.modules = {
       bat.enable = true;
       eza.enable = true;
@@ -42,11 +39,24 @@ in
       vim.enable = true;
     };
 
+    programs.less = {
+      enable = true;
+      envVariables.LESSHISTFILE = "-";
+    };
+
     time.timeZone = "Europe/Moscow";
 
     environment.systemPackages = with pkgs; [
+      cryptsetup
       file
+      lshw
+      lsof
+      pciutils
+      psmisc
+      sysstat
       tree
+      usbutils
+      util-linux
     ];
   };
 }
diff --git a/modules/common/profiles/dev/default.nix b/modules/profiles/dev/default.nix
index 6ac1fe6..eab447c 100644
--- a/modules/common/profiles/dev/default.nix
+++ b/modules/profiles/dev/default.nix
@@ -9,11 +9,7 @@ let
   cfg = config.nixfiles.modules.profiles.dev;
 in
 {
-  imports = [
-    ./containers.nix
-    ./hidden.nix
-    ./sql.nix
-  ];
+  imports = attrValues (modulesIn ./.);
 
   options.nixfiles.modules.profiles.dev.enable = mkEnableOption "Catch-all profile for stuff related to software development and etc.";
 
@@ -24,7 +20,6 @@ in
       direnv.enable = true;
       editorconfig.enable = true;
       git.client.enable = true;
-      gnupg.enable = true;
       nmap.enable = true;
       wget.enable = true;
     };
@@ -73,6 +68,11 @@ in
           sops
           yq
         ];
+
+        language = {
+          collate = "C";
+          messages = "C";
+        };
       };
 
       xdg.configFile = {
@@ -80,5 +80,15 @@ in
         "ghc/ghci.conf".source = ./ghci.conf;
       };
     };
+
+    programs.wireshark = {
+      enable = true;
+      package = pkgs.wireshark;
+    };
+
+    my.extraGroups = [
+      "kvm"
+      "wireshark"
+    ];
   };
 }
diff --git a/modules/common/profiles/dev/gdbinit b/modules/profiles/dev/gdbinit
index e266236..e266236 100644
--- a/modules/common/profiles/dev/gdbinit
+++ b/modules/profiles/dev/gdbinit
diff --git a/modules/common/profiles/dev/ghci.conf b/modules/profiles/dev/ghci.conf
index d672167..d672167 100644
--- a/modules/common/profiles/dev/ghci.conf
+++ b/modules/profiles/dev/ghci.conf
diff --git a/modules/common/profiles/dev/pystartup.py b/modules/profiles/dev/pystartup.py
index adde66c..adde66c 100644
--- a/modules/common/profiles/dev/pystartup.py
+++ b/modules/profiles/dev/pystartup.py
diff --git a/modules/common/profiles/dev/sql.nix b/modules/profiles/dev/sql.nix
index c2d4894..c2d4894 100644
--- a/modules/common/profiles/dev/sql.nix
+++ b/modules/profiles/dev/sql.nix
diff --git a/modules/common/profiles/email.nix b/modules/profiles/email.nix
index cf4169c..b2ef02f 100644
--- a/modules/common/profiles/email.nix
+++ b/modules/profiles/email.nix
@@ -15,6 +15,8 @@ in
   };
 
   config = mkIf cfg.enable {
+    nixfiles.modules.gnupg.enable = true;
+
     hm = {
       accounts.email = {
         maildirBasePath = "${config.my.home}/doc/mail";
@@ -34,7 +36,7 @@ in
                   msmtp.enable = true;
                   mu.enable = true;
                   thunderbird = {
-                    enable = hasSuffix "linux" this.system;
+                    enable = true;
                     settings = id: {
                       "mail.identity.id_${id}.compose_html" = false;
                       "mail.identity.id_${id}.reply_on_top" = 0;

Consider giving Nix/NixOS a try! <3