2021-09-08 19:43:08 +02:00
|
|
|
{
|
|
|
|
description = "My awesome system config";
|
2021-09-15 00:41:46 +02:00
|
|
|
|
2021-10-05 13:58:06 +02:00
|
|
|
##############
|
|
|
|
### Inputs ###
|
|
|
|
##############
|
|
|
|
|
2021-09-08 19:43:08 +02:00
|
|
|
inputs = {
|
2022-03-21 13:23:54 +01:00
|
|
|
master.url = "github:nixos/nixpkgs";
|
2022-03-21 13:23:36 +01:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
2022-06-02 18:06:52 +02:00
|
|
|
stable.url = "github:nixos/nixpkgs/nixos-22.05";
|
2021-09-10 14:00:56 +02:00
|
|
|
|
2022-07-15 13:11:54 +02:00
|
|
|
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
|
|
|
|
2022-09-27 14:12:50 +02:00
|
|
|
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
|
2021-11-11 18:34:54 +01:00
|
|
|
|
2022-05-26 13:50:03 +02:00
|
|
|
agenix = {
|
|
|
|
url = "github:ryantm/agenix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-11-22 11:13:18 +01:00
|
|
|
|
2022-05-26 13:50:03 +02:00
|
|
|
emacs-overlay = {
|
|
|
|
url = "github:nix-community/emacs-overlay";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-04-30 13:08:29 +02:00
|
|
|
|
2022-05-26 13:50:03 +02:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2022-03-21 13:20:46 +01:00
|
|
|
# Zsh specific
|
2021-10-31 19:45:06 +01:00
|
|
|
forgit-git = {
|
|
|
|
url = "github:wfxr/forgit";
|
|
|
|
flake = false;
|
|
|
|
};
|
2022-03-30 10:55:57 +02:00
|
|
|
|
2022-04-18 12:20:04 +02:00
|
|
|
# Laptop Touchpad
|
|
|
|
asus-touchpad-numpad-driver = {
|
2022-04-26 12:17:45 +02:00
|
|
|
url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout";
|
2022-04-18 12:20:04 +02:00
|
|
|
flake = false;
|
|
|
|
};
|
2022-04-18 12:33:07 +02:00
|
|
|
|
|
|
|
arkenfox-userjs = {
|
|
|
|
url = "github:arkenfox/user.js";
|
|
|
|
flake = false;
|
|
|
|
};
|
2022-04-23 17:31:50 +02:00
|
|
|
|
2022-11-18 13:27:12 +01:00
|
|
|
howdy = {
|
|
|
|
url = "sourcehut:~moritzboehme/howdy";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-11-25 10:24:29 +01:00
|
|
|
|
|
|
|
hyprland = {
|
|
|
|
url = "github:hyprwm/Hyprland";
|
|
|
|
};
|
2021-09-08 19:43:08 +02:00
|
|
|
};
|
|
|
|
|
2022-07-15 13:11:54 +02:00
|
|
|
outputs =
|
2022-10-15 19:05:51 +02:00
|
|
|
inputs@{ self, nixpkgs, utils, ... }:
|
2021-09-08 20:30:19 +02:00
|
|
|
utils.lib.mkFlake {
|
2021-09-08 19:43:08 +02:00
|
|
|
inherit self inputs;
|
|
|
|
|
2021-10-05 13:57:48 +02:00
|
|
|
channelsConfig.allowUnfree = true;
|
2021-10-05 13:58:06 +02:00
|
|
|
|
|
|
|
################
|
|
|
|
### Overlays ###
|
|
|
|
################
|
|
|
|
|
2022-07-15 13:11:54 +02:00
|
|
|
overlays.default = import ./overlays { inherit inputs; };
|
2021-09-11 13:15:08 +02:00
|
|
|
channels.nixpkgs.overlaysBuilder = channels: [
|
2022-07-15 13:11:54 +02:00
|
|
|
self.overlays.default
|
2021-09-11 13:15:08 +02:00
|
|
|
inputs.utils.overlay
|
|
|
|
inputs.emacs-overlay.overlay
|
2022-10-09 20:49:35 +02:00
|
|
|
inputs.howdy.overlays.default
|
2021-09-11 13:15:08 +02:00
|
|
|
];
|
|
|
|
|
2021-10-05 13:58:06 +02:00
|
|
|
###############
|
|
|
|
### Modules ###
|
|
|
|
###############
|
2021-09-11 13:15:08 +02:00
|
|
|
|
2022-07-15 13:11:54 +02:00
|
|
|
nixosModules = utils.lib.exportModules [
|
|
|
|
./modules/profiles/base.nix
|
|
|
|
./modules/profiles/gaming.nix
|
|
|
|
./modules/profiles/desktop.nix
|
|
|
|
];
|
2022-10-15 19:05:51 +02:00
|
|
|
|
2021-09-08 19:43:08 +02:00
|
|
|
hostDefaults.modules = [
|
2022-07-15 13:11:54 +02:00
|
|
|
./modules/default.nix
|
|
|
|
self.nixosModules.base
|
2022-06-02 18:06:52 +02:00
|
|
|
inputs.home-manager.nixosModule
|
2021-09-09 21:55:28 +02:00
|
|
|
{
|
2021-09-11 13:15:08 +02:00
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
extraSpecialArgs = { inherit inputs self; };
|
|
|
|
};
|
2021-09-09 21:55:28 +02:00
|
|
|
}
|
2022-11-25 10:24:29 +01:00
|
|
|
inputs.hyprland.nixosModules.default
|
2022-06-02 18:06:52 +02:00
|
|
|
inputs.agenix.nixosModules.age
|
2022-10-09 20:49:35 +02:00
|
|
|
inputs.howdy.nixosModules.default
|
2021-09-08 19:43:08 +02:00
|
|
|
];
|
|
|
|
|
2022-07-15 13:11:54 +02:00
|
|
|
hosts.nixos-laptop.modules = [
|
|
|
|
./hosts/nixos-laptop
|
|
|
|
self.nixosModules.desktop
|
2022-11-18 13:29:30 +01:00
|
|
|
self.nixosModules.gaming
|
2022-07-15 13:11:54 +02:00
|
|
|
];
|
2022-10-15 19:05:51 +02:00
|
|
|
|
2022-07-15 13:11:54 +02:00
|
|
|
hosts.nixos-desktop.modules = [
|
|
|
|
./hosts/nixos-desktop
|
|
|
|
self.nixosModules.desktop
|
|
|
|
self.nixosModules.gaming
|
|
|
|
];
|
2021-10-05 13:58:06 +02:00
|
|
|
|
|
|
|
###############
|
|
|
|
### Outputs ###
|
|
|
|
###############
|
|
|
|
|
2021-10-05 13:57:48 +02:00
|
|
|
outputsBuilder = channels:
|
|
|
|
with channels.nixpkgs; {
|
2022-07-15 13:11:54 +02:00
|
|
|
devShells.default = mkShell {
|
|
|
|
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
2021-10-05 13:57:48 +02:00
|
|
|
name = "dotfiles";
|
2021-11-22 11:13:18 +01:00
|
|
|
packages = [
|
|
|
|
# Secrets
|
2022-05-26 13:46:59 +02:00
|
|
|
pkgs.agenix
|
2022-07-15 13:11:54 +02:00
|
|
|
# cachix
|
2021-11-22 11:13:18 +01:00
|
|
|
cachix
|
|
|
|
];
|
2021-10-05 13:57:48 +02:00
|
|
|
};
|
2022-10-15 19:05:51 +02:00
|
|
|
|
2022-07-15 13:11:54 +02:00
|
|
|
checks.pre-commit-check = inputs.pre-commit-hooks.lib."${system}".run {
|
|
|
|
src = ./.;
|
|
|
|
hooks = {
|
|
|
|
nixpkgs-fmt.enable = true;
|
|
|
|
statix.enable = true;
|
|
|
|
shellcheck.enable = true;
|
|
|
|
};
|
|
|
|
};
|
2021-10-05 13:57:48 +02:00
|
|
|
};
|
2021-09-08 19:43:08 +02:00
|
|
|
};
|
|
|
|
}
|