98 lines
2.6 KiB
Nix
98 lines
2.6 KiB
Nix
{
|
|
description = "Torjus nixos config flake";
|
|
|
|
inputs = {
|
|
# nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
nixpkgs-stable.url = "github:nixos/nixpkgs?ref=nixos-23.11";
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
|
ghettoptt = {
|
|
url = "git+https://git.t-juice.club/torjus/ghettoptt?ref=master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
huecli = {
|
|
url = "git+https://git.t-juice.club/torjus/huecli?ref=master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{ self
|
|
, nixpkgs
|
|
, nixpkgs-stable
|
|
, sops-nix
|
|
, ghettoptt
|
|
, huecli
|
|
, ...
|
|
}@inputs:
|
|
let
|
|
system = "x86_64-linux";
|
|
user = "torjus";
|
|
overlay-stable = final: prev: {
|
|
stable = import nixpkgs-stable {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
};
|
|
allSystems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
"x86_64-darwin"
|
|
"aarch64-darwin"
|
|
];
|
|
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
|
|
pkgs = import nixpkgs { inherit system; };
|
|
});
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
prismo = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = { inherit inputs self user; };
|
|
modules = [ ./hosts/prismo ];
|
|
};
|
|
magicman = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = { inherit inputs self user; };
|
|
modules = [
|
|
({ config, pkgs, ... }: {
|
|
nixpkgs.overlays = [
|
|
overlay-stable
|
|
ghettoptt.overlays.default
|
|
huecli.overlays.default
|
|
];
|
|
})
|
|
./hosts/magicman
|
|
sops-nix.nixosModules.sops
|
|
];
|
|
};
|
|
gunter = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = { inherit inputs self user sops-nix; };
|
|
modules = [
|
|
({ config, pkgs, ... }: {
|
|
nixpkgs.overlays = [
|
|
overlay-stable
|
|
ghettoptt.overlays.default
|
|
huecli.overlays.default
|
|
];
|
|
})
|
|
./hosts/gunter
|
|
sops-nix.nixosModules.sops
|
|
];
|
|
};
|
|
};
|
|
devShells = forAllSystems ({ pkgs }: {
|
|
default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
pre-commit
|
|
];
|
|
};
|
|
});
|
|
};
|
|
}
|