Major rework in progress
This commit is contained in:
99
flake.nix
99
flake.nix
@@ -5,44 +5,93 @@
|
||||
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-24.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nathan.url = "./home";
|
||||
nathan.url = "./home";
|
||||
|
||||
system.url = "./system";
|
||||
system.inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
in {
|
||||
inputs.home-manager.useGlobalPkgs = true;
|
||||
outputs = { self, nixpkgs, ... }@core_inputs: let
|
||||
system = "x86_64-linux";
|
||||
iso_system = "x86_64-linux";
|
||||
|
||||
host = "laptop";
|
||||
username = "nathan";
|
||||
|
||||
devices = {
|
||||
main = "/dev/nvme0n1";
|
||||
bonus = null;
|
||||
};
|
||||
|
||||
in rec {
|
||||
inputs.home-manager.useGlobalPkgs = true;
|
||||
|
||||
nixosConfigurations.laptop = nixpkgs.lib.nixosSystem {
|
||||
nixosConfigurations.${host} = nixpkgs.lib.nixosSystem {
|
||||
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
core_inputs = (core_inputs // { inherit host username; });
|
||||
inherit devices;
|
||||
};
|
||||
|
||||
modules = [
|
||||
inputs.system.nixosModule
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
modules = [
|
||||
inputs.system.nixosModule
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
|
||||
};
|
||||
({ lib, ... }: {
|
||||
sysconfig.${host}.enable = true;
|
||||
disko.enable = lib.mkForce false;
|
||||
})
|
||||
];
|
||||
|
||||
homeConfigurations."nathan" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
};
|
||||
|
||||
modules = [ inputs.nathan.homeManagerModule ];
|
||||
};
|
||||
nixosConfigurations.iso = nixpkgs.lib.nixosSystem {
|
||||
inherit iso_system;
|
||||
|
||||
};
|
||||
specialArgs = {
|
||||
core_inputs = (core_inputs // { inherit host username; });
|
||||
devices = (devices // {
|
||||
bonus = {
|
||||
disk1 = "/dev/nvme1n1";
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
modules = [
|
||||
|
||||
({ pkgs, modulesPath, ... }: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = iso_system;
|
||||
})
|
||||
|
||||
#inputs.system.nixosModule
|
||||
#inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
packages.${iso_system}.default = nixosConfigurations.iso.config.system.build.isoImage;
|
||||
|
||||
homeConfigurations."nathan" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
|
||||
modules = [ inputs.nathan.homeManagerModule ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user