This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
nixos-config/flake.nix

56 lines
1.8 KiB
Nix
Raw Normal View History

2022-06-10 05:22:53 +02:00
{
description = "My system config";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05";
2022-07-16 07:12:18 +02:00
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
2022-06-10 05:22:53 +02:00
home-manager.url = "github:nix-community/home-manager/release-22.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2022-07-16 07:12:18 +02:00
nur.url = github:nix-community/NUR;
2022-06-10 05:22:53 +02:00
};
2022-07-16 07:12:18 +02:00
outputs = { nixpkgs, nixpkgs-unstable, home-manager, nur, ... }:
2022-06-10 05:22:53 +02:00
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
};
2022-07-16 07:12:18 +02:00
overlay-unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
# use this variant if unfree packages are needed:
# unstable = import nixpkgs-unstable {
# inherit system;
# config.allowUnfree = true;
# };
};
2022-06-10 05:22:53 +02:00
lib = nixpkgs.lib;
2022-07-16 07:12:18 +02:00
common_modules = [
./system/configuration.nix
# nur.nixosModules.nur
2022-07-20 04:43:50 +02:00
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable nur.overlay ]; })
2022-07-16 07:12:18 +02:00
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.lelgenio = import ./user/home.nix;
home-manager.backupFileExtension = "bkp";
2022-07-16 07:12:18 +02:00
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
}
];
2022-06-10 05:22:53 +02:00
in {
nixosConfigurations = {
i15 = lib.nixosSystem {
inherit system;
2022-07-12 02:34:04 +02:00
modules = [
./system/i15-hardware-configuration.nix
2022-07-16 07:12:18 +02:00
] ++ common_modules;
};
2022-07-12 02:34:04 +02:00
monolith = lib.nixosSystem {
inherit system;
modules = [
./system/monolith-hardware-configuration.nix
2022-07-16 07:12:18 +02:00
] ++ common_modules;
2022-06-10 05:22:53 +02:00
};
};
};
2022-07-16 07:12:18 +02:00
}