111 lines
2.7 KiB
Nix
111 lines
2.7 KiB
Nix
{
|
|
description = "My System Configs";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
|
|
agenix.url = "github:ryantm/agenix";
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
i3utils.url = "git+https://git.sr.ht/~dpatterbee/i3utils?ref=main";
|
|
i3utils.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
home-manager.url = "github:nix-community/home-manager/master";
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
hyprland.url = "github:hyprwm/Hyprland";
|
|
};
|
|
|
|
outputs = {
|
|
nixpkgs,
|
|
agenix,
|
|
home-manager,
|
|
i3utils,
|
|
hyprland,
|
|
...
|
|
}: let
|
|
system = "x86_64-linux";
|
|
|
|
pkgs =
|
|
(import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
})
|
|
// {i3utils = i3utils.packages.${system}.default;};
|
|
|
|
lib = nixpkgs.lib;
|
|
|
|
hostSystem = {
|
|
hostname,
|
|
headless,
|
|
}:
|
|
lib.nixosSystem {
|
|
inherit system;
|
|
inherit pkgs;
|
|
|
|
modules = [
|
|
./hosts/${hostname}/configuration.nix
|
|
|
|
agenix.nixosModules.default
|
|
hyprland.nixosModules.default
|
|
{programs.hyprland = {
|
|
enable = true;
|
|
package = hyprland.packages.${system}.default.overrideAttrs (finalAttrs: previousAttrs: {
|
|
buildInputs = previousAttrs.buildInputs ++ [pkgs.makeWrapper];
|
|
postInstall = ''
|
|
ls -lar $out
|
|
wrapProgram $out/bin/Hyprland \
|
|
--set LIBVA_DRIVER_NAME nvidia \
|
|
--set XDG_SESSION_TYPE wayland \
|
|
--set GBM_BACKEND nvidia-drm \
|
|
--set __GLX_VENDOR_LIBRARY_NAME nvidia \
|
|
--set WLR_NO_HARDWARE_CURSORS 1
|
|
'';
|
|
});
|
|
xwayland = {
|
|
enable = true;
|
|
hidpi = true;
|
|
};
|
|
nvidiaPatches = true;
|
|
};}
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
home-manager = {
|
|
useGlobalPkgs = true;
|
|
users = import ./users;
|
|
extraSpecialArgs = {
|
|
inherit hostname;
|
|
inherit headless;
|
|
};
|
|
};
|
|
}
|
|
];
|
|
};
|
|
in {
|
|
nixosConfigurations = {
|
|
dingbox = hostSystem {
|
|
hostname = "dingbox";
|
|
headless = false;
|
|
};
|
|
miniding = hostSystem {
|
|
hostname = "miniding";
|
|
headless = false;
|
|
};
|
|
pingbox = hostSystem {
|
|
hostname = "pingbox";
|
|
headless = false;
|
|
};
|
|
dingserver = hostSystem {
|
|
hostname = "dingserver";
|
|
headless = true;
|
|
};
|
|
bigding = hostSystem {
|
|
hostname = "bigding";
|
|
headless = true;
|
|
};
|
|
};
|
|
};
|
|
}
|