modified: flake.nix
This commit is contained in:
134
flake.nix
134
flake.nix
@@ -14,80 +14,86 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixos-conf-editor, home-manager, ... } @ inputs:
|
outputs = { self, nixpkgs, home-manager, winapps, ... } @ inputs:
|
||||||
let system = "x86_64-linux"; in {
|
let system = "x86_64-linux"; in
|
||||||
|
{
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
access-tokens = [
|
access-tokens = [
|
||||||
"github.com=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"
|
"github.com=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"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# automatically use each host folder by name
|
nixos = nixpkgs.lib.nixosSystem {
|
||||||
nixos = nixpkgs.lib.nixosSystem {
|
inherit system;
|
||||||
inherit system;
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
|
||||||
./hosts/nixos/configuration.nix
|
|
||||||
./common/hardware-configuration.nix
|
|
||||||
inputs.winapps.nixosModule
|
|
||||||
home-manager.nixosModules.home-manager {
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.nixos = import ./hosts/nixos/home.nix;
|
|
||||||
|
|
||||||
}
|
|
||||||
];
|
|
||||||
configuration = {
|
|
||||||
environment.systemPackages = with nixpkgs.legacyPackages.${system}; [
|
|
||||||
inputs.winapps.packages.${system}.winapps
|
|
||||||
inputs.winapps.packages.${system}.winapps-launcher
|
|
||||||
freerdp
|
|
||||||
];
|
|
||||||
|
|
||||||
virtualisation.libvirtd.enable = true;
|
modules = [
|
||||||
# other VM or RDP-related settings...
|
./hosts/nixos/configuration.nix
|
||||||
};
|
./common/hardware-configuration.nix
|
||||||
|
winapps.nixosModule
|
||||||
|
|
||||||
|
home-manager.nixosModules.home-manager {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.nixos = import ./hosts/nixos/home.nix;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Inline module to configure winapps and VM backend
|
||||||
|
({ config, pkgs, lib, inputs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
inputs.winapps.packages.${system}.winapps
|
||||||
|
inputs.winapps.packages.${system}.winapps-launcher
|
||||||
|
freerdp
|
||||||
|
];
|
||||||
|
|
||||||
|
services.libvirtd.enable = true;
|
||||||
|
|
||||||
|
# Optionally, enable docker/podman container support
|
||||||
|
# virtualisation.oci-containers.backend = "docker";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
specialArgs = { inherit inputs; };
|
|
||||||
};
|
|
||||||
docker = nixpkgs.lib.nixosSystem {
|
docker = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/docker/configuration.nix
|
./hosts/docker/configuration.nix
|
||||||
./common/hardware-configuration.nix
|
./common/hardware-configuration.nix
|
||||||
home-manager.nixosModules.home-manager {
|
home-manager.nixosModules.home-manager {
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.nixos = import ./common/home.nix;
|
home-manager.users.nixos = import ./common/home.nix;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
server = nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
modules = [
|
|
||||||
./hosts/server/configuration.nix
|
|
||||||
./common/hardware-configuration.nix
|
|
||||||
home-manager.nixosModules.home-manager {
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.nixos = import ./common/home.nix;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
nix-cache = nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
modules = [
|
|
||||||
./hosts/nix-cache/configuration.nix
|
|
||||||
./common/hardware-configuration.nix
|
|
||||||
home-manager.nixosModules.home-manager {
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.nixos = import ./common/home.nix;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
server = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./hosts/server/configuration.nix
|
||||||
|
./common/hardware-configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.nixos = import ./common/home.nix;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"nix-cache" = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./hosts/nix-cache/configuration.nix
|
||||||
|
./common/hardware-configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.nixos = import ./common/home.nix;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user