flakes/users/rin.nix
LavaDesu c86be50084
restructure
- users/rin/default.nix -> users/rin.nix
- users/rin/home.nix +-> users/rin.nix
- users/rin/*.nix -> modules/user/*.nix
- users/rin/scripts/ -> scripts/
- hosts/winter/default.nix -> hosts/winter.nix
- hosts/winter/*.nix -> modules/system/*.nix

- modules are dynamically imported as sets for system and user
2021-07-15 19:16:11 +07:00

138 lines
3.3 KiB
Nix

{ config, lib, modules, pkgs, ... }: {
users.users.rin = {
isNormalUser = true;
extraGroups = [ "audio" "video" "wheel" ];
shell = pkgs.zsh;
uid = 1001;
};
home-manager.users.rin = { config, enableGUI, lib, pkgs, ... }: {
home = {
username = "rin";
homeDirectory = "/home/rin";
stateVersion = "21.05";
packages = with pkgs; [
ffmpeg
gnupg
neofetch
nodejs-16_x
pamixer
rnix-lsp
transcrypt
unrar
wine-osu
(winetricks.override { wine = wine-osu; })
youtube-dl
nodePackages_latest.pnpm
] ++ lib.optionals enableGUI [
brave
discord-canary
element-desktop
feh
gnome.file-roller
gimp
kotatogram-desktop
lxappearance
maim
pavucontrol
tor-browser-bundle-bin
transmission-remote-gtk
xclip
xorg.xgamma
];
sessionVariables = {
PATH = builtins.concatStringsSep ":" [
"${config.home.homeDirectory}/.local/bin"
"${config.xdg.dataHome}/npm/bin"
"$PATH"
];
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
EDITOR = "nvim";
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${config.xdg.configHome}/java";
CARGO_HOME = "${config.xdg.dataHome}/cargo";
DIRENV_LOG_FORMAT = "";
GNUPGHOME = "${config.xdg.dataHome}/gnupg";
GTK2_RC_FILES = "${config.xdg.configHome}/gtk-2.0/gtkrc";
LESSHISTFILE = "-";
NODE_REPL_HISTORY="${config.xdg.dataHome}/nodejs/repl_history";
NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc";
PUB_CACHE = "${config.xdg.cacheHome}/dart";
WGETRC = "${config.xdg.configHome}/wgetrc";
XINITRC = "${config.xdg.configHome}/xorg/xinitrc";
WINEPREFIX = "${config.xdg.dataHome}/wine64";
WINEARCH = "win64";
};
};
imports = with modules.user; [
neovim
npm
zsh
] ++ lib.optionals enableGUI [
theming
xdg
kitty
mpv
rofi
dunst
picom
polybar
xorg
sxhkd
bspwm
];
programs = {
feh.enable = enableGUI;
direnv = {
enable = true;
nix-direnv = {
enable = true;
enableFlakes = true;
};
};
git = {
enable = true;
userName = "LavaDesu";
userEmail = "me@lava.moe";
signing = {
key = "059F098EBF0E9A13E10A46BF6500251E087653C9";
signByDefault = true;
};
extraConfig = {
core.abbrev = 11;
};
};
gpg = {
enable = true;
homedir = "${config.xdg.dataHome}/gnupg";
};
};
services = {
# TODO: borked
clipmenu.enable = false;
gpg-agent = {
enable = true;
pinentryFlavor = if enableGUI then "gnome3" else "tty";
};
};
home.file.".local/bin/ipc-bridge.exe".source = builtins.fetchurl {
url = "https://github.com/0e4ef622/wine-discord-ipc-bridge/releases/download/v0.0.1/winediscordipcbridge.exe";
sha256 = "1swn9spxpq6blm74kjmfz4ipq6a8qjzccvb2msb25pf5b1z7jnns";
};
home.file.".local/bin/osu" = {
executable = true;
source = ../scripts/osu;
};
};
}