Initial commit
This commit is contained in:
commit
cfcc57a8bd
353 changed files with 18756 additions and 0 deletions
46
module/system/deploy-rs.nix
Normal file
46
module/system/deploy-rs.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake =
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
deploy.nodes = lib.mapAttrs' (
|
||||
hostname: nixosConfiguration:
|
||||
let
|
||||
inherit (nixosConfiguration.config.nixpkgs.hostPlatform) system;
|
||||
in
|
||||
{
|
||||
name = hostname;
|
||||
value = {
|
||||
inherit hostname;
|
||||
fastConnection = false;
|
||||
sshUser = "kirbara";
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
remoteBuild = false;
|
||||
magicRollback = false;
|
||||
activationTimeout = 300;
|
||||
confirmTimeout = 300;
|
||||
path = inputs.deploy-rs.lib.${system}.activate.nixos nixosConfiguration;
|
||||
};
|
||||
};
|
||||
}
|
||||
) config.nixosConfigurations;
|
||||
};
|
||||
|
||||
den.aspects = {
|
||||
deploy-rs = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.deploy-rs
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
55
module/system/flake-description.nix
Normal file
55
module/system/flake-description.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
flake-file = {
|
||||
description = "Kirbara2000 Infra";
|
||||
# ----- head-reminder
|
||||
do-not-edit = lib.mkForce ''
|
||||
# ██╗░░██╗██╗░██████╗░██████╗██████╗░░█████╗░██╗░░██╗░█████╗░
|
||||
# ██║░██╔╝██║██╔════╝██╔════╝██╔══██╗██╔══██╗██║░██╔╝██╔══██╗
|
||||
# █████═╝░██║╚█████╗░╚█████╗░██████╦╝███████║█████═╝░███████║
|
||||
# ██╔═██╗░██║░╚═══██╗░╚═══██╗██╔══██╗██╔══██║██╔═██╗░██╔══██║
|
||||
# ██║░╚██╗██║██████╔╝██████╔╝██████╦╝██║░░██║██║░╚██╗██║░░██║
|
||||
# ╚═╝░░╚═╝╚═╝╚═════╝░╚═════╝░╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░╚═╝
|
||||
# 𝑲𝒆𝒆𝒑 𝑰𝒕 𝑺𝒊𝒎𝒑𝒍𝒆, 𝑺𝒕𝒖𝒑𝒊𝒅, 𝑩𝑨𝑲𝑨!!
|
||||
#
|
||||
# "keep it low cognitive load, high clarity, and cute"
|
||||
# - Lao Tzu, The Art of Config (maybe)
|
||||
#
|
||||
# !!! DO-NOT-EDIT THIS FILE !!!
|
||||
# Generated by flake-file in each modules
|
||||
# This text exist in /module/system/flake-description.nix
|
||||
# `nix run ./#write-flake` to apply edit
|
||||
#
|
||||
# so, here cirno fumo instead
|
||||
#
|
||||
# ⢀⣒⠒⠆⠤⣀⡀
|
||||
# ⢠⡛⠛⠻⣷⣶⣦⣬⣕⡒⠤⢀⣀
|
||||
# ⡿⢿⣿⣿⣿⣿⣿⡿⠿⠿⣿⣳⠖⢋⣩⣭⣿⣶⡤⠶⠶⢶⣒⣲⢶⣉⣐⣒⣒⣒⢤⡀
|
||||
# ⣿ ⠉⣩⣭⣽⣶⣾⣿⢿⡏⢁⣴⠿⠛⠉⠁ ⠉⠙⠲⢭⣯⣟⡿⣷⣘⠢⡀
|
||||
# ⠹⣷⣿⣿⣿⣿⣿⢟⣵⠋⢠⡾⠁ ⠈⠻⣿⣿⣾⣦⣾⣢
|
||||
# ⠹⣿⣿⣿⡿⣳⣿⠃ ⣼⠃ ⠈⢻⣿⣿⣿⠟
|
||||
# ⠹⣿⣿⣵⣿⠃ ⣿ ⠹⣷⡄
|
||||
# ⠈⠛⣯⡇⠛⣽⣦⣿ ⢀⠔⠙⣄ ⣠⠳⡀ ⢿⡵⡀
|
||||
# ⣸⣿⣿⣿⠿⢿⠟ ⢀⡏ ⠘⡄ ⢠⠃ ⠹⡄ ⠸⣿⣷⡀
|
||||
# ⢰⣿⣿⣿⣿⡀ ⢸⠒⠤⢤⣀⣘⣆ ⡏⢀⣀⡠⢷ ⣿⡿⠃
|
||||
# ⠸⣿⣿⠟⢹⣥ ⣸⣀⣀⣤⣀⣀⠈⠳⢤⡀⡇⣀⣠⣄⣸⡆ ⡏
|
||||
# ⠁⠁ ⢸⢟⡄ ⣿⣾⣿⣿⣿⣿⠁ ⠈⠙⠙⣯⣿⣿⣿⡇ ⢠⠃
|
||||
# ⠇⢨⢞⢆ ⡿⣿⣿⣿⣿⡏ ⣿⣿⣿⡿⡇ ⣠⢟⡄
|
||||
# ⡼ ⢈⡏⢎⠳⣄ ⡇⠙⠛⠟⠛ ⠘⠻⠛⢱⢃⡜⡝⠈⠚⡄
|
||||
# ⠘⣅⠁⢸⣋⠈⢣⡈⢷⠇ ⣄ ⢀⡄ ⣠⣼⢯⣴⠇⣀⡀⢸
|
||||
# ⠈⠳⡌⠛⣶⣆⣷⣿⣦⣄⣀ ⠈⠉⠉⢉⣀⣤⡞⢛⣄⡀⢀⡨⢗⡦⠎
|
||||
# ⠈⠑⠪⣿⠁ ⠐⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⠉⠁⢸ ⠄⠙⡆
|
||||
# ⣀⠤⠚⡉⢳⡄⠡⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⠁⣠⣧⣤⣄⣀⡀⡰⠁
|
||||
# ⢀⠔⠉ ⢀⣧⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣅⡀
|
||||
# ⢸⠆ ⣀⣼⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠟⠋⠁⣠⠖⠒⠒⠛⢿⣆
|
||||
# ⠑⠤⠴⠞⢋⣵⣿⢿⣿⣿⣿⣿⣿⣿⠗⣀ ⢰⠇ ⢀⡼⣶⣤
|
||||
# ⡠⠟⢛⣿ ⠙⠲⠽⠛⠛⠵⠞⠉⠙⠳⢦⣀⣀⡞ ⡠⠋⠐⠣⠮⡁
|
||||
# ⢠⣎⡀⢀⣾⠇⢀⣠⡶⢶⠞⠋⠉⠉⠒⢄⡀⠉⠈⠉ ⣠⣾ ⢸⡀
|
||||
# ⠘⣦⡀⠘⢁⡴⢟⣯⣞⢉ ⢹⠶⠤⠤⡤⢖⣿⡋⢇ ⢸
|
||||
# ⠙⠵⠗⠺⠟⠖⢈⡣⡄ ⢀⣼⡤⣬⣽⠾⠋⠉⠑⠺⠧⣀⣤⣤⡠⠟⠃
|
||||
# ⠈⠛⠷⠶⠦⠶⠞⠉
|
||||
#
|
||||
#-----------------------------------------------------------------
|
||||
'';
|
||||
};
|
||||
}
|
||||
31
module/system/flake-input.nix
Normal file
31
module/system/flake-input.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ ... }:
|
||||
{
|
||||
flake-file = {
|
||||
inputs = {
|
||||
# ----- flake-system (with dendritic)
|
||||
den.url = "path:./flake/den";
|
||||
flake-aspects.url = "github:vic/flake-aspects";
|
||||
flake-file.url = "github:vic/flake-file";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
# -----
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
||||
disko.url = "github:nix-community/disko";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
git-hooks.url = "github:cachix/git-hooks.nix";
|
||||
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
lazy-apps.inputs.nixpkgs.follows = "nixpkgs";
|
||||
lazy-apps.url = "sourcehut:~rycee/lazy-apps";
|
||||
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
|
||||
nixos-generators.url = "github:nix-community/nixos-generators";
|
||||
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
nur.url = "github:nix-community/NUR";
|
||||
};
|
||||
};
|
||||
}
|
||||
9
module/system/flake-output.nix
Normal file
9
module/system/flake-output.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
flake-file = {
|
||||
outputs = lib.mkForce ''
|
||||
inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; }
|
||||
(inputs.import-tree [./module ./puter])
|
||||
'';
|
||||
};
|
||||
}
|
||||
17
module/system/flake-system.nix
Normal file
17
module/system/flake-system.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ inputs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.flakeModules.home-manager
|
||||
inputs.flake-aspects.flakeModule
|
||||
inputs.flake-parts.flakeModules.modules
|
||||
inputs.flake-file.flakeModules.default
|
||||
inputs.den.flakeModule
|
||||
];
|
||||
|
||||
# ----- config.meta
|
||||
options = {
|
||||
meta = lib.mkOption {
|
||||
type = with lib.types; lazyAttrsOf anything;
|
||||
};
|
||||
};
|
||||
}
|
||||
67
module/system/package-system.nix
Normal file
67
module/system/package-system.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ inputs, withSystem, ... }:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-latest.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
||||
nixkpgs-stable.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
pkgs-by-name-for-flake-parts.url = "github:drupol/pkgs-by-name-for-flake-parts";
|
||||
nix-webapps.url = "github:TLATER/nix-webapps";
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.pkgs-by-name-for-flake-parts.flakeModule
|
||||
];
|
||||
|
||||
perSystem =
|
||||
{ system, ... }:
|
||||
{
|
||||
pkgsDirectory = ../../package;
|
||||
_module.args.pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
# ----- overlays for ./package
|
||||
overlays = [
|
||||
(_final: _prev: {
|
||||
master = import inputs.nixpkgs-master {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
})
|
||||
(_final: _prev: {
|
||||
latest = import inputs.nixpkgs-latest {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
})
|
||||
inputs.nix-webapps.overlays.lib
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# ----- overlays for flake
|
||||
flake.overlays = {
|
||||
default =
|
||||
_final: prev:
|
||||
withSystem prev.stdenv.hostPlatform.system (
|
||||
{ system, config, ... }:
|
||||
{
|
||||
# ----- for apply packages in /package
|
||||
local = config.packages;
|
||||
# ----- for pinning nixpkgs version
|
||||
stable = import inputs.nixpkgs-stable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
latest = import inputs.nixpkgs-latest {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
master = import inputs.nixpkgs-master {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
8
module/system/system-architecture.nix
Normal file
8
module/system/system-architecture.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
nix-systems.url = "github:nix-systems/default";
|
||||
};
|
||||
|
||||
systems = import inputs.nix-systems;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue