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"; description = "Lgm's NixOS Flake";
inputs = { 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"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# separate inputs to lock some packages # separate inputs to lock some packages
# fresh - mostly desktop apps # fresh - mostly desktop apps
nixpkgs-fresh.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-fresh.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11"; 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 = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -31,8 +22,6 @@
nixpkgs, nixpkgs,
nixpkgs-fresh, nixpkgs-fresh,
nixpkgs-stable, nixpkgs-stable,
# nix-index-database,
# nur,
home-manager, home-manager,
sops-nix, sops-nix,
... ...
@ -54,56 +43,35 @@
overlay-vaapiIntel = final: prev: { overlay-vaapiIntel = final: prev: {
vaapiIntel = prev.vaapiIntel.override { enableHybridCodec = true; }; vaapiIntel = prev.vaapiIntel.override { enableHybridCodec = true; };
}; };
# overlay-gl = final: prev: {
# libGL = final.stable.libGL;
# glfw = final.stable.glfw;
# };
my-overlays = [ my-overlays = [
overlay-fresh overlay-fresh
overlay-stable overlay-stable
overlay-vaapiIntel overlay-vaapiIntel
# overlay-gl
]; ];
in in
{ {
nixosConfigurations.lgm-nixos = nixpkgs.lib.nixosSystem rec { nixosConfigurations.lgm-nixos = nixpkgs.lib.nixosSystem rec {
inherit system; inherit system;
specialArgs = {
# secrets = import ./secrets {};
};
modules = [ modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = my-overlays; }) ({ config, pkgs, ... }: { nixpkgs.overlays = my-overlays; })
# nur.nixosModules.nur
# inputs.nh.nixosModules.default
./hosts/laptop/configuration.nix ./hosts/laptop/configuration.nix
./hosts/laptop/hardware-configuration.nix ./hosts/laptop/hardware-configuration.nix
./hosts/laptop/mounts.nix ./hosts/laptop/mounts.nix
# nix-index-database.nixosModules.nix-index # nix-index-database.nixosModules.nix-index
sops-nix.nixosModules.sops 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.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.lgm = import ./hosts/laptop/home.nix; home-manager.users.lgm = import ./hosts/laptop/home.nix;
home-manager.extraSpecialArgs = with specialArgs; {
# inherit secrets;
};
} }
]; ];
}; };
nixosConfigurations.lgm-vps1 = nixpkgs.lib.nixosSystem rec { nixosConfigurations.lgm-vps1 = nixpkgs.lib.nixosSystem rec {
inherit system; inherit system;
specialArgs = {
# secrets = import ./secrets {};
};
modules = [ modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = my-overlays; }) ({ config, pkgs, ... }: { nixpkgs.overlays = my-overlays; })
# inputs.nh.nixosModules.default
./hosts/vps1/configuration.nix ./hosts/vps1/configuration.nix
./hosts/vps1/hardware-configuration.nix ./hosts/vps1/hardware-configuration.nix
sops-nix.nixosModules.sops sops-nix.nixosModules.sops