diff --git a/nix-darwin/configuration.nix b/nix-darwin/configuration.nix index 8532b6f..4d0f05e 100644 --- a/nix-darwin/configuration.nix +++ b/nix-darwin/configuration.nix @@ -4,22 +4,34 @@ # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget environment.systemPackages = - [ pkgs.vim + [ pkgs.git ]; # Necessary for using flakes on this system. nix.settings.experimental-features = "nix-command flakes"; - # Enable alternative shell support in nix-darwin. - # programs.fish.enable = true; + # Auto upgrade nix package and the daemon service. + services.nix-daemon.enable = true; - # Set Git commit hash for darwin-version. - system.configurationRevision = self.rev or self.dirtyRev or null; + # Enable zsh + programs.zsh.enable = true; # Used for backwards compatibility, please read the changelog before changing. # $ darwin-rebuild changelog system.stateVersion = 6; + # Allow unfree (and optionally broken) packages + nixpkgs.config = { + allowUnfree = true; + # If needed, you can also allow broken packages: + # allowBroken = true; + }; + # The platform the configuration will be used on. nixpkgs.hostPlatform = "aarch64-darwin"; + + users.users.elal = { + name = "elal"; + home = "/Users/elal"; + }; } diff --git a/nix-darwin/flake.lock b/nix-darwin/flake.lock index 16175b1..3a8a2ad 100644 --- a/nix-darwin/flake.lock +++ b/nix-darwin/flake.lock @@ -9,13 +9,13 @@ "locked": { "lastModified": 1738743987, "narHash": "sha256-O3bnAfsObto6l2tQOmQlrO6Z2kD6yKwOWfs7pA0CpOc=", - "owner": "LnL7", + "owner": "lnl7", "repo": "nix-darwin", "rev": "ae406c04577ff9a64087018c79b4fdc02468c87c", "type": "github" }, "original": { - "owner": "LnL7", + "owner": "lnl7", "repo": "nix-darwin", "type": "github" } @@ -42,16 +42,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1738797219, - "narHash": "sha256-KRwX9Z1XavpgeSDVM/THdFd6uH8rNm/6R+7kIbGa+2s=", - "owner": "NixOS", + "lastModified": 1738824222, + "narHash": "sha256-U3SNq+waitGIotmgg/Et3J7o4NvUtP2gb2VhME5QXiw=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "1da52dd49a127ad74486b135898da2cef8c62665", + "rev": "550e11f27ba790351d390d9eca3b80ad0f0254e7", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", + "owner": "nixos", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/nix-darwin/flake.nix b/nix-darwin/flake.nix index 4b5d99d..8ce0efa 100644 --- a/nix-darwin/flake.nix +++ b/nix-darwin/flake.nix @@ -1,29 +1,31 @@ { - description = "Epsilons darwin configuration"; + description = "Epsilons Darwin configuration"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - darwin.url = "github:LnL7/nix-darwin"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + darwin.url = "github:lnl7/nix-darwin"; darwin.inputs.nixpkgs.follows = "nixpkgs"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = inputs: { + outputs = inputs@{ nixpkgs, home-manager, darwin, ... }: { darwinConfigurations = { - "exa" = inputs.darwin.lib.darwinSystem { - system = "aarch64-darwin"; # or "x86_64-darwin" for Intel Macs + exa = darwin.lib.darwinSystem { + system = "aarch64-darwin"; modules = [ ./configuration.nix - # This module integrates Home Manager: - inputs.home-manager.darwinModules.home-manager { + home-manager.darwinModules.home-manager + { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.elal = import ./home.nix; + + # Optionally, use home-manager.extraSpecialArgs to pass + # arguments to home.nix } ]; }; }; }; } - diff --git a/nix-darwin/flake.nix.old b/nix-darwin/flake.nix.old deleted file mode 100644 index be66600..0000000 --- a/nix-darwin/flake.nix.old +++ /dev/null @@ -1,18 +0,0 @@ -{ - description = "Home Manager configuration"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = { self, nixpkgs, home-manager }: { - homeConfigurations."elal" = home-manager.lib.homeConfiguration { - pkgs = nixpkgs.legacyPackages.aarch64-darwin; - modules = [ ./home.nix ]; - }; - }; -} diff --git a/nix-darwin/home.nix b/nix-darwin/home.nix index a24569b..054d297 100644 --- a/nix-darwin/home.nix +++ b/nix-darwin/home.nix @@ -15,28 +15,6 @@ # release notes. home.stateVersion = "24.05"; # Please read the comment before changing. - nixpkgs = { - # You can add overlays here - overlays = [ - # If you want to use overlays exported from other flakes: - # neovim-nightly-overlay.overlays.default - - # Or define it inline, for example: - # (final: prev: { - # hi = final.hello.overrideAttrs (oldAttrs: { - # patches = [ ./change-hello-to-hi.patch ]; - # }); - # }) - ]; - # Configure your nixpkgs instance - config = { - # Disable if you don't want unfree packages - allowUnfree = true; - # Workaround for https://github.com/nix-community/home-manager/issues/2942 - allowUnfreePredicate = _: true; - }; - }; - imports = [ # Modules ./modules/skhd.nix diff --git a/nix-darwin/nix.conf b/nix-darwin/nix.conf deleted file mode 100644 index c7d7291..0000000 --- a/nix-darwin/nix.conf +++ /dev/null @@ -1 +0,0 @@ -experimental-features = nix-command flakes