summaryrefslogtreecommitdiff
path: root/modules/darwin
diff options
context:
space:
mode:
authorseth <[email protected]>2023-10-30 04:22:32 -0400
committerseth <[email protected]>2023-10-30 09:46:15 +0000
commit10b0df38b4286237b56ff9177f8d4c5676bfb5c1 (patch)
treeab298c74339bf9bc41571fa88746ecd9c522fbdf /modules/darwin
parent4c2c60a4f2b14c1e6ffaffe5e301dc31ac4fed0f (diff)
tree-wide: refactor
i went overboard on modules. this is much comfier
Diffstat (limited to 'modules/darwin')
-rw-r--r--modules/darwin/base.nix17
-rw-r--r--modules/darwin/default.nix6
-rw-r--r--modules/darwin/desktop.nix30
3 files changed, 53 insertions, 0 deletions
diff --git a/modules/darwin/base.nix b/modules/darwin/base.nix
new file mode 100644
index 0000000..b01bd12
--- /dev/null
+++ b/modules/darwin/base.nix
@@ -0,0 +1,17 @@
+{inputs, ...}: let
+ channelPath = i: "${inputs.${i}.outPath}";
+ mapInputs = fn: map fn (builtins.filter (n: n != "self") (builtins.attrNames inputs));
+in {
+ imports = [../shared];
+
+ nix.nixPath =
+ mapInputs (i: "${i}=${channelPath i}");
+
+ programs = {
+ bash.enable = true;
+ vim.enable = true;
+ zsh.enable = true;
+ };
+
+ services.nix-daemon.enable = true;
+}
diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix
new file mode 100644
index 0000000..a685fab
--- /dev/null
+++ b/modules/darwin/default.nix
@@ -0,0 +1,6 @@
+{
+ flake.darwinModules = {
+ default = ./base.nix;
+ desktop = ./desktop.nix;
+ };
+}
diff --git a/modules/darwin/desktop.nix b/modules/darwin/desktop.nix
new file mode 100644
index 0000000..23664f9
--- /dev/null
+++ b/modules/darwin/desktop.nix
@@ -0,0 +1,30 @@
+{
+ lib,
+ pkgs,
+ ...
+}: {
+ fonts.fonts = with pkgs;
+ lib.mkDefault [
+ (nerdfonts.override {fonts = ["FiraCode"];})
+ ];
+
+ homebrew = {
+ enable = lib.mkDefault true;
+ caskArgs.require_sha = true;
+ onActivation = lib.mkDefault {
+ autoUpdate = true;
+ cleanup = "zap";
+ upgrade = true;
+ };
+
+ caskArgs = {
+ no_quarantine = true;
+ };
+
+ casks = [
+ "chromium"
+ ];
+ };
+
+ programs.gnupg.agent.enable = lib.mkDefault true;
+}