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
@@ -1,4 +1,20 @@
|
||||
{ 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, ... }: {
|
||||
options.features.applications.cli.fastfetch.enable = lib.mkEnableOption "fastfetch";
|
||||
|
||||
|
||||
@@ -8,11 +8,7 @@
|
||||
(mkIf (!p) no)
|
||||
];
|
||||
in lib.mkIf (config.features.applications.gui.equibop.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
features.applications.gui.equibop.enable = lib.mkDefault true;
|
||||
}
|
||||
];
|
||||
home-manager.users.grey.features.applications.gui.equibop.enable = lib.mkDefault true;
|
||||
} {
|
||||
environment.systemPackages = [ pkgs.equibop ];
|
||||
});
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
{ inputs, self, ... }: {
|
||||
flake.nixosModules.graphics = { pkgs, lib, config, ... }: {
|
||||
home-manager.sharedModules = lib.mkIf (config.features.nixos.stylix.enable) [
|
||||
({ config, lib, ... }: {
|
||||
stylix.targets.floorp.profileNames = lib.mkIf (config.features.applications.gui.floorp.enable) [ "default" ];
|
||||
})
|
||||
];
|
||||
options.features.applications.gui.floorp.enable = lib.mkEnableOption "floorp";
|
||||
|
||||
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, ... }: {
|
||||
|
||||
@@ -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, ... }: {
|
||||
options.features.applications.gui = {
|
||||
fluxer.enable = lib.mkEnableOption "fluxer";
|
||||
fluxer-canary.enable = lib.mkEnableOption "fluxer-canary";
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.systemPackages = (if config.features.applications.gui.fluxer.enable then [
|
||||
(pkgs.callPackage ({ appimageTools, fetchurl, lib, pkgs, ... }:
|
||||
let
|
||||
pname = "fluxer";
|
||||
version = "0.0.8";
|
||||
config = lib.mkIf (config.features.applications.gui.fluxer.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.users.grey.features.applications.gui.fluxer.enable = lib.mkDefault true;
|
||||
} {
|
||||
environment.systemPackages = [
|
||||
(pkgs.callPackage (fluxer-package) {})
|
||||
];
|
||||
}) // 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 {
|
||||
url = "https://api.fluxer.app/dl/desktop/stable/linux/x64/latest/appimage";
|
||||
sha256 = "sha256-GdoBK+Z/d2quEIY8INM4IQy5tzzIBBM+3CgJXQn0qAw=";
|
||||
};
|
||||
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
||||
options.features.applications.gui = {
|
||||
fluxer.enable = lib.mkEnableOption "fluxer";
|
||||
fluxer-canary.enable = lib.mkEnableOption "fluxer-canary";
|
||||
};
|
||||
|
||||
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" ];
|
||||
};
|
||||
}) {})
|
||||
] 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 []);
|
||||
config = lib.mkIf (config.features.applications.gui.fluxer.enable) {
|
||||
home.packages = [
|
||||
(pkgs.callPackage (fluxer-package) {})
|
||||
];
|
||||
} // lib.mkIf (config.features.applications.gui.fluxer-canary.enable) {
|
||||
home.packages = [
|
||||
(pkgs.callPackage (fluxer-canary-package) {})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -8,11 +8,7 @@
|
||||
(mkIf (!p) no)
|
||||
];
|
||||
in lib.mkIf (config.features.applications.gui.kitty.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
features.applications.gui.kitty.enable = lib.mkDefault true;
|
||||
}
|
||||
];
|
||||
home-manager.users.grey.features.applications.gui.kitty.enable = lib.mkDefault true;
|
||||
} {
|
||||
environment.systemPackages = [ pkgs.kitty ];
|
||||
});
|
||||
|
||||
@@ -17,11 +17,9 @@
|
||||
terminal = "kitty";
|
||||
};
|
||||
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
features.applications.gui.nautilus.enable = true;
|
||||
}
|
||||
];
|
||||
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
||||
features.applications.gui.nautilus.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,6 +27,8 @@
|
||||
options.features.applications.gui.nautilus.enable = lib.mkEnableOption "nautilus";
|
||||
|
||||
config = lib.mkIf (config.features.applications.gui.nautilus.enable) {
|
||||
home.packages = lib.mkIf (config.info.isStandalone) [ pkgs.nautilus ];
|
||||
|
||||
gtk.gtk3.bookmarks = [
|
||||
"file://${config.info.rootPath} NixOS"
|
||||
"file:///home/grey/Downloads Downloads"
|
||||
|
||||
@@ -1,4 +1,23 @@
|
||||
{ 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, ... }: {
|
||||
options.features.applications.gui.remmina.enable = lib.mkEnableOption "remmina";
|
||||
|
||||
|
||||
@@ -1,4 +1,26 @@
|
||||
{ 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, ... }: {
|
||||
options.features.applications.gui.spotify = {
|
||||
enable = lib.mkEnableOption "spotify";
|
||||
@@ -9,15 +31,13 @@
|
||||
inputs.spicetify.homeManagerModules.default
|
||||
];
|
||||
|
||||
config = {
|
||||
home.packages = lib.mkIf (with config.features.applications.gui.spotify; enable && !spicetify.enable) (with pkgs; [
|
||||
spotify
|
||||
]);
|
||||
config = lib.mkIf (config.features.applications.gui.spotify.enable) {
|
||||
home.packages = lib.mkIf (!config.features.applications.gui.spotify.spicetify.enable) [ pkgs.spotify ];
|
||||
|
||||
programs.spicetify =
|
||||
let
|
||||
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;
|
||||
enabledExtensions = with spicePkgs.extensions; [
|
||||
hidePodcasts
|
||||
|
||||
@@ -2,22 +2,23 @@
|
||||
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
|
||||
options.features.applications.gui.vscode.enable = lib.mkEnableOption "vscode";
|
||||
|
||||
config = {
|
||||
environment.systemPackages = [ pkgs.vscode ];
|
||||
|
||||
home-manager.sharedModules = lib.mkIf (config.features.applications.gui.vscode.enable) [
|
||||
{
|
||||
features.applications.gui.vscode.enable = lib.mkDefault true;
|
||||
}
|
||||
config = let
|
||||
mkIfElse = with lib; p: yes: no: mkMerge [
|
||||
(mkIf p yes)
|
||||
(mkIf (!p) no)
|
||||
];
|
||||
};
|
||||
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, ... }: {
|
||||
options.features.applications.gui.vscode.enable = lib.mkEnableOption "vscode";
|
||||
|
||||
config = lib.mkIf (config.features.applications.gui.vscode.enable) {
|
||||
home.packages = lib.mkIf (config.info.isStandalone) [ pkgs.vscode ];
|
||||
home.packages = [ pkgs.vscode ];
|
||||
|
||||
home.activation = {
|
||||
linkVsCodeConfigSettings = lib.hm.dag.entryAfter ["writeBoundary"] (config.helpers.mkSymlinkActivationScript {
|
||||
|
||||
Reference in new issue
Block a user