Migrated from default.nix to configuration.nix

This commit is contained in:
2025-05-17 17:13:43 +02:00
parent ceeb4980ef
commit f09dfbc108
18 changed files with 265 additions and 566 deletions

127
flake.nix
View File

@@ -29,150 +29,111 @@
disko.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, home-manager, nix-colors, stylix, nixos-cosmic, sops-nix, disko, ... }:
let
system = "x86_64-linux";
system-arm = "aarch64-linux";
overlay-unstable = final: prev: {
unstable = import nixpkgs-unstable {
config.allowUnfree = true;
localSystem = { inherit system; };
};
};
overlay-unstable-arm = final: prev: {
unstable = import nixpkgs-unstable {
config.allowUnfree = true;
localSystem = { inherit system-arm; };
};
};
outputs = {
self,
nixpkgs,
home-manager,
nix-colors,
stylix,
nixos-cosmic,
sops-nix,
disko,
...
} @ inputs: let
inherit (self) outputs;
systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
in
{
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system} );
overlays = import ./overlays { inherit inputs; };
nixosConfigurations = {
# nixos-anywhere --flake .#p-th-rpi-01 --generate-hardware-config nixos-generate-config ./hosts/p-th-rpi-01/hardware-configuration.nix
p-th-rpi-01 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
disko.nixosModules.disko
inputs.nixos-hardware.nixosModules.raspberry-pi-4
./hosts/p-th-rpi-01 ];
};
ti-clt-lpt01 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs outputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
./hosts/ti-clt-lpt01
./hosts/ti-clt-lpt01/configuration.nix
];
};
ch-clt-dsk01 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs outputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/ch-clt-dsk01
./hosts/ch-clt-dsk01/configuration.nix
];
};
ti-clt-tbl01 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs outputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
inputs.nixos-hardware.nixosModules.microsoft-surface-go
./hosts/ti-clt-tbl01
./hosts/ti-clt-tbl01/configuration.nix
];
};
# Timo's desktop
ti-clt-dsk01 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs outputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/ti-clt-dsk01
./hosts/ti-clt-dsk01/configuration.nix
];
};
v-th-ctr-01 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs outputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/v-th-ctr-01
./hosts/v-th-ctr-01/configuration.nix
];
};
};
homeConfigurations = {
# Timo
"xeovalyte@ti-clt-lpt01" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs nix-colors; };
extraSpecialArgs = { inherit inputs outputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/ti-clt-lpt01/home.nix
];
};
"kiiwy@ch-clt-dsk01" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs nix-colors; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/ch-clt-dsk01/home.nix
];
};
"xeovalyte@ti-clt-tbl01" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs nix-colors; };
extraSpecialArgs = { inherit inputs outputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/ti-clt-tbl01/home.nix
];
};
"xeovalyte@ti-clt-dsk01" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs nix-colors; };
extraSpecialArgs = { inherit inputs outputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/ti-clt-dsk01/home.nix
];
};
"deploy@v-th-ctr-01" = home-manager.lib.homeManagerConfiguration {
# Christa
"kiiwy@ch-clt-dsk01" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs nix-colors; };
extraSpecialArgs = { inherit inputs outputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/v-th-ctr-01/home.nix
./hosts/ch-clt-dsk01/home.nix
];
};
"deploy@p-th-rpi-01" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.aarch64-linux;
extraSpecialArgs = { inherit inputs nix-colors; };
# Deploy
"deploy@v-th-ctr-01" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/p-th-rpi-01/home.nix
./hosts/v-th-ctr-01/home.nix
];
};
};