Skip to content

Commit

Permalink
Update home directory and time zone settings***
Browse files Browse the repository at this point in the history
***Add user account 'yousiki' with sudo privileges***

***Integrate home-manager module for custom user configurations
  • Loading branch information
yousiki committed Feb 15, 2024
1 parent db48059 commit 22fceb0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/homeProfiles/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
10 changes: 5 additions & 5 deletions src/nixosConfigurations/yui/_configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions src/nixosConfigurations/yui/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 22fceb0

Please sign in to comment.