home-manager/home.nix

112 lines
3.0 KiB
Nix
Raw Normal View History

2023-07-23 03:04:32 +00:00
{
config,
pkgs,
lib,
options,
specialArgs,
modulesPath,
}: {
nixpkgs.config.allowUnfreePredicate = _: true;
home.stateVersion = "23.05";
home.username = "kristian";
home.homeDirectory = "/home/kristian";
# For cursor not showing in hyprland with nvidia
home.sessionVariables.WLR_NO_HARDWARE_CURSORS = "1";
# Symlinks
home.file = {
".wallpaper".source = ./wallpaper; # Wallpaper
#"Media".source = config.lib.file.mkOutOfStoreSymlink "/mnt/Media";
#"Documents".source = config.lib.file.mkOutOfStoreSymlink "/mnt/Documents";
};
# TODO: Change for Laptop
targets.genericLinux.enable = false; # Enable on non-nixos ditros
# Keyboard Layout
home.keyboard.layout = "at"; # NOTE: Set by Hyprland config
# Programs (additional programs)
home.packages = import ./packages.nix {inherit pkgs;};
## Services
services.copyq.enable = true;
services.playerctld.enable = true; # for mpris waybar module
# Programs
programs = {
home-manager.enable = true; # Allow home-manager to manage itself
wofi.enable = true;
mpv.enable = true;
obs-studio.enable = true;
zathura.enable = true;
yt-dlp.enable = true;
lf.enable = true;
vscode.enable = true;
bashmount.enable = true;
bash = import ./bash.nix {enable = true;};
alacritty = import ./alacritty.nix {enable = true;};
neovim = import ./nvim {
enable = true;
pkgs = pkgs;
};
firefox = import ./firefox.nix {
enable = true;
nur = config.nur;
};
waybar = import ./waybar.nix {
enable = true;
pkgs = pkgs;
};
git = import ./git.nix {enable = true;};
thunderbird = import ./thunderbird.nix {enable = true;};
};
xdg.mimeApps = {
enable = true;
defaultApplications = {"video/*" = ["mpv.desktop"];};
};
systemd.user.mounts = let
home = "home-kristian";
in {
"${home}-Media" = {
Unit = {
Description = "Mount disk-1 with sshfs";
After = ["graphical-session-pre.target"];
PartOf = ["graphical-session-pre.target"];
};
Install = {WantedBy = ["graphical-session-pre.target"];};
Mount = {
What = "kristian@krsnik.at:/mnt/TITAN/Media";
Where = "/home/kristian/kristian/Media";
Type = "fuse.sshfs";
#Options=_netdev,reconnect,ServerAliveInterval=30,ServerAliveCountMax=5,x-systemd.automount
#TimeoutSec=60
#Options = "resolve-symlinks";
};
};
"${home}-Documents" = {
Unit = {
Description = "Mount disk-1 with sshfs";
After = ["graphical.target "];
Wants = ["graphical.target"];
};
Install = {WantedBy = ["default.target"];};
Mount = {
What = "kristian@krsnik.at:/mnt/TITAN/Documents";
Where = "/home/kristian/Documents";
Type = "fuse.sshfs";
Options = "_netdev,reconnect,ServerAliveInterval=30,ServerAliveCountMax=5,x-systemd.automount";
TimeoutSec = 60;
#Options = "resolve-symlinks";
};
};
};
wayland.windowManager.hyprland = import ./hyprland.nix {enable = true;};
}