Dispatch on the username, add xiaoxuan

This commit is contained in:
niten 2021-09-08 12:10:59 -07:00
parent 5a8601bc6e
commit 0d213bdbf0
3 changed files with 141 additions and 8 deletions

View File

@ -1,5 +1,16 @@
{ config, lib, pkgs, ... }:
{
generate-config = pkgs.callPackage ./home.nix { };
let
user-configs = {
niten = ./niten.nix;
root = ./niten.nix;
viator = ./niten.nix;
xiaoxuan = ./xiaoxuan.nix;
};
in {
generate-config = { username, user-email, home-dir }:
{ enable-gui ? false, ... }: pkgs.callPackage user-configs.${username} {
inherit username user-email home-dir enable-gui;
};
}

View File

@ -1,6 +1,4 @@
{ config, lib, pkgs, ... }:
{ username, user-email, home-dir }:
{ enable-gui ? false, ... }:
{ config, lib, pkgs, username, user-email, home-dir, enable-gui, ... }:
with lib;
let
@ -9,8 +7,8 @@ let
gui-packages = with pkgs;
let
steam-with-pipewire =
(steam.override { extraLibraries = pkgs: [ pkgs.pipewire ]; });
# steam-with-pipewire =
# (steam.override { extraLibraries = pkgs: [ pkgs.pipewire ]; });
in [
exodus
firefox
@ -128,11 +126,49 @@ in {
package = doom-emacs-packages.doom-emacs-package;
client = {
enable = true;
arguments = [ "-t" ];
};
};
gpg-agent.enable = true;
gnome-keyring.enable = true;
redshift = {
enable = true;
latitude = 47;
longitude = 122;
};
};
accounts.email.accounts = {
Fudo = {
primary = true;
address = "niten@fudo.org";
aliases = [ "peter@selby.ca" ];
userName = "niten";
realName = "Niten";
imap = {
host = "mail.fudo.org";
tls = {
enable = true;
port = 993;
};
};
smtp = {
host = "mail.fudo.org";
tls = {
enable = true;
useStartTls = true;
port = 587;
};
};
};
GMail = {
address = "pselby@gmail.com";
flavor = "gmail.com";
realName = "Peter Selby";
};
};
home = {

86
xiaoxuan.nix Normal file
View File

@ -0,0 +1,86 @@
{ config, lib, pkgs, username, user-email, home-dir, enable-gui, ... }:
with lib; if !enable-gui then {} else {
home = {
programs = with pkgs; [
fcitx5-configtool
firefox
gnome.gnome-tweaks
google-chrome
imagemagick
jq
minecraft
pv
redshift
spotify
xclip
];
keyboard = {
layout = "us";
};
username = username;
};
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = [ pkgs.fcitx5-rime ];
};
programs = {
firefox.enable = true;
};
services = {
# gammastep = {
# enable = true;
# latitude = 47;
# longitude = 122;
# };
gnome-keyring.enable = true;
redshift = {
enable = true;
latitude = 47;
longitude = 122;
};
};
accounts.email.accounts = {
Fudo = {
primary = true;
address = "xiaoxuan@fudo.org";
aliases = [ "xiaoxuan@selby.ca" ];
userName = "xiaoxuan";
realName = "Xiaoxuan Jin";
imap = {
host = "mail.fudo.org";
tls = {
enable = true;
port = 993;
};
};
smtp = {
host = "mail.fudo.org";
tls = {
enable = true;
useStartTls = true;
port = 587;
};
};
};
GMail = {
address = "clairejin1223@gmail.com";
flavor = "gmail.com";
realName = "Xiaoxuan Jin";
};
};
systemd.user.tmpfiles.rules = [
"L+ /mnt/documents/${username} - - - - ${home-dir}/Documents"
"L+ /mnt/downloads/${username} - - - - ${home-dir}/Downloads"
];
}