nix-cfg/flake.nix
Lgmrszd ac8180a74d
Stable input update + flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/d9297efd3a1c3ebb9027dc68f9da0ac002ae94db' (2023-12-12)
  → 'github:nix-community/home-manager/51e44a13acea71b36245e8bd8c7db53e0a3e61ee' (2024-01-05)
• Updated input 'nh':
    'github:viperML/nh/a8888fe251a57dd3f055b9c8e2431f1e8e430f18' (2023-12-13)
  → 'github:viperML/nh/37b0d469a328a5b5969eacdf137f1e6b86c75a1d' (2023-12-19)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/a9bf124c46ef298113270b1f84a164865987a91c' (2023-12-11)
  → 'github:NixOS/nixpkgs/46ae0210ce163b3cba6c7da08840c1d63de9c701' (2024-01-06)
• Updated input 'nixpkgs-stable':
    'github:NixOS/nixpkgs/c2786e7084cbad90b4f9472d5b5e35ecb57958af' (2023-12-10)
  → 'github:NixOS/nixpkgs/c1be43e8e837b8dbee2b3665a007e761680f0c3d' (2024-01-05)
2024-01-09 10:11:04 +03:00

106 lines
2.9 KiB
Nix

{
description = "Lgm's NixOS Flake";
inputs = {
# There are many ways to reference flake inputs.
# The most widely used is `github:owner/name/reference`,
# which represents the GitHub repository URL + branch/commit-id/tag.
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# separate inputs to lock some packages
# locked - stuff to be updated very unfrequently
# fresh - mostly desktop apps
nixpkgs-locked.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-fresh.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11";
# nix-index-database.url = "github:nix-community/nix-index-database";
# nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
# nur = {
# url = "github:nix-community/NUR";
# };
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nh = {
url = "github:viperML/nh";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{
nixpkgs,
nixpkgs-locked,
nixpkgs-fresh,
nixpkgs-stable,
# nix-index-database,
# nur,
home-manager,
...
}:
let
system = "x86_64-linux";
overlay-locked = final: prev: {
locked = import nixpkgs-locked {
inherit system;
config.allowUnfree = true;
};
};
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;
};
};
overlay-vaapiIntel = final: prev: {
vaapiIntel = prev.vaapiIntel.override { enableHybridCodec = true; };
};
# overlay-gl = final: prev: {
# libGL = final.stable.libGL;
# glfw = final.stable.glfw;
# };
my-overlays = [
overlay-locked
overlay-fresh
overlay-stable
overlay-vaapiIntel
# overlay-gl
];
in
{
nixosConfigurations.lgm-nixos = nixpkgs.lib.nixosSystem rec {
inherit system;
specialArgs = {
secrets = import ./secrets {};
};
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = my-overlays; })
# nur.nixosModules.nur
inputs.nh.nixosModules.default
./configuration.nix
# nix-index-database.nixosModules.nix-index
./mounts.nix
# make home-manager as a module of nixos
# so that home-manager configuration will be deployed automatically when executing `nixos-rebuild switch`
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.lgm = import ./home.nix;
home-manager.extraSpecialArgs = with specialArgs; {
inherit secrets;
};
}
];
};
};
}