diff --git a/flake.nix b/flake.nix index 897ea912..c81bf524 100644 --- a/flake.nix +++ b/flake.nix @@ -20,30 +20,41 @@ pkgs = nixpkgs.legacyPackages.${system}; users = [ - { username = "izumin"; homeDir = "/Users/izumin"; hostname = "fleur.local"; } - { username = "masayuki.izumi"; homeDir = "/Users/masayuki.izumi"; hostname = "CM2NX3M6CH"; } + { + username = "izumin"; + homeDir = "/Users/izumin"; + hostname = "fleur.local"; + } + { + username = "masayuki.izumi"; + homeDir = "/Users/masayuki.izumi"; + hostname = "CM2NX3M6CH"; + } ]; - genHomeConfigurations = usersList: builtins.foldl' (acc: user: - acc // { - "${user.username}" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - modules = [ - { home.username = user.username; home.homeDirectory = user.homeDir; } - ./home.nix - ]; - }; - } - ) { } usersList; + genHomeConfigurations = usersList: + builtins.foldl' (acc: user: + acc // { + "${user.username}" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = [ + { + home.username = user.username; + home.homeDirectory = user.homeDir; + } + ./home.nix + ]; + }; + }) { } usersList; - genDarwinConfigurations = usersList: builtins.foldl' (acc: user: - acc // { - "${user.hostname}" = nix-darwin.lib.darwinSystem { - inherit pkgs; - modules = [ ./darwin-configuration.nix ]; - }; - } - ) { } usersList; + genDarwinConfigurations = usersList: + builtins.foldl' (acc: user: + acc // { + "${user.hostname}" = nix-darwin.lib.darwinSystem { + inherit pkgs; + modules = [ ./darwin-configuration.nix ]; + }; + }) { } usersList; in { homeConfigurations = genHomeConfigurations users; darwinConfigurations = genDarwinConfigurations users; diff --git a/home.nix b/home.nix index c402e7d3..13c4ddd3 100644 --- a/home.nix +++ b/home.nix @@ -1,13 +1,10 @@ { config, lib, pkgs, ... }: { - nixpkgs.overlays = [ - (import ./overlays/sheldon.nix) - ]; + nixpkgs.overlays = [ (import ./overlays/sheldon.nix) ]; - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "ngrok" - ]; + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ "ngrok" ]; # Home Manager needs a bit of information about you and the paths it should # manage. # home.username = user.name;