Compare commits

..

No commits in common. "38b3c2c262f9af5267c40fbeabdf2937ecca7236" and "1237a5c0923dfe9a807111738a9ea210cd6dc0b9" have entirely different histories.

7 changed files with 50 additions and 132 deletions

View file

@ -12,64 +12,9 @@ with inputs.nixpkgs.lib; {
extraModules ? [],
}: let
system = platform;
secrets = builtins.toString inputs.secrets;
pull-requests = {
fluffychat = import nixpkgs-pr-fluffychat {
inherit system;
overlays = [
(final: prev: {
fluffychat = prev.fluffychat.overrideAttrs (prevAttrs: rec {
desktopItems = [
((builtins.elemAt prevAttrs.desktopItems 0).override {startupWMClass = "fluffychat";})
];
});
})
];
};
feishin = import nixpkgs-pr-feishin {
inherit system;
overlays = [
(final: prev: {
feishin = prev.feishin.overrideAttrs (prevAttrs: rec {
pname = "feishin";
version = "0.18.0";
src = prev.fetchFromGitHub {
owner = "jeffvli";
repo = "feishin";
rev = "v${version}";
hash = "sha256-4gcS7Vd7LSpEByO2Hlk6nb8V2adBPh5XwWGCu2lwOA4=";
};
pnpmDeps = prev.pnpm_10.fetchDeps {
inherit pname version src;
hash = "sha256-1MGxrUcfvazxAubaYAsQuulUKm05opWOIC7oaLzjr7o=";
};
});
})
];
};
};
userPackages = final: prev: {
# WebOne HTTP proxy.
webone = prev.pkgs.callPackage ./packages/webone {};
# Yazi Gruvbox theme.
yazi-flavour-gruvbox-dark = prev.pkgs.callPackage ./packages/yazi-flavour-gruvbox {};
# Latest FluffyChat.
fluffychat = pull-requests.fluffychat.fluffychat;
# Latest Feishin.
feishin = pull-requests.feishin.feishin;
# PrismLauncher with Temurin JRE.
prismlauncher = prev.prismlauncher.override {
jdks = [
prev.pkgs.temurin-jre-bin
];
};
};
pkgs = import nixpkgs {
inherit system;
config = {
@ -79,12 +24,9 @@ with inputs.nixpkgs.lib; {
"dotnet-runtime-6.0.36"
];
};
overlays = [
userPackages
];
};
deployPkgs = import nixpkgs {
pkgs-deploy-rs = import nixpkgs {
inherit system;
overlays = [
deploy-rs.overlays.default
@ -96,6 +38,13 @@ with inputs.nixpkgs.lib; {
})
];
};
userPackages = {
fluffychat = (import nixpkgs-pr-fluffychat {inherit system;}).fluffychat;
feishin = (import nixpkgs-pr-feishin {inherit system;}).feishin;
webone = pkgs.callPackage ./packages/webone {};
yazi-flavour-gruvbox-dark = pkgs.callPackage ./packages/yazi-flavour-gruvbox {};
};
in
{
nixosConfigurations.${hostname} = nixosSystem {
@ -103,11 +52,13 @@ with inputs.nixpkgs.lib; {
specialArgs = {
inherit
nixpkgs
hostname
platform
suite
user
secrets
userPackages
; # Inherit variables.
};
@ -122,15 +73,13 @@ with inputs.nixpkgs.lib; {
++ extraModules;
};
}
// optionalAttrs ((suite == "server")
|| (suite == "vm")
|| (suite == "lxc")) {
// optionalAttrs (suite != "desktop") {
deploy.nodes.${hostname} = {
hostname = "${hostname}.local";
profiles.system = {
user = "root";
sshUser = user;
path = deployPkgs.deploy-rs.lib.activate.nixos self.nixosConfigurations.${hostname};
path = pkgs-deploy-rs.deploy-rs.lib.activate.nixos self.nixosConfigurations.${hostname};
};
};
};

View file

@ -42,7 +42,6 @@
};
};
};
# Open ports for services.
networking.firewall = {
allowedUDPPorts = [

View file

@ -1,7 +1,7 @@
{
config,
lib,
pkgs,
userPackages,
...
}:
with lib; let
@ -47,13 +47,13 @@ in {
startLimitIntervalSec = 5;
startLimitBurst = 3;
environment = {
OPENSSL_CONF = "${pkgs.webone}/lib/webone/openssl_webone.cnf";
OPENSSL_CONF = "${userPackages.webone}/lib/webone/openssl_webone.cnf";
};
serviceConfig = {
Type = "simple";
User = "webone";
Group = "webone";
ExecStart = "${pkgs.webone}/bin/webone";
ExecStart = "${userPackages.webone}/bin/webone";
TimeoutStopSec = "10";
Restart = "on-failure";
RestartSec = "5";

View file

@ -1,43 +0,0 @@
inputs:
with inputs; (super: self: {
webone = super.pkgs.callPackage ./packages/webone {};
yazi-flavour-gruvbox-dark = super.pkgs.callPackage ./packages/yazi-flavour-gruvbox {};
pr.fluffychat = import nixpikgs-pr-fluffychat {inherit system;};
pr.feishin = import nixpkgs-pr-feishin {
inherit system;
overlays = [
(self: super: {
feishin = super.feishin.overrideAttrs (old: rec {
pname = "feishin";
version = "0.18.0";
src = super.fetchFromGitHub {
owner = "jeffvli";
repo = "feishin";
rev = "v${version}";
hash = "sha256-4gcS7Vd7LSpEByO2Hlk6nb8V2adBPh5XwWGCu2lwOA4=";
};
pnpmDeps = super.pnpm_10.fetchDeps {
inherit pname version src;
hash = "sha256-1MGxrUcfvazxAubaYAsQuulUKm05opWOIC7oaLzjr7o=";
};
});
})
];
};
deploy-rs = import nixpkgs {
inherit system;
overlays = [
deploy-rs.overlays.default
(self: super: {
deploy-rs = {
inherit (pkgs) deploy-rs;
lib = super.deploy-rs.lib;
};
})
];
};
})

View file

@ -1,4 +1,6 @@
{
nixpkgs,
userPackages,
pkgs,
lib,
hostname,
@ -18,6 +20,9 @@ with lib; {
# Add @wheel to trusted-users for remote deployments.
nix.settings.trusted-users = ["root" "@wheel"];
# Set $NIX_PATH to flake input.
nix.nixPath = ["nixpkgs=${nixpkgs}"];
# Enable redistributable firmware.
hardware.enableRedistributableFirmware = true;
@ -72,7 +77,7 @@ with lib; {
# yazi cd on quit.
function y
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
${pkgs.yazi}/bin/yazi $argv --cwd-file="$tmp"
if read -z cwd < "$tmp"; and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
end
@ -84,10 +89,10 @@ with lib; {
# https://nixos.wiki/wiki/Fish#Setting_fish_as_your_shell
programs.bash = {
interactiveShellInit = ''
if [[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec fish $LOGIN_OPTION
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
@ -102,26 +107,19 @@ with lib; {
nixvim = {
enable = true;
defaultEditor = true;
# For telescope.
dependencies.ripgrep.enable = true;
# Space as leader.
globals.mapleader = " ";
keymaps = [
{
key = "<Leader>t";
key = "<Leader>tt";
action = "<cmd> ToggleTerm direction=float <CR>";
}
{
key = "<Leader>x";
action = "<cmd> Trouble diagnostics toggle focus=false <CR>";
}
{
key = "<Leader>y";
action = "<cmd> Yazi <CR>";
key = "<Leader>xx";
action = "<cmd> Trouble diagnostics toggle focus=false<CR>";
}
];
@ -153,7 +151,6 @@ with lib; {
toggleterm.enable = true;
trouble.enable = true;
web-devicons.enable = true;
yazi.enable = true;
lualine = {
enable = true;
@ -224,7 +221,7 @@ with lib; {
programs.yazi = {
enable = true;
flavors."gruvbox-dark.yazi" = pkgs.yazi-flavour-gruvbox-dark;
flavors."gruvbox-dark.yazi" = userPackages.yazi-flavour-gruvbox-dark;
settings.theme = {
flavor.dark = "gruvbox-dark";
};

View file

@ -1,5 +1,6 @@
{
pkgs,
userPackages,
lib,
...
}:
@ -47,8 +48,8 @@ with lib; {
services.xserver = {
enable = true;
excludePackages = [
pkgs.xterm # Don't install xterm.
excludePackages = with pkgs; [
xterm # Don't install xterm.
];
displayManager.gdm.enable = true;
@ -104,8 +105,6 @@ with lib; {
celluloid
deploy-rs
discord
feishin
fluffychat
ghostty
gimp3
glabels-qt
@ -119,12 +118,27 @@ with lib; {
merriweather-sans
nerd-fonts.fira-code
obsidian
prismlauncher
prismlauncher
protonmail-desktop
signal-desktop
smile
userPackages.feishin
yubioath-flutter
# PrismLauncher with temurin jre.
(prismlauncher.override {
jdks = [
temurin-jre-bin
];
})
# FluffyChat 2.0.0 with fixed desktop item.
(userPackages.fluffychat.overrideAttrs (
finalAttrs: previousAttrs: {
desktopItems = [
((builtins.elemAt previousAttrs.desktopItems 0).override {startupWMClass = "fluffychat";})
];
}
))
];
# Allow opening terminal applications from gnome app launcher.

View file

@ -23,6 +23,8 @@ with lib; {
users.users.${user} = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIETPyuxUVEmYyEW6PVC6BXqkhULHd/RvMm8fMbYhjTMV fern@muskduck"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKzW4epTmK01kGVXcuAXUNJQPltnogf4uab9FA5m8S3n fern@pardalote"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBEJYq1fMxVOzCMfE/td6DtWS8nUk76U9seYD3Z9RYAz u0_a399@fairywren"
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIMoJvPcUJDVVzO4dHROCFNlgJdDZSP5xyPx2s40zcx5QAAAABHNzaDo= YubiKey5NFC"
];
extraGroups = mkIf (user == "docker") ["docker"]; # if docker is enabled.