.enable).
+ These options are not namespaced.
## TODO
@@ -39,7 +69,7 @@ for the host, if applicable.
- figure out nixpkgs.lib.options.mkOption and add a string option that picks a desktop to use.
- add Plasma, Hyprland, and maybe GNOME if I'm feeling silly (I'd probably never actually use it).
- make more things configurable as options once I figure out the above, it's probably cleaner than importing modules.
-- Rewrite README.
+- Reorganize README bullets into headings
- make system ephemeral/stateless
- The following command is able to successfully show any accumulated state on my system: sudo find / -xdev \( -path /home -o -path /nix -o -path /boot \) -prune -o \( -name flatpak -o -name boot.bak -o -path /var/log -o -name .cache \) \( -prune -print \) -o \( -type f \) -print
- everything on my system should be declared in this repository or explicitly excluded from the system state
diff --git a/home/README.md b/home/README.md
new file mode 100644
index 0000000..55f006c
--- /dev/null
+++ b/home/README.md
@@ -0,0 +1,4 @@
+# home
+This directory contains modules and configuration specific to my home-manager
+configuration. `default.nix` is the entrypoint to my module set; it can safely
+be loaded without making any configuration changes by default.
diff --git a/home/default.nix b/home/default.nix
new file mode 100644
index 0000000..3a51d80
--- /dev/null
+++ b/home/default.nix
@@ -0,0 +1,19 @@
+{ pkgs, config, lib, options, osConfig ? { }, ... }@args:
+let
+ isStandalone = with builtins; !( (typeOf osConfig == "set") && hasAttr "home-manager" osConfig );
+ cfg = config.nixfiles;
+in
+{
+ imports = [
+ ];
+ config = {};
+ options.nixfiles = {
+ standalone = lib.mkOption {
+ default = isStandalone;
+ description = "Whether or not the home-manager installation is standalone (standalone installations don't have access to osConfig).";
+ type = lib.types.bool;
+ readOnly = true;
+ internal = true;
+ };
+ };
+}
diff --git a/home/hyprland.nix b/home/hyprland.nix
index ae4f7ec..cf22947 100644
--- a/home/hyprland.nix
+++ b/home/hyprland.nix
@@ -11,7 +11,7 @@ let
# Hyprland workspace configuration
mainWorkspaces = builtins.genList (x: x+1) (9 ++ [0]);
workspaceName = key: let
- hasAttr = attr: lib.hasAttrByPath [ attr ];
+ inherit (builtins) hasAttr;
keyNames = {
"0" = "10";
};
diff --git a/modules/README.md b/modules/README.md
new file mode 100644
index 0000000..e0cf786
--- /dev/null
+++ b/modules/README.md
@@ -0,0 +1,5 @@
+# Modules
+This directory contains portable modules that can be used in other
+NixOS/home-manager configurations. Most modules use a wrapper function that
+passes flake inputs without having to rely on specialArgs, so that these
+modules can be used outside of my configuration.
diff --git a/system/README.md b/system/README.md
new file mode 100644
index 0000000..e91ba36
--- /dev/null
+++ b/system/README.md
@@ -0,0 +1,2 @@
+# system
+This directory contains modules and configuration specific to my NixOS configuration. `default.nix` is the entrypoint to my module set; it can safely be loaded without making any configuration changes by default.
diff --git a/system/default.nix b/system/default.nix
new file mode 100644
index 0000000..09dcd6a
--- /dev/null
+++ b/system/default.nix
@@ -0,0 +1,11 @@
+{ pkgs, config, lib, options, ... }@args:
+let
+ cfg = config.nixfiles;
+in
+{
+ imports = [
+ ];
+ config = {};
+ options.nixfiles = {
+ };
+}