From e6f79b30e620cf7bd5b06e2579e979ff090e925a Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 18 Oct 2024 03:10:35 -0400 Subject: more refactors & outsource some things (#477) * tree-wide: drop flake-parts * drop nixinate * justfile: cleanup * drop treefmt-nix * doc: update READMEs * flake: cleanup * seth: don't use `./.` * modules/nixos,darwin: bundle all modules They all depend on each other anyways so * systems: manually import internal modules * seth: use riff module from nix-exprs * flake: back to flake-parts * Revert "flake: back to flake-parts" This reverts commit 35334882f7c0c23991a4efd65ea08b216006b2b0. Saving the last commit so I can go back if I want * flake: use lib.const this looks better...right? * flake: declare systems like a normal person --- systems/README.md | 12 ------------ systems/atlas/default.nix | 12 +++--------- systems/caroline/default.nix | 6 +++++- systems/darwin.nix | 7 ------- systems/default.nix | 7 ------- systems/glados-wsl/default.nix | 5 ++++- systems/glados/default.nix | 4 +++- systems/nixinate.nix | 12 ------------ systems/nixos.nix | 17 ----------------- 9 files changed, 15 insertions(+), 67 deletions(-) delete mode 100644 systems/darwin.nix delete mode 100644 systems/default.nix delete mode 100644 systems/nixinate.nix delete mode 100644 systems/nixos.nix (limited to 'systems') diff --git a/systems/README.md b/systems/README.md index 8a399f8..8a3720d 100644 --- a/systems/README.md +++ b/systems/README.md @@ -19,15 +19,3 @@ Main desktop, but the windows install :p Ampere ARM server from Oracle, services my [Miniflux](https://miniflux.app/) instance and some other things. - -## darwin.nix - -Declarations of nix-darwin systems - -## nixos.nix - -Declarations of NixOS systems - -## nixinate.nix - -Apps to deploy the above systems through [nixinate](https://github.com/MatthewCroughan/nixinate) diff --git a/systems/atlas/default.nix b/systems/atlas/default.nix index c48eca0..70f7c86 100644 --- a/systems/atlas/default.nix +++ b/systems/atlas/default.nix @@ -1,4 +1,4 @@ -{ config, modulesPath, ... }: +{ modulesPath, inputs, ... }: { imports = [ (modulesPath + "/profiles/minimal.nix") @@ -7,15 +7,9 @@ ./nginx.nix ./nixpkgs-tracker-bot.nix ./teawiebot.nix - ]; - _module.args.nixinate = { - host = config.networking.hostName; - sshUser = "root"; - buildOn = "remote"; - substituteOnTarget = true; - hermetic = false; - }; + inputs.self.nixosModules.default + ]; archetypes.server.enable = true; base.networking.enable = false; diff --git a/systems/caroline/default.nix b/systems/caroline/default.nix index 0788cc7..263d3dd 100644 --- a/systems/caroline/default.nix +++ b/systems/caroline/default.nix @@ -1,5 +1,9 @@ -{ config, ... }: +{ config, inputs, ... }: { + imports = [ + inputs.self.darwinModules.default + ]; + archetypes.personal.enable = true; homebrew.casks = [ diff --git a/systems/darwin.nix b/systems/darwin.nix deleted file mode 100644 index 120e088..0000000 --- a/systems/darwin.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - darwinConfigurations = { - caroline = { - modules = [ ./caroline ]; - }; - }; -} diff --git a/systems/default.nix b/systems/default.nix deleted file mode 100644 index 7bf8c5e..0000000 --- a/systems/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./darwin.nix - ./nixos.nix - ./nixinate.nix - ]; -} diff --git a/systems/glados-wsl/default.nix b/systems/glados-wsl/default.nix index efc53ef..5c93ccb 100644 --- a/systems/glados-wsl/default.nix +++ b/systems/glados-wsl/default.nix @@ -1,6 +1,9 @@ { pkgs, inputs, ... }: { - imports = [ inputs.nixos-wsl.nixosModules.wsl ]; + imports = [ + inputs.nixos-wsl.nixosModules.wsl + inputs.self.nixosModules.default + ]; archetypes.personal.enable = true; diff --git a/systems/glados/default.nix b/systems/glados/default.nix index 35f926f..b28c8dc 100644 --- a/systems/glados/default.nix +++ b/systems/glados/default.nix @@ -1,8 +1,10 @@ -{ pkgs, ... }: +{ pkgs, inputs, ... }: { imports = [ ./boot.nix ./hardware-configuration.nix + + inputs.self.nixosModules.default ]; archetypes.personal.enable = true; diff --git a/systems/nixinate.nix b/systems/nixinate.nix deleted file mode 100644 index b67cea3..0000000 --- a/systems/nixinate.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ inputs, self, ... }: -{ - perSystem = - { system, ... }: - { - # as opposed to having system specific outputs like `apps.nixinate.mySystem` - # we can instantiate this for each system and grab it's final attribute, `nixinate` - # - # this lets deployments be as easy as `nix run .#mySystem` - apps = (inputs.nixinate.nixinate.${system} self).nixinate; - }; -} diff --git a/systems/nixos.nix b/systems/nixos.nix deleted file mode 100644 index f610ea4..0000000 --- a/systems/nixos.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ inputs, ... }: -{ - nixosConfigurations = { - glados = { - modules = [ ./glados ]; - }; - - glados-wsl = { - modules = [ ./glados-wsl ]; - }; - - atlas = { - nixpkgs = inputs.nixpkgs-stable; - modules = [ ./atlas ]; - }; - }; -} -- cgit v1.2.3