135 lines
4.0 KiB
Nix
135 lines
4.0 KiB
Nix
{
|
|
description = "JawZ NixOS flake setup";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
|
|
nixpkgs-small.url = "github:nixos/nixpkgs?ref=nixos-25.05-small";
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
ucodenix.url = "github:e-tho/ucodenix";
|
|
doom-emacs = {
|
|
url = "github:marienz/nix-doom-emacs-unstraightened/ad01165af00765af07989b6ad14115960ac675f8";
|
|
inputs.nixpkgs.follows = "";
|
|
};
|
|
jawz-scripts = {
|
|
url = "git+https://git.servidos.lat/jawz/scripts.git";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nur = {
|
|
url = "github:nix-community/nur";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nix-gaming = {
|
|
url = "github:fufexan/nix-gaming";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
hyprland = {
|
|
url = "github:hyprwm/Hyprland";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager?ref=release-25.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
stylix = {
|
|
url = "github:danth/stylix/release-25.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nixtendo-switch = {
|
|
url = "github:nyawox/nixtendo-switch";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nixos-generators = {
|
|
url = "github:nix-community/nixos-generators";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
wallpapers = {
|
|
url = "git+https://git.servidos.lat/jawz/wallpapers.git";
|
|
flake = false;
|
|
};
|
|
fonts = {
|
|
url = "git+https://git.servidos.lat/jawz/fonts.git";
|
|
flake = false;
|
|
};
|
|
qbit_manage = {
|
|
url = "github:StuffAnThings/qbit_manage";
|
|
flake = false;
|
|
};
|
|
};
|
|
outputs =
|
|
{ self, jawz-scripts, ... }@inputs:
|
|
let
|
|
inherit (self) outputs;
|
|
system = "x86_64-linux";
|
|
mkpkgs =
|
|
repo:
|
|
import repo {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
langList = builtins.filter (name: name != "emacs") (
|
|
builtins.map (file: builtins.replaceStrings [ ".nix" ] [ "" ] (baseNameOf file)) (
|
|
builtins.attrNames (builtins.readDir ./modules/dev)
|
|
)
|
|
);
|
|
commonModules = name: [
|
|
{
|
|
nixpkgs.overlays = [
|
|
(import ./config/overlay.nix { inherit mkpkgs inputs; })
|
|
inputs.doom-emacs.overlays.default
|
|
];
|
|
}
|
|
{
|
|
nix.registry = {
|
|
jawz.flake = self;
|
|
unstable.flake = inputs.nixpkgs-unstable;
|
|
};
|
|
}
|
|
./hosts/${name}/configuration.nix
|
|
inputs.nur.modules.nixos.default
|
|
inputs.sops-nix.nixosModules.sops
|
|
inputs.stylix.nixosModules.stylix
|
|
inputs.nixtendo-switch.nixosModules.nixtendo-switch
|
|
];
|
|
createConfig =
|
|
name: local-nixpkgs:
|
|
let
|
|
lib = local-nixpkgs.lib // inputs.home-manager.lib;
|
|
in
|
|
lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = {
|
|
inherit inputs outputs;
|
|
};
|
|
modules = commonModules name;
|
|
};
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
workstation = createConfig "workstation" inputs.nixpkgs;
|
|
miniserver = createConfig "miniserver" inputs.nixpkgs-small;
|
|
server = createConfig "server" inputs.nixpkgs-small;
|
|
galaxy = createConfig "galaxy" inputs.nixpkgs-small;
|
|
emacs = createConfig "emacs" inputs.nixpkgs;
|
|
};
|
|
packages.${system} = (jawz-scripts.packages.${system} or { }) // {
|
|
emacs-vm = inputs.nixos-generators.nixosGenerate {
|
|
inherit system;
|
|
specialArgs = {
|
|
inherit inputs outputs;
|
|
};
|
|
modules = commonModules "emacs";
|
|
format = "vm";
|
|
};
|
|
};
|
|
devShells.${system} = builtins.listToAttrs (
|
|
map (name: {
|
|
inherit name;
|
|
value = self.nixosConfigurations.emacs.config.devShells.${name};
|
|
}) langList
|
|
);
|
|
};
|
|
}
|