feat: add family account configuration
This commit is contained in:
parent
0b73d173f6
commit
bca2b245da
5 changed files with 236 additions and 216 deletions
|
@ -39,9 +39,7 @@ in
|
|||
options = {
|
||||
lyte = {
|
||||
shell = {
|
||||
enable = lib.mkEnableOption (
|
||||
builtins.trace "looked at lyte options" "Enable home-manager shell configuration for the user"
|
||||
);
|
||||
enable = lib.mkEnableOption "Enable home-manager shell configuration for the user";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -262,15 +260,24 @@ in
|
|||
fish = import ./fish.nix;
|
||||
|
||||
jujutsu =
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf (builtins.hasAttr "primary" config.accounts.email.accounts) {
|
||||
fullName,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
email = config.accounts.email.accounts.primary.address;
|
||||
|
||||
in
|
||||
{
|
||||
config = {
|
||||
programs.jujutsu = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
email = config.accounts.email.accounts.primary.address;
|
||||
name = "Daniel Flanagan";
|
||||
inherit email;
|
||||
name = fullName;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -278,15 +285,20 @@ in
|
|||
};
|
||||
|
||||
git =
|
||||
{ lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
fullName,
|
||||
...
|
||||
}:
|
||||
let
|
||||
email = lib.mkDefault "daniel@lyte.dev";
|
||||
email = config.accounts.email.accounts.primary.address;
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
userName = lib.mkDefault "Daniel Flanagan";
|
||||
userName = lib.mkDefault fullName;
|
||||
userEmail = email;
|
||||
|
||||
delta = {
|
||||
|
@ -475,14 +487,6 @@ in
|
|||
blur-my-shell
|
||||
appindicator
|
||||
];
|
||||
|
||||
file.".face" = {
|
||||
enable = true;
|
||||
source = builtins.fetchurl {
|
||||
url = "https://lyte.dev/img/avatar3-square-512.png";
|
||||
sha256 = "sha256:15zwbwisrc01m7ad684rsyq19wl4s33ry9xmgzmi88k1myxhs93x";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.gnome-shell = {
|
||||
|
@ -1278,24 +1282,14 @@ in
|
|||
daniel =
|
||||
{ ... }:
|
||||
{
|
||||
|
||||
home = {
|
||||
username = "daniel";
|
||||
homeDirectory = "/home/daniel/.home";
|
||||
};
|
||||
|
||||
accounts.email.accounts = {
|
||||
primary = {
|
||||
accounts.email.accounts.primary = {
|
||||
primary = true;
|
||||
address = "daniel@lyte.dev";
|
||||
};
|
||||
legacy = {
|
||||
address = "wraithx2@gmail.com";
|
||||
};
|
||||
io = {
|
||||
# TODO: finalize deprecation
|
||||
address = "daniel@lytedev.io";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
TODO: extensions and their config/sync?
|
||||
*/
|
||||
profiles = {
|
||||
daniel = {
|
||||
primary = {
|
||||
id = 0;
|
||||
settings = {
|
||||
"alerts.useSystemBackend" = true;
|
||||
|
|
|
@ -31,6 +31,50 @@
|
|||
postgres
|
||||
gaming
|
||||
restic
|
||||
(
|
||||
{ config, ... }:
|
||||
lib.mkIf config.family-account.enable {
|
||||
users.groups.flanfam = { };
|
||||
users.users.flanfam = {
|
||||
isNormalUser = true;
|
||||
home = "/home/flanfam";
|
||||
description = "Flanagan Family";
|
||||
createHome = true;
|
||||
openssh.authorizedKeys.keys = [ self.outputs.pubkey ];
|
||||
group = "flanfam";
|
||||
shell = lib.mkIf config.lyte.shell.enable pkgs.fish;
|
||||
extraGroups = [
|
||||
"users"
|
||||
"video"
|
||||
];
|
||||
};
|
||||
home-manager.users.flanfam = {
|
||||
# TODO: .face
|
||||
accounts.email.accounts.primary = {
|
||||
primary = true;
|
||||
address = "home@lyte.dev";
|
||||
};
|
||||
home = {
|
||||
username = "flanfam";
|
||||
homeDirectory = "/home/flanfam";
|
||||
stateVersion = lib.mkDefault config.system.stateVersion;
|
||||
file.".face" = {
|
||||
enable = config.home-manager.users.daniel.lyte.desktop.enable;
|
||||
source = builtins.fetchurl {
|
||||
url = "https://lyte.dev/icon.png";
|
||||
sha256 = "sha256:0nf22gwasc64yc5317d0k0api0fwyrf4g3wxljdi2p3ki079ky53";
|
||||
};
|
||||
};
|
||||
};
|
||||
imports = with self.outputs.homeManagerModules; [
|
||||
{
|
||||
_module.args.fullName = config.users.users.flanfam.description;
|
||||
}
|
||||
default
|
||||
];
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
options = {
|
||||
|
@ -39,8 +83,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
config =
|
||||
{
|
||||
config = {
|
||||
lyte.shell.enable = lib.mkDefault true;
|
||||
nixpkgs = {
|
||||
config.allowUnfree = lib.mkDefault true;
|
||||
|
@ -166,6 +209,7 @@
|
|||
users.users.daniel = {
|
||||
isNormalUser = true;
|
||||
home = "/home/daniel/.home";
|
||||
# TODO: chown /home/daniel
|
||||
description = "Daniel Flanagan";
|
||||
createHome = true;
|
||||
openssh.authorizedKeys.keys = [ self.outputs.pubkey ];
|
||||
|
@ -182,33 +226,22 @@
|
|||
packages = [ ];
|
||||
};
|
||||
home-manager.users.daniel = {
|
||||
home.stateVersion = lib.mkDefault config.system.stateVersion;
|
||||
imports = with self.outputs.homeManagerModules; [
|
||||
default
|
||||
];
|
||||
home = {
|
||||
stateVersion = lib.mkDefault config.system.stateVersion;
|
||||
file.".face" = {
|
||||
enable = config.home-manager.users.daniel.lyte.desktop.enable;
|
||||
source = builtins.fetchurl {
|
||||
url = "https://lyte.dev/img/avatar3-square-512.png";
|
||||
sha256 = "sha256:15zwbwisrc01m7ad684rsyq19wl4s33ry9xmgzmi88k1myxhs93x";
|
||||
};
|
||||
};
|
||||
};
|
||||
imports = with self.outputs.homeManagerModules; [
|
||||
{
|
||||
_module.args.fullName = config.users.users.daniel.description;
|
||||
}
|
||||
// lib.mkIf config.family-account.enable {
|
||||
|
||||
users.groups.flanfam = { };
|
||||
users.users.flanfam = {
|
||||
isNormalUser = true;
|
||||
home = "/home/flanfam";
|
||||
description = "Flanagan Family";
|
||||
createHome = true;
|
||||
openssh.authorizedKeys.keys = [ self.outputs.pubkey ];
|
||||
group = "flanfam";
|
||||
shell = lib.mkIf config.lyte.shell.enable pkgs.fish;
|
||||
extraGroups = [
|
||||
"users"
|
||||
"video"
|
||||
];
|
||||
packages = [ ];
|
||||
};
|
||||
home-manager.users.flanfam = {
|
||||
home.stateVersion = lib.mkDefault config.system.stateVersion;
|
||||
imports = with self.outputs.homeManagerModules; [
|
||||
default
|
||||
daniel
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -48,14 +48,4 @@ inputs: {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
radio-tools =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
chirp
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -68,17 +68,20 @@
|
|||
programs.steam.enable = true;
|
||||
networking.wifi.enable = true;
|
||||
lyte.desktop.enable = true;
|
||||
family-account.enable = true;
|
||||
|
||||
home-manager.users.daniel = {
|
||||
lyte.shell.enable = true;
|
||||
lyte.desktop.enable = true;
|
||||
home.file.".config/easyeffects/output" = {
|
||||
home = {
|
||||
file.".config/easyeffects/output" = {
|
||||
enable = true;
|
||||
source = fetchGit {
|
||||
url = "https://github.com/ceiphr/ee-framework-presets";
|
||||
rev = "27885fe00c97da7c441358c7ece7846722fd12fa";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.easyeffects = {
|
||||
enable = true;
|
||||
preset = "philonmetal";
|
||||
|
|
Loading…
Add table
Reference in a new issue