# Universe - The big bang to my universe # # Copyright (c) 2023-2024 Sameer Rahmani # # 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 . { description = "lxsameer's universe"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; #442d407992384ed9c0e6d352de75b69079904e4e sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; nixos-hardware.url = "github:nixos/nixos-hardware"; nixos-generators = { url = "github:nix-community/nixos-generators"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager/517601b37c6d495274454f63c5a483c8e3ca6be1"; inputs.nixpkgs.follows = "nixpkgs"; }; # fg42 = { # type = "git"; # url = "git@git.devheroes.codes:FG42/FG42.git"; # ref = "v4"; # }; fg42.url = "/home/lxsameer/.fg42"; flake_utils.url = "github:numtide/flake-utils"; # 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"; }; outputs = { self, nixpkgs, ... } @ inputs: let # I just use linux and currently only x86_64 system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; utils = pkgs.callPackage ./utils {}; modules = pkgs.callPackage ./modules { inherit system pkgs; inherit (inputs) nixos-generators; }; nativeBuildInputs = with pkgs; [ qemu fish zstd utils.scripts sops ]; in rec{ inherit pkgs; packages.${system} = { majin = nixosConfigurations.majin.config.formats.iso; boot-majin = utils.bootImage packages.${system}.majin; inherit (utils) create-disk; }; nixosConfigurations = { majin = import ./worlds/majin.nix { inherit nixpkgs inputs system pkgs; mods = modules; }; }; devShells.${system}.default = pkgs.mkShell { inherit nativeBuildInputs; shellHook = '' fish && exit ''; }; }; }