refac: restructure users

This commit is contained in:
Dmitriy Pleshevskiy 2022-10-08 13:22:46 +03:00
parent b0afdac571
commit 1e2ff5b882
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
51 changed files with 16 additions and 16 deletions

2
.gitattributes vendored
View file

@ -1 +1 @@
secrets.nix filter=git-crypt diff=git-crypt
**/secrets.nix filter=git-crypt diff=git-crypt

View file

@ -1,11 +1,11 @@
switchHm = home-manager switch --flake
switchSys = nixos-rebuild switch --flake
home-me: fix-systemd
${switchHm} .#home-me
users-jan: fix-systemd
${switchHm} .#users-jan
home-laptop-me: fix-systemd
${switchHm} .#home-laptop-me
users-laptop-jan: fix-systemd
${switchHm} .#users-laptop-jan
sys-home:
sudo ${switchSys} .#system-home

View file

@ -14,18 +14,18 @@ let
];
};
mkHome = mods: home-manager.lib.homeManagerConfiguration {
mkUsersJan = mods: home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
inputs.wired.homeManagerModules.default
../home/home.nix
../users/jan/home.nix
] ++ mods;
};
in
{
home-me = mkHome [ ];
home-laptop-me = mkHome [
users-jan = mkUsersJan [ ];
users-laptop-jan = mkUsersJan [
({ config, ... }: {
progs.alacritty.fontSize = 6.0;
})

Binary file not shown.

View file

@ -97,8 +97,8 @@ in
# Define a user account. Don't forget to set a password with passwd.
users.users.me = {
isNormalUser = true;
name = secrets.userName;
home = secrets.userDir;
name = secrets.mainUser.userName;
home = secrets.mainUser.userDir;
extraGroups = [
"wheel" # Enable sudo for the user.
"networkmanager"
@ -131,7 +131,7 @@ in
settings = {
auto-optimise-store = true;
trusted-users = [ "root" secrets.userName ];
trusted-users = [ "root" secrets.mainUser.userName ];
experimental-features = [ "nix-command" "flakes" ];

View file

@ -1,12 +1,12 @@
{ config, pkgs, ... }:
let
secrets = import ../secrets.nix;
secrets = import ./secrets.nix;
in
{
imports = (import ./ui) ++ (import ./shell) ++ (import ./progs);
nixpkgs.overlays = import ../overlays;
nixpkgs.overlays = import ../../overlays;
# Home Manager needs a bit of information about you and the
# paths it should manage.
@ -120,12 +120,12 @@ in
home.file = {
"scripts" = {
source = ../scripts;
source = ./scripts;
recursive = true;
};
"pictures/wallpapers" = {
source = ../wallpapers;
source = ./wallpapers;
recursive = true;
};
};

BIN
users/jan/secrets.nix Normal file

Binary file not shown.

View file

Before

Width:  |  Height:  |  Size: 5.4 MiB

After

Width:  |  Height:  |  Size: 5.4 MiB

View file

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

View file

Before

Width:  |  Height:  |  Size: 4.7 MiB

After

Width:  |  Height:  |  Size: 4.7 MiB

View file

Before

Width:  |  Height:  |  Size: 4.5 MiB

After

Width:  |  Height:  |  Size: 4.5 MiB

View file

Before

Width:  |  Height:  |  Size: 4.9 MiB

After

Width:  |  Height:  |  Size: 4.9 MiB

View file

Before

Width:  |  Height:  |  Size: 3.5 MiB

After

Width:  |  Height:  |  Size: 3.5 MiB

View file

Before

Width:  |  Height:  |  Size: 4.5 MiB

After

Width:  |  Height:  |  Size: 4.5 MiB

View file

Before

Width:  |  Height:  |  Size: 2.7 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

View file

Before

Width:  |  Height:  |  Size: 2.7 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

View file

Before

Width:  |  Height:  |  Size: 4.3 MiB

After

Width:  |  Height:  |  Size: 4.3 MiB

View file

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

View file

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB