home: Parametrise gui

restic-rest-server
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
pubkeys = import ../../modules/pubkeys.nix;
in
@ -28,7 +28,15 @@ in
home-manager.useUserPackages = 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 = [
./modules/alacritty.nix
./modules/ankisyncd.nix

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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