171 lines
3.6 KiB
Nix
171 lines
3.6 KiB
Nix
{
|
|
description = "My System Configs";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
|
|
agenix.url = "github:ryantm/agenix";
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
devenv.url = "github:cachix/devenv";
|
|
devenv.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
ghostty = {
|
|
url = "git+ssh://git@github.com/ghostty-org/ghostty";
|
|
inputs.nixpkgs-stable.follows = "nixpkgs";
|
|
inputs.nixpkgs-unstable.follows = "nixpkgs";
|
|
};
|
|
|
|
golink.url = "github:tailscale/golink";
|
|
golink.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
home-manager.url = "github:nix-community/home-manager/master";
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
i3utils.url = "git+https://git.sr.ht/~dpatterbee/i3utils?ref=main";
|
|
i3utils.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
nixgl.url = "github:/guibou/nixGL";
|
|
nixgl.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
zig.url = "github:mitchellh/zig-overlay";
|
|
};
|
|
|
|
outputs = {
|
|
nixpkgs,
|
|
agenix,
|
|
devenv,
|
|
ghostty,
|
|
golink,
|
|
home-manager,
|
|
i3utils,
|
|
nixgl,
|
|
zig,
|
|
...
|
|
} @ inputs: let
|
|
system = "x86_64-linux";
|
|
|
|
pkgs =
|
|
(import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
overlays = [
|
|
golink.overlay
|
|
nixgl.overlay
|
|
zig.overlays.default
|
|
(final: prev: {
|
|
ghostty = ghostty.packages.${system}.default;
|
|
})
|
|
];
|
|
config.permittedInsecurePackages = [
|
|
"electron-25.9.0"
|
|
];
|
|
})
|
|
// {
|
|
i3utils = i3utils.packages.${system}.default;
|
|
};
|
|
|
|
lib = nixpkgs.lib;
|
|
|
|
deckSystem = {hostname}:
|
|
home-manager.lib.homeManagerConfiguration {
|
|
inherit pkgs;
|
|
modules = [
|
|
./users/deck
|
|
];
|
|
extraSpecialArgs = {
|
|
inherit hostname;
|
|
};
|
|
};
|
|
|
|
hostSystem = {
|
|
hostname,
|
|
headless,
|
|
}:
|
|
lib.nixosSystem {
|
|
inherit system;
|
|
inherit pkgs;
|
|
|
|
modules = [
|
|
./hosts/${hostname}/configuration.nix
|
|
|
|
agenix.nixosModules.default
|
|
|
|
golink.nixosModules.default
|
|
|
|
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;
|
|
};
|
|
elderbug = hostSystem {
|
|
hostname = "elderbug";
|
|
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;
|
|
};
|
|
sidon = hostSystem {
|
|
hostname = "sidon";
|
|
headless = false;
|
|
};
|
|
};
|
|
homeConfigurations = {
|
|
"deck" = deckSystem {
|
|
hostname = "deck";
|
|
};
|
|
};
|
|
|
|
devShell.${system} = devenv.lib.mkShell {
|
|
inherit inputs pkgs;
|
|
modules = [
|
|
{
|
|
# https://devenv.sh/reference/options/
|
|
packages = with pkgs; [
|
|
alejandra
|
|
];
|
|
|
|
enterShell = ''
|
|
'';
|
|
|
|
env = {
|
|
};
|
|
|
|
scripts = {
|
|
tidy.exec = ''
|
|
alejandra .
|
|
'';
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|