mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-24 18:19:11 +00:00
config: fix conditional home-manager config
This should now work both for standalone home-manager and home-manager-with-NixOS setup.
This commit is contained in:
parent
05c27221d9
commit
e1c081b96d
@ -1,5 +1,5 @@
|
||||
# Enables all of my usual setup for desktop-oriented stuff.
|
||||
{ config, lib, pkgs, osConfig ? { }, ... }:
|
||||
{ config, lib, pkgs, ... }@attrs:
|
||||
|
||||
let cfg = config.profiles.desktop;
|
||||
in {
|
||||
@ -26,7 +26,7 @@ in {
|
||||
ffmpeg-full # Ah yes, everyman's multimedia swiss army knife.
|
||||
imagemagick # Ah yes, everyman's image manipulation tool.
|
||||
gmic # Don't let the gimmicks fool you, it's a magical image framework.
|
||||
] ++ (lib.optional (osConfig ? programs.blender.enable -> !osConfig.programs.blender.enable) blender);
|
||||
] ++ (lib.optional (attrs ? osConfig -> !attrs.osConfig.programs.blender.enable) blender);
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.audio.enable {
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Arsenal for development (which is rare nowadays). ;p
|
||||
# If you're looking for text editors, go to `./editors.nix`.
|
||||
{ config, lib, pkgs, osConfig ? { } ,... }:
|
||||
{ config, lib, pkgs, ... }@attrs:
|
||||
|
||||
let cfg = config.profiles.dev;
|
||||
in {
|
||||
@ -110,7 +110,7 @@ in {
|
||||
};
|
||||
|
||||
# Echolocation.
|
||||
programs.nix-index.enable = lib.mkIf (osConfig ? programs.nix-index.enable -> !osConfig.programs.nix-index.enable) true;
|
||||
programs.nix-index.enable = lib.mkIf (attrs ? osConfig -> !attrs.osConfig.programs.nix-index.enable) true;
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.shell.enable {
|
||||
|
@ -1,5 +1,5 @@
|
||||
# WHOA! Even browsers with extensions can be declarative!
|
||||
{ config, lib, pkgs, osConfig ? { }, ... }:
|
||||
{ config, lib, pkgs, ... }@attrs:
|
||||
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
@ -35,7 +35,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
(lib.mkIf (osConfig ? programs.firefox.enable -> !osConfig.programs.firefox.enable) {
|
||||
(lib.mkIf (attrs ? osConfig -> !attrs.osConfig.programs.firefox.enable) {
|
||||
# Despite the name, it isn't a browser for furries.
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
Loading…
Reference in New Issue
Block a user