diff options
Diffstat (limited to '')
-rw-r--r-- | modules/darwin/common/home-manager.nix | 5 | ||||
-rw-r--r-- | modules/darwin/common/locale.nix | 7 | ||||
-rw-r--r-- | modules/darwin/common/networking.nix | 3 | ||||
-rw-r--r-- | modules/darwin/common/nix.nix | 7 | ||||
-rw-r--r-- | modules/darwin/common/secrets.nix | 5 | ||||
-rw-r--r-- | modules/darwin/common/shell.nix | 5 | ||||
-rw-r--r-- | modules/darwin/common/stylix.nix | 5 | ||||
-rw-r--r-- | modules/darwin/common/users.nix | 3 | ||||
-rw-r--r-- | modules/darwin/common/xdg.nix | 15 | ||||
-rw-r--r-- | modules/darwin/gnupg.nix | 12 | ||||
-rw-r--r-- | modules/darwin/homebrew.nix | 12 | ||||
-rw-r--r-- | modules/darwin/profiles/default.nix | 16 | ||||
-rw-r--r-- | modules/darwin/profiles/headful.nix | 12 | ||||
-rw-r--r-- | modules/darwin/vim/default.nix | 47 |
14 files changed, 81 insertions, 73 deletions
diff --git a/modules/darwin/common/home-manager.nix b/modules/darwin/common/home-manager.nix index 4fc6cbe..487c64b 100644 --- a/modules/darwin/common/home-manager.nix +++ b/modules/darwin/common/home-manager.nix @@ -1,3 +1,4 @@ -{inputs, ...}: { - imports = [inputs.home-manager.darwinModule]; +{ inputs, ... }: +{ + imports = [ inputs.home-manager.darwinModule ]; } diff --git a/modules/darwin/common/locale.nix b/modules/darwin/common/locale.nix index 1ecf6fe..19770a3 100644 --- a/modules/darwin/common/locale.nix +++ b/modules/darwin/common/locale.nix @@ -1,7 +1,8 @@ -{lib, ...}: -with lib; { +{ 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 = {}; + system.keyboard = { }; } diff --git a/modules/darwin/common/networking.nix b/modules/darwin/common/networking.nix index 2843bc4..eae7c2f 100644 --- a/modules/darwin/common/networking.nix +++ b/modules/darwin/common/networking.nix @@ -2,7 +2,8 @@ localHostname ? this.hostname, this, ... -}: { +}: +{ networking = { computerName = localHostname; hostName = localHostname; diff --git a/modules/darwin/common/nix.nix b/modules/darwin/common/nix.nix index 10aeb03..63b0d90 100644 --- a/modules/darwin/common/nix.nix +++ b/modules/darwin/common/nix.nix @@ -1,9 +1,6 @@ +{ lib, this, ... }: +with lib; { - lib, - this, - ... -}: -with lib; { nix = { daemonIOLowPriority = false; daemonProcessType = "Standard"; diff --git a/modules/darwin/common/secrets.nix b/modules/darwin/common/secrets.nix index 0656ae8..681c5c2 100644 --- a/modules/darwin/common/secrets.nix +++ b/modules/darwin/common/secrets.nix @@ -1,3 +1,4 @@ -{inputs, ...}: { - imports = [inputs.agenix.darwinModules.default]; +{ inputs, ... }: +{ + imports = [ inputs.agenix.darwinModules.default ]; } diff --git a/modules/darwin/common/shell.nix b/modules/darwin/common/shell.nix index 5985f50..2139f2f 100644 --- a/modules/darwin/common/shell.nix +++ b/modules/darwin/common/shell.nix @@ -1,3 +1,4 @@ -{pkgs, ...}: { - environment.shells = with pkgs; [bashInteractive]; +{ pkgs, ... }: +{ + environment.shells = with pkgs; [ bashInteractive ]; } diff --git a/modules/darwin/common/stylix.nix b/modules/darwin/common/stylix.nix index cfeed05..8712172 100644 --- a/modules/darwin/common/stylix.nix +++ b/modules/darwin/common/stylix.nix @@ -4,8 +4,9 @@ lib, ... }: -with lib; { - imports = [inputs.stylix.darwinModules.stylix]; +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 index 957e50c..9043f51 100644 --- a/modules/darwin/common/users.nix +++ b/modules/darwin/common/users.nix @@ -3,7 +3,8 @@ localUsername ? lib.my.username, ... }: -with lib; { +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. diff --git a/modules/darwin/common/xdg.nix b/modules/darwin/common/xdg.nix index 9e798ad..526dc0b 100644 --- a/modules/darwin/common/xdg.nix +++ b/modules/darwin/common/xdg.nix @@ -1,12 +1,11 @@ -{ - config, - lib, - ... -}: -with lib; let +{ config, lib, ... }: +with lib; +let cfg = config.nixfiles.modules.common.xdg; -in { - hm.home.sessionVariables = with cfg; +in +{ + hm.home.sessionVariables = + with cfg; { XDG_CACHE_HOME = cacheHome; XDG_CONFIG_HOME = configHome; diff --git a/modules/darwin/gnupg.nix b/modules/darwin/gnupg.nix index 073d3b1..d8b1cf1 100644 --- a/modules/darwin/gnupg.nix +++ b/modules/darwin/gnupg.nix @@ -1,11 +1,9 @@ -{ - config, - lib, - ... -}: -with lib; let +{ config, lib, ... }: +with lib; +let cfg = config.nixfiles.modules.gnupg; -in { +in +{ config = mkIf cfg.enable { programs.gnupg.agent = { enable = true; diff --git a/modules/darwin/homebrew.nix b/modules/darwin/homebrew.nix index 643787a..41a2c6c 100644 --- a/modules/darwin/homebrew.nix +++ b/modules/darwin/homebrew.nix @@ -1,11 +1,9 @@ -{ - config, - lib, - ... -}: -with lib; let +{ config, lib, ... }: +with lib; +let cfg = config.nixfiles.modules.homebrew; -in { +in +{ options.nixfiles.modules.homebrew.enable = mkEnableOption "Homebrew"; config = mkIf cfg.enable { diff --git a/modules/darwin/profiles/default.nix b/modules/darwin/profiles/default.nix index c18f2bb..9a3353f 100644 --- a/modules/darwin/profiles/default.nix +++ b/modules/darwin/profiles/default.nix @@ -4,21 +4,21 @@ pkgs, ... }: -with lib; let +with lib; +let cfg = config.nixfiles.modules.profiles.default; -in { - imports = [ - ./headful.nix - ]; +in +{ + imports = [ ./headful.nix ]; config = mkIf cfg.enable { - hm.home.packages = with pkgs; [m-cli]; + hm.home.packages = with pkgs; [ m-cli ]; system = { defaults = { - CustomUserPreferences = {}; + CustomUserPreferences = { }; - ActivityMonitor = {}; + ActivityMonitor = { }; NSGlobalDomain = { AppleEnableMouseSwipeNavigateWithScrolls = true; diff --git a/modules/darwin/profiles/headful.nix b/modules/darwin/profiles/headful.nix index 826e45a..023386b 100644 --- a/modules/darwin/profiles/headful.nix +++ b/modules/darwin/profiles/headful.nix @@ -4,9 +4,11 @@ pkgs, ... }: -with lib; let +with lib; +let cfg = config.nixfiles.modules.profiles.headful; -in { +in +{ config = mkIf cfg.enable { nixfiles.modules.homebrew.enable = true; @@ -23,9 +25,9 @@ in { ]; homebrew.casks = [ - {name = "firefox";} - {name = "iterm2";} - {name = "telegram-desktop";} + { name = "firefox"; } + { name = "iterm2"; } + { name = "telegram-desktop"; } ]; }; } diff --git a/modules/darwin/vim/default.nix b/modules/darwin/vim/default.nix index e0a6898..4c3f7e1 100644 --- a/modules/darwin/vim/default.nix +++ b/modules/darwin/vim/default.nix @@ -4,28 +4,35 @@ pkgs, ... }: -with lib; let +with lib; +let cfg = config.nixfiles.modules.vim; -in { +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; - }); + (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; + } + ); }; } |