about summary refs log tree commit diff
path: root/modules/profiles
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/profiles/default.nix (renamed from modules/common/profiles/default.nix)22
-rw-r--r--modules/profiles/dev/containers.nix71
-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
-rw-r--r--modules/profiles/headful.nix (renamed from modules/nixos/profiles/headful.nix)67
-rw-r--r--modules/profiles/headless.nix (renamed from modules/nixos/profiles/headless.nix)15
10 files changed, 171 insertions, 30 deletions
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/profiles/dev/containers.nix b/modules/profiles/dev/containers.nix
new file mode 100644
index 0000000..f75a26b
--- /dev/null
+++ b/modules/profiles/dev/containers.nix
@@ -0,0 +1,71 @@
+{
+  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";
+        b = "buildah";
+      };
+      podman.enable = true;
+    };
+
+    hm = {
+      home = {
+        sessionVariables = {
+          MINIKUBE_HOME = "${config.dirs.config}/minikube";
+          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; [
+          buildah
+          k9s
+          kubectl
+          kubectl-doctor
+          kubectl-images
+          kubectl-tree
+          kubectx
+          kubelogin-oidc
+          kubent
+          kubernetes-helm
+          kubespy
+          minikube
+          skopeo
+          stern
+          telepresence2
+          werf
+        ];
+      };
+
+      xdg.dataFile."minikube/config/config.json".text = generators.toJSON { } {
+        config.Rootless = true;
+        driver = "podman";
+        container-runtime = "cri-o";
+      };
+    };
+  };
+}
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;
diff --git a/modules/nixos/profiles/headful.nix b/modules/profiles/headful.nix
index 8206aa8..20363bc 100644
--- a/modules/nixos/profiles/headful.nix
+++ b/modules/profiles/headful.nix
@@ -2,6 +2,7 @@
   config,
   lib,
   pkgs,
+  this,
   ...
 }:
 with lib;
@@ -9,33 +10,57 @@ 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 = mkDefault true;
+      aria2.enable = true;
       chromium.enable = true;
+      dwm.enable = mkDefault false;
+      emacs.enable = true;
       firefox.enable = true;
+      foot.enable = mkDefault true;
+      kde.enable = mkDefault true;
+      mpv.enable = true;
+      nullmailer.enable = true;
+      openssh.client.enable = true;
+      password-store.enable = true;
       sound.enable = true;
       thunderbird.enable = true;
-
-      nullmailer.enable = true;
-
-      dwm.enable = mkDefault false;
-      kde.enable = mkDefault true;
-      xmonad.enable = mkDefault false;
-
+      vscode.enable = true;
       wayland.enable = mkDefault true;
       x11.enable = mkDefault true;
+      xmonad.enable = mkDefault false;
+      zathura.enable = true;
     };
 
     hm = {
-      home.packages = with pkgs; [
-        calibre
-        element-desktop
-        imv
-        libreoffice-fresh
-        mumble
-        telegram-desktop
-        tor-browser-bundle-bin
-      ];
+      home = {
+        file.".digrc".text = ''
+          +answer
+          +multiline
+          +recurse
+        '';
+
+        packages = with pkgs; [
+          calibre
+          element-desktop
+          fd
+          imv
+          libreoffice-fresh
+          mumble
+          ripgrep
+          sd
+          telegram-desktop
+          tldr
+          tor-browser-bundle-bin
+        ];
+      };
 
       programs.bash.shellAliases.open = "xdg-open";
     };
@@ -79,7 +104,15 @@ in
       psd.enable = true;
     };
 
-    environment.systemPackages = with pkgs; [ lm_sensors ];
+    environment.systemPackages = with pkgs; [
+      arping
+      dnsutils
+      inetutils
+      ldns
+      lm_sensors
+      socat
+      tcpdump
+    ];
 
     my.extraGroups = [
       "audio"
diff --git a/modules/nixos/profiles/headless.nix b/modules/profiles/headless.nix
index f3f3572..7733f3e 100644
--- a/modules/nixos/profiles/headless.nix
+++ b/modules/profiles/headless.nix
@@ -2,6 +2,7 @@
   config,
   lib,
   pkgs,
+  this,
   ...
 }:
 with lib;
@@ -9,6 +10,10 @@ let
   cfg = config.nixfiles.modules.profiles.headless;
 in
 {
+  options.nixfiles.modules.profiles.headless.enable = mkEnableOption "headless profile" // {
+    default = this.isHeadless;
+  };
+
   config = mkIf cfg.enable {
     nixfiles.modules = {
       openssh.server.enable = true;
@@ -20,6 +25,11 @@ in
       promtail.enable = false; # FIXME High RAM usage.
     };
 
+    hm.home.file = {
+      ".hushlogin".text = "";
+      ".bash_history".source = config.hm.lib.file.mkOutOfStoreSymlink "/dev/null";
+    };
+
     # Pin version to prevent any surprises. Try keeping this up-to-date[1] with
     # the latest LTS release + hardened patches (just in case).
     #
@@ -39,6 +49,11 @@ in
       };
     };
 
+    environment.systemPackages = with pkgs; [
+      alacritty.terminfo
+      foot.terminfo
+    ];
+
     services.udisks2.enable = false;
 
     xdg.sounds.enable = false;

Consider giving Nix/NixOS a try! <3