nixos-config/modules/desktop/default.nix

103 lines
2.4 KiB
Nix

{ lib, pkgs, config, inputs, self-overlay, ... }:
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";
nixpkgs.config = { allowUnfree = true; };
services.gnome-keyring.enable = true;
home.stateVersion = "21.11";
eboskma = {
programs = {
alacritty.enable = true;
firefox = {
enable = true;
work = config.eboskma.base.work;
};
fish.enable = true;
gpg.enable = true;
rofi.enable = true;
vscode.enable = true;
sway.enable = true;
waybar.enable = true;
};
};
home.packages = with pkgs; [
(nerdfonts.override { fonts = [ "CascadiaCode" "FantasqueSansMono" "FiraCode" "Iosevka" "JetBrainsMono" "Meslo" "Noto" "SourceCodePro" ]; })
bitwarden
gnome.nautilus
jetbrains.clion
neovim
signal-desktop
steam
tdesktop
unzip
];
xdg = {
enable = true;
};
imports = [
{
nixpkgs.overlays = [ self-overlay ];
}
../../home-manager/modules/alacritty
../../home-manager/modules/firefox
../../home-manager/modules/fish
../../home-manager/modules/gpg
../../home-manager/modules/rofi
../../home-manager/modules/vscode
../../home-manager/modules/sway
../../home-manager/modules/waybar
];
};
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 = {
pipewire = {
enable = true;
pulse.enable = true;
media-session.enable = true;
};
};
};
}