about summary refs log tree commit diff
path: root/modules/system
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-08 08:30:59 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-08 08:30:59 -0700
commit4a53f6321bf137c4cbd8f234dd2027ad9407499b (patch)
tree7ed97487e97bc4da276756bf9d4558a055ef93e8 /modules/system
parenthome: add more configurations for home-manager (diff)
downloadworld-4a53f6321bf137c4cbd8f234dd2027ad9407499b.tar.gz
modules: add a few more
Diffstat (limited to '')
-rw-r--r--modules/system/default.nix13
-rw-r--r--modules/system/fonts/default.nix29
-rw-r--r--modules/system/security/default.nix1
3 files changed, 41 insertions, 2 deletions
diff --git a/modules/system/default.nix b/modules/system/default.nix
index 71a469c..32f560b 100644
--- a/modules/system/default.nix
+++ b/modules/system/default.nix
@@ -1,6 +1,15 @@
 { ... }:
 
 {
-  imports =
-    [ ./packages ./boot ./console ./locale ./nix ./users ./security ./btrfs ];
+  imports = [
+    ./packages
+    ./boot
+    ./console
+    ./locale
+    ./nix
+    ./users
+    ./security
+    ./btrfs
+    ./fonts
+  ];
 }
diff --git a/modules/system/fonts/default.nix b/modules/system/fonts/default.nix
new file mode 100644
index 0000000..df01140
--- /dev/null
+++ b/modules/system/fonts/default.nix
@@ -0,0 +1,29 @@
+{ pkgs, config, lib, ... }:
+let cfg = config.my.systems.fonts;
+in {
+  options.my.systems.fonts = with lib; {
+    enable = mkEnableOption "fonts configuration";
+  };
+
+  config = lib.mkIf cfg.enable {
+    fonts = {
+      enableDefaultFonts = true;
+      fontDir.enable = true;
+      fontconfig.enable = true;
+      fonts = with pkgs; [
+        dejavu_fonts
+        font-awesome_5
+        noto-fonts
+        noto-fonts-cjk # Chinese, Japanese, Korean
+        noto-fonts-emoji
+        noto-fonts-emoji
+        noto-fonts-extra
+        source-code-pro
+        source-sans-pro
+        source-serif-pro
+      ];
+
+      fontconfig.defaultFonts = { monospace = [ "Source Code Pro" ]; };
+    };
+  };
+}
diff --git a/modules/system/security/default.nix b/modules/system/security/default.nix
index 9550e8d..1181e6a 100644
--- a/modules/system/security/default.nix
+++ b/modules/system/security/default.nix
@@ -2,4 +2,5 @@
 
 {
   security.sudo.wheelNeedsPassword = false;
+  security.polkit.enable = true;
 }