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 = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2024-02-07 16:17:46 +00:00
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
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-02 22:57:50 +00:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2024-02-08 21:02:10 +00:00
|
|
|
flake_utils.url = "github:numtide/flake-utils";
|
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-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";
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
|
2024-02-08 21:02:10 +00:00
|
|
|
utils = pkgs.callPackage ./utils {};
|
|
|
|
modules = pkgs.callPackage ./modules { inherit (inputs) nixos-generators; };
|
2024-02-02 22:57:50 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
qemu
|
|
|
|
fish
|
|
|
|
zstd
|
2024-02-08 21:02:10 +00:00
|
|
|
utils.scripts
|
2024-02-07 16:17:46 +00:00
|
|
|
sops
|
2024-02-02 22:57:50 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
in rec{
|
2024-02-07 16:17:46 +00:00
|
|
|
inherit pkgs;
|
|
|
|
|
|
|
|
packages.${system} = {
|
|
|
|
majin = nixosConfigurations.majin.config.formats.iso;
|
2024-02-08 21:02:10 +00:00
|
|
|
boot-majin = utils.bootImage packages.${system}.majin;
|
|
|
|
inherit (utils) create-disk;
|
2024-02-07 16:17:46 +00:00
|
|
|
};
|
2024-02-02 22:57:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
nixosConfigurations = {
|
2024-02-08 21:02:10 +00:00
|
|
|
majin = import ./worlds/majin.nix {
|
|
|
|
inherit nixpkgs inputs system;
|
|
|
|
mods = modules;
|
2024-02-02 22:57:50 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
|
|
inherit nativeBuildInputs;
|
|
|
|
shellHook = ''
|
|
|
|
fish && exit
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|