nixos-config/flake.nix

138 lines
4.3 KiB
Nix
Raw Normal View History

2022-06-10 00:22:53 -03:00
{
description = "My system config";
inputs = {
2022-12-02 14:40:11 -03:00
nixpkgs.url = "nixpkgs/nixos-22.11";
2022-07-16 02:12:18 -03:00
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
2022-12-02 14:40:11 -03:00
home-manager.url = "github:nix-community/home-manager/release-22.11";
2022-06-10 00:22:53 -03:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2022-07-21 00:32:09 -03:00
nur.url = "github:nix-community/NUR";
2022-08-05 11:20:13 -03:00
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-10-24 08:02:22 -03:00
# mpvpaper
wegank = {
url = "github:wegank/nur-packages";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-08-20 17:46:03 -03:00
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
alacritty-sixel.url = "github:ayosec/alacritty";
alacritty-sixel.flake = false;
2022-08-06 20:16:17 -03:00
ranger-sixel.url = "github:remi6397/ranger/feature/sixel";
ranger-sixel.flake = false;
2022-08-06 20:36:14 -03:00
2022-10-24 23:04:34 -03:00
ranger-icons.url = "github:alexanderjeurissen/ranger_devicons";
ranger-icons.flake = false;
2022-08-11 11:53:39 -03:00
material-wifi-icons.url = "github:dcousens/material-wifi-icons";
material-wifi-icons.flake = false;
2022-11-10 17:41:56 -03:00
sea-orm-cli.url = "github:lucperkins/nixpkgs/lperkins/sea-orm-cli";
2022-12-06 20:19:12 -03:00
webcord.url = "github:huantianad/nixpkgs/webcord";
2022-11-10 17:41:56 -03:00
2022-11-25 16:13:01 -03:00
nil-lsp.url = "github:oxalica/nil";
nil-lsp.inputs.nixpkgs.follows = "nixpkgs-unstable";
2022-12-14 01:05:27 -03:00
plymouth-themes.url = "github:adi1090x/plymouth-themes";
plymouth-themes.flake = false;
2022-12-23 11:22:58 -03:00
agenix.url = "github:ryantm/agenix";
2023-01-21 10:44:52 -03:00
devenv.url = "github:cachix/devenv/v0.5";
devenv.inputs.nixpkgs.follows = "nixpkgs-unstable";
2023-01-19 19:52:34 -03:00
dzgui.url = "github:aclist/dztui/dzgui";
dzgui.flake = false;
2022-08-01 20:15:26 -03:00
# my stuff
2022-12-23 20:52:34 -03:00
dhist = {
url = "github:lelgenio/dhist";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-01-21 01:58:12 -03:00
demoji = {
url = "github:lelgenio/demoji";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-06-10 00:22:53 -03:00
};
2022-08-20 17:46:03 -03:00
outputs = inputs@{ nixpkgs, nixpkgs-unstable, home-manager, nur, ... }:
2022-06-10 00:22:53 -03:00
let
2022-11-07 11:24:40 -03:00
inherit (import ./user/variables.nix) desktop;
2022-06-10 00:22:53 -03:00
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
};
lib = nixpkgs.lib;
2023-01-19 01:02:32 -03:00
packages = import ./pkgs { inherit pkgs; };
2022-11-17 15:12:27 -03:00
specialArgs = { inherit inputs; };
2022-07-16 02:12:18 -03:00
common_modules = [
./system/configuration.nix
2022-12-23 11:22:58 -03:00
./system/secrets.nix
2023-01-23 00:36:05 -03:00
./system/specialisation.nix
2022-07-16 02:12:18 -03:00
# nur.nixosModules.nur
2022-12-23 11:22:58 -03:00
inputs.agenix.nixosModule
2022-08-20 17:46:03 -03:00
inputs.hyprland.nixosModules.default
{
programs.hyprland.enable = true;
# programs.hyprland.package = null;
}
2023-01-19 01:02:32 -03:00
(import ./overlays (inputs // { inherit system packages; }))
2022-07-16 02:12:18 -03:00
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.lelgenio = import ./user/home.nix;
home-manager.backupFileExtension = "bkp";
2022-07-16 02:12:18 -03:00
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
2022-08-23 23:42:36 -03:00
home-manager.extraSpecialArgs = { inherit inputs; };
2022-07-16 02:12:18 -03:00
}
2022-11-07 11:24:40 -03:00
] ++ lib.optional (desktop == "sway") ./system/sway.nix
2023-01-22 18:12:04 -03:00
++ lib.optional (desktop == "gnome") ./system/gnome.nix
++ lib.optional (desktop == "kde") ./system/kde.nix;
in
{
2022-06-10 00:22:53 -03:00
nixosConfigurations = {
i15 = lib.nixosSystem {
2022-11-17 15:12:27 -03:00
inherit system specialArgs;
2022-08-07 23:58:05 -03:00
modules = [ ./hosts/i15.nix ] ++ common_modules;
2022-07-16 02:12:18 -03:00
};
2022-07-11 21:34:04 -03:00
monolith = lib.nixosSystem {
2022-11-17 15:12:27 -03:00
inherit system specialArgs;
2022-12-01 23:13:00 -03:00
modules = [
./hosts/monolith.nix
2023-01-12 15:10:10 -03:00
./system/monolith-gitlab-runner.nix
2022-12-23 10:03:05 -03:00
# ./system/nix-serve.nix
./system/amdgpu-kernel-patches.nix
2022-12-01 23:13:00 -03:00
] ++ common_modules;
2022-06-10 00:22:53 -03:00
};
2022-10-25 21:18:53 -03:00
rainbow = lib.nixosSystem {
2022-11-17 15:12:27 -03:00
inherit system specialArgs;
2023-01-12 15:10:10 -03:00
modules = [
./hosts/rainbow.nix
./system/rainbow-gitlab-runner.nix
] ++ common_modules;
2022-10-25 21:18:53 -03:00
};
2022-10-22 00:03:28 -03:00
pixie = lib.nixosSystem {
2022-11-17 15:12:27 -03:00
inherit system specialArgs;
2022-10-24 20:18:24 -03:00
modules = [ ./hosts/pixie.nix ] ++ common_modules ++ [{
packages.media-packages.enable = lib.mkOverride 0 false;
programs.steam.enable = lib.mkOverride 0 false;
services.flatpak.enable = lib.mkOverride 0 false;
}];
2022-10-22 00:03:28 -03:00
};
2022-06-10 00:22:53 -03:00
};
2023-01-19 01:02:32 -03:00
packages.${system}.linuxPackages = packages;
2022-06-10 00:22:53 -03:00
};
2022-07-21 00:32:09 -03:00
}