home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

commit 6d329df6218e1406b59922b33032be6ecc6a007c
parent 07800e44879bb418a2cc20a296c689e55bd4d3e6
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Mon, 29 Aug 2022 17:42:47 +0200

Remove unused files.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mci.nix | 1+
Dhosts.nix | 4----
Dsystems.nix | 54------------------------------------------------------
3 files changed, 1 insertion(+), 58 deletions(-)

diff --git a/ci.nix b/ci.nix @@ -1,3 +1,4 @@ +# FIXME: migrate this to flake somehow # This file provides all the buildable and cacheable packages and # package outputs in you package set. These are what gets built by CI, # so if you correctly mark packages as diff --git a/hosts.nix b/hosts.nix @@ -1,4 +0,0 @@ -{ - naruhodo = { arch = "x86_64-linux"; type = "unstable"; }; - aomi = { arch = "x86_64-linux"; type = "unstable"; }; -} diff --git a/systems.nix b/systems.nix @@ -1,54 +0,0 @@ -{ sources ? import ./nix -, lib ? sources.lib -, pkgs ? sources.pkgs { } -, pkgs-unstable ? sources.pkgs-unstable { } -, nixpkgs ? sources.nixpkgs { } -}: -with builtins; with lib; -let - /* - mkNixOS: make a nixos system build with the given name and cfg. - - cfg is an attributeSet: - - arch is architecture - - type is weither we want to use nixos (stable) or nixos-unstable - - Example: - hokkaido = { arch = "x86_64-linux"; }; - honshu = { arch = "x86_64-linux"; type = "unstable"; }; - */ - mkNixOS = name: cfg: - let - configuration = ./systems + "/hosts/${name}.nix"; - system = cfg.arch; - # If type == unstable, use nixos-unstable (pkgs-unstable) otherwise use nixos (pkgs) - p = - if cfg ? type && cfg.type == "unstable" - then pkgs-unstable - else pkgs; - # If vm == true, build a VM, otherwise build the system - nixos = import (p.path + "/nixos") { inherit configuration system; }; - main = - if cfg ? vm && cfg.vm - then nixos.vm - else nixos.config.system.build; - in - main; - mkSystem = name: cfg: - if cfg ? vm && cfg.vm - then (mkNixOS name cfg) - else (mkNixOS name cfg).toplevel; - # mkDigitalOceanImage = name: arch: (mkNixOS name arch).digitalocean - - systemAttrs = (mapAttrs mkSystem (import ./hosts.nix)); - - filterSystems = arch: attrValues (filterAttrs (_:v: v.system == arch) systemAttrs); - x86_64Systems = filterSystems "x86_64-linux"; - aarch64Systems = filterSystems "aarch64-linux"; - allSystems = attrValues systemAttrs; -in -{ - systems = nixpkgs.linkFarmFromDrvs "systems" allSystems; - aarch64 = nixpkgs.linkFarmFromDrvs "aarch64" aarch64Systems; - x86_64-linux = nixpkgs.linkFarmFromDrvs "x86_64-linux" x86_64Systems; -} // systemAttrs