diff --git a/default.nix b/default.nix index 37f1b7d..4b91215 100644 --- a/default.nix +++ b/default.nix @@ -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; + }; } diff --git a/home.nix b/niten.nix similarity index 78% rename from home.nix rename to niten.nix index 772e22e..2b5c64e 100644 --- a/home.nix +++ b/niten.nix @@ -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 = { diff --git a/xiaoxuan.nix b/xiaoxuan.nix new file mode 100644 index 0000000..722e324 --- /dev/null +++ b/xiaoxuan.nix @@ -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" + ]; +}