diff options
author | Christian Segundo | 2024-02-24 12:23:28 +0100 |
---|---|---|
committer | Christian Segundo | 2024-02-24 12:23:28 +0100 |
commit | 6aa246c269e894db33c0f1c8a605d8d2311f3b20 (patch) | |
tree | 6bed84eeac8416013f406e3dbc077b234eadec4b | |
download | hm-extra-wiki.tar.gz |
Add README.mdwiki
-rw-r--r-- | README.md | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..83b33bd --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# hm-extra + +> Custom, mostly ad hoc, sometimes experimental home-manager modules + +## Usage + +Just add this flake as a home-manager module: + +```nix +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + nix-darwin.url = "github:LnL7/nix-darwin"; + nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; + + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + home-manager-extra.url = "git+https://git.segundo.io/nix/hm-extra"; + }; + + outputs = inputs @ { self, nix-darwin, nixpkgs, home-manager, home-manager-extra }: + let + configuration = { ... }: { + # Necessary for using flakes on this system. + nix.settings.experimental-features = "nix-command flakes"; + # Set Git commit hash for darwin-version. + system.configurationRevision = self.rev or self.dirtyRev or null; + }; + in + { + darwinConfigurations = { + lenny = nix-darwin.lib.darwinSystem { + system = "aarch64-darwin"; + specialArgs = inputs; + modules = [ configuration ] ++ [ + home-manager.darwinModules.home-manager + { home-manager.sharedModules = [ home-manager-extra.default ]; } + ]; + }; + }; + }; +} +``` |