nixnew/modules/user/general.nix
2023-08-29 20:35:04 -07:00

149 lines
2.7 KiB
Nix

{ system, inputs, pkgs, config, ... }: {
imports = [
../ironbar
];
system.extraDependencies = with pkgs; [ ungoogled-chromium ];
fonts = {
enableDefaultPackages = false;
packages = with inputs.stable.legacyPackages.${system}; [
dejavu_fonts
nerdfonts
noto-fonts
noto-fonts-cjk
];
};
systemd = {
# kde polkit agent
user.services.polkit-agent = {
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
environment.variables = {
XCURSOR_SIZE = "24";
};
programs = {
gnupg.agent = {
enable = true;
pinentryFlavor = "gnome3";
};
kdeconnect.enable = true;
};
services = {
syncthing = {
enable = true;
user = config.main-user;
dataDir = "/home/${config.main-user}/.syncthing";
configDir = "/home/${config.main-user}/.config/syncthing";
};
};
networking.firewall = {
allowedTCPPorts = [
# syncthing TCP
22000
];
allowedUDPPorts = [
# syncthing QUIC
22000
# syncthing discovery
21027
];
};
home-manager.users.${config.main-user} = homeInputs: let
homeConfig = homeInputs.config;
in {
imports = [
./modules/fcitx5
./modules/wofi
./modules/dolphin
./modules/firefox
./modules/element.nix
./dev-support.nix
];
home.packages = with pkgs; [
ark
kwrite
krita
gimp
vlc
mpv
gpicview
filelight
cantata
logseq
bitwarden
lxqt.pavucontrol-qt
helvum
htop
btop
speedcrunch
libreoffice
nnn
ripgrep
qbittorrent
signal-desktop
anki-bin
libsForQt5.kwallet
libsForQt5.kwalletmanager
distrobox
xdg-utils
light
unrar # used by ark
];
programs = {
alacritty = import ./config/alacritty.nix;
};
programs = {
direnv = {
enable = true;
nix-direnv.enable = true;
};
};
services = {
kdeconnect = {
enable = true;
indicator = true;
};
mpd = {
enable = true;
musicDirectory = "${homeConfig.home.homeDirectory}/Music";
network.startWhenNeeded = true;
extraConfig = ''
audio_output {
type "pipewire"
name "Pipewire"
}
replaygain "track"
replaygain_limit "no"
'';
};
};
};
}