This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
nixos-config/flake.nix

108 lines
3.6 KiB
Nix
Raw Normal View History

2022-06-10 05:22:53 +02:00
{
description = "My system config";
inputs = {
2022-12-02 18:40:11 +01:00
nixpkgs.url = "nixpkgs/nixos-22.11";
2022-07-16 07:12:18 +02:00
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
2022-12-02 18:40:11 +01:00
home-manager.url = "github:nix-community/home-manager/release-22.11";
2022-06-10 05:22:53 +02:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2022-07-21 05:32:09 +02:00
nur.url = "github:nix-community/NUR";
2022-08-05 16:20:13 +02:00
2022-10-24 13:02:22 +02:00
# mpvpaper
wegank = {
url = "github:wegank/nur-packages";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-08-20 22:46:03 +02:00
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
alacritty-sixel.url = "github:ayosec/alacritty";
alacritty-sixel.flake = false;
2022-08-07 01:16:17 +02:00
ranger-sixel.url = "github:remi6397/ranger/feature/sixel";
ranger-sixel.flake = false;
2022-08-07 01:36:14 +02:00
2022-10-25 04:04:34 +02:00
ranger-icons.url = "github:alexanderjeurissen/ranger_devicons";
ranger-icons.flake = false;
2022-08-11 16:53:39 +02:00
material-wifi-icons.url = "github:dcousens/material-wifi-icons";
material-wifi-icons.flake = false;
2022-11-10 21:41:56 +01:00
sea-orm-cli.url = "github:lucperkins/nixpkgs/lperkins/sea-orm-cli";
2022-12-07 00:19:12 +01:00
webcord.url = "github:huantianad/nixpkgs/webcord";
2022-11-10 21:41:56 +01:00
2022-11-25 20:13:01 +01:00
nil-lsp.url = "github:oxalica/nil";
nil-lsp.inputs.nixpkgs.follows = "nixpkgs-unstable";
2022-12-14 05:05:27 +01:00
plymouth-themes.url = "github:adi1090x/plymouth-themes";
plymouth-themes.flake = false;
2022-08-02 01:15:26 +02:00
# my stuff
dhist.url = "github:lelgenio/dhist";
2022-06-10 05:22:53 +02:00
};
2022-08-20 22:46:03 +02:00
outputs = inputs@{ nixpkgs, nixpkgs-unstable, home-manager, nur, ... }:
2022-06-10 05:22:53 +02:00
let
2022-11-07 15:24:40 +01:00
inherit (import ./user/variables.nix) desktop;
2022-06-10 05:22:53 +02:00
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
};
lib = nixpkgs.lib;
2022-11-17 19:12:27 +01:00
specialArgs = { inherit inputs; };
2022-07-16 07:12:18 +02:00
common_modules = [
./system/configuration.nix
# nur.nixosModules.nur
2022-08-20 22:46:03 +02:00
inputs.hyprland.nixosModules.default
{
programs.hyprland.enable = true;
# programs.hyprland.package = null;
}
2022-11-07 15:24:40 +01:00
(import ./overlays (inputs // { inherit system; }))
2022-07-16 07:12:18 +02: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 07:12:18 +02:00
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
2022-08-24 04:42:36 +02:00
home-manager.extraSpecialArgs = { inherit inputs; };
2022-07-16 07:12:18 +02:00
}
2022-11-07 15:24:40 +01:00
] ++ lib.optional (desktop == "sway") ./system/sway.nix
2022-12-07 02:19:35 +01:00
++ lib.optional (desktop == "gnome") ./system/gnome.nix
++ lib.optional (desktop == "kde") ./system/kde.nix;
2022-06-10 05:22:53 +02:00
in {
nixosConfigurations = {
i15 = lib.nixosSystem {
2022-11-17 19:12:27 +01:00
inherit system specialArgs;
2022-08-08 04:58:05 +02:00
modules = [ ./hosts/i15.nix ] ++ common_modules;
2022-07-16 07:12:18 +02:00
};
2022-07-12 02:34:04 +02:00
monolith = lib.nixosSystem {
2022-11-17 19:12:27 +01:00
inherit system specialArgs;
2022-12-02 03:13:00 +01:00
modules = [
./hosts/monolith.nix
./system/gitlab-runner.nix
2022-12-23 14:03:05 +01:00
# ./system/nix-serve.nix
2022-12-02 03:13:00 +01:00
./system/btusb-kernel-patches.nix
./system/amdgpu-kernel-patches.nix
2022-12-02 03:13:00 +01:00
] ++ common_modules;
2022-06-10 05:22:53 +02:00
};
2022-10-26 02:18:53 +02:00
rainbow = lib.nixosSystem {
2022-11-17 19:12:27 +01:00
inherit system specialArgs;
2022-10-26 02:18:53 +02:00
modules = [ ./hosts/rainbow.nix ] ++ common_modules;
};
2022-10-22 05:03:28 +02:00
pixie = lib.nixosSystem {
2022-11-17 19:12:27 +01:00
inherit system specialArgs;
2022-10-25 01:18:24 +02: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 05:03:28 +02:00
};
2022-06-10 05:22:53 +02:00
};
};
2022-07-21 05:32:09 +02:00
}