diff --git a/.config/home-manager/home.nix b/.config/home-manager/home.nix new file mode 100644 index 0000000..8f605ff --- /dev/null +++ b/.config/home-manager/home.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: { + home.username = "fbb"; + home.homeDirectory = "/Users/fbb"; + programs.home-manager.enable = true; + home.packages = { + pkgs.stow + } +} diff --git a/nix-fbb/flake.lock b/nix-fbb/flake.lock new file mode 100644 index 0000000..93e20ca --- /dev/null +++ b/nix-fbb/flake.lock @@ -0,0 +1,48 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1718788307, + "narHash": "sha256-SqiOz0sljM0GjyQEVinPXQxaGcbOXw5OgpCWGPgh/vo=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "d7830d05421d0ced83a0f007900898bdcaf2a2ca", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1718870667, + "narHash": "sha256-jab3Kpc8O1z3qxwVsCMHL4+18n5Wy/HHKyu1fcsF7gs=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "9b10b8f00cb5494795e5f51b39210fed4d2b0748", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nix-fbb/flake.nix b/nix-fbb/flake.nix index d75545d..c68d7d0 100644 --- a/nix-fbb/flake.nix +++ b/nix-fbb/flake.nix @@ -1,13 +1,37 @@ { + description = "Home Manager configuration"; + inputs = { - nixpkgs.url = "github:NixOS/nixpkgs" + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { nixpkgs, home-manager, ... }: { + defaultPackage.aarch64-darwin = home-manager.defaultPackage.aarch64-darwin; + defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux; + + homeConfigurations = { + fbb = { pkgs }: { + x86_64-darwin = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-darwin; + modules = [ ./home.nix ]; + }; + aarch64-darwin = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.aarch64-darwin; + modules = [ ./home.nix ]; + }; + x86_64-linux = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; + modules = [ ./home.nix ]; + }; + aarch64-linux = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.aarch64-linux; + modules = [ ./home.nix ]; + }; + }; + }; }; - outputs = { self, nixpkgs }: { - packages."aarch64-darwin".default = let pkgs = nixpkgs.legacyPackages."aarch64-darwin"; in pkgs.buildEnv { - name = "home=packages"; - paths = with pkgs; [ - git - ] - } - } }