mirror of
https://git.feal.no/felixalb/nixos-config.git
synced 2024-12-22 12:07:29 +01:00
129 lines
3.6 KiB
Nix
129 lines
3.6 KiB
Nix
{
|
|
description = "Felixalb System flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
|
nixpkgs-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
|
|
, nixpkgs-unstable
|
|
, sops-nix
|
|
, extra-config
|
|
, ... }@inputs:
|
|
let
|
|
pkgs-overlay = final: prev: {
|
|
unstable = import nixpkgs-unstable {
|
|
system = prev.system;
|
|
config.allowUnfree = true;
|
|
};
|
|
|
|
nixpkgs-2211 = import nixpkgs-2211 {
|
|
system = prev.system;
|
|
config.allowUnfree = true;
|
|
};
|
|
};
|
|
in
|
|
{
|
|
nixosConfigurations = let
|
|
normalSys = name: config: nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
({ config, pkgs, ... }: {
|
|
# Make "pkgs.unstable" etc. available
|
|
nixpkgs.overlays = [ pkgs-overlay ] ++ config.overlays or [ ];
|
|
})
|
|
|
|
./hosts/${name}/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/${name}/home.nix;
|
|
}
|
|
] ++ config.modules or [ ];
|
|
};
|
|
in {
|
|
|
|
# Networking / VPN Gateway
|
|
burnham = normalSys "burnham" {
|
|
modules = [
|
|
./common/domeneshop-dyndns.nix
|
|
];
|
|
};
|
|
|
|
# Media / storage server
|
|
challenger = normalSys "challenger" {
|
|
modules = [
|
|
extra-config.nixosModules.default
|
|
];
|
|
};
|
|
|
|
# General application server
|
|
defiant = normalSys "defiant" {
|
|
modules = [
|
|
./common/domeneshop-dyndns.nix
|
|
matrix-synapse-next.nixosModules.default
|
|
];
|
|
};
|
|
|
|
# Work desktop
|
|
felixalbpc = normalSys "felixalbpc" { };
|
|
|
|
# Web host
|
|
malcolm = normalSys "malcolm" { };
|
|
};
|
|
|
|
# Daily driver macbook
|
|
darwinConfigurations.worf = nix-darwin.lib.darwinSystem {
|
|
system = "aarch64-darwin";
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
|
|
|
|
./hosts/worf/configuration.nix
|
|
home-manager.darwinModules.home-manager {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users."felixalb" = import ./hosts/worf/home.nix;
|
|
}
|
|
];
|
|
};
|
|
|
|
devShells.x86_64-linux = {
|
|
default = nixpkgs.legacyPackages.x86_64-linux.callPackage ./shell.nix { };
|
|
};
|
|
|
|
devShells.aarch64-darwin = {
|
|
default = nixpkgs.legacyPackages.aarch64-darwin.callPackage ./shell.nix { };
|
|
};
|
|
};
|
|
}
|