summaryrefslogtreecommitdiff
path: root/modules/shared/base
diff options
context:
space:
mode:
authorseth <[email protected]>2024-10-27 20:12:19 -0400
committerGitHub <[email protected]>2024-10-28 00:12:19 +0000
commit5ec7ee21e036f7bc1cbdec714271c619cb3fdb3d (patch)
tree3277d8ba68ca466e68c58a8373063010db392d2e /modules/shared/base
parent75ec48c5f7dd7877f2294b86764b1fdadc6b7e88 (diff)
modules: restructure (#487)
* seth: remove unused pkgs * modules: restructure from archetypes back to profiles make less actual modules for everything use lib.mkDefault like it's supposed to move mixins out of server * nixos/resolved: use modern options
Diffstat (limited to 'modules/shared/base')
-rw-r--r--modules/shared/base/default.nix24
-rw-r--r--modules/shared/base/nix.nix66
-rw-r--r--modules/shared/base/programs.nix9
3 files changed, 0 insertions, 99 deletions
diff --git a/modules/shared/base/default.nix b/modules/shared/base/default.nix
deleted file mode 100644
index c4b013d..0000000
--- a/modules/shared/base/default.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- config,
- lib,
- inputs,
- ...
-}:
-let
- cfg = config.base;
- inherit (inputs) self;
-in
-{
- options.base = {
- enable = lib.mkEnableOption "basic configurations";
- };
-
- imports = [
- ./nix.nix
- ./programs.nix
- ];
-
- config = lib.mkIf cfg.enable {
- system.configurationRevision = self.rev or self.dirtyRev or "dirty-unknown";
- };
-}
diff --git a/modules/shared/base/nix.nix b/modules/shared/base/nix.nix
deleted file mode 100644
index ebae4dc..0000000
--- a/modules/shared/base/nix.nix
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}:
-let
- inherit (pkgs.stdenv.hostPlatform) isLinux;
- cfg = config.base.nixSettings;
-
- # TODO: remove this nonsense when all implementations remove repl-flake
- hasReplFlake =
- lib.versionOlder config.nix.package.version "2.22.0" # repl-flake was removed in nix 2.22.0
- || lib.versionAtLeast config.nix.package.version "2.90.0"; # but not in lix yet
-
- hasAlwaysAllowSubstitutes = lib.versionAtLeast config.nix.package.version "2.19.0";
-in
-{
- options.base.nixSettings = {
- enable = lib.mkEnableOption "basic Nix settings" // {
- default = config.base.enable;
- defaultText = lib.literalExpression "config.base.enable";
- };
-
- lix.enable = lib.mkEnableOption "the use of Lix over Nix";
- };
-
- config = lib.mkIf cfg.enable (
- lib.mkMerge [
- {
- nix = {
- settings = {
- auto-optimise-store = isLinux;
- experimental-features = [
- "nix-command"
- "flakes"
- "auto-allocate-uids"
- ];
-
- trusted-substituters = [ "https://getchoo.cachix.org" ];
- trusted-public-keys = [ "getchoo.cachix.org-1:ftdbAUJVNaFonM0obRGgR5+nUmdLMM+AOvDOSx0z5tE=" ];
- };
-
- gc = {
- automatic = lib.mkDefault true;
- options = lib.mkDefault "--delete-older-than 2d";
- };
- };
-
- nixpkgs.config.allowUnfree = lib.mkDefault true;
- }
-
- (lib.mkIf cfg.lix.enable {
- nix.package = pkgs.lix;
- })
-
- (lib.mkIf hasReplFlake {
- nix.settings.experimental-features = [ "repl-flake" ];
- })
-
- (lib.mkIf hasAlwaysAllowSubstitutes {
- nix.settings.always-allow-substitutes = true;
- })
- ]
- );
-}
diff --git a/modules/shared/base/programs.nix b/modules/shared/base/programs.nix
deleted file mode 100644
index fc853f8..0000000
--- a/modules/shared/base/programs.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ config, lib, ... }:
-{
- options.base.defaultPrograms = {
- enable = lib.mkEnableOption "default programs" // {
- default = config.base.enable;
- defaultText = lib.literalExpression "config.base.enable";
- };
- };
-}