160 lines
4.7 KiB
Nix
160 lines
4.7 KiB
Nix
{
|
|
description = "Build Entire System";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-24.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nathan.url = "./home";
|
|
|
|
system.url = "./system";
|
|
#system.inputs.diskoConfig.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
outputs = { self, nixpkgs, ... }@core_inputs: let
|
|
system = "x86_64-linux";
|
|
iso_system = "x86_64-linux";
|
|
|
|
host = "homebox";
|
|
username = "nathan";
|
|
|
|
devices = {
|
|
main = "/dev/nvme0n1";
|
|
bonus.disk1 = "/dev/nvme1n1";
|
|
};
|
|
|
|
in {
|
|
inputs.home-manager.useGlobalPkgs = true;
|
|
|
|
nixosConfigurations.${host} = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
|
specialArgs = {
|
|
core_inputs = (core_inputs // {inherit host;});
|
|
};
|
|
|
|
modules = [
|
|
core_inputs.system.nixosModule
|
|
core_inputs.home-manager.nixosModules.home-manager
|
|
|
|
({ lib, ... }: {
|
|
sysconfig = {
|
|
${host}.enable = true;
|
|
opts = {
|
|
firstBoot = true;
|
|
inherit host username devices;
|
|
};
|
|
};
|
|
disko = {
|
|
enable = true;
|
|
impermanent = true;
|
|
};
|
|
})
|
|
];
|
|
|
|
};
|
|
|
|
nixosConfigurations.iso = nixpkgs.lib.nixosSystem {
|
|
#inherit iso_system;
|
|
|
|
specialArgs = {
|
|
core_inputs = (core_inputs // {host = "installer";});
|
|
};
|
|
|
|
modules = [
|
|
|
|
({ lib, pkgs, modulesPath, ... }: {
|
|
imports = [
|
|
(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
|
|
];
|
|
|
|
home-manager.users.${username}.homeconfig = {
|
|
minimal = true;
|
|
externalPackages.enable = false;
|
|
calcurse.enable = false;
|
|
wayvnc.enable = true;
|
|
rofi.enable = true;
|
|
mpd.enable = false;
|
|
wal.enable = true;
|
|
ags.enable = true;
|
|
hyprland.enable = true;
|
|
swaylock.enable = true;
|
|
};
|
|
|
|
sysconfig = {
|
|
opts = {
|
|
firstBoot = true;
|
|
host = "installer";
|
|
inherit username;
|
|
openssh.enable = true;
|
|
hyprland.enable = true;
|
|
ags.enable = true;
|
|
pipewire.enable = true;
|
|
git.enable = true;
|
|
steam.enable = false;
|
|
nh.enable = false;
|
|
};
|
|
};
|
|
|
|
disko.enable = lib.mkForce false;
|
|
|
|
nix.settings = {
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
};
|
|
|
|
networking = {
|
|
hostName = "installer";
|
|
firewall.allowedTCPPorts = [ 22 ];
|
|
};
|
|
|
|
nixpkgs.hostPlatform = iso_system;
|
|
|
|
|
|
})
|
|
|
|
core_inputs.system.nixosModule
|
|
core_inputs.home-manager.nixosModules.home-manager
|
|
];
|
|
|
|
};
|
|
|
|
packages.${iso_system}.default = self.nixosConfigurations.iso.config.system.build.isoImage;
|
|
|
|
homeConfigurations."nathan" = core_inputs.home-manager.lib.homeManagerConfiguration {
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
extraSpecialArgs = { inherit core_inputs; };
|
|
|
|
modules = [
|
|
core_inputs.nathan.homeManagerModule
|
|
|
|
{
|
|
|
|
homeconfig = {
|
|
minimal = false;
|
|
externalPackages.enable = true;
|
|
calcurse.enable = true;
|
|
wayvnc.enable = true;
|
|
rofi.enable = true;
|
|
mpd.enable = true;
|
|
wal.enable = true;
|
|
ags.enable = true;
|
|
hyprland.enable = true;
|
|
swaylock.enable = true;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
};
|
|
|
|
}
|