about summary refs log tree commit diff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/flake/hosts.nix51
-rw-r--r--nix/hosts/darwin/default.nix1
-rw-r--r--nix/hosts/darwin/homebrew.nix (renamed from nix/hosts/common/homebrew.nix)9
-rw-r--r--nix/hosts/darwin/macos.nix (renamed from nix/hosts/common/macos.nix)12
-rw-r--r--nix/hosts/darwin/mba/default.nix (renamed from nix/hosts/mba/default.nix)0
-rw-r--r--nix/hosts/darwin/work/default.nix (renamed from nix/hosts/work/default.nix)0
-rw-r--r--nix/hosts/nixos/vm/default.nix (renamed from nix/hosts/vm/default.nix)16
-rw-r--r--nix/hosts/nixos/vm/hardware.nix (renamed from nix/hosts/vm/hardware.nix)0
-rw-r--r--nix/hosts/nixos/wildcat/configuration.nix (renamed from nix/hosts/wildcat/configuration.nix)0
-rw-r--r--nix/hosts/nixos/wildcat/default.nix (renamed from nix/hosts/wildcat/default.nix)0
-rw-r--r--nix/hosts/nixos/wildcat/hardware.nix (renamed from nix/hosts/wildcat/hardware.nix)0
-rw-r--r--nix/hosts/nixos/wildcat/networking.nix (renamed from nix/hosts/wildcat/networking.nix)0
-rw-r--r--nix/profiles/home-manager/mac.nix4
-rw-r--r--nix/profiles/home-manager/personal.nix2
-rw-r--r--nix/profiles/home-manager/work.nix12
15 files changed, 45 insertions, 62 deletions
diff --git a/nix/flake/hosts.nix b/nix/flake/hosts.nix
index eaa0a45..9426bdd 100644
--- a/nix/flake/hosts.nix
+++ b/nix/flake/hosts.nix
@@ -12,44 +12,37 @@ let
           home-manager = {
             useGlobalPkgs = true;
             useUserPackages = true;
-            extraSpecialArgs = {
-              inherit self;
-            };
+            extraSpecialArgs = { inherit self; };
           };
         }
-        "${self}/nix/hosts/common/homebrew.nix"
-        "${self}/nix/hosts/common/macos.nix"
+        "${self}/nix/hosts/darwin/"
         "${self}/nix/hosts/common/nix.nix"
         path
-        {
-          nixpkgs.overlays = [
-          ];
-        }
+        { nixpkgs.overlays = [ ]; }
       ];
       specialArgs = { inherit inputs self; };
     };
 
-  mkNixosConfig = system: path: nixpkgs.lib.nixosSystem {
-    inherit system;
-    modules = [
-      "${self}/nix/hosts/nixos"
-      path
-    ];
-    specialArgs = { inherit inputs self; };
-  };
+  mkNixosConfig = system: path:
+    nixpkgs.lib.nixosSystem {
+      inherit system;
+      modules =
+        [ "${self}/nix/hosts/nixos" "${self}/nix/hosts/common/nix.nix" path ];
+      specialArgs = { inherit inputs self; };
+    };
 in
 {
-  flake = mkMerge [
-    {
-      darwinConfigurations = {
-        mba-fcuny = mkDarwinConfig "aarch64-darwin" "${self}/nix/hosts/mba";
-        HQ-C02FK3Q7MD6T = mkDarwinConfig "x86_64-darwin" "${self}/nix/hosts/work";
-      };
+  flake = mkMerge [{
+    darwinConfigurations = {
+      mba-fcuny =
+        mkDarwinConfig "aarch64-darwin" "${self}/nix/hosts/darwin/mba";
+      HQ-C02FK3Q7MD6T =
+        mkDarwinConfig "x86_64-darwin" "${self}/nix/hosts/darwin/work";
+    };
 
-      nixosConfigurations = {
-        vm = mkNixosConfig "aarch64-linux" "${self}/nix/hosts/vm";
-        wildcat = mkNixosConfig "x86_64-linux" "${self}/nix/hosts/wildcat";
-      };
-    }
-  ];
+    nixosConfigurations = {
+      vm = mkNixosConfig "aarch64-linux" "${self}/nix/hosts/nixos/vm";
+      wildcat = mkNixosConfig "x86_64-linux" "${self}/nix/hosts/nixos/wildcat";
+    };
+  }];
 }
diff --git a/nix/hosts/darwin/default.nix b/nix/hosts/darwin/default.nix
new file mode 100644
index 0000000..2da9dbc
--- /dev/null
+++ b/nix/hosts/darwin/default.nix
@@ -0,0 +1 @@
+{ ... }: { imports = [ ./homebrew.nix ./macos.nix ]; }
diff --git a/nix/hosts/common/homebrew.nix b/nix/hosts/darwin/homebrew.nix
index 1ba4a93..0840b06 100644
--- a/nix/hosts/common/homebrew.nix
+++ b/nix/hosts/darwin/homebrew.nix
@@ -19,7 +19,7 @@
       "kubebuilder"
     ];
 
-    taps = [ "homebrew/cask-fonts" "hashicorp/tap" ];
+    taps = [ "hashicorp/tap" ];
 
     casks = [
       "1password-cli"
@@ -31,13 +31,6 @@
       "vlc"
       "wireshark"
       "zoom"
-
-      # fonts
-      "font-go"
-      "font-source-code-pro"
-      "font-source-sans-3"
-      "font-source-serif-4"
-      "font-dejavu"
     ];
   };
 }
diff --git a/nix/hosts/common/macos.nix b/nix/hosts/darwin/macos.nix
index e764129..36f680a 100644
--- a/nix/hosts/common/macos.nix
+++ b/nix/hosts/darwin/macos.nix
@@ -1,4 +1,4 @@
-{ ... }: {
+{ pkgs, ... }: {
   system.defaults.dock.autohide = true;
   system.defaults.dock.orientation = "left";
   system.defaults.dock.showhidden = false;
@@ -9,6 +9,16 @@
   system.defaults.screencapture.location = "~/Documents/screenshots";
   system.defaults.SoftwareUpdate.AutomaticallyInstallMacOSUpdates = true;
 
+  fonts.packages = with pkgs; [
+    emacs-all-the-icons-fonts
+    google-fonts
+    roboto
+    source-code-pro
+    source-serif-pro
+    source-sans-pro
+    go-font
+  ];
+
   system.keyboard = {
     enableKeyMapping = true;
     remapCapsLockToControl = true;
diff --git a/nix/hosts/mba/default.nix b/nix/hosts/darwin/mba/default.nix
index 0a5caac..0a5caac 100644
--- a/nix/hosts/mba/default.nix
+++ b/nix/hosts/darwin/mba/default.nix
diff --git a/nix/hosts/work/default.nix b/nix/hosts/darwin/work/default.nix
index 9d5f2c0..9d5f2c0 100644
--- a/nix/hosts/work/default.nix
+++ b/nix/hosts/darwin/work/default.nix
diff --git a/nix/hosts/vm/default.nix b/nix/hosts/nixos/vm/default.nix
index a6dff3a..f4a51aa 100644
--- a/nix/hosts/vm/default.nix
+++ b/nix/hosts/nixos/vm/default.nix
@@ -1,7 +1,5 @@
-{ pkgs, ... }: {
-  imports = [
-    ./hardware.nix
-  ];
+{ ... }: {
+  imports = [ ./hardware.nix ];
 
   boot.tmp.cleanOnBoot = true;
   zramSwap.enable = false;
@@ -14,16 +12,8 @@
   services.openssh.enable = true;
 
   users.users.root.openssh.authorizedKeys.keys = [
-    ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBkozy+X96u5ciX766bJ/AyQ3xm1tXZTIr5+4PVFZFi''
+    "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBkozy+X96u5ciX766bJ/AyQ3xm1tXZTIr5+4PVFZFi"
   ];
 
   system.stateVersion = "23.11";
-
-  environment = {
-    systemPackages = with pkgs; [
-      git
-      jq
-      vim
-    ];
-  };
 }
diff --git a/nix/hosts/vm/hardware.nix b/nix/hosts/nixos/vm/hardware.nix
index 89c3d8b..89c3d8b 100644
--- a/nix/hosts/vm/hardware.nix
+++ b/nix/hosts/nixos/vm/hardware.nix
diff --git a/nix/hosts/wildcat/configuration.nix b/nix/hosts/nixos/wildcat/configuration.nix
index b74f522..b74f522 100644
--- a/nix/hosts/wildcat/configuration.nix
+++ b/nix/hosts/nixos/wildcat/configuration.nix
diff --git a/nix/hosts/wildcat/default.nix b/nix/hosts/nixos/wildcat/default.nix
index 7bde471..7bde471 100644
--- a/nix/hosts/wildcat/default.nix
+++ b/nix/hosts/nixos/wildcat/default.nix
diff --git a/nix/hosts/wildcat/hardware.nix b/nix/hosts/nixos/wildcat/hardware.nix
index 351c991..351c991 100644
--- a/nix/hosts/wildcat/hardware.nix
+++ b/nix/hosts/nixos/wildcat/hardware.nix
diff --git a/nix/hosts/wildcat/networking.nix b/nix/hosts/nixos/wildcat/networking.nix
index c0b4bd0..c0b4bd0 100644
--- a/nix/hosts/wildcat/networking.nix
+++ b/nix/hosts/nixos/wildcat/networking.nix
diff --git a/nix/profiles/home-manager/mac.nix b/nix/profiles/home-manager/mac.nix
new file mode 100644
index 0000000..48fc956
--- /dev/null
+++ b/nix/profiles/home-manager/mac.nix
@@ -0,0 +1,4 @@
+{ ... }: {
+  imports = [ ./dev.nix ./fish.nix ./git.nix ./shell.nix ./ssh.nix ];
+  xdg.enable = false;
+}
diff --git a/nix/profiles/home-manager/personal.nix b/nix/profiles/home-manager/personal.nix
index d758696..ce0b056 100644
--- a/nix/profiles/home-manager/personal.nix
+++ b/nix/profiles/home-manager/personal.nix
@@ -2,7 +2,7 @@
 
   home.stateVersion = "23.05";
 
-  imports = [ ./dev.nix ./fish.nix ./git.nix ./shell.nix ./ssh.nix ];
+  imports = [ ./mac.nix ];
 
   programs.git = { userEmail = "franck@fcuny.net"; };
 }
diff --git a/nix/profiles/home-manager/work.nix b/nix/profiles/home-manager/work.nix
index ea9358e..31edd7e 100644
--- a/nix/profiles/home-manager/work.nix
+++ b/nix/profiles/home-manager/work.nix
@@ -2,15 +2,7 @@
 
   home.stateVersion = "23.05";
 
-  imports = [
-    ./dev.nix
-    ./fish.nix
-    ./git.nix
-    ./shell.nix
-    ./ssh.nix
-  ];
+  imports = [ ./mac.nix ];
 
-  programs.git = {
-    userEmail = "fcuny@roblox.com";
-  };
+  programs.git = { userEmail = "fcuny@roblox.com"; };
 }