185 lines
6.3 KiB
Nix
185 lines
6.3 KiB
Nix
{
|
|
description = "Felixalb System flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
|
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
nixpkgs-2211.url = "https://github.com/NixOS/nixpkgs/archive/34bfa9403e42eece93d1a3740e9d8a02fceafbca.tar.gz"; # old nixpgks for e.g. remmina
|
|
|
|
nix-darwin.url = "github:lnl7/nix-darwin/master";
|
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
matrix-synapse-next.url = "github:dali99/nixos-matrix-modules/v0.6.0";
|
|
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
|
|
|
extra-config.url = "git+file:///home/felixalb/nix-extra-config";
|
|
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs = {
|
|
self
|
|
, home-manager
|
|
, matrix-synapse-next
|
|
, nix-minecraft
|
|
, nix-darwin
|
|
, nixpkgs
|
|
, nixpkgs-2211
|
|
, sops-nix
|
|
, unstable
|
|
, extra-config
|
|
, ... }@inputs:
|
|
let
|
|
pkgs-overlay = final: prev: {
|
|
unstable = unstable.legacyPackages.${prev.system};
|
|
nixpkgs-2211 = nixpkgs-2211.legacyPackages.${prev.system};
|
|
|
|
python311 = prev.python311.override {
|
|
packageOverrides = self: super: {
|
|
# k5test is broken on darwin, as of 24.05
|
|
gssapi = super.gssapi.overrideAttrs (old: {
|
|
doInstallCheck = false;
|
|
});
|
|
};
|
|
};
|
|
|
|
tlclient = final.unstable.tlclient.overrideAttrs (finalAttrs: previousAttrs: {
|
|
# nixpkgs.config.allowUnfreePredicate doesn't work for the unstable overlay, as it is a different "nixpkgs"
|
|
meta.license.free = true;
|
|
});
|
|
};
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
# Networking / VPN Gateway
|
|
burnham = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
# Overlays-module makes "pkgs.unstable" available in configuration.nix
|
|
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
|
|
|
|
./hosts/burnham/configuration.nix
|
|
./common/domeneshop-dyndns.nix
|
|
sops-nix.nixosModules.sops
|
|
home-manager.nixosModules.home-manager {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users."felixalb" = import ./hosts/burnham/home.nix;
|
|
}
|
|
];
|
|
};
|
|
# Media / storage server
|
|
challenger = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
# Overlays-module makes "pkgs.unstable" available in configuration.nix
|
|
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
|
|
|
|
./hosts/challenger/configuration.nix
|
|
extra-config.nixosModules.default
|
|
sops-nix.nixosModules.sops
|
|
home-manager.nixosModules.home-manager {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users."felixalb" = import ./hosts/challenger/home.nix;
|
|
}
|
|
];
|
|
};
|
|
# General application server
|
|
defiant = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
# Overlays-module makes "pkgs.unstable" available in configuration.nix
|
|
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
|
|
|
|
./hosts/defiant/configuration.nix
|
|
./common/domeneshop-dyndns.nix
|
|
sops-nix.nixosModules.sops
|
|
matrix-synapse-next.nixosModules.default
|
|
home-manager.nixosModules.home-manager {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users."felixalb" = import ./hosts/defiant/home.nix;
|
|
}
|
|
];
|
|
};
|
|
# Work desktop
|
|
felixalbpc = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
# Overlays-module makes "pkgs.unstable" available in configuration.nix
|
|
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
|
|
|
|
./hosts/felixalbpc/configuration.nix
|
|
sops-nix.nixosModules.sops
|
|
home-manager.nixosModules.home-manager {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users."felixalb" = import ./hosts/felixalbpc/home.nix;
|
|
}
|
|
];
|
|
};
|
|
# Web host
|
|
malcolm = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
# Overlays-module makes "pkgs.unstable" available in configuration.nix
|
|
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
|
|
|
|
./hosts/malcolm/configuration.nix
|
|
sops-nix.nixosModules.sops
|
|
home-manager.nixosModules.home-manager {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users."felixalb" = import ./hosts/malcolm/home.nix;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
# Daily driver macbook
|
|
darwinConfigurations.worf = nix-darwin.lib.darwinSystem {
|
|
system = "aarch64-darwin";
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
./hosts/worf/configuration.nix
|
|
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
|
|
home-manager.darwinModules.home-manager {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users."felixalb" = import ./hosts/worf/home.nix;
|
|
}
|
|
# sops-nix.nixosModules.sops
|
|
];
|
|
};
|
|
|
|
devShells.x86_64-linux = {
|
|
default = nixpkgs.legacyPackages.x86_64-linux.callPackage ./shell.nix { };
|
|
};
|
|
|
|
devShells.aarch64-darwin = {
|
|
default = nixpkgs.legacyPackages.aarch64-darwin.callPackage ./shell.nix { };
|
|
};
|
|
};
|
|
}
|