home-manager: hide behind an enable flag
This commit is contained in:
parent
ca43811c16
commit
b566910da0
|
@ -11,6 +11,7 @@
|
|||
./vpn.nix
|
||||
];
|
||||
|
||||
sane.home-manager.enable = true;
|
||||
sane.nixcache.enable-trusted-keys = true;
|
||||
sane.packages.enableConsolePkgs = true;
|
||||
sane.packages.enableSystemPkgs = true;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# Terminal UI mail client
|
||||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
lib.mkIf config.sane.home-manager.enable
|
||||
{
|
||||
sops.secrets."aerc_accounts" = {
|
||||
owner = config.users.users.colin.name;
|
||||
|
|
|
@ -33,6 +33,10 @@ in
|
|||
];
|
||||
|
||||
options = {
|
||||
sane.home-manager.enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
# attributes to copy directly to home-manager's `wayland.windowManager` option
|
||||
sane.home-manager.windowManager = mkOption {
|
||||
default = {};
|
||||
|
@ -46,7 +50,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
config = lib.mkIf cfg.enable {
|
||||
sane.impermanence.home-dirs = [
|
||||
"archive"
|
||||
"dev"
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
lib.mkIf config.sane.home-manager.enable
|
||||
{
|
||||
# TODO: this should only be enabled on gui devices
|
||||
# make Discord usable even when client is "outdated"
|
||||
|
|
|
@ -102,7 +102,7 @@ in
|
|||
type = types.attrs;
|
||||
};
|
||||
};
|
||||
config = {
|
||||
config = lib.mkIf config.sane.home-manager.enable {
|
||||
# XXX: although home-manager calls this option `firefox`, we can use other browsers and it still mostly works.
|
||||
home-manager.users.colin = lib.mkIf (config.sane.gui.enable) {
|
||||
programs.firefox = {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
lib.mkIf config.sane.home-manager.enable
|
||||
{
|
||||
home-manager.users.colin.programs.git = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
lib.mkIf config.sane.home-manager.enable
|
||||
{
|
||||
home-manager.users.colin.programs.kitty = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
lib.mkIf config.sane.home-manager.enable
|
||||
{
|
||||
home-manager.users.colin.programs.mpv = {
|
||||
enable = true;
|
||||
|
|
|
@ -8,7 +8,10 @@
|
|||
# it offers a primitive web-server
|
||||
# and it offers some CLI query tools
|
||||
|
||||
{ lib, pkgs, ... }: lib.mkIf false # XXX disabled!
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
# lib.mkIf config.sane.home-manager.enable
|
||||
lib.mkIf false # XXX disabled!
|
||||
{
|
||||
sane.packages.extraUserPkgs = [ pkgs.nb ];
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
lib.mkIf config.sane.home-manager.enable
|
||||
{
|
||||
sane.impermanence.home-dirs = [ ".cache/vim-swap" ];
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
lib.mkIf config.sane.home-manager.enable
|
||||
{
|
||||
home-manager.users.colin = let
|
||||
host = config.networking.hostName;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
lib.mkIf config.sane.home-manager.enable
|
||||
{
|
||||
# TODO: this should only be shipped on gui platforms
|
||||
sops.secrets."sublime_music_config" = {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ lib, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
lib.mkIf config.sane.home-manager.enable
|
||||
{
|
||||
home-manager.users.colin.xdg.configFile."vlc/vlcrc".text =
|
||||
let
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
lib.mkIf config.sane.home-manager.enable
|
||||
{
|
||||
# we don't need to full zsh dir -- just the history file --
|
||||
# but zsh will sometimes backup the history file and we get fewer errors if we do proper mounts instead of symlinks.
|
||||
|
|
Loading…
Reference in New Issue
Block a user