diff options
Diffstat (limited to '')
-rw-r--r-- | modules/nixos/profiles/default.nix | 37 | ||||
-rw-r--r-- | modules/nixos/profiles/dev/containers.nix | 32 | ||||
-rw-r--r-- | modules/nixos/profiles/dev/default.nix | 30 | ||||
-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 |
5 files changed, 65 insertions, 116 deletions
diff --git a/modules/nixos/profiles/default.nix b/modules/nixos/profiles/default.nix deleted file mode 100644 index 93c46e3..0000000 --- a/modules/nixos/profiles/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; -let - cfg = config.nixfiles.modules.profiles.default; -in -{ - imports = [ - ./dev - ./headful.nix - ./headless.nix - ]; - - config = mkIf cfg.enable { - ark.directories = [ "/var/log" ]; - - programs.less = { - enable = true; - envVariables.LESSHISTFILE = "-"; - }; - - environment.systemPackages = with pkgs; [ - cryptsetup - lshw - lsof - pciutils - psmisc - sysstat - usbutils - util-linux - ]; - }; -} diff --git a/modules/nixos/profiles/dev/containers.nix b/modules/nixos/profiles/dev/containers.nix deleted file mode 100644 index d2a7d62..0000000 --- a/modules/nixos/profiles/dev/containers.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; -let - cfg = config.nixfiles.modules.profiles.dev.containers; -in -{ - config = mkIf cfg.enable { - nixfiles.modules = { - common.shell.aliases.b = "buildah"; - podman.enable = true; - }; - - hm = { - home = { - sessionVariables.MINIKUBE_HOME = "${config.dirs.config}/minikube"; - - packages = with pkgs; [ buildah ]; - }; - - xdg.dataFile."minikube/config/config.json".text = generators.toJSON { } { - config.Rootless = true; - driver = "podman"; - container-runtime = "cri-o"; - }; - }; - }; -} diff --git a/modules/nixos/profiles/dev/default.nix b/modules/nixos/profiles/dev/default.nix deleted file mode 100644 index d2411ea..0000000 --- a/modules/nixos/profiles/dev/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; -let - cfg = config.nixfiles.modules.profiles.dev; -in -{ - imports = [ ./containers.nix ]; - - config = mkIf cfg.enable { - hm.home.language = { - collate = "C"; - messages = "C"; - }; - - programs.wireshark = { - enable = true; - package = pkgs.wireshark; - }; - - my.extraGroups = [ - "kvm" - "wireshark" - ]; - }; -} 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; |