Compare commits
13 commits
9a2c0fed2c
...
06a76ae98f
Author | SHA1 | Date | |
---|---|---|---|
06a76ae98f | |||
292695805e | |||
b988839a70 | |||
ddcf878b92 | |||
c70c38c93f | |||
7445304b4b | |||
e92e8c287d | |||
265fba3908 | |||
7c0f0ac90e | |||
5d5fcac95a | |||
7bcd839378 | |||
5b421a79d4 | |||
03c19b674c |
35 changed files with 524 additions and 357 deletions
|
@ -1,8 +1,8 @@
|
||||||
{ lib, ... }:
|
{ lib }:
|
||||||
{
|
{
|
||||||
options.assets = lib.mkOption {
|
options.assets = lib.options.create {
|
||||||
type = lib.types.unspecified;
|
type = lib.types.raw;
|
||||||
readOnly = true;
|
writable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
config.assets = {
|
config.assets = {
|
||||||
|
|
57
flake.lock
generated
57
flake.lock
generated
|
@ -1,5 +1,21 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"__flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1742412704,
|
||||||
|
"narHash": "sha256-mhazLo8DuZ3c6r5I7hDxxag8ftAM4W0aUjFjQuw8q5c=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "f7a7752f237bbc59b868058f70cffd3e436b49b7",
|
||||||
|
"revCount": 69,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.lix.systems/lix-project/flake-compat.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.lix.systems/lix-project/flake-compat.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
"agenix": {
|
"agenix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"darwin": [
|
"darwin": [
|
||||||
|
@ -260,26 +276,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_2": {
|
"flake-parts_2": {
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1741352980,
|
|
||||||
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts_3": {
|
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
|
@ -493,7 +489,7 @@
|
||||||
},
|
},
|
||||||
"niko-nur": {
|
"niko-nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_3",
|
"flake-parts": "flake-parts_2",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -510,6 +506,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nilla": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1742722370,
|
||||||
|
"narHash": "sha256-MqdseA78bo2M3zfb0mjcBPYU2Qn9CF/KH5LZivWRtB0=",
|
||||||
|
"owner": "nilla-nix",
|
||||||
|
"repo": "nilla",
|
||||||
|
"rev": "b30b5a225843ab649a9b140eb3cbbcc8030a7eaf",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nilla-nix",
|
||||||
|
"repo": "nilla",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-github-actions": {
|
"nix-github-actions": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -681,6 +693,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"__flake-compat": "__flake-compat",
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"attic": "attic",
|
"attic": "attic",
|
||||||
"conduit-src": "conduit-src",
|
"conduit-src": "conduit-src",
|
||||||
|
@ -689,13 +702,13 @@
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"fenix": "fenix",
|
"fenix": "fenix",
|
||||||
"firefox-darwin": "firefox-darwin",
|
"firefox-darwin": "firefox-darwin",
|
||||||
"flake-parts": "flake-parts_2",
|
|
||||||
"helix": "helix",
|
"helix": "helix",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"lix": "lix",
|
"lix": "lix",
|
||||||
"lix-module": "lix-module",
|
"lix-module": "lix-module",
|
||||||
"mailserver": "mailserver",
|
"mailserver": "mailserver",
|
||||||
"niko-nur": "niko-nur",
|
"niko-nur": "niko-nur",
|
||||||
|
"nilla": "nilla",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nvidia-patch": "nvidia-patch",
|
"nvidia-patch": "nvidia-patch",
|
||||||
"racket": "racket",
|
"racket": "racket",
|
||||||
|
|
99
flake.nix
99
flake.nix
|
@ -1,82 +1,37 @@
|
||||||
{
|
{
|
||||||
outputs =
|
outputs =
|
||||||
inputs@{ flake-parts, ... }:
|
inputs:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
let
|
||||||
|
nilla = import ./nilla.nix { inherit inputs; };
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
"aarch64-darwin"
|
"aarch64-darwin"
|
||||||
];
|
];
|
||||||
|
# NOTE: Assumes every package is available for every system.
|
||||||
imports = [
|
# For now let's say this is always the case.
|
||||||
inputs.treefmt.flakeModule
|
transpose =
|
||||||
|
attrs:
|
||||||
./assets
|
let
|
||||||
./hosts
|
inherit (inputs.nixpkgs) lib;
|
||||||
./modules
|
mappedForSystem = system: builtins.mapAttrs (_: pkg: pkg.result.${system}) attrs;
|
||||||
./wrappers
|
in
|
||||||
./pkgs
|
lib.genAttrs systems mappedForSystem;
|
||||||
./services
|
in
|
||||||
];
|
{
|
||||||
|
inherit (nilla) nixosModules;
|
||||||
perSystem =
|
inherit (nilla) darwinModules;
|
||||||
{
|
inherit (nilla) homeModules;
|
||||||
inputs',
|
inherit (nilla) nixosConfigurations;
|
||||||
self',
|
inherit (nilla) darwinConfigurations;
|
||||||
pkgs,
|
inherit (nilla) homeConfigurations;
|
||||||
...
|
devShells = transpose nilla.shells;
|
||||||
}:
|
packages = transpose nilla.packages;
|
||||||
{
|
formatter = nilla.packages.formatter.result;
|
||||||
devShells.default = pkgs.mkShellNoCC {
|
|
||||||
packages = [
|
|
||||||
inputs'.agenix.packages.agenix
|
|
||||||
self'.packages.attic-client
|
|
||||||
# TODO: Contribute darwin support to nh
|
|
||||||
pkgs.nh
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
packages = {
|
|
||||||
# Re-export it for convenience and for caching
|
|
||||||
inherit (inputs'.attic.packages) attic-client attic-server;
|
|
||||||
base-packages = pkgs.symlinkJoin {
|
|
||||||
name = "settei-base";
|
|
||||||
paths = with self'.packages; [
|
|
||||||
helix
|
|
||||||
fish
|
|
||||||
git-commit-last
|
|
||||||
git-fixup
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
treefmt = {
|
|
||||||
programs.deadnix.enable = true;
|
|
||||||
programs.nixfmt.enable = true;
|
|
||||||
programs.statix.enable = true;
|
|
||||||
programs.fish_indent.enable = true;
|
|
||||||
programs.deno.enable = true;
|
|
||||||
programs.stylua.enable = true;
|
|
||||||
programs.shfmt.enable = true;
|
|
||||||
settings.global.excludes = [
|
|
||||||
# agenix
|
|
||||||
"*.age"
|
|
||||||
|
|
||||||
# racket
|
|
||||||
"*.rkt"
|
|
||||||
"**/rashrc"
|
|
||||||
];
|
|
||||||
settings.on-unmatched = "fatal";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
|
||||||
flake-parts = {
|
|
||||||
url = "github:hercules-ci/flake-parts";
|
|
||||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -168,6 +123,14 @@
|
||||||
url = "github:numtide/treefmt-nix";
|
url = "github:numtide/treefmt-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
__flake-compat = {
|
||||||
|
url = "git+https://git.lix.systems/lix-project/flake-compat.git";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nilla = {
|
||||||
|
url = "github:nilla-nix/nilla";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
self,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
inputs = builtins.mapAttrs (_: input: input.result) config.inputs;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
includes = [
|
||||||
./kazuki
|
./kazuki
|
||||||
./hijiri-vm
|
./hijiri-vm
|
||||||
./hijiri
|
./hijiri
|
||||||
|
@ -17,20 +17,20 @@
|
||||||
./youko
|
./youko
|
||||||
];
|
];
|
||||||
|
|
||||||
builders =
|
config.configBuilders =
|
||||||
let
|
let
|
||||||
sharedOptions = {
|
sharedOptions = {
|
||||||
_file = ./default.nix;
|
_file = ./default.nix;
|
||||||
|
|
||||||
settei.sane-defaults.allSshKeys = config.assets.sshKeys.user;
|
settei.sane-defaults.allSshKeys = config.assets.sshKeys.user;
|
||||||
settei.flake-qol.inputs = inputs // {
|
settei.flake-qol.inputs = inputs // {
|
||||||
settei = self;
|
settei = inputs.self;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
baseNixos = inputs.nixpkgs.lib.nixosSystem {
|
baseNixos = inputs.nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
self.nixosModules.combined
|
config.nixosModules.combined
|
||||||
sharedOptions
|
sharedOptions
|
||||||
];
|
];
|
||||||
specialArgs.configurationName = "base";
|
specialArgs.configurationName = "base";
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
baseDarwin = inputs.darwin.lib.darwinSystem {
|
baseDarwin = inputs.darwin.lib.darwinSystem {
|
||||||
modules = [
|
modules = [
|
||||||
self.darwinModules.combined
|
config.darwinModules.combined
|
||||||
sharedOptions
|
sharedOptions
|
||||||
];
|
];
|
||||||
specialArgs.configurationName = "base";
|
specialArgs.configurationName = "base";
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
baseNixos.extendModules {
|
baseNixos.extendModules {
|
||||||
modules = [
|
modules = [
|
||||||
module
|
module
|
||||||
config.__extraHostConfigs.${name} or { }
|
config.extraHostConfigs.${name} or { }
|
||||||
];
|
];
|
||||||
specialArgs.configurationName = name;
|
specialArgs.configurationName = name;
|
||||||
};
|
};
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
eval = baseDarwin._module.args.extendModules {
|
eval = baseDarwin._module.args.extendModules {
|
||||||
modules = [
|
modules = [
|
||||||
module
|
module
|
||||||
config.__extraHostConfigs.${name} or { }
|
config.extraHostConfigs.${name} or { }
|
||||||
];
|
];
|
||||||
specialArgs.configurationName = name;
|
specialArgs.configurationName = name;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
configurations.nixos.hijiri-vm =
|
config.configurations.nixos.hijiri-vm =
|
||||||
{
|
{
|
||||||
modulesPath,
|
modulesPath,
|
||||||
lib,
|
lib,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
configurations.darwin.hijiri =
|
config.configurations.darwin.hijiri =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
configurations.nixos =
|
config.configurations.nixos =
|
||||||
let
|
let
|
||||||
mkInstaller =
|
mkInstaller =
|
||||||
system:
|
system:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
configurations.nixos.kazuki =
|
config.configurations.nixos.kazuki =
|
||||||
{
|
{
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
configurations.darwin.kogata =
|
config.configurations.darwin.kogata =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.system = "aarch64-darwin";
|
nixpkgs.system = "aarch64-darwin";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
configurations.nixos.legion =
|
config.configurations.nixos.legion =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
username,
|
username,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
configurations.nixos.ude =
|
config.configurations.nixos.ude =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
configurations.nixos.youko =
|
config.configurations.nixos.youko =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
|
10
inputs.nix
Normal file
10
inputs.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
let
|
||||||
|
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||||
|
inherit (lock.nodes.__flake-compat.locked) narHash rev url;
|
||||||
|
flake-compat = builtins.fetchTarball {
|
||||||
|
url = "${url}/archive/${rev}.tar.gz";
|
||||||
|
sha256 = narHash;
|
||||||
|
};
|
||||||
|
flake = import flake-compat { src = ./.; };
|
||||||
|
in
|
||||||
|
flake.inputs
|
|
@ -1,29 +1,21 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
flakeModule = import ./flake { inherit (inputs) nixpkgs darwin home-manager; };
|
inputs = builtins.mapAttrs (_: input: input.result) config.inputs;
|
||||||
|
perInput = system: flake: {
|
||||||
|
packages = flake.packages.${system};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
config.homeModules = rec {
|
||||||
flakeModule
|
|
||||||
];
|
|
||||||
|
|
||||||
flake.homeModules = rec {
|
|
||||||
settei = ./home;
|
settei = ./home;
|
||||||
default = settei;
|
default = settei;
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.flakeModules = rec {
|
config.nixosModules = rec {
|
||||||
settei = flakeModule;
|
|
||||||
default = settei;
|
|
||||||
};
|
|
||||||
|
|
||||||
flake.nixosModules = rec {
|
|
||||||
settei = import ./system {
|
settei = import ./system {
|
||||||
inherit (config) perInput;
|
inherit perInput;
|
||||||
isLinux = true;
|
isLinux = true;
|
||||||
};
|
};
|
||||||
combined = {
|
combined = {
|
||||||
|
@ -46,9 +38,9 @@ in
|
||||||
default = combined;
|
default = combined;
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.darwinModules = rec {
|
config.darwinModules = rec {
|
||||||
settei = import ./system {
|
settei = import ./system {
|
||||||
inherit (config) perInput;
|
inherit perInput;
|
||||||
isLinux = false;
|
isLinux = false;
|
||||||
};
|
};
|
||||||
combined = {
|
combined = {
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
{
|
|
||||||
nixpkgs,
|
|
||||||
darwin,
|
|
||||||
home-manager,
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
|
||||||
{
|
|
||||||
_file = ./configurations.nix;
|
|
||||||
|
|
||||||
options = {
|
|
||||||
# Those functions take the final arguments and emit a valid configuration.
|
|
||||||
# Probably should hardly ever be overriden
|
|
||||||
builders = {
|
|
||||||
nixos = mkOption {
|
|
||||||
type = types.functionTo types.unspecified;
|
|
||||||
default = _name: nixpkgs.lib.nixosSystem;
|
|
||||||
};
|
|
||||||
darwin = mkOption {
|
|
||||||
type = types.functionTo types.unspecified;
|
|
||||||
default = _name: darwin.lib.darwinSystem;
|
|
||||||
};
|
|
||||||
home = mkOption {
|
|
||||||
type = types.functionTo types.unspecified;
|
|
||||||
default = _name: home-manager.lib.homeManagerConfiguration;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
configurations = {
|
|
||||||
nixos = mkOption {
|
|
||||||
type = types.lazyAttrsOf types.deferredModule;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
darwin = mkOption {
|
|
||||||
type = types.lazyAttrsOf types.deferredModule;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
home = mkOption {
|
|
||||||
type = types.lazyAttrsOf types.deferredModule;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config.flake = {
|
|
||||||
nixosConfigurations = mapAttrs config.builders.nixos config.configurations.nixos;
|
|
||||||
darwinConfigurations = mapAttrs config.builders.darwin config.configurations.darwin;
|
|
||||||
homeConfigurations = mapAttrs config.builders.home config.configurations.home;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
nixpkgs,
|
|
||||||
darwin,
|
|
||||||
home-manager,
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
_file = ./default.nix;
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
(import ./configurations.nix { inherit nixpkgs darwin home-manager; })
|
|
||||||
./services.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,95 +0,0 @@
|
||||||
# List of features I want this module to eventually have
|
|
||||||
# TODO: Automatic port allocation
|
|
||||||
# TODO: Making it possible to conveniently isolate services (running them in NixOS containers)
|
|
||||||
# TODO: Handling specializations
|
|
||||||
# TODO: Convenient http handling
|
|
||||||
# TODO: Automatic backup
|
|
||||||
{ config, lib, ... }:
|
|
||||||
let
|
|
||||||
serviceModule =
|
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
host = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
};
|
|
||||||
ports = lib.mkOption {
|
|
||||||
type = with lib.types; listOf port;
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
hosts = lib.mkOption {
|
|
||||||
type = with lib.types; listOf str;
|
|
||||||
default = [ config.host ];
|
|
||||||
};
|
|
||||||
config = lib.mkOption {
|
|
||||||
type = lib.types.deferredModule;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
hostConfig = lib.mkOption {
|
|
||||||
type = with lib.types; attrsOf deferredModule;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
moduleToHostConfigs =
|
|
||||||
cfg:
|
|
||||||
lib.genAttrs cfg.hosts (host: {
|
|
||||||
imports = [
|
|
||||||
cfg.config
|
|
||||||
(cfg.hostConfig.${host} or { })
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
maybeGetPreviousConfigs = acc: host: (acc.${host} or { imports = [ ]; }).imports;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
_file = ./services.nix;
|
|
||||||
|
|
||||||
options = {
|
|
||||||
services = lib.mkOption {
|
|
||||||
type = with lib.types; attrsOf (submodule serviceModule);
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
|
|
||||||
__extraHostConfigs = lib.mkOption {
|
|
||||||
type = with lib.types; attrsOf deferredModule;
|
|
||||||
readOnly = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config.__extraHostConfigs =
|
|
||||||
let
|
|
||||||
duplicatePorts = lib.pipe config.services [
|
|
||||||
lib.attrValues
|
|
||||||
(map (cfg: cfg.ports))
|
|
||||||
lib.flatten
|
|
||||||
(lib.groupBy' (cnt: _: cnt + 1) 0 toString)
|
|
||||||
(lib.filterAttrs (_: cnt: cnt > 1))
|
|
||||||
lib.attrNames
|
|
||||||
];
|
|
||||||
assertMsg =
|
|
||||||
let
|
|
||||||
plural = lib.length duplicatePorts > 1;
|
|
||||||
in
|
|
||||||
"\nBad service config:\nThe following port${if plural then "s" else ""} ${
|
|
||||||
if plural then "were" else "was"
|
|
||||||
} declared multiple times: ${lib.concatStringsSep ", " duplicatePorts}";
|
|
||||||
# Here I collect all the services.<name>.config into a flat
|
|
||||||
# __extraHostConfigs.<host>.imports = [
|
|
||||||
# ...
|
|
||||||
# ]
|
|
||||||
# so that I can easily import them in hosts/default.nix
|
|
||||||
hostConfigs = lib.pipe config.services [
|
|
||||||
lib.attrValues
|
|
||||||
(lib.foldl' (
|
|
||||||
acc: cfg:
|
|
||||||
acc
|
|
||||||
// lib.mapAttrs (host: c: {
|
|
||||||
imports = c.imports ++ (maybeGetPreviousConfigs acc host);
|
|
||||||
}) (moduleToHostConfigs cfg)
|
|
||||||
) { })
|
|
||||||
];
|
|
||||||
in
|
|
||||||
if duplicatePorts != [ ] then throw assertMsg else hostConfigs;
|
|
||||||
}
|
|
8
modules/nilla/builders/custom-load.nix
Normal file
8
modules/nilla/builders/custom-load.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ lib }:
|
||||||
|
{
|
||||||
|
config.builders.custom-load = {
|
||||||
|
settings.type = lib.types.submodule { };
|
||||||
|
settings.default = { };
|
||||||
|
build = pkg: lib.attrs.generate pkg.systems (system: pkg.package { inherit system; });
|
||||||
|
};
|
||||||
|
}
|
6
modules/nilla/builders/default.nix
Normal file
6
modules/nilla/builders/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
includes = [
|
||||||
|
./nixpkgs-flake.nix
|
||||||
|
./custom-load.nix
|
||||||
|
];
|
||||||
|
}
|
21
modules/nilla/builders/nixpkgs-flake.nix
Normal file
21
modules/nilla/builders/nixpkgs-flake.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
config.builders.nixpkgs-flake = {
|
||||||
|
settings.type = lib.types.submodule {
|
||||||
|
options.args = lib.options.create {
|
||||||
|
type = lib.types.any;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
settings.default = { };
|
||||||
|
build =
|
||||||
|
pkg:
|
||||||
|
lib.attrs.generate pkg.systems (
|
||||||
|
system:
|
||||||
|
config.inputs.nixpkgs.result.legacyPackages.${system}.callPackage pkg.package pkg.settings.args
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
47
modules/nilla/configurations.nix
Normal file
47
modules/nilla/configurations.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{ config, lib }:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
configBuilders = {
|
||||||
|
nixos = lib.options.create {
|
||||||
|
type = lib.types.function lib.types.raw;
|
||||||
|
default.value = _name: config.inputs.nixpkgs.result.lib.nixosSystem;
|
||||||
|
};
|
||||||
|
darwin = lib.options.create {
|
||||||
|
type = lib.types.function lib.types.raw;
|
||||||
|
default.value = _name: config.inputs.darwin.result.lib.darwinSystem;
|
||||||
|
};
|
||||||
|
home = lib.options.create {
|
||||||
|
type = lib.types.function lib.types.raw;
|
||||||
|
default.value = _name: config.inputs.home-manager.result.lib.homeManagerConfiguration;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
configurations = {
|
||||||
|
nixos = lib.options.create {
|
||||||
|
type = lib.types.attrs.lazy lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
darwin = lib.options.create {
|
||||||
|
type = lib.types.attrs.lazy lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
home = lib.options.create {
|
||||||
|
type = lib.types.attrs.lazy lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixosConfigurations = lib.options.create {
|
||||||
|
type = lib.types.attrs.lazy lib.types.raw;
|
||||||
|
default.value = builtins.mapAttrs config.configBuilders.nixos config.configurations.nixos;
|
||||||
|
};
|
||||||
|
darwinConfigurations = lib.options.create {
|
||||||
|
type = lib.types.attrs.lazy lib.types.raw;
|
||||||
|
default.value = builtins.mapAttrs config.configBuilders.darwin config.configurations.darwin;
|
||||||
|
};
|
||||||
|
homeConfigurations = lib.options.create {
|
||||||
|
type = lib.types.attrs.lazy lib.types.raw;
|
||||||
|
default.value = builtins.mapAttrs config.configBuilders.home config.configurations.home;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
8
modules/nilla/default.nix
Normal file
8
modules/nilla/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
includes = [
|
||||||
|
./builders
|
||||||
|
./services.nix
|
||||||
|
./configurations.nix
|
||||||
|
./modules.nix
|
||||||
|
];
|
||||||
|
}
|
17
modules/nilla/modules.nix
Normal file
17
modules/nilla/modules.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ lib }:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
nixosModules = lib.options.create {
|
||||||
|
type = lib.types.attrs.of lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
darwinModules = lib.options.create {
|
||||||
|
type = lib.types.attrs.of lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
homeModules = lib.options.create {
|
||||||
|
type = lib.types.attrs.of lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
95
modules/nilla/services.nix
Normal file
95
modules/nilla/services.nix
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
{ lib, config }:
|
||||||
|
let
|
||||||
|
inherit (builtins)
|
||||||
|
attrNames
|
||||||
|
attrValues
|
||||||
|
concatStringsSep
|
||||||
|
mapAttrs
|
||||||
|
foldl'
|
||||||
|
groupBy
|
||||||
|
length
|
||||||
|
;
|
||||||
|
serviceModule =
|
||||||
|
{ config }:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
host = lib.options.create {
|
||||||
|
type = lib.types.string;
|
||||||
|
};
|
||||||
|
ports = lib.options.create {
|
||||||
|
type = lib.types.list.of lib.types.port;
|
||||||
|
default.value = [ ];
|
||||||
|
};
|
||||||
|
hosts = lib.options.create {
|
||||||
|
type = lib.types.list.of lib.types.string;
|
||||||
|
default.value = [ config.host ];
|
||||||
|
};
|
||||||
|
module = lib.options.create {
|
||||||
|
type = lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
hostModule = lib.options.create {
|
||||||
|
type = lib.types.attrs.of lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
moduleToHostConfigs =
|
||||||
|
cfg:
|
||||||
|
lib.attrs.generate cfg.hosts (host: {
|
||||||
|
imports = [
|
||||||
|
cfg.module
|
||||||
|
(cfg.hostModule.${host} or { })
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
maybeGetPreviousConfigs = acc: host: (acc.${host} or { imports = [ ]; }).imports;
|
||||||
|
|
||||||
|
# Copied from nixpkgs/lib/lists.nix
|
||||||
|
groupBy' =
|
||||||
|
op: nul: pred: lst:
|
||||||
|
mapAttrs (_name: foldl' op nul) (groupBy pred lst);
|
||||||
|
duplicatePorts = lib.fp.pipe [
|
||||||
|
attrValues
|
||||||
|
(map (cfg: cfg.ports))
|
||||||
|
lib.lists.flatten
|
||||||
|
(groupBy' (cnt: _: cnt + 1) 0 toString)
|
||||||
|
(lib.attrs.filter (_: cnt: cnt > 1))
|
||||||
|
attrNames
|
||||||
|
] config.services;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.services = lib.options.create {
|
||||||
|
type = lib.types.attrs.of (lib.types.submodule serviceModule);
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
options.extraHostConfigs = lib.options.create {
|
||||||
|
type = lib.types.attrs.of lib.types.raw;
|
||||||
|
writable = false;
|
||||||
|
default.value = lib.fp.pipe [
|
||||||
|
attrValues
|
||||||
|
(foldl' (
|
||||||
|
acc: cfg:
|
||||||
|
acc
|
||||||
|
// mapAttrs (host: c: {
|
||||||
|
imports = c.imports ++ (maybeGetPreviousConfigs acc host);
|
||||||
|
}) (moduleToHostConfigs cfg)
|
||||||
|
) { })
|
||||||
|
] config.services;
|
||||||
|
};
|
||||||
|
|
||||||
|
config.assertions = [
|
||||||
|
{
|
||||||
|
assertion = duplicatePorts == [ ];
|
||||||
|
message =
|
||||||
|
let
|
||||||
|
plural = length duplicatePorts > 1;
|
||||||
|
in
|
||||||
|
"\nBad service config:\nThe following port${if plural then "s" else ""} ${
|
||||||
|
if plural then "were" else "was"
|
||||||
|
} declared multiple times: ${concatStringsSep ", " duplicatePorts}";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
103
nilla.nix
Normal file
103
nilla.nix
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
{
|
||||||
|
inputs ? import ./inputs.nix,
|
||||||
|
}:
|
||||||
|
(import inputs.nilla).create (
|
||||||
|
{ config, lib }:
|
||||||
|
{
|
||||||
|
includes = [
|
||||||
|
./modules/nilla
|
||||||
|
./pkgs
|
||||||
|
./wrappers
|
||||||
|
./hosts
|
||||||
|
./assets
|
||||||
|
./services
|
||||||
|
./modules
|
||||||
|
];
|
||||||
|
|
||||||
|
config.inputs = builtins.mapAttrs (_: src: {
|
||||||
|
inherit src;
|
||||||
|
loader = "raw";
|
||||||
|
}) inputs;
|
||||||
|
|
||||||
|
config.packages =
|
||||||
|
let
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
mkPackage = package: {
|
||||||
|
builder = "nixpkgs-flake";
|
||||||
|
inherit systems package;
|
||||||
|
};
|
||||||
|
mkPackageFlakeOutput =
|
||||||
|
{
|
||||||
|
input,
|
||||||
|
output ? input,
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
inherit systems;
|
||||||
|
builder = "custom-load";
|
||||||
|
package = { system }: inputs.${input}.packages.${system}.${output};
|
||||||
|
};
|
||||||
|
getPkgs = system: builtins.mapAttrs (_: pkg: pkg.result.${system}) config.packages;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Re-export for convenience and for caching
|
||||||
|
attic-client = mkPackageFlakeOutput {
|
||||||
|
input = "attic";
|
||||||
|
output = "attic-client";
|
||||||
|
};
|
||||||
|
attic-server = mkPackageFlakeOutput {
|
||||||
|
input = "attic";
|
||||||
|
output = "attic-server";
|
||||||
|
};
|
||||||
|
agenix = mkPackageFlakeOutput { input = "agenix"; };
|
||||||
|
base-packages = mkPackage (
|
||||||
|
{ symlinkJoin, system }:
|
||||||
|
symlinkJoin {
|
||||||
|
name = "settei-base";
|
||||||
|
paths = with (getPkgs system); [
|
||||||
|
# TODO: wrappers
|
||||||
|
helix
|
||||||
|
fish
|
||||||
|
git-commit-last
|
||||||
|
git-fixup
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
formatter = {
|
||||||
|
inherit systems;
|
||||||
|
builder = "custom-load";
|
||||||
|
package =
|
||||||
|
{ system }:
|
||||||
|
let
|
||||||
|
eval = inputs.treefmt.lib.evalModule inputs.nixpkgs.legacyPackages.${system} ./treefmt.nix;
|
||||||
|
in
|
||||||
|
eval.config.build.wrapper;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config.shells.default = {
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
builder = "nixpkgs-flake";
|
||||||
|
shell =
|
||||||
|
{
|
||||||
|
mkShellNoCC,
|
||||||
|
system,
|
||||||
|
nh,
|
||||||
|
}:
|
||||||
|
mkShellNoCC {
|
||||||
|
packages = [
|
||||||
|
config.packages.agenix.result.${system}
|
||||||
|
config.packages.attic-client.result.${system}
|
||||||
|
nh
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
|
pkgs,
|
||||||
|
system,
|
||||||
fenix,
|
fenix,
|
||||||
crane,
|
crane,
|
||||||
src,
|
src,
|
||||||
|
@ -11,12 +13,12 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
rust =
|
rust =
|
||||||
with fenix;
|
with fenix.${system};
|
||||||
combine [
|
combine [
|
||||||
stable.cargo
|
stable.cargo
|
||||||
stable.rustc
|
stable.rustc
|
||||||
];
|
];
|
||||||
crane' = crane.overrideToolchain rust;
|
crane' = (crane pkgs).overrideToolchain rust;
|
||||||
rocksdb' = rocksdb.overrideAttrs (
|
rocksdb' = rocksdb.overrideAttrs (
|
||||||
final: prev: {
|
final: prev: {
|
||||||
version = "9.1.1";
|
version = "9.1.1";
|
||||||
|
|
|
@ -1,35 +1,52 @@
|
||||||
{ inputs, ... }:
|
{ config }:
|
||||||
|
let
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
builder = "nixpkgs-flake";
|
||||||
|
mkPackage = package: {
|
||||||
|
inherit systems package builder;
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
{
|
{
|
||||||
perSystem =
|
config.packages.conduit-next = {
|
||||||
{
|
inherit systems builder;
|
||||||
pkgs,
|
package = import ./conduit;
|
||||||
lib,
|
settings.args = {
|
||||||
inputs',
|
src = config.inputs.conduit-src.result;
|
||||||
...
|
crane = config.inputs.crane.result.mkLib;
|
||||||
}:
|
fenix = config.inputs.fenix.result.packages;
|
||||||
{
|
|
||||||
packages.conduit-next = pkgs.callPackage ./conduit {
|
|
||||||
src = inputs.conduit-src;
|
|
||||||
crane = inputs.crane.mkLib pkgs;
|
|
||||||
fenix = inputs'.fenix.packages;
|
|
||||||
};
|
|
||||||
|
|
||||||
packages.git-commit-last = pkgs.writeShellApplication {
|
|
||||||
name = "git-commit-last";
|
|
||||||
text = ''
|
|
||||||
GITDIR="$(git rev-parse --git-dir)"
|
|
||||||
git commit -eF "$GITDIR/COMMIT_EDITMSG"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
packages.git-fixup = pkgs.writeShellApplication {
|
|
||||||
name = "git-fixup";
|
|
||||||
text = ''
|
|
||||||
git log -n 50 --pretty=format:'%h %s' --no-merges | \
|
|
||||||
${lib.getExe pkgs.fzf} | \
|
|
||||||
cut -c -7 | \
|
|
||||||
xargs -o git commit --fixup
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config.packages.git-commit-last = mkPackage (
|
||||||
|
{ writeShellApplication }:
|
||||||
|
writeShellApplication {
|
||||||
|
name = "git-commit-last";
|
||||||
|
text = ''
|
||||||
|
GITDIR="$(git rev-parse --git-dir)"
|
||||||
|
git commit -eF "$GITDIR/COMMIT_EDITMSG"
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
config.packages.git-fixup = mkPackage (
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
writeShellApplication,
|
||||||
|
fzf,
|
||||||
|
}:
|
||||||
|
writeShellApplication {
|
||||||
|
name = "git-fixup";
|
||||||
|
text = ''
|
||||||
|
git log -n 50 --pretty=format:'%h %s' --no-merges | \
|
||||||
|
${lib.getExe fzf} | \
|
||||||
|
cut -c -7 | \
|
||||||
|
xargs -o git commit --fixup
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
services.attic =
|
config.services.attic =
|
||||||
let
|
let
|
||||||
atticPort = 9476;
|
atticPort = 9476;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
host = "kazuki";
|
host = "kazuki";
|
||||||
ports = [ atticPort ];
|
ports = [ atticPort ];
|
||||||
config =
|
module =
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
age.secrets.attic-creds = {
|
age.secrets.attic-creds = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
imports = [
|
includes = [
|
||||||
./attic.nix
|
./attic.nix
|
||||||
./forgejo-runner.nix
|
./forgejo-runner.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
services.forgejo-runner = {
|
config.services.forgejo-runner = {
|
||||||
hosts = [
|
hosts = [
|
||||||
"ude"
|
"ude"
|
||||||
"youko"
|
"youko"
|
||||||
];
|
];
|
||||||
config =
|
module =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
|
1
shell.nix
Normal file
1
shell.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
(import ./nilla.nix { }).shells.default.result.${builtins.currentSystem}
|
19
treefmt.nix
Normal file
19
treefmt.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
projectRootFile = "nilla.nix";
|
||||||
|
programs.deadnix.enable = true;
|
||||||
|
programs.nixfmt.enable = true;
|
||||||
|
programs.statix.enable = true;
|
||||||
|
programs.fish_indent.enable = true;
|
||||||
|
programs.deno.enable = true;
|
||||||
|
programs.stylua.enable = true;
|
||||||
|
programs.shfmt.enable = true;
|
||||||
|
settings.global.excludes = [
|
||||||
|
# agenix
|
||||||
|
"*.age"
|
||||||
|
|
||||||
|
# racket
|
||||||
|
"*.rkt"
|
||||||
|
"**/rashrc"
|
||||||
|
];
|
||||||
|
settings.on-unmatched = "fatal";
|
||||||
|
}
|
|
@ -1,25 +1,32 @@
|
||||||
{ inputs, ... }:
|
{ lib, config }:
|
||||||
|
let
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
wrappedPerSystem = lib.attrs.generate systems (
|
||||||
|
system:
|
||||||
|
config.inputs.wrapper-manager-hm-compat.result.lib {
|
||||||
|
pkgs = config.inputs.nixpkgs.result.legacyPackages.${system};
|
||||||
|
modules = [
|
||||||
|
./starship
|
||||||
|
./helix
|
||||||
|
# TODO: Enable again
|
||||||
|
# ./rash
|
||||||
|
./fish
|
||||||
|
./wezterm
|
||||||
|
];
|
||||||
|
specialArgs.inputs = builtins.mapAttrs (_: input: input.result) config.inputs;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
wrappedPerSystem' = builtins.mapAttrs (_: wrapped: wrapped.config.build.packages) wrappedPerSystem;
|
||||||
|
wrapperNames = builtins.attrNames wrappedPerSystem'."x86_64-linux";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
perSystem =
|
config.packages = lib.attrs.generate wrapperNames (wrapper: {
|
||||||
{ pkgs, inputs', ... }:
|
inherit systems;
|
||||||
let
|
builder = "custom-load";
|
||||||
wrapped = inputs.wrapper-manager-hm-compat.lib {
|
package = { system }: wrappedPerSystem'.${system}.${wrapper};
|
||||||
inherit pkgs;
|
});
|
||||||
modules = [
|
|
||||||
./starship
|
|
||||||
./helix
|
|
||||||
# TODO: Enable again
|
|
||||||
# ./rash
|
|
||||||
./fish
|
|
||||||
./wezterm
|
|
||||||
];
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs inputs';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
all-packages = wrapped.config.build.packages;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
packages = all-packages;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ pkgs, inputs', ... }:
|
{ pkgs, inputs, ... }:
|
||||||
{
|
{
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = inputs'.helix.packages.default;
|
package = inputs.helix.packages.${pkgs.system}.default;
|
||||||
settings = {
|
settings = {
|
||||||
theme = "base16_default_dark";
|
theme = "base16_default_dark";
|
||||||
editor = {
|
editor = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs',
|
inputs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
rev = "8eb52c163d6ea7c3cec2cc6b1011ce00738942e1";
|
rev = "8eb52c163d6ea7c3cec2cc6b1011ce00738942e1";
|
||||||
hash = "sha256-1yU0ZUBQqYEn85j4T2pLs02MTyJnO5BbYALIa88iomY=";
|
hash = "sha256-1yU0ZUBQqYEn85j4T2pLs02MTyJnO5BbYALIa88iomY=";
|
||||||
};
|
};
|
||||||
racket-with-libs = inputs'.racket.packages.racket.newLayer {
|
racket-with-libs = inputs.racket.packages.${pkgs.system}.racket.newLayer {
|
||||||
withRacketPackages =
|
withRacketPackages =
|
||||||
ps: with ps; [
|
ps: with ps; [
|
||||||
readline-gpl
|
readline-gpl
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue