mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 18:30:46 +02:00
user: separated into new file
This commit is contained in:
@@ -34,70 +34,15 @@
|
|||||||
../../modules/nixos/fonts.nix
|
../../modules/nixos/fonts.nix
|
||||||
../../modules/nixos/latex.nix
|
../../modules/nixos/latex.nix
|
||||||
../../modules/nixos/development.nix
|
../../modules/nixos/development.nix
|
||||||
|
../../modules/nixos/user.nix ../../hostsModules/laptop/nixos/user.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
qt.enable = true;
|
qt.enable = true;
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
users = {
|
|
||||||
tomasr = ./home.nix;
|
|
||||||
};
|
|
||||||
extraSpecialArgs = {inherit inputs pkgs-unstable;};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.dbus.enable = true;
|
|
||||||
security.polkit.enable = true;
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/Zurich";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
# zsh dont want to work if it is not initialzed here.
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
# removes rclone error
|
# removes rclone error
|
||||||
programs.fuse.userAllowOther = true;
|
programs.fuse.userAllowOther = true;
|
||||||
programs.fuse.enable = true;
|
programs.fuse.enable = true;
|
||||||
|
|
||||||
security.wrappers.gsr-kms-server = {
|
|
||||||
# to remove the password prompt when using gpu-screen-recorder
|
|
||||||
owner = "root";
|
|
||||||
group = "root";
|
|
||||||
capabilities = "cap_sys_admin+ep";
|
|
||||||
source = "${pkgs.gpu-screen-recorder}/bin/gsr-kms-server";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.upower.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.tomasr = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Tomas Rivera";
|
|
||||||
extraGroups = ["networkmanager" "wheel" "fuse"]; #wheel allow to use sudo / fuse -> rclone
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
};
|
|
||||||
|
|
||||||
# removes need for password for nixos-rebuild
|
|
||||||
security.sudo.extraRules = [
|
|
||||||
{
|
|
||||||
users = [ "tomasr" ];
|
|
||||||
commands = [
|
|
||||||
{
|
|
||||||
command = "/run/current-system/sw/bin/nixos-rebuild";
|
|
||||||
options = [ "NOPASSWD" ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true; # Nonfree packages: hplipWithPlugin
|
nixpkgs.config.allowUnfree = true; # Nonfree packages: hplipWithPlugin
|
||||||
|
|
||||||
@@ -111,7 +56,6 @@
|
|||||||
gnome-characters
|
gnome-characters
|
||||||
gnome-disk-utility
|
gnome-disk-utility
|
||||||
#tree # shows dir in tree # we use eza now
|
#tree # shows dir in tree # we use eza now
|
||||||
zsh # better bash
|
|
||||||
brightnessctl # control brightness
|
brightnessctl # control brightness
|
||||||
udiskie # removable disk automounter for udisks
|
udiskie # removable disk automounter for udisks
|
||||||
jp # lightweight and flexible cli JSON parser
|
jp # lightweight and flexible cli JSON parser
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# configuration is in ../../../modules/nixos/user.nix
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home-manager.users.tomasr = ../../../hosts/laptop/home.nix;
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
pkgs-unstable,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
services.dbus.enable = true;
|
||||||
|
security.polkit.enable = true;
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
# the home manager config is set in ../../hostsModules/*/nixos/user.nix
|
||||||
|
extraSpecialArgs = {inherit inputs pkgs-unstable;};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/Zurich";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
# zsh dont want to work if it is not initialzed here.
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.tomasr = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Tomas Rivera";
|
||||||
|
extraGroups = ["networkmanager" "wheel" "fuse"]; #wheel allow to use sudo / fuse -> rclone
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
|
||||||
|
security.wrappers.gsr-kms-server = {
|
||||||
|
# to remove the password prompt when using gpu-screen-recorder
|
||||||
|
owner = "root";
|
||||||
|
group = "root";
|
||||||
|
capabilities = "cap_sys_admin+ep";
|
||||||
|
source = "${pkgs.gpu-screen-recorder}/bin/gsr-kms-server";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.upower.enable = true;
|
||||||
|
|
||||||
|
# removes need for password for nixos-rebuild
|
||||||
|
security.sudo.extraRules = [
|
||||||
|
{
|
||||||
|
users = [ "tomasr" ];
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
command = "/run/current-system/sw/bin/nixos-rebuild";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user