all application options will adapt to environment
when used either with nixos (no home-manager) or home-manager standalone, `features.applications.<name>.enable` options still perform some functionality, rather than assuming a full nixos + home-manager setup like before
This commit is contained in:
17 files changed
+265
-151
No files matched your search
@@ -7,25 +7,23 @@
|
|||||||
|
|
||||||
programs.noctalia.enable = true;
|
programs.noctalia.enable = true;
|
||||||
|
|
||||||
home-manager.sharedModules = [
|
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) ({ lib, config, ... }: {
|
||||||
({ lib, config, ... }: {
|
home.activation = {
|
||||||
home.activation = {
|
symlinkNoctaliaState = lib.hm.dag.entryAfter ["writeBoundary"] (config.helpers.mkSymlinkActivationScript {
|
||||||
symlinkNoctaliaState = lib.hm.dag.entryAfter ["writeBoundary"] (config.helpers.mkSymlinkActivationScript {
|
target = ".local/state/noctalia/settings.toml";
|
||||||
target = ".local/state/noctalia/settings.toml";
|
source = "dotfiles/${config.info.hostName}/noctalia/settings.toml";
|
||||||
source = "dotfiles/${config.info.hostName}/noctalia/settings.toml";
|
});
|
||||||
});
|
|
||||||
|
|
||||||
symlinkNoctaliaStatePlugins = lib.hm.dag.entryAfter ["writeBoundary"] (config.helpers.mkSymlinkActivationScript {
|
symlinkNoctaliaStatePlugins = lib.hm.dag.entryAfter ["writeBoundary"] (config.helpers.mkSymlinkActivationScript {
|
||||||
target = ".local/state/noctalia/plugins";
|
target = ".local/state/noctalia/plugins";
|
||||||
source = "dotfiles/${config.info.hostName}/noctalia/plugins";
|
source = "dotfiles/${config.info.hostName}/noctalia/plugins";
|
||||||
isDir = true;
|
isDir = true;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."noctalia/settings.toml".source = "${self}/dotfiles/${config.info.hostName}/noctalia/settings.toml";
|
xdg.configFile."noctalia/settings.toml".source = "${self}/dotfiles/${config.info.hostName}/noctalia/settings.toml";
|
||||||
xdg.configFile."noctalia/plugins".source = "${self}/dotfiles/${config.info.hostName}/noctalia/plugins";
|
xdg.configFile."noctalia/plugins".source = "${self}/dotfiles/${config.info.hostName}/noctalia/plugins";
|
||||||
})
|
});
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -37,14 +37,12 @@
|
|||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.sharedModules = [
|
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) ({ lib, config, ... }: {
|
||||||
({ lib, config, ... }: {
|
home.activation.symlinkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] (config.helpers.mkSymlinkActivationScript {
|
||||||
home.activation.symlinkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] (config.helpers.mkSymlinkActivationScript {
|
target = ".config/niri/config.kdl";
|
||||||
target = ".config/niri/config.kdl";
|
source = "dotfiles/${config.info.hostName}/niri.kdl";
|
||||||
source = "dotfiles/${config.info.hostName}/niri.kdl";
|
});
|
||||||
});
|
});
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,20 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
|
flake.nixosModules.global = { pkgs, lib, config, ... }: {
|
||||||
|
options.features.applications.cli.fastfetch.enable = lib.mkEnableOption "fastfetch";
|
||||||
|
|
||||||
|
config = let
|
||||||
|
mkIfElse = with lib; p: yes: no:
|
||||||
|
mkMerge [
|
||||||
|
(mkIf p yes)
|
||||||
|
(mkIf (!p) no)
|
||||||
|
];
|
||||||
|
in lib.mkIf (config.features.applications.cli.fastfetch.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
|
home-manager.users.grey.features.applications.cli.fastfetch.enable = lib.mkDefault true;
|
||||||
|
} {
|
||||||
|
environment.systemPackages = [ pkgs.fastfetch ];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
flake.homeModules.global = { pkgs, lib, config, ... }: {
|
flake.homeModules.global = { pkgs, lib, config, ... }: {
|
||||||
options.features.applications.cli.fastfetch.enable = lib.mkEnableOption "fastfetch";
|
options.features.applications.cli.fastfetch.enable = lib.mkEnableOption "fastfetch";
|
||||||
|
|
||||||
|
|||||||
@@ -8,11 +8,7 @@
|
|||||||
(mkIf (!p) no)
|
(mkIf (!p) no)
|
||||||
];
|
];
|
||||||
in lib.mkIf (config.features.applications.gui.equibop.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
in lib.mkIf (config.features.applications.gui.equibop.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
home-manager.sharedModules = [
|
home-manager.users.grey.features.applications.gui.equibop.enable = lib.mkDefault true;
|
||||||
{
|
|
||||||
features.applications.gui.equibop.enable = lib.mkDefault true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
} {
|
} {
|
||||||
environment.systemPackages = [ pkgs.equibop ];
|
environment.systemPackages = [ pkgs.equibop ];
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.graphics = { pkgs, lib, config, ... }: {
|
flake.nixosModules.graphics = { pkgs, lib, config, ... }: {
|
||||||
home-manager.sharedModules = lib.mkIf (config.features.nixos.stylix.enable) [
|
options.features.applications.gui.floorp.enable = lib.mkEnableOption "floorp";
|
||||||
({ config, lib, ... }: {
|
|
||||||
stylix.targets.floorp.profileNames = lib.mkIf (config.features.applications.gui.floorp.enable) [ "default" ];
|
config = let
|
||||||
})
|
mkIfElse = with lib; p: yes: no: mkMerge [
|
||||||
];
|
(mkIf p yes)
|
||||||
|
(mkIf (!p) no)
|
||||||
|
];
|
||||||
|
in lib.mkIf (config.features.applications.gui.floorp.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
|
home-manager.users.grey.features.applications.gui.floorp.enable = lib.mkDefault true;
|
||||||
|
} {
|
||||||
|
environment.systemPackages = [ pkgs.floorp-bin ];
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
|
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
|
||||||
|
|||||||
@@ -1,78 +1,109 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, lib, ... }: let
|
||||||
|
fluxer-package = { appimageTools, fetchurl, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
pname = "fluxer";
|
||||||
|
version = "0.0.8";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://api.fluxer.app/dl/desktop/stable/linux/x64/latest/appimage";
|
||||||
|
sha256 = "sha256-GdoBK+Z/d2quEIY8INM4IQy5tzzIBBM+3CgJXQn0qAw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
appimageContents = appimageTools.extract { inherit pname version src; };
|
||||||
|
in
|
||||||
|
appimageTools.wrapType2 rec {
|
||||||
|
inherit pname version src;
|
||||||
|
|
||||||
|
extraInstallCommands = ''
|
||||||
|
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
|
||||||
|
|
||||||
|
install -m 444 -D ${appimageContents}/${pname}.png $out/share/icons/hicolor/512x512/apps/${pname}.png
|
||||||
|
|
||||||
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||||
|
--replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname} %U'
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Open-source, self-hosted alternative to Discord";
|
||||||
|
homepage = "https://fluxer.app/";
|
||||||
|
license = licenses.agpl3Only;
|
||||||
|
maintainers = [ ];
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fluxer-canary-package = { appimageTools, fetchurl, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
pname = "fluxer-canary";
|
||||||
|
version = "2026.827.132039";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://api.canary.fluxer.app/dl/desktop/canary/linux/x64/latest/appimage";
|
||||||
|
sha256 = "sha256-eRR9JZa4LPuUtjdDO+JvzaOLxQeDgVziLrFr5iIgr1Q=";
|
||||||
|
};
|
||||||
|
|
||||||
|
appimageContents = appimageTools.extract { inherit pname version src; };
|
||||||
|
in
|
||||||
|
appimageTools.wrapType2 rec {
|
||||||
|
inherit pname version src;
|
||||||
|
|
||||||
|
extraInstallCommands = ''
|
||||||
|
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
|
||||||
|
|
||||||
|
install -m 444 -D ${appimageContents}/${pname}.png $out/share/icons/hicolor/512x512/apps/${pname}.png
|
||||||
|
|
||||||
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||||
|
--replace 'Exec=AppRun %U' 'Exec=${pname} %U'
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Open-source, self-hosted alternative to Discord";
|
||||||
|
homepage = "https://fluxer.app/";
|
||||||
|
license = licenses.agpl3Only;
|
||||||
|
maintainers = [ ];
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mkIfElse = with lib; p: yes: no:
|
||||||
|
mkMerge [
|
||||||
|
(mkIf p yes)
|
||||||
|
(mkIf (!p) no)
|
||||||
|
];
|
||||||
|
in {
|
||||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
options.features.applications.gui = {
|
options.features.applications.gui = {
|
||||||
fluxer.enable = lib.mkEnableOption "fluxer";
|
fluxer.enable = lib.mkEnableOption "fluxer";
|
||||||
fluxer-canary.enable = lib.mkEnableOption "fluxer-canary";
|
fluxer-canary.enable = lib.mkEnableOption "fluxer-canary";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = lib.mkIf (config.features.applications.gui.fluxer.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
environment.systemPackages = (if config.features.applications.gui.fluxer.enable then [
|
home-manager.users.grey.features.applications.gui.fluxer.enable = lib.mkDefault true;
|
||||||
(pkgs.callPackage ({ appimageTools, fetchurl, lib, pkgs, ... }:
|
} {
|
||||||
let
|
environment.systemPackages = [
|
||||||
pname = "fluxer";
|
(pkgs.callPackage (fluxer-package) {})
|
||||||
version = "0.0.8";
|
];
|
||||||
|
}) // lib.mkIf (config.features.applications.gui.fluxer-canary.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
|
home-manager.users.grey.features.applications.gui.fluxer-canary.enable = lib.mkDefault true;
|
||||||
|
} {
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.callPackage (fluxer-canary-package) {})
|
||||||
|
];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
src = fetchurl {
|
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
url = "https://api.fluxer.app/dl/desktop/stable/linux/x64/latest/appimage";
|
options.features.applications.gui = {
|
||||||
sha256 = "sha256-GdoBK+Z/d2quEIY8INM4IQy5tzzIBBM+3CgJXQn0qAw=";
|
fluxer.enable = lib.mkEnableOption "fluxer";
|
||||||
};
|
fluxer-canary.enable = lib.mkEnableOption "fluxer-canary";
|
||||||
|
};
|
||||||
|
|
||||||
appimageContents = appimageTools.extract { inherit pname version src; };
|
config = lib.mkIf (config.features.applications.gui.fluxer.enable) {
|
||||||
in
|
home.packages = [
|
||||||
appimageTools.wrapType2 rec {
|
(pkgs.callPackage (fluxer-package) {})
|
||||||
inherit pname version src;
|
];
|
||||||
|
} // lib.mkIf (config.features.applications.gui.fluxer-canary.enable) {
|
||||||
extraInstallCommands = ''
|
home.packages = [
|
||||||
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
|
(pkgs.callPackage (fluxer-canary-package) {})
|
||||||
|
];
|
||||||
install -m 444 -D ${appimageContents}/${pname}.png $out/share/icons/hicolor/512x512/apps/${pname}.png
|
|
||||||
|
|
||||||
substituteInPlace $out/share/applications/${pname}.desktop \
|
|
||||||
--replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname} %U'
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Open-source, self-hosted alternative to Discord";
|
|
||||||
homepage = "https://fluxer.app/";
|
|
||||||
license = licenses.agpl3Only;
|
|
||||||
maintainers = [ ];
|
|
||||||
platforms = [ "x86_64-linux" ];
|
|
||||||
};
|
|
||||||
}) {})
|
|
||||||
] else []) ++ (if config.features.applications.gui.fluxer-canary.enable then [
|
|
||||||
(pkgs.callPackage ({ appimageTools, fetchurl, lib, pkgs, ... }:
|
|
||||||
let
|
|
||||||
pname = "fluxer-canary";
|
|
||||||
version = "2026.827.132039";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://api.canary.fluxer.app/dl/desktop/canary/linux/x64/latest/appimage";
|
|
||||||
sha256 = "sha256-eRR9JZa4LPuUtjdDO+JvzaOLxQeDgVziLrFr5iIgr1Q=";
|
|
||||||
};
|
|
||||||
|
|
||||||
appimageContents = appimageTools.extract { inherit pname version src; };
|
|
||||||
in
|
|
||||||
appimageTools.wrapType2 rec {
|
|
||||||
inherit pname version src;
|
|
||||||
|
|
||||||
extraInstallCommands = ''
|
|
||||||
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
|
|
||||||
|
|
||||||
install -m 444 -D ${appimageContents}/${pname}.png $out/share/icons/hicolor/512x512/apps/${pname}.png
|
|
||||||
|
|
||||||
substituteInPlace $out/share/applications/${pname}.desktop \
|
|
||||||
--replace 'Exec=AppRun %U' 'Exec=${pname} %U'
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Open-source, self-hosted alternative to Discord";
|
|
||||||
homepage = "https://fluxer.app/";
|
|
||||||
license = licenses.agpl3Only;
|
|
||||||
maintainers = [ ];
|
|
||||||
platforms = [ "x86_64-linux" ];
|
|
||||||
};
|
|
||||||
}) {})
|
|
||||||
] else []);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -8,11 +8,7 @@
|
|||||||
(mkIf (!p) no)
|
(mkIf (!p) no)
|
||||||
];
|
];
|
||||||
in lib.mkIf (config.features.applications.gui.kitty.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
in lib.mkIf (config.features.applications.gui.kitty.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
home-manager.sharedModules = [
|
home-manager.users.grey.features.applications.gui.kitty.enable = lib.mkDefault true;
|
||||||
{
|
|
||||||
features.applications.gui.kitty.enable = lib.mkDefault true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
} {
|
} {
|
||||||
environment.systemPackages = [ pkgs.kitty ];
|
environment.systemPackages = [ pkgs.kitty ];
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,11 +17,9 @@
|
|||||||
terminal = "kitty";
|
terminal = "kitty";
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.sharedModules = [
|
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
||||||
{
|
features.applications.gui.nautilus.enable = true;
|
||||||
features.applications.gui.nautilus.enable = true;
|
};
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -29,6 +27,8 @@
|
|||||||
options.features.applications.gui.nautilus.enable = lib.mkEnableOption "nautilus";
|
options.features.applications.gui.nautilus.enable = lib.mkEnableOption "nautilus";
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.gui.nautilus.enable) {
|
config = lib.mkIf (config.features.applications.gui.nautilus.enable) {
|
||||||
|
home.packages = lib.mkIf (config.info.isStandalone) [ pkgs.nautilus ];
|
||||||
|
|
||||||
gtk.gtk3.bookmarks = [
|
gtk.gtk3.bookmarks = [
|
||||||
"file://${config.info.rootPath} NixOS"
|
"file://${config.info.rootPath} NixOS"
|
||||||
"file:///home/grey/Downloads Downloads"
|
"file:///home/grey/Downloads Downloads"
|
||||||
|
|||||||
@@ -1,4 +1,23 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
|
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
|
options.features.applications.gui.remmina.enable = lib.mkEnableOption "remmina";
|
||||||
|
|
||||||
|
config = let
|
||||||
|
mkIfElse = with lib; p: yes: no:
|
||||||
|
mkMerge [
|
||||||
|
(mkIf p yes)
|
||||||
|
(mkIf (!p) no)
|
||||||
|
];
|
||||||
|
in lib.mkIf (config.features.applications.gui.remmina.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
|
home-manager.users.grey.features.applications.gui.remmina.enable = lib.mkDefault true;
|
||||||
|
} {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
remmina
|
||||||
|
freerdp
|
||||||
|
];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
options.features.applications.gui.remmina.enable = lib.mkEnableOption "remmina";
|
options.features.applications.gui.remmina.enable = lib.mkEnableOption "remmina";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,26 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
|
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
|
options.features.applications.gui.spotify = {
|
||||||
|
enable = lib.mkEnableOption "spotify";
|
||||||
|
spicetify.enable = lib.mkEnableOption "spicetify";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = let
|
||||||
|
mkIfElse = with lib; p: yes: no:
|
||||||
|
mkMerge [
|
||||||
|
(mkIf p yes)
|
||||||
|
(mkIf (!p) no)
|
||||||
|
];
|
||||||
|
in lib.mkIf (config.features.applications.gui.spotify.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
|
home-manager.users.grey.features.applications.gui.spotify = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
spicetify.enable = lib.mkDefault config.features.applications.gui.spotify.spicetify.enable;
|
||||||
|
};
|
||||||
|
} {
|
||||||
|
environment.systemPackages = [ pkgs.spotify ];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
options.features.applications.gui.spotify = {
|
options.features.applications.gui.spotify = {
|
||||||
enable = lib.mkEnableOption "spotify";
|
enable = lib.mkEnableOption "spotify";
|
||||||
@@ -9,15 +31,13 @@
|
|||||||
inputs.spicetify.homeManagerModules.default
|
inputs.spicetify.homeManagerModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = lib.mkIf (config.features.applications.gui.spotify.enable) {
|
||||||
home.packages = lib.mkIf (with config.features.applications.gui.spotify; enable && !spicetify.enable) (with pkgs; [
|
home.packages = lib.mkIf (!config.features.applications.gui.spotify.spicetify.enable) [ pkgs.spotify ];
|
||||||
spotify
|
|
||||||
]);
|
|
||||||
|
|
||||||
programs.spicetify =
|
programs.spicetify =
|
||||||
let
|
let
|
||||||
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||||
in lib.mkIf (with config.features.applications.gui.spotify; enable && spicetify.enable) {
|
in lib.mkIf (config.features.applications.gui.spotify.spicetify.enable) {
|
||||||
enable = true;
|
enable = true;
|
||||||
enabledExtensions = with spicePkgs.extensions; [
|
enabledExtensions = with spicePkgs.extensions; [
|
||||||
hidePodcasts
|
hidePodcasts
|
||||||
|
|||||||
@@ -2,22 +2,23 @@
|
|||||||
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
|
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
|
||||||
options.features.applications.gui.vscode.enable = lib.mkEnableOption "vscode";
|
options.features.applications.gui.vscode.enable = lib.mkEnableOption "vscode";
|
||||||
|
|
||||||
config = {
|
config = let
|
||||||
environment.systemPackages = [ pkgs.vscode ];
|
mkIfElse = with lib; p: yes: no: mkMerge [
|
||||||
|
(mkIf p yes)
|
||||||
home-manager.sharedModules = lib.mkIf (config.features.applications.gui.vscode.enable) [
|
(mkIf (!p) no)
|
||||||
{
|
|
||||||
features.applications.gui.vscode.enable = lib.mkDefault true;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
in lib.mkIf (config.features.applications.gui.vscode.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
|
home-manager.users.grey.features.applications.gui.vscode.enable = lib.mkDefault true;
|
||||||
|
} {
|
||||||
|
environment.systemPackages = [ pkgs.vscode ];
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { config, pkgs, lib, ... }: {
|
flake.homeModules.graphics = { config, pkgs, lib, ... }: {
|
||||||
options.features.applications.gui.vscode.enable = lib.mkEnableOption "vscode";
|
options.features.applications.gui.vscode.enable = lib.mkEnableOption "vscode";
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.gui.vscode.enable) {
|
config = lib.mkIf (config.features.applications.gui.vscode.enable) {
|
||||||
home.packages = lib.mkIf (config.info.isStandalone) [ pkgs.vscode ];
|
home.packages = [ pkgs.vscode ];
|
||||||
|
|
||||||
home.activation = {
|
home.activation = {
|
||||||
linkVsCodeConfigSettings = lib.hm.dag.entryAfter ["writeBoundary"] (config.helpers.mkSymlinkActivationScript {
|
linkVsCodeConfigSettings = lib.hm.dag.entryAfter ["writeBoundary"] (config.helpers.mkSymlinkActivationScript {
|
||||||
|
|||||||
@@ -15,6 +15,14 @@
|
|||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
backupFileExtension = "bak";
|
backupFileExtension = "bak";
|
||||||
users.grey = self.homeModules.${config.info.hostName};
|
users.grey = self.homeModules.${config.info.hostName};
|
||||||
|
sharedModules = [
|
||||||
|
{ features.nixos.stylix.enable = lib.mkDefault config.features.nixos.stylix.enable; }
|
||||||
|
( lib.mkIf (config.features.nixos.stylix.enable)
|
||||||
|
( if (config.features.applications.gui.floorp.enable) then {
|
||||||
|
stylix.targets.floorp.profileNames = [ "default" ];
|
||||||
|
} else {})
|
||||||
|
)
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -6,10 +6,19 @@
|
|||||||
|
|
||||||
options.features.nixos.stylix.enable = lib.mkEnableOption "stylix";
|
options.features.nixos.stylix.enable = lib.mkEnableOption "stylix";
|
||||||
|
|
||||||
config = lib.mkIf (config.features.nixos.stylix.enable) {
|
config = let
|
||||||
|
mkIfElse = with lib; p: yes: no: mkMerge [
|
||||||
|
(mkIf p yes)
|
||||||
|
(mkIf (!p) no)
|
||||||
|
];
|
||||||
|
in lib.mkIf (config.features.nixos.stylix.enable) {
|
||||||
stylix.enable = true;
|
stylix.enable = true;
|
||||||
stylix.image = builtins.path { path = "${self}/modules/hosts/${config.info.hostName}/wallpaper.jpg"; };
|
stylix.image = builtins.path { path = "${self}/modules/hosts/${config.info.hostName}/wallpaper.jpg"; };
|
||||||
stylix.polarity = "dark";
|
stylix.polarity = "dark";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
|
||||||
|
options.features.nixos.stylix.enable = lib.mkEnableOption "stylix";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@@ -10,12 +10,10 @@
|
|||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
users.users."grey".shell = pkgs.zsh;
|
users.users."grey".shell = pkgs.zsh;
|
||||||
|
|
||||||
home-manager.sharedModules = [
|
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
||||||
{
|
features.shells.zsh.enable = lib.mkDefault true;
|
||||||
features.shells.zsh.enable = true;
|
features.shells.zsh.antidote.enable = lib.mkDefault config.features.shells.zsh.antidote.enable;
|
||||||
features.shells.zsh.antidote.enable = lib.mkIf (config.features.shells.zsh.antidote.enable) true;
|
};
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -82,10 +82,9 @@
|
|||||||
powerOnBoot = false;
|
powerOnBoot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.sharedModules = [
|
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
||||||
({ config, ... }: {
|
info.isStandalone = lib.mkDefault false;
|
||||||
info.isStandalone = false;
|
# home.stateVersion = lib.mkDefault config.info.stateVersion;
|
||||||
})
|
};
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -28,6 +28,27 @@
|
|||||||
lib.attrsets.attrByPath (lib.strings.splitString "." strPath) null set;
|
lib.attrsets.attrByPath (lib.strings.splitString "." strPath) null set;
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
homeManagerInheritEnableOptionElse = lib.mkOption {
|
||||||
|
# type = lib.types.functionTo lib.types.attrs;
|
||||||
|
default = optionName: systemAttrs: let
|
||||||
|
mkIfElse = with lib; p: yes: no: mkMerge [
|
||||||
|
(mkIf p yes)
|
||||||
|
(mkIf (!p) no)
|
||||||
|
];
|
||||||
|
|
||||||
|
attrByStrPath = strPath: set:
|
||||||
|
lib.attrsets.attrByPath (lib.strings.splitString "." strPath) null set;
|
||||||
|
|
||||||
|
setAttrByStrPath = strPath: value:
|
||||||
|
lib.attrsets.setAttrByPath (lib.strings.splitString "." strPath) value;
|
||||||
|
in builtins.trace "hi" lib.mkIf (attrByStrPath optionName config) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
|
home-manager.sharedModules = [
|
||||||
|
({ lib, ... }: (setAttrByStrPath optionName (lib.mkDefault true)))
|
||||||
|
];
|
||||||
|
} (systemAttrs));
|
||||||
|
readOnly = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,16 @@
|
|||||||
kitty.enable = true;
|
kitty.enable = true;
|
||||||
vscode.enable = true;
|
vscode.enable = true;
|
||||||
equibop.enable = true;
|
equibop.enable = true;
|
||||||
|
floorp.enable = true;
|
||||||
|
remmina.enable = true;
|
||||||
|
spotify = {
|
||||||
|
enable = true;
|
||||||
|
spicetify.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cli = {
|
||||||
|
fastfetch.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
@@ -93,19 +103,6 @@
|
|||||||
|
|
||||||
features = {
|
features = {
|
||||||
applications = {
|
applications = {
|
||||||
cli = {
|
|
||||||
fastfetch.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
gui = {
|
|
||||||
floorp.enable = true;
|
|
||||||
remmina.enable = true;
|
|
||||||
spotify = {
|
|
||||||
enable = true;
|
|
||||||
spicetify.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
obsidian
|
obsidian
|
||||||
thunderbird
|
thunderbird
|
||||||
|
|||||||
Reference in new issue
Block a user