nixos-config/modules/desktop/default.nix

173 lines
4 KiB
Nix
Raw Normal View History

2021-11-21 19:07:12 +01:00
{ lib, pkgs, config, inputs, self-overlay, ha-now-playing-overlay, pamedia-overlay, ... }:
2021-11-12 17:10:17 +01:00
with lib;
2021-11-22 08:04:54 +01:00
let
cfg = config.eboskma.desktop;
bt = config.eboskma.bluetooth;
2021-11-12 17:10:17 +01:00
in
{
imports = [ ../../users/erwin.nix ../../users/root.nix ];
options.eboskma.desktop = {
enable = mkEnableOption "Enable default desktop configuration";
home-manager = mkOption {
type = types.bool;
default = false;
description = ''
Enable home-manager for this desktop
'';
};
};
config = mkIf cfg.enable {
home-manager.users.erwin = mkIf cfg.home-manager {
_module.args.flake-inputs = inputs;
programs.home-manager.enable = true;
programs.command-not-found.enable = true;
2021-11-22 08:04:54 +01:00
services.blueman-applet.enable = bt.enable;
2021-11-12 17:10:17 +01:00
home.username = "erwin";
home.homeDirectory = "/home/erwin";
2021-11-21 19:07:12 +01:00
home.sessionVariables = {
EDITOR = "${pkgs.neovim}/bin/nvim";
};
2021-11-12 17:10:17 +01:00
nixpkgs.config = { allowUnfree = true; };
home.stateVersion = "21.11";
eboskma = {
programs = {
2021-11-17 16:32:18 +01:00
alacritty.enable = true;
2021-11-21 19:07:12 +01:00
bat.enable = true;
2021-11-17 16:32:18 +01:00
firefox = {
enable = true;
work = config.eboskma.base.work;
};
fish.enable = true;
2021-11-21 19:07:12 +01:00
git = {
enable = true;
name = "Erwin Boskma";
email = "erwin@datarift.nl";
signingKey = "EE7ADEFE1D943C7B";
};
2021-11-17 16:32:18 +01:00
gpg.enable = true;
2021-11-12 17:10:17 +01:00
rofi.enable = true;
2021-11-17 16:32:18 +01:00
vscode.enable = true;
sway.enable = true;
2021-11-21 19:07:12 +01:00
tmux.enable = true;
2021-11-12 17:10:17 +01:00
waybar.enable = true;
};
};
home.packages = with pkgs; [
2021-11-17 16:32:18 +01:00
bitwarden
2021-11-21 19:07:12 +01:00
fd
git
2021-11-17 16:32:18 +01:00
gnome.nautilus
jetbrains.clion
neovim
2021-11-22 18:56:59 +01:00
nomachine-client
2021-11-21 19:07:12 +01:00
ripgrep
2021-11-17 16:32:18 +01:00
signal-desktop
steam
tdesktop
unzip
2021-11-21 19:07:12 +01:00
wl-clipboard
2021-11-12 17:10:17 +01:00
];
2021-11-17 16:32:18 +01:00
xdg = {
enable = true;
};
2021-11-21 19:07:12 +01:00
gtk = {
enable = true;
theme = {
name = "Arc-Dark";
package = pkgs.arc-theme;
};
iconTheme = {
name = "Paper";
package = pkgs.paper-icon-theme;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
};
2021-11-12 17:10:17 +01:00
imports = [
2021-11-16 00:22:18 +01:00
{
2021-11-21 19:07:12 +01:00
nixpkgs.overlays = [
self-overlay
ha-now-playing-overlay
pamedia-overlay
];
2021-11-16 00:22:18 +01:00
}
2021-11-17 16:32:18 +01:00
../../home-manager/modules/alacritty
2021-11-21 19:07:12 +01:00
../../home-manager/modules/bat
2021-11-17 16:32:18 +01:00
../../home-manager/modules/firefox
../../home-manager/modules/fish
2021-11-21 19:07:12 +01:00
../../home-manager/modules/git
2021-11-17 16:32:18 +01:00
../../home-manager/modules/gpg
../../home-manager/modules/rofi
../../home-manager/modules/vscode
2021-11-12 17:10:17 +01:00
../../home-manager/modules/sway
2021-11-21 19:07:12 +01:00
../../home-manager/modules/tmux
2021-11-12 17:10:17 +01:00
../../home-manager/modules/waybar
];
};
2021-11-16 00:22:18 +01:00
2021-11-21 19:07:12 +01:00
programs = {
dconf.enable = true;
sway = {
enable = true;
wrapperFeatures = {
gtk = true;
base = true;
};
extraPackages = with pkgs; [ swaylock-effects swayidle ];
};
};
2021-11-17 16:32:18 +01:00
xdg = {
mime.enable = true;
menus.enable = true;
icons.enable = true;
sounds.enable = true;
autostart.enable = true;
portal = {
enable = true;
wlr.enable = true;
2021-11-22 18:56:59 +01:00
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
2021-11-17 16:32:18 +01:00
gtkUsePortal = true;
};
};
services = {
2021-11-21 19:07:12 +01:00
dbus.packages = [ pkgs.gcr ];
};
2021-11-17 16:32:18 +01:00
2021-11-21 19:07:12 +01:00
security.pam.services.swaylock = {
text = ''
auth include login
'';
2021-11-16 00:22:18 +01:00
};
2021-11-22 18:56:59 +01:00
environment.sessionVariables = {
_JAVA_AWT_WM_NONREPARENTING = "1";
MOZ_ENABLE_WAYLAND = "1";
MOZ_DBUS_REMOTE = "1";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_QPA_PLATFORMTHEME = "qt5ct";
SDL_VIDEODRIVER = "wayland";
SSH_AUTH_SOCK = ''''${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh'';
};
2021-11-12 17:10:17 +01:00
};
}