dotfiles/flake.nix

73 lines
2 KiB
Nix
Raw Normal View History

2021-09-08 19:43:08 +02:00
{
description = "My awesome system config";
2021-09-15 00:41:46 +02:00
2021-09-08 19:43:08 +02:00
inputs = {
2021-09-10 14:00:56 +02:00
nixpkgs.url = "github:nixos/nixpkgs/release-21.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2021-09-11 13:25:38 +02:00
nur.url = "github:nix-community/NUR";
2021-10-03 16:33:35 +02:00
utils.url = "github:gytis-ivaskevicius/flake-utils-plus/1.3.0";
2021-09-14 13:12:34 +02:00
agenix.url = "github:ryantm/agenix";
2021-09-10 14:00:56 +02:00
emacs-overlay.url = "github:nix-community/emacs-overlay";
2021-09-08 19:43:08 +02:00
home-manager = {
2021-09-10 14:00:56 +02:00
url = "github:nix-community/home-manager/release-21.05";
2021-09-08 19:43:08 +02:00
inputs.nixpkgs.follows = "nixpkgs";
};
2021-09-10 10:15:57 +02:00
picom = {
2021-09-10 14:00:56 +02:00
url = "github:jonaburg/picom";
2021-09-10 10:15:57 +02:00
flake = false;
};
2021-09-11 13:34:35 +02:00
zsh-autosuggestions = {
url = "github:zsh-users/zsh-autosuggestions";
flake = false;
};
2021-09-11 13:35:44 +02:00
zsh-syntax-highlighting = {
url = "github:zsh-users/zsh-syntax-highlighting";
flake = false;
};
2021-09-08 19:43:08 +02:00
};
2021-09-15 00:41:46 +02:00
outputs = inputs@{ self, utils, home-manager, nixpkgs, agenix, ... }:
2021-09-08 20:30:19 +02:00
utils.lib.mkFlake {
2021-09-08 19:43:08 +02:00
inherit self inputs;
2021-09-14 23:34:26 +02:00
overlay = import ./overlays { inherit inputs; };
2021-09-15 01:36:49 +02:00
overlays = utils.lib.exportOverlays { inherit (self) pkgs inputs; };
2021-09-11 13:15:08 +02:00
channels.nixpkgs.overlaysBuilder = channels: [
self.overlay
inputs.utils.overlay
inputs.emacs-overlay.overlay
2021-09-11 13:25:38 +02:00
inputs.nur.overlay
2021-09-11 13:15:08 +02:00
];
outputsBuilder = channels: {
packages = utils.lib.exportPackages self.overlays channels;
devShell = channels.nixpkgs.mkShell {
packages = with channels.nixpkgs; [ nixpkgs-fmt rnix-lsp ];
};
};
channelsConfig.allowUnfree = true;
2021-09-15 01:36:49 +02:00
nixosModules = utils.lib.exportModules [ ./modules/default.nix ];
2021-09-10 08:59:21 +02:00
2021-09-08 19:43:08 +02:00
hostDefaults.modules = [
2021-09-11 13:15:08 +02:00
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
}
2021-09-11 13:15:08 +02:00
self.nixosModules.default
2021-09-14 13:12:34 +02:00
agenix.nixosModules.age
2021-09-08 19:43:08 +02:00
];
2021-09-15 01:36:49 +02:00
hosts.nixos-laptop.modules = [ ./hosts/nixos-laptop ];
2021-10-03 16:32:55 +02:00
hosts.nixos-desktop.modules = [ ./hosts/nixos-desktop ./modules/gaming ];
2021-09-08 19:43:08 +02:00
};
}