nix: yeet skrott, massive module modifications tm, wrap package and more
Sorry for the kinda big commit that does everything at once This change does the following: - yeets skrott and skrot-specific settings from the NixOS module, - adds a bunch more settings and generalizations to the NixOS module, - adds two VM NixOS configurations for interactive testing - wraps the nix package so that `less` is always present in `$PATH` - yeah, that's about it kthxbye
This commit is contained in:
43
flake.nix
43
flake.nix
@@ -17,21 +17,31 @@
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in f system pkgs);
|
||||
in {
|
||||
packages = forAllSystems (system: pkgs: {
|
||||
default = self.packages.${system}.dibbler;
|
||||
dibbler = pkgs.callPackage ./nix/dibbler.nix {
|
||||
python3Packages = pkgs.python312Packages;
|
||||
apps = let
|
||||
mkApp = program: description: {
|
||||
type = "app";
|
||||
program = toString program;
|
||||
meta = {
|
||||
inherit description;
|
||||
};
|
||||
};
|
||||
skrot = self.nixosConfigurations.skrot.config.system.build.sdImage;
|
||||
});
|
||||
|
||||
apps = forAllSystems (system: pkgs: {
|
||||
mkVm = name: mkApp "${self.nixosConfigurations.${name}.config.system.build.vm}/bin/run-nixos-vm";
|
||||
in forAllSystems (system: pkgs: {
|
||||
default = self.apps.${system}.dibbler;
|
||||
dibbler = flake-utils.lib.mkApp {
|
||||
drv = self.packages.${system}.dibbler;
|
||||
};
|
||||
vm = mkVm "vm" "Start a NixOS VM with dibbler installed in kiosk-mode";
|
||||
vm-non-kiosk = mkVm "vm-non-kiosk" "Start a NixOS VM with dibbler installed in nonkiosk-mode";
|
||||
});
|
||||
|
||||
nixosModules.default = import ./nix/module.nix;
|
||||
|
||||
nixosConfigurations = {
|
||||
vm = import ./nix/nixos-configurations/vm.nix { inherit self nixpkgs; };
|
||||
vm-non-kiosk = import ./nix/nixos-configurations/vm-non-kiosk.nix { inherit self nixpkgs; };
|
||||
};
|
||||
|
||||
overlays = {
|
||||
default = self.overlays.dibbler;
|
||||
dibbler = final: prev: {
|
||||
@@ -46,20 +56,11 @@
|
||||
};
|
||||
});
|
||||
|
||||
# Note: using the module requires that you have applied the overlay first
|
||||
nixosModules.default = import ./nix/module.nix;
|
||||
|
||||
nixosConfigurations.skrot = nixpkgs.lib.nixosSystem (rec {
|
||||
system = "aarch64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ self.overlays.dibbler ];
|
||||
packages = forAllSystems (system: pkgs: {
|
||||
default = self.packages.${system}.dibbler;
|
||||
dibbler = pkgs.callPackage ./nix/package.nix {
|
||||
python3Packages = pkgs.python312Packages;
|
||||
};
|
||||
modules = [
|
||||
(nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix")
|
||||
self.nixosModules.default
|
||||
./nix/skrott.nix
|
||||
];
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user