2023-10-13 20:52:26 +02:00
|
|
|
{
|
2024-12-02 20:15:40 +01:00
|
|
|
description = "GHOSCHT's NixOS config";
|
2023-10-13 20:52:26 +02:00
|
|
|
|
2023-12-23 21:20:40 +01:00
|
|
|
inputs = {
|
|
|
|
# Nixpkgs
|
2024-12-02 14:20:49 +01:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
2023-12-23 21:20:40 +01:00
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
2023-10-13 20:52:26 +02:00
|
|
|
|
2023-12-23 21:20:40 +01:00
|
|
|
# Home manager
|
2024-12-02 20:15:40 +01:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/release-24.11";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-10-13 20:52:26 +02:00
|
|
|
|
2024-12-02 23:08:34 +01:00
|
|
|
hardware.url = "github:nixos/nixos-hardware";
|
2024-03-02 17:17:52 +01:00
|
|
|
|
|
|
|
disko = {
|
|
|
|
url = "github:nix-community/disko";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2023-12-26 23:25:22 +01:00
|
|
|
firefox-addons = {
|
|
|
|
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-12-02 20:15:40 +01:00
|
|
|
|
2023-12-26 23:25:22 +01:00
|
|
|
arkenfox = {
|
|
|
|
url = "github:dwarfmaster/arkenfox-nixos";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-12-02 20:15:01 +01:00
|
|
|
|
2024-12-02 20:15:40 +01:00
|
|
|
xremap = {
|
|
|
|
url = "github:xremap/nix-flake";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-12-02 20:15:01 +01:00
|
|
|
|
2024-12-02 20:15:40 +01:00
|
|
|
flatpaks = {
|
|
|
|
url = "github:GermanBread/declarative-flatpak/stable-v3";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-12-02 20:15:01 +01:00
|
|
|
|
2024-12-02 20:15:40 +01:00
|
|
|
heliox-cli = {
|
|
|
|
url = "git+https://git.ghoscht.com/heliox/cli?ref=custom-dimming";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-12-02 20:15:01 +01:00
|
|
|
|
2024-12-02 20:15:40 +01:00
|
|
|
picokontroller = {
|
|
|
|
url = "git+https://git.ghoscht.com/ghoscht/picoKontroller";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
arion = {
|
|
|
|
url = "github:hercules-ci/arion";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
stylix = {
|
|
|
|
url = "github:danth/stylix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-12-02 20:15:01 +01:00
|
|
|
|
|
|
|
nixvim = {
|
|
|
|
url = "github:nix-community/nixvim/nixos-24.11";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-12-23 21:20:40 +01:00
|
|
|
};
|
2023-10-13 20:52:26 +02:00
|
|
|
|
2024-12-02 20:15:40 +01:00
|
|
|
outputs =
|
|
|
|
{ self
|
|
|
|
, nixpkgs
|
|
|
|
, home-manager
|
|
|
|
, ...
|
|
|
|
} @ inputs:
|
|
|
|
let
|
|
|
|
inherit (self) outputs;
|
|
|
|
# Supported systems for your flake packages, shell, etc.
|
|
|
|
systems = [
|
|
|
|
"aarch64-linux"
|
|
|
|
"i686-linux"
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-darwin"
|
|
|
|
"x86_64-darwin"
|
|
|
|
];
|
|
|
|
# This is a function that generates an attribute by calling a function you
|
|
|
|
# pass to it, with each system as an argument
|
|
|
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
|
|
|
vars = import ./vars.nix;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
# Your custom packages
|
|
|
|
# Accessible through 'nix build', 'nix shell', etc
|
|
|
|
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
|
|
|
# Formatter for your nix files, available through 'nix fmt'
|
|
|
|
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
|
|
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
|
|
|
|
|
|
|
# Your custom packages and modifications, exported as overlays
|
|
|
|
overlays = import ./overlays { inherit inputs; };
|
|
|
|
# Reusable nixos modules you might want to export
|
|
|
|
# These are usually stuff you would upstream into nixpkgs
|
|
|
|
nixosModules = import ./modules/nixos;
|
|
|
|
# Reusable home-manager modules you might want to export
|
|
|
|
# These are usually stuff you would upstream into home-manager
|
|
|
|
homeManagerModules = import ./modules/home-manager;
|
|
|
|
|
|
|
|
# NixOS configuration entrypoint
|
|
|
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
|
|
|
nixosConfigurations = {
|
|
|
|
adalbert = nixpkgs.lib.nixosSystem {
|
|
|
|
specialArgs = { inherit inputs outputs vars; };
|
|
|
|
modules = [
|
|
|
|
./hosts/adalbert
|
|
|
|
];
|
|
|
|
};
|
|
|
|
ludwig = nixpkgs.lib.nixosSystem {
|
|
|
|
specialArgs = { inherit inputs outputs vars; };
|
|
|
|
modules = [
|
|
|
|
./hosts/ludwig
|
|
|
|
];
|
|
|
|
};
|
|
|
|
leopold = nixpkgs.lib.nixosSystem {
|
|
|
|
specialArgs = { inherit inputs outputs vars; };
|
|
|
|
modules = [
|
|
|
|
./hosts/leopold
|
|
|
|
];
|
|
|
|
};
|
|
|
|
franz = nixpkgs.lib.nixosSystem {
|
|
|
|
specialArgs = { inherit inputs outputs vars; };
|
|
|
|
modules = [
|
|
|
|
./hosts/franz
|
|
|
|
];
|
|
|
|
};
|
|
|
|
# build with nix build .#nixosConfigurations.eustachius.config.system.build.sdImage
|
|
|
|
eustachius = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "aarch64-linux";
|
|
|
|
modules = [
|
|
|
|
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix"
|
|
|
|
./hosts/eustachius
|
|
|
|
|
|
|
|
# extra config for sdImage generator
|
|
|
|
{
|
|
|
|
sdImage.compressImage = false;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-03-02 18:59:18 +01:00
|
|
|
};
|
2024-12-02 20:15:40 +01:00
|
|
|
|
|
|
|
# Standalone home-manager configuration entrypoint
|
|
|
|
# Available through 'home-manager --flake .#your-username@your-hostname'
|
|
|
|
homeConfigurations = {
|
|
|
|
"${vars.user}@adalbert" = home-manager.lib.homeManagerConfiguration {
|
|
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
|
|
|
extraSpecialArgs = { inherit inputs outputs vars; };
|
|
|
|
modules = [
|
|
|
|
./home/adalbert.nix
|
|
|
|
];
|
|
|
|
};
|
2024-03-02 17:17:52 +01:00
|
|
|
};
|
2024-12-02 20:15:40 +01:00
|
|
|
"${vars.user}@ludwig" = home-manager.lib.homeManagerConfiguration {
|
|
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
|
|
|
extraSpecialArgs = { inherit inputs outputs vars; };
|
2024-05-30 23:47:03 +02:00
|
|
|
modules = [
|
2024-12-02 20:15:40 +01:00
|
|
|
./home/ludwig.nix
|
2024-05-30 23:47:03 +02:00
|
|
|
];
|
|
|
|
};
|
2024-12-02 20:15:40 +01:00
|
|
|
"${vars.user}@franz" = home-manager.lib.homeManagerConfiguration {
|
2023-12-23 21:20:40 +01:00
|
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
2024-12-02 20:15:40 +01:00
|
|
|
extraSpecialArgs = { inherit inputs outputs vars; };
|
2023-12-23 21:20:40 +01:00
|
|
|
modules = [
|
2024-12-02 20:15:40 +01:00
|
|
|
./home/franz.nix
|
2023-12-23 21:20:40 +01:00
|
|
|
];
|
|
|
|
};
|
2024-12-02 20:15:40 +01:00
|
|
|
# "${vars.user}@eustachius" = home-manager.lib.homeManagerConfiguration {
|
|
|
|
# pkgs = nixpkgs.legacyPackages.aarch64-linux; # Home-manager requires 'pkgs' instance
|
|
|
|
# extraSpecialArgs = {inherit inputs outputs vars;};
|
|
|
|
# modules = [
|
|
|
|
# ./home/eustachius.nix
|
|
|
|
# ];
|
|
|
|
# };
|
2023-12-23 21:20:40 +01:00
|
|
|
};
|
2023-10-13 20:52:26 +02:00
|
|
|
}
|