2023-09-09 16:31:01 +02:00
|
|
|
{
|
|
|
|
description = "Lgm's NixOS Flake";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-11-24 13:22:22 +01:00
|
|
|
# separate inputs to lock some packages
|
|
|
|
# fresh - mostly desktop apps
|
|
|
|
nixpkgs-fresh.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2024-01-09 08:10:37 +01:00
|
|
|
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11";
|
2023-09-09 16:31:01 +02:00
|
|
|
home-manager = {
|
2023-10-30 17:20:54 +01:00
|
|
|
url = "github:nix-community/home-manager/master";
|
2023-09-09 16:31:01 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-01-21 19:53:13 +01:00
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.nixpkgs-stable.follows = "nixpkgs-stable";
|
|
|
|
};
|
2023-09-09 16:31:01 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = inputs@{
|
|
|
|
nixpkgs,
|
2023-11-24 13:22:22 +01:00
|
|
|
nixpkgs-fresh,
|
2023-09-09 16:31:01 +02:00
|
|
|
nixpkgs-stable,
|
|
|
|
home-manager,
|
2024-01-21 19:53:13 +01:00
|
|
|
sops-nix,
|
2023-09-09 16:31:01 +02:00
|
|
|
...
|
2023-11-24 13:22:22 +01:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
overlay-fresh = final: prev: {
|
|
|
|
fresh = import nixpkgs-fresh {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
overlay-stable = final: prev: {
|
|
|
|
stable = import nixpkgs-stable {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
};
|
2023-12-11 17:47:25 +01:00
|
|
|
overlay-vaapiIntel = final: prev: {
|
|
|
|
vaapiIntel = prev.vaapiIntel.override { enableHybridCodec = true; };
|
|
|
|
};
|
2023-11-24 13:22:22 +01:00
|
|
|
my-overlays = [
|
|
|
|
overlay-fresh
|
|
|
|
overlay-stable
|
2023-12-11 17:47:25 +01:00
|
|
|
overlay-vaapiIntel
|
2023-11-24 13:22:22 +01:00
|
|
|
];
|
|
|
|
in
|
|
|
|
{
|
2023-09-09 16:31:01 +02:00
|
|
|
nixosConfigurations.lgm-nixos = nixpkgs.lib.nixosSystem rec {
|
2023-11-24 13:22:22 +01:00
|
|
|
inherit system;
|
2023-09-09 16:31:01 +02:00
|
|
|
modules = [
|
2023-11-24 13:22:22 +01:00
|
|
|
({ config, pkgs, ... }: { nixpkgs.overlays = my-overlays; })
|
2024-01-09 23:36:02 +01:00
|
|
|
./hosts/laptop/configuration.nix
|
|
|
|
./hosts/laptop/hardware-configuration.nix
|
|
|
|
./hosts/laptop/mounts.nix
|
2023-10-30 17:20:54 +01:00
|
|
|
# nix-index-database.nixosModules.nix-index
|
2024-01-21 19:53:13 +01:00
|
|
|
sops-nix.nixosModules.sops
|
2023-09-09 16:31:01 +02:00
|
|
|
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
2024-01-12 21:09:13 +01:00
|
|
|
home-manager.users.lgm = import ./hosts/laptop/home.nix;
|
2023-09-09 16:31:01 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-01-12 21:09:13 +01:00
|
|
|
nixosConfigurations.lgm-vps1 = nixpkgs.lib.nixosSystem rec {
|
|
|
|
inherit system;
|
|
|
|
modules = [
|
|
|
|
({ config, pkgs, ... }: { nixpkgs.overlays = my-overlays; })
|
|
|
|
./hosts/vps1/configuration.nix
|
|
|
|
./hosts/vps1/hardware-configuration.nix
|
2024-02-18 11:07:09 +01:00
|
|
|
sops-nix.nixosModules.sops
|
2024-01-12 21:09:13 +01:00
|
|
|
];
|
|
|
|
};
|
2023-09-09 16:31:01 +02:00
|
|
|
};
|
|
|
|
}
|