home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 207823d93158a5bf8a6f929f9e6dc048c79f4c04
parent 1e95da596b9916677da3cb6d28eb7e8265678691
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Thu,  1 Nov 2018 13:53:19 +0100

profiles: create a laptop profile

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mhokkaido.nix | 4++--
Dlaptop.nix | 17-----------------
Mmodules/module-list.nix | 1+
Mmodules/profiles/desktop.nix | 7+++++++
Amodules/profiles/laptop.nix | 23+++++++++++++++++++++++
Mshikoku.nix | 2+-
Mwakasu.nix | 3++-
7 files changed, 36 insertions(+), 21 deletions(-)

diff --git a/hokkaido.nix b/hokkaido.nix @@ -2,7 +2,7 @@ { imports = [ - ./laptop.nix + ./desktop.nix # dev ./dev.go.nix ./dev.python.nix @@ -12,7 +12,7 @@ ./containers.nix ./kubernetes.nix ]; - profiles.desktop.enable = true; + profiles.laptop.enable = true; home.packages = with pkgs; [ google-chrome ]; diff --git a/laptop.nix b/laptop.nix @@ -1,17 +0,0 @@ -{ ... }: - -{ - imports = [ - ./desktop.nix - ]; - services.redshift = { - enable = true; - brightness = { day = "1"; night = "0.9"; }; - latitude = "48.3"; - longitude = "7.5"; - tray = true; - }; - programs.autorandr = { - enable = true; - }; -} diff --git a/modules/module-list.nix b/modules/module-list.nix @@ -7,6 +7,7 @@ ./profiles/ssh.nix ./profiles/fish.nix ./profiles/i3.nix + ./profiles/laptop.nix ./profiles/tmux.nix ./services/shairport-sync.nix ]; diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix @@ -54,6 +54,13 @@ in package = pkgs.arc-theme; }; }; + services.redshift = { + enable = true; + brightness = { day = "1"; night = "0.9"; }; + latitude = "48.3"; + longitude = "7.5"; + tray = true; + }; home.file.".XCompose".source = ./assets/xorg/XCompose; home.file.".Xmodmap".source = ./assets/xorg/Xmodmap; xdg.configFile."xorg/emoji.compose".source = ./assets/xorg/emoji.compose; diff --git a/modules/profiles/laptop.nix b/modules/profiles/laptop.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.profiles.laptop; +in +{ + options = { + profiles.laptop = { + enable = mkOption { + default = false; + description = "Enable laptop profile"; + type = types.bool; + }; + }; + }; + config = mkIf cfg.enable { + profiles.desktop.enable = true; + programs.autorandr = { + enable = true; + }; + }; +} diff --git a/shikoku.nix b/shikoku.nix @@ -2,7 +2,6 @@ { imports = [ - ./desktop.nix ./gaming.nix ./devops.nix ./dev.go.nix @@ -16,6 +15,7 @@ ./ssh.nix ./vscode.nix ]; + profiles.desktop.enable = true; xdg.configFile."fish/conf.d/docker.fish".text = '' set -gx DOCKER_BUILDKIT 1 ''; diff --git a/wakasu.nix b/wakasu.nix @@ -2,7 +2,7 @@ { imports = [ - ./laptop.nix + ./desktop.nix ./devops.nix ./dev.go.nix ./dev.rust.nix @@ -14,6 +14,7 @@ ./ssh.nix ./vscode.nix ]; + profiles.laptop.enable = true; xdg.configFile."fish/conf.d/docker.fish".text = '' set -gx DOCKER_BUILDKIT 1 '';