nixos-config/flake.nix

153 lines
3.9 KiB
Nix
Raw Permalink Normal View History

rec {
description = "felschr's NixOS configuration";
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
2024-05-26 17:36:14 +02:00
"https://cosmic.cachix.org/"
"https://felschr.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
2024-05-26 17:36:14 +02:00
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
"felschr.cachix.org-1:raomy5XA2tsVkBoG6wo70ARIn+V24IXhWaSe3QZo12A="
];
};
2023-07-22 18:49:30 +02:00
inputs = {
2024-12-08 15:38:56 +01:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
2020-09-23 10:36:46 +02:00
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware";
2023-09-13 14:01:04 +02:00
2023-07-22 18:49:30 +02:00
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
2020-09-24 12:35:45 +02:00
flake-utils.url = "github:numtide/flake-utils";
2020-09-23 10:36:46 +02:00
2023-07-22 18:49:30 +02:00
home-manager = {
2024-12-08 15:38:56 +01:00
url = "github:nix-community/home-manager/release-24.11";
2023-07-22 18:49:30 +02:00
inputs.nixpkgs.follows = "nixpkgs";
};
2020-09-23 10:36:46 +02:00
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
arkenfox-userjs = {
url = "github:arkenfox/user.js";
flake = false;
};
2022-05-04 03:02:47 +02:00
2023-07-22 18:49:30 +02:00
agenix = {
2024-05-26 17:03:35 +02:00
url = "github:ryantm/agenix";
2023-07-22 18:49:30 +02:00
inputs.nixpkgs.follows = "nixpkgs";
};
2022-05-05 21:24:46 +02:00
2023-07-22 18:49:30 +02:00
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "flake-utils";
};
2020-09-24 12:35:45 +02:00
2023-07-22 18:49:30 +02:00
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs";
};
matrix-appservices = {
url = "gitlab:coffeetables/nix-matrix-appservices";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-07-22 18:49:30 +02:00
nvim-kitty-navigator = {
url = "github:hermitmaster/nvim-kitty-navigator";
flake = false;
};
2024-01-30 21:44:02 +01:00
2024-05-26 17:36:14 +02:00
nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-01-30 21:44:02 +01:00
openwrt-imagebuilder = {
url = "github:astro/nix-openwrt-imagebuilder";
inputs.nixpkgs.follows = "nixpkgs";
};
roslyn-language-server = {
url = "github:SofusA/roslyn-language-server";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
};
2024-05-26 16:45:38 +02:00
outputs =
{
self,
nixpkgs,
nixpkgs-unstable,
...
}@inputs:
2023-07-22 18:49:30 +02:00
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
2024-05-26 16:45:38 +02:00
systems = [
"x86_64-linux"
"aarch64-linux"
];
imports = [
./pkgs/flake-module.nix
./lib/flake-module.nix
./hosts/flake-module.nix
./overlays.nix
];
flake = {
inherit nixConfig;
2023-07-22 18:49:30 +02:00
nixosModules = {
flakeDefaults = import ./modules/flakeDefaults.nix;
systemdNotify = import ./modules/systemdNotify.nix;
2023-10-04 19:45:46 +02:00
inadyn = import ./modules/inadyn.nix;
2023-07-22 18:49:30 +02:00
};
2020-09-27 14:27:25 +02:00
2023-07-22 18:49:30 +02:00
homeManagerModules = {
git = import ./home/modules/git.nix;
firefox = import ./home/modules/firefox/firefox.nix;
tor-browser = import ./home/modules/firefox/tor-browser.nix;
mullvad-browser = import ./home/modules/firefox/mullvad-browser.nix;
2022-05-05 21:24:46 +02:00
};
2023-07-22 18:49:30 +02:00
};
2024-05-26 16:45:38 +02:00
perSystem =
{
system,
config,
pkgs,
...
}:
{
_module.args.pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
2024-05-26 16:45:38 +02:00
devShells.default = pkgs.mkShell { inherit (config.checks.pre-commit) shellHook; };
2022-08-08 23:53:33 +02:00
2024-05-26 16:45:38 +02:00
checks = {
pre-commit = inputs.pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt-rfc-style.enable = true;
2024-05-26 16:45:38 +02:00
shellcheck.enable = true;
};
2022-08-08 23:53:33 +02:00
};
};
2023-07-22 18:49:30 +02:00
2024-05-26 16:45:38 +02:00
formatter = pkgs.nixfmt-rfc-style;
};
2023-07-22 18:49:30 +02:00
};
2020-09-23 10:36:46 +02:00
}