modified: flake.nix

This commit is contained in:
2025-07-20 22:52:44 +10:00
parent e8ee5981ac
commit 427155bcb0

View File

@@ -8,54 +8,34 @@
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
winapps = {
url = "github:winapps-org/winapps/feat-nix-packaging";
flake = true;
};
}; };
outputs = { self, nixpkgs, home-manager, winapps, ... } @ inputs: outputs = { self, nixpkgs, nixos-conf-editor, home-manager, ... } @ 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 = [ modules = [
./hosts/nixos/configuration.nix ./hosts/nixos/configuration.nix
./common/hardware-configuration.nix ./common/hardware-configuration.nix
inputs.winapps.nixosModule
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 ./hosts/nixos/home.nix; 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 = [
@@ -68,7 +48,6 @@
} }
]; ];
}; };
server = nixpkgs.lib.nixosSystem { server = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
@@ -81,8 +60,7 @@
} }
]; ];
}; };
nix-cache = nixpkgs.lib.nixosSystem {
"nix-cache" = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
./hosts/nix-cache/configuration.nix ./hosts/nix-cache/configuration.nix
@@ -93,7 +71,9 @@
home-manager.users.nixos = import ./common/home.nix; home-manager.users.nixos = import ./common/home.nix;
} }
]; ];
}; };
}; };
}; };
} }