From 9e7a775e2578e126dddb1c6f7514874265e3d08e Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 28 Apr 2024 21:30:47 +0200 Subject: yeet the nix flakes this is, in the widest possible sense, a revert of e88fed18f499a3e8ac98c772bbb62f00d1f8d1d7, which was now a little over two years ago. Of course, lots of things have changed since then: - this uses npins instead of niv, which is both simpler and still maintained - i haven't brought back the old deploy lib; I still use deploy-rs (with some modifications) to deploy things - if you actually use my stuff downstream, you can now use packages/ & tests/ & modules/ as entry points directly, while still having some control over inputs - (since i also don't believe any downstream users actually exist, i've not bothered to have a shim flake.nix so your stuff probably just broke. well, it was an experimental feature, anyways) - in general there's a lot more of the old-fashioned structure back again, with default.nix files in subdirectories that form a structure, not like how almost everything was just imported in the one big flake.nix file For people who are interested in also having a non-flake config similar to this one, it's probably best to take a look at inputs.nix (and also at npins, of course) --- flake.nix | 174 -------------------------------------------------------------- 1 file changed, 174 deletions(-) delete mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix deleted file mode 100644 index b83de7a..0000000 --- a/flake.nix +++ /dev/null @@ -1,174 +0,0 @@ -{ - description = '' - stuebinm's flake stuff. feel free to reuse parts you find useful, but - I suggest you don't depend on any of them actually working. - ''; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; - nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - - home-manager.url = "github:nix-community/home-manager/release-23.11"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - deploy-rs.url = "git+https://stuebinm.eu/git/forks/deploy-rs?ref=nom-flag"; - deploy-rs.inputs.nixpkgs.follows = "nixpkgs"; - simple-nixos-mailserver.url = - "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-23.11"; - simple-nixos-mailserver.inputs.nixpkgs.follows = "nixpkgs-unstable"; - simple-nixos-mailserver.inputs.nixpkgs-23_05.follows = "nixpkgs"; - simple-nixos-mailserver.inputs.nixpkgs-23_11.follows = "nixpkgs"; - rust-overlay.url = "github:oxalica/rust-overlay"; - rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; - sops-nix.url = "github:Mic92/sops-nix"; - sops-nix.inputs.nixpkgs.follows = "nixpkgs-unstable"; - sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs"; - - uplcg.url = "git+https://stuebinm.eu/git/forks/uplcg?ref=main"; - uplcg.flake = false; - tracktrain.url = "git+https://stuebinm.eu/git/tracktrain?ref=main"; - tracktrain.flake = false; - blog.url = "git+ssh://cgit/~/blog"; - blog.flake = false; - playground.url = "git+https://stuebinm.eu/git/playground"; - playground.flake = false; - traveltext.url = "git+https://stuebinm.eu/git/traveltext?ref=main"; - traveltext.flake = false; - showrt.url = "git+https://stuebinm.eu/git/showrt?ref=main"; - showrt.flake = false; - almanac.url = "git+https://stuebinm.eu/git/forks/almanac"; - almanac.flake = false; - feeds.url = "path:/home/stuebinm/org/nonpublic.nix"; - feeds.flake = false; - isabelle-utils.url = "git+https://stuebinm.eu/git/isabelle-utils"; - isabelle-utils.flake = false; - bahnhof-name.url = "git+https://stuebinm.eu/git/bahnhof.name"; - bahnhof-name.flake = false; - ntfy-matrix-bot.url = "git+https://stuebinm.eu/git/ntfy-matrix-bot"; - ntfy-matrix-bot.flake = false; - - gtfsBooks.url = "git+https://stuebinm.eu/git/forks/gtfs-books?ref=main"; - gtfsBooks.flake = false; - walint.url = "git+https://stuebinm.eu/git/walint?ref=playground"; - walint.flake = false; - }; - - outputs = { self, deploy-rs, sops-nix, ... }@inputs: - let - nixpkgs = import inputs.nixpkgs { - system = "x86_64-linux"; - overlays = [ - inputs.rust-overlay.overlays.default - self.overlays.default - ]; - config.permittedInsecurePackages = [ - "schildichat-web-1.11.30-sc.2" - ]; - }; - mkConfig = imports: config: - inputs.nixpkgs.lib.nixosSystem rec { - system = "x86_64-linux"; - modules = [ config ] ++ imports; - extraModules = - builtins.attrValues self.nixosModules - ++ [ sops-nix.nixosModules.sops ]; - pkgs = nixpkgs; - - specialArgs = { - inherit inputs system; - craneLib = inputs.crane.lib.${system}; - }; - }; - mkDesktop = mkConfig [ ./common/desktop.nix ]; - mkServer = mkConfig [ - ./common/headless.nix - ]; - deploy-vps = hostname: { - inherit hostname; - profiles.system = { - user = "root"; - sshUser = "root"; - path = deploy-rs.lib.x86_64-linux.activate.nixos - self.nixosConfigurations.${hostname}; - }; - }; - in { - - nixosConfigurations = { - chaski = mkServer ./chaski/configuration.nix; - flora = mkServer ./flora/configuration.nix; - abbenay = mkDesktop ./abbenay/configuration.nix; - cyberbox = mkDesktop ./cyberbox/configuration.nix; - ilex = mkDesktop ./ilex/configuration.nix; - }; - - deploy.nodes = { - chaski = deploy-vps "chaski"; - flora = deploy-vps "flora"; - parsons = { - hostname = "parsons"; - profiles.home = { - user = "stuebinm"; - sshUser = "stuebinm"; - path = deploy-rs.lib.x86_64-linux.activate.home-manager - self.homeConfigurations.stuebinm-minimal; - }; - }; - abbenay = { - hostname = "abbenay"; - profiles.system = { - user = "root"; - sshUser = "stuebinm"; - interactiveSudo = true; - path = deploy-rs.lib.x86_64-linux.activate.nixos - self.nixosConfigurations.abbenay; - }; - }; - }; - - checks = builtins.mapAttrs - (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; - - homeConfigurations = let - home = root: - inputs.home-manager.lib.homeManagerConfiguration rec { - pkgs = nixpkgs; - modules = [ root ]; - extraSpecialArgs = { - inherit inputs; - system = "x86_64-linux"; - }; - }; - in { - stuebinm = home ./home/home.nix; - stuebinm-minimal = home ./home/home-minimal.nix; - }; - - home = self.homeConfigurations.stuebinm.activationPackage; - home-minimal = self.homeConfigurations.stuebinm-minimal.activationPackage; - - overlays.default = final: prev: - import ./pkgs/overlay.nix { inherit inputs; } final prev; - packages.x86_64-linux = { - inherit (nixpkgs) - galmon-core galmon-full almanac rustex - kijetesantakaluotokieni showrt isabelle-utils isabat - travelynx crs-tracker crs-php bahnhof-name matrix-to - hikari_unstable heartwood radicle-interface radicle-tui - inweb nomsring bookwyrm mollysocket git-annex-remote-remarkable2 - ntfy-matrix-bot transport_validator; - - tests.bookwyrm = nixpkgs.nixosTest ./tests/bookwyrm.nix; - tests.travelynx = nixpkgs.nixosTest ./tests/travelynx.nix; - }; - - nixosModules = { - # glitchtip = import ./modules/glitchtip.nix; - bookwyrm = import ./modules/bookwyrm.nix; - mollysocket = import ./modules/mollysocket.nix; - }; - - hydraJobs = { - inherit (self) packages home; - }; - }; -} -- cgit v1.2.3