2024-02-07 16:17:46 +00:00
|
|
|
# Universe - The big bang to my universe
|
|
|
|
#
|
|
|
|
# Copyright (c) 2023-2024 Sameer Rahmani <lxsameer@gnu.org>
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, version 2.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2024-02-02 22:57:50 +00:00
|
|
|
{
|
|
|
|
description = "lxsameer's universe";
|
|
|
|
|
|
|
|
inputs = {
|
2024-02-25 15:16:55 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/442d407992384ed9c0e6d352de75b69079904e4e";
|
2024-02-07 16:17:46 +00:00
|
|
|
|
2024-02-02 22:57:50 +00:00
|
|
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
2024-02-07 16:17:46 +00:00
|
|
|
nixos-generators = {
|
|
|
|
url = "github:nix-community/nixos-generators";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-02-20 20:18:59 +00:00
|
|
|
|
2024-02-02 22:57:50 +00:00
|
|
|
home-manager = {
|
2024-02-22 14:19:34 +00:00
|
|
|
url = "github:nix-community/home-manager/517601b37c6d495274454f63c5a483c8e3ca6be1";
|
2024-02-02 22:57:50 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2024-03-27 17:25:29 +00:00
|
|
|
fg42.url = "git+https://devheroes.codes/FG42/FG42?ref=v4";
|
|
|
|
#g42.url = "/home/lxsameer/src/fg42";
|
2024-02-20 20:18:59 +00:00
|
|
|
|
2024-02-08 21:02:10 +00:00
|
|
|
flake_utils.url = "github:numtide/flake-utils";
|
2024-02-02 22:57:50 +00:00
|
|
|
|
2024-03-09 21:59:25 +00:00
|
|
|
agenix.url = "github:ryantm/agenix";
|
|
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
2024-03-03 15:34:46 +00:00
|
|
|
stylix.url = "github:danth/stylix/fcff15ac5ffbe81f1c66e352f3167c270d79cdab";
|
2024-02-02 22:57:50 +00:00
|
|
|
# TODO: Checkout hercules
|
|
|
|
# hercules-ci-agent.url = "github:hercules-ci/hercules-ci-agent";
|
|
|
|
# To build and android image
|
|
|
|
# robotnix.url = "github:danielfullmer/robotnix";
|
|
|
|
# impermanence.url = "github:nix-community/impermanence";
|
2024-02-26 16:29:30 +00:00
|
|
|
disko.url = "github:nix-community/disko";
|
2024-02-02 22:57:50 +00:00
|
|
|
};
|
|
|
|
|
2024-02-08 21:02:10 +00:00
|
|
|
outputs = { self, nixpkgs, ... } @ inputs:
|
2024-02-02 22:57:50 +00:00
|
|
|
let
|
|
|
|
# I just use linux and currently only x86_64
|
|
|
|
system = "x86_64-linux";
|
2024-03-09 21:59:25 +00:00
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [
|
|
|
|
(final: prev: {
|
|
|
|
universe_version = "23.11.0.0";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
2024-02-02 22:57:50 +00:00
|
|
|
|
2024-02-08 21:02:10 +00:00
|
|
|
utils = pkgs.callPackage ./utils {};
|
2024-02-22 14:19:34 +00:00
|
|
|
modules = pkgs.callPackage ./modules {
|
|
|
|
inherit system pkgs;
|
|
|
|
inherit (inputs) nixos-generators;
|
|
|
|
};
|
2024-02-02 22:57:50 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [
|
2024-02-25 15:16:55 +00:00
|
|
|
libslirp
|
2024-02-02 22:57:50 +00:00
|
|
|
qemu
|
|
|
|
fish
|
|
|
|
zstd
|
2024-02-08 21:02:10 +00:00
|
|
|
utils.scripts
|
2024-03-09 21:59:25 +00:00
|
|
|
rage
|
|
|
|
inputs.agenix.packages.${system}.agenix
|
2024-02-02 22:57:50 +00:00
|
|
|
];
|
|
|
|
|
2024-02-25 15:16:55 +00:00
|
|
|
defaultParams = {
|
|
|
|
inherit nixpkgs inputs system pkgs modules utils;
|
|
|
|
inherit (inputs) sops;
|
|
|
|
hostBuilderConfig = {
|
|
|
|
inVM = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-02-02 22:57:50 +00:00
|
|
|
in rec{
|
2024-02-07 16:17:46 +00:00
|
|
|
inherit pkgs;
|
|
|
|
|
|
|
|
packages.${system} = {
|
2024-02-25 15:16:55 +00:00
|
|
|
majin = nixosConfigurations.majin;
|
|
|
|
majinVM = nixosConfigurations.majinVM;
|
|
|
|
majinInstaller = nixosConfigurations.majinInstaller.config.formats.iso;
|
|
|
|
majinInstallerVM = nixosConfigurations.majinInstallerVM.config.formats.iso;
|
2024-03-09 21:59:25 +00:00
|
|
|
|
2024-02-25 15:16:55 +00:00
|
|
|
boot-majin = utils.bootImage packages.${system}.majinVM;
|
|
|
|
boot-majin-installer = utils.bootImage packages.${system}.majinInstallerVM;
|
2024-03-09 21:59:25 +00:00
|
|
|
|
|
|
|
maryland = nixosConfigurations.maryland;
|
|
|
|
marylandVM = nixosConfigurations.marylandVM;
|
|
|
|
marylandInstaller = nixosConfigurations.marylandInstaller.config.formats.iso;
|
|
|
|
marylandInstallerVM = nixosConfigurations.marylandInstallerVM.config.formats.iso;
|
|
|
|
|
|
|
|
boot-maryland = utils.bootImage packages.${system}.marylandVM;
|
|
|
|
boot-maryland-installer = utils.bootImage packages.${system}.marylandInstallerVM;
|
|
|
|
|
2024-02-08 21:02:10 +00:00
|
|
|
inherit (utils) create-disk;
|
2024-02-07 16:17:46 +00:00
|
|
|
};
|
2024-02-02 22:57:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
nixosConfigurations = {
|
2024-02-25 15:16:55 +00:00
|
|
|
majin = (import ./worlds/majin.nix defaultParams).majin;
|
|
|
|
majinInstaller = (import ./worlds/majin.nix defaultParams).installer;
|
|
|
|
|
|
|
|
majinVM = (import ./worlds/majin.nix (defaultParams // {
|
|
|
|
hostBuilderConfig.inVM = true;
|
|
|
|
})).majin;
|
|
|
|
|
|
|
|
majinInstallerVM = (import ./worlds/majin.nix (defaultParams // {
|
|
|
|
hostBuilderConfig.inVM = true;
|
|
|
|
})).installer;
|
|
|
|
|
2024-03-09 21:59:25 +00:00
|
|
|
maryland = (import ./worlds/maryland.nix defaultParams).maryland;
|
|
|
|
marylandInstaller = (import ./worlds/maryland.nix defaultParams).installer;
|
|
|
|
|
|
|
|
marylandVM = (import ./worlds/maryland.nix (defaultParams // {
|
|
|
|
hostBuilderConfig.inVM = true;
|
|
|
|
})).maryland;
|
|
|
|
|
|
|
|
marylandInstallerVM = (import ./worlds/maryland.nix (defaultParams // {
|
|
|
|
hostBuilderConfig.inVM = true;
|
|
|
|
})).installer;
|
|
|
|
|
2024-02-02 22:57:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
|
|
inherit nativeBuildInputs;
|
|
|
|
shellHook = ''
|
|
|
|
fish && exit
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|