home: Parametrise gui

This commit is contained in:
Simon Bruder 2020-12-05 15:01:40 +01:00
parent 74ddf83617
commit f718f79192
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
9 changed files with 28 additions and 12 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { config, pkgs, ... }:
let let
pubkeys = import ../../modules/pubkeys.nix; pubkeys = import ../../modules/pubkeys.nix;
in in
@ -28,7 +28,15 @@ in
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.users.simon = { pkgs, ... }: { home-manager.users.simon = { lib, pkgs, ... }: {
options.sbruder = {
gui = lib.mkOption {
type = lib.types.bool;
default = config.sbruder.gui;
description = "Whether to enable gui";
};
};
imports = [ imports = [
./modules/alacritty.nix ./modules/alacritty.nix
./modules/ankisyncd.nix ./modules/ankisyncd.nix

View file

@ -1,3 +1,4 @@
{ config, ... }:
let let
common = import ./common.nix; common = import ./common.nix;
solarized = common.colorschemes.solarized; solarized = common.colorschemes.solarized;
@ -45,7 +46,7 @@ let
in in
{ {
programs.alacritty = { programs.alacritty = {
enable = true; enable = config.sbruder.gui;
settings = { settings = {
font = { font = {
normal = { normal = {

View file

@ -1,3 +1,5 @@
{ { config, lib, ... }:
lib.mkIf config.sbruder.gui {
home.file.".local/share/Anki2/addons21/ankisyncd/__init__.py".source = ../files/ankisyncd/__init__.py; home.file.".local/share/Anki2/addons21/ankisyncd/__init__.py".source = ../files/ankisyncd/__init__.py;
} }

View file

@ -1,8 +1,8 @@
{ pkgs, ... }: { config, pkgs, ... }:
{ {
gtk = { gtk = {
enable = true; enable = config.sbruder.gui;
font.name = "sans-serif 10"; font.name = "sans-serif 10";
theme = { theme = {
package = pkgs.gnome-themes-extra; package = pkgs.gnome-themes-extra;

View file

@ -51,7 +51,7 @@ let
in in
{ {
programs.mpv = { programs.mpv = {
enable = true; enable = config.sbruder.gui;
config = { config = {
# Main application font # Main application font

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, lib, pkgs, ... }:
let let
common = import ./common.nix; common = import ./common.nix;
solarized = common.colorschemes.solarized; solarized = common.colorschemes.solarized;
@ -33,7 +33,7 @@ let
cfg = config.wayland.windowManager.sway.config; cfg = config.wayland.windowManager.sway.config;
thinsp = ""; thinsp = "";
in in
{ lib.mkIf config.sbruder.gui {
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;

View file

@ -1,4 +1,6 @@
{ { config, lib, ... }:
lib.mkIf config.sbruder.gui {
home.file.".XCompose".text = '' home.file.".XCompose".text = ''
include "%L" include "%L"

View file

@ -1,6 +1,8 @@
{ config, ... }:
{ {
xdg.mimeApps = { xdg.mimeApps = {
enable = true; enable = config.sbruder.gui;
defaultApplications = { defaultApplications = {
"application/pdf" = "org.pwmt.zathura.desktop"; "application/pdf" = "org.pwmt.zathura.desktop";
"image/png" = "mpv.desktop"; "image/png" = "mpv.desktop";

View file

@ -1,3 +1,4 @@
{ config, ... }:
let let
common = import ./common.nix; common = import ./common.nix;
solarized = common.colorschemes.solarized; solarized = common.colorschemes.solarized;
@ -44,7 +45,7 @@ let
in in
{ {
programs.zathura = { programs.zathura = {
enable = true; enable = config.sbruder.gui;
options = { options = {
selection-clipboard = "clipboard"; selection-clipboard = "clipboard";
} // colorschemes.solarized-dark; } // colorschemes.solarized-dark;