nixos-config/modules/desktop/default.nix

155 lines
3.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;
let cfg = config.eboskma.desktop;
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;
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-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;
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-12 17:10:17 +01:00
};
}