flake.nix cleanup

This commit is contained in:
Lgmrszd 2024-05-11 14:13:33 +03:00
parent ba7fdf8719
commit 986bee2ce6
No known key found for this signature in database
GPG key ID: 9396B8BA6FBB14DE

View file

@ -2,20 +2,11 @@
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
# fresh - mostly desktop apps
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";
@ -31,8 +22,6 @@
nixpkgs,
nixpkgs-fresh,
nixpkgs-stable,
# nix-index-database,
# nur,
home-manager,
sops-nix,
...
@ -54,56 +43,35 @@
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-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
./hosts/laptop/configuration.nix
./hosts/laptop/hardware-configuration.nix
./hosts/laptop/mounts.nix
# nix-index-database.nixosModules.nix-index
sops-nix.nixosModules.sops
# 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 ./hosts/laptop/home.nix;
home-manager.extraSpecialArgs = with specialArgs; {
# inherit secrets;
};
}
];
};
nixosConfigurations.lgm-vps1 = nixpkgs.lib.nixosSystem rec {
inherit system;
specialArgs = {
# secrets = import ./secrets {};
};
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = my-overlays; })
# inputs.nh.nixosModules.default
./hosts/vps1/configuration.nix
./hosts/vps1/hardware-configuration.nix
sops-nix.nixosModules.sops