Files
vmimages/flake.nix
2023-11-29 20:50:25 +00:00

64 lines
2.0 KiB
Nix

{
description = "Your new nix config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/release-23.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
#nixos-hardware.url = "github:NixOS/nixos-hardware"; # Import nixos hardware quirks settings
nixos-wsl = {
url = "github:nix-community/nixos-wsl";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix.url = github:Mic92/sops-nix;
vscode-server.url = "github:msteen/nixos-vscode-server";
};
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs:
let
mkHost = hostName: system:
nixpkgs.lib.nixosSystem {
pkgs = import nixpkgs {
inherit system;
# settings to nixpkgs goes to here
# nixpkgs.pkgs.zathura.useMupdf = true;
nixpkgs.config.allowUnfree = true;
};
specialArgs = {
# By default, the system will only use packages from the
# stable channel. You can selectively install packages
# from the unstable channel. You can also add more
# channels to pin package version.
pkgs-unstable = import nixpkgs-unstable {
inherit system;
# settings to nixpkgs-unstable goes to here
};
# make all inputs availabe in other nix files
inherit inputs;
};
modules = [
./modules
./hosts/${hostName}
# home-manager
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.sstent = import ./home-manager;
}
];
};
in {
nixosConfigurations = {
StuPC-WSL = mkHost "StuPC-WSL" "x86_64-linux";
};
};
}