init
This commit is contained in:
67
flake.nix
Normal file
67
flake.nix
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
description = "GarandOS";
|
||||
|
||||
inputs = {
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nvf = {
|
||||
url = "github:notashelf/nvf";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
stylix = {
|
||||
url = "github:danth/stylix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak?ref=latest";
|
||||
|
||||
# Hypersysinfo (Optional)
|
||||
#hyprsysteminfo.url = "github:hyprwm/hyprsysteminfo";
|
||||
|
||||
# QuickShell (optional add quickshell to outputs to enable)
|
||||
#quickshell = {
|
||||
# url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
#};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nix-flatpak,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
host = "Garand-Desktop";
|
||||
profile = "nvidia";
|
||||
username = "garand_plg";
|
||||
|
||||
# Deduplicate nixosConfigurations while preserving the top-level 'profile'
|
||||
mkNixosConfig = gpuProfile: nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
inherit username;
|
||||
inherit host;
|
||||
inherit profile; # keep using the let-bound profile for modules/scripts
|
||||
};
|
||||
modules = [
|
||||
./profiles/${gpuProfile}
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
amd = mkNixosConfig "amd";
|
||||
nvidia = mkNixosConfig "nvidia";
|
||||
nvidia-laptop = mkNixosConfig "nvidia-laptop";
|
||||
intel = mkNixosConfig "intel";
|
||||
vm = mkNixosConfig "vm";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user