migrated user to sysConf user and added custom user configuration

This commit is contained in:
Bit Borealis 2023-05-11 10:14:17 +00:00
parent 4aae0ac7b1
commit 171cd02f63
4 changed files with 62 additions and 4 deletions

View File

@ -8,12 +8,15 @@ let
"https://github.com/nix-community/home-manager/archive/master.tar.gz";
homeManager = import "${homeManagerTarball}/nixos";
deviceConf = import "${projectRoot}/hosts/${sysConf.host}/";
userDir = "${projectRoot}/users/${sysConf.user}/";
userConf = import userDir;
unstable = import unstableTarball config.nixpkgs.config;
sysConf = import ./saturn/system.nix;
in {
imports = [
homeManager
deviceConf
userConf
./modules
];
@ -80,15 +83,15 @@ in {
};
# add and configure users
users.users.hive = {
users.users.${sysConf.user} = {
initialPassword = "";
isNormalUser = true;
description = "The Hive";
extraGroups = [ "networkmanager" "wheel" "dialout" ];
description = "${sysConf.user}";
extraGroups = [ "networkmanager" "wheel" ];
};
# import home-manager config from home.nix
home-manager.users.hive = import ./home.nix;
home-manager.users.${sysConf.user} = import "${userDir}/home.nix";
# install packages
# `nix search` to add more

View File

@ -4,4 +4,5 @@
./hardware-configuration.nix
./luks.nix
];
programs.steam.enable = true;
}

53
users/hive/default.nix Normal file
View File

@ -0,0 +1,53 @@
{ ... } :
{
services.syncthing = {
enable = true;
user = "hive";
configDir = "/home/hive/.config/syncthing";
overrideDevices = false;
overrideFolders = false;
devices = { "impostor" = {
id = "XBG44HU-OVOC6RN-4DHMDRH-WPL7OPW-XBYYOMK-DV5GGGA-LEP6HCJ-QVPMSAI";
introducer = true;
}; };
folders = {
"ssh" = {
id = "mkkgo-chqwk";
path = "~/.ssh";
devices = [ "impostor" ];
ignorePerms = false;
};
"decsync" = {
id = "20lk1-ims07";
path = "~/.local/share/decsync";
devices = [ "impostor" ];
};
"scripts" = {
id = "6nunu-quun5";
path = "~/.local/bin/scripts";
devices = [ "impostor" ];
};
"dotfiles" = {
id = "sjgew-vdpfl";
path = "~/.dotfiles";
devices = [ "impostor" ];
};
"password-store" = {
id = "tadwa-1va0d";
path = "~/.local/share/pass";
devices = [ "impostor" ];
};
"notes" = {
id = "y0a00-2ha8l";
path = "~/Notes";
devices = [ "impostor" ];
};
"documents" = {
id = "y7ecb-v9ds7";
path = "~/Documents";
devices = [ "impostor" ];
};
};
};
}

View File

@ -13,6 +13,7 @@
dino
termpdfpy
# unstable.fluffychat
skim
syncthing
armcord
ripgrep