move options to separate modules, set up mkDocs generation
Build docs with nix and Material for mkDocs / build-docs (push) Successful in 1m33s
Build docs with nix and Material for mkDocs / build-docs (push) Successful in 1m33s
This commit is contained in:
33 files changed
+383
-274
No files matched your search
@@ -0,0 +1,16 @@
|
|||||||
|
name: Build docs with nix and Material for mkDocs
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-docs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Nix action dependencies
|
||||||
|
run: |
|
||||||
|
apt update -y
|
||||||
|
apt install sudo -y
|
||||||
|
- uses: cachix/install-nix-action@v27
|
||||||
|
- name: Build package from flake
|
||||||
|
run: nix build .#docs
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
"authenticated": false,
|
"authenticated": false,
|
||||||
"settingsSync": false,
|
"settingsSync": false,
|
||||||
"url": "https://cloud.equicord.org/",
|
"url": "https://cloud.equicord.org/",
|
||||||
"settingsSyncVersion": 1788144154760
|
"settingsSyncVersion": 1788177702981
|
||||||
},
|
},
|
||||||
"enableOnlineThemes": true,
|
"enableOnlineThemes": true,
|
||||||
"enabledThemeLinks": [],
|
"enabledThemeLinks": [],
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ body {
|
|||||||
/* text colors */
|
/* text colors */
|
||||||
--text-0: hsl(220, 16%, 95%); /* text on colored elements */
|
--text-0: hsl(220, 16%, 95%); /* text on colored elements */
|
||||||
--text-2: hsl(217.5, 20%, 90%); /* headings and important text */
|
--text-2: hsl(217.5, 20%, 90%); /* headings and important text */
|
||||||
--text-3: hsl(219, 30%, 85%); /* normal text */
|
--text-3: hsl(219, 30%, 90%); /* normal text */
|
||||||
--text-4: hsl(220.5, 14%, 75%); /* icon buttons and channels */
|
--text-4: hsl(220.5, 14%, 85%); /* icon buttons and channels */
|
||||||
--text-5: hsl(221, 13.5%, 70%); /* muted channels/chats and timestamps */
|
--text-5: hsl(221, 13.5%, 80%); /* muted channels/chats and timestamps */
|
||||||
|
|
||||||
/* background and dark colors */
|
/* background and dark colors */
|
||||||
--bg-1: #303643; /* dark buttons when clicked */
|
--bg-1: #303643; /* dark buttons when clicked */
|
||||||
@@ -34,7 +34,7 @@ body {
|
|||||||
|
|
||||||
/* accent colors */
|
/* accent colors */
|
||||||
--accent-1: #8fbcbb; /* links and other accent text */
|
--accent-1: #8fbcbb; /* links and other accent text */
|
||||||
--accent-2: hsl(179, 25%, 45%); /* small accent elements */
|
--accent-2: hsl(179, 30%, 45%); /* small accent elements */
|
||||||
--accent-3: hsl(193, 25%, 45%); /* accent buttons */
|
--accent-3: hsl(193, 25%, 45%); /* accent buttons */
|
||||||
--accent-4: hsl(193, 25%, 55%); /* accent buttons when hovered */
|
--accent-4: hsl(193, 25%, 55%); /* accent buttons when hovered */
|
||||||
--accent-5: hsl(193, 25%, 60%); /* accent buttons when clicked */
|
--accent-5: hsl(193, 25%, 60%); /* accent buttons when clicked */
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{ inputs, self, ... }: {
|
||||||
|
flake.homeModules.audio = { ... }: {
|
||||||
|
imports = [ self.homeModules.audioOptions ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.gaming = { pkgs, config, lib, ... }: {
|
flake.nixosModules.gaming = { ... }: {
|
||||||
|
imports = [ self.nixosModules.gamingOptions ];
|
||||||
|
|
||||||
hardware.steam-hardware.enable = true;
|
hardware.steam-hardware.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
flake.homeModules.gaming = { ... }: {
|
||||||
|
imports = [ self.homeModules.gamingOptions ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@@ -1,85 +1,52 @@
|
|||||||
{ inputs, self, ... }: let
|
{ inputs, self, ... }: {
|
||||||
wm-option-type = inputs.helpers.mkOptionalListOfType (inputs.helpers.mkEnumFromDirContents "${self}/modules/components/window-managers");
|
flake.nixosModules.graphics = { pkgs, ... }: {
|
||||||
shell-option-type = inputs.helpers.mkOptionalListOfType (inputs.helpers.mkEnumFromDirContents "${self}/modules/components/shells");
|
imports = [ self.nixosModules.graphicsOptions ];
|
||||||
in {
|
|
||||||
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
|
|
||||||
options.components = {
|
|
||||||
displayManager = lib.mkOption {
|
|
||||||
# enum that dynamically populates itself with the contents of the display-managers directory
|
|
||||||
type = inputs.helpers.mkEnumFromDirContents "${self}/modules/components/display-managers";
|
|
||||||
default = "lightdm";
|
|
||||||
};
|
|
||||||
|
|
||||||
windowManagers = lib.mkOption {
|
environment.systemPackages = with pkgs; [
|
||||||
type = wm-option-type;
|
wayland-utils
|
||||||
default = [];
|
mesa-demos
|
||||||
};
|
vulkan-tools
|
||||||
|
];
|
||||||
|
|
||||||
shells = lib.mkOption {
|
fonts.packages = with pkgs; [
|
||||||
type = shell-option-type;
|
iosevka-comfy.comfy
|
||||||
default = [];
|
nerd-fonts.jetbrains-mono
|
||||||
};
|
];
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
wayland-utils
|
|
||||||
mesa-demos
|
|
||||||
vulkan-tools
|
|
||||||
];
|
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
iosevka-comfy.comfy
|
|
||||||
nerd-fonts.jetbrains-mono
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { config, pkgs, lib, ... }: {
|
flake.homeModules.graphics = { config, pkgs, ... }: {
|
||||||
options.components = {
|
imports = [ self.homeModules.graphicsOptions ];
|
||||||
windowManagers = lib.mkOption {
|
|
||||||
type = wm-option-type;
|
|
||||||
default = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
shells = lib.mkOption {
|
home.packages = with pkgs; [
|
||||||
type = shell-option-type;
|
bibata-cursors
|
||||||
default = [];
|
x264
|
||||||
|
gparted
|
||||||
|
vlc
|
||||||
|
iosevka-comfy.comfy
|
||||||
|
nerd-fonts.jetbrains-mono
|
||||||
|
];
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
color-scheme = "prefer-dark";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
home.pointerCursor = {
|
||||||
home.packages = with pkgs; [
|
enable = true;
|
||||||
bibata-cursors
|
package = pkgs.bibata-cursors;
|
||||||
x264
|
name = "Bibata-Modern-Ice";
|
||||||
gparted
|
size = 22;
|
||||||
vlc
|
gtk.enable = true;
|
||||||
iosevka-comfy.comfy
|
x11.enable = true;
|
||||||
nerd-fonts.jetbrains-mono
|
};
|
||||||
];
|
|
||||||
|
|
||||||
dconf.settings = {
|
gtk = {
|
||||||
"org/gnome/desktop/interface" = {
|
enable = true;
|
||||||
color-scheme = "prefer-dark";
|
colorScheme = "dark";
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home.pointerCursor = {
|
gtk2.configLocation = "${config.xdg.configHome}/.gtkrc-2.0"; # prevents file conflicts between this and other parts of the nix config
|
||||||
enable = true;
|
gtk2.force = true;
|
||||||
package = pkgs.bibata-cursors;
|
|
||||||
name = "Bibata-Modern-Ice";
|
|
||||||
size = 22;
|
|
||||||
gtk.enable = true;
|
|
||||||
x11.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
gtk = {
|
|
||||||
enable = true;
|
|
||||||
colorScheme = "dark";
|
|
||||||
|
|
||||||
gtk2.configLocation = "${config.xdg.configHome}/.gtkrc-2.0"; # prevents file conflicts between this and other parts of the nix config
|
|
||||||
gtk2.force = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
{ inputs, self, ... }: let
|
||||||
|
mkDocsDerivation = { pkgs, doBuild ? true }: let
|
||||||
|
inherit (pkgs) lib stdenv mkdocs python314Packages;
|
||||||
|
|
||||||
|
mkOptionsDocFromModule = commandName: module: let
|
||||||
|
eval = lib.evalModules {
|
||||||
|
modules = [ module ];
|
||||||
|
args = { inherit pkgs; };
|
||||||
|
};
|
||||||
|
|
||||||
|
optionsDoc = pkgs.nixosOptionsDoc {
|
||||||
|
inherit (eval) options;
|
||||||
|
};
|
||||||
|
in pkgs.runCommand commandName {} ''
|
||||||
|
cat ${optionsDoc.optionsCommonMark} >> $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
indexMd = let
|
||||||
|
rawText = ''
|
||||||
|
## Hello world
|
||||||
|
Welcome to the site!
|
||||||
|
'';
|
||||||
|
in pkgs.runCommand "index.md" {} ''
|
||||||
|
echo "${rawText}" >> $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
nixosOptionsMd = mkOptionsDocFromModule "nixos-options.md" self.nixosModules.options;
|
||||||
|
homeOptionsMd = mkOptionsDocFromModule "home-options.md" self.homeModules.options;
|
||||||
|
|
||||||
|
mkDocsConfig = ''
|
||||||
|
site_name: greyweather's nix flake options
|
||||||
|
nav:
|
||||||
|
- Home: 'index.md'
|
||||||
|
- Options:
|
||||||
|
- NixOS: 'nixos-options.md'
|
||||||
|
- Home Manager: 'home-options.md'
|
||||||
|
theme: material
|
||||||
|
'';
|
||||||
|
|
||||||
|
mkDocsYml = pkgs.runCommand "mkdocs.yml" {} ''
|
||||||
|
echo "${mkDocsConfig}" >> $out
|
||||||
|
'';
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
src = self;
|
||||||
|
name = if doBuild then "docs" else "docs-md";
|
||||||
|
buildInput = [
|
||||||
|
mkDocsYml
|
||||||
|
indexMd
|
||||||
|
nixosOptionsMd
|
||||||
|
homeOptionsMd
|
||||||
|
];
|
||||||
|
nativeBuildInputs = [
|
||||||
|
mkdocs
|
||||||
|
python314Packages.mkdocs-material
|
||||||
|
python314Packages.pygments
|
||||||
|
];
|
||||||
|
buildPhase = ''
|
||||||
|
mkdir docs-build
|
||||||
|
cd docs-build
|
||||||
|
ln -s ${mkDocsYml} "./mkdocs.yml"
|
||||||
|
mkdir docs
|
||||||
|
ln -s ${indexMd} "./docs/index.md"
|
||||||
|
ln -s ${nixosOptionsMd} "./docs/nixos-options.md"
|
||||||
|
ln -s ${homeOptionsMd} "./docs/home-options.md"
|
||||||
|
# generate the site
|
||||||
|
${if doBuild then "mkdocs build" else ""}
|
||||||
|
'';
|
||||||
|
installPhase = if doBuild then ''
|
||||||
|
mv site $out
|
||||||
|
'' else ''
|
||||||
|
cp -r . $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
perSystem = { pkgs, ... }: {
|
||||||
|
packages.docs = mkDocsDerivation { inherit pkgs; };
|
||||||
|
packages.docs-md = mkDocsDerivation { inherit pkgs; doBuild = false; };
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -30,8 +30,6 @@
|
|||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
flake.nixosModules.global = { pkgs, lib, config, ... }: {
|
flake.nixosModules.global = { pkgs, lib, config, ... }: {
|
||||||
options.features.applications.cli.color-converter.enable = lib.mkEnableOption "color-converter";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.cli.color-converter.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
config = lib.mkIf (config.features.applications.cli.color-converter.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
home-manager.users.grey.features.applications.cli.color-converter.enable = lib.mkDefault true;
|
home-manager.users.grey.features.applications.cli.color-converter.enable = lib.mkDefault true;
|
||||||
} {
|
} {
|
||||||
@@ -40,8 +38,6 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
||||||
options.features.applications.cli.color-converter.enable = lib.mkEnableOption "color-converter";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.cli.color-converter.enable) {
|
config = lib.mkIf (config.features.applications.cli.color-converter.enable) {
|
||||||
home.packages = [ (pkgs.callPackage color-converter-package {}) ];
|
home.packages = [ (pkgs.callPackage color-converter-package {}) ];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.global = { pkgs, lib, config, ... }: {
|
flake.nixosModules.global = { pkgs, lib, config, ... }: {
|
||||||
options.features.applications.cli.fastfetch.enable = lib.mkEnableOption "fastfetch";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.cli.fastfetch.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
config = lib.mkIf (config.features.applications.cli.fastfetch.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
home-manager.users.grey.features.applications.cli.fastfetch.enable = lib.mkDefault true;
|
home-manager.users.grey.features.applications.cli.fastfetch.enable = lib.mkDefault true;
|
||||||
} {
|
} {
|
||||||
@@ -10,8 +8,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.global = { pkgs, lib, config, ... }: {
|
flake.homeModules.global = { pkgs, lib, config, ... }: {
|
||||||
options.features.applications.cli.fastfetch.enable = lib.mkEnableOption "fastfetch";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.cli.fastfetch.enable) ({
|
config = lib.mkIf (config.features.applications.cli.fastfetch.enable) ({
|
||||||
programs.zsh.initContent = lib.mkOrder 1500 "fastfetch";
|
programs.zsh.initContent = lib.mkOrder 1500 "fastfetch";
|
||||||
programs.fastfetch.enable = true;
|
programs.fastfetch.enable = true;
|
||||||
|
|||||||
@@ -10,8 +10,6 @@
|
|||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
flake.nixosModules.global = { pkgs, config, lib, ... }: {
|
flake.nixosModules.global = { pkgs, config, lib, ... }: {
|
||||||
options.features.applications.cli.nh.enable = lib.mkEnableOption "nh";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.cli.nh.enable) {
|
config = lib.mkIf (config.features.applications.cli.nh.enable) {
|
||||||
programs.nh = mkNhAttrs config.info.rootPath;
|
programs.nh = mkNhAttrs config.info.rootPath;
|
||||||
|
|
||||||
@@ -22,8 +20,6 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
||||||
options.features.applications.cli.nh.enable = lib.mkEnableOption "nh";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.cli.nh.enable && config.info.isStandalone) {
|
config = lib.mkIf (config.features.applications.cli.nh.enable && config.info.isStandalone) {
|
||||||
programs.nh = mkNhAttrs config.info.rootPath;
|
programs.nh = mkNhAttrs config.info.rootPath;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.graphics = { pkgs, lib, config, ...}: {
|
flake.nixosModules.graphics = { pkgs, lib, config, ...}: {
|
||||||
options.features.applications.gui.equibop = {
|
|
||||||
enable = lib.mkEnableOption "equibop";
|
|
||||||
autostart = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
config = inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
home-manager.users.grey.features.applications.gui.equibop = lib.mkDefault config.features.applications.gui.equibop;
|
home-manager.users.grey.features.applications.gui.equibop = lib.mkDefault config.features.applications.gui.equibop;
|
||||||
} {
|
} {
|
||||||
@@ -16,14 +8,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
|
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
|
||||||
options.features.applications.gui.equibop = {
|
|
||||||
enable = lib.mkEnableOption "equibop";
|
|
||||||
autostart = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.gui.equibop.enable) {
|
config = lib.mkIf (config.features.applications.gui.equibop.enable) {
|
||||||
programs.equibop.enable = true;
|
programs.equibop.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.graphics = { pkgs, lib, config, ... }: {
|
flake.nixosModules.graphics = { pkgs, lib, config, ... }: {
|
||||||
options.features.applications.gui.floorp.enable = lib.mkEnableOption "floorp";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.gui.floorp.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
config = lib.mkIf (config.features.applications.gui.floorp.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
home-manager.users.grey.features.applications.gui.floorp.enable = lib.mkDefault true;
|
home-manager.users.grey.features.applications.gui.floorp.enable = lib.mkDefault true;
|
||||||
} {
|
} {
|
||||||
@@ -10,8 +8,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
|
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
|
||||||
options.features.applications.gui.floorp.enable = lib.mkEnableOption "floorp";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.gui.floorp.enable) (
|
config = lib.mkIf (config.features.applications.gui.floorp.enable) (
|
||||||
let
|
let
|
||||||
firefox-addons = with pkgs; inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system};
|
firefox-addons = with pkgs; inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
|
|||||||
@@ -65,11 +65,6 @@
|
|||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
options.features.applications.gui = {
|
|
||||||
fluxer.enable = lib.mkEnableOption "fluxer";
|
|
||||||
fluxer-canary.enable = lib.mkEnableOption "fluxer-canary";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.gui.fluxer.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
config = lib.mkIf (config.features.applications.gui.fluxer.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
home-manager.users.grey.features.applications.gui.fluxer.enable = lib.mkDefault true;
|
home-manager.users.grey.features.applications.gui.fluxer.enable = lib.mkDefault true;
|
||||||
} {
|
} {
|
||||||
@@ -86,11 +81,6 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
options.features.applications.gui = {
|
|
||||||
fluxer.enable = lib.mkEnableOption "fluxer";
|
|
||||||
fluxer-canary.enable = lib.mkEnableOption "fluxer-canary";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.gui.fluxer.enable) {
|
config = lib.mkIf (config.features.applications.gui.fluxer.enable) {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
(pkgs.callPackage (fluxer-package) {})
|
(pkgs.callPackage (fluxer-package) {})
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
options.features.applications.gui.kitty.enable = lib.mkEnableOption "kitty";
|
|
||||||
|
|
||||||
config = let
|
config = let
|
||||||
in lib.mkIf (config.features.applications.gui.kitty.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
in lib.mkIf (config.features.applications.gui.kitty.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
home-manager.users.grey.features.applications.gui.kitty.enable = lib.mkDefault true;
|
home-manager.users.grey.features.applications.gui.kitty.enable = lib.mkDefault true;
|
||||||
@@ -11,8 +9,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
options.features.applications.gui.kitty.enable = lib.mkEnableOption "kitty";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.gui.kitty.enable) {
|
config = lib.mkIf (config.features.applications.gui.kitty.enable) {
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
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) {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
nautilus
|
nautilus
|
||||||
@@ -24,8 +22,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
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 ];
|
home.packages = lib.mkIf (config.info.isStandalone) [ pkgs.nautilus ];
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
options.features.applications.gui.remmina.enable = lib.mkEnableOption "remmina";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.gui.remmina.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
config = lib.mkIf (config.features.applications.gui.remmina.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
home-manager.users.grey.features.applications.gui.remmina.enable = lib.mkDefault true;
|
home-manager.users.grey.features.applications.gui.remmina.enable = lib.mkDefault true;
|
||||||
} {
|
} {
|
||||||
@@ -13,8 +11,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
options.features.applications.gui.remmina.enable = lib.mkEnableOption "remmina";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.gui.remmina.enable) {
|
config = lib.mkIf (config.features.applications.gui.remmina.enable) {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
remmina
|
remmina
|
||||||
|
|||||||
@@ -1,19 +1,7 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: let
|
flake.nixosModules.graphics = { pkgs, config, lib, ... }: let
|
||||||
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||||
theme-option-type = with inputs.nixpkgs; lib.types.enum (builtins.attrNames spicePkgs.themes);
|
|
||||||
in {
|
in {
|
||||||
options.features.applications.gui.spotify = {
|
|
||||||
enable = lib.mkEnableOption "spotify";
|
|
||||||
spicetify = {
|
|
||||||
enable = lib.mkEnableOption "spicetify";
|
|
||||||
theme = lib.mkOption {
|
|
||||||
type = lib.types.nullOr (theme-option-type);
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.gui.spotify.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
config = lib.mkIf (config.features.applications.gui.spotify.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
home-manager.users.grey.features.applications.gui.spotify = {
|
home-manager.users.grey.features.applications.gui.spotify = {
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
@@ -26,19 +14,7 @@
|
|||||||
|
|
||||||
flake.homeModules.graphics = { pkgs, config, lib, ... }: let
|
flake.homeModules.graphics = { pkgs, config, lib, ... }: let
|
||||||
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||||
theme-option-type = with inputs.nixpkgs; lib.types.enum (builtins.attrNames spicePkgs.themes);
|
|
||||||
in {
|
in {
|
||||||
options.features.applications.gui.spotify = {
|
|
||||||
enable = lib.mkEnableOption "spotify";
|
|
||||||
spicetify = {
|
|
||||||
enable = lib.mkEnableOption "spicetify";
|
|
||||||
theme = lib.mkOption {
|
|
||||||
type = lib.types.nullOr (theme-option-type);
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.spicetify.homeManagerModules.default
|
inputs.spicetify.homeManagerModules.default
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
|
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
|
||||||
options.features.applications.gui.vscode.enable = lib.mkEnableOption "vscode";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.applications.gui.vscode.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
config = lib.mkIf (config.features.applications.gui.vscode.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
home-manager.users.grey.features.applications.gui.vscode.enable = lib.mkDefault true;
|
home-manager.users.grey.features.applications.gui.vscode.enable = lib.mkDefault true;
|
||||||
} {
|
} {
|
||||||
@@ -10,8 +8,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { config, pkgs, lib, ... }: {
|
flake.homeModules.graphics = { config, pkgs, lib, ... }: {
|
||||||
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 = [ pkgs.vscode ];
|
home.packages = [ pkgs.vscode ];
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.gaming = { pkgs, config, lib, ... }: {
|
flake.nixosModules.gaming = { pkgs, config, lib, ... }: {
|
||||||
options.features.hardware.steam-controller.enable = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enable tweaks and configurations that assist when using Valve's Steam Controller";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.hardware.steam-controller.enable) {
|
config = lib.mkIf (config.features.hardware.steam-controller.enable) {
|
||||||
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
||||||
features.hardware.steam-controller.enable = lib.mkDefault true;
|
features.hardware.steam-controller.enable = lib.mkDefault true;
|
||||||
@@ -14,12 +8,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.gaming = { pkgs, config, lib, inputs, ... }: {
|
flake.homeModules.gaming = { pkgs, config, lib, inputs, ... }: {
|
||||||
options.features.hardware.steam-controller.enable = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enable tweaks and configurations that assist when using Valve's Steam Controller";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = let
|
config = let
|
||||||
pkgsCross = import inputs.nixpkgs {
|
pkgsCross = import inputs.nixpkgs {
|
||||||
localSystem = "x86_64-linux";
|
localSystem = "x86_64-linux";
|
||||||
|
|||||||
@@ -8,8 +8,6 @@
|
|||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
options.features.nixos.home-manager.enable = lib.mkEnableOption "home-manager";
|
|
||||||
|
|
||||||
config.home-manager = lib.mkIf (config.features.nixos.home-manager.enable) {
|
config.home-manager = lib.mkIf (config.features.nixos.home-manager.enable) {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
];
|
];
|
||||||
|
|
||||||
options.features.nixos.stylix.enable = lib.mkEnableOption "stylix";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.nixos.stylix.enable) {
|
config = 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"; };
|
||||||
@@ -18,8 +16,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
|
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
|
||||||
options.features.nixos.stylix.enable = lib.mkEnableOption "stylix";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.nixos.stylix.enable) {
|
config = lib.mkIf (config.features.nixos.stylix.enable) {
|
||||||
stylix.targets = lib.mkIf (config.features.applications.gui.floorp.enable) {
|
stylix.targets = lib.mkIf (config.features.applications.gui.floorp.enable) {
|
||||||
floorp.profileNames = [ "default" ];
|
floorp.profileNames = [ "default" ];
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.homeModules.audio = { pkgs, config, lib, ...}: {
|
flake.homeModules.audio = { pkgs, config, lib, ...}: {
|
||||||
options.features.services.easyeffects.enable = lib.mkEnableOption "easyeffects";
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.services.easyeffects.enable) {
|
config = lib.mkIf (config.features.services.easyeffects.enable) {
|
||||||
services.easyeffects.enable = true;
|
services.easyeffects.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.global = { config, pkgs, lib, ... }: {
|
flake.nixosModules.global = { config, pkgs, lib, ... }: {
|
||||||
options.features.shells.defaultShell = lib.mkOption {
|
programs.${config.features.shells.defaultShell}.enable = true;
|
||||||
type = inputs.helpers.mkEnumFromDirContents "${self}/modules/features/shells";
|
|
||||||
default = "zsh";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
users.defaultUserShell = pkgs.${config.features.shells.defaultShell};
|
||||||
programs.${config.features.shells.defaultShell}.enable = true;
|
users.users."grey".shell = pkgs.${config.features.shells.defaultShell};
|
||||||
|
|
||||||
users.defaultUserShell = pkgs.${config.features.shells.defaultShell};
|
features.shells.${config.features.shells.defaultShell}.enable = true;
|
||||||
users.users."grey".shell = pkgs.${config.features.shells.defaultShell};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,5 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.global = { config, pkgs, lib, ... }: {
|
flake.nixosModules.global = { config, pkgs, lib, ... }: {
|
||||||
options.features.shells.zsh = {
|
|
||||||
enable = lib.mkEnableOption "zsh";
|
|
||||||
antidote.enable = lib.mkEnableOption "antidote";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.shells.zsh.enable) {
|
config = lib.mkIf (config.features.shells.zsh.enable) {
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
@@ -16,11 +11,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
||||||
options.features.shells.zsh = {
|
|
||||||
enable = lib.mkEnableOption "zsh";
|
|
||||||
antidote.enable = lib.mkEnableOption "antidote";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.features.shells.zsh.enable) {
|
config = lib.mkIf (config.features.shells.zsh.enable) {
|
||||||
home.shell.enableZshIntegration = true;
|
home.shell.enableZshIntegration = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
{ inputs, self, ...}: {
|
{ inputs, self, ... }: {
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
];
|
];
|
||||||
|
|
||||||
flake.flakeModules = {
|
|
||||||
docs-entry-point = inputs.import-tree "${self}/modules";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.homeModules.global = { lib, config, pkgs, ... }: {
|
flake.homeModules.global = { lib, config, pkgs, ... }: {
|
||||||
|
imports = [ self.homeModules.globalOptions ];
|
||||||
|
|
||||||
nix.gc = lib.mkIf (!config.features.applications.cli.nh.enable) {
|
nix.gc = lib.mkIf (!config.features.applications.cli.nh.enable) {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
persistent = true;
|
persistent = true;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.global = { pkgs, config, lib, ... }: {
|
flake.nixosModules.global = { pkgs, config, lib, ... }: {
|
||||||
|
imports = [ self.nixosModules.globalOptions ];
|
||||||
|
|
||||||
system.stateVersion = config.info.stateVersion;
|
system.stateVersion = config.info.stateVersion;
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
{ inputs, self, ... }: {
|
|
||||||
flake.nixosModules.global = { pkgs, config, lib, ... }: {
|
|
||||||
options = {
|
|
||||||
info = {
|
|
||||||
rootPath = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "/home/grey/nixos";
|
|
||||||
};
|
|
||||||
|
|
||||||
hostName = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
stateVersion = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
components.bootLoader = lib.mkOption {
|
|
||||||
type = inputs.helpers.mkEnumFromDirContents "${self}/modules/components/boot-loaders";
|
|
||||||
default = "grub";
|
|
||||||
};
|
|
||||||
|
|
||||||
features.applications.extraPackages = lib.mkOption {
|
|
||||||
type = lib.types.listOf (lib.types.package);
|
|
||||||
default = [];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
|
||||||
options = {
|
|
||||||
info = {
|
|
||||||
rootPath = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "/home/grey/nixos";
|
|
||||||
};
|
|
||||||
|
|
||||||
hostName = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
stateVersion = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
isStandalone = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
features.applications = {
|
|
||||||
shellScripts = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.str);
|
|
||||||
default = {};
|
|
||||||
};
|
|
||||||
|
|
||||||
extraPackages = lib.mkOption {
|
|
||||||
type = lib.types.listOf (lib.types.package);
|
|
||||||
default = [];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{ inputs, self, ... }: {
|
||||||
|
flake.homeModules.audioOptions = { lib, ...}: {
|
||||||
|
options.features.services.easyeffects.enable = lib.mkEnableOption "easyeffects";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{ inputs, self, ... }: {
|
||||||
|
flake.nixosModules.gamingOptions = { lib, ... }: {
|
||||||
|
options.features.hardware.steam-controller.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable tweaks and configurations that assist when using Valve's Steam Controller";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.homeModules.gamingOptions = { lib, ... }: {
|
||||||
|
options.features.hardware.steam-controller.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable tweaks and configurations that assist when using Valve's Steam Controller";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
{ inputs, self, ... }: let
|
||||||
|
mkSharedGlobalOptions = { lib }: {
|
||||||
|
info = {
|
||||||
|
rootPath = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "This option is used to tell the config the global path to the flake's root directory, in order to perform impure actions (in a Nix sense, not morally impure, I promise).";
|
||||||
|
default = "/home/grey/nixos";
|
||||||
|
};
|
||||||
|
|
||||||
|
hostName = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "This option is used to tell the config the hostname of the current machine, mostly for symlinking the right dotfiles.";
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
stateVersion = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "This option is used to set the stateVersion value.";
|
||||||
|
example = "26.11";
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
features = {
|
||||||
|
applications = {
|
||||||
|
cli = {
|
||||||
|
color-converter.enable = lib.mkEnableOption "color-converter";
|
||||||
|
fastfetch.enable = lib.mkEnableOption "fastfetch";
|
||||||
|
nh.enable = lib.mkEnableOption "nh";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraPackages = lib.mkOption {
|
||||||
|
type = lib.types.listOf (lib.types.package);
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
shells = {
|
||||||
|
zsh = {
|
||||||
|
enable = lib.mkEnableOption "zsh";
|
||||||
|
antidote.enable = lib.mkEnableOption "antidote";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mkExtraPackagesDescription = optionName: "This options is equivalent to `${optionName}`, and exists purely for convenience.";
|
||||||
|
in {
|
||||||
|
flake.nixosModules.globalOptions = { lib, ... }: {
|
||||||
|
options = (mkSharedGlobalOptions { inherit lib; }) // {
|
||||||
|
components = {
|
||||||
|
bootLoader = lib.mkOption {
|
||||||
|
type = inputs.helpers.mkEnumFromDirContents "${self}/modules/components/boot-loaders";
|
||||||
|
description = "This option defines the bootloader that should be used, enabling any config associated with it in the process.";
|
||||||
|
default = "grub";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
features = (mkSharedGlobalOptions { inherit lib; }).features // {
|
||||||
|
shells = {
|
||||||
|
defaultShell = lib.mkOption {
|
||||||
|
type = inputs.helpers.mkEnumFromDirContents "${self}/modules/features/shells";
|
||||||
|
description = "This option controls the shell that should be used as the default, enabling that shell in the process.";
|
||||||
|
default = "zsh";
|
||||||
|
};
|
||||||
|
} // (mkSharedGlobalOptions { inherit lib; }).features.shells;
|
||||||
|
|
||||||
|
nixos.home-manager.enable = lib.mkEnableOption "home-manager";
|
||||||
|
|
||||||
|
applications = (mkSharedGlobalOptions { inherit lib; }).features.applications // {
|
||||||
|
extraPackages = (mkSharedGlobalOptions { inherit lib; }).features.applications.extraPackages // { description = mkExtraPackagesDescription "environment.systemPackages"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.homeModules.globalOptions = { lib, ... }: {
|
||||||
|
options = (mkSharedGlobalOptions { inherit lib; }) // {
|
||||||
|
info = {
|
||||||
|
isStandalone = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "This option tells the config whether this home-manager config is part of a larger NixOS config or not, and is read-only.";
|
||||||
|
default = true;
|
||||||
|
readOnly = true;
|
||||||
|
};
|
||||||
|
} // (mkSharedGlobalOptions { inherit lib; }).info;
|
||||||
|
|
||||||
|
features = (mkSharedGlobalOptions { inherit lib; }).features // {
|
||||||
|
applications = (mkSharedGlobalOptions { inherit lib; }).features.applications // {
|
||||||
|
shellScripts = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.str);
|
||||||
|
description = "This option is a set of multiline strings, which are processed into executable bash scripts in `$XDG_BIN_HOME`. The shebang (`#!/bin/bash`) is added afterwards, and shouldn't be included in definitions.";
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
extraPackages = (mkSharedGlobalOptions { inherit lib; }).features.applications.extraPackages // { description = mkExtraPackagesDescription "home.packages"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
{ inputs, self, ... }: let
|
||||||
|
mkSharedGraphicsOptions = { pkgs, lib }: {
|
||||||
|
components = {
|
||||||
|
windowManagers = lib.mkOption {
|
||||||
|
type = inputs.helpers.mkOptionalListOfType (inputs.helpers.mkEnumFromDirContents "${self}/modules/components/window-managers");
|
||||||
|
description = "This option defines the window manager(s) that should be installed, enabling any config associated with it in the process. It can be either a list or just one value.";
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
shells = lib.mkOption {
|
||||||
|
type = inputs.helpers.mkOptionalListOfType (inputs.helpers.mkEnumFromDirContents "${self}/modules/components/shells");
|
||||||
|
description = "This option defines the graphical shell(s) that should be installed (e.g. Noctalia, DMS), enabling any config associated with it in the process. It can be either a list or just one value.";
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
features = {
|
||||||
|
applications.gui = {
|
||||||
|
equibop = {
|
||||||
|
enable = lib.mkEnableOption "equibop";
|
||||||
|
autostart = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "This option controls whether an `equibop.desktop` file is generated and placed into `$XDG_CONFIG_HOME/autostart`.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
floorp.enable = lib.mkEnableOption "floorp";
|
||||||
|
|
||||||
|
fluxer.enable = lib.mkEnableOption "fluxer";
|
||||||
|
fluxer-canary.enable = lib.mkEnableOption "fluxer-canary";
|
||||||
|
|
||||||
|
kitty.enable = lib.mkEnableOption "kitty";
|
||||||
|
|
||||||
|
nautilus.enable = lib.mkEnableOption "nautilus";
|
||||||
|
|
||||||
|
remmina.enable = lib.mkEnableOption "remmina";
|
||||||
|
|
||||||
|
spotify = {
|
||||||
|
enable = lib.mkEnableOption "spotify";
|
||||||
|
spicetify = {
|
||||||
|
enable = lib.mkEnableOption "spicetify";
|
||||||
|
theme = lib.mkOption {
|
||||||
|
type = lib.types.nullOr (lib.types.enum (builtins.attrNames inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system}.themes));
|
||||||
|
description = "This option is used to select a theme for Spicetify to use, from the list of available packages themes.";
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vscode.enable = lib.mkEnableOption "vscode";
|
||||||
|
};
|
||||||
|
|
||||||
|
nixos.stylix.enable = lib.mkEnableOption "stylix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
redundantOptionWarn = name: value: "The functionality of this option completely depends on `${name}` being `${value}`, and will not be evaluated otherwise.";
|
||||||
|
in {
|
||||||
|
flake.nixosModules.graphicsOptions = { pkgs, lib, ... }: {
|
||||||
|
options = (mkSharedGraphicsOptions { inherit pkgs; inherit lib; }) // {
|
||||||
|
components = (mkSharedGraphicsOptions { inherit pkgs; inherit lib; }).components // {
|
||||||
|
displayManager = lib.mkOption {
|
||||||
|
type = inputs.helpers.mkEnumFromDirContents "${self}/modules/components/display-managers";
|
||||||
|
description = "This option defines the bootloader that should be used, enabling any config associated with it in the process.";
|
||||||
|
default = "lightdm";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
features = (mkSharedGraphicsOptions { inherit pkgs; inherit lib; }).features // {
|
||||||
|
applications.gui = {
|
||||||
|
equibop.enable.description = (mkSharedGraphicsOptions { inherit pkgs; inherit lib; }).features.applications.gui.equibop.enable.description + "\n" + (redundantOptionWarn "features.nixos.home-manager.enable" "true");
|
||||||
|
spotify.spicetify.theme.description = (mkSharedGraphicsOptions { inherit pkgs; inherit lib; }).features.applications.gui.spotify.spicetify.theme.description + "\n" + (redundantOptionWarn "features.nixos.home-manager.enable" "true");
|
||||||
|
} // (mkSharedGraphicsOptions { inherit pkgs; inherit lib; }).features.applications.gui;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.homeModules.graphicsOptions = { pkgs, lib, ... }: {
|
||||||
|
options = mkSharedGraphicsOptions { inherit pkgs; inherit lib; };
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{ inputs, self, ... }: {
|
||||||
|
flake.nixosModules.options = { ... }: {
|
||||||
|
imports = with self.nixosModules; [
|
||||||
|
globalOptions
|
||||||
|
graphicsOptions
|
||||||
|
gamingOptions
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.homeModules.options = { ... }: {
|
||||||
|
imports = with self.homeModules; [
|
||||||
|
globalOptions
|
||||||
|
audioOptions
|
||||||
|
graphicsOptions
|
||||||
|
gamingOptions
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in new issue
Block a user