From d4f55ea04221c8388df9281c5c7c61dfd5f36b4c Mon Sep 17 00:00:00 2001 From: blake Date: Fri, 17 Oct 2025 15:14:22 -0500 Subject: [PATCH] macos shit --- flake.lock | 21 ++++++++ flake.nix | 76 +++++++++++++++++---------- users/blake/dots/hyprland/default.nix | 16 ++++++ users/blake/home.nix | 6 +-- 4 files changed, 87 insertions(+), 32 deletions(-) create mode 100644 users/blake/dots/hyprland/default.nix diff --git a/flake.lock b/flake.lock index cdaca09..a769142 100644 --- a/flake.lock +++ b/flake.lock @@ -265,6 +265,26 @@ "type": "github" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1760721282, + "narHash": "sha256-aAHphQbU9t/b2RRy2Eb8oMv+I08isXv2KUGFAFn7nCo=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "c3211fcd0c56c11ff110d346d4487b18f7365168", + "type": "github" + }, + "original": { + "owner": "LnL7", + "repo": "nix-darwin", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1748162331, @@ -365,6 +385,7 @@ "autoaspm": "autoaspm", "copyparty": "copyparty", "home-manager": "home-manager", + "nix-darwin": "nix-darwin", "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable", "nvf": "nvf", diff --git a/flake.nix b/flake.nix index 6655c9c..7e88fdb 100644 --- a/flake.nix +++ b/flake.nix @@ -6,6 +6,10 @@ inputs = { nixpkgs.url = "nixpkgs/nixos-25.05"; nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; + nix-darwin = { + url = "github:LnL7/nix-darwin"; + inputs.nixpkgs.follows = "nixpkgs"; + }; home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; @@ -31,34 +35,48 @@ }; copyparty.url = "github:9001/copyparty"; }; - outputs = { self, nixpkgs, nixpkgs-unstable, ... }@inputs: - let - systems = { - x86_64 = "x86_64-linux"; - arm64 = "aarch64-linux"; - darwin = "aarch64-darwin"; - }; - stable_pkgs = builtins.mapAttrs (k: v: import nixpkgs { system = v; }) systems; - unstable_pkgs = builtins.mapAttrs (k: v: import nixpkgs-unstable { system = v; }) systems; - in - { - nixosConfigurations = { - snowbelle = nixpkgs.lib.nixosSystem { - system = systems.x86_64; - specialArgs = { inherit inputs stable_pkgs unstable_pkgs; }; - modules = [ - ./hosts/snowbelle/configuration.nix - inputs.home-manager.nixosModules.default - ]; - }; - vaniville = nixpkgs.lib.nixosSystem { - system = systems.x86_64; - specialArgs = { inherit inputs stable_pkgs unstable_pkgs; }; - modules = [ - ./hosts/vaniville/configuration.nix - inputs.home-manager.nixosModules.default - ]; - }; - }; + outputs = { + self, + nixpkgs, + nixpkgs-unstable, + nix-darwin, + ... + } @ inputs: let + systems = { + x86_64 = "x86_64-linux"; + arm64 = "aarch64-linux"; + darwin = "aarch64-darwin"; }; + stable_pkgs = builtins.mapAttrs (k: v: import nixpkgs {system = v;}) systems; + unstable_pkgs = builtins.mapAttrs (k: v: import nixpkgs-unstable {system = v;}) systems; + in { + nixosConfigurations = { + snowbelle = nixpkgs.lib.nixosSystem { + system = systems.x86_64; + specialArgs = {inherit inputs stable_pkgs unstable_pkgs;}; + modules = [ + ./hosts/snowbelle/configuration.nix + inputs.home-manager.nixosModules.default + ]; + }; + vaniville = nixpkgs.lib.nixosSystem { + system = systems.x86_64; + specialArgs = {inherit inputs stable_pkgs unstable_pkgs;}; + modules = [ + ./hosts/vaniville/configuration.nix + inputs.home-manager.nixosModules.default + ]; + }; + }; + darwinConfigurations = { + CEN-IT-07 = nix-darwin.lib.darwinSystem { + system = systems.darwin; + specialArgs = {inherit inputs stable_pkgs unstable_pkgs;}; + modules = [ + ./hosts/cen-it-07/configuration.nix + inputs.home-manager.darwinModules.default + ]; + }; + }; + }; } diff --git a/users/blake/dots/hyprland/default.nix b/users/blake/dots/hyprland/default.nix new file mode 100644 index 0000000..f788c45 --- /dev/null +++ b/users/blake/dots/hyprland/default.nix @@ -0,0 +1,16 @@ +{ + pkgs, + config, + ... +}: { + home.packages = with pkgs; []; + + wayland.windowManager.hyprland = if pkgs.system == "x86_64-darwin" then {} else { + enable = true; + }; + + # + home.sessionVariables = if pkgs.system == "x86_64-darwin" then {} else { + }; + +} diff --git a/users/blake/home.nix b/users/blake/home.nix index 71d6b94..17dee0d 100644 --- a/users/blake/home.nix +++ b/users/blake/home.nix @@ -12,8 +12,8 @@ homeDirectory = "/home/blake"; }; home_darwin = { - username = "bhelderman"; - homeDirectory = "/Users/bhelderman"; + username = "bdhelderman"; + homeDirectory = "/Users/bdhelderman"; }; in { @@ -28,7 +28,7 @@ in ./dots/xdg ]; - # general config + # set home manager config based on system type home = (if pkgs.system == "x86_64-darwin" then home_darwin else home_linux) // { # cross party general packages here : ) stateVersion = "25.05";