treewide: alejandra -> nixfmt-rfc-style
This commit is contained in:
parent
d64c02e3da
commit
6558fdb739
51 changed files with 1108 additions and 928 deletions
|
@ -1,4 +1,5 @@
|
||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
options.assets = lib.mkOption {
|
options.assets = lib.mkOption {
|
||||||
type = lib.types.unspecified;
|
type = lib.types.unspecified;
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
|
|
77
effects.nix
77
effects.nix
|
@ -4,23 +4,28 @@
|
||||||
withSystem,
|
withSystem,
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
collectFlakeOutputs = {
|
let
|
||||||
config,
|
collectFlakeOutputs =
|
||||||
pkgs,
|
{ config, pkgs }:
|
||||||
}: let
|
let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
collectDrvs = prefix: attrs: let
|
collectDrvs =
|
||||||
|
prefix: attrs:
|
||||||
|
let
|
||||||
drvs = lib.pipe attrs [
|
drvs = lib.pipe attrs [
|
||||||
(lib.filterAttrs (_: lib.isDerivation))
|
(lib.filterAttrs (_: lib.isDerivation))
|
||||||
(lib.mapAttrsToList (name: drv: {
|
(lib.mapAttrsToList (
|
||||||
|
name: drv: {
|
||||||
name = lib.concatStringsSep "." (prefix ++ [ name ]);
|
name = lib.concatStringsSep "." (prefix ++ [ name ]);
|
||||||
inherit drv;
|
inherit drv;
|
||||||
}))
|
}
|
||||||
|
))
|
||||||
];
|
];
|
||||||
recursed = lib.pipe attrs [
|
recursed = lib.pipe attrs [
|
||||||
(lib.filterAttrs (_: val:
|
(lib.filterAttrs (
|
||||||
(!lib.isDerivation val) && (lib.isAttrs val) && (val.recurseForDerivations or true)))
|
_: val: (!lib.isDerivation val) && (lib.isAttrs val) && (val.recurseForDerivations or true)
|
||||||
|
))
|
||||||
(lib.mapAttrsToList (name: collectDrvs (prefix ++ [ name ])))
|
(lib.mapAttrsToList (name: collectDrvs (prefix ++ [ name ])))
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
|
@ -28,7 +33,8 @@
|
||||||
rootOutputs = builtins.removeAttrs config.onPush.default.outputs [ "effects" ];
|
rootOutputs = builtins.removeAttrs config.onPush.default.outputs [ "effects" ];
|
||||||
in
|
in
|
||||||
collectDrvs [ ] rootOutputs;
|
collectDrvs [ ] rootOutputs;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
defaultEffectSystem = "aarch64-linux";
|
defaultEffectSystem = "aarch64-linux";
|
||||||
|
|
||||||
hercules-ci = {
|
hercules-ci = {
|
||||||
|
@ -41,25 +47,20 @@ in {
|
||||||
herculesCI = herculesCI: {
|
herculesCI = herculesCI: {
|
||||||
onPush.default = {
|
onPush.default = {
|
||||||
outputs.effects = {
|
outputs.effects = {
|
||||||
pin-cache = withSystem config.defaultEffectSystem ({
|
pin-cache = withSystem config.defaultEffectSystem (
|
||||||
pkgs,
|
{ pkgs, hci-effects, ... }:
|
||||||
hci-effects,
|
let
|
||||||
...
|
|
||||||
}: let
|
|
||||||
collected = collectFlakeOutputs {
|
collected = collectFlakeOutputs {
|
||||||
inherit (herculesCI) config;
|
inherit (herculesCI) config;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
};
|
};
|
||||||
cachixCommands =
|
cachixCommands =
|
||||||
lib.concatMapStringsSep
|
lib.concatMapStringsSep "\n"
|
||||||
"\n"
|
({ name, drv }: "cachix pin nrabulinski ${lib.escapeShellArg name} ${lib.escapeShellArg drv}")
|
||||||
({
|
|
||||||
name,
|
|
||||||
drv,
|
|
||||||
}: "cachix pin nrabulinski ${lib.escapeShellArg name} ${lib.escapeShellArg drv}")
|
|
||||||
collected;
|
collected;
|
||||||
in
|
in
|
||||||
hci-effects.runIf (herculesCI.config.repo.branch == "main") (hci-effects.mkEffect {
|
hci-effects.runIf (herculesCI.config.repo.branch == "main") (
|
||||||
|
hci-effects.mkEffect {
|
||||||
secretsMap."cachix-token" = "cachix-token";
|
secretsMap."cachix-token" = "cachix-token";
|
||||||
inputs = [ pkgs.cachix ];
|
inputs = [ pkgs.cachix ];
|
||||||
userSetupScript = ''
|
userSetupScript = ''
|
||||||
|
@ -69,17 +70,18 @@ in {
|
||||||
# They have already been built as part of this job,
|
# They have already been built as part of this job,
|
||||||
# we only want to pin them to make sure cachix doesn't GC them.
|
# we only want to pin them to make sure cachix doesn't GC them.
|
||||||
effectScript = builtins.unsafeDiscardStringContext cachixCommands;
|
effectScript = builtins.unsafeDiscardStringContext cachixCommands;
|
||||||
}));
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
perSystem = {
|
perSystem =
|
||||||
pkgs,
|
{ pkgs, lib, ... }:
|
||||||
lib,
|
rec {
|
||||||
...
|
legacyPackages.outputsList =
|
||||||
}: rec {
|
let
|
||||||
legacyPackages.outputsList = let
|
|
||||||
config = self.herculesCI {
|
config = self.herculesCI {
|
||||||
primaryRepo = { };
|
primaryRepo = { };
|
||||||
herculesCI = { };
|
herculesCI = { };
|
||||||
|
@ -87,14 +89,17 @@ in {
|
||||||
in
|
in
|
||||||
collectFlakeOutputs { inherit config pkgs; };
|
collectFlakeOutputs { inherit config pkgs; };
|
||||||
|
|
||||||
legacyPackages.github-matrix = let
|
legacyPackages.github-matrix =
|
||||||
|
let
|
||||||
systems = lib.groupBy ({ drv, ... }: drv.system) legacyPackages.outputsList;
|
systems = lib.groupBy ({ drv, ... }: drv.system) legacyPackages.outputsList;
|
||||||
in
|
in
|
||||||
lib.concatMapStringsSep "\n" ({
|
lib.concatMapStringsSep "\n"
|
||||||
name,
|
(
|
||||||
value,
|
{ name, value }:
|
||||||
}: ''
|
''
|
||||||
${name}=${builtins.toJSON (map (d: d.name) value)}
|
${name}=${builtins.toJSON (map (d: d.name) value)}
|
||||||
'') (lib.attrsToList systems);
|
''
|
||||||
|
)
|
||||||
|
(lib.attrsToList systems);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
14
flake.nix
14
flake.nix
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
outputs = inputs @ {flake-parts, ...}:
|
outputs =
|
||||||
|
inputs@{ flake-parts, ... }:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
|
@ -18,13 +19,15 @@
|
||||||
./pkgs
|
./pkgs
|
||||||
];
|
];
|
||||||
|
|
||||||
perSystem = {
|
perSystem =
|
||||||
|
{
|
||||||
inputs',
|
inputs',
|
||||||
self',
|
self',
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
devShells.default = pkgs.mkShellNoCC {
|
devShells.default = pkgs.mkShellNoCC {
|
||||||
packages = [
|
packages = [
|
||||||
inputs'.agenix.packages.agenix
|
inputs'.agenix.packages.agenix
|
||||||
|
@ -45,7 +48,7 @@
|
||||||
# Re-export it for convenience and for caching
|
# Re-export it for convenience and for caching
|
||||||
packages.attic = inputs'.attic.packages.attic;
|
packages.attic = inputs'.attic.packages.attic;
|
||||||
|
|
||||||
formatter = pkgs.alejandra;
|
formatter = pkgs.nixfmt-rfc-style;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -126,8 +129,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/* TODO: Uncomment once (if ever?) nixConfig makes sense in flakes
|
||||||
TODO: Uncomment once (if ever?) nixConfig makes sense in flakes
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
extra-substituters = [
|
extra-substituters = [
|
||||||
"https://hyprland.cachix.org"
|
"https://hyprland.cachix.org"
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
self,
|
self,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./kazuki
|
./kazuki
|
||||||
./hijiri-vm
|
./hijiri-vm
|
||||||
|
@ -15,15 +16,20 @@
|
||||||
./kogata
|
./kogata
|
||||||
];
|
];
|
||||||
|
|
||||||
builders = let
|
builders =
|
||||||
|
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 = self;};
|
settei.flake-qol.inputs = inputs // {
|
||||||
|
settei = self;
|
||||||
};
|
};
|
||||||
in {
|
};
|
||||||
nixos = name: module:
|
in
|
||||||
|
{
|
||||||
|
nixos =
|
||||||
|
name: module:
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
inputs.agenix.nixosModules.age
|
inputs.agenix.nixosModules.age
|
||||||
|
@ -40,7 +46,8 @@
|
||||||
specialArgs.configurationName = name;
|
specialArgs.configurationName = name;
|
||||||
};
|
};
|
||||||
|
|
||||||
darwin = name: module:
|
darwin =
|
||||||
|
name: module:
|
||||||
inputs.darwin.lib.darwinSystem {
|
inputs.darwin.lib.darwinSystem {
|
||||||
modules = [
|
modules = [
|
||||||
inputs.agenix.darwinModules.age
|
inputs.agenix.darwinModules.age
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{
|
{
|
||||||
configurations.nixos.hijiri-vm = {
|
configurations.nixos.hijiri-vm =
|
||||||
|
{
|
||||||
modulesPath,
|
modulesPath,
|
||||||
lib,
|
lib,
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
"${modulesPath}/profiles/qemu-guest.nix"
|
"${modulesPath}/profiles/qemu-guest.nix"
|
||||||
./disks.nix
|
./disks.nix
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
args: let
|
args:
|
||||||
|
let
|
||||||
bootDevice = args.bootDevice or "/dev/vda";
|
bootDevice = args.bootDevice or "/dev/vda";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
disko.devices.disk.bootDisk = {
|
disko.devices.disk.bootDisk = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = bootDevice;
|
device = bootDevice;
|
||||||
|
@ -27,9 +29,14 @@ in {
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
extraArgs = [ "-f" ];
|
extraArgs = [ "-f" ];
|
||||||
subvolumes = let
|
subvolumes =
|
||||||
mountOptions = ["compress=zstd" "noatime"];
|
let
|
||||||
in {
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
"/root" = {
|
"/root" = {
|
||||||
inherit mountOptions;
|
inherit mountOptions;
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
configurations.darwin.hijiri = {pkgs, ...}: {
|
configurations.darwin.hijiri =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./skhd.nix
|
./skhd.nix
|
||||||
./yabai.nix
|
./yabai.nix
|
||||||
|
|
|
@ -1,13 +1,22 @@
|
||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
services.skhd = {
|
services.skhd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
skhdConfig = let
|
skhdConfig =
|
||||||
|
let
|
||||||
spaceCount = 6;
|
spaceCount = 6;
|
||||||
spaceBindings =
|
spaceBindings =
|
||||||
lib.genList
|
lib.genList
|
||||||
(i: let num = toString (i + 1); in "cmd - ${num} : yabai -m space --focus ${num}")
|
(
|
||||||
|
i:
|
||||||
|
let
|
||||||
|
num = toString (i + 1);
|
||||||
|
in
|
||||||
|
"cmd - ${num} : yabai -m space --focus ${num}"
|
||||||
|
)
|
||||||
spaceCount;
|
spaceCount;
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
cmd - return : wezterm
|
cmd - return : wezterm
|
||||||
cmd + shift - return : qutebrowser
|
cmd + shift - return : qutebrowser
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
services.yabai = {
|
services.yabai = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableScriptingAddition = true;
|
enableScriptingAddition = true;
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
configurations.nixos = let
|
{
|
||||||
mkInstaller = system: ({pkgs, ...}: {
|
configurations.nixos =
|
||||||
nixpkgs = {inherit system;};
|
let
|
||||||
|
mkInstaller =
|
||||||
|
system:
|
||||||
|
(
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
nixpkgs = {
|
||||||
|
inherit system;
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.nixos-install-tools ];
|
environment.systemPackages = [ pkgs.nixos-install-tools ];
|
||||||
|
|
||||||
# Make nixos-anywhere treat this as a installer iso
|
# Make nixos-anywhere treat this as a installer iso
|
||||||
system.nixos.variant_id = "installer";
|
system.nixos.variant_id = "installer";
|
||||||
});
|
}
|
||||||
systems = ["aarch64-linux" "x86_64-linux"];
|
);
|
||||||
|
systems = [
|
||||||
|
"aarch64-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
installers = map (system: lib.nameValuePair "installer-${system}" (mkInstaller system)) systems;
|
installers = map (system: lib.nameValuePair "installer-${system}" (mkInstaller system)) systems;
|
||||||
in
|
in
|
||||||
lib.listToAttrs installers;
|
lib.listToAttrs installers;
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
{
|
{ config, lib, ... }:
|
||||||
config,
|
let
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
atticPort = 9476;
|
atticPort = 9476;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
age.secrets.attic-creds = {
|
age.secrets.attic-creds = {
|
||||||
file = ../../secrets/attic-creds.age;
|
file = ../../secrets/attic-creds.age;
|
||||||
owner = config.services.atticd.user;
|
owner = config.services.atticd.user;
|
||||||
|
@ -58,7 +56,10 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.nginx.extraGroups = [ "acme" ];
|
users.users.nginx.extraGroups = [ "acme" ];
|
||||||
networking.firewall.allowedTCPPorts = [80 443];
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -3,10 +3,12 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs',
|
inputs',
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
formatJson = pkgs.formats.json { };
|
formatJson = pkgs.formats.json { };
|
||||||
serverDomain = "matrix.nrab.lol";
|
serverDomain = "matrix.nrab.lol";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
services.matrix-conduit = {
|
services.matrix-conduit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = inputs'.settei.packages.conduit-next;
|
package = inputs'.settei.packages.conduit-next;
|
||||||
|
@ -24,7 +26,12 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.nginx.extraGroups = [ "acme" ];
|
users.users.nginx.extraGroups = [ "acme" ];
|
||||||
networking.firewall.allowedTCPPorts = [80 443 8448 2222];
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
8448
|
||||||
|
2222
|
||||||
|
];
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -35,9 +42,7 @@ in {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
|
||||||
locations."=/.well-known/matrix/server" = {
|
locations."=/.well-known/matrix/server" = {
|
||||||
alias = formatJson.generate "well-known-matrix-server" {
|
alias = formatJson.generate "well-known-matrix-server" { "m.server" = serverDomain; };
|
||||||
"m.server" = serverDomain;
|
|
||||||
};
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
default_type application/json;
|
default_type application/json;
|
||||||
add_header Access-Control-Allow-Origin "*";
|
add_header Access-Control-Allow-Origin "*";
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{
|
{
|
||||||
configurations.nixos.kazuki = {
|
configurations.nixos.kazuki =
|
||||||
|
{
|
||||||
config,
|
config,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
"${modulesPath}/profiles/qemu-guest.nix"
|
"${modulesPath}/profiles/qemu-guest.nix"
|
||||||
./disks.nix
|
./disks.nix
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
args: let
|
args:
|
||||||
|
let
|
||||||
bootDevice = args.bootDevice or "/dev/sda";
|
bootDevice = args.bootDevice or "/dev/sda";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
disko.devices.disk.bootDisk = {
|
disko.devices.disk.bootDisk = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = bootDevice;
|
device = bootDevice;
|
||||||
|
@ -27,9 +29,14 @@ in {
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
extraArgs = [ "-f" ];
|
extraArgs = [ "-f" ];
|
||||||
subvolumes = let
|
subvolumes =
|
||||||
mountOptions = ["compress=zstd" "noatime"];
|
let
|
||||||
in {
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
"/root" = {
|
"/root" = {
|
||||||
inherit mountOptions;
|
inherit mountOptions;
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
# nix shell nixpkgs#apacheHttpd -c htpasswd -nbB "" "super secret password" | cut -d: -f2
|
# nix shell nixpkgs#apacheHttpd -c htpasswd -nbB "" "super secret password" | cut -d: -f2
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
leet-nrab-lol.file = ../../secrets/leet-nrab-lol-pass.age;
|
leet-nrab-lol.file = ../../secrets/leet-nrab-lol-pass.age;
|
||||||
|
@ -6,7 +7,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.nginx.extraGroups = [ "acme" ];
|
users.users.nginx.extraGroups = [ "acme" ];
|
||||||
networking.firewall.allowedTCPPorts = [80 443 8448 2222];
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
8448
|
||||||
|
2222
|
||||||
|
];
|
||||||
|
|
||||||
mailserver = {
|
mailserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
age.secrets.nrab-lol-cf = {
|
age.secrets.nrab-lol-cf = {
|
||||||
file = ../../secrets/nrab-lol-cf.age;
|
file = ../../secrets/nrab-lol-cf.age;
|
||||||
owner = config.services.nginx.user;
|
owner = config.services.nginx.user;
|
||||||
|
@ -16,7 +17,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.nginx.extraGroups = [ "acme" ];
|
users.users.nginx.extraGroups = [ "acme" ];
|
||||||
networking.firewall.allowedTCPPorts = [80 443];
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
age.secrets.storage-box-webdav = {
|
age.secrets.storage-box-webdav = {
|
||||||
file = ../../secrets/storage-box-webdav.age;
|
file = ../../secrets/storage-box-webdav.age;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
age.secrets.vault-cert-env = {
|
age.secrets.vault-cert-env = {
|
||||||
file = ../../secrets/vault-cert-env.age;
|
file = ../../secrets/vault-cert-env.age;
|
||||||
owner = config.services.nginx.user;
|
owner = config.services.nginx.user;
|
||||||
|
@ -12,7 +13,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.nginx.extraGroups = [ "acme" ];
|
users.users.nginx.extraGroups = [ "acme" ];
|
||||||
networking.firewall.allowedTCPPorts = [80 443 8448 2222];
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
8448
|
||||||
|
2222
|
||||||
|
];
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,16 +1,13 @@
|
||||||
{
|
{
|
||||||
configurations.darwin.kogata = {
|
configurations.darwin.kogata =
|
||||||
pkgs,
|
{ pkgs, lib, ... }:
|
||||||
lib,
|
{
|
||||||
...
|
|
||||||
}: {
|
|
||||||
nixpkgs.system = "aarch64-darwin";
|
nixpkgs.system = "aarch64-darwin";
|
||||||
|
|
||||||
settei.user.config.common.desktop.enable = true;
|
settei.user.config.common.desktop.enable = true;
|
||||||
|
|
||||||
# TODO: Make it a settei module so it's easy to concatenate which pkgs are allowed
|
# TODO: Make it a settei module so it's easy to concatenate which pkgs are allowed
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "teams" ];
|
||||||
builtins.elem (lib.getName pkg) ["teams"];
|
|
||||||
environment.systemPackages = with pkgs; [ teams ];
|
environment.systemPackages = with pkgs; [ teams ];
|
||||||
|
|
||||||
common.hercules.enable = true;
|
common.hercules.enable = true;
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{
|
{
|
||||||
configurations.nixos.legion = {
|
configurations.nixos.legion =
|
||||||
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
# ./disks.nix
|
# ./disks.nix
|
||||||
|
|
|
@ -5,13 +5,17 @@
|
||||||
lib,
|
lib,
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
# Needed for nvidia and steam
|
# Needed for nvidia and steam
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
settei.user.config = {
|
settei.user.config = {
|
||||||
common.desktop.enable = true;
|
common.desktop.enable = true;
|
||||||
home.packages = with pkgs; [brightnessctl dmenu];
|
home.packages = with pkgs; [
|
||||||
|
brightnessctl
|
||||||
|
dmenu
|
||||||
|
];
|
||||||
|
|
||||||
xsession.windowManager.i3 = {
|
xsession.windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -39,7 +43,11 @@
|
||||||
|
|
||||||
services.logind =
|
services.logind =
|
||||||
lib.genAttrs
|
lib.genAttrs
|
||||||
["lidSwitch" "lidSwitchDocked" "lidSwitchExternalPower"]
|
[
|
||||||
|
"lidSwitch"
|
||||||
|
"lidSwitchDocked"
|
||||||
|
"lidSwitchExternalPower"
|
||||||
|
]
|
||||||
(_: "ignore");
|
(_: "ignore");
|
||||||
|
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
|
@ -51,7 +59,10 @@
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
services.dbus.enable = true;
|
services.dbus.enable = true;
|
||||||
|
|
||||||
users.users.${username}.extraGroups = ["video" "input"];
|
users.users.${username}.extraGroups = [
|
||||||
|
"video"
|
||||||
|
"input"
|
||||||
|
];
|
||||||
|
|
||||||
# NVIDIA stuff
|
# NVIDIA stuff
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
args:
|
args:
|
||||||
/*
|
/* let
|
||||||
let
|
|
||||||
bootDevice = args.bootDevice or "/dev/nvme0n1";
|
bootDevice = args.bootDevice or "/dev/nvme0n1";
|
||||||
in
|
in
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,7 +1,19 @@
|
||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "uas"];
|
{
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"uas"
|
||||||
|
];
|
||||||
boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
|
boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
|
||||||
boot.kernelModules = ["kvm-intel" "i2c-dev" "acpi_call"];
|
boot.kernelModules = [
|
||||||
|
"kvm-intel"
|
||||||
|
"i2c-dev"
|
||||||
|
"acpi_call"
|
||||||
|
];
|
||||||
boot.blacklistedKernelModules = [ "nouveau" ];
|
boot.blacklistedKernelModules = [ "nouveau" ];
|
||||||
|
|
||||||
# Needed for enableAllFirmware
|
# Needed for enableAllFirmware
|
||||||
|
@ -21,31 +33,51 @@
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-label/LINUX";
|
device = "/dev/disk/by-label/LINUX";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=root" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=root"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" = {
|
fileSystems."/home" = {
|
||||||
device = "/dev/disk/by-label/LINUX";
|
device = "/dev/disk/by-label/LINUX";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=home" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=home"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" = {
|
fileSystems."/nix" = {
|
||||||
device = "/dev/disk/by-label/LINUX";
|
device = "/dev/disk/by-label/LINUX";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=nix" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=nix"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/persist" = {
|
fileSystems."/persist" = {
|
||||||
device = "/dev/disk/by-label/LINUX";
|
device = "/dev/disk/by-label/LINUX";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=persist" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=persist"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var/log" = {
|
fileSystems."/var/log" = {
|
||||||
device = "/dev/disk/by-label/LINUX";
|
device = "/dev/disk/by-label/LINUX";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=log" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=log"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,7 +86,5 @@
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [ { device = "/dev/disk/by-label/SWAP"; } ];
|
||||||
{device = "/dev/disk/by-label/SWAP";}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,13 +4,15 @@
|
||||||
config,
|
config,
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
mail = "alert@nrab.lol";
|
mail = "alert@nrab.lol";
|
||||||
aliases = pkgs.writeText "mail-aliases" ''
|
aliases = pkgs.writeText "mail-aliases" ''
|
||||||
${username}: nikodem@rabulinski.com
|
${username}: nikodem@rabulinski.com
|
||||||
root: ${mail}
|
root: ${mail}
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
age.secrets.alert-plaintext.file = ../../secrets/alert-plain-pass.age;
|
age.secrets.alert-plaintext.file = ../../secrets/alert-plain-pass.age;
|
||||||
|
|
||||||
programs.msmtp = {
|
programs.msmtp = {
|
||||||
|
|
|
@ -3,12 +3,14 @@
|
||||||
lib,
|
lib,
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
imports = [
|
{
|
||||||
./media.nix
|
imports = [ ./media.nix ];
|
||||||
];
|
|
||||||
|
|
||||||
boot.supportedFilesystems = ["ext4" "zfs"];
|
boot.supportedFilesystems = [
|
||||||
|
"ext4"
|
||||||
|
"zfs"
|
||||||
|
];
|
||||||
|
|
||||||
boot.zfs.extraPools = [ "yottapool" ];
|
boot.zfs.extraPools = [ "yottapool" ];
|
||||||
services.zfs = {
|
services.zfs = {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{username, ...}: {
|
{ username, ... }:
|
||||||
|
{
|
||||||
services.jellyfin.enable = true;
|
services.jellyfin.enable = true;
|
||||||
services.radarr.enable = true;
|
services.radarr.enable = true;
|
||||||
services.sonarr.enable = true;
|
services.sonarr.enable = true;
|
||||||
|
@ -10,7 +11,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users = {
|
users.users = {
|
||||||
jellyfin.extraGroups = ["radarr" "sonarr"];
|
jellyfin.extraGroups = [
|
||||||
|
"radarr"
|
||||||
|
"sonarr"
|
||||||
|
];
|
||||||
radarr.extraGroups = [ "deluge" ];
|
radarr.extraGroups = [ "deluge" ];
|
||||||
sonarr.extraGroups = [ "deluge" ];
|
sonarr.extraGroups = [ "deluge" ];
|
||||||
${username}.extraGroups = [ "deluge" ];
|
${username}.extraGroups = [ "deluge" ];
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{
|
{
|
||||||
configurations.nixos.ude = {
|
configurations.nixos.ude =
|
||||||
|
{
|
||||||
config,
|
config,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
"${modulesPath}/profiles/qemu-guest.nix"
|
"${modulesPath}/profiles/qemu-guest.nix"
|
||||||
./disks.nix
|
./disks.nix
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
args: let
|
args:
|
||||||
|
let
|
||||||
bootDevice = args.bootDevice or "/dev/sda";
|
bootDevice = args.bootDevice or "/dev/sda";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
vdb = {
|
vdb = {
|
||||||
|
@ -25,9 +27,14 @@ in {
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
extraArgs = [ "-f" ];
|
extraArgs = [ "-f" ];
|
||||||
subvolumes = let
|
subvolumes =
|
||||||
mountOptions = ["compress=zstd" "noatime"];
|
let
|
||||||
in {
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
"/root" = {
|
"/root" = {
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
inherit mountOptions;
|
inherit mountOptions;
|
||||||
|
|
|
@ -2,13 +2,15 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
darwin,
|
darwin,
|
||||||
home-manager,
|
home-manager,
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
flake-parts-lib,
|
flake-parts-lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; {
|
with lib;
|
||||||
|
{
|
||||||
_file = ./configurations.nix;
|
_file = ./configurations.nix;
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
@ -46,17 +48,8 @@ with lib; {
|
||||||
};
|
};
|
||||||
|
|
||||||
config.flake = {
|
config.flake = {
|
||||||
nixosConfigurations =
|
nixosConfigurations = mapAttrs config.builders.nixos config.configurations.nixos;
|
||||||
mapAttrs
|
darwinConfigurations = mapAttrs config.builders.darwin config.configurations.darwin;
|
||||||
config.builders.nixos
|
homeConfigurations = mapAttrs config.builders.home config.configurations.home;
|
||||||
config.configurations.nixos;
|
|
||||||
darwinConfigurations =
|
|
||||||
mapAttrs
|
|
||||||
config.builders.darwin
|
|
||||||
config.configurations.darwin;
|
|
||||||
homeConfigurations =
|
|
||||||
mapAttrs
|
|
||||||
config.builders.home
|
|
||||||
config.configurations.home;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,17 @@
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (flake-parts-lib) importApply;
|
inherit (flake-parts-lib) importApply;
|
||||||
flakeModules = {
|
flakeModules = {
|
||||||
configurations = importApply ./configurations.nix { inherit (inputs) nixpkgs darwin home-manager; };
|
configurations = importApply ./configurations.nix { inherit (inputs) nixpkgs darwin home-manager; };
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = lib.attrValues flakeModules;
|
imports = lib.attrValues flakeModules;
|
||||||
|
|
||||||
flake = {inherit flakeModules;};
|
flake = {
|
||||||
|
inherit flakeModules;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,13 +6,15 @@
|
||||||
inputs',
|
inputs',
|
||||||
machineName,
|
machineName,
|
||||||
...
|
...
|
||||||
} @ args: let
|
}@args:
|
||||||
|
let
|
||||||
# TODO: Conditionally define based on whether we're in a system configuration or not
|
# TODO: Conditionally define based on whether we're in a system configuration or not
|
||||||
fishOverlayModule = lib.mkIf (!args ? osConfig) {
|
fishOverlayModule = lib.mkIf (!args ? osConfig) {
|
||||||
# See modules/system/common/default.nix for reasoning.
|
# See modules/system/common/default.nix for reasoning.
|
||||||
nixpkgs.overlays = [ (_: _: { inherit (inputs'.settei.packages) fish; }) ];
|
nixpkgs.overlays = [ (_: _: { inherit (inputs'.settei.packages) fish; }) ];
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
_file = ./default.nix;
|
_file = ./default.nix;
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -49,7 +51,10 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = [inputs'.settei.packages.base-packages pkgs.nh];
|
home.packages = [
|
||||||
|
inputs'.settei.packages.base-packages
|
||||||
|
pkgs.nh
|
||||||
|
];
|
||||||
|
|
||||||
home.sessionVariables.EDITOR = "hx";
|
home.sessionVariables.EDITOR = "hx";
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
inputs,
|
inputs,
|
||||||
inputs',
|
inputs',
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
_file = ./default.nix;
|
_file = ./default.nix;
|
||||||
|
|
||||||
options.common.desktop = {
|
options.common.desktop = {
|
||||||
|
@ -23,7 +24,8 @@
|
||||||
|
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = let
|
package =
|
||||||
|
let
|
||||||
firefox-pkgs = pkgs.extend inputs.firefox-darwin.overlay;
|
firefox-pkgs = pkgs.extend inputs.firefox-darwin.overlay;
|
||||||
in
|
in
|
||||||
lib.mkIf pkgs.stdenv.isDarwin firefox-pkgs.firefox-bin;
|
lib.mkIf pkgs.stdenv.isDarwin firefox-pkgs.firefox-bin;
|
||||||
|
@ -32,9 +34,7 @@
|
||||||
programs.qutebrowser = {
|
programs.qutebrowser = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package =
|
package =
|
||||||
if pkgs.stdenv.isDarwin
|
if pkgs.stdenv.isDarwin then inputs'.niko-nur.packages.qutebrowser-bin else pkgs.qutebrowser;
|
||||||
then inputs'.niko-nur.packages.qutebrowser-bin
|
|
||||||
else pkgs.qutebrowser;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zellij = {
|
programs.zellij = {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{isLinux}: {
|
{ isLinux }:
|
||||||
|
{
|
||||||
config,
|
config,
|
||||||
configurationName,
|
configurationName,
|
||||||
lib,
|
lib,
|
||||||
|
@ -7,7 +8,8 @@
|
||||||
inputs',
|
inputs',
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
sharedConfig = {
|
sharedConfig = {
|
||||||
settei = {
|
settei = {
|
||||||
username = lib.mkDefault "niko";
|
username = lib.mkDefault "niko";
|
||||||
|
@ -55,7 +57,8 @@
|
||||||
# Every macOS ARM machine can emulate x86.
|
# Every macOS ARM machine can emulate x86.
|
||||||
nix.settings.extra-platforms = lib.mkIf pkgs.stdenv.isAarch64 [ "x86_64-darwin" ];
|
nix.settings.extra-platforms = lib.mkIf pkgs.stdenv.isAarch64 [ "x86_64-darwin" ];
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
_file = ./default.nix;
|
_file = ./default.nix;
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{isLinux}: {
|
{ isLinux }:
|
||||||
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (lib) mkOption types;
|
inherit (lib) mkOption types;
|
||||||
github-runner-user = "github-runner";
|
github-runner-user = "github-runner";
|
||||||
|
|
||||||
|
@ -20,10 +22,10 @@
|
||||||
services.github-runners = lib.pipe cfg.runners [
|
services.github-runners = lib.pipe cfg.runners [
|
||||||
(lib.mapAttrsToList (
|
(lib.mapAttrsToList (
|
||||||
name: cfg:
|
name: cfg:
|
||||||
lib.genList (i:
|
lib.genList
|
||||||
lib.nameValuePair
|
(
|
||||||
"${name}-${toString i}"
|
i:
|
||||||
{
|
lib.nameValuePair "${name}-${toString i}" {
|
||||||
enable = true;
|
enable = true;
|
||||||
tokenFile = config.age.secrets.github-token.path;
|
tokenFile = config.age.secrets.github-token.path;
|
||||||
inherit (cfg) url;
|
inherit (cfg) url;
|
||||||
|
@ -33,7 +35,8 @@
|
||||||
DynamicUser = false;
|
DynamicUser = false;
|
||||||
};
|
};
|
||||||
extraLabels = [ "nix" ];
|
extraLabels = [ "nix" ];
|
||||||
})
|
}
|
||||||
|
)
|
||||||
cfg.instances
|
cfg.instances
|
||||||
))
|
))
|
||||||
lib.flatten
|
lib.flatten
|
||||||
|
@ -52,34 +55,41 @@
|
||||||
darwinConfig = lib.optionalAttrs (!isLinux) {
|
darwinConfig = lib.optionalAttrs (!isLinux) {
|
||||||
warnings = lib.singleton "common.github-runner doesn't do anything on darwin yet";
|
warnings = lib.singleton "common.github-runner doesn't do anything on darwin yet";
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
_file = ./github-runner.nix;
|
_file = ./github-runner.nix;
|
||||||
|
|
||||||
options.common.github-runner = {
|
options.common.github-runner = {
|
||||||
enable = lib.mkEnableOption "using this machine as a self-hosted github runner";
|
enable = lib.mkEnableOption "using this machine as a self-hosted github runner";
|
||||||
runners = mkOption {
|
runners = mkOption {
|
||||||
type = with types;
|
type =
|
||||||
attrsOf (submodule ({name, ...}: {
|
with types;
|
||||||
|
attrsOf (
|
||||||
|
submodule (
|
||||||
|
{ name, ... }:
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "${name}-${config.networking.hostName}";
|
default = "${name}-${config.networking.hostName}";
|
||||||
};
|
};
|
||||||
url = mkOption {
|
url = mkOption { type = types.str; };
|
||||||
type = types.str;
|
|
||||||
};
|
|
||||||
instances = mkOption {
|
instances = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 1;
|
default = 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}));
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
config = lib.mkIf cfg.enable (
|
||||||
|
lib.mkMerge [
|
||||||
sharedConfig
|
sharedConfig
|
||||||
linuxConfig
|
linuxConfig
|
||||||
darwinConfig
|
darwinConfig
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,29 @@
|
||||||
{isLinux}: {
|
{ isLinux }:
|
||||||
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
options = {
|
options = {
|
||||||
common.hercules.enable = lib.mkEnableOption "Enables hercules-ci-agent with my configuration";
|
common.hercules.enable = lib.mkEnableOption "Enables hercules-ci-agent with my configuration";
|
||||||
};
|
};
|
||||||
|
|
||||||
herculesUser =
|
herculesUser =
|
||||||
if isLinux
|
if isLinux then
|
||||||
then config.systemd.services.hercules-ci-agent.serviceConfig.User
|
config.systemd.services.hercules-ci-agent.serviceConfig.User
|
||||||
else config.launchd.daemons.hercules-ci-agent.serviceConfig.UserName;
|
else
|
||||||
in {
|
config.launchd.daemons.hercules-ci-agent.serviceConfig.UserName;
|
||||||
|
in
|
||||||
|
{
|
||||||
_file = ./hercules.nix;
|
_file = ./hercules.nix;
|
||||||
|
|
||||||
inherit options;
|
inherit options;
|
||||||
|
|
||||||
config =
|
config =
|
||||||
lib.mkIf false
|
lib.mkIf false
|
||||||
/*
|
# config.common.hercules.enable
|
||||||
config.common.hercules.enable
|
|
||||||
*/
|
|
||||||
{
|
{
|
||||||
age.secrets.hercules-token = {
|
age.secrets.hercules-token = {
|
||||||
file = ../../../secrets/hercules-token.age;
|
file = ../../../secrets/hercules-token.age;
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
{isLinux}: {
|
{ isLinux }:
|
||||||
config,
|
{ config, lib, ... }:
|
||||||
lib,
|
let
|
||||||
...
|
|
||||||
}: let
|
|
||||||
sharedConfig = {
|
sharedConfig = {
|
||||||
settei.programs.podman.enable = true;
|
settei.programs.podman.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
linuxConfig = lib.optionalAttrs isLinux {
|
linuxConfig = lib.optionalAttrs isLinux { boot.kernel.sysctl."kernel.yama.ptrace_scope" = 0; };
|
||||||
boot.kernel.sysctl."kernel.yama.ptrace_scope" = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
darwinConfig = lib.optionalAttrs (!isLinux) { };
|
darwinConfig = lib.optionalAttrs (!isLinux) { };
|
||||||
|
|
||||||
|
@ -18,7 +14,8 @@
|
||||||
linuxConfig
|
linuxConfig
|
||||||
darwinConfig
|
darwinConfig
|
||||||
];
|
];
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
_file = ./user.nix;
|
_file = ./user.nix;
|
||||||
|
|
||||||
config = lib.mkIf config.settei.user.enable finalConfig;
|
config = lib.mkIf config.settei.user.enable finalConfig;
|
||||||
|
|
|
@ -1,17 +1,22 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
config,
|
flake =
|
||||||
lib,
|
lib.genAttrs
|
||||||
...
|
[
|
||||||
}: {
|
"nixosModules"
|
||||||
flake = lib.genAttrs ["nixosModules" "darwinModules"] (attr: let
|
"darwinModules"
|
||||||
|
]
|
||||||
|
(
|
||||||
|
attr:
|
||||||
|
let
|
||||||
isLinux = lib.hasPrefix "nixos" attr;
|
isLinux = lib.hasPrefix "nixos" attr;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
settei = import ./settei {
|
settei = import ./settei {
|
||||||
inherit (config) perInput;
|
inherit (config) perInput;
|
||||||
inherit isLinux;
|
inherit isLinux;
|
||||||
};
|
};
|
||||||
common = import ./common {
|
common = import ./common { inherit isLinux; };
|
||||||
inherit isLinux;
|
}
|
||||||
};
|
);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,15 @@
|
||||||
perInput,
|
perInput,
|
||||||
# TODO: Figure out a nicer way of doing this without infrec?
|
# TODO: Figure out a nicer way of doing this without infrec?
|
||||||
isLinux,
|
isLinux,
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
options,
|
options,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
_file = ./default.nix;
|
_file = ./default.nix;
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -19,8 +21,6 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
options.settei = with lib; {
|
options.settei = with lib; {
|
||||||
username = mkOption {
|
username = mkOption { type = types.str; };
|
||||||
type = types.str;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
{perInput}: {
|
{ perInput }:
|
||||||
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
cfg = config.settei.flake-qol;
|
cfg = config.settei.flake-qol;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
_file = ./flake-qol.nix;
|
_file = ./flake-qol.nix;
|
||||||
|
|
||||||
options.settei.flake-qol = with lib; {
|
options.settei.flake-qol = with lib; {
|
||||||
|
@ -14,9 +17,7 @@ in {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
inputs = mkOption {
|
inputs = mkOption { type = types.unspecified; };
|
||||||
type = types.unspecified;
|
|
||||||
};
|
|
||||||
inputs-flakes = mkOption {
|
inputs-flakes = mkOption {
|
||||||
type = types.attrs;
|
type = types.attrs;
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
|
@ -27,10 +28,9 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let
|
config =
|
||||||
reexportedArgs = lib.mkIf cfg.reexportAsArgs {
|
let
|
||||||
inherit (cfg) inputs inputs-flakes inputs';
|
reexportedArgs = lib.mkIf cfg.reexportAsArgs { inherit (cfg) inputs inputs-flakes inputs'; };
|
||||||
};
|
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.enable {
|
lib.mkIf cfg.enable {
|
||||||
settei.flake-qol = {
|
settei.flake-qol = {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{isLinux}: {
|
{ isLinux }:
|
||||||
|
{
|
||||||
_file = ./default.nix;
|
_file = ./default.nix;
|
||||||
|
|
||||||
imports = [
|
imports = [ (import ./podman.nix { inherit isLinux; }) ];
|
||||||
(import ./podman.nix {inherit isLinux;})
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{isLinux}: {
|
{ isLinux }:
|
||||||
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
sharedConfig = {
|
sharedConfig = {
|
||||||
environment.systemPackages = [ pkgs.podman-compose ];
|
environment.systemPackages = [ pkgs.podman-compose ];
|
||||||
};
|
};
|
||||||
|
@ -16,16 +18,15 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
darwinConfig = lib.optionalAttrs (!isLinux) {
|
darwinConfig = lib.optionalAttrs (!isLinux) { environment.systemPackages = [ pkgs.podman ]; };
|
||||||
environment.systemPackages = [pkgs.podman];
|
|
||||||
};
|
|
||||||
|
|
||||||
finalConfig = lib.mkMerge [
|
finalConfig = lib.mkMerge [
|
||||||
sharedConfig
|
sharedConfig
|
||||||
linuxConfig
|
linuxConfig
|
||||||
darwinConfig
|
darwinConfig
|
||||||
];
|
];
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
_file = ./podman.nix;
|
_file = ./podman.nix;
|
||||||
|
|
||||||
options.settei.programs.podman.enable = lib.mkEnableOption "Podman";
|
options.settei.programs.podman.enable = lib.mkEnableOption "Podman";
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
{isLinux}: {
|
{ isLinux }:
|
||||||
config,
|
{ config, lib, ... }@args:
|
||||||
lib,
|
let
|
||||||
...
|
|
||||||
} @ args: let
|
|
||||||
cfg = config.settei.sane-defaults;
|
cfg = config.settei.sane-defaults;
|
||||||
inherit (config.settei) username;
|
inherit (config.settei) username;
|
||||||
|
|
||||||
|
@ -20,9 +18,11 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sharedConfig = let
|
sharedConfig =
|
||||||
|
let
|
||||||
adminNeedsPassword = isLinux -> config.security.sudo.wheelNeedsPassword;
|
adminNeedsPassword = isLinux -> config.security.sudo.wheelNeedsPassword;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
_module.args = {
|
_module.args = {
|
||||||
username = lib.mkDefault username;
|
username = lib.mkDefault username;
|
||||||
};
|
};
|
||||||
|
@ -39,17 +39,24 @@
|
||||||
settei.user.config.programs.git.enable = lib.mkDefault true;
|
settei.user.config.programs.git.enable = lib.mkDefault true;
|
||||||
|
|
||||||
# FIXME: Move to common
|
# FIXME: Move to common
|
||||||
users.users.${username}.openssh.authorizedKeys.keys = let
|
users.users.${username}.openssh.authorizedKeys.keys =
|
||||||
|
let
|
||||||
configName' =
|
configName' =
|
||||||
args.configurationName
|
args.configurationName
|
||||||
or (throw "pass configurationName to module arguments or set users.users.${username}.openssh.authorizedKeys yourself");
|
or (throw "pass configurationName to module arguments or set users.users.${username}.openssh.authorizedKeys yourself"
|
||||||
|
);
|
||||||
filteredKeys = lib.filterAttrs (name: _: name != configName') cfg.allSshKeys;
|
filteredKeys = lib.filterAttrs (name: _: name != configName') cfg.allSshKeys;
|
||||||
in
|
in
|
||||||
lib.mkDefault (lib.attrValues filteredKeys);
|
lib.mkDefault (lib.attrValues filteredKeys);
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = ["nix-command" "flakes" "repl-flake" "auto-allocate-uids"];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
"repl-flake"
|
||||||
|
"auto-allocate-uids"
|
||||||
|
];
|
||||||
trusted-users = lib.optionals (!adminNeedsPassword) [ username ];
|
trusted-users = lib.optionals (!adminNeedsPassword) [ username ];
|
||||||
auto-allocate-uids = true;
|
auto-allocate-uids = true;
|
||||||
extra-substituters = [
|
extra-substituters = [
|
||||||
|
@ -72,9 +79,11 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
linuxConfig = lib.optionalAttrs isLinux (let
|
linuxConfig = lib.optionalAttrs isLinux (
|
||||||
|
let
|
||||||
nmEnabled = config.networking.networkmanager.enable;
|
nmEnabled = config.networking.networkmanager.enable;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
@ -108,10 +117,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# NetworkManager probably means desktop system so we don't want to slow down boot times
|
# NetworkManager probably means desktop system so we don't want to slow down boot times
|
||||||
systemd.services = lib.mkIf nmEnabled {
|
systemd.services = lib.mkIf nmEnabled { NetworkManager-wait-online.enable = false; };
|
||||||
NetworkManager-wait-online.enable = false;
|
}
|
||||||
};
|
);
|
||||||
});
|
|
||||||
|
|
||||||
darwinConfig = lib.optionalAttrs (!isLinux) {
|
darwinConfig = lib.optionalAttrs (!isLinux) {
|
||||||
services.nix-daemon.enable = true;
|
services.nix-daemon.enable = true;
|
||||||
|
@ -120,14 +128,17 @@
|
||||||
|
|
||||||
users.users.${username}.home = "/Users/${username}";
|
users.users.${username}.home = "/Users/${username}";
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
_file = ./sane-defaults.nix;
|
_file = ./sane-defaults.nix;
|
||||||
|
|
||||||
inherit options;
|
inherit options;
|
||||||
|
|
||||||
config = lib.mkIf config.settei.sane-defaults.enable (lib.mkMerge [
|
config = lib.mkIf config.settei.sane-defaults.enable (
|
||||||
|
lib.mkMerge [
|
||||||
sharedConfig
|
sharedConfig
|
||||||
linuxConfig
|
linuxConfig
|
||||||
darwinConfig
|
darwinConfig
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,13 @@
|
||||||
options,
|
options,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
} @ args: let
|
}@args:
|
||||||
|
let
|
||||||
hasHomeManager = options ? home-manager;
|
hasHomeManager = options ? home-manager;
|
||||||
cfg = config.settei.user;
|
cfg = config.settei.user;
|
||||||
inherit (config.settei) username;
|
inherit (config.settei) username;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
_file = ./user.nix;
|
_file = ./user.nix;
|
||||||
|
|
||||||
options.settei.user = with lib; {
|
options.settei.user = with lib; {
|
||||||
|
@ -22,15 +24,14 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let
|
config =
|
||||||
|
let
|
||||||
hmConfig = lib.optionalAttrs hasHomeManager {
|
hmConfig = lib.optionalAttrs hasHomeManager {
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.extraSpecialArgs =
|
home-manager.extraSpecialArgs = {
|
||||||
{
|
|
||||||
inherit (args) inputs inputs';
|
inherit (args) inputs inputs';
|
||||||
}
|
} // cfg.extraArgs;
|
||||||
// cfg.extraArgs;
|
|
||||||
|
|
||||||
home-manager.users.${username} = {
|
home-manager.users.${username} = {
|
||||||
_file = ./user.nix;
|
_file = ./user.nix;
|
||||||
|
@ -47,7 +48,8 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.enable (lib.mkMerge [
|
lib.mkIf cfg.enable (
|
||||||
|
lib.mkMerge [
|
||||||
{
|
{
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
|
@ -57,5 +59,6 @@ in {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
hmConfig
|
hmConfig
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,10 @@
|
||||||
rocksdb,
|
rocksdb,
|
||||||
darwin,
|
darwin,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
}: let
|
}:
|
||||||
rust = with fenix;
|
let
|
||||||
|
rust =
|
||||||
|
with fenix;
|
||||||
combine [
|
combine [
|
||||||
stable.cargo
|
stable.cargo
|
||||||
stable.rustc
|
stable.rustc
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
{inputs, ...}: {
|
{ inputs, ... }:
|
||||||
perSystem = {
|
{
|
||||||
|
perSystem =
|
||||||
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
system,
|
system,
|
||||||
inputs',
|
inputs',
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
packages.conduit-next = pkgs.callPackage ./conduit {
|
packages.conduit-next = pkgs.callPackage ./conduit {
|
||||||
src = inputs.conduit-src;
|
src = inputs.conduit-src;
|
||||||
crane = inputs.crane.lib.${system};
|
crane = inputs.crane.lib.${system};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
let
|
let
|
||||||
keys = import ../assets/ssh.nix;
|
keys = import ../assets/ssh.nix;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
"leet-nrab-lol-pass.age".publicKeys = [
|
"leet-nrab-lol-pass.age".publicKeys = [
|
||||||
keys.system.kazuki
|
keys.system.kazuki
|
||||||
keys.other.bootstrap
|
keys.other.bootstrap
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
{inputs, ...}: {
|
{ inputs, ... }:
|
||||||
perSystem = {
|
{
|
||||||
pkgs,
|
perSystem =
|
||||||
inputs',
|
{ pkgs, inputs', ... }:
|
||||||
...
|
let
|
||||||
}: let
|
|
||||||
wrapped = inputs.wrapper-manager-hm-compat.lib {
|
wrapped = inputs.wrapper-manager-hm-compat.lib {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = [
|
modules = [
|
||||||
|
@ -19,8 +18,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
all-packages = wrapped.config.build.packages;
|
all-packages = wrapped.config.build.packages;
|
||||||
in {
|
in
|
||||||
packages =
|
{
|
||||||
all-packages;
|
packages = all-packages;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
wrappers.fish = {
|
wrappers.fish = {
|
||||||
basePackage = pkgs.fish;
|
basePackage = pkgs.fish;
|
||||||
wrapByDefault = false;
|
wrapByDefault = false;
|
||||||
|
|
||||||
programs.fish = {config, ...}: {
|
programs.fish =
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
extraWrapperFlags = "--inherit-argv0";
|
extraWrapperFlags = "--inherit-argv0";
|
||||||
|
|
||||||
prependFlags = let
|
prependFlags =
|
||||||
|
let
|
||||||
# Can't rely on pathAdd because fish used as login shell will ignore the variables the wrapper sets up
|
# Can't rely on pathAdd because fish used as login shell will ignore the variables the wrapper sets up
|
||||||
path-add-lines =
|
path-add-lines =
|
||||||
lib.concatMapStringsSep "\n"
|
lib.concatMapStringsSep "\n" (pkg: "fish_add_path --path --prepend '${lib.getExe' pkg ""}'")
|
||||||
(pkg: "fish_add_path --path --prepend '${lib.getExe' pkg ""}'")
|
|
||||||
config.pathAdd;
|
config.pathAdd;
|
||||||
config-fish = pkgs.writeText "config.fish" ''
|
config-fish = pkgs.writeText "config.fish" ''
|
||||||
${path-add-lines}
|
${path-add-lines}
|
||||||
|
@ -22,12 +21,20 @@
|
||||||
source ${./prompt.fish}
|
source ${./prompt.fish}
|
||||||
source ${./config.fish}
|
source ${./config.fish}
|
||||||
'';
|
'';
|
||||||
in [
|
in
|
||||||
|
[
|
||||||
"-C"
|
"-C"
|
||||||
"source ${config-fish}"
|
"source ${config-fish}"
|
||||||
];
|
];
|
||||||
|
|
||||||
pathAdd = with pkgs; [eza bat fzf ripgrep zoxide direnv];
|
pathAdd = with pkgs; [
|
||||||
|
eza
|
||||||
|
bat
|
||||||
|
fzf
|
||||||
|
ripgrep
|
||||||
|
zoxide
|
||||||
|
direnv
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -3,8 +3,10 @@
|
||||||
inputs',
|
inputs',
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
wrappers.rash = let
|
{
|
||||||
|
wrappers.rash =
|
||||||
|
let
|
||||||
readlinePatched = pkgs.fetchFromGitHub {
|
readlinePatched = pkgs.fetchFromGitHub {
|
||||||
owner = "nrabulinski";
|
owner = "nrabulinski";
|
||||||
repo = "readline";
|
repo = "readline";
|
||||||
|
@ -12,12 +14,10 @@
|
||||||
hash = "sha256-1yU0ZUBQqYEn85j4T2pLs02MTyJnO5BbYALIa88iomY=";
|
hash = "sha256-1yU0ZUBQqYEn85j4T2pLs02MTyJnO5BbYALIa88iomY=";
|
||||||
};
|
};
|
||||||
racket-with-libs = inputs'.racket.packages.racket.newLayer {
|
racket-with-libs = inputs'.racket.packages.racket.newLayer {
|
||||||
withRacketPackages = ps:
|
withRacketPackages =
|
||||||
with ps; [
|
ps: with ps; [
|
||||||
readline-gpl
|
readline-gpl
|
||||||
(readline-lib.override {
|
(readline-lib.override { src = "${readlinePatched}/readline-lib"; })
|
||||||
src = "${readlinePatched}/readline-lib";
|
|
||||||
})
|
|
||||||
rash
|
rash
|
||||||
threading
|
threading
|
||||||
functional
|
functional
|
||||||
|
@ -39,7 +39,8 @@
|
||||||
];
|
];
|
||||||
buildInputs = with pkgs; [ readline ];
|
buildInputs = with pkgs; [ readline ];
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
basePackage = pkgs.writeShellScriptBin "rash-repl" ''
|
basePackage = pkgs.writeShellScriptBin "rash-repl" ''
|
||||||
exec "${racket-with-libs}/bin/rash-repl" "$@"
|
exec "${racket-with-libs}/bin/rash-repl" "$@"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
wrappers.wezterm = {
|
wrappers.wezterm = {
|
||||||
basePackage = pkgs.wezterm;
|
basePackage = pkgs.wezterm;
|
||||||
env.WEZTERM_CONFIG_FILE.value = ./config.lua;
|
env.WEZTERM_CONFIG_FILE.value = ./config.lua;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue