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

159 lines
4.1 KiB
Nix
Raw Permalink 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-04-20 04:55:49 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
2023-01-10 09:39:55 +00:00
2023-05-16 05:38:02 +00:00
neovim.url = "github:nix-community/neovim-nightly-overlay";
2023-04-20 04:55:49 +00:00
neovim.inputs.nixpkgs.follows = "nixpkgs";
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";
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-05-14 04:44:31 +00:00
agenix.inputs.home-manager.follows = "home-manager";
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
2023-05-07 05:58:39 +00:00
./devices/common.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
++ [
2023-05-30 06:03:31 +00:00
./common/virt/libvirt.nix
2023-01-02 07:09:38 +00:00
./devices/skynet/base.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 =
2023-05-07 05:58:39 +00:00
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-05-07 05:58:39 +00:00
./common/personal.nix
./common/nix.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
}