diff options
author | Azat Bahawi <azat@bahawi.net> | 2024-04-21 02:15:42 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2024-04-21 02:15:42 +0300 |
commit | e6ed60548397627bf10f561f9438201dbba0a36e (patch) | |
tree | f9a84c5957d2cc4fcd148065ee9365a0c851ae1c /modules/nixos/profiles | |
parent | 2024-04-18 (diff) |
2024-04-21
Diffstat (limited to 'modules/nixos/profiles')
-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/nixos/profiles/headful.nix | 91 | ||||
-rw-r--r-- | modules/nixos/profiles/headless.nix | 46 |
5 files changed, 0 insertions, 236 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/nixos/profiles/headful.nix deleted file mode 100644 index 8206aa8..0000000 --- a/modules/nixos/profiles/headful.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; -let - cfg = config.nixfiles.modules.profiles.headful; -in -{ - config = mkIf cfg.enable { - nixfiles.modules = { - chromium.enable = true; - firefox.enable = true; - sound.enable = true; - thunderbird.enable = true; - - nullmailer.enable = true; - - dwm.enable = mkDefault false; - kde.enable = mkDefault true; - xmonad.enable = mkDefault false; - - wayland.enable = mkDefault true; - x11.enable = mkDefault true; - }; - - hm = { - home.packages = with pkgs; [ - calibre - element-desktop - imv - libreoffice-fresh - mumble - telegram-desktop - tor-browser-bundle-bin - ]; - - programs.bash.shellAliases.open = "xdg-open"; - }; - - boot = { - kernelPackages = mkDefault pkgs.linuxPackages_latest; - - kernelParams = [ - # https://wiki.archlinux.org/title/improving_performance#Watchdogs - "nowatchdog" - "kernel.nmi_watchdog=0" - # A security risk I'm willing to take for a reason[1]. - # - # [1]: https://www.phoronix.com/scan.php?page=article&item=spectre-meltdown-2&num=11 - "mitigations=off" - ]; - - loader = { - efi.canTouchEfiVariables = true; - - systemd-boot = { - enable = true; - configurationLimit = 10; - }; - }; - }; - - hardware.opengl = { - enable = true; - driSupport = true; - }; - - programs = { - dconf.enable = true; - iftop.enable = true; - mtr.enable = true; - }; - - services = { - upower.enable = true; - psd.enable = true; - }; - - environment.systemPackages = with pkgs; [ lm_sensors ]; - - my.extraGroups = [ - "audio" - "input" - "render" - "video" - ]; - }; -} diff --git a/modules/nixos/profiles/headless.nix b/modules/nixos/profiles/headless.nix deleted file mode 100644 index f3f3572..0000000 --- a/modules/nixos/profiles/headless.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; -let - cfg = config.nixfiles.modules.profiles.headless; -in -{ - config = mkIf cfg.enable { - nixfiles.modules = { - openssh.server.enable = true; - endlessh-go.enable = true; - - fail2ban.enable = true; - - node-exporter.enable = true; - promtail.enable = false; # FIXME High RAM usage. - }; - - # Pin version to prevent any surprises. Try keeping this up-to-date[1] with - # the latest LTS release + hardened patches (just in case). - # - # [1]: https://kernel.org - boot.kernelPackages = pkgs.linuxPackages_6_6_hardened; - - nix = { - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; - - optimise = { - automatic = true; - dates = [ "daily" ]; - }; - }; - - services.udisks2.enable = false; - - xdg.sounds.enable = false; - }; -} |