nix-config/flake.nix

107 lines
2.5 KiB
Nix

{
description = "muhh configs for all nix managed things";
inputs = {
# nixpkgs.url = "nixpkgs/release-24.05";
nixpkgs.url = "nixpkgs/nixos-unstable";
# hardware.url = "nixos/nixos-hardware";
home-manager = {
# url = "github:nix-community/home-manager/release-24.05";
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
# secret-config = {
# url = "git+ssh://git@code.muhh.lol/muhh/nix-config-secret.git";
# flake = true;
# };
};
outputs = {
self,
nixpkgs,
home-manager,
lix-module,
sops-nix,
stylix,
nixvim,
niri,
# secret-config,
...
} @ inputs: let
inherit (self) outputs;
system = "x86_64-linux";
lib = nixpkgs.lib;
pkgs = nixpkgs.legacyPackages.${system};
in {
nixosConfigurations = {
cube = lib.nixosSystem {
inherit system;
modules = [
./hosts/cube.nix
lix-module.nixosModules.default
sops-nix.nixosModules.sops
niri.nixosModules.niri
# {
# environment.systemPackages = [
# secret-config.packages.${system}.default
# ];
# }
];
};
muhhStar = lib.nixosSystem {
inherit system;
modules = [
sops-nix.nixosModules.sops
./hosts/muhhStar.nix
];
};
};
homeConfigurations = {
muhh = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
config.permittedInsecurePackages = [
"electron-25.9.0"
];
};
modules = [
nixvim.homeManagerModules.nixvim
sops-nix.homeManagerModules.sops
stylix.homeManagerModules.stylix
niri.homeModules.niri
./home.nix
];
};
};
};
}