Archived
0
0
Fork 0
This repository has been archived on 2024-02-06. You can view files and clone it, but cannot push or open issues or pull requests.
flake/flake.nix

167 lines
4.4 KiB
Nix
Raw Normal View History

2022-12-21 06:27:41 +00:00
{
2023-01-02 07:09:38 +00:00
description = "The nix flake for all my systems";
inputs = {
2023-01-21 09:46:11 +00:00
nixpkgs.url = "github:nixos/nixpkgs";
2022-12-21 06:27:41 +00:00
2023-01-10 09:39:55 +00:00
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-22.11";
2023-01-02 07:09:38 +00:00
neovim.url = "github:neovim/neovim?dir=contrib";
2023-01-10 09:39:55 +00:00
neovim.inputs.nixpkgs.follows = "nixpkgs-stable";
2023-01-02 07:09:38 +00:00
neovim.inputs.flake-utils.follows = "utils";
2022-12-28 08:22:43 +00:00
2023-01-02 07:09:38 +00:00
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2023-01-02 08:56:35 +00:00
home-manager.inputs.utils.follows = "utils";
2022-12-28 08:22:43 +00:00
2023-01-02 07:09:38 +00:00
nur.url = "github:nix-community/NUR";
2023-01-02 05:19:31 +00:00
2023-01-02 07:09:38 +00:00
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
2023-01-02 05:19:31 +00:00
2023-01-02 07:09:38 +00:00
nixos-wsl.url = "github:nix-community/nixos-wsl";
nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";
nixos-wsl.inputs.flake-utils.follows = "utils";
2023-01-02 08:56:35 +00:00
nix-on-droid.url = "github:t184256/nix-on-droid";
nix-on-droid.inputs.nixpkgs.follows = "nixpkgs";
nix-on-droid.inputs.home-manager.follows = "home-manager";
nixos-hardware.url = "github:NixOS/nixos-hardware";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
2023-01-02 07:09:38 +00:00
};
outputs = {
self,
nixpkgs,
utils,
home-manager,
neovim,
nur,
nixos-wsl,
2023-01-02 08:56:35 +00:00
nix-on-droid,
nixos-hardware,
agenix,
2023-01-02 07:09:38 +00:00
...
}: let
modules = {
home = {
common = [
./users/relms/base.nix
./users/relms/shell.nix
];
dev = [
./users/relms/dev.nix
./users/relms/neovim.nix
];
gui = [
./users/relms/gui.nix
];
};
2023-01-02 07:09:38 +00:00
nixos = {
common = [
./common/personal.nix
./common/nix.nix
./devices/common-gpt.nix
];
common-mbr = [
./common/personal.nix
./common/nix.nix
./devices/common-mbr.nix
2023-01-02 07:09:38 +00:00
];
dev = [
2023-01-04 08:57:17 +00:00
./common/dev/podman.nix
2023-01-02 07:09:38 +00:00
];
services = {
common = [
./services/openssh.nix
];
};
2023-01-02 07:09:38 +00:00
desktops = {
common = [
./common/desktop/apps.nix
./common/desktop/media.nix
./common/desktop/xorg.nix
];
gnome = [
./common/desktop/gnome.nix
];
};
};
};
pkgsForSystem = system:
import nixpkgs {
overlays = [nur.overlay (utils.lib.genPkgOverlay neovim "neovim")];
inherit system;
};
2023-01-02 07:09:38 +00:00
in {
nixosConfigurations = {
skynet = nixpkgs.lib.nixosSystem {
pkgs = pkgsForSystem "x86_64-linux";
2023-01-02 07:09:38 +00:00
system = "x86_64-linux";
modules =
modules.nixos.common
++ modules.nixos.dev
++ modules.nixos.services.common
2023-01-02 07:09:38 +00:00
++ modules.nixos.desktops.common
++ modules.nixos.desktops.gnome
++ [
./common/desktop/drivers/skynet.nix
./devices/skynet/base.nix
./devices/skynet/hardware.nix
nixos-hardware.nixosModules.framework-12th-gen-intel
2023-02-01 07:04:29 +00:00
agenix.nixosModules.default
2023-01-02 07:09:38 +00:00
];
};
2022-12-28 08:22:43 +00:00
2023-01-02 07:09:38 +00:00
wsl = nixpkgs.lib.nixosSystem {
pkgs = pkgsForSystem "x86_64-linux";
2023-01-02 07:09:38 +00:00
system = "x86_64-linux";
modules = [
nixos-wsl.nixosModules.wsl
./common/personal.nix
./common/nix.nix
./devices/wsl/base.nix
];
};
crystal-gitlab = nixpkgs.lib.nixosSystem {
pkgs = pkgsForSystem "x86_64-linux";
system = "x86_64-linux";
modules =
modules.nixos.common-mbr
++ modules.nixos.services.common
++ [
2023-02-01 07:04:29 +00:00
agenix.nixosModules.default
./devices/crystal-gitlab/base.nix
./services/crystal/gitlab-runner.nix
];
};
2023-01-02 07:09:38 +00:00
};
2022-12-31 09:27:24 +00:00
2023-01-02 07:09:38 +00:00
homeConfigurations.relms = home-manager.lib.homeManagerConfiguration {
pkgs = pkgsForSystem "x86_64-linux";
modules =
modules.home.common
++ modules.home.dev
++ modules.home.gui
++ [
{
home = {
homeDirectory = "/home/relms";
username = "relms";
};
}
];
2023-01-02 07:09:38 +00:00
};
2023-01-02 08:56:35 +00:00
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
pkgs = pkgsForSystem "aarch64-linux";
2023-01-02 08:56:35 +00:00
system = "aarch64-linux";
modules = [./devices/pixel/base.nix];
};
formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.alejandra;
2023-01-02 07:09:38 +00:00
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
};
2022-12-21 06:27:41 +00:00
}