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

182 lines
5.3 KiB
Nix
Raw Normal View History

2022-06-10 05:22:53 +02:00
{
description = "My system config";
inputs = {
2023-11-26 19:40:18 +01:00
nixpkgs.url = "nixpkgs/nixos-23.11";
home-manager.url = "github:nix-community/home-manager/release-23.11";
2022-06-10 05:22:53 +02:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2022-08-05 16:20:13 +02:00
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-08-20 22:46:03 +02:00
hyprland = {
url = "github:hyprwm/Hyprland";
2023-07-27 06:20:31 +02:00
inputs.nixpkgs.follows = "nixpkgs";
2022-08-20 22:46:03 +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-12-14 05:05:27 +01:00
plymouth-themes.url = "github:adi1090x/plymouth-themes";
plymouth-themes.flake = false;
2023-02-13 15:02:55 +01:00
lipsum.url = "github:hannenz/lipsum";
lipsum.flake = false;
2023-06-03 03:42:56 +02:00
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-12-23 15:22:58 +01:00
2024-03-27 06:28:28 +01:00
nixos-mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-06-03 03:42:56 +02:00
dzgui-nix = {
url = "github:lelgenio/dzgui-nix";
};
2023-01-19 23:52:34 +01:00
2023-06-03 03:42:56 +02:00
tlauncher = {
url = "github:lelgenio/tlauncher-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-05-19 22:53:08 +02:00
2022-08-02 01:15:26 +02:00
# my stuff
2023-06-03 03:42:56 +02:00
dhist = {
url = "github:lelgenio/dhist";
inputs.nixpkgs.follows = "nixpkgs";
};
demoji = {
url = "github:lelgenio/demoji";
inputs.nixpkgs.follows = "nixpkgs";
};
maildir-notify-daemon = {
url = "github:lelgenio/maildir-notify-daemon";
inputs.nixpkgs.follows = "nixpkgs";
};
wl-crosshair = {
url = "github:lelgenio/wl-crosshair";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-06-02 22:55:54 +02:00
# gnome stuff
nixos-conf-editor.url = "github:vlinkz/nixos-conf-editor";
nix-software-center.url = "github:vlinkz/nix-software-center";
2022-06-10 05:22:53 +02:00
};
outputs = inputs:
2022-06-10 05:22:53 +02:00
let
nixpkgsConfig = {
2022-06-10 05:22:53 +02:00
inherit system;
config = { allowUnfree = true; };
overlays = old_overlays.all;
2022-06-10 05:22:53 +02:00
};
bootstrapPkgs = import inputs.nixpkgs nixpkgsConfig;
nixpkgs = bootstrapPkgs.applyPatches {
name = "patched-nixpkgs";
src = inputs.nixpkgs;
patches = lib.mapAttrsToList (k: v: ./patches/nixpkgs/${k})
(builtins.readDir ./patches/nixpkgs);
};
inherit (import ./user/variables.nix) desktop;
system = "x86_64-linux";
pkgs = import nixpkgs nixpkgsConfig;
lib = inputs.nixpkgs.lib;
2023-01-19 05:02:32 +01:00
packages = import ./pkgs { inherit pkgs inputs; };
2023-01-29 17:50:23 +01:00
old_overlays = (import ./overlays { inherit packages inputs; });
2023-01-19 05:02:32 +01:00
2022-11-17 19:12:27 +01:00
specialArgs = { inherit inputs; };
2022-07-16 07:12:18 +02:00
common_modules = [
{ nixpkgs.pkgs = pkgs; }
2022-07-16 07:12:18 +02:00
./system/configuration.nix
2022-12-23 15:22:58 +01:00
./system/secrets.nix
2023-01-23 04:36:05 +01:00
./system/specialisation.nix
2024-01-21 01:42:07 +01:00
./system/greetd.nix
{ login-manager.greetd.enable = desktop == "sway" || desktop == "hyprland"; }
2023-02-08 00:03:04 +01:00
inputs.agenix.nixosModules.default
2022-08-20 22:46:03 +02:00
inputs.hyprland.nixosModules.default
2023-05-18 04:51:14 +02:00
inputs.dzgui-nix.nixosModules.default
{ programs.hyprland.enable = (desktop == "hyprland"); }
inputs.home-manager.nixosModules.home-manager
2022-07-16 07:12:18 +02:00
{
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
}
2024-01-21 01:42:07 +01:00
]
2023-01-22 22:12:04 +01:00
++ lib.optional (desktop == "gnome") ./system/gnome.nix
++ lib.optional (desktop == "kde") ./system/kde.nix;
in
{
2022-06-10 05:22:53 +02:00
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
2023-01-12 19:10:10 +01:00
./system/monolith-gitlab-runner.nix
2023-01-23 23:51:24 +01:00
./system/nix-serve.nix
./system/steam.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;
2023-01-12 19:10:10 +01:00
modules = [
./hosts/rainbow.nix
./system/rainbow-gitlab-runner.nix
] ++ common_modules;
2022-10-26 02:18:53 +02:00
};
2023-10-26 20:11:21 +02:00
double-rainbow = lib.nixosSystem {
inherit system specialArgs;
modules = [
./hosts/double-rainbow.nix
2023-12-07 17:58:34 +01:00
./system/rainbow-gitlab-runner.nix
2023-10-26 20:11:21 +02:00
] ++ 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
};
2024-03-29 01:56:52 +01:00
phantom = lib.nixosSystem {
inherit system specialArgs;
modules = [ ./hosts/phantom ];
};
2022-06-10 05:22:53 +02:00
};
homeConfigurations.lelgenio = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
2023-06-02 16:14:27 +02:00
extraSpecialArgs = {
2023-06-02 22:55:54 +02:00
inherit inputs;
osConfig = { };
2023-06-02 16:14:27 +02:00
};
modules = [ ./user/home.nix ];
};
2023-05-18 04:51:14 +02:00
packages.${system} = pkgs // packages;
2023-05-08 03:20:10 +02:00
formatter.${system} = pkgs.nixpkgs-fmt;
2022-06-10 05:22:53 +02:00
};
2022-07-21 05:32:09 +02:00
}