2024-10-28 09:51:44 +00:00
|
|
|
|
{
|
|
|
|
|
description = "Lotte’s nix configuration";
|
2022-01-14 09:19:01 +00:00
|
|
|
|
|
2022-03-05 20:39:49 +00:00
|
|
|
|
inputs = {
|
2024-11-18 09:41:36 +00:00
|
|
|
|
devshell = {
|
|
|
|
|
url = "github:numtide/devshell";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-10-29 12:29:05 +00:00
|
|
|
|
disko = {
|
|
|
|
|
url = "github:nix-community/disko";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-11-18 09:41:36 +00:00
|
|
|
|
element-web = {
|
|
|
|
|
url = "github:darkkirb/element-web";
|
|
|
|
|
inputs.devshell.follows = "devshell";
|
|
|
|
|
inputs.flake-compat.follows = "flake-compat";
|
|
|
|
|
inputs.flake-parts.follows = "flake-parts";
|
|
|
|
|
inputs.matrix-js-sdk.follows = "matrix-js-sdk";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-10-28 09:56:58 +00:00
|
|
|
|
flake-compat = {
|
|
|
|
|
url = "github:edolstra/flake-compat";
|
|
|
|
|
flake = false;
|
|
|
|
|
};
|
2024-11-18 09:41:36 +00:00
|
|
|
|
flake-parts = {
|
|
|
|
|
url = "github:hercules-ci/flake-parts";
|
|
|
|
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-10-29 06:09:45 +00:00
|
|
|
|
flake-utils = {
|
|
|
|
|
url = "github:numtide/flake-utils";
|
|
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
|
};
|
|
|
|
|
flakey-profile = {
|
|
|
|
|
url = "github:lf-/flakey-profile";
|
|
|
|
|
};
|
|
|
|
|
gitignore = {
|
|
|
|
|
url = "github:hercules-ci/gitignore.nix";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-11-02 07:43:37 +00:00
|
|
|
|
home-manager = {
|
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-10-29 08:21:03 +00:00
|
|
|
|
impermanence = {
|
2024-11-17 08:37:40 +00:00
|
|
|
|
url = "github:DarkKirb/impermanence/change-default-link-type";
|
2024-10-29 08:21:03 +00:00
|
|
|
|
};
|
2024-10-29 06:09:45 +00:00
|
|
|
|
lix = {
|
|
|
|
|
url = "git+https://git.lix.systems/lix-project/lix";
|
|
|
|
|
inputs.flake-compat.follows = "flake-compat";
|
|
|
|
|
inputs.nix2container.follows = "nix2container";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
inputs.pre-commit-hooks.follows = "pre-commit-hooks";
|
|
|
|
|
};
|
|
|
|
|
lix-module = {
|
|
|
|
|
url = "git+https://git.lix.systems/lix-project/nixos-module";
|
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
|
inputs.flakey-profile.follows = "flakey-profile";
|
|
|
|
|
inputs.lix.follows = "lix";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-11-18 09:41:36 +00:00
|
|
|
|
matrix-js-sdk = {
|
|
|
|
|
url = "github:darkkirb/matrix-js-sdk";
|
|
|
|
|
inputs.devshell.follows = "devshell";
|
|
|
|
|
inputs.flake-compat.follows = "flake-compat";
|
|
|
|
|
inputs.flake-parts.follows = "flake-parts";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-11-13 14:46:14 +00:00
|
|
|
|
nix-vscode-extensions = {
|
|
|
|
|
url = "github:nix-community/nix-vscode-extensions";
|
|
|
|
|
inputs.flake-compat.follows = "flake-compat";
|
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-10-29 06:09:45 +00:00
|
|
|
|
nix2container = {
|
|
|
|
|
url = "github:nlewo/nix2container";
|
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-10-29 12:29:05 +00:00
|
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
2024-10-28 09:51:44 +00:00
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs";
|
2024-11-05 18:49:05 +00:00
|
|
|
|
plasma-manager = {
|
|
|
|
|
url = "github:nix-community/plasma-manager";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-10-29 06:09:45 +00:00
|
|
|
|
pre-commit-hooks = {
|
|
|
|
|
url = "github:cachix/git-hooks.nix";
|
|
|
|
|
inputs.flake-compat.follows = "flake-compat";
|
|
|
|
|
inputs.gitignore.follows = "gitignore";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
inputs.nixpkgs-stable.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-10-28 13:58:23 +00:00
|
|
|
|
riscv-overlay = {
|
|
|
|
|
url = "github:DarkKirb/riscv-overlay";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-11-13 13:38:40 +00:00
|
|
|
|
rust-overlay = {
|
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-11-16 08:53:35 +00:00
|
|
|
|
rycee-nur-expressions = {
|
|
|
|
|
url = "git+https://gitlab.com/rycee/nur-expressions";
|
|
|
|
|
flake = false;
|
|
|
|
|
};
|
2024-10-29 09:06:17 +00:00
|
|
|
|
sops-nix = {
|
2024-11-20 07:42:20 +00:00
|
|
|
|
url = "github:Mic92/sops-nix";
|
2024-10-29 09:06:17 +00:00
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-11-23 19:12:40 +00:00
|
|
|
|
stylix = {
|
|
|
|
|
url = "github:danth/stylix";
|
|
|
|
|
inputs.home-manager.follows = "home-manager";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-10-29 06:09:45 +00:00
|
|
|
|
systems.url = "github:nix-systems/default";
|
2024-11-09 12:05:06 +00:00
|
|
|
|
vscode-server = {
|
|
|
|
|
url = "github:nix-community/nixos-vscode-server";
|
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2022-03-05 20:39:49 +00:00
|
|
|
|
};
|
2022-01-14 09:19:01 +00:00
|
|
|
|
|
2024-11-09 14:02:26 +00:00
|
|
|
|
outputs =
|
|
|
|
|
{
|
|
|
|
|
self,
|
|
|
|
|
nixpkgs,
|
|
|
|
|
...
|
|
|
|
|
}@inputs':
|
|
|
|
|
let
|
|
|
|
|
inputs = inputs' // {
|
2024-10-28 09:51:44 +00:00
|
|
|
|
nixos-config = self;
|
|
|
|
|
inherit inputs;
|
2024-10-29 06:09:45 +00:00
|
|
|
|
inTester = false;
|
2024-10-30 08:06:52 +00:00
|
|
|
|
pureInputs = inputs';
|
2024-10-28 09:51:44 +00:00
|
|
|
|
};
|
2024-11-09 14:02:26 +00:00
|
|
|
|
pkgsFor =
|
|
|
|
|
system:
|
|
|
|
|
let
|
|
|
|
|
inputs' = inputs // {
|
|
|
|
|
inherit system;
|
|
|
|
|
inputs = inputs';
|
|
|
|
|
};
|
|
|
|
|
in
|
|
|
|
|
import nixpkgs {
|
2024-10-28 13:58:23 +00:00
|
|
|
|
inherit system;
|
2024-11-10 21:20:25 +00:00
|
|
|
|
config.allowUnfree = true;
|
2024-11-09 14:02:26 +00:00
|
|
|
|
overlays =
|
|
|
|
|
[
|
2024-11-18 10:09:31 +00:00
|
|
|
|
(_: _: {
|
|
|
|
|
inputs = inputs';
|
|
|
|
|
})
|
2024-11-10 21:20:25 +00:00
|
|
|
|
self.overlays.default
|
2024-10-28 13:58:23 +00:00
|
|
|
|
]
|
2024-11-09 14:02:26 +00:00
|
|
|
|
++ (
|
|
|
|
|
if system == "riscv64-linux" then
|
|
|
|
|
[
|
|
|
|
|
inputs.riscv-overlay.overlays.default
|
|
|
|
|
]
|
|
|
|
|
else
|
|
|
|
|
[ ]
|
|
|
|
|
);
|
2024-11-07 09:01:53 +00:00
|
|
|
|
};
|
2024-11-09 14:02:26 +00:00
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
nixosModules = {
|
|
|
|
|
default = import ./modules/default.nix;
|
2024-10-29 12:29:05 +00:00
|
|
|
|
};
|
2024-11-09 14:02:26 +00:00
|
|
|
|
nixosConfigurations =
|
|
|
|
|
with nixpkgs.lib;
|
|
|
|
|
let
|
|
|
|
|
mkSystem =
|
|
|
|
|
args:
|
|
|
|
|
let
|
|
|
|
|
inputs' = inputs // {
|
|
|
|
|
inherit (args) system;
|
|
|
|
|
};
|
|
|
|
|
in
|
|
|
|
|
nixosSystem (
|
|
|
|
|
args
|
|
|
|
|
// {
|
|
|
|
|
specialArgs = args.specialArgs or { } // inputs';
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
systems' = {
|
|
|
|
|
not522 = {
|
|
|
|
|
config = ./machine/not522;
|
2024-11-22 07:10:02 +00:00
|
|
|
|
system = "riscv64-linux";
|
2024-11-09 14:02:26 +00:00
|
|
|
|
};
|
|
|
|
|
not522-installer = {
|
|
|
|
|
config = ./machine/not522/installer;
|
2024-11-22 07:10:02 +00:00
|
|
|
|
system = "riscv64-linux";
|
2024-11-09 14:02:26 +00:00
|
|
|
|
};
|
2024-11-19 08:17:44 +00:00
|
|
|
|
oracle-installer = {
|
|
|
|
|
config = ./machine/oracle-installer;
|
|
|
|
|
system = "aarch64-linux";
|
|
|
|
|
};
|
2024-11-09 14:02:26 +00:00
|
|
|
|
pc-installer = {
|
|
|
|
|
config = ./machine/pc-installer;
|
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
};
|
|
|
|
|
rainbow-resort = {
|
|
|
|
|
config = ./machine/rainbow-resort;
|
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
};
|
|
|
|
|
thinkrac = {
|
|
|
|
|
config = ./machine/thinkrac;
|
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
systems = mapAttrs (
|
|
|
|
|
_: system:
|
|
|
|
|
mkSystem {
|
|
|
|
|
inherit (system) system;
|
|
|
|
|
modules = [
|
|
|
|
|
system.config
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
) systems';
|
|
|
|
|
in
|
2024-11-16 08:35:19 +00:00
|
|
|
|
systems;
|
2024-11-09 14:02:26 +00:00
|
|
|
|
hydraJobs = {
|
2024-11-16 08:53:35 +00:00
|
|
|
|
inherit (self) devShells packages;
|
2024-11-09 14:02:26 +00:00
|
|
|
|
nixosConfigurations = nixpkgs.lib.mapAttrs (
|
|
|
|
|
_: v: v.config.system.build.toplevel
|
|
|
|
|
) self.nixosConfigurations;
|
2024-10-29 09:06:17 +00:00
|
|
|
|
};
|
2024-11-09 14:02:26 +00:00
|
|
|
|
devShells.x86_64-linux.default =
|
|
|
|
|
with pkgsFor "x86_64-linux";
|
|
|
|
|
mkShell {
|
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
|
age
|
|
|
|
|
sops
|
|
|
|
|
ssh-to-age
|
|
|
|
|
nixfmt-rfc-style
|
2024-11-10 21:20:25 +00:00
|
|
|
|
nix-prefetch
|
|
|
|
|
nix-prefetch-git
|
2024-11-09 14:02:26 +00:00
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
formatter.x86_64-linux = (pkgsFor "x86_64-linux").nixfmt-rfc-style;
|
2024-11-10 21:20:25 +00:00
|
|
|
|
overlays.default = import ./packages;
|
|
|
|
|
packages = nixpkgs.lib.listToAttrs (
|
|
|
|
|
map
|
|
|
|
|
(name: {
|
|
|
|
|
inherit name;
|
|
|
|
|
value =
|
|
|
|
|
let
|
|
|
|
|
pkgs = pkgsFor name;
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
inherit (pkgs)
|
|
|
|
|
art-lotte
|
2024-11-17 13:05:36 +00:00
|
|
|
|
fish
|
2024-11-10 21:20:25 +00:00
|
|
|
|
package-updater
|
|
|
|
|
;
|
2024-11-12 16:25:17 +00:00
|
|
|
|
}
|
|
|
|
|
// (
|
|
|
|
|
if name != "riscv64-linux" then
|
|
|
|
|
{
|
2024-11-18 09:41:36 +00:00
|
|
|
|
inherit (pkgs)
|
|
|
|
|
element-desktop
|
|
|
|
|
element-web
|
|
|
|
|
kodi-joyn
|
|
|
|
|
;
|
2024-11-12 16:25:17 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{ }
|
|
|
|
|
);
|
2024-11-10 21:20:25 +00:00
|
|
|
|
})
|
|
|
|
|
[
|
|
|
|
|
"x86_64-linux"
|
2024-11-22 07:10:02 +00:00
|
|
|
|
"riscv64-linux"
|
2024-11-10 21:20:25 +00:00
|
|
|
|
"aarch64-linux"
|
|
|
|
|
]
|
|
|
|
|
);
|
2024-11-09 14:02:26 +00:00
|
|
|
|
};
|
2022-01-14 09:19:01 +00:00
|
|
|
|
}
|