nixos/flake.nix

95 lines
2.7 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-16 20:19:21 +01:00
# look here for the hardware options https://github.com/NixOS/nixos-hardware/blob/master/flake.nix#L5
2021-12-11 15:42:32 +01:00
nixos-hardware.url = "github:nixos/nixos-hardware";
2021-12-16 20:19:21 +01:00
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";
username = import ./username.nix;
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 = [
2021-12-22 17:49:02 +01:00
./systems/gwyn/configuration.nix
2021-12-11 15:42:32 +01:00
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.${username} = 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 20:19:21 +01:00
nixosConfigurations.staubfinger = nixpkgs.lib.nixosSystem {
inherit system pkgs;
modules = [
2021-12-22 18:32:53 +01:00
./systems/staubfinger/configuration.nix
2021-12-16 20:19:21 +01:00
nixos-hardware.nixosModules.common-pc-laptop
nixos-hardware.nixosModules.common-pc-laptop-ssd
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./home-manager/desktop.nix
2021-12-16 20:19:21 +01:00
{
inherit inputs system pkgs;
};
}
];
};
2021-12-16 16:09:50 +01:00
nixosConfigurations.nixos-vm = nixpkgs.lib.nixosSystem {
inherit system pkgs;
modules = [
2021-12-22 18:32:53 +01:00
./systems/vm/configuration.nix
2021-12-16 16:09:50 +01:00
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./home-manager/desktop.nix
2021-12-16 16:09:50 +01:00
{
inherit inputs system pkgs;
};
}
];
};
2021-12-11 15:21:01 +01:00
};
2021-12-11 14:21:48 +01:00
}