Init Config

This commit is contained in:
DerGrumpf
2026-04-03 23:37:52 +02:00
parent a8ec840d21
commit 62d3c12930
111 changed files with 5652 additions and 1 deletions

119
flake.nix Normal file
View File

@@ -0,0 +1,119 @@
{
description = "DerGrumpfs Nix Configuration";
inputs = {
# monorepo w/ recipes ("derivations")
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# declarative Configs
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
# declarative Hyprland
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
hyprcursor = {
url = "github:hyprwm/hyprcursor";
inputs.nixpkgs.follows = "nixpkgs";
};
# system-level software and settings (macOS)
darwin = {
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
# declarative homebrew management
nix-homebrew = { url = "github:zhaofengli/nix-homebrew"; };
# declarative Neovim
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
# declarative Discord
nixcord = {
url = "github:kaylorben/nixcord";
inputs.nixpkgs.follows = "nixpkgs";
};
# declarative Spotify
spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# declarative Encryption
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# declarative Catppuccin
catppuccin = {
url = "github:catppuccin/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, darwin, nix-homebrew, nixvim
, hyprland, sops-nix, ... }@inputs:
let
primaryUser = "phil";
mkNixos = hostName:
nixpkgs.lib.nixosSystem {
modules = [
{
nixpkgs.hostPlatform = "x86_64-linux";
networking.hostName = hostName;
}
./nixos
./hosts/cyper-desktop/configuration.nix
inputs.home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = {
inherit inputs primaryUser self;
};
home-manager.users.${primaryUser} = import ./home;
}
inputs.sops-nix.nixosModules.sops
];
specialArgs = { inherit inputs primaryUser self hostName; };
};
mkDarwin = hostName:
darwin.lib.darwinSystem {
system = "x86_64-darwin";
modules = [
./darwin
./hosts/cyper-mac/configuration.nix
{ networking.hostName = hostName; }
inputs.nix-homebrew.darwinModules.nix-homebrew
inputs.home-manager.darwinModules.home-manager
{
home-manager.extraSpecialArgs = {
inherit inputs primaryUser self;
};
home-manager.users.${primaryUser} = import ./home;
}
inputs.sops-nix.darwinModules.sops
];
specialArgs = { inherit inputs primaryUser self hostName; };
};
in {
nixosConfigurations."cyper-desktop" = mkNixos "cyper-desktop";
darwinConfigurations."cyper-mac" = mkDarwin "cyper-mac";
};
}