Files
nix-dotfiles-v2/flake.nix
2026-04-05 22:32:10 +02:00

235 lines
6.0 KiB
Nix

{
description = "NixOS configuration for legolas (laptop)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-colors.url = "github:misterio77/nix-colors";
stylix = {
url = "github:nix-community/stylix/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.3";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nixvim = {
url = "github:nix-community/nixvim/nixos-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
blog-generator.url = "github:adrlau/blog-generator";
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
pyproject-nix = {
url = "github:pyproject-nix/pyproject.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
uv2nix = {
url = "github:pyproject-nix/uv2nix";
inputs.pyproject-nix.follows = "pyproject-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
pyproject-build-systems = {
url = "github:pyproject-nix/build-system-pkgs";
inputs.pyproject-nix.follows = "pyproject-nix";
inputs.uv2nix.follows = "uv2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
unstable,
home-manager,
nix-colors,
stylix,
sops-nix,
lanzaboote,
nixos-hardware,
blog-generator,
niri,
noctalia,
nixvim,
pyproject-nix,
uv2nix,
pyproject-build-systems,
...
}@inputs:
let
system = "x86_64-linux";
in
{
packages.${system} =
let
lib = nixpkgs.lib;
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"s2cpp"
"s2-model"
"vllm-omni"
];
};
in
{
inherit (pkgs)
qwen-asr
llama-swap
z-image-models
whisper-models
s2cpp
s2-model
vllm-omni
;
};
overlays.default = final: _prev: {
qwen-asr = final.callPackage ./packages/qwen-asr { };
llama-swap = final.callPackage ./packages/llama-swap { };
z-image-models = final.callPackage ./packages/z-image-models { };
whisper-models = final.callPackage ./packages/whisper-models { };
s2cpp = final.callPackage ./packages/s2cpp { };
s2-model = final.callPackage ./packages/s2-model { };
vllm-omni = final.python3Packages.callPackage ./packages/vllm-omni { };
};
# legolas
nixosConfigurations.legolas = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs system; };
modules = [
./hosts/legolas/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.users.gunalx = import ./home/gunalx.nix;
home-manager.backupFileExtension = "bac";
home-manager.extraSpecialArgs = { inherit nix-colors inputs; };
home-manager.sharedModules = [
inputs.sops-nix.homeManagerModules.sops
inputs.stylix.homeModules.stylix
inputs.niri.homeModules.niri
inputs.noctalia.homeModules.default
inputs.nixvim.homeModules.nixvim
];
}
{ nixpkgs.overlays = [ niri.overlays.niri ]; }
./modules/unstable.nix
sops-nix.nixosModules.sops
lanzaboote.nixosModules.lanzaboote
nixos-hardware.nixosModules.dell-xps-13-9370
#temporarily for testing run my blog on my laptop
blog-generator.nixosModules.default
];
};
# aragon
nixosConfigurations.aragon = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs system; };
modules = [
./hosts/aragon/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.users.gunalx = import ./home/gunalx.nix;
home-manager.backupFileExtension = "bac";
home-manager.extraSpecialArgs = { inherit nix-colors inputs; };
home-manager.sharedModules = [
inputs.sops-nix.homeManagerModules.sops
inputs.stylix.homeModules.stylix
inputs.niri.homeModules.niri
inputs.noctalia.homeModules.default
inputs.nixvim.homeModules.nixvim
];
}
{
nixpkgs.overlays = [
self.overlays.default
niri.overlays.niri
];
}
./modules/unstable.nix
sops-nix.nixosModules.sops
lanzaboote.nixosModules.lanzaboote
];
};
# galadriel
nixosConfigurations.galadriel = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs system; };
modules = [
./modules/unstable.nix
./hosts/galadriel/configuration.nix
sops-nix.nixosModules.sops
lanzaboote.nixosModules.lanzaboote
];
};
# elros
nixosConfigurations.elros = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs system; };
modules = [
./modules/unstable.nix
./hosts/elros/configuration.nix
sops-nix.nixosModules.sops
lanzaboote.nixosModules.lanzaboote
];
};
};
}