From 2e067137ada1610f1a5ec205bd42458669233970 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 7 Apr 2022 10:51:33 -0700 Subject: home: misc fixes --- home/beets/default.nix | 4 ++-- home/fish/default.nix | 4 ++-- home/flac/default.nix | 2 +- home/git/default.nix | 2 +- home/go/default.nix | 19 ++++++++++--------- home/packages/default.nix | 2 +- home/python/default.nix | 4 ++-- home/ssh/default.nix | 2 +- home/tmux/default.nix | 2 +- home/yt-dlp/default.nix | 6 +++--- 10 files changed, 24 insertions(+), 23 deletions(-) diff --git a/home/beets/default.nix b/home/beets/default.nix index b93ddd1..617ff62 100644 --- a/home/beets/default.nix +++ b/home/beets/default.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let cfg = config.my.home.beets; in { - options.my.home.beets = with lib.my; { + options.my.home.beets = with lib; { enable = mkEnableOption "beets configuration"; musicDirectory = mkOption { type = types.str; @@ -10,7 +10,7 @@ in { }; }; - config.program.beets = lib.mkIf cfg.enable { + config.programs.beets = lib.mkIf cfg.enable { enable = true; settings = { directory = cfg.musicDirectory; diff --git a/home/fish/default.nix b/home/fish/default.nix index 1ba3d6c..ffb8f31 100644 --- a/home/fish/default.nix +++ b/home/fish/default.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let cfg = config.my.home.fish; in { - options.my.home.fish = with lib.my; { + options.my.home.fish = with lib; { enable = mkEnableOption "fish configuration"; }; - config.programs.ssh = lib.mkIf cfg.enable { + config.programs.fish = lib.mkIf cfg.enable { enable = true; interactiveShellInit = '' set fish_greeting diff --git a/home/flac/default.nix b/home/flac/default.nix index a97149f..eaf3856 100644 --- a/home/flac/default.nix +++ b/home/flac/default.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let cfg = config.my.home.flac; in { - options.my.home.flac = with lib.my; { + options.my.home.flac = with lib; { enable = mkEnableOption "flac configuration"; }; diff --git a/home/git/default.nix b/home/git/default.nix index 3b0bc86..bcf32ac 100644 --- a/home/git/default.nix +++ b/home/git/default.nix @@ -2,7 +2,7 @@ let cfg = config.my.home.git; in { - options.my.home.git = with lib.my; { + options.my.home.git = with lib; { enable = mkEnableOption "git configuration"; }; diff --git a/home/go/default.nix b/home/go/default.nix index c316189..24748d0 100644 --- a/home/go/default.nix +++ b/home/go/default.nix @@ -1,16 +1,17 @@ -{ config, ... }: +{ lib, config, ... }: let cfg = config.my.home.go; in { - options.my.home.go = with lib.my; { + options.my.home.go = with lib; { enable = mkEnableOption "go configuration"; }; - config.programs.go = lib.mkIf cfg.enable { - enable = true; - goPath = ".local/share/pkg.go"; - goBin = ".local/bin.go"; - goPrivate = [ "git.fcuny.net" "golang.fcuny.net" ]; + config = lib.mkIf cfg.enable { + programs.go = { + enable = true; + goPath = ".local/share/pkg.go"; + goBin = ".local/bin.go"; + goPrivate = [ "git.fcuny.net" "golang.fcuny.net" ]; + }; + home.sessionPath = [ config.home.sessionVariables.GOBIN ]; }; - - # home.sessionPath = [ config.home.sessionVariables.GOBIN ]; } diff --git a/home/packages/default.nix b/home/packages/default.nix index ee75c74..806ce31 100644 --- a/home/packages/default.nix +++ b/home/packages/default.nix @@ -2,7 +2,7 @@ let cfg = config.my.home.packages; in { options.my.home.packages = with lib; { - enable = my.mkDisableOption "user packages"; + enable = mkEnableOption "user packages"; additionalPackages = mkOption { type = with types; listOf package; default = [ ]; diff --git a/home/python/default.nix b/home/python/default.nix index c7069e3..b34f978 100644 --- a/home/python/default.nix +++ b/home/python/default.nix @@ -1,7 +1,7 @@ -{ pkgs, lib, ... }: +{ config, pkgs, lib, ... }: let cfg = config.my.home.python; in { - options.my.home.python = with lib.my; { + options.my.home.python = with lib; { enable = mkEnableOption "python configuration"; }; diff --git a/home/ssh/default.nix b/home/ssh/default.nix index a4eabbf..1088e80 100644 --- a/home/ssh/default.nix +++ b/home/ssh/default.nix @@ -1,7 +1,7 @@ { config, lib, ... }: let cfg = config.my.home.ssh; in { - options.my.home.ssh = with lib.my; { + options.my.home.ssh = with lib; { enable = mkEnableOption "ssh configuration"; }; diff --git a/home/tmux/default.nix b/home/tmux/default.nix index d1d9993..7836c26 100644 --- a/home/tmux/default.nix +++ b/home/tmux/default.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let cfg = config.my.home.tmux; in { - options.my.home.tmux = with lib.my; { + options.my.home.tmux = with lib; { enable = mkEnableOption "tmux terminal multiplexer"; }; diff --git a/home/yt-dlp/default.nix b/home/yt-dlp/default.nix index ce42014..a366f1f 100644 --- a/home/yt-dlp/default.nix +++ b/home/yt-dlp/default.nix @@ -1,12 +1,12 @@ { config, lib, pkgs, ... }: let cfg = config.my.home.yt-dlp; in { - options.my.home.yt-dlp = with lib.my; { + options.my.home.yt-dlp = with lib; { enable = mkEnableOption "yt-dlp configuration"; }; - config.programs.yt-dlp = lib.mkIf cfg.enable { - config.home.packages = with pkgs; [ yt-dlp ]; + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ yt-dlp ]; xdg.configFile."yt-dlp/config".source = config; }; } -- cgit 1.4.1