diff --git a/configurations/darwin/appreciate.nix b/configurations/darwin/appreciate.nix index cac8a689..533425f8 100644 --- a/configurations/darwin/appreciate.nix +++ b/configurations/darwin/appreciate.nix @@ -8,7 +8,7 @@ in { imports = [ self.darwinModules.default - "${self}/nixos/github-runner.nix" + "${self}/modules/nixos/shared/github-runner.nix" ]; nixpkgs.hostPlatform = "aarch64-darwin"; diff --git a/configurations/nixos/immediacy.nix b/configurations/nixos/immediacy.nix index ca33d151..8de3b9a8 100644 --- a/configurations/nixos/immediacy.nix +++ b/configurations/nixos/immediacy.nix @@ -9,13 +9,12 @@ in imports = [ inputs.disko.nixosModules.disko self.nixosModules.default - "${self}/nixos/disko/trivial.nix" - "${self}/nixos/common/primary-as-admin.nix" - "${self}/nixos/docker.nix" - "${self}/nixos/actualism-app.nix" - "${self}/nixos/hedgedoc.nix" - "${self}/nixos/github-runner.nix" - "${self}/nixos/server/harden/basics.nix" + "${self}/modules/nixos/linux/disko/trivial.nix" + "${self}/modules/nixos/linux/docker.nix" + "${self}/modules/nixos/linux/actualism-app.nix" + "${self}/modules/nixos/linux/hedgedoc.nix" + "${self}/modules/nixos/linux/server/harden/basics.nix" + "${self}/modules/nixos/shared/github-runner.nix" ]; nixos-flake.sshTarget = "srid@immediacy"; diff --git a/flake-module.nix b/flake-module.nix index 3c24bcb1..3e9fd62f 100644 --- a/flake-module.nix +++ b/flake-module.nix @@ -41,6 +41,16 @@ in ) (builtins.readDir "${self}/modules/darwin"); + nixosModules = inputs.nixpkgs.lib.mapAttrs' + (fn: _: + let + inherit (inputs.nixpkgs) lib; + name = lib.removeSuffix ".nix" fn; + in + lib.nameValuePair name "${self}/modules/nixos/${fn}" + ) + (builtins.readDir "${self}/modules/nixos"); + homeModules = inputs.nixpkgs.lib.mapAttrs' (fn: _: let diff --git a/flake.nix b/flake.nix index a9128e64..f413b77a 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,6 @@ [ ./flake-module.nix ./users - ./nixos ]; perSystem = { self', pkgs, lib, system, ... }: { diff --git a/modules/nixos/common.nix b/modules/nixos/common.nix new file mode 100644 index 00000000..32f88925 --- /dev/null +++ b/modules/nixos/common.nix @@ -0,0 +1,8 @@ +# Common to Linux & darwin +{ + imports = [ + ./shared/nix.nix + ./shared/primary-as-admin.nix + ./shared/caches.nix + ]; +} diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix new file mode 100644 index 00000000..0d5ecf8c --- /dev/null +++ b/modules/nixos/default.nix @@ -0,0 +1,23 @@ +# Configuration common to all Linux systems +{ flake, ... }: + +let + inherit (flake) config inputs; + inherit (inputs) self; +in +{ + imports = [ + { + users.users.${config.people.myself}.isNormalUser = true; + home-manager.users.${config.people.myself} = { }; + home-manager.sharedModules = [ + self.homeModules.default + self.homeModules.linux-only + ]; + } + self.nixosModules.common + inputs.ragenix.nixosModules.default # Used in github-runner.nix & hedgedoc.nix + ./all/self-ide.nix + ./all/current-location.nix + ]; +} diff --git a/nixos/actualism-app.nix b/modules/nixos/linux/actualism-app.nix similarity index 100% rename from nixos/actualism-app.nix rename to modules/nixos/linux/actualism-app.nix diff --git a/nixos/current-location.nix b/modules/nixos/linux/current-location.nix similarity index 100% rename from nixos/current-location.nix rename to modules/nixos/linux/current-location.nix diff --git a/nixos/disko/trivial.nix b/modules/nixos/linux/disko/trivial.nix similarity index 100% rename from nixos/disko/trivial.nix rename to modules/nixos/linux/disko/trivial.nix diff --git a/nixos/disko/two-raids-on-two-disks.nix b/modules/nixos/linux/disko/two-raids-on-two-disks.nix similarity index 100% rename from nixos/disko/two-raids-on-two-disks.nix rename to modules/nixos/linux/disko/two-raids-on-two-disks.nix diff --git a/nixos/distributed-build.nix b/modules/nixos/linux/distributed-build.nix similarity index 100% rename from nixos/distributed-build.nix rename to modules/nixos/linux/distributed-build.nix diff --git a/nixos/docker.nix b/modules/nixos/linux/docker.nix similarity index 100% rename from nixos/docker.nix rename to modules/nixos/linux/docker.nix diff --git a/nixos/email/default.nix b/modules/nixos/linux/email/default.nix similarity index 100% rename from nixos/email/default.nix rename to modules/nixos/linux/email/default.nix diff --git a/nixos/email/protonmail-bridge.nix b/modules/nixos/linux/email/protonmail-bridge.nix similarity index 100% rename from nixos/email/protonmail-bridge.nix rename to modules/nixos/linux/email/protonmail-bridge.nix diff --git a/nixos/gui/desktopish/README.md b/modules/nixos/linux/gui/desktopish/README.md similarity index 100% rename from nixos/gui/desktopish/README.md rename to modules/nixos/linux/gui/desktopish/README.md diff --git a/nixos/gui/desktopish/autolock.nix b/modules/nixos/linux/gui/desktopish/autolock.nix similarity index 100% rename from nixos/gui/desktopish/autolock.nix rename to modules/nixos/linux/gui/desktopish/autolock.nix diff --git a/nixos/gui/desktopish/default.nix b/modules/nixos/linux/gui/desktopish/default.nix similarity index 100% rename from nixos/gui/desktopish/default.nix rename to modules/nixos/linux/gui/desktopish/default.nix diff --git a/nixos/gui/desktopish/fonts.nix b/modules/nixos/linux/gui/desktopish/fonts.nix similarity index 100% rename from nixos/gui/desktopish/fonts.nix rename to modules/nixos/linux/gui/desktopish/fonts.nix diff --git a/nixos/gui/desktopish/gnome-keyring.nix b/modules/nixos/linux/gui/desktopish/gnome-keyring.nix similarity index 100% rename from nixos/gui/desktopish/gnome-keyring.nix rename to modules/nixos/linux/gui/desktopish/gnome-keyring.nix diff --git a/nixos/gui/desktopish/guiapps.nix b/modules/nixos/linux/gui/desktopish/guiapps.nix similarity index 100% rename from nixos/gui/desktopish/guiapps.nix rename to modules/nixos/linux/gui/desktopish/guiapps.nix diff --git a/nixos/gui/desktopish/hidpi.nix b/modules/nixos/linux/gui/desktopish/hidpi.nix similarity index 100% rename from nixos/gui/desktopish/hidpi.nix rename to modules/nixos/linux/gui/desktopish/hidpi.nix diff --git a/nixos/gui/desktopish/hotplug.nix b/modules/nixos/linux/gui/desktopish/hotplug.nix similarity index 100% rename from nixos/gui/desktopish/hotplug.nix rename to modules/nixos/linux/gui/desktopish/hotplug.nix diff --git a/nixos/gui/desktopish/light-terminal.nix b/modules/nixos/linux/gui/desktopish/light-terminal.nix similarity index 100% rename from nixos/gui/desktopish/light-terminal.nix rename to modules/nixos/linux/gui/desktopish/light-terminal.nix diff --git a/nixos/gui/desktopish/monitor-brightness.nix b/modules/nixos/linux/gui/desktopish/monitor-brightness.nix similarity index 100% rename from nixos/gui/desktopish/monitor-brightness.nix rename to modules/nixos/linux/gui/desktopish/monitor-brightness.nix diff --git a/nixos/gui/desktopish/polybar b/modules/nixos/linux/gui/desktopish/polybar similarity index 100% rename from nixos/gui/desktopish/polybar rename to modules/nixos/linux/gui/desktopish/polybar diff --git a/nixos/gui/desktopish/polybar.nix b/modules/nixos/linux/gui/desktopish/polybar.nix similarity index 100% rename from nixos/gui/desktopish/polybar.nix rename to modules/nixos/linux/gui/desktopish/polybar.nix diff --git a/nixos/gui/desktopish/redshift.nix b/modules/nixos/linux/gui/desktopish/redshift.nix similarity index 100% rename from nixos/gui/desktopish/redshift.nix rename to modules/nixos/linux/gui/desktopish/redshift.nix diff --git a/nixos/gui/desktopish/screencapture.nix b/modules/nixos/linux/gui/desktopish/screencapture.nix similarity index 100% rename from nixos/gui/desktopish/screencapture.nix rename to modules/nixos/linux/gui/desktopish/screencapture.nix diff --git a/nixos/gui/desktopish/steam.nix b/modules/nixos/linux/gui/desktopish/steam.nix similarity index 100% rename from nixos/gui/desktopish/steam.nix rename to modules/nixos/linux/gui/desktopish/steam.nix diff --git a/nixos/gui/desktopish/swap-caps-ctrl.nix b/modules/nixos/linux/gui/desktopish/swap-caps-ctrl.nix similarity index 100% rename from nixos/gui/desktopish/swap-caps-ctrl.nix rename to modules/nixos/linux/gui/desktopish/swap-caps-ctrl.nix diff --git a/nixos/gui/desktopish/taffybar/default.nix b/modules/nixos/linux/gui/desktopish/taffybar/default.nix similarity index 100% rename from nixos/gui/desktopish/taffybar/default.nix rename to modules/nixos/linux/gui/desktopish/taffybar/default.nix diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/.gitignore b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/.gitignore similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/.gitignore rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/.gitignore diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/.vscode/extensions.json b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/.vscode/extensions.json similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/.vscode/extensions.json rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/.vscode/extensions.json diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/.vscode/settings.json b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/.vscode/settings.json similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/.vscode/settings.json rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/.vscode/settings.json diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/CHANGELOG.md b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/CHANGELOG.md similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/CHANGELOG.md rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/CHANGELOG.md diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/Main.hs b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/Main.hs similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/Main.hs rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/Main.hs diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/README.md b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/README.md similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/README.md rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/README.md diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/Setup.hs b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/Setup.hs similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/Setup.hs rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/Setup.hs diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/bin/run b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/bin/run similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/bin/run rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/bin/run diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/default.nix b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/default.nix similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/default.nix rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/default.nix diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/dep/gitignoresrc/default.nix b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/dep/gitignoresrc/default.nix similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/dep/gitignoresrc/default.nix rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/dep/gitignoresrc/default.nix diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/dep/gitignoresrc/github.json b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/dep/gitignoresrc/github.json similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/dep/gitignoresrc/github.json rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/dep/gitignoresrc/github.json diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/dep/gitignoresrc/thunk.nix b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/dep/gitignoresrc/thunk.nix similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/dep/gitignoresrc/thunk.nix rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/dep/gitignoresrc/thunk.nix diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/hie.yaml b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/hie.yaml similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/hie.yaml rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/hie.yaml diff --git a/nixos/gui/desktopish/taffybar/taffybar-srid/taffybar-srid.cabal b/modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/taffybar-srid.cabal similarity index 100% rename from nixos/gui/desktopish/taffybar/taffybar-srid/taffybar-srid.cabal rename to modules/nixos/linux/gui/desktopish/taffybar/taffybar-srid/taffybar-srid.cabal diff --git a/nixos/gui/desktopish/touchpad-trackpoint.nix b/modules/nixos/linux/gui/desktopish/touchpad-trackpoint.nix similarity index 100% rename from nixos/gui/desktopish/touchpad-trackpoint.nix rename to modules/nixos/linux/gui/desktopish/touchpad-trackpoint.nix diff --git a/nixos/gui/desktopish/vscode.nix b/modules/nixos/linux/gui/desktopish/vscode.nix similarity index 100% rename from nixos/gui/desktopish/vscode.nix rename to modules/nixos/linux/gui/desktopish/vscode.nix diff --git a/nixos/gui/desktopish/xmobar/default.nix b/modules/nixos/linux/gui/desktopish/xmobar/default.nix similarity index 100% rename from nixos/gui/desktopish/xmobar/default.nix rename to modules/nixos/linux/gui/desktopish/xmobar/default.nix diff --git a/nixos/gui/desktopish/xmobar/xmobar-srid/.gitignore b/modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/.gitignore similarity index 100% rename from nixos/gui/desktopish/xmobar/xmobar-srid/.gitignore rename to modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/.gitignore diff --git a/nixos/gui/desktopish/xmobar/xmobar-srid/.vscode/extensions.json b/modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/.vscode/extensions.json similarity index 100% rename from nixos/gui/desktopish/xmobar/xmobar-srid/.vscode/extensions.json rename to modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/.vscode/extensions.json diff --git a/nixos/gui/desktopish/xmobar/xmobar-srid/.vscode/settings.json b/modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/.vscode/settings.json similarity index 100% rename from nixos/gui/desktopish/xmobar/xmobar-srid/.vscode/settings.json rename to modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/.vscode/settings.json diff --git a/nixos/gui/desktopish/xmobar/xmobar-srid/.vscode/tasks.json b/modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/.vscode/tasks.json similarity index 100% rename from nixos/gui/desktopish/xmobar/xmobar-srid/.vscode/tasks.json rename to modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/.vscode/tasks.json diff --git a/nixos/gui/desktopish/xmobar/xmobar-srid/CHANGELOG.md b/modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/CHANGELOG.md similarity index 100% rename from nixos/gui/desktopish/xmobar/xmobar-srid/CHANGELOG.md rename to modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/CHANGELOG.md diff --git a/nixos/gui/desktopish/xmobar/xmobar-srid/Main.hs b/modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/Main.hs similarity index 100% rename from nixos/gui/desktopish/xmobar/xmobar-srid/Main.hs rename to modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/Main.hs diff --git a/nixos/gui/desktopish/xmobar/xmobar-srid/Setup.hs b/modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/Setup.hs similarity index 100% rename from nixos/gui/desktopish/xmobar/xmobar-srid/Setup.hs rename to modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/Setup.hs diff --git a/nixos/gui/desktopish/xmobar/xmobar-srid/default.nix b/modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/default.nix similarity index 100% rename from nixos/gui/desktopish/xmobar/xmobar-srid/default.nix rename to modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/default.nix diff --git a/nixos/gui/desktopish/xmobar/xmobar-srid/hie.yaml b/modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/hie.yaml similarity index 100% rename from nixos/gui/desktopish/xmobar/xmobar-srid/hie.yaml rename to modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/hie.yaml diff --git a/nixos/gui/desktopish/xmobar/xmobar-srid/xmobar-srid.cabal b/modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/xmobar-srid.cabal similarity index 100% rename from nixos/gui/desktopish/xmobar/xmobar-srid/xmobar-srid.cabal rename to modules/nixos/linux/gui/desktopish/xmobar/xmobar-srid/xmobar-srid.cabal diff --git a/nixos/gui/desktopish/xmonad/default.nix b/modules/nixos/linux/gui/desktopish/xmonad/default.nix similarity index 100% rename from nixos/gui/desktopish/xmonad/default.nix rename to modules/nixos/linux/gui/desktopish/xmonad/default.nix diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/.gitignore b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/.gitignore similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/.gitignore rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/.gitignore diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/.vscode/extensions.json b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/.vscode/extensions.json similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/.vscode/extensions.json rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/.vscode/extensions.json diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/.vscode/settings.json b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/.vscode/settings.json similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/.vscode/settings.json rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/.vscode/settings.json diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/.vscode/tasks.json b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/.vscode/tasks.json similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/.vscode/tasks.json rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/.vscode/tasks.json diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/CHANGELOG.md b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/CHANGELOG.md similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/CHANGELOG.md rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/CHANGELOG.md diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/Main.hs b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/Main.hs similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/Main.hs rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/Main.hs diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/README.md b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/README.md similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/README.md rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/README.md diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/Setup.hs b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/Setup.hs similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/Setup.hs rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/Setup.hs diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/default.nix b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/default.nix similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/default.nix rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/default.nix diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/dep/gitignoresrc/default.nix b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/dep/gitignoresrc/default.nix similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/dep/gitignoresrc/default.nix rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/dep/gitignoresrc/default.nix diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/dep/gitignoresrc/github.json b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/dep/gitignoresrc/github.json similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/dep/gitignoresrc/github.json rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/dep/gitignoresrc/github.json diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/dep/gitignoresrc/thunk.nix b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/dep/gitignoresrc/thunk.nix similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/dep/gitignoresrc/thunk.nix rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/dep/gitignoresrc/thunk.nix diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/hie.yaml b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/hie.yaml similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/hie.yaml rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/hie.yaml diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/overlay.nix b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/overlay.nix similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/overlay.nix rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/overlay.nix diff --git a/nixos/gui/desktopish/xmonad/xmonad-srid/xmonad-srid.cabal b/modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/xmonad-srid.cabal similarity index 100% rename from nixos/gui/desktopish/xmonad/xmonad-srid/xmonad-srid.cabal rename to modules/nixos/linux/gui/desktopish/xmonad/xmonad-srid/xmonad-srid.cabal diff --git a/nixos/gui/gnome.nix b/modules/nixos/linux/gui/gnome.nix similarity index 100% rename from nixos/gui/gnome.nix rename to modules/nixos/linux/gui/gnome.nix diff --git a/nixos/gui/kde.nix b/modules/nixos/linux/gui/kde.nix similarity index 100% rename from nixos/gui/kde.nix rename to modules/nixos/linux/gui/kde.nix diff --git a/nixos/gui/virtualbox.nix b/modules/nixos/linux/gui/virtualbox.nix similarity index 100% rename from nixos/gui/virtualbox.nix rename to modules/nixos/linux/gui/virtualbox.nix diff --git a/nixos/hedgedoc.nix b/modules/nixos/linux/hedgedoc.nix similarity index 89% rename from nixos/hedgedoc.nix rename to modules/nixos/linux/hedgedoc.nix index 91a1a1dc..abe6fbcb 100644 --- a/nixos/hedgedoc.nix +++ b/modules/nixos/linux/hedgedoc.nix @@ -1,12 +1,13 @@ -{ config, ... }: +{ flake, config, ... }: let + inherit (flake.inputs) self; domain = "pad.srid.ca"; port = 9112; in { age.secrets."hedgedoc.env" = { - file = ../secrets/hedgedoc.env.age; + file = self + /secrets/hedgedoc.env.age; owner = "hedgedoc"; }; services.hedgedoc = { diff --git a/nixos/lxd.nix b/modules/nixos/linux/lxd.nix similarity index 100% rename from nixos/lxd.nix rename to modules/nixos/linux/lxd.nix diff --git a/nixos/nixos-container.nix b/modules/nixos/linux/nixos-container.nix similarity index 100% rename from nixos/nixos-container.nix rename to modules/nixos/linux/nixos-container.nix diff --git a/nixos/parallels-vm.nix b/modules/nixos/linux/parallels-vm.nix similarity index 100% rename from nixos/parallels-vm.nix rename to modules/nixos/linux/parallels-vm.nix diff --git a/nixos/passwordstore.nix b/modules/nixos/linux/passwordstore.nix similarity index 100% rename from nixos/passwordstore.nix rename to modules/nixos/linux/passwordstore.nix diff --git a/nixos/postgres.nix b/modules/nixos/linux/postgres.nix similarity index 100% rename from nixos/postgres.nix rename to modules/nixos/linux/postgres.nix diff --git a/nixos/postgrest.nix b/modules/nixos/linux/postgrest.nix similarity index 100% rename from nixos/postgrest.nix rename to modules/nixos/linux/postgrest.nix diff --git a/nixos/protonvpn.nix b/modules/nixos/linux/protonvpn.nix similarity index 100% rename from nixos/protonvpn.nix rename to modules/nixos/linux/protonvpn.nix diff --git a/nixos/self-ide.nix b/modules/nixos/linux/self-ide.nix similarity index 100% rename from nixos/self-ide.nix rename to modules/nixos/linux/self-ide.nix diff --git a/nixos/server/harden/basics.nix b/modules/nixos/linux/server/harden/basics.nix similarity index 100% rename from nixos/server/harden/basics.nix rename to modules/nixos/linux/server/harden/basics.nix diff --git a/nixos/server/harden/default.nix b/modules/nixos/linux/server/harden/default.nix similarity index 100% rename from nixos/server/harden/default.nix rename to modules/nixos/linux/server/harden/default.nix diff --git a/nixos/server/unlaptop.nix b/modules/nixos/linux/server/unlaptop.nix similarity index 100% rename from nixos/server/unlaptop.nix rename to modules/nixos/linux/server/unlaptop.nix diff --git a/nixos/server/wakeonlan.nix b/modules/nixos/linux/server/wakeonlan.nix similarity index 100% rename from nixos/server/wakeonlan.nix rename to modules/nixos/linux/server/wakeonlan.nix diff --git a/nixos/common/caches/oss.nix b/modules/nixos/shared/caches.nix similarity index 100% rename from nixos/common/caches/oss.nix rename to modules/nixos/shared/caches.nix diff --git a/nixos/github-runner.nix b/modules/nixos/shared/github-runner.nix similarity index 77% rename from nixos/github-runner.nix rename to modules/nixos/shared/github-runner.nix index f586f3d8..961c22ff 100644 --- a/nixos/github-runner.nix +++ b/modules/nixos/shared/github-runner.nix @@ -1,6 +1,7 @@ { flake, ... }: let inherit (flake) inputs; + inherit (inputs) self; in { imports = [ @@ -8,7 +9,7 @@ in ]; services.github-nix-ci = { - age.secretsDir = ../secrets; + age.secretsDir = self + /secrets; personalRunners = { "srid/srid".num = 1; }; diff --git a/nixos/common/nix.nix b/modules/nixos/shared/nix.nix similarity index 100% rename from nixos/common/nix.nix rename to modules/nixos/shared/nix.nix diff --git a/nixos/common/primary-as-admin.nix b/modules/nixos/shared/primary-as-admin.nix similarity index 100% rename from nixos/common/primary-as-admin.nix rename to modules/nixos/shared/primary-as-admin.nix diff --git a/nixos/common/caches/default.nix b/nixos/common/caches/default.nix deleted file mode 100644 index 035f53e9..00000000 --- a/nixos/common/caches/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - # Disable all these caches, because nix is often stuck querying cachix. - ./oss.nix - ]; -} diff --git a/nixos/common/default.nix b/nixos/common/default.nix deleted file mode 100644 index 577a629f..00000000 --- a/nixos/common/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./nix.nix - ./primary-as-admin.nix - ./caches - ]; -} diff --git a/nixos/default.nix b/nixos/default.nix deleted file mode 100644 index 1353acfa..00000000 --- a/nixos/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ self, inputs, config, ... }: - -{ - # Configuration common to all Linux systems - flake = { - nixosModules = { - # NixOS modules that are known to work on nix-darwin. - # Thsi is shared with nix-darwin/default.nix - common = ./common; - - default.imports = [ - { - users.users.${config.people.myself}.isNormalUser = true; - home-manager.users.${config.people.myself} = { }; - home-manager.sharedModules = [ - self.homeModules.default - self.homeModules.linux-only - ]; - } - self.nixosModules.common - inputs.ragenix.nixosModules.default # Used in github-runner.nix & hedgedoc.nix - ./self-ide.nix - ./current-location.nix - ]; - }; - }; -}