aboutsummaryrefslogtreecommitdiff
path: root/modules/profiles
diff options
context:
space:
mode:
Diffstat (limited to 'modules/profiles')
-rw-r--r--modules/profiles/core.nix61
-rw-r--r--modules/profiles/default.nix6
-rw-r--r--modules/profiles/desktop.nix59
3 files changed, 126 insertions, 0 deletions
diff --git a/modules/profiles/core.nix b/modules/profiles/core.nix
new file mode 100644
index 0000000..a79505a
--- /dev/null
+++ b/modules/profiles/core.nix
@@ -0,0 +1,61 @@
+{
+ config,
+ lib,
+ options,
+ pkgs,
+ ...
+}:
+{
+ config = {
+ boot = {
+ loader = {
+ efi.canTouchEfiVariables = lib.mkDefault true;
+ limine = {
+ enable = lib.mkDefault config.system.profile.core.enable;
+ extraConfig = lib.mkDefault "quiet";
+ maxGenerations = lib.mkDefault 10;
+ # TODO: secureBoot
+ };
+
+ timeout = 1;
+ };
+
+ tmp.cleanOnBoot = lib.mkDefault true;
+ };
+
+ environment = {
+ systemPackages = with pkgs; [ kakoune ];
+ variables = {
+ EDITOR = "kak";
+ VISUAL = "kak";
+ };
+ };
+
+ hardware.enableRedistributableFirmware = lib.mkDefault config.system.profile.core.enable;
+ i18n = {
+ defaultLocale = lib.mkDefault "en_CA.UTF-8";
+ extraLocales = [
+ "en_US.UTF-8/UTF-8"
+ ];
+ };
+
+ networking = {
+ dhcpcd.enable = lib.mkDefault !config.system.profile.core.enable;
+ nftables.enable = lib.mkDefault config.system.profile.core.enable;
+ };
+
+ nix = {
+ gc = {
+ automatic = lib.mkDefault config.system.profile.core.enable;
+ dates = "weekly";
+ options = "--delete-older-than 15d";
+ };
+
+ settings.experimental-features = [ "flakes" "nix-command" ];
+ };
+
+ programs.nano.enable = lib.mkDefault !config.system.profile.core.enable;
+ };
+
+ options.system.profile.core.enable = lib.mkEnableOption "the core system profile";
+}
diff --git a/modules/profiles/default.nix b/modules/profiles/default.nix
new file mode 100644
index 0000000..ec3fa03
--- /dev/null
+++ b/modules/profiles/default.nix
@@ -0,0 +1,6 @@
+{
+ imports = [
+ ./core.nix
+ ./desktop.nix
+ ];
+}
diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix
new file mode 100644
index 0000000..9de629c
--- /dev/null
+++ b/modules/profiles/desktop.nix
@@ -0,0 +1,59 @@
+{
+ config,
+ lib,
+ options,
+ pkgs,
+ ...
+}:
+{
+ config = {
+ boot = {
+ loader.limine.style = {
+ backdrop = lib.mkDefault "333333";
+ graphicalTerminal = {
+ background = lib.mkDefault "33000000";
+ brightBackground = lib.mkDefault "000000";
+ brightForeground = lib.mkDefault config.boot.loader.limine.style.graphicalTerminal.foreground;
+ brightPalette = lib.mkDefault "585b70;f38ba8;a6e3a1;f9e2af;89b4fa;f5c2e7;94e2d5;bac2de";
+ foreground = lib.mkDefault "cdd6f4";
+ palette = lib.mkDefault "45475a;f38ba8;a6e3a1;f9e2af;89b4fa;f5c2e7;94e2d5;a6adc8";
+ };
+ };
+
+ plymouth = {
+ enable = lib.mkDefault config.system.profile.desktop.enable;
+ #font = lib.mkDefault "${pkgs.fira-code}/...";
+ };
+ };
+
+ console = {
+ colors = lib.mkIf config.system.profile.desktop.enable [
+ "000000"
+ "f38ba8"
+ "a6e3a1"
+ "f9e2af"
+ "89b4fa"
+ "f5c2e7"
+ "94e2d5"
+ "cdd6f4"
+ "585b70"
+ "f38ba8"
+ "a6e3a1"
+ "f9e2af"
+ "89b4fa"
+ "f5c2e7"
+ "94e2d5"
+ "cdd6f4"
+ ];
+
+ earlySetup = lib.mkDefault config.system.profile.desktop.enable;
+ };
+
+ documentation.dev.enable = lib.mkDefault config.system.profile.desktop.enable;
+ fonts.enableDefaultPackages = lib.mkDefault config.system.profile.desktop.enable;
+
+ system.profile.core.enable = lib.mkIf config.system.profile.desktop.enable true;
+ };
+
+ options.system.profile.desktop.enable = lib.mkEnableOption "the desktop system profile";
+}