summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-01-04 23:54:31 +0100
committerDaiderd Jordan <daiderd@gmail.com>2018-01-05 00:06:14 +0100
commit3dfc5da1e7d7a03256ccab1891b2d9ef9e40c299 (patch)
tree9a6f12da2944d328ff0df5673d8427b7e6e80787 /modules/system
parent2c4444ede40fe9cad3a11d5eee6d47c90c9edabe (diff)
remove unused file
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/defaults/default.nix48
1 files changed, 0 insertions, 48 deletions
diff --git a/modules/system/defaults/default.nix b/modules/system/defaults/default.nix
deleted file mode 100644
index cb78518..0000000
--- a/modules/system/defaults/default.nix
+++ /dev/null
@@ -1,48 +0,0 @@
-{ config, lib, ... }:
-
-with lib;
-
-let
-
- cfg = config.system.defaults;
-
- writeValue = value:
- if isBool value then "-bool ${if value then "YES" else "NO"}" else
- if isInt value then "-int ${toString value}" else
- if isString value then "-string '${value}'" else
- throw "invalid value type";
-
- writeDefault = domain: key: value:
- "defaults write ${domain} '${key}' ${writeValue value}";
-
- defaultsToList = domain: attrs: mapAttrsToList (writeDefault domain) (filterAttrs (n: v: v != null) attrs);
-
- global = defaultsToList "-g" cfg.global;
- dock = defaultsToList "com.apple.dock" cfg.dock;
- finder = defaultsToList "com.apple.finder" cfg.finder;
- trackpad = defaultsToList "com.apple.AppleMultitouchTrackpad" cfg.trackpad;
- trackpadBluetooth = defaultsToList "com.apple.driver.AppleBluetoothMultitouch.trackpad" cfg.trackpad;
- LaunchServices = defaultsToList "com.apple.LaunchServices" cfg.LaunchServices;
-
-in
-
-{
- options = {
- };
-
- config = {
-
- system.activationScripts.defaults.text = ''
- # Set defaults
- echo "writing defaults..." >&2
-
- ${concatStringsSep "\n" global}
- ${concatStringsSep "\n" dock}
- ${concatStringsSep "\n" finder}
- ${concatStringsSep "\n" trackpad}
- ${concatStringsSep "\n" trackpadBluetooth}
- ${concatStringsSep "\n" LaunchServices}
- '';
-
- };
-}