refac: restructure users
2
.gitattributes
vendored
|
@ -1 +1 @@
|
|||
secrets.nix filter=git-crypt diff=git-crypt
|
||||
**/secrets.nix filter=git-crypt diff=git-crypt
|
||||
|
|
8
makefile
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
})
|
||||
|
|
BIN
secrets.nix
|
@ -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" ];
|
||||
|
||||
|
|
|
@ -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
Before Width: | Height: | Size: 5.4 MiB After Width: | Height: | Size: 5.4 MiB |
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 2.6 MiB |
Before Width: | Height: | Size: 4.7 MiB After Width: | Height: | Size: 4.7 MiB |
Before Width: | Height: | Size: 4.5 MiB After Width: | Height: | Size: 4.5 MiB |
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 4.9 MiB After Width: | Height: | Size: 4.9 MiB |
Before Width: | Height: | Size: 3.5 MiB After Width: | Height: | Size: 3.5 MiB |
Before Width: | Height: | Size: 4.5 MiB After Width: | Height: | Size: 4.5 MiB |
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
Before Width: | Height: | Size: 4.3 MiB After Width: | Height: | Size: 4.3 MiB |
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.3 MiB |
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 2.6 MiB |