diff --git a/src/homeProfiles/base.nix b/src/homeProfiles/base.nix index baf3987..42756be 100644 --- a/src/homeProfiles/base.nix +++ b/src/homeProfiles/base.nix @@ -6,10 +6,11 @@ ... }: with builtins // lib; { - home.homeDirectory = + home.homeDirectory = mkDefault ( if hasSuffix "-darwin" pkgs.system then "/Users/${config.home.username}" - else "/home/${config.home.username}"; + else "/home/${config.home.username}" + ); home.stateVersion = "23.05"; } diff --git a/src/nixosConfigurations/yui/_configuration.nix b/src/nixosConfigurations/yui/_configuration.nix index 4e0fe32..d79ae13 100644 --- a/src/nixosConfigurations/yui/_configuration.nix +++ b/src/nixosConfigurations/yui/_configuration.nix @@ -21,7 +21,7 @@ with lib; { # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Set your time zone. - # time.timeZone = "Europe/Amsterdam"; + time.timeZone = "Asia/Shanghai"; # The global useDHCP flag is deprecated, therefore explicitly set to false here. # Per-interface useDHCP will be mandatory in the future, so this generated config @@ -58,10 +58,10 @@ with lib; { # services.xserver.libinput.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. - # users.users.alice = { - # isNormalUser = true; - # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - # }; + users.users.yousiki = { + isNormalUser = true; + extraGroups = ["wheel"]; # Enable ‘sudo’ for the user. + }; # List packages installed in system profile. To search, run: # $ nix search wget diff --git a/src/nixosConfigurations/yui/default.nix b/src/nixosConfigurations/yui/default.nix index 355b6d6..a67ef21 100644 --- a/src/nixosConfigurations/yui/default.nix +++ b/src/nixosConfigurations/yui/default.nix @@ -11,6 +11,22 @@ commonProfiles.nix commonProfiles.packages nixosProfiles.vscode-server + + # Home-manager module + globals.inputs.home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = {inherit globals;}; + users.yousiki = { + imports = with homeProfiles; [ + base + lang.complete + ]; + }; + }; + } ]; in globals.inputs.nixpkgs.lib.nixosSystem {