From 91fb4f28ef5d87e8bcf7749928d30ba4a9cbbd34 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 19 Feb 2023 17:50:35 +0300 Subject: 2023-02-19 --- modules/common/profiles/default.nix | 90 +++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 modules/common/profiles/default.nix (limited to 'modules/common/profiles/default.nix') diff --git a/modules/common/profiles/default.nix b/modules/common/profiles/default.nix new file mode 100644 index 0000000..06ddaf4 --- /dev/null +++ b/modules/common/profiles/default.nix @@ -0,0 +1,90 @@ +{ + config, + lib, + pkgs, + this, + ... +}: +with lib; let + cfg = config.nixfiles.modules.profiles.default; +in { + imports = [ + ./dev + ./headful.nix + ./headless.nix + (mkAliasOptionModule ["colourScheme"] [ + "nixfiles" + "modules" + "profiles" + "default" + "colourScheme" + ]) + ]; + + options.nixfiles.modules.profiles.default = { + enable = + mkEnableOption "The most default profile of them all." + // { + default = true; + }; + + colourScheme = let + mkColour = default: + mkOption { + type = types.str; + inherit default; + description = "Colour in a standard hexadecimal notation."; + example = "#000000"; + }; + in rec { + black = mkColour "#161719"; + red = mkColour "#cc6666"; + green = mkColour "#b5bd68"; + yellow = mkColour "#f0c674"; + blue = mkColour "#81a2be"; + magenta = mkColour "#b294bb"; + cyan = mkColour "#8abeb7"; + white = mkColour "#c5c8c6"; + + brightBlack = mkColour "#969896"; + brightRed = mkColour "#cc6666"; + brightGreen = mkColour "#b5bd68"; + brightYellow = mkColour "#f0c674"; + brightBlue = mkColour "#81a2be"; + brightMagenta = mkColour "#b294bb"; + brightCyan = mkColour "#8abeb7"; + brightWhite = mkColour "#ffffff"; + + background = black; + foreground = white; + }; + }; + + config = mkIf cfg.enable { + assertions = [ + { + assertion = !(with this; isHeadless && isHeadful); + message = '' + The configuration cannot be both "headful" and "headless" at the same + time. + ''; + } + ]; + + nixfiles.modules = { + htop.enable = true; + tmux.enable = true; + vim.enable = true; + }; + + time.timeZone = "Europe/Moscow"; + + environment.systemPackages = with pkgs; [ + ddrescue + file + git + gnupg + tree + ]; + }; +} -- cgit v1.2.3