nixos/flake.nix

74 lines
2.0 KiB
Nix
Raw Normal View History

2021-12-11 14:21:48 +01:00
{
2021-12-11 14:44:46 +01:00
description = "Andreas Zweili's Nixos configuration";
inputs = {
2021-12-11 15:21:01 +01:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11";
2021-12-11 14:44:46 +01:00
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
2021-12-11 15:42:32 +01:00
nixos-hardware.url = "github:nixos/nixos-hardware";
2021-12-11 14:44:46 +01:00
home-manager = {
2021-12-11 15:21:01 +01:00
url = "github:nix-community/home-manager/release-21.11";
2021-12-11 14:44:46 +01:00
inputs.nixpkgs.follows = "nixpkgs";
};
};
2021-12-11 15:42:32 +01:00
outputs =
inputs @ { self
, nixpkgs
, nixpkgs-unstable
, nixos-hardware
, home-manager
}:
let
system = "x86_64-linux";
2021-12-11 17:20:54 +01:00
overlay-unstable = final: prev: {
unstable = import nixpkgs-unstable {
system = "x86_64-linux";
config.allowUnfree = true;
};
};
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
2021-12-11 17:20:54 +01:00
overlays = [
overlay-unstable
];
};
in
{
2021-12-11 15:42:32 +01:00
nixosConfigurations.gwyn = nixpkgs.lib.nixosSystem {
inherit system pkgs;
2021-12-11 15:42:32 +01:00
modules = [
./hardware/precision/configuration.nix
nixos-hardware.nixosModules.dell-precision-5530
nixos-hardware.nixosModules.common-gpu-nvidia
2021-12-11 15:47:22 +01:00
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.andreas = import ./home-manager/desktop.nix
{
inherit inputs system pkgs;
};
2021-12-11 15:47:22 +01:00
}
2021-12-11 15:42:32 +01:00
];
};
2021-12-16 16:09:50 +01:00
nixosConfigurations.nixos-vm = nixpkgs.lib.nixosSystem {
inherit system pkgs;
modules = [
./hardware/vm/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.andreas = import ./home-manager/desktop.nix
{
inherit inputs system pkgs;
};
}
];
};
2021-12-11 15:21:01 +01:00
};
2021-12-11 14:21:48 +01:00
}