about summary refs log tree commit diff
path: root/modules/darwin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/darwin/common/default.nix13
-rw-r--r--modules/darwin/common/home-manager.nix4
-rw-r--r--modules/darwin/common/locale.nix8
-rw-r--r--modules/darwin/common/networking.nix11
-rw-r--r--modules/darwin/common/nix.nix17
-rw-r--r--modules/darwin/common/secrets.nix4
-rw-r--r--modules/darwin/common/shell.nix4
-rw-r--r--modules/darwin/common/stylix.nix12
-rw-r--r--modules/darwin/common/users.nix12
-rw-r--r--modules/darwin/common/xdg.nix24
-rw-r--r--modules/darwin/default.nix9
-rw-r--r--modules/darwin/gnupg.nix13
-rw-r--r--modules/darwin/homebrew.nix29
-rw-r--r--modules/darwin/profiles/default.nix94
-rw-r--r--modules/darwin/profiles/headful.nix33
-rw-r--r--modules/darwin/vim/default.nix38
16 files changed, 0 insertions, 325 deletions
diff --git a/modules/darwin/common/default.nix b/modules/darwin/common/default.nix
deleted file mode 100644
index 04f7b29..0000000
--- a/modules/darwin/common/default.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-_: {
-  imports = [
-    ./home-manager.nix
-    ./locale.nix
-    ./networking.nix
-    ./nix.nix
-    ./secrets.nix
-    ./shell.nix
-    ./stylix.nix
-    ./users.nix
-    ./xdg.nix
-  ];
-}
diff --git a/modules/darwin/common/home-manager.nix b/modules/darwin/common/home-manager.nix
deleted file mode 100644
index 487c64b..0000000
--- a/modules/darwin/common/home-manager.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{ inputs, ... }:
-{
-  imports = [ inputs.home-manager.darwinModule ];
-}
diff --git a/modules/darwin/common/locale.nix b/modules/darwin/common/locale.nix
deleted file mode 100644
index 19770a3..0000000
--- a/modules/darwin/common/locale.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ lib, ... }:
-with lib;
-{
-  environment.variables.LANG = "en_GB.UTF-8";
-
-  # TODO https://daiderd.com/nix-darwin/manual/index.html#opt-system.keyboard.enableKeyMapping
-  system.keyboard = { };
-}
diff --git a/modules/darwin/common/networking.nix b/modules/darwin/common/networking.nix
deleted file mode 100644
index eae7c2f..0000000
--- a/modules/darwin/common/networking.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-  localHostname ? this.hostname,
-  this,
-  ...
-}:
-{
-  networking = {
-    computerName = localHostname;
-    hostName = localHostname;
-  };
-}
diff --git a/modules/darwin/common/nix.nix b/modules/darwin/common/nix.nix
deleted file mode 100644
index 63b0d90..0000000
--- a/modules/darwin/common/nix.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ lib, this, ... }:
-with lib;
-{
-  nix = {
-    daemonIOLowPriority = false;
-    daemonProcessType = "Standard";
-
-    settings.extra-platforms = optionalString (this.system == "aarch64-darwin") ''
-      x86_64-darwin aarch64-darwin
-    '';
-  };
-
-  services.nix-daemon.enable = true;
-
-  # https://github.com/LnL7/nix-darwin/blob/master/CHANGELOG
-  system.stateVersion = 4;
-}
diff --git a/modules/darwin/common/secrets.nix b/modules/darwin/common/secrets.nix
deleted file mode 100644
index 681c5c2..0000000
--- a/modules/darwin/common/secrets.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{ inputs, ... }:
-{
-  imports = [ inputs.agenix.darwinModules.default ];
-}
diff --git a/modules/darwin/common/shell.nix b/modules/darwin/common/shell.nix
deleted file mode 100644
index 2139f2f..0000000
--- a/modules/darwin/common/shell.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{ pkgs, ... }:
-{
-  environment.shells = with pkgs; [ bashInteractive ];
-}
diff --git a/modules/darwin/common/stylix.nix b/modules/darwin/common/stylix.nix
deleted file mode 100644
index 8712172..0000000
--- a/modules/darwin/common/stylix.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  config,
-  inputs,
-  lib,
-  ...
-}:
-with lib;
-{
-  imports = [ inputs.stylix.darwinModules.stylix ];
-
-  fonts.fonts = mkAfter config.nixfiles.modules.common.stylix.fonts.extraPackages;
-}
diff --git a/modules/darwin/common/users.nix b/modules/darwin/common/users.nix
deleted file mode 100644
index 9043f51..0000000
--- a/modules/darwin/common/users.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  lib,
-  localUsername ? lib.my.username,
-  ...
-}:
-with lib;
-{
-  # The only MacOS machine I'm currently using has a pre-configured domain user
-  # account that I have to login as. I may accidentally break something if I
-  # change options here so this section is left practically untouched.
-  users.users.${localUsername}.home = "/Users/${localUsername}";
-}
diff --git a/modules/darwin/common/xdg.nix b/modules/darwin/common/xdg.nix
deleted file mode 100644
index 526dc0b..0000000
--- a/modules/darwin/common/xdg.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ config, lib, ... }:
-with lib;
-let
-  cfg = config.nixfiles.modules.common.xdg;
-in
-{
-  hm.home.sessionVariables =
-    with cfg;
-    {
-      XDG_CACHE_HOME = cacheHome;
-      XDG_CONFIG_HOME = configHome;
-      XDG_DATA_HOME = dataHome;
-      XDG_STATE_HOME = stateHome;
-    }
-    // (with userDirs; {
-      XDG_DOCUMENTS_DIR = documents;
-      XDG_DOWNLOAD_DIR = download;
-      XDG_MUSIC_DIR = music;
-      XDG_PICTURES_DIR = pictures;
-      XDG_PUBLICSHARE_DIR = publicShare;
-      XDG_TEMPLATES_DIR = templates;
-      XDG_VIDEOS_DIR = videos;
-    });
-}
diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix
deleted file mode 100644
index ba7a2a7..0000000
--- a/modules/darwin/default.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-_: {
-  imports = [
-    ./common
-    ./gnupg.nix
-    ./homebrew.nix
-    ./profiles
-    ./vim
-  ];
-}
diff --git a/modules/darwin/gnupg.nix b/modules/darwin/gnupg.nix
deleted file mode 100644
index d8b1cf1..0000000
--- a/modules/darwin/gnupg.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ config, lib, ... }:
-with lib;
-let
-  cfg = config.nixfiles.modules.gnupg;
-in
-{
-  config = mkIf cfg.enable {
-    programs.gnupg.agent = {
-      enable = true;
-      enableSSHSupport = true;
-    };
-  };
-}
diff --git a/modules/darwin/homebrew.nix b/modules/darwin/homebrew.nix
deleted file mode 100644
index 41a2c6c..0000000
--- a/modules/darwin/homebrew.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ config, lib, ... }:
-with lib;
-let
-  cfg = config.nixfiles.modules.homebrew;
-in
-{
-  options.nixfiles.modules.homebrew.enable = mkEnableOption "Homebrew";
-
-  config = mkIf cfg.enable {
-    hm.programs.bash.initExtra = mkAfter ''
-      if [ -x "/opt/homebrew/bin/brew" ]; then
-        export PATH="$PATH:/opt/homebrew/bin"
-      fi
-    '';
-
-    # This option requires an installed Homebrew[1].
-    #
-    # [1]: https://daiderd.com/nix-darwin/manual/index.html#opt-homebrew.enable
-    # [1]: https://brew.sh
-    homebrew = {
-      enable = true;
-      onActivation = {
-        autoUpdate = true;
-        upgrade = true;
-        cleanup = "zap";
-      };
-    };
-  };
-}
diff --git a/modules/darwin/profiles/default.nix b/modules/darwin/profiles/default.nix
deleted file mode 100644
index 9a3353f..0000000
--- a/modules/darwin/profiles/default.nix
+++ /dev/null
@@ -1,94 +0,0 @@
-{
-  config,
-  lib,
-  pkgs,
-  ...
-}:
-with lib;
-let
-  cfg = config.nixfiles.modules.profiles.default;
-in
-{
-  imports = [ ./headful.nix ];
-
-  config = mkIf cfg.enable {
-    hm.home.packages = with pkgs; [ m-cli ];
-
-    system = {
-      defaults = {
-        CustomUserPreferences = { };
-
-        ActivityMonitor = { };
-
-        NSGlobalDomain = {
-          AppleEnableMouseSwipeNavigateWithScrolls = true;
-          AppleEnableSwipeNavigateWithScrolls = true;
-
-          AppleInterfaceStyle = null;
-
-          AppleShowAllExtensions = true;
-          AppleShowAllFiles = true;
-
-          InitialKeyRepeat = 15;
-          KeyRepeat = 2;
-
-          NSAutomaticCapitalizationEnabled = false;
-          NSAutomaticDashSubstitutionEnabled = false;
-          NSAutomaticPeriodSubstitutionEnabled = false;
-          NSAutomaticQuoteSubstitutionEnabled = false;
-          NSAutomaticSpellingCorrectionEnabled = false;
-
-          # Make function keys to work as they should.
-          "com.apple.keyboard.fnState" = true;
-
-          # Disable the absolutely retarded "natural" scrolling.
-          "com.apple.swipescrolldirection" = false;
-        };
-
-        dock = {
-          orientation = "bottom";
-          tilesize = 18;
-
-          # Don't change these options because this will disallow rearranging
-          # shortcuts.
-          show-recents = true;
-          static-only = false;
-
-          # Disable hot corners.
-          wvous-bl-corner = 1;
-          wvous-br-corner = 1;
-          wvous-tl-corner = 1;
-          wvous-tr-corner = 1;
-        };
-
-        finder = {
-          AppleShowAllExtensions = true;
-          AppleShowAllFiles = true;
-
-          CreateDesktop = true;
-
-          FXDefaultSearchScope = "SCcf";
-          FXEnableExtensionChangeWarning = false;
-          FXPreferredViewStyle = "clmv";
-
-          ShowStatusBar = false;
-          ShowPathbar = true;
-          _FXShowPosixPathInTitle = true;
-        };
-
-        trackpad = {
-          Clicking = true;
-          Dragging = false;
-        };
-      };
-
-      keyboard = {
-        enableKeyMapping = true;
-        nonUS.remapTilde = true;
-        remapCapsLockToControl = false;
-        remapCapsLockToEscape = true;
-        swapLeftCommandAndLeftAlt = false;
-      };
-    };
-  };
-}
diff --git a/modules/darwin/profiles/headful.nix b/modules/darwin/profiles/headful.nix
deleted file mode 100644
index 023386b..0000000
--- a/modules/darwin/profiles/headful.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{
-  config,
-  lib,
-  pkgs,
-  ...
-}:
-with lib;
-let
-  cfg = config.nixfiles.modules.profiles.headful;
-in
-{
-  config = mkIf cfg.enable {
-    nixfiles.modules.homebrew.enable = true;
-
-    # I'm addicted to GNU...
-    hm.home.packages = with pkgs; [
-      coreutils
-      findutils
-      getopt
-      gnugrep
-      gnused
-      gnutar
-      gzip
-      which
-    ];
-
-    homebrew.casks = [
-      { name = "firefox"; }
-      { name = "iterm2"; }
-      { name = "telegram-desktop"; }
-    ];
-  };
-}
diff --git a/modules/darwin/vim/default.nix b/modules/darwin/vim/default.nix
deleted file mode 100644
index 4c3f7e1..0000000
--- a/modules/darwin/vim/default.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{
-  config,
-  lib,
-  pkgs,
-  ...
-}:
-with lib;
-let
-  cfg = config.nixfiles.modules.vim;
-in
-{
-  config = mkIf cfg.enable {
-    programs.vim.package =
-      (pkgs.macvim.overrideAttrs (
-        _: _: {
-          # Too much of a hassle to selectively override this. Let's just
-          # explicitly override everything.
-          configureFlags = [
-            "--disable-luainterp"
-            "--disable-python3interp"
-            "--disable-sparkle"
-            "--enable-gui=macvim"
-            "--with-compiledby=Nix"
-            "--with-features=huge"
-            "--with-tlib=ncurses"
-            "--without-local-dir"
-          ];
-        }
-      )).configure
-        (
-          with cfg;
-          {
-            customRC = rc;
-            packages.myVimPackage.start = plugins;
-          }
-        );
-  };
-}

Consider giving Nix/NixOS a try! <3