Add GUI home-manager module

This commit is contained in:
Jack O'Sullivan 2022-02-15 01:08:00 +00:00
parent 98c2ca114f
commit 59d1b5bcd7
3 changed files with 43 additions and 11 deletions

View File

@ -84,6 +84,7 @@
};
homeModules = mapAttrs (_: f: ./. + "/home-modules/${f}") {
common = "common.nix";
gui = "gui.nix";
};
in
# Platform independent stuff

View File

@ -25,17 +25,6 @@ mkMerge [
enable = mkDefault true;
};
lsd = {
enable = mkDefault true;
};
starship = {
enable = mkDefault true;
settings = {
aws.disabled = true;
};
};
direnv = {
enable = mkDefault true;
nix-direnv.enable = true;
@ -53,6 +42,10 @@ mkMerge [
iperf3
];
sessionVariables = {
EDITOR = "vim";
};
language.base = mkDefault "en_IE.UTF-8";
# The flake passes a default setting, but we don't care about that
@ -70,6 +63,8 @@ mkMerge [
};
};
fonts.fontconfig.enable = true;
home = {
packages = with pkgs; [
nix

36
home-modules/gui.nix Normal file
View File

@ -0,0 +1,36 @@
{ lib, pkgs, config, ... }:
let
inherit (lib) mkIf mkDefault;
inherit (lib.my) mkBoolOpt';
cfg = config.my.gui;
in
{
options.my.gui = {
enable = mkBoolOpt' true "Enable settings and packages meant for graphical systems";
};
config = mkIf cfg.enable {
programs = {
lsd = {
enable = mkDefault true;
enableAliases = mkDefault true;
};
starship = {
enable = mkDefault true;
settings = {
aws.disabled = true;
};
};
};
home = {
packages = with pkgs; [
(pkgs.nerdfonts.override {
fonts = [ "DroidSansMono" "SourceCodePro" ];
})
];
};
};
}