share user configuration between systems
This commit is contained in:
parent
35545242ac
commit
9be3527af1
3 changed files with 22 additions and 30 deletions
15
nix/system/common/users.nix
Normal file
15
nix/system/common/users.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.haak = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" # Enable ‘sudo’ for the user.
|
||||
"networkmanager" # Allow the user to manage networks
|
||||
];
|
||||
};
|
||||
|
||||
users.extraUsers.haak = {
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../common/users.nix
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
|
|
@ -158,20 +159,11 @@
|
|||
location.provider = "geoclue2";
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.haak = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
users.users.haak.extraGroups = [
|
||||
"wheel" # Enable ‘sudo’ for the user.
|
||||
"networkmanager" # Allow the user to manage networks
|
||||
"adbusers" # allow ADB use
|
||||
];
|
||||
};
|
||||
|
||||
users.extraUsers.haak = {
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = [ "root" "haak" ];
|
||||
|
||||
# This value determines the NixOS release with which your system is to be
|
||||
# compatible, in order to avoid breaking some software such as database
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./glibc-locale-paths.nix
|
||||
../common/users.nix
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
|
|
@ -183,22 +184,6 @@
|
|||
|
||||
location.provider = "geoclue2";
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.haak = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" # Enable ‘sudo’ for the user.
|
||||
"networkmanager" # Allow the user to manage networks
|
||||
];
|
||||
};
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
users.extraUsers.haak = {
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = [ "root" "haak" ];
|
||||
|
||||
# This value determines the NixOS release with which your system is to be
|
||||
# compatible, in order to avoid breaking some software such as database
|
||||
# servers. You should change this only after NixOS release notes say you
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue