dotfiles/profiles/user0/default.nix

138 lines
3.3 KiB
Nix
Raw Normal View History

2024-10-06 15:25:05 -05:00
{
config,
flake,
pkgs,
2025-01-18 03:50:54 -06:00
lib,
2024-10-06 15:25:05 -05:00
...
2025-01-18 03:50:54 -06:00
}:
let
inherit (flake) self;
inherit (flake.config.people) user0;
inherit (flake.config.machines) devices;
inherit (flake.config.people.users.${user0}) name paths;
2024-10-06 15:25:05 -05:00
hostname = config.networking.hostName;
2025-01-18 03:50:54 -06:00
in
{
2024-10-06 15:25:05 -05:00
users = {
users.${user0} = {
description = name;
2025-01-31 01:49:36 -06:00
name = user0;
2024-10-06 15:25:05 -05:00
isNormalUser = true;
shell = pkgs.nushell;
extraGroups = [
"adbusers"
"caddy"
"disk"
"jellyfin"
"libvirtd"
"minecraft"
"netdev"
"networkmanager"
"nextcloud"
"ollama"
2025-03-01 15:58:02 -06:00
"plugdev"
2024-10-06 15:25:05 -05:00
"postgres"
"redis-mastodon"
"samba"
"syncthing"
"vaultwarden"
"vboxusers"
"wheel"
];
};
};
home-manager.users = {
${user0} = {
home = {
username = user0;
homeDirectory = "/home/${user0}";
file = {
"./justfile" = {
2025-03-20 21:54:42 -05:00
text = ''
vpn:
sudo protonvpn c --c CA
vpnoff:
sudo protonvpn d
rebuild:
nixos-rebuild switch --use-remote-sudo --flake ~/Files/Projects/dotfiles#${hostname} --show-trace
elm:
cd ~/Files/Projects/website/frontend ; elm-land server
server:
ssh ${devices.ceres.ip.address0}
'';
2024-10-06 15:25:05 -05:00
};
"./Files/Scripts/list.sh" = {
source = ./files/list.sh;
executable = true;
};
"./Files/Scripts/loop.sh" = {
source = ./files/loop.sh;
executable = true;
};
"./.config/scripts/get_weather.sh" = {
source = ./files/get_weather.sh;
executable = true;
};
".config/wallpaper" = {
source = ./files/wallpaper;
recursive = true;
};
2025-03-20 21:54:42 -05:00
"./.config/vesktop/themes/macchiato-theme.css" = {
source = ./files/themes/vesktop/macchiato-theme.css;
};
"./.config/qBittorrent/themes/catppuccin-mocha.qbtheme" = {
source = ./files/themes/qbittorrent/macchiato.qbtheme;
};
2024-10-06 15:25:05 -05:00
};
2025-01-08 01:05:45 -06:00
sessionVariables = {
2025-01-18 03:50:54 -06:00
VISUAL = lib.getExe pkgs.zed-editor;
2025-01-08 01:05:45 -06:00
GTK_THEME = "catppuccin-macchiato-mauve-compact";
};
2024-10-06 15:25:05 -05:00
};
imports = [
2024-11-06 22:00:30 -06:00
{
home.stateVersion = config.system.stateVersion;
}
{
imports = [
self.homeModules."${devices.${hostname}.name}-${user0}"
];
}
2024-10-06 15:25:05 -05:00
];
};
};
systemd.tmpfiles = {
2024-10-06 15:25:05 -05:00
rules =
2025-01-08 19:06:14 -06:00
[
"d ${paths.path0} 0755 ${user0} users -"
]
2025-01-18 03:50:54 -06:00
++ (map (path: "d /home/${user0}/${path} 0755 ${user0} users -") [
"Downloads/Nicotine"
"Downloads/Nicotine/Downloads"
"Downloads/Nicotine/Incomplete"
"Downloads/Nicotine/Received"
"Downloads/Qbittorent"
"Downloads/Qbittorent/Movies"
"Downloads/Qbittorent/Music"
"Downloads/Qbittorent/Shows"
"Files"
"Files/Scripts"
"Files/Games"
"Files/Screenshots"
])
++ (map (path: "R /home/${user0}/${path} 0755 ${user0} users - -") [
"Desktop"
"Documents"
"Music"
"Pictures"
"Public"
"Templates"
"Videos"
]);
2024-10-06 15:25:05 -05:00
};
}