ark/users/patriot/default.nix

291 lines
7.2 KiB
Nix
Raw Normal View History

2022-02-18 20:31:01 +03:00
{
pkgs,
lib,
2022-04-09 22:01:44 +03:00
tlib,
2022-07-01 04:45:26 +03:00
config,
2022-02-18 20:31:01 +03:00
...
2022-04-09 21:33:13 +03:00
} @ globalAttrs: let
2022-07-01 04:45:26 +03:00
l = lib // builtins;
2022-04-09 21:33:13 +03:00
nixosConfig = globalAttrs.config;
2022-02-18 20:31:01 +03:00
in {
2023-03-24 15:10:42 +03:00
imports = [./stylix.nix];
2020-11-21 23:54:07 +03:00
users.users.patriot = {
isNormalUser = true;
createHome = true;
home = "/home/patriot";
2022-07-30 03:04:32 +03:00
extraGroups = l.flatten [
2022-02-18 20:31:01 +03:00
"wheel"
"adbusers"
"dialout"
2022-07-21 01:41:36 +03:00
"video"
2023-05-09 02:58:14 +03:00
"nix-build-key-access"
2022-10-04 02:08:44 +03:00
(l.optional nixosConfig.networking.networkmanager.enable "networkmanager")
2022-07-30 03:04:32 +03:00
(l.optional nixosConfig.virtualisation.docker.enable "docker")
2023-10-08 09:51:05 +03:00
(l.optionals nixosConfig.virtualisation.libvirtd.enable ["libvirtd" "kvm"])
2022-02-18 20:31:01 +03:00
];
2020-11-21 23:54:07 +03:00
shell = pkgs.zsh;
2022-03-09 23:55:02 +03:00
hashedPassword = "$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/";
2020-11-21 23:54:07 +03:00
};
2021-08-23 21:25:02 +03:00
environment = {
2022-07-30 03:04:32 +03:00
persistence.${config.system.persistDir}.directories = l.flatten [
2023-01-26 14:41:23 +03:00
# because steam will be fucked otherwise
2022-08-11 05:44:58 +03:00
(l.optional nixosConfig.programs.steam.enable "/home/patriot/.local/share/Steam")
2023-01-26 14:41:23 +03:00
# because cargo doesnt work otherwise
2022-07-30 03:04:32 +03:00
"/home/patriot/.cargo"
2023-01-26 14:41:23 +03:00
# same thing since i work with cargo and other shit
2022-07-30 03:04:32 +03:00
"/home/patriot/proj"
2023-01-26 14:41:23 +03:00
# same thing as steam
2022-07-30 03:04:32 +03:00
"/home/patriot/games"
2023-01-26 14:41:23 +03:00
# flatpak stuff
2022-08-23 08:18:37 +03:00
"/home/patriot/.var"
2023-01-26 14:41:23 +03:00
# libvirt stuff, dont think fuse mount would work here
2022-12-28 09:31:14 +03:00
"/home/patriot/.config/libvirt"
2024-03-23 20:59:25 +03:00
"/home/patriot/.config/unity3d"
"/home/patriot/.config/HKModInstaller"
2022-07-30 03:04:32 +03:00
];
2022-10-04 02:08:44 +03:00
systemPackages = with pkgs; [qt5.qtwayland];
2022-02-18 20:31:01 +03:00
shells = with pkgs; [bashInteractive zsh];
2021-08-23 21:25:02 +03:00
};
2020-11-21 23:54:07 +03:00
xdg.portal = {
enable = true;
2022-07-01 04:45:26 +03:00
wlr.enable = true;
2022-08-14 01:27:38 +03:00
wlr.settings.screencast = {
output_name = "eDP-1";
max_fps = 60;
chooser_type = "default";
};
2020-11-21 23:54:07 +03:00
};
programs = {
2023-04-06 08:22:22 +03:00
# cuz nixos complains
zsh.enable = true;
2022-07-01 04:45:26 +03:00
# this is needed for impermanence
2022-06-10 21:36:34 +03:00
fuse.userAllowOther = true;
2020-11-21 23:54:07 +03:00
adb.enable = true;
2022-12-28 09:31:14 +03:00
steam.enable = true;
2024-02-12 23:59:55 +03:00
gamescope.enable = true;
2022-07-01 04:45:26 +03:00
# gnome stuffs
2022-05-21 14:17:48 +03:00
seahorse.enable = true;
2022-09-14 17:58:08 +03:00
dconf.enable = true;
2022-10-21 18:30:00 +03:00
weylus.users = ["patriot"];
2022-12-28 09:31:14 +03:00
java = {
2023-09-10 21:40:39 +03:00
enable = false;
2022-12-28 09:31:14 +03:00
package = pkgs.jre8;
};
2020-11-21 23:54:07 +03:00
};
2022-08-14 01:27:38 +03:00
services = {
2022-09-12 02:24:41 +03:00
gnome.gnome-keyring.enable = true;
2022-08-14 01:27:38 +03:00
};
2022-07-01 04:45:26 +03:00
# gnome keyring better fr fr
security.pam.services.patriot = {
enableGnomeKeyring = true;
enableKwallet = false;
};
2022-09-12 02:24:41 +03:00
security.pam.services.swaylock = {
text = ''
auth include login
'';
};
systemd = {
2022-04-10 05:48:34 +03:00
targets.network-online.enable = false;
services = {
systemd-networkd-wait-online.enable = false;
NetworkManager-wait-online.enable = false;
2021-01-17 17:25:54 +03:00
};
};
2022-03-09 23:55:02 +03:00
home-manager.users.patriot = {
config,
pkgs,
2022-06-10 21:36:34 +03:00
inputs,
2022-09-17 17:17:54 +03:00
secrets,
2022-03-09 23:55:02 +03:00
...
}: let
personal = import ../../personal.nix;
name = personal.name;
email = personal.emails.primary;
in {
2022-08-11 05:44:58 +03:00
imports = let
modulesToEnable = l.flatten [
2022-10-04 02:08:44 +03:00
# wm
2022-11-04 00:59:34 +03:00
# ["hyprland" "foot"]
2023-10-08 09:51:05 +03:00
["sway" "wayland" "foot"]
2024-01-23 02:11:22 +03:00
# ["fluxbox" "urxvt"]
2022-08-11 05:44:58 +03:00
# desktop stuff
2023-10-08 09:51:05 +03:00
# ["wayland" "foot"]
2024-02-01 23:07:59 +03:00
["obsidian" "firefox" "vesktop"]
2022-08-11 05:44:58 +03:00
# cli stuff
["zoxide" "zsh" "fzf" "starship" "direnv"]
# dev stuff
2024-01-23 02:11:22 +03:00
["helix" "git" "ssh"]
2024-01-14 22:05:39 +03:00
# ["godot"]
2024-01-23 02:11:22 +03:00
["musikcube" "musikcubed"]
2024-01-14 22:05:39 +03:00
["arrpc"]
["s3s"]
2022-08-11 05:44:58 +03:00
];
in
l.flatten [
../../modules/persist
inputs.nixos-persistence.nixosModules.home-manager.impermanence
(tlib.prefixStrings "${inputs.self}/users/modules/" modulesToEnable)
];
2022-06-10 21:36:34 +03:00
2022-07-01 04:45:26 +03:00
system.persistDir = nixosConfig.system.persistDir;
2022-06-30 03:53:13 +03:00
2022-07-01 04:45:26 +03:00
home.persistence."${config.system.persistDir}${config.home.homeDirectory}" = let
2022-08-11 05:44:58 +03:00
mkPaths = pfx: paths: tlib.prefixStrings "${pfx}/" (l.flatten paths);
2022-06-10 21:36:34 +03:00
in {
directories =
2022-07-12 03:56:08 +03:00
l.flatten [
2022-06-10 21:36:34 +03:00
"Downloads"
2022-06-21 23:31:28 +03:00
".wine"
2022-06-10 21:36:34 +03:00
# ssh / gpg / keys
".ssh"
".gnupg"
"keys"
# caches / history stuff
".directory_history"
".cache"
2023-10-09 03:35:11 +03:00
"Bitwig Studio"
".BitwigStudio"
".vst"
2022-06-10 21:36:34 +03:00
]
++ mkPaths ".local/share" [
2023-11-02 22:14:22 +03:00
"bottles"
2022-06-10 21:36:34 +03:00
"direnv"
2022-06-16 21:38:12 +03:00
"zsh"
2022-06-21 23:31:28 +03:00
"keyrings"
2023-11-02 22:14:22 +03:00
"yuzu"
2023-10-08 09:51:05 +03:00
# "lutris"
2023-09-10 21:40:39 +03:00
# "Terraria"
2023-11-02 22:14:22 +03:00
"PrismLauncher"
2022-06-10 21:36:34 +03:00
]
++ mkPaths ".config" [
2023-02-25 02:08:04 +03:00
# "lutris"
2022-11-04 00:59:34 +03:00
"dconf"
2023-10-08 09:51:05 +03:00
"retroarch"
2023-11-02 22:14:22 +03:00
"yuzu"
2024-01-14 22:05:39 +03:00
"blender"
2022-06-10 21:36:34 +03:00
];
2022-07-01 04:45:26 +03:00
files = l.flatten [
2023-10-08 09:51:05 +03:00
".config/gnome-initial-setup-done"
2022-06-11 18:53:17 +03:00
(lib.removePrefix "~/" config.programs.ssh.userKnownHostsFile)
2022-06-10 21:36:34 +03:00
];
allowOther = true;
};
2022-08-11 05:44:58 +03:00
fonts.fontconfig.enable = l.mkForce true;
2022-09-14 17:58:08 +03:00
2022-10-04 02:08:44 +03:00
settings.iconTheme = {
2022-11-18 00:06:43 +03:00
name = "Yaru-dark";
2022-11-04 00:59:34 +03:00
package = pkgs.yaru-theme;
2022-10-04 02:08:44 +03:00
};
2022-09-14 17:58:08 +03:00
home.pointerCursor = {
2022-10-04 02:08:44 +03:00
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
2022-09-14 17:58:08 +03:00
size = 24;
gtk.enable = true;
x11.enable = true;
};
2023-10-08 09:51:05 +03:00
gtk.enable = true;
gtk.theme.package = pkgs.yaru-theme;
gtk.theme.name = "Yaru-dark";
2024-01-23 02:11:22 +03:00
# home.sessionVariables.QT_QPA_PLATFORMTHEME = "qt5ct";
# xdg.configFile = {
# "environment.d/20-apply-qtct.conf".text = ''
# QT_QPA_PLATFORMTHEME=qt5ct
# '';
# };
# qt.enable = true;
# qt.platformTheme = "qtct";
# qt.style.name = "phantom";
# qt.style.package = pkgs.phantom;
2023-10-08 09:51:05 +03:00
stylix.targets.gnome.enable = lib.mkForce false;
stylix.targets.gtk.enable = lib.mkForce false;
2022-09-14 17:58:08 +03:00
2022-03-09 23:55:02 +03:00
home = {
homeDirectory = nixosConfig.users.users.patriot.home;
2022-08-11 05:44:58 +03:00
packages = with pkgs; [
# Font stuff
noto-fonts-cjk
font-awesome
dejavu_fonts
# Programs
2023-08-23 14:06:38 +03:00
pixelorama
2022-08-11 05:44:58 +03:00
krita
gnupg
imv
mpv
ffmpeg
mupdf
2022-09-29 23:34:57 +03:00
xdg-utils
2022-08-11 05:44:58 +03:00
protontricks
2022-10-25 17:44:39 +03:00
libreoffice-fresh
2023-02-25 02:08:04 +03:00
helvum
2022-10-29 04:13:39 +03:00
nix-output-monitor
2023-09-10 21:40:39 +03:00
inputs.nh.packages.${pkgs.system}.default
# steamPackages.steamcmd
# steam-tui
2023-11-24 17:02:44 +03:00
# fractal-next
2024-01-23 02:11:22 +03:00
# gtkcord4
# gh
2023-10-08 09:51:05 +03:00
transmission_4-gtk
2023-11-24 17:02:44 +03:00
kdenlive
### music prod
2023-10-09 03:35:11 +03:00
yabridge
yabridgectl
bitwig-studio
2023-11-24 17:02:44 +03:00
### stream / record
obs-studio
### gayming
2024-01-23 02:11:22 +03:00
# prismlauncher
# (retroarch.override {
# cores = with libretro; [desmume citra];
# })
# yuzu
2023-10-08 09:51:05 +03:00
# wineWowPackages.stagingFull
# lutris
2024-01-23 02:11:22 +03:00
# distrobox
2023-11-02 22:14:22 +03:00
bottles
2024-01-14 22:05:39 +03:00
blender
2022-08-11 05:44:58 +03:00
];
2022-03-09 23:55:02 +03:00
};
programs = {
2023-10-13 23:14:32 +03:00
musikcube.enable = true;
2022-06-16 21:38:12 +03:00
command-not-found.enable =
nixosConfig.programs.command-not-found.enable;
2022-03-09 23:55:02 +03:00
git = {
userName = name;
userEmail = email;
2023-07-14 14:29:09 +03:00
extraConfig = {
gpg.format = "ssh";
commit.gpgsign = true;
user.signingkey = builtins.readFile ../../secrets/yusdacra.key.pub;
};
2022-03-09 23:55:02 +03:00
};
};
services = {
2023-10-13 23:14:32 +03:00
musikcubed = {
enable = true;
settings.password = "somethingidk";
};
2022-03-09 23:55:02 +03:00
gpg-agent = let
defaultCacheTtl = 3600 * 6;
maxCacheTtl = 3600 * 24;
in {
inherit defaultCacheTtl maxCacheTtl;
enable = true;
enableSshSupport = true;
sshKeys = ["8369D9CA26C3EAAAB8302A88CEE6FD14B58AA965"];
defaultCacheTtlSsh = defaultCacheTtl;
maxCacheTtlSsh = maxCacheTtl;
grabKeyboardAndMouse = false;
2022-09-12 02:26:21 +03:00
pinentryFlavor = "gnome3";
2021-07-05 00:01:15 +03:00
};
2021-05-03 07:48:31 +03:00
};
2022-03-09 23:55:02 +03:00
};
2020-11-21 23:54:07 +03:00
}