Formatting + update
This commit is contained in:
parent
93de64c64e
commit
9c895e9cc0
61 changed files with 2350 additions and 2100 deletions
|
|
@ -10,27 +10,28 @@
|
|||
inputs,
|
||||
unstable-pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
programs.firefox.policies.Preferences."browser.startup.page" = lib.mkForce 1;
|
||||
|
||||
imports = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.nixos-facter-modules.nixosModules.facter
|
||||
inputs.home-manager.nixosModules.default
|
||||
inputs.disko.nixosModules.default
|
||||
imports =
|
||||
[
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.nixos-facter-modules.nixosModules.facter
|
||||
inputs.home-manager.nixosModules.default
|
||||
inputs.disko.nixosModules.default
|
||||
|
||||
../../modules/firefox
|
||||
#../../modules/flatpak
|
||||
../../modules/steam
|
||||
../../modules/ly
|
||||
../../modules/sddm
|
||||
../../modules/services/autoupgrade
|
||||
../../modules/sops
|
||||
#../../modules/emacs
|
||||
./default.nix
|
||||
] ++ lib.optional (hwconfig.useImpermanence) ./modules/impermanence;
|
||||
../../modules/firefox
|
||||
#../../modules/flatpak
|
||||
../../modules/steam
|
||||
../../modules/ly
|
||||
../../modules/sddm
|
||||
../../modules/services/autoupgrade
|
||||
../../modules/sops
|
||||
#../../modules/emacs
|
||||
./default.nix
|
||||
]
|
||||
++ lib.optional (hwconfig.useImpermanence) ./modules/impermanence;
|
||||
facter.reportPath = ./facter.json;
|
||||
kylekrein.services.autoUpgrade = {
|
||||
enable = true;
|
||||
|
|
@ -39,7 +40,6 @@
|
|||
user = "root";
|
||||
};
|
||||
|
||||
|
||||
boot = {
|
||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_6_14;
|
||||
loader = {
|
||||
|
|
@ -62,11 +62,10 @@
|
|||
#flatpak
|
||||
kk.services.flatpak.enable = true;
|
||||
services.flatpak.packages = [
|
||||
|
||||
];
|
||||
|
||||
services.pipewire = {
|
||||
extraLv2Packages = [ pkgs.rnnoise-plugin ];
|
||||
extraLv2Packages = [pkgs.rnnoise-plugin];
|
||||
configPackages = [
|
||||
(pkgs.writeTextDir "share/pipewire/pipewire.conf.d/20-rnnoise.conf" ''
|
||||
context.modules = [
|
||||
|
|
@ -190,7 +189,8 @@
|
|||
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
flake = "/etc/nixos-config";
|
||||
};
|
||||
fonts.packages = with unstable-pkgs; [ #TODO change to pkgs when 25.05 comes out
|
||||
fonts.packages = with unstable-pkgs; [
|
||||
#TODO change to pkgs when 25.05 comes out
|
||||
nerd-fonts.jetbrains-mono
|
||||
font-awesome
|
||||
nerd-fonts.symbols-only
|
||||
|
|
@ -209,7 +209,7 @@
|
|||
enable = true;
|
||||
};
|
||||
logitech.wireless.enable = true;
|
||||
bluetooth = {
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
|
|
@ -222,110 +222,110 @@
|
|||
services.blueman.enable = true;
|
||||
security.polkit.enable = true;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
};
|
||||
stylix = {
|
||||
enable = false;
|
||||
image = "${../../modules/hyprland/wallpaper.jpg}";
|
||||
autoEnable = true;
|
||||
opacity = {
|
||||
desktop = 0.0; #0.5;
|
||||
};
|
||||
targets = {
|
||||
gtk.enable = true;
|
||||
plymouth = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
#logo = ./fastfetch/nixos.png;
|
||||
logoAnimated = false;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
};
|
||||
stylix = {
|
||||
enable = false;
|
||||
image = "${../../modules/hyprland/wallpaper.jpg}";
|
||||
autoEnable = true;
|
||||
opacity = {
|
||||
desktop = 0.0;#0.5;
|
||||
};
|
||||
targets = {
|
||||
gtk.enable = true;
|
||||
plymouth = {
|
||||
enable = true;
|
||||
#logo = ./fastfetch/nixos.png;
|
||||
logoAnimated = false;
|
||||
};
|
||||
};
|
||||
fonts = {
|
||||
sizes = {
|
||||
applications = 14;
|
||||
desktop = 12;
|
||||
popups = 12;
|
||||
terminal = 16;
|
||||
};
|
||||
};
|
||||
polarity = "dark";
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
};
|
||||
fonts = {
|
||||
sizes = {
|
||||
applications = 14;
|
||||
desktop = 12;
|
||||
popups = 12;
|
||||
terminal = 16;
|
||||
};
|
||||
};
|
||||
polarity = "dark";
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
shellAliases = {
|
||||
ls = "${pkgs.eza}/bin/eza --icons=always";
|
||||
};
|
||||
};
|
||||
programs.bash = {
|
||||
shellAliases = {
|
||||
ls = "${pkgs.eza}/bin/eza --icons=always";
|
||||
};
|
||||
};
|
||||
|
||||
#services.flatpak.enable = true;
|
||||
#services.flatpak.packages = [
|
||||
# "flathub:app/org.kde.dolphin//stable"
|
||||
# ];
|
||||
#services.flatpak.enable = true;
|
||||
#services.flatpak.packages = [
|
||||
# "flathub:app/org.kde.dolphin//stable"
|
||||
# ];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
kk.steam.enable = true;
|
||||
kk.steam.enable = true;
|
||||
|
||||
# List services that you want to enable:
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
# require public key authentication for better security
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.PermitRootLogin = "no";
|
||||
#extraConfig = "HostKey ${config.sops.secrets."ssh_keys/${hwconfig.hostname}".path}";
|
||||
};
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
# require public key authentication for better security
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.PermitRootLogin = "no";
|
||||
#extraConfig = "HostKey ${config.sops.secrets."ssh_keys/${hwconfig.hostname}".path}";
|
||||
};
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 22 25565 ];
|
||||
networking.firewall.allowedUDPPorts = [ 22 25565 ];
|
||||
# Or disable the firewall altogether.
|
||||
#networking.firewall.enable = false;
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [22 25565];
|
||||
networking.firewall.allowedUDPPorts = [22 25565];
|
||||
# Or disable the firewall altogether.
|
||||
#networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-gaming.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
};
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-gaming.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,20 +5,19 @@
|
|||
}: {
|
||||
imports = [
|
||||
];
|
||||
environment.packages = with pkgs;
|
||||
[
|
||||
neovim
|
||||
git
|
||||
fastfetch
|
||||
asciiquarium
|
||||
cmatrix
|
||||
#inputs.neovim.packages.aarch64-linux.default
|
||||
environment.packages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
fastfetch
|
||||
asciiquarium
|
||||
cmatrix
|
||||
#inputs.neovim.packages.aarch64-linux.default
|
||||
|
||||
(pkgs.writeShellScriptBin "droid-switch" ''
|
||||
nix-on-droid switch --flake /data/data/com.termux.nix/files/home/nixos-config
|
||||
'')
|
||||
inputs.emacs-kylekrein.packages.aarch64-linux.default
|
||||
];
|
||||
(pkgs.writeShellScriptBin "droid-switch" ''
|
||||
nix-on-droid switch --flake /data/data/com.termux.nix/files/home/nixos-config
|
||||
'')
|
||||
inputs.emacs-kylekrein.packages.aarch64-linux.default
|
||||
];
|
||||
home-manager = {
|
||||
config = ./home.nix;
|
||||
useGlobalPkgs = true;
|
||||
|
|
|
|||
|
|
@ -1,17 +1,22 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
#../../modules/nixvim
|
||||
../../homes/kylekrein/git.nix
|
||||
];
|
||||
home.activation = {
|
||||
copyFont = let
|
||||
font_src = "${pkgs.nerd-fonts.fira-code}/share/fonts/truetype/NerdFonts/FiraCode/FiraCodeNerdFont-Regular.ttf";
|
||||
font_dst = "${config.home.homeDirectory}/.termux/font.ttf";
|
||||
in lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
( test ! -e "${font_dst}" || test $(sha1sum "${font_src}"|cut -d' ' -f1 ) != $(sha1sum "${font_dst}" |cut -d' ' -f1)) && $DRY_RUN_CMD install $VERBOSE_ARG -D "${font_src}" "${font_dst}"
|
||||
'';
|
||||
};
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
#../../modules/nixvim
|
||||
../../homes/kylekrein/git.nix
|
||||
];
|
||||
home.activation = {
|
||||
copyFont = let
|
||||
font_src = "${pkgs.nerd-fonts.fira-code}/share/fonts/truetype/NerdFonts/FiraCode/FiraCodeNerdFont-Regular.ttf";
|
||||
font_dst = "${config.home.homeDirectory}/.termux/font.ttf";
|
||||
in
|
||||
lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
( test ! -e "${font_dst}" || test $(sha1sum "${font_src}"|cut -d' ' -f1 ) != $(sha1sum "${font_dst}" |cut -d' ' -f1)) && $DRY_RUN_CMD install $VERBOSE_ARG -D "${font_src}" "${font_dst}"
|
||||
'';
|
||||
};
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
home.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@
|
|||
(self: super: {
|
||||
prismlauncher = pkgs.symlinkJoin {
|
||||
name = "prismlauncher";
|
||||
paths = [ super.prismlauncher];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
paths = [super.prismlauncher];
|
||||
buildInputs = [pkgs.makeWrapper];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/prismlauncher --set HOME /persist/home/kylekrein
|
||||
'';
|
||||
|
|
@ -38,8 +38,8 @@
|
|||
(self: super: {
|
||||
bottles = pkgs.symlinkJoin {
|
||||
name = "bottles";
|
||||
paths = [ super.bottles];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
paths = [super.bottles];
|
||||
buildInputs = [pkgs.makeWrapper];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/bottles --set HOME /persist/home/kylekrein
|
||||
'';
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
blender
|
||||
ladybird
|
||||
prismlauncher
|
||||
|
||||
|
||||
#inputs.nix-gaming.packages.${pkgs.system}.star-citizen
|
||||
];
|
||||
|
||||
|
|
@ -68,14 +68,14 @@
|
|||
#LLMs
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
loadModels = [ "qwq" "llama3.1" "qwen2.5-coder:7b" ];
|
||||
loadModels = ["qwq" "llama3.1" "qwen2.5-coder:7b"];
|
||||
acceleration = "cuda";
|
||||
home = "/persist/ollama";
|
||||
user = "ollama";
|
||||
group = "ollama";
|
||||
};
|
||||
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" "riscv64-linux" ];
|
||||
boot.binfmt.emulatedSystems = ["aarch64-linux" "riscv64-linux"];
|
||||
|
||||
services.open-webui.enable = true;
|
||||
#services.open-webui.package = unstable-pkgs.open-webui;
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
systemd.services.open-webui.serviceConfig.DynamicUser = lib.mkForce false;
|
||||
|
||||
#Chat host
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 22 8448 9993 8081] ++ [ config.services.zerotierone.port ];
|
||||
networking.firewall.allowedTCPPorts = [80 443 22 8448 9993 8081] ++ [config.services.zerotierone.port];
|
||||
networking.firewall.allowedUDPPorts = [config.services.zerotierone.port];
|
||||
|
||||
systemd.network.wait-online.enable = lib.mkForce false;
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@
|
|||
(self: super: {
|
||||
prismlauncher = pkgs.symlinkJoin {
|
||||
name = "prismlauncher";
|
||||
paths = [ super.prismlauncher];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
paths = [super.prismlauncher];
|
||||
buildInputs = [pkgs.makeWrapper];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/prismlauncher --set HOME /persist/home/kylekrein
|
||||
'';
|
||||
|
|
@ -36,8 +36,8 @@
|
|||
(self: super: {
|
||||
bottles = pkgs.symlinkJoin {
|
||||
name = "bottles";
|
||||
paths = [ super.bottles];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
paths = [super.bottles];
|
||||
buildInputs = [pkgs.makeWrapper];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/bottles --set HOME /persist/home/kylekrein
|
||||
'';
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
blender
|
||||
ladybird
|
||||
prismlauncher
|
||||
|
||||
|
||||
#inputs.nix-gaming.packages.${pkgs.system}.star-citizen
|
||||
];
|
||||
|
||||
|
|
@ -66,14 +66,14 @@
|
|||
#LLMs
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
loadModels = [ "qwq" "llama3.1" "qwen2.5-coder:7b" ];
|
||||
loadModels = ["qwq" "llama3.1" "qwen2.5-coder:7b"];
|
||||
acceleration = "cuda";
|
||||
home = "/persist/ollama";
|
||||
user = "ollama";
|
||||
group = "ollama";
|
||||
};
|
||||
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" "riscv64-linux" ];
|
||||
boot.binfmt.emulatedSystems = ["aarch64-linux" "riscv64-linux"];
|
||||
|
||||
services.open-webui.enable = true;
|
||||
#services.open-webui.package = unstable-pkgs.open-webui;
|
||||
|
|
@ -85,9 +85,9 @@
|
|||
systemd.services.open-webui.serviceConfig.DynamicUser = lib.mkForce false;
|
||||
|
||||
#Chat host
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 22 8448 9993 8081] ++ [ config.services.zerotierone.port ];
|
||||
networking.firewall.allowedTCPPorts = [80 443 22 8448 9993 8081] ++ [config.services.zerotierone.port];
|
||||
networking.firewall.allowedUDPPorts = [config.services.zerotierone.port];
|
||||
# users.users.nginx.extraGroups = [ "acme" ];
|
||||
# users.users.nginx.extraGroups = [ "acme" ];
|
||||
services.hypridle.enable = lib.mkForce false;
|
||||
programs.hyprlock.enable = lib.mkForce false;
|
||||
|
||||
|
|
@ -106,14 +106,17 @@
|
|||
#forceSSL = true;
|
||||
#useACMEHost = "kylekrein.com";
|
||||
#acmeRoot = "/var/lib/acme/challenges-kylekrein";
|
||||
}; in {
|
||||
"chat.kylekrein.com" = (SSL // {
|
||||
};
|
||||
in {
|
||||
"chat.kylekrein.com" =
|
||||
SSL
|
||||
// {
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:8080/";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.network.wait-online.enable = lib.mkForce false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,21 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -18,25 +18,25 @@
|
|||
];
|
||||
sops.secrets."ssh_keys/${hwconfig.hostname}" = {};
|
||||
facter.reportPath = lib.mkForce null; #fails to generate
|
||||
boot.binfmt.emulatedSystems = [ "x86_64-linux" ];
|
||||
boot.binfmt.emulatedSystems = ["x86_64-linux"];
|
||||
nix.settings.extra-platforms = config.boot.binfmt.emulatedSystems;
|
||||
|
||||
|
||||
services.displayManager.sddm = {
|
||||
wayland.enable = lib.mkForce false; # black screen
|
||||
};
|
||||
environment.systemPackages = with pkgs;[
|
||||
wayland.enable = lib.mkForce false; # black screen
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
prismlauncher
|
||||
unstable-pkgs.mcpelauncher-ui-qt
|
||||
];
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
loadModels = [ "llama3.1" "qwen2.5-coder:7b" ];
|
||||
loadModels = ["llama3.1" "qwen2.5-coder:7b"];
|
||||
home = "/persist/ollama";
|
||||
user = "ollama";
|
||||
group = "ollama";
|
||||
};
|
||||
|
||||
boot = {
|
||||
boot = {
|
||||
kernelParams = [
|
||||
"zswap.enabled=1"
|
||||
"zswap.compressor=lzo"
|
||||
|
|
|
|||
|
|
@ -1,49 +1,53 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "usb_storage" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["usb_storage"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "tmpfs";
|
||||
fsType = "tmpfs";
|
||||
options = [ "defaults" "size=8G" "mode=755" ];
|
||||
options = ["defaults" "size=8G" "mode=755"];
|
||||
};
|
||||
fileSystems."/persist" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
depends = ["/"];
|
||||
neededForBoot = true;
|
||||
};
|
||||
fileSystems."/persist" =
|
||||
{ device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
depends = [ "/" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
fileSystems."/nix" = {
|
||||
device = "/persist/nix";
|
||||
options = [ "bind" ];
|
||||
depends = [ "/persist" ];
|
||||
options = ["bind"];
|
||||
depends = ["/persist"];
|
||||
};
|
||||
fileSystems."/tmp" = {
|
||||
device = "/persist/tmp";
|
||||
options = [ "bind" ];
|
||||
depends = [ "/persist" ];
|
||||
options = ["bind"];
|
||||
depends = ["/persist"];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/EFI\\x20-\\x20NIXOS";
|
||||
fsType = "vfat";
|
||||
#options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/EFI\\x20-\\x20NIXOS";
|
||||
fsType = "vfat";
|
||||
#options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/persist/swapfile";
|
||||
size = 16*1024;
|
||||
size = 16 * 1024;
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -3,17 +3,15 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
cfg = config.kk.services.conduwuit;
|
||||
defaultUser = "conduwuit";
|
||||
defaultGroup = "conduwuit";
|
||||
|
||||
format = pkgs.formats.toml { };
|
||||
format = pkgs.formats.toml {};
|
||||
configFile = format.generate "conduwuit.toml" cfg.settings;
|
||||
in
|
||||
{
|
||||
meta.maintainers = with lib.maintainers; [ niklaskorz ];
|
||||
in {
|
||||
meta.maintainers = with lib.maintainers; [niklaskorz];
|
||||
options.kk.services.conduwuit = {
|
||||
enable = lib.mkEnableOption "conduwuit";
|
||||
|
||||
|
|
@ -36,13 +34,13 @@ in
|
|||
extraEnvironment = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
description = "Extra Environment variables to pass to the conduwuit server.";
|
||||
default = { };
|
||||
default = {};
|
||||
example = {
|
||||
RUST_BACKTRACE = "yes";
|
||||
};
|
||||
};
|
||||
|
||||
package = lib.mkPackageOption pkgs "conduwuit" { };
|
||||
package = lib.mkPackageOption pkgs "conduwuit" {};
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = lib.types.submodule {
|
||||
|
|
@ -68,7 +66,7 @@ in
|
|||
};
|
||||
global.port = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.port;
|
||||
default = [ 6167 ];
|
||||
default = [6167];
|
||||
description = ''
|
||||
The port(s) conduwuit will be running on.
|
||||
You need to set up a reverse proxy in your web server (e.g. apache or nginx),
|
||||
|
|
@ -127,7 +125,7 @@ in
|
|||
};
|
||||
global.trusted_servers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.nonEmptyStr;
|
||||
default = [ "matrix.org" ];
|
||||
default = ["matrix.org"];
|
||||
description = ''
|
||||
Servers listed here will be used to gather public keys of other servers
|
||||
(notary trusted key servers).
|
||||
|
|
@ -147,14 +145,14 @@ in
|
|||
Note that database_path cannot be edited because of the service's reliance on systemd StateDir.
|
||||
'';
|
||||
};
|
||||
global.database_backup_path = lib.mkOption {
|
||||
global.database_backup_path = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
default = null;
|
||||
description = ''
|
||||
Path to the conduwuit database, the directory where conduwuit will backup its data.
|
||||
'';
|
||||
};
|
||||
global.database_backups_to_keep = lib.mkOption {
|
||||
global.database_backups_to_keep = lib.mkOption {
|
||||
type = lib.types.ints.positive;
|
||||
default = 1;
|
||||
description = "";
|
||||
|
|
@ -170,103 +168,103 @@ in
|
|||
Disabled by default.
|
||||
'';
|
||||
};
|
||||
global.allow_local_presence = lib.mkOption {
|
||||
global.allow_local_presence = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.allow_incoming_presence = lib.mkOption {
|
||||
global.allow_incoming_presence = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.allow_outgoing_presence = lib.mkOption {
|
||||
global.allow_outgoing_presence = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.require_auth_for_profile_requests = lib.mkOption {
|
||||
global.require_auth_for_profile_requests = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.new_user_displayname_suffix = lib.mkOption {
|
||||
global.new_user_displayname_suffix = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "🏳️⚧️";
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.registration_token = lib.mkOption {
|
||||
global.registration_token = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.registration_token_file = lib.mkOption {
|
||||
global.registration_token_file = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
default = null;
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.allow_public_room_directory_over_federation = lib.mkOption {
|
||||
global.allow_public_room_directory_over_federation = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.allow_public_room_directory_without_auth = lib.mkOption {
|
||||
global.allow_public_room_directory_without_auth = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.allow_device_name_federation = lib.mkOption {
|
||||
global.allow_device_name_federation = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.allow_inbound_profile_lookup_federation_requests = lib.mkOption {
|
||||
global.allow_inbound_profile_lookup_federation_requests = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.turn_secret = lib.mkOption {
|
||||
global.turn_secret = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.turn_uris = lib.mkOption {
|
||||
global.turn_uris = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.nonEmptyStr;
|
||||
default = [];
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.turn_secret_file = lib.mkOption {
|
||||
global.turn_secret_file = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
default = null;
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.prevent_media_downloads_from = lib.mkOption {
|
||||
global.prevent_media_downloads_from = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.nonEmptyStr;
|
||||
default = [];
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.well_known.client = lib.mkOption {
|
||||
global.well_known.client = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
description = ''
|
||||
'';
|
||||
};
|
||||
global.well_known.server = lib.mkOption {
|
||||
global.well_known.server = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
description = ''
|
||||
|
|
@ -274,7 +272,7 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
default = {};
|
||||
# TOML does not allow null values, so we use null to omit those fields
|
||||
apply = lib.filterAttrsRecursive (_: v: v != null);
|
||||
description = ''
|
||||
|
|
@ -314,19 +312,19 @@ in
|
|||
};
|
||||
|
||||
users.groups = lib.mkIf (cfg.group == defaultGroup) {
|
||||
${defaultGroup} = { };
|
||||
${defaultGroup} = {};
|
||||
};
|
||||
|
||||
systemd.services.conduwuit = {
|
||||
description = "Conduwuit Matrix Server";
|
||||
documentation = [ "https://conduwuit.puppyirl.gay/" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
environment = lib.mkMerge ([
|
||||
{ CONDUWUIT_CONFIG = configFile; }
|
||||
documentation = ["https://conduwuit.puppyirl.gay/"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
wants = ["network-online.target"];
|
||||
after = ["network-online.target"];
|
||||
environment = lib.mkMerge [
|
||||
{CONDUWUIT_CONFIG = configFile;}
|
||||
cfg.extraEnvironment
|
||||
]);
|
||||
];
|
||||
startLimitBurst = 5;
|
||||
startLimitIntervalSec = 60;
|
||||
serviceConfig = {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.nixos-facter-modules.nixosModules.facter
|
||||
inputs.home-manager.nixosModules.default
|
||||
|
|
@ -21,177 +21,176 @@
|
|||
./hardware.nix
|
||||
./networking.nix
|
||||
];
|
||||
#options.services.conduwuit.settings.global.database_path = lib.mkOption { apply = old: "/persist/conduwuit/";};
|
||||
config = {
|
||||
home-manager.users = lib.mkForce {};
|
||||
stylix.image = ../../modules/hyprland/wallpaper.jpg;
|
||||
#sops.secrets."ssh_keys/${hwconfig.hostname}" = {};
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
networking.hostName = hwconfig.hostname;
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
#options.services.conduwuit.settings.global.database_path = lib.mkOption { apply = old: "/persist/conduwuit/";};
|
||||
config = {
|
||||
home-manager.users = lib.mkForce {};
|
||||
stylix.image = ../../modules/hyprland/wallpaper.jpg;
|
||||
#sops.secrets."ssh_keys/${hwconfig.hostname}" = {};
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
networking.hostName = hwconfig.hostname;
|
||||
users = {
|
||||
root = {
|
||||
# disable root login here, and also when installing nix by running nixos-install --no-root-passwd
|
||||
# https://discourse.nixos.org/t/how-to-disable-root-user-account-in-configuration-nix/13235/3
|
||||
hashedPassword = "!"; # disable root logins, nothing hashes to !
|
||||
mutableUsers = false;
|
||||
users = {
|
||||
root = {
|
||||
# disable root login here, and also when installing nix by running nixos-install --no-root-passwd
|
||||
# https://discourse.nixos.org/t/how-to-disable-root-user-account-in-configuration-nix/13235/3
|
||||
hashedPassword = "!"; # disable root logins, nothing hashes to !
|
||||
};
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
];
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
flake = "/etc/nixos-config";
|
||||
};
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
# require public key authentication for better security
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.PermitRootLogin = "no";
|
||||
#extraConfig = "HostKey ${config.sops.secrets."ssh_keys/${hwconfig.hostname}".path}";
|
||||
};
|
||||
|
||||
zramSwap = {
|
||||
enable = true; # Hopefully? helps with freezing when using swap
|
||||
};
|
||||
#Chat host
|
||||
networking.firewall.allowedTCPPorts = [80 443 22 8448];
|
||||
networking.firewall.allowedUDPPorts = [3478 5349];
|
||||
#sops.secrets."services/conduwuit" = {mode = "0755";};
|
||||
|
||||
sops.secrets."services/gitlab/dbPassword" = {owner = "gitlab";};
|
||||
sops.secrets."services/gitlab/rootPassword" = {owner = "gitlab";};
|
||||
sops.secrets."services/gitlab/secret" = {owner = "gitlab";};
|
||||
sops.secrets."services/gitlab/otpsecret" = {owner = "gitlab";};
|
||||
sops.secrets."services/gitlab/dbsecret" = {owner = "gitlab";};
|
||||
sops.secrets."services/gitlab/oidcKeyBase" = {owner = "gitlab";};
|
||||
sops.secrets."services/gitlab/activeRecordSalt" = {owner = "gitlab";};
|
||||
sops.secrets."services/gitlab/activeRecordPrimaryKey" = {owner = "gitlab";};
|
||||
sops.secrets."services/gitlab/activeRecordDeterministicKey" = {owner = "gitlab";};
|
||||
services.gitlab = {
|
||||
enable = true;
|
||||
host = "gitlab.kylekrein.com";
|
||||
port = 443;
|
||||
#statePath = "/persist/gitlab/state";
|
||||
backup.startAt = "3:00";
|
||||
databasePasswordFile = config.sops.secrets."services/gitlab/dbPassword".path;
|
||||
initialRootPasswordFile = config.sops.secrets."services/gitlab/rootPassword".path;
|
||||
secrets = {
|
||||
secretFile = config.sops.secrets."services/gitlab/secret".path;
|
||||
otpFile = config.sops.secrets."services/gitlab/otpsecret".path;
|
||||
dbFile = config.sops.secrets."services/gitlab/dbsecret".path;
|
||||
jwsFile = config.sops.secrets."services/gitlab/oidcKeyBase".path; #pkgs.runCommand "oidcKeyBase" {} "${pkgs.openssl}/bin/openssl genrsa 2048 > $out";
|
||||
activeRecordSaltFile = config.sops.secrets."services/gitlab/activeRecordSalt".path;
|
||||
activeRecordPrimaryKeyFile = config.sops.secrets."services/gitlab/activeRecordPrimaryKey".path;
|
||||
activeRecordDeterministicKeyFile = config.sops.secrets."services/gitlab/activeRecordDeterministicKey".path;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.gitlab-backup.environment.BACKUP = "dump";
|
||||
|
||||
kk.services.conduwuit = {
|
||||
enable = true;
|
||||
#user = "turnserver";
|
||||
settings = {
|
||||
global = {
|
||||
server_name = "kylekrein.com";
|
||||
well_known = {
|
||||
server = "matrix.kylekrein.com:443";
|
||||
client = "https://matrix.kylekrein.com";
|
||||
};
|
||||
port = [6167];
|
||||
trusted_servers = ["matrix.org"];
|
||||
allow_registration = false;
|
||||
registration_token = ""; #nix shell nixpkgs#openssl -c openssl rand -base64 48 | tr -d '/+' | cut -c1-64
|
||||
allow_federation = true;
|
||||
allow_encryption = true;
|
||||
|
||||
allow_local_presence = true;
|
||||
require_auth_for_profile_requests = true;
|
||||
};
|
||||
};
|
||||
extraEnvironment = {
|
||||
};
|
||||
};
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
#virtualHosts."kylekrein.com:8448".extraConfig = ''
|
||||
# reverse_proxy http://localhost:6167
|
||||
#'';
|
||||
virtualHosts."kylekrein.com".extraConfig = ''
|
||||
handle_path /.well-known/matrix/* {
|
||||
|
||||
header Access-Control-Allow-Origin *
|
||||
|
||||
## `Content-Type: application/json` isn't required by the matrix spec
|
||||
## but some browsers (firefox) and some other tooling might preview json
|
||||
## content prettier when they are made aware via Content-Type
|
||||
header Content-Type application/json
|
||||
|
||||
respond /client `{ "m.homeserver": { "base_url": "https://matrix.kylekrein.com/" }, "org.matrix.msc3575.proxy": { "url": "https://matrix.kylekrein.com/"}, "org.matrix.msc4143.rtc_foci": [ { "type": "livekit", "livekit_service_url": "https://livekit-jwt.call.matrix.org" } ] }`
|
||||
|
||||
respond /server `{ "m.server": "https://matrix.kylekrein.com" }`
|
||||
|
||||
## return http/404 if nothing matches
|
||||
respond 404
|
||||
}
|
||||
respond /.well-known/element/element.json `{"call":{"widget_url":"https://call.element.io"}}`
|
||||
reverse_proxy * http://localhost:6167
|
||||
'';
|
||||
# reverse_proxy /.well-known/* http://localhost:6167
|
||||
#'';
|
||||
virtualHosts."matrix.kylekrein.com".extraConfig = ''
|
||||
handle_path /.well-known/matrix/* {
|
||||
|
||||
header Access-Control-Allow-Origin *
|
||||
|
||||
## `Content-Type: application/json` isn't required by the matrix spec
|
||||
## but some browsers (firefox) and some other tooling might preview json
|
||||
## content prettier when they are made aware via Content-Type
|
||||
header Content-Type application/json
|
||||
|
||||
respond /client `{ "m.homeserver": { "base_url": "https://matrix.kylekrein.com/" }, "org.matrix.msc3575.proxy": { "url": "https://matrix.kylekrein.com/"}, "org.matrix.msc4143.rtc_foci": [ { "type": "livekit", "livekit_service_url": "https://livekit-jwt.call.matrix.org" } ] }`
|
||||
|
||||
respond /server `{ "m.server": "https://matrix.kylekrein.com" }`
|
||||
|
||||
## return http/404 if nothing matches
|
||||
respond 404
|
||||
}
|
||||
respond /.well-known/element/element.json `{"call":{"widget_url":"https://call.element.io"}}`
|
||||
reverse_proxy * http://localhost:6167
|
||||
'';
|
||||
virtualHosts."gitlab.kylekrein.com".extraConfig = ''
|
||||
reverse_proxy * unix//run/gitlab/gitlab-workhorse.socket
|
||||
'';
|
||||
};
|
||||
system.stateVersion = "24.11";
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-gaming.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
];
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
flake = "/etc/nixos-config";
|
||||
};
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
# require public key authentication for better security
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.PermitRootLogin = "no";
|
||||
#extraConfig = "HostKey ${config.sops.secrets."ssh_keys/${hwconfig.hostname}".path}";
|
||||
};
|
||||
|
||||
zramSwap = {
|
||||
enable = true; # Hopefully? helps with freezing when using swap
|
||||
};
|
||||
#Chat host
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 22 8448 ];
|
||||
networking.firewall.allowedUDPPorts = [ 3478 5349 ];
|
||||
#sops.secrets."services/conduwuit" = {mode = "0755";};
|
||||
|
||||
|
||||
sops.secrets."services/gitlab/dbPassword" = { owner = "gitlab"; };
|
||||
sops.secrets."services/gitlab/rootPassword" = { owner = "gitlab"; };
|
||||
sops.secrets."services/gitlab/secret" = { owner = "gitlab"; };
|
||||
sops.secrets."services/gitlab/otpsecret" = { owner = "gitlab"; };
|
||||
sops.secrets."services/gitlab/dbsecret" = { owner = "gitlab"; };
|
||||
sops.secrets."services/gitlab/oidcKeyBase" = { owner = "gitlab"; };
|
||||
sops.secrets."services/gitlab/activeRecordSalt" = { owner = "gitlab"; };
|
||||
sops.secrets."services/gitlab/activeRecordPrimaryKey" = { owner = "gitlab"; };
|
||||
sops.secrets."services/gitlab/activeRecordDeterministicKey" = { owner = "gitlab"; };
|
||||
services.gitlab = {
|
||||
enable = true;
|
||||
host = "gitlab.kylekrein.com";
|
||||
port = 443;
|
||||
#statePath = "/persist/gitlab/state";
|
||||
backup.startAt = "3:00";
|
||||
databasePasswordFile = config.sops.secrets."services/gitlab/dbPassword".path;
|
||||
initialRootPasswordFile = config.sops.secrets."services/gitlab/rootPassword".path;
|
||||
secrets = {
|
||||
secretFile = config.sops.secrets."services/gitlab/secret".path;
|
||||
otpFile = config.sops.secrets."services/gitlab/otpsecret".path;
|
||||
dbFile = config.sops.secrets."services/gitlab/dbsecret".path;
|
||||
jwsFile = config.sops.secrets."services/gitlab/oidcKeyBase".path;#pkgs.runCommand "oidcKeyBase" {} "${pkgs.openssl}/bin/openssl genrsa 2048 > $out";
|
||||
activeRecordSaltFile = config.sops.secrets."services/gitlab/activeRecordSalt".path;
|
||||
activeRecordPrimaryKeyFile = config.sops.secrets."services/gitlab/activeRecordPrimaryKey".path;
|
||||
activeRecordDeterministicKeyFile = config.sops.secrets."services/gitlab/activeRecordDeterministicKey".path;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.gitlab-backup.environment.BACKUP = "dump";
|
||||
|
||||
kk.services.conduwuit = {
|
||||
enable = true;
|
||||
#user = "turnserver";
|
||||
settings = {
|
||||
global = {
|
||||
server_name = "kylekrein.com";
|
||||
well_known = {
|
||||
server = "matrix.kylekrein.com:443";
|
||||
client = "https://matrix.kylekrein.com";
|
||||
};
|
||||
port = [ 6167 ];
|
||||
trusted_servers = [ "matrix.org" ];
|
||||
allow_registration = false;
|
||||
registration_token = ""; #nix shell nixpkgs#openssl -c openssl rand -base64 48 | tr -d '/+' | cut -c1-64
|
||||
allow_federation = true;
|
||||
allow_encryption = true;
|
||||
|
||||
allow_local_presence = true;
|
||||
require_auth_for_profile_requests = true;
|
||||
};
|
||||
};
|
||||
extraEnvironment = {
|
||||
};
|
||||
};
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
#virtualHosts."kylekrein.com:8448".extraConfig = ''
|
||||
# reverse_proxy http://localhost:6167
|
||||
#'';
|
||||
virtualHosts."kylekrein.com".extraConfig = ''
|
||||
handle_path /.well-known/matrix/* {
|
||||
|
||||
header Access-Control-Allow-Origin *
|
||||
|
||||
## `Content-Type: application/json` isn't required by the matrix spec
|
||||
## but some browsers (firefox) and some other tooling might preview json
|
||||
## content prettier when they are made aware via Content-Type
|
||||
header Content-Type application/json
|
||||
|
||||
respond /client `{ "m.homeserver": { "base_url": "https://matrix.kylekrein.com/" }, "org.matrix.msc3575.proxy": { "url": "https://matrix.kylekrein.com/"}, "org.matrix.msc4143.rtc_foci": [ { "type": "livekit", "livekit_service_url": "https://livekit-jwt.call.matrix.org" } ] }`
|
||||
|
||||
respond /server `{ "m.server": "https://matrix.kylekrein.com" }`
|
||||
|
||||
## return http/404 if nothing matches
|
||||
respond 404
|
||||
}
|
||||
respond /.well-known/element/element.json `{"call":{"widget_url":"https://call.element.io"}}`
|
||||
reverse_proxy * http://localhost:6167
|
||||
'';
|
||||
# reverse_proxy /.well-known/* http://localhost:6167
|
||||
#'';
|
||||
virtualHosts."matrix.kylekrein.com".extraConfig = ''
|
||||
handle_path /.well-known/matrix/* {
|
||||
|
||||
header Access-Control-Allow-Origin *
|
||||
|
||||
## `Content-Type: application/json` isn't required by the matrix spec
|
||||
## but some browsers (firefox) and some other tooling might preview json
|
||||
## content prettier when they are made aware via Content-Type
|
||||
header Content-Type application/json
|
||||
|
||||
respond /client `{ "m.homeserver": { "base_url": "https://matrix.kylekrein.com/" }, "org.matrix.msc3575.proxy": { "url": "https://matrix.kylekrein.com/"}, "org.matrix.msc4143.rtc_foci": [ { "type": "livekit", "livekit_service_url": "https://livekit-jwt.call.matrix.org" } ] }`
|
||||
|
||||
respond /server `{ "m.server": "https://matrix.kylekrein.com" }`
|
||||
|
||||
## return http/404 if nothing matches
|
||||
respond 404
|
||||
}
|
||||
respond /.well-known/element/element.json `{"call":{"widget_url":"https://call.element.io"}}`
|
||||
reverse_proxy * http://localhost:6167
|
||||
'';
|
||||
virtualHosts."gitlab.kylekrein.com".extraConfig = ''
|
||||
reverse_proxy * unix//run/gitlab/gitlab-workhorse.socket
|
||||
'';
|
||||
};
|
||||
system.stateVersion = "24.11";
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-gaming.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +1,25 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/4f7e141c-0fc7-415a-815d-944b36f93806";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/4f7e141c-0fc7-415a-815d-944b36f93806";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
{ lib, ... }: {
|
||||
{lib, ...}: {
|
||||
# This file was populated at runtime with the networking
|
||||
# details gathered from the active system.
|
||||
networking = {
|
||||
nameservers = [ "8.8.8.8"
|
||||
];
|
||||
nameservers = [
|
||||
"8.8.8.8"
|
||||
];
|
||||
defaultGateway = "172.31.1.1";
|
||||
defaultGateway6 = {
|
||||
address = "";
|
||||
|
|
@ -14,19 +15,34 @@
|
|||
interfaces = {
|
||||
eth0 = {
|
||||
ipv4.addresses = [
|
||||
{ address="91.99.0.169"; prefixLength=32; }
|
||||
{
|
||||
address = "91.99.0.169";
|
||||
prefixLength = 32;
|
||||
}
|
||||
];
|
||||
ipv6.addresses = [
|
||||
{ address="fe80::9400:4ff:fe30:830e"; prefixLength=64; }
|
||||
{
|
||||
address = "fe80::9400:4ff:fe30:830e";
|
||||
prefixLength = 64;
|
||||
}
|
||||
];
|
||||
ipv4.routes = [
|
||||
{
|
||||
address = "172.31.1.1";
|
||||
prefixLength = 32;
|
||||
}
|
||||
];
|
||||
ipv6.routes = [
|
||||
{
|
||||
address = "";
|
||||
prefixLength = 128;
|
||||
}
|
||||
];
|
||||
ipv4.routes = [ { address = "172.31.1.1"; prefixLength = 32; } ];
|
||||
ipv6.routes = [ { address = ""; prefixLength = 128; } ];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
services.udev.extraRules = ''
|
||||
ATTR{address}=="96:00:04:30:83:0e", NAME="eth0"
|
||||
|
||||
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
hwconfig,
|
||||
inputs,
|
||||
config,
|
||||
unstable-pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
];
|
||||
}
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
hwconfig,
|
||||
inputs,
|
||||
config,
|
||||
unstable-pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue