modularize users

and other stuff
This commit is contained in:
Fabian Montero 2024-12-02 19:25:34 -06:00
parent 1add39aae0
commit 119c0ab771
Signed by untrusted user: fabian
GPG key ID: 1FFAC35E1798174F
6 changed files with 128 additions and 55 deletions

View file

@ -1,14 +1,13 @@
# Edet this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
config,
pkgs,
lib,
flakes,
...
}: {
imports = [
# Include the results of the hardware scan.
flakes.home-manager.nixosModules.home-manager
flakes.impermanence.nixosModule
./hardware-configuration.nix
];
@ -20,6 +19,22 @@
graphics.enable = true;
virtualisation.enable = true;
androidSupport.enable = true;
users = {
fabian = {
enable = true;
unixId = 1002;
};
vanessa.enable = true;
};
};
networking = {
hostName = "posixlycorrect";
networkmanager.enable = true;
useDHCP = false; # The global useDHCP flag is deprecated, therefore explicitly set to false here.
interfaces.enp7s0.useDHCP = true; # Per-interface useDHCP will be mandatory in the future, so this generated config
interfaces.wlp6s0.useDHCP = true; # replicates the default behaviour.
};
boot = {
@ -31,31 +46,8 @@
kernelPackages = pkgs.linuxPackages_latest;
};
networking = {
hostName = "posixlycorrect";
networkmanager.enable = true;
# 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
# replicates the default behaviour.
useDHCP = false;
interfaces.enp7s0.useDHCP = true;
interfaces.wlp6s0.useDHCP = true;
};
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
users = {
users.fabian = {
isNormalUser = true;
uid = 1002; # nunca cambiar mi ID de usuario
group = "fabian";
shell = pkgs.zsh;
extraGroups = ["users" "wheel" "networkmanager" "dialout" "libvirtd"];
};
groups.fabian.gid = 1002;
};
time.timeZone = "America/Costa_Rica";
}