Format NixOS flake with alejandra
This commit is contained in:
9
.github/workflows/cachix.yml
vendored
9
.github/workflows/cachix.yml
vendored
@@ -85,6 +85,15 @@ jobs:
|
|||||||
name: ${{ vars.CACHIX_CACHE_NAME }}
|
name: ${{ vars.CACHIX_CACHE_NAME }}
|
||||||
skipPush: true
|
skipPush: true
|
||||||
|
|
||||||
|
- name: Check Nix formatting
|
||||||
|
run: |
|
||||||
|
set -euxo pipefail
|
||||||
|
nix build \
|
||||||
|
--no-link \
|
||||||
|
--print-build-logs \
|
||||||
|
./nixos#checks.x86_64-linux.formatting \
|
||||||
|
--override-input railbird-secrets ./nixos/ci/railbird-secrets-stub
|
||||||
|
|
||||||
- name: Build NixOS system (strixi-minaj)
|
- name: Build NixOS system (strixi-minaj)
|
||||||
run: |
|
run: |
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
options = {
|
options = {
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
nixpkgs.config.android_sdk.accept_license = true;
|
nixpkgs.config.android_sdk.accept_license = true;
|
||||||
environment.systemPackages = [ pkgs.android-tools ];
|
environment.systemPackages = [pkgs.android-tools];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
{ config, pkgs, makeEnable, realUsers, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
makeEnable,
|
||||||
|
realUsers,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.base" true {
|
makeEnable config "myModules.base" true {
|
||||||
nixpkgs.config.permittedInsecurePackages = [
|
nixpkgs.config.permittedInsecurePackages = [
|
||||||
"electron-12.2.3"
|
"electron-12.2.3"
|
||||||
@@ -30,10 +36,10 @@ makeEnable config "myModules.base" true {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
networking.firewall.enable = false;
|
networking.firewall.enable = false;
|
||||||
networking.nameservers = [ "8.8.8.8" "8.8.4.4" ];
|
networking.nameservers = ["8.8.8.8" "8.8.4.4"];
|
||||||
networking.networkmanager = {
|
networking.networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [ pkgs.networkmanager-l2tp pkgs.networkmanager-openvpn ];
|
plugins = [pkgs.networkmanager-l2tp pkgs.networkmanager-openvpn];
|
||||||
settings.main.rc-manager = "symlink";
|
settings.main.rc-manager = "symlink";
|
||||||
};
|
};
|
||||||
networking.resolvconf.enable = false;
|
networking.resolvconf.enable = false;
|
||||||
@@ -52,7 +58,6 @@ makeEnable config "myModules.base" true {
|
|||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
@@ -96,7 +101,7 @@ makeEnable config "myModules.base" true {
|
|||||||
hardware.keyboard.zsa.enable = true;
|
hardware.keyboard.zsa.enable = true;
|
||||||
|
|
||||||
# For supporting gnome stuff
|
# For supporting gnome stuff
|
||||||
services.dbus.packages = [ pkgs.gcr ];
|
services.dbus.packages = [pkgs.gcr];
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
{ pkgs, inputs, config, makeEnable, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.ben" true {
|
makeEnable config "myModules.ben" true {
|
||||||
home-manager.users.ben = {
|
home-manager.users.ben = {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../nix-shared/system/essential.nix
|
../nix-shared/system/essential.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixos-hardware = { url = github:NixOS/nixos-hardware; };
|
nixos-hardware = {url = github:NixOS/nixos-hardware;};
|
||||||
|
|
||||||
nixpkgs = { url = github:NixOS/nixpkgs/nixos-unstable; };
|
nixpkgs = {url = github:NixOS/nixpkgs/nixos-unstable;};
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = github:nix-community/home-manager;
|
url = github:nix-community/home-manager;
|
||||||
@@ -18,13 +18,13 @@
|
|||||||
inputs.systems.follows = "systems";
|
inputs.systems.follows = "systems";
|
||||||
};
|
};
|
||||||
|
|
||||||
systems = { url = github:nix-systems/default; };
|
systems = {url = github:nix-systems/default;};
|
||||||
|
|
||||||
git-ignore-nix = {
|
git-ignore-nix = {
|
||||||
url = github:hercules-ci/gitignore.nix;
|
url = github:hercules-ci/gitignore.nix;
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixos-wsl = { url = github:nix-community/NixOS-WSL; };
|
nixos-wsl = {url = github:nix-community/NixOS-WSL;};
|
||||||
|
|
||||||
taffybar = {
|
taffybar = {
|
||||||
url = "github:taffybar/taffybar";
|
url = "github:taffybar/taffybar";
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
xmonad = {
|
xmonad = {
|
||||||
url = "github:xmonad/xmonad";
|
url = "github:xmonad/xmonad";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
flake-utils.follows = "flake-utils";
|
flake-utils.follows = "flake-utils";
|
||||||
git-ignore-nix.follows = "git-ignore-nix";
|
git-ignore-nix.follows = "git-ignore-nix";
|
||||||
@@ -56,13 +56,17 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
nixified-ai = { url = "github:nixified-ai/flake"; };
|
nixified-ai = {url = "github:nixified-ai/flake";};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{
|
outputs = inputs @ {
|
||||||
self, nixpkgs, nixos-hardware, home-manager, nix, ...
|
self,
|
||||||
}:
|
nixpkgs,
|
||||||
let
|
nixos-hardware,
|
||||||
|
home-manager,
|
||||||
|
nix,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
machinesPath = ../machines;
|
machinesPath = ../machines;
|
||||||
machineFilenames = builtins.attrNames (builtins.readDir machinesPath);
|
machineFilenames = builtins.attrNames (builtins.readDir machinesPath);
|
||||||
machineNameFromFilename = filename: builtins.head (builtins.split "\\." filename);
|
machineNameFromFilename = filename: builtins.head (builtins.split "\\." filename);
|
||||||
@@ -70,44 +74,49 @@
|
|||||||
mkConfigurationParams = filename: {
|
mkConfigurationParams = filename: {
|
||||||
name = machineNameFromFilename filename;
|
name = machineNameFromFilename filename;
|
||||||
value = {
|
value = {
|
||||||
modules = [ (machinesPath + ("/" + filename)) ];
|
modules = [(machinesPath + ("/" + filename))];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
defaultConfigurationParams =
|
defaultConfigurationParams =
|
||||||
builtins.listToAttrs (map mkConfigurationParams machineFilenames);
|
builtins.listToAttrs (map mkConfigurationParams machineFilenames);
|
||||||
customParams = {
|
customParams = {
|
||||||
biskcomp = {
|
biskcomp = {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
};
|
|
||||||
air-gapped-pi = {
|
|
||||||
system = "aarch64-linux";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
mkConfig =
|
air-gapped-pi = {
|
||||||
args@
|
system = "aarch64-linux";
|
||||||
{ system ? "x86_64-linux"
|
};
|
||||||
, baseModules ? []
|
};
|
||||||
, modules ? []
|
mkConfig = args @ {
|
||||||
, specialArgs ? {}
|
system ? "x86_64-linux",
|
||||||
, ...
|
baseModules ? [],
|
||||||
}:
|
modules ? [],
|
||||||
nixpkgs.lib.nixosSystem (args // {
|
specialArgs ? {},
|
||||||
inherit system;
|
...
|
||||||
modules = baseModules ++ modules;
|
}:
|
||||||
specialArgs = rec {
|
nixpkgs.lib.nixosSystem (args
|
||||||
inherit inputs machineNames;
|
// {
|
||||||
makeEnable = (import ../make-enable.nix) nixpkgs.lib;
|
inherit system;
|
||||||
realUsers = [ "root" "imalison" "kat" "dean" "alex" "ben"];
|
modules = baseModules ++ modules;
|
||||||
} // specialArgs // (import ../keys.nix);
|
specialArgs =
|
||||||
});
|
rec {
|
||||||
in
|
inherit inputs machineNames;
|
||||||
{
|
makeEnable = (import ../make-enable.nix) nixpkgs.lib;
|
||||||
nixosConfigurations = builtins.mapAttrs (machineName: params:
|
realUsers = ["root" "imalison" "kat" "dean" "alex" "ben"];
|
||||||
let machineParams =
|
}
|
||||||
if builtins.hasAttr machineName customParams
|
// specialArgs // (import ../keys.nix);
|
||||||
then (builtins.getAttr machineName customParams)
|
});
|
||||||
else {};
|
in {
|
||||||
in mkConfig (params // machineParams)
|
nixosConfigurations =
|
||||||
) defaultConfigurationParams;
|
builtins.mapAttrs (
|
||||||
|
machineName: params: let
|
||||||
|
machineParams =
|
||||||
|
if builtins.hasAttr machineName customParams
|
||||||
|
then (builtins.getAttr machineName customParams)
|
||||||
|
else {};
|
||||||
|
in
|
||||||
|
mkConfig (params // machineParams)
|
||||||
|
)
|
||||||
|
defaultConfigurationParams;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
with lib;
|
|
||||||
let cfg = config.myModules.cache-server;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.myModules.cache-server;
|
||||||
|
in {
|
||||||
options = {
|
options = {
|
||||||
myModules.cache-server = {
|
myModules.cache-server = {
|
||||||
enable = mkEnableOption "nix cache server";
|
enable = mkEnableOption "nix cache server";
|
||||||
@@ -31,4 +34,3 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{ machineNames, ... }:
|
{machineNames, ...}: {
|
||||||
{
|
|
||||||
# nix.settings.substituters = map (machineName: "ssh-ng://imalison@${machineName}.local") machineNames;
|
# nix.settings.substituters = map (machineName: "ssh-ng://imalison@${machineName}.local") machineNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,16 @@
|
|||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, agenix }: {
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
flake-utils,
|
||||||
|
agenix,
|
||||||
|
}: {
|
||||||
# Keep this minimal: NixOS flake currently doesn't use railbird-secrets, but
|
# Keep this minimal: NixOS flake currently doesn't use railbird-secrets, but
|
||||||
# Nix will still try to fetch/resolve all inputs during evaluation.
|
# Nix will still try to fetch/resolve all inputs during evaluation.
|
||||||
keys = {
|
keys = {
|
||||||
kanivanKeys = [ ];
|
kanivanKeys = [];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./android.nix
|
./android.nix
|
||||||
./base.nix
|
./base.nix
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{ config, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
let
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
cfg = config.myModules.cua;
|
cfg = config.myModules.cua;
|
||||||
flavorDefaults = {
|
flavorDefaults = {
|
||||||
xfce = {
|
xfce = {
|
||||||
@@ -24,8 +26,7 @@ let
|
|||||||
};
|
};
|
||||||
selectedFlavor = flavorDefaults.${cfg.flavor};
|
selectedFlavor = flavorDefaults.${cfg.flavor};
|
||||||
usingQemu = cfg.flavor == "qemu-linux";
|
usingQemu = cfg.flavor == "qemu-linux";
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.myModules.cua = {
|
options.myModules.cua = {
|
||||||
enable = lib.mkEnableOption "Cua Linux computer-use sandbox";
|
enable = lib.mkEnableOption "Cua Linux computer-use sandbox";
|
||||||
|
|
||||||
@@ -76,13 +77,13 @@ in
|
|||||||
|
|
||||||
extraOptions = lib.mkOption {
|
extraOptions = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = [ ];
|
default = [];
|
||||||
description = "Extra options passed to the Cua Android container runtime.";
|
description = "Extra options passed to the Cua Android container runtime.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
flavor = lib.mkOption {
|
flavor = lib.mkOption {
|
||||||
type = lib.types.enum [ "xfce" "kasm" "qemu-linux" ];
|
type = lib.types.enum ["xfce" "kasm" "qemu-linux"];
|
||||||
default = "xfce";
|
default = "xfce";
|
||||||
description = "Cua Linux sandbox flavor to run.";
|
description = "Cua Linux sandbox flavor to run.";
|
||||||
};
|
};
|
||||||
@@ -170,7 +171,7 @@ in
|
|||||||
|
|
||||||
extraOptions = lib.mkOption {
|
extraOptions = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = [ ];
|
default = [];
|
||||||
description = "Extra options passed to the container runtime.";
|
description = "Extra options passed to the container runtime.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -186,13 +187,14 @@ in
|
|||||||
cua-sandbox = {
|
cua-sandbox = {
|
||||||
image = cfg.image;
|
image = cfg.image;
|
||||||
autoStart = cfg.autoStart;
|
autoStart = cfg.autoStart;
|
||||||
ports = [
|
ports =
|
||||||
"${cfg.bindAddress}:${toString cfg.noVncPort}:${toString selectedFlavor.noVncContainerPort}"
|
[
|
||||||
"${cfg.bindAddress}:${toString cfg.apiPort}:${toString selectedFlavor.apiContainerPort}"
|
"${cfg.bindAddress}:${toString cfg.noVncPort}:${toString selectedFlavor.noVncContainerPort}"
|
||||||
]
|
"${cfg.bindAddress}:${toString cfg.apiPort}:${toString selectedFlavor.apiContainerPort}"
|
||||||
++ lib.optionals (cfg.flavor == "xfce" && cfg.vncPort != null) [
|
]
|
||||||
"${cfg.bindAddress}:${toString cfg.vncPort}:5901"
|
++ lib.optionals (cfg.flavor == "xfce" && cfg.vncPort != null) [
|
||||||
];
|
"${cfg.bindAddress}:${toString cfg.vncPort}:5901"
|
||||||
|
];
|
||||||
volumes = [
|
volumes = [
|
||||||
"${toString cfg.storageDir}:${selectedFlavor.storageMountPath}"
|
"${toString cfg.storageDir}:${selectedFlavor.storageMountPath}"
|
||||||
];
|
];
|
||||||
@@ -215,7 +217,7 @@ in
|
|||||||
VNCOPTIONS = "-disableBasicAuth";
|
VNCOPTIONS = "-disableBasicAuth";
|
||||||
};
|
};
|
||||||
extraOptions =
|
extraOptions =
|
||||||
lib.optionals (!usingQemu) [ "--shm-size=${cfg.shmSize}" ]
|
lib.optionals (!usingQemu) ["--shm-size=${cfg.shmSize}"]
|
||||||
++ cfg.extraOptions;
|
++ cfg.extraOptions;
|
||||||
};
|
};
|
||||||
cua-android = lib.mkIf cfg.android.enable {
|
cua-android = lib.mkIf cfg.android.enable {
|
||||||
@@ -238,9 +240,9 @@ in
|
|||||||
|
|
||||||
networking.firewall.allowedTCPPorts =
|
networking.firewall.allowedTCPPorts =
|
||||||
lib.optionals cfg.openFirewall (
|
lib.optionals cfg.openFirewall (
|
||||||
[ cfg.apiPort cfg.noVncPort ]
|
[cfg.apiPort cfg.noVncPort]
|
||||||
++ lib.optional (cfg.flavor == "xfce" && cfg.vncPort != null) cfg.vncPort
|
++ lib.optional (cfg.flavor == "xfce" && cfg.vncPort != null) cfg.vncPort
|
||||||
)
|
)
|
||||||
++ lib.optionals cfg.android.openFirewall [ cfg.android.apiPort cfg.android.webVncPort ];
|
++ lib.optionals cfg.android.openFirewall [cfg.android.apiPort cfg.android.webVncPort];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
lib,
|
lib,
|
||||||
makeEnable,
|
makeEnable,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.myModules.desktop;
|
cfg = config.myModules.desktop;
|
||||||
desktopShellUi = pkgs.writeShellApplication {
|
desktopShellUi = pkgs.writeShellApplication {
|
||||||
name = "desktop_shell_ui";
|
name = "desktop_shell_ui";
|
||||||
@@ -20,194 +19,194 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
enabledModule = makeEnable config "myModules.desktop" true {
|
enabledModule = makeEnable config "myModules.desktop" true {
|
||||||
services.greenclip.enable = true;
|
services.greenclip.enable = true;
|
||||||
imports = [
|
imports = [
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./keyd.nix
|
./keyd.nix
|
||||||
./wlsunset.nix
|
./wlsunset.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = !(config.myModules.taffybar.enable && config.myModules.waybar.enable);
|
assertion = !(config.myModules.taffybar.enable && config.myModules.waybar.enable);
|
||||||
message = "myModules.taffybar and myModules.waybar cannot both be enabled.";
|
message = "myModules.taffybar and myModules.waybar cannot both be enabled.";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
exportConfiguration = true;
|
exportConfiguration = true;
|
||||||
enable = true;
|
enable = true;
|
||||||
displayManager = {
|
displayManager = {
|
||||||
sessionCommands = ''
|
sessionCommands = ''
|
||||||
systemctl --user import-environment GDK_PIXBUF_MODULE_FILE DBUS_SESSION_BUS_ADDRESS PATH
|
systemctl --user import-environment GDK_PIXBUF_MODULE_FILE DBUS_SESSION_BUS_ADDRESS PATH
|
||||||
'';
|
'';
|
||||||
setupCommands = ''
|
setupCommands = ''
|
||||||
autorandr -c
|
autorandr -c
|
||||||
systemctl restart autorandr.service
|
systemctl restart autorandr.service
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.autorandr = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.sessionVariables = {
|
|
||||||
# This is for the benefit of VSCODE running natively in wayland
|
|
||||||
NIXOS_OZONE_WL = "1";
|
|
||||||
IM_HYPRLAND_SHELL_UI = cfg.shellUi;
|
|
||||||
};
|
|
||||||
|
|
||||||
system.activationScripts.playwrightChromeCompat.text = lib.optionalString (pkgs.stdenv.hostPlatform.system == "x86_64-linux") ''
|
|
||||||
# Playwright's Chrome channel lookup expects the FHS path below.
|
|
||||||
mkdir -p /opt/google/chrome
|
|
||||||
ln -sfn ${pkgs.google-chrome}/bin/google-chrome-stable /opt/google/chrome/chrome
|
|
||||||
'';
|
|
||||||
|
|
||||||
services.gnome.at-spi2-core.enable = true;
|
|
||||||
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
|
||||||
|
|
||||||
home-manager.sharedModules = [
|
|
||||||
{
|
|
||||||
imports = [./dunst.nix];
|
|
||||||
|
|
||||||
xdg.desktopEntries."com.mitchellh.ghostty" = {
|
|
||||||
name = "Ghostty";
|
|
||||||
comment = "A terminal emulator";
|
|
||||||
icon = "com.mitchellh.ghostty";
|
|
||||||
terminal = false;
|
|
||||||
type = "Application";
|
|
||||||
categories = ["System" "TerminalEmulator"];
|
|
||||||
startupNotify = true;
|
|
||||||
exec = "${pkgs.ghostty}/bin/ghostty --gtk-single-instance=false";
|
|
||||||
settings = {
|
|
||||||
StartupWMClass = "com.mitchellh.ghostty";
|
|
||||||
X-GNOME-UsesNotifications = "true";
|
|
||||||
X-TerminalArgExec = "-e";
|
|
||||||
X-TerminalArgTitle = "--title=";
|
|
||||||
X-TerminalArgAppId = "--class=";
|
|
||||||
X-TerminalArgDir = "--working-directory=";
|
|
||||||
X-TerminalArgHold = "--wait-after-command";
|
|
||||||
};
|
|
||||||
actions = {
|
|
||||||
new-window = {
|
|
||||||
name = "New Window";
|
|
||||||
exec = "${pkgs.ghostty}/bin/ghostty --gtk-single-instance=false";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile."ghostty/config" = {
|
|
||||||
force = true;
|
|
||||||
text = ''
|
|
||||||
confirm-close-surface = false
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs;
|
services.autorandr = {
|
||||||
[
|
enable = true;
|
||||||
desktopShellUi
|
};
|
||||||
|
|
||||||
# Appearance
|
environment.sessionVariables = {
|
||||||
adwaita-icon-theme
|
# This is for the benefit of VSCODE running natively in wayland
|
||||||
hicolor-icon-theme
|
NIXOS_OZONE_WL = "1";
|
||||||
# libsForQt5.breeze-gtk
|
IM_HYPRLAND_SHELL_UI = cfg.shellUi;
|
||||||
# materia-theme
|
};
|
||||||
kdePackages.qt6ct
|
|
||||||
libsForQt5.qt5ct
|
|
||||||
numix-icon-theme-circle
|
|
||||||
papirus-icon-theme
|
|
||||||
|
|
||||||
# XOrg
|
system.activationScripts.playwrightChromeCompat.text = lib.optionalString (pkgs.stdenv.hostPlatform.system == "x86_64-linux") ''
|
||||||
autorandr
|
# Playwright's Chrome channel lookup expects the FHS path below.
|
||||||
keyd
|
mkdir -p /opt/google/chrome
|
||||||
wmctrl
|
ln -sfn ${pkgs.google-chrome}/bin/google-chrome-stable /opt/google/chrome/chrome
|
||||||
xclip
|
'';
|
||||||
xdotool
|
|
||||||
xev
|
|
||||||
xwininfo
|
|
||||||
xsettingsd
|
|
||||||
|
|
||||||
# Desktop
|
services.gnome.at-spi2-core.enable = true;
|
||||||
alacritty
|
|
||||||
ghostty
|
|
||||||
blueman
|
|
||||||
# clipit
|
|
||||||
d-spy
|
|
||||||
kdePackages.dolphin
|
|
||||||
|
|
||||||
feh
|
services.gnome.gnome-keyring.enable = true;
|
||||||
file-roller
|
|
||||||
gthumb
|
|
||||||
firefox
|
|
||||||
cheese
|
|
||||||
kdePackages.kleopatra
|
|
||||||
libnotify
|
|
||||||
libreoffice
|
|
||||||
loupe
|
|
||||||
lxappearance
|
|
||||||
lxqt.lxqt-powermanagement
|
|
||||||
networkmanagerapplet
|
|
||||||
kdePackages.okular
|
|
||||||
pinentry-gnome3
|
|
||||||
# mission-center
|
|
||||||
quassel
|
|
||||||
remmina
|
|
||||||
rofi
|
|
||||||
wofi
|
|
||||||
rofi-pass
|
|
||||||
rofi-systemd
|
|
||||||
simplescreenrecorder
|
|
||||||
skippy-xd
|
|
||||||
transmission_4-gtk
|
|
||||||
vlc
|
|
||||||
thunar
|
|
||||||
|
|
||||||
# Audio
|
home-manager.sharedModules = [
|
||||||
picard
|
{
|
||||||
pavucontrol
|
imports = [./dunst.nix];
|
||||||
playerctl
|
|
||||||
pulsemixer
|
|
||||||
espeak
|
|
||||||
|
|
||||||
#
|
xdg.desktopEntries."com.mitchellh.ghostty" = {
|
||||||
brightnessctl
|
name = "Ghostty";
|
||||||
|
comment = "A terminal emulator";
|
||||||
|
icon = "com.mitchellh.ghostty";
|
||||||
|
terminal = false;
|
||||||
|
type = "Application";
|
||||||
|
categories = ["System" "TerminalEmulator"];
|
||||||
|
startupNotify = true;
|
||||||
|
exec = "${pkgs.ghostty}/bin/ghostty --gtk-single-instance=false";
|
||||||
|
settings = {
|
||||||
|
StartupWMClass = "com.mitchellh.ghostty";
|
||||||
|
X-GNOME-UsesNotifications = "true";
|
||||||
|
X-TerminalArgExec = "-e";
|
||||||
|
X-TerminalArgTitle = "--title=";
|
||||||
|
X-TerminalArgAppId = "--class=";
|
||||||
|
X-TerminalArgDir = "--working-directory=";
|
||||||
|
X-TerminalArgHold = "--wait-after-command";
|
||||||
|
};
|
||||||
|
actions = {
|
||||||
|
new-window = {
|
||||||
|
name = "New Window";
|
||||||
|
exec = "${pkgs.ghostty}/bin/ghostty --gtk-single-instance=false";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Visualization
|
xdg.configFile."ghostty/config" = {
|
||||||
graphviz
|
force = true;
|
||||||
mermaid-cli
|
text = ''
|
||||||
]
|
confirm-close-surface = false
|
||||||
++ (
|
'';
|
||||||
if pkgs.stdenv.hostPlatform.system == "x86_64-linux"
|
};
|
||||||
then
|
}
|
||||||
with pkgs; [
|
];
|
||||||
google-chrome
|
|
||||||
pommed_light
|
environment.systemPackages = with pkgs;
|
||||||
slack
|
[
|
||||||
spicetify-cli
|
desktopShellUi
|
||||||
spotify
|
|
||||||
tor-browser
|
# Appearance
|
||||||
vscode
|
adwaita-icon-theme
|
||||||
zulip
|
hicolor-icon-theme
|
||||||
]
|
# libsForQt5.breeze-gtk
|
||||||
else []
|
# materia-theme
|
||||||
);
|
kdePackages.qt6ct
|
||||||
|
libsForQt5.qt5ct
|
||||||
|
numix-icon-theme-circle
|
||||||
|
papirus-icon-theme
|
||||||
|
|
||||||
|
# XOrg
|
||||||
|
autorandr
|
||||||
|
keyd
|
||||||
|
wmctrl
|
||||||
|
xclip
|
||||||
|
xdotool
|
||||||
|
xev
|
||||||
|
xwininfo
|
||||||
|
xsettingsd
|
||||||
|
|
||||||
|
# Desktop
|
||||||
|
alacritty
|
||||||
|
ghostty
|
||||||
|
blueman
|
||||||
|
# clipit
|
||||||
|
d-spy
|
||||||
|
kdePackages.dolphin
|
||||||
|
|
||||||
|
feh
|
||||||
|
file-roller
|
||||||
|
gthumb
|
||||||
|
firefox
|
||||||
|
cheese
|
||||||
|
kdePackages.kleopatra
|
||||||
|
libnotify
|
||||||
|
libreoffice
|
||||||
|
loupe
|
||||||
|
lxappearance
|
||||||
|
lxqt.lxqt-powermanagement
|
||||||
|
networkmanagerapplet
|
||||||
|
kdePackages.okular
|
||||||
|
pinentry-gnome3
|
||||||
|
# mission-center
|
||||||
|
quassel
|
||||||
|
remmina
|
||||||
|
rofi
|
||||||
|
wofi
|
||||||
|
rofi-pass
|
||||||
|
rofi-systemd
|
||||||
|
simplescreenrecorder
|
||||||
|
skippy-xd
|
||||||
|
transmission_4-gtk
|
||||||
|
vlc
|
||||||
|
thunar
|
||||||
|
|
||||||
|
# Audio
|
||||||
|
picard
|
||||||
|
pavucontrol
|
||||||
|
playerctl
|
||||||
|
pulsemixer
|
||||||
|
espeak
|
||||||
|
|
||||||
|
#
|
||||||
|
brightnessctl
|
||||||
|
|
||||||
|
# Visualization
|
||||||
|
graphviz
|
||||||
|
mermaid-cli
|
||||||
|
]
|
||||||
|
++ (
|
||||||
|
if pkgs.stdenv.hostPlatform.system == "x86_64-linux"
|
||||||
|
then
|
||||||
|
with pkgs; [
|
||||||
|
google-chrome
|
||||||
|
pommed_light
|
||||||
|
slack
|
||||||
|
spicetify-cli
|
||||||
|
spotify
|
||||||
|
tor-browser
|
||||||
|
vscode
|
||||||
|
zulip
|
||||||
|
]
|
||||||
|
else []
|
||||||
|
);
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
enabledModule
|
enabledModule
|
||||||
// {
|
// {
|
||||||
options = lib.recursiveUpdate enabledModule.options {
|
options = lib.recursiveUpdate enabledModule.options {
|
||||||
myModules.desktop.shellUi = lib.mkOption {
|
myModules.desktop.shellUi = lib.mkOption {
|
||||||
type = lib.types.enum [ "noctalia" "taffybar" ];
|
type = lib.types.enum ["noctalia" "taffybar"];
|
||||||
default = "taffybar";
|
default = "taffybar";
|
||||||
description = ''
|
description = ''
|
||||||
Desktop shell UI used by Hyprland-oriented bindings. This controls
|
Desktop shell UI used by Hyprland-oriented bindings. This controls
|
||||||
the active shell service and Hyprland launcher/window picker dispatch.
|
the active shell service and Hyprland launcher/window picker dispatch.
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
}
|
|
||||||
|
|||||||
143
nixos/dunst.nix
143
nixos/dunst.nix
@@ -1,91 +1,90 @@
|
|||||||
{
|
{
|
||||||
services.dunst = {
|
services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
global =
|
global = {
|
||||||
{
|
monitor = 0;
|
||||||
monitor = 0;
|
follow = "mouse";
|
||||||
follow = "mouse";
|
indicate_hidden = "yes";
|
||||||
indicate_hidden = "yes";
|
stack_duplicates = true;
|
||||||
stack_duplicates = true;
|
hide_duplicate_count = false;
|
||||||
hide_duplicate_count = false;
|
|
||||||
|
|
||||||
title = "Dunst";
|
title = "Dunst";
|
||||||
class = "Dunst";
|
class = "Dunst";
|
||||||
|
|
||||||
show_age_threshold = 60;
|
show_age_threshold = 60;
|
||||||
ellipsize = "middle";
|
ellipsize = "middle";
|
||||||
ignore_newline = "no";
|
ignore_newline = "no";
|
||||||
show_indicators = "no";
|
show_indicators = "no";
|
||||||
sticky_history = "no";
|
sticky_history = "no";
|
||||||
history_length = 20;
|
history_length = 20;
|
||||||
|
|
||||||
always_run_script = true;
|
always_run_script = true;
|
||||||
ignore_dbusclose = false;
|
ignore_dbusclose = false;
|
||||||
force_xinerama = false;
|
force_xinerama = false;
|
||||||
|
|
||||||
# Notification
|
# Notification
|
||||||
sort = "yes";
|
sort = "yes";
|
||||||
scale = 0;
|
scale = 0;
|
||||||
shrink = "no";
|
shrink = "no";
|
||||||
word_wrap = "yes";
|
word_wrap = "yes";
|
||||||
|
|
||||||
# Geometry
|
# Geometry
|
||||||
width = 300;
|
width = 300;
|
||||||
height = 200;
|
height = 200;
|
||||||
origin = "top-right";
|
origin = "top-right";
|
||||||
offset = "12+48";
|
offset = "12+48";
|
||||||
|
|
||||||
padding = 20;
|
padding = 20;
|
||||||
horizontal_padding = 20;
|
horizontal_padding = 20;
|
||||||
notification_limit = 0;
|
notification_limit = 0;
|
||||||
separator_height = 2;
|
separator_height = 2;
|
||||||
|
|
||||||
# Progress-Bar
|
# Progress-Bar
|
||||||
progress_bar = true;
|
progress_bar = true;
|
||||||
progress_bar_height = 10;
|
progress_bar_height = 10;
|
||||||
progress_bar_frame_width = 1;
|
progress_bar_frame_width = 1;
|
||||||
progress_bar_min_width = 150;
|
progress_bar_min_width = 150;
|
||||||
progress_bar_max_width = 300;
|
progress_bar_max_width = 300;
|
||||||
|
|
||||||
# # Aesthetics
|
# # Aesthetics
|
||||||
# font = let
|
# font = let
|
||||||
# inherit (config.modules.themes.font.mono) family weight;
|
# inherit (config.modules.themes.font.mono) family weight;
|
||||||
# in "${family} ${weight} 11";
|
# in "${family} ${weight} 11";
|
||||||
frame_width = 2;
|
frame_width = 2;
|
||||||
separator_color = "frame";
|
separator_color = "frame";
|
||||||
transparency = 30;
|
transparency = 30;
|
||||||
|
|
||||||
line_height = 1;
|
line_height = 1;
|
||||||
idle_threshold = 120;
|
idle_threshold = 120;
|
||||||
markup = "full";
|
markup = "full";
|
||||||
format = "<span font='13' weight='bold'>%s</span>\\n%b";
|
format = "<span font='13' weight='bold'>%s</span>\\n%b";
|
||||||
alignment = "left";
|
alignment = "left";
|
||||||
vertical_alignment = "center";
|
vertical_alignment = "center";
|
||||||
|
|
||||||
icon_position = "left";
|
icon_position = "left";
|
||||||
min_icon_size = 0;
|
min_icon_size = 0;
|
||||||
max_icon_size = 64;
|
max_icon_size = 64;
|
||||||
|
|
||||||
# Keybindings
|
# Keybindings
|
||||||
close = "ctrl+space";
|
close = "ctrl+space";
|
||||||
close_all = "ctrl+shift+space";
|
close_all = "ctrl+shift+space";
|
||||||
history = "ctrl+grave";
|
history = "ctrl+grave";
|
||||||
context = "ctrl+shift+period";
|
context = "ctrl+shift+period";
|
||||||
|
|
||||||
mouse_left_click = "close_current";
|
mouse_left_click = "close_current";
|
||||||
mouse_middle_click = "do_action, close_current";
|
mouse_middle_click = "do_action, close_current";
|
||||||
mouse_right_click = "close_all";
|
mouse_right_click = "close_all";
|
||||||
};
|
};
|
||||||
|
|
||||||
experimental = {per_monitor_dpi = true;};
|
experimental = {per_monitor_dpi = true;};
|
||||||
fullscreen_pushback_everything = {fullscreen = "pushback";};
|
fullscreen_pushback_everything = {fullscreen = "pushback";};
|
||||||
global = {
|
global = {
|
||||||
highlight = "#ffffff";
|
highlight = "#ffffff";
|
||||||
foreground = "#ffffff";
|
foreground = "#ffffff";
|
||||||
background = "#000000";
|
background = "#000000";
|
||||||
frame_color = "#ffffff";
|
frame_color = "#ffffff";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# // optionalAttrs (active != null) {
|
# // optionalAttrs (active != null) {
|
||||||
# urgency_low = let
|
# urgency_low = let
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ pkgs, config, makeEnable, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.electron" false {
|
makeEnable config "myModules.electron" false {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
element-desktop
|
element-desktop
|
||||||
@@ -9,22 +14,26 @@ makeEnable config "myModules.electron" false {
|
|||||||
zoom-us
|
zoom-us
|
||||||
];
|
];
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
(if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then {
|
(
|
||||||
# systemd.user.services.bitwarden = {
|
if pkgs.stdenv.hostPlatform.system == "x86_64-linux"
|
||||||
# Unit = {
|
then {
|
||||||
# Description = "Bitwarden";
|
# systemd.user.services.bitwarden = {
|
||||||
# After = [ "graphical-session-pre.target" "tray.target" ];
|
# Unit = {
|
||||||
# PartOf = [ "graphical-session.target" ];
|
# Description = "Bitwarden";
|
||||||
# };
|
# After = [ "graphical-session-pre.target" "tray.target" ];
|
||||||
|
# PartOf = [ "graphical-session.target" ];
|
||||||
|
# };
|
||||||
|
|
||||||
# Install = { WantedBy = [ "graphical-session.target" ]; };
|
# Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||||
|
|
||||||
# Service = {
|
# Service = {
|
||||||
# ExecStart = "${pkgs.bitwarden}/bin/bitwarden";
|
# ExecStart = "${pkgs.bitwarden}/bin/bitwarden";
|
||||||
# Restart = "always";
|
# Restart = "always";
|
||||||
# RestartSec = 3;
|
# RestartSec = 3;
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
} else {})
|
}
|
||||||
|
else {}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
final: prev:
|
final: prev: {
|
||||||
{
|
|
||||||
# Keep pkgs.emacs as a real Emacs package (used by other derivations / emacsPackages),
|
# Keep pkgs.emacs as a real Emacs package (used by other derivations / emacsPackages),
|
||||||
# but provide an "auto" wrapper for interactive use that selects the right GUI backend.
|
# but provide an "auto" wrapper for interactive use that selects the right GUI backend.
|
||||||
emacs = prev."emacs30-pgtk".override {
|
emacs = prev."emacs30-pgtk".override {
|
||||||
@@ -24,109 +23,107 @@ final: prev:
|
|||||||
pname = "emacs-auto";
|
pname = "emacs-auto";
|
||||||
version = final.emacs.version or "unknown";
|
version = final.emacs.version or "unknown";
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
nativeBuildInputs = [ final.makeWrapper ];
|
nativeBuildInputs = [final.makeWrapper];
|
||||||
|
|
||||||
installPhase =
|
installPhase = let
|
||||||
let
|
emacsWayland = final.emacs-wayland;
|
||||||
emacsWayland = final.emacs-wayland;
|
emacsX11 = final.emacs-x11;
|
||||||
emacsX11 = final.emacs-x11;
|
in ''
|
||||||
in
|
mkdir -p "$out/bin" "$out/share/applications" "$out/share/icons" "$out/share/pixmaps"
|
||||||
''
|
|
||||||
mkdir -p "$out/bin" "$out/share/applications" "$out/share/icons" "$out/share/pixmaps"
|
|
||||||
|
|
||||||
# Ensure desktop integrations (icons) exist even though we don't install the raw emacs packages.
|
# Ensure desktop integrations (icons) exist even though we don't install the raw emacs packages.
|
||||||
if [ -d "${emacsWayland}/share/icons" ]; then
|
if [ -d "${emacsWayland}/share/icons" ]; then
|
||||||
ln -s "${emacsWayland}/share/icons/hicolor" "$out/share/icons/hicolor"
|
ln -s "${emacsWayland}/share/icons/hicolor" "$out/share/icons/hicolor"
|
||||||
fi
|
fi
|
||||||
if [ -d "${emacsWayland}/share/pixmaps" ]; then
|
if [ -d "${emacsWayland}/share/pixmaps" ]; then
|
||||||
ln -s "${emacsWayland}/share/pixmaps/"* "$out/share/pixmaps/" || true
|
ln -s "${emacsWayland}/share/pixmaps/"* "$out/share/pixmaps/" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Convenience explicit launchers.
|
# Convenience explicit launchers.
|
||||||
makeWrapper ${emacsWayland}/bin/emacs "$out/bin/emacs-wayland" \
|
makeWrapper ${emacsWayland}/bin/emacs "$out/bin/emacs-wayland" \
|
||||||
--set GDK_BACKEND wayland
|
--set GDK_BACKEND wayland
|
||||||
makeWrapper ${emacsX11}/bin/emacs "$out/bin/emacs-x11" \
|
makeWrapper ${emacsX11}/bin/emacs "$out/bin/emacs-x11" \
|
||||||
--set GDK_BACKEND x11
|
--set GDK_BACKEND x11
|
||||||
|
|
||||||
# Main launcher.
|
# Main launcher.
|
||||||
cat > "$out/bin/emacs" <<'EOF_EMACS_WRAPPER'
|
cat > "$out/bin/emacs" <<'EOF_EMACS_WRAPPER'
|
||||||
#!${final.runtimeShell}
|
#!${final.runtimeShell}
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
backend="''${EMACS_AUTO_BACKEND:-}"
|
backend="''${EMACS_AUTO_BACKEND:-}"
|
||||||
tty=0
|
tty=0
|
||||||
for a in "$@"; do
|
for a in "$@"; do
|
||||||
case "$a" in
|
case "$a" in
|
||||||
-nw|--nw|--tty|--terminal|--no-window-system) tty=1 ;;
|
-nw|--nw|--tty|--terminal|--no-window-system) tty=1 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$backend" = "wayland" ] || [ "$backend" = "pgtk" ]; then
|
if [ "$backend" = "wayland" ] || [ "$backend" = "pgtk" ]; then
|
||||||
exec "@out@/bin/emacs-wayland" "$@"
|
exec "@out@/bin/emacs-wayland" "$@"
|
||||||
fi
|
fi
|
||||||
if [ "$backend" = "x11" ]; then
|
if [ "$backend" = "x11" ]; then
|
||||||
exec "@out@/bin/emacs-x11" "$@"
|
exec "@out@/bin/emacs-x11" "$@"
|
||||||
fi
|
fi
|
||||||
if [ "$backend" = "tty" ]; then
|
if [ "$backend" = "tty" ]; then
|
||||||
exec "@emacsX11@/bin/emacs" -nw "$@"
|
exec "@emacsX11@/bin/emacs" -nw "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$tty" -eq 1 ]; then
|
if [ "$tty" -eq 1 ]; then
|
||||||
# Respect the user's explicit -nw, but still run a consistent binary.
|
# Respect the user's explicit -nw, but still run a consistent binary.
|
||||||
exec "@emacsX11@/bin/emacs" "$@"
|
exec "@emacsX11@/bin/emacs" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prefer Wayland if it looks like a Wayland session.
|
# Prefer Wayland if it looks like a Wayland session.
|
||||||
if [ -n "''${WAYLAND_DISPLAY:-}" ] || [ "''${XDG_SESSION_TYPE:-}" = "wayland" ] || [ -n "''${HYPRLAND_INSTANCE_SIGNATURE:-}" ]; then
|
if [ -n "''${WAYLAND_DISPLAY:-}" ] || [ "''${XDG_SESSION_TYPE:-}" = "wayland" ] || [ -n "''${HYPRLAND_INSTANCE_SIGNATURE:-}" ]; then
|
||||||
exec "@out@/bin/emacs-wayland" "$@"
|
exec "@out@/bin/emacs-wayland" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Otherwise, if X is available, use the X11 build.
|
# Otherwise, if X is available, use the X11 build.
|
||||||
if [ -n "''${DISPLAY:-}" ] || [ "''${XDG_SESSION_TYPE:-}" = "x11" ]; then
|
if [ -n "''${DISPLAY:-}" ] || [ "''${XDG_SESSION_TYPE:-}" = "x11" ]; then
|
||||||
exec "@out@/bin/emacs-x11" "$@"
|
exec "@out@/bin/emacs-x11" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Headless fallback.
|
# Headless fallback.
|
||||||
exec "@emacsX11@/bin/emacs" -nw "$@"
|
exec "@emacsX11@/bin/emacs" -nw "$@"
|
||||||
EOF_EMACS_WRAPPER
|
EOF_EMACS_WRAPPER
|
||||||
|
|
||||||
substituteInPlace "$out/bin/emacs" \
|
substituteInPlace "$out/bin/emacs" \
|
||||||
--subst-var out \
|
--subst-var out \
|
||||||
--replace-fail "@emacsX11@" "${emacsX11}"
|
--replace-fail "@emacsX11@" "${emacsX11}"
|
||||||
chmod +x "$out/bin/emacs"
|
chmod +x "$out/bin/emacs"
|
||||||
|
|
||||||
# emacsclient is compatible across builds as long as versions match; use one.
|
# emacsclient is compatible across builds as long as versions match; use one.
|
||||||
ln -s ${emacsX11}/bin/emacsclient "$out/bin/emacsclient"
|
ln -s ${emacsX11}/bin/emacsclient "$out/bin/emacsclient"
|
||||||
|
|
||||||
cat > "$out/share/applications/emacs.desktop" <<'EOF'
|
cat > "$out/share/applications/emacs.desktop" <<'EOF'
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Emacs
|
Name=Emacs
|
||||||
GenericName=Text Editor
|
GenericName=Text Editor
|
||||||
Comment=Edit text
|
Comment=Edit text
|
||||||
Exec=emacs %F
|
Exec=emacs %F
|
||||||
TryExec=emacs
|
TryExec=emacs
|
||||||
Icon=emacs
|
Icon=emacs
|
||||||
Type=Application
|
Type=Application
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Categories=Development;TextEditor;
|
Categories=Development;TextEditor;
|
||||||
MimeType=text/plain;
|
MimeType=text/plain;
|
||||||
StartupWMClass=Emacs
|
StartupWMClass=Emacs
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat > "$out/share/applications/emacsclient.desktop" <<'EOF'
|
cat > "$out/share/applications/emacsclient.desktop" <<'EOF'
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Emacs (Client)
|
Name=Emacs (Client)
|
||||||
GenericName=Text Editor
|
GenericName=Text Editor
|
||||||
Comment=Edit text using a running Emacs server
|
Comment=Edit text using a running Emacs server
|
||||||
Exec=emacsclient -c -a emacs %F
|
Exec=emacsclient -c -a emacs %F
|
||||||
TryExec=emacsclient
|
TryExec=emacsclient
|
||||||
Icon=emacs
|
Icon=emacs
|
||||||
Type=Application
|
Type=Application
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Categories=Development;TextEditor;
|
Categories=Development;TextEditor;
|
||||||
MimeType=text/plain;
|
MimeType=text/plain;
|
||||||
StartupWMClass=Emacs
|
StartupWMClass=Emacs
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
{ pkgs, config, specialArgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
specialArgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.emacs = {
|
services.emacs = {
|
||||||
enable = false;
|
enable = false;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
{ config, pkgs, options, lib, inputs, ... }:
|
{
|
||||||
let
|
config,
|
||||||
|
pkgs,
|
||||||
|
options,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
libDir = "${config.dotfiles-directory}/dotfiles/lib";
|
libDir = "${config.dotfiles-directory}/dotfiles/lib";
|
||||||
machineFilenames = builtins.attrNames (builtins.readDir ./machines);
|
machineFilenames = builtins.attrNames (builtins.readDir ./machines);
|
||||||
machineNameFromFilename = filename: builtins.head (builtins.split "\\." filename);
|
machineNameFromFilename = filename: builtins.head (builtins.split "\\." filename);
|
||||||
@@ -14,129 +20,130 @@ let
|
|||||||
managedSshHostCasePattern = lib.concatStringsSep "|" managedSshHostPatterns;
|
managedSshHostCasePattern = lib.concatStringsSep "|" managedSshHostPatterns;
|
||||||
multiplexerAliases = import ../shared/multiplexer-aliases.nix;
|
multiplexerAliases = import ../shared/multiplexer-aliases.nix;
|
||||||
in
|
in
|
||||||
with lib;
|
with lib; {
|
||||||
{
|
options = {
|
||||||
options = {
|
dotfiles-directory = mkOption {
|
||||||
dotfiles-directory = mkOption {
|
type = types.path;
|
||||||
type = types.path;
|
default = ../.;
|
||||||
default = ../.;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
# Shell configuration
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
syntaxHighlighting = {
|
|
||||||
enable = true;
|
|
||||||
};
|
};
|
||||||
ohMyZsh = {
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# Shell configuration
|
||||||
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [ "git" "sudo" "pip" ];
|
syntaxHighlighting = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
ohMyZsh = {
|
||||||
|
enable = true;
|
||||||
|
plugins = ["git" "sudo" "pip"];
|
||||||
|
};
|
||||||
|
shellInit = ''
|
||||||
|
fpath=("$HOME/.lib/completions" "${libDir}/completions" $fpath)
|
||||||
|
fpath+="${libDir}/functions"
|
||||||
|
for file in "${libDir}/functions/"*
|
||||||
|
do
|
||||||
|
autoload "''${file##*/}"
|
||||||
|
done
|
||||||
|
fpath+="${pkgs.python-with-my-packages}/lib/python3.11/site-packages/argcomplete/bash_completion.d"
|
||||||
|
'';
|
||||||
|
interactiveShellInit = ''
|
||||||
|
eval "$(register-python-argcomplete prb)"
|
||||||
|
eval "$(register-python-argcomplete prod-prb)"
|
||||||
|
eval "$(register-python-argcomplete railbird)"
|
||||||
|
[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/zsh"
|
||||||
|
|
||||||
|
# Enable bracketed paste
|
||||||
|
autoload -Uz bracketed-paste-magic
|
||||||
|
zle -N bracketed-paste bracketed-paste-magic
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
shellInit = ''
|
|
||||||
fpath=("$HOME/.lib/completions" "${libDir}/completions" $fpath)
|
|
||||||
fpath+="${libDir}/functions"
|
|
||||||
for file in "${libDir}/functions/"*
|
|
||||||
do
|
|
||||||
autoload "''${file##*/}"
|
|
||||||
done
|
|
||||||
fpath+="${pkgs.python-with-my-packages}/lib/python3.11/site-packages/argcomplete/bash_completion.d"
|
|
||||||
'';
|
|
||||||
interactiveShellInit = ''
|
|
||||||
eval "$(register-python-argcomplete prb)"
|
|
||||||
eval "$(register-python-argcomplete prod-prb)"
|
|
||||||
eval "$(register-python-argcomplete railbird)"
|
|
||||||
[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/zsh"
|
|
||||||
|
|
||||||
# Enable bracketed paste
|
programs.bash = {
|
||||||
autoload -Uz bracketed-paste-magic
|
interactiveShellInit = ''
|
||||||
zle -N bracketed-paste bracketed-paste-magic
|
eval "$(register-python-argcomplete prb)"
|
||||||
'';
|
eval "$(register-python-argcomplete prod-prb)"
|
||||||
};
|
eval "$(register-python-argcomplete railbird)"
|
||||||
|
[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/bash"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
programs.bash = {
|
programs.starship = {
|
||||||
interactiveShellInit = ''
|
enable = true;
|
||||||
eval "$(register-python-argcomplete prb)"
|
interactiveOnly = true;
|
||||||
eval "$(register-python-argcomplete prod-prb)"
|
settings = {
|
||||||
eval "$(register-python-argcomplete railbird)"
|
add_newline = false;
|
||||||
[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/bash"
|
character = {
|
||||||
'';
|
success_symbol = "[➜](bold green)";
|
||||||
};
|
error_symbol = "[➜](bold red)";
|
||||||
|
};
|
||||||
programs.starship = {
|
|
||||||
enable = true;
|
|
||||||
interactiveOnly = true;
|
|
||||||
settings = {
|
|
||||||
add_newline = false;
|
|
||||||
character = {
|
|
||||||
success_symbol = "[➜](bold green)";
|
|
||||||
error_symbol = "[➜](bold red)";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
homeBinInPath = true;
|
homeBinInPath = true;
|
||||||
localBinInPath = true;
|
localBinInPath = true;
|
||||||
enableAllTerminfo = true;
|
enableAllTerminfo = true;
|
||||||
shellAliases = {
|
shellAliases =
|
||||||
df_ssh = "TERM=xterm-256color ssh -o StrictHostKeyChecking=no";
|
{
|
||||||
fix_nix = "LD_LIBRARY_PATH='' nix";
|
df_ssh = "TERM=xterm-256color ssh -o StrictHostKeyChecking=no";
|
||||||
xo = "xdg-open";
|
fix_nix = "LD_LIBRARY_PATH='' nix";
|
||||||
} // multiplexerAliases;
|
xo = "xdg-open";
|
||||||
variables = {
|
}
|
||||||
ROFI_SYSTEMD_TERM = "ghostty -e";
|
// multiplexerAliases;
|
||||||
NIXPKGS_GIT_REV = "${inputs.nixpkgs.rev}";
|
variables = {
|
||||||
NIXPKGS_SOURCE = "${inputs.nixpkgs.outPath}";
|
ROFI_SYSTEMD_TERM = "ghostty -e";
|
||||||
EDITOR = "emacsclient --alternate-editor emacs";
|
NIXPKGS_GIT_REV = "${inputs.nixpkgs.rev}";
|
||||||
QT_QPA_PLATFORMTHEME = "qt6ct";
|
NIXPKGS_SOURCE = "${inputs.nixpkgs.outPath}";
|
||||||
};
|
EDITOR = "emacsclient --alternate-editor emacs";
|
||||||
interactiveShellInit = ''
|
QT_QPA_PLATFORMTHEME = "qt6ct";
|
||||||
_df_is_managed_ssh_host() {
|
};
|
||||||
local host="$1"
|
interactiveShellInit = ''
|
||||||
case "$host" in
|
_df_is_managed_ssh_host() {
|
||||||
${managedSshHostCasePattern}) return 0 ;;
|
local host="$1"
|
||||||
*) return 1 ;;
|
case "$host" in
|
||||||
esac
|
${managedSshHostCasePattern}) return 0 ;;
|
||||||
}
|
*) return 1 ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
_df_ssh_target_host() {
|
_df_ssh_target_host() {
|
||||||
command ssh -G "$@" 2>/dev/null | awk '/^hostname / { print $2; exit }'
|
command ssh -G "$@" 2>/dev/null | awk '/^hostname / { print $2; exit }'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Keep advanced TERM on managed hosts, force compatibility elsewhere.
|
# Keep advanced TERM on managed hosts, force compatibility elsewhere.
|
||||||
ssh() {
|
ssh() {
|
||||||
local host
|
local host
|
||||||
host="$(_df_ssh_target_host "$@")"
|
host="$(_df_ssh_target_host "$@")"
|
||||||
if [ -n "$host" ] && _df_is_managed_ssh_host "$host"; then
|
if [ -n "$host" ] && _df_is_managed_ssh_host "$host"; then
|
||||||
command ssh "$@"
|
command ssh "$@"
|
||||||
else
|
|
||||||
TERM=xterm-256color command ssh "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
vterm_printf(){
|
|
||||||
if [ -n "$TMUX" ] && ([ "''${TERM%%-*}" = "tmux" ] || [ "''${TERM%%-*}" = "screen" ] ); then
|
|
||||||
# Tell tmux to pass the escape sequences through
|
|
||||||
printf "\ePtmux;\e\e]%s\007\e\\" "$1"
|
|
||||||
elif [ "''${TERM%%-*}" = "screen" ]; then
|
|
||||||
# GNU screen (screen, screen-256color, screen-256color-bce)
|
|
||||||
printf "\eP\e]%s\007\e\\" "$1"
|
|
||||||
else
|
else
|
||||||
printf "\e]%s\e\\" "$1"
|
TERM=xterm-256color command ssh "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
if [[ "$INSIDE_EMACS" = 'vterm' ]] \
|
|
||||||
&& [[ -n ''${EMACS_VTERM_PATH} ]] \
|
vterm_printf(){
|
||||||
&& [[ -f ''${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh ]]; then
|
if [ -n "$TMUX" ] && ([ "''${TERM%%-*}" = "tmux" ] || [ "''${TERM%%-*}" = "screen" ] ); then
|
||||||
source ''${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh
|
# Tell tmux to pass the escape sequences through
|
||||||
fi
|
printf "\ePtmux;\e\e]%s\007\e\\" "$1"
|
||||||
export STARSHIP_INSIDE_EMACS="yes"
|
elif [ "''${TERM%%-*}" = "screen" ]; then
|
||||||
'';
|
# GNU screen (screen, screen-256color, screen-256color-bce)
|
||||||
extraInit = ''
|
printf "\eP\e]%s\007\e\\" "$1"
|
||||||
export PATH="$HOME/.cargo/bin:${libDir}/bin:${libDir}/functions:$PATH";
|
else
|
||||||
'';
|
printf "\e]%s\e\\" "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
if [[ "$INSIDE_EMACS" = 'vterm' ]] \
|
||||||
|
&& [[ -n ''${EMACS_VTERM_PATH} ]] \
|
||||||
|
&& [[ -f ''${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh ]]; then
|
||||||
|
source ''${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh
|
||||||
|
fi
|
||||||
|
export STARSHIP_INSIDE_EMACS="yes"
|
||||||
|
'';
|
||||||
|
extraInit = ''
|
||||||
|
export PATH="$HOME/.cargo/bin:${libDir}/bin:${libDir}/functions:$PATH";
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, makeEnable, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.extra" false {
|
makeEnable config "myModules.extra" false {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
android-studio
|
android-studio
|
||||||
|
|||||||
286
nixos/flake.nix
286
nixos/flake.nix
@@ -531,150 +531,160 @@
|
|||||||
hypr-workspace-history = inputs.hypr-workspace-history.packages.${system}.hypr-workspace-history;
|
hypr-workspace-history = inputs.hypr-workspace-history.packages.${system}.hypr-workspace-history;
|
||||||
};
|
};
|
||||||
|
|
||||||
checks = lib.optionalAttrs pkgs.stdenv.isLinux {
|
checks =
|
||||||
hyprNStack = inputs.hyprNStack.packages.${system}.hyprNStack;
|
{
|
||||||
hyprexpo-lua = inputs.hyprland-plugins-lua.packages.${system}.hyprexpo;
|
formatting =
|
||||||
hyprwinview = inputs.hyprwinview.packages.${system}.hyprwinview;
|
pkgs.runCommand "alejandra-formatting-check" {
|
||||||
hypr-workspace-history = inputs.hypr-workspace-history.packages.${system}.hypr-workspace-history;
|
nativeBuildInputs = [pkgs.alejandra];
|
||||||
hyprland-config-syntax =
|
} ''
|
||||||
pkgs.runCommand "hyprland-config-syntax" {
|
alejandra --check ${./.}
|
||||||
nativeBuildInputs = [pkgs.lua5_4];
|
touch "$out"
|
||||||
} ''
|
'';
|
||||||
cp ${../dotfiles/config/hypr/hyprland.lua} hyprland.lua
|
}
|
||||||
luac -p hyprland.lua
|
// lib.optionalAttrs pkgs.stdenv.isLinux {
|
||||||
if grep -n 'hyprctl' hyprland.lua | grep -v 'hyprctl reload' | grep -v 'hyprctl eval' | grep -v 'hyprctl_eval' | grep -v 'hyprctl -j monitors'; then
|
hyprNStack = inputs.hyprNStack.packages.${system}.hyprNStack;
|
||||||
echo "hyprland.lua should not shell out to hyprctl for window/workspace manipulation" >&2
|
hyprexpo-lua = inputs.hyprland-plugins-lua.packages.${system}.hyprexpo;
|
||||||
exit 1
|
hyprwinview = inputs.hyprwinview.packages.${system}.hyprwinview;
|
||||||
fi
|
hypr-workspace-history = inputs.hypr-workspace-history.packages.${system}.hypr-workspace-history;
|
||||||
lua <<'LUA'
|
hyprland-config-syntax =
|
||||||
local callbacks = {}
|
pkgs.runCommand "hyprland-config-syntax" {
|
||||||
|
nativeBuildInputs = [pkgs.lua5_4];
|
||||||
|
} ''
|
||||||
|
cp ${../dotfiles/config/hypr/hyprland.lua} hyprland.lua
|
||||||
|
luac -p hyprland.lua
|
||||||
|
if grep -n 'hyprctl' hyprland.lua | grep -v 'hyprctl reload' | grep -v 'hyprctl eval' | grep -v 'hyprctl_eval' | grep -v 'hyprctl -j monitors'; then
|
||||||
|
echo "hyprland.lua should not shell out to hyprctl for window/workspace manipulation" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
lua <<'LUA'
|
||||||
|
local callbacks = {}
|
||||||
|
|
||||||
local function noop() end
|
local function noop() end
|
||||||
|
|
||||||
local function dispatcher_proxy()
|
local function dispatcher_proxy()
|
||||||
local proxy = {}
|
local proxy = {}
|
||||||
return setmetatable(proxy, {
|
return setmetatable(proxy, {
|
||||||
__index = function()
|
__index = function()
|
||||||
return dispatcher_proxy()
|
return dispatcher_proxy()
|
||||||
|
end,
|
||||||
|
__call = function()
|
||||||
|
return noop
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
local notification = {
|
||||||
|
is_alive = function()
|
||||||
|
return true
|
||||||
end,
|
end,
|
||||||
__call = function()
|
set_text = noop,
|
||||||
return noop
|
set_timeout = noop,
|
||||||
|
pause = noop,
|
||||||
|
resume = noop,
|
||||||
|
set_paused = noop,
|
||||||
|
dismiss = noop,
|
||||||
|
}
|
||||||
|
|
||||||
|
local monitor = {
|
||||||
|
id = 1,
|
||||||
|
name = "stub-monitor",
|
||||||
|
focused = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
local workspace = {
|
||||||
|
id = 1,
|
||||||
|
name = "1",
|
||||||
|
windows = 0,
|
||||||
|
special = false,
|
||||||
|
monitor = monitor,
|
||||||
|
}
|
||||||
|
|
||||||
|
monitor.active_workspace = workspace
|
||||||
|
|
||||||
|
hl = {
|
||||||
|
animation = noop,
|
||||||
|
bind = noop,
|
||||||
|
config = noop,
|
||||||
|
curve = noop,
|
||||||
|
env = noop,
|
||||||
|
exec_cmd = noop,
|
||||||
|
define_submap = function(_, reset_or_callback, callback)
|
||||||
|
local cb = type(reset_or_callback) == "function" and reset_or_callback or callback
|
||||||
|
if cb then
|
||||||
|
cb()
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
monitor = noop,
|
||||||
end
|
workspace_rule = noop,
|
||||||
|
window_rule = noop,
|
||||||
local notification = {
|
dsp = dispatcher_proxy(),
|
||||||
is_alive = function()
|
notification = {
|
||||||
return true
|
create = function()
|
||||||
end,
|
return notification
|
||||||
set_text = noop,
|
end,
|
||||||
set_timeout = noop,
|
},
|
||||||
pause = noop,
|
plugin = {
|
||||||
resume = noop,
|
load = noop,
|
||||||
set_paused = noop,
|
},
|
||||||
dismiss = noop,
|
get_active_workspace = function()
|
||||||
}
|
|
||||||
|
|
||||||
local monitor = {
|
|
||||||
id = 1,
|
|
||||||
name = "stub-monitor",
|
|
||||||
focused = true,
|
|
||||||
}
|
|
||||||
|
|
||||||
local workspace = {
|
|
||||||
id = 1,
|
|
||||||
name = "1",
|
|
||||||
windows = 0,
|
|
||||||
special = false,
|
|
||||||
monitor = monitor,
|
|
||||||
}
|
|
||||||
|
|
||||||
monitor.active_workspace = workspace
|
|
||||||
|
|
||||||
hl = {
|
|
||||||
animation = noop,
|
|
||||||
bind = noop,
|
|
||||||
config = noop,
|
|
||||||
curve = noop,
|
|
||||||
env = noop,
|
|
||||||
exec_cmd = noop,
|
|
||||||
define_submap = function(_, reset_or_callback, callback)
|
|
||||||
local cb = type(reset_or_callback) == "function" and reset_or_callback or callback
|
|
||||||
if cb then
|
|
||||||
cb()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
monitor = noop,
|
|
||||||
workspace_rule = noop,
|
|
||||||
window_rule = noop,
|
|
||||||
dsp = dispatcher_proxy(),
|
|
||||||
notification = {
|
|
||||||
create = function()
|
|
||||||
return notification
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
plugin = {
|
|
||||||
load = noop,
|
|
||||||
},
|
|
||||||
get_active_workspace = function()
|
|
||||||
return workspace
|
|
||||||
end,
|
|
||||||
get_active_monitor = function()
|
|
||||||
return monitor
|
|
||||||
end,
|
|
||||||
get_active_window = function()
|
|
||||||
return nil
|
|
||||||
end,
|
|
||||||
get_monitor = function()
|
|
||||||
return monitor
|
|
||||||
end,
|
|
||||||
get_workspace = function(id)
|
|
||||||
if tostring(id) == "1" then
|
|
||||||
return workspace
|
return workspace
|
||||||
end
|
end,
|
||||||
return nil
|
get_active_monitor = function()
|
||||||
end,
|
return monitor
|
||||||
get_windows = function()
|
end,
|
||||||
return {}
|
get_active_window = function()
|
||||||
end,
|
return nil
|
||||||
get_workspace_windows = function()
|
end,
|
||||||
return {}
|
get_monitor = function()
|
||||||
end,
|
return monitor
|
||||||
on = function(_, callback)
|
end,
|
||||||
callbacks[#callbacks + 1] = callback
|
get_workspace = function(id)
|
||||||
end,
|
if tostring(id) == "1" then
|
||||||
timer = function(callback)
|
return workspace
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end,
|
||||||
|
get_windows = function()
|
||||||
|
return {}
|
||||||
|
end,
|
||||||
|
get_workspace_windows = function()
|
||||||
|
return {}
|
||||||
|
end,
|
||||||
|
on = function(_, callback)
|
||||||
|
callbacks[#callbacks + 1] = callback
|
||||||
|
end,
|
||||||
|
timer = function(callback)
|
||||||
|
callback()
|
||||||
|
return {
|
||||||
|
set_enabled = noop,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
dofile("./hyprland.lua")
|
||||||
|
|
||||||
|
for _, callback in ipairs(callbacks) do
|
||||||
callback()
|
callback()
|
||||||
return {
|
end
|
||||||
set_enabled = noop,
|
LUA
|
||||||
}
|
touch "$out"
|
||||||
end,
|
'';
|
||||||
}
|
hyprland-verify-config = let
|
||||||
|
hyprlandPackage = inputs.hyprland.packages.${system}.hyprland;
|
||||||
dofile("./hyprland.lua")
|
hyprNStackPackage = inputs.hyprNStack.packages.${system}.hyprNStack;
|
||||||
|
in
|
||||||
for _, callback in ipairs(callbacks) do
|
pkgs.runCommand "hyprland-lua-verify-config" {} ''
|
||||||
callback()
|
cp ${../dotfiles/config/hypr/hyprland.lua} hyprland.lua
|
||||||
end
|
substituteInPlace hyprland.lua \
|
||||||
LUA
|
--replace-fail /run/current-system/sw/lib/libhyprNStack.so \
|
||||||
touch "$out"
|
${hyprNStackPackage}/lib/libhyprNStack.so
|
||||||
'';
|
export XDG_RUNTIME_DIR="$TMPDIR/runtime"
|
||||||
hyprland-verify-config = let
|
mkdir -p "$XDG_RUNTIME_DIR"
|
||||||
hyprlandPackage = inputs.hyprland.packages.${system}.hyprland;
|
HYPRLAND_NO_CRASHREPORTER=1 ${pkgs.coreutils}/bin/timeout 20s \
|
||||||
hyprNStackPackage = inputs.hyprNStack.packages.${system}.hyprNStack;
|
${hyprlandPackage}/bin/Hyprland --verify-config --config "$PWD/hyprland.lua"
|
||||||
in
|
touch "$out"
|
||||||
pkgs.runCommand "hyprland-lua-verify-config" {} ''
|
'';
|
||||||
cp ${../dotfiles/config/hypr/hyprland.lua} hyprland.lua
|
};
|
||||||
substituteInPlace hyprland.lua \
|
|
||||||
--replace-fail /run/current-system/sw/lib/libhyprNStack.so \
|
|
||||||
${hyprNStackPackage}/lib/libhyprNStack.so
|
|
||||||
export XDG_RUNTIME_DIR="$TMPDIR/runtime"
|
|
||||||
mkdir -p "$XDG_RUNTIME_DIR"
|
|
||||||
HYPRLAND_NO_CRASHREPORTER=1 ${pkgs.coreutils}/bin/timeout 20s \
|
|
||||||
${hyprlandPackage}/bin/Hyprland --verify-config --config "$PWD/hyprland.lua"
|
|
||||||
touch "$out"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Dev shell for org-agenda-api deployment
|
# Dev shell for org-agenda-api deployment
|
||||||
devShells.org-agenda-api = pkgs.mkShell {
|
devShells.org-agenda-api = pkgs.mkShell {
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ pkgs, makeEnable, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
makeEnable,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.fonts" true {
|
makeEnable config "myModules.fonts" true {
|
||||||
# Enable the gtk icon cache
|
# Enable the gtk icon cache
|
||||||
gtk.iconCache.enable = true;
|
gtk.iconCache.enable = true;
|
||||||
@@ -32,9 +37,9 @@ makeEnable config "myModules.fonts" true {
|
|||||||
allowBitmaps = true;
|
allowBitmaps = true;
|
||||||
useEmbeddedBitmaps = true;
|
useEmbeddedBitmaps = true;
|
||||||
defaultFonts = {
|
defaultFonts = {
|
||||||
monospace = [ "JetBrains Mono" ];
|
monospace = ["JetBrains Mono"];
|
||||||
sansSerif = [ "Roboto" ];
|
sansSerif = ["Roboto"];
|
||||||
serif = [ "Source Serif Pro" ];
|
serif = ["Source Serif Pro"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, makeEnable, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.games" false {
|
makeEnable config "myModules.games" false {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
steam
|
steam
|
||||||
|
|||||||
@@ -1,64 +1,71 @@
|
|||||||
{ pkgs, config, makeEnable, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.gitea-runner" false {
|
makeEnable config "myModules.gitea-runner" false {
|
||||||
age.secrets.gitea-runner-token = {
|
age.secrets.gitea-runner-token = {
|
||||||
file = ./secrets/gitea-runner-token.age;
|
file = ./secrets/gitea-runner-token.age;
|
||||||
group = "docker";
|
group = "docker";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.gitea-actions-runner.instances.nix =
|
services.gitea-actions-runner.instances.nix = let
|
||||||
let gitea-runner-directory = "/var/lib/gitea-runner";
|
gitea-runner-directory = "/var/lib/gitea-runner";
|
||||||
in {
|
in {
|
||||||
settings = {
|
settings = {
|
||||||
cache = {
|
cache = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
};
|
};
|
||||||
container = {
|
container = {
|
||||||
workdir_parent = "${gitea-runner-directory}/workspace";
|
workdir_parent = "${gitea-runner-directory}/workspace";
|
||||||
# Increase shared memory for containers (default 64MB is too small for Metro/Gradle)
|
# Increase shared memory for containers (default 64MB is too small for Metro/Gradle)
|
||||||
options = "--shm-size=2g";
|
options = "--shm-size=2g";
|
||||||
};
|
};
|
||||||
host = {
|
host = {
|
||||||
workdir_parent = "${gitea-runner-directory}/action-cache-dir";
|
workdir_parent = "${gitea-runner-directory}/action-cache-dir";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
hostPackages = with pkgs; [
|
|
||||||
bash
|
|
||||||
coreutils
|
|
||||||
curl
|
|
||||||
direnv
|
|
||||||
docker
|
|
||||||
gawk
|
|
||||||
git-lfs
|
|
||||||
gitFull
|
|
||||||
gnused
|
|
||||||
just
|
|
||||||
nixVersions.stable
|
|
||||||
nodejs
|
|
||||||
openssh
|
|
||||||
wget
|
|
||||||
];
|
|
||||||
enable = true;
|
|
||||||
name = config.networking.hostName;
|
|
||||||
url = "https://dev.railbird.ai";
|
|
||||||
tokenFile = config.age.secrets.gitea-runner-token.path;
|
|
||||||
labels = [
|
|
||||||
"nixos-${pkgs.stdenv.hostPlatform.system}:host"
|
|
||||||
"nix:docker://localhost:5921/nix-runner"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
hostPackages = with pkgs; [
|
||||||
|
bash
|
||||||
|
coreutils
|
||||||
|
curl
|
||||||
|
direnv
|
||||||
|
docker
|
||||||
|
gawk
|
||||||
|
git-lfs
|
||||||
|
gitFull
|
||||||
|
gnused
|
||||||
|
just
|
||||||
|
nixVersions.stable
|
||||||
|
nodejs
|
||||||
|
openssh
|
||||||
|
wget
|
||||||
|
];
|
||||||
|
enable = true;
|
||||||
|
name = config.networking.hostName;
|
||||||
|
url = "https://dev.railbird.ai";
|
||||||
|
tokenFile = config.age.secrets.gitea-runner-token.path;
|
||||||
|
labels = [
|
||||||
|
"nixos-${pkgs.stdenv.hostPlatform.system}:host"
|
||||||
|
"nix:docker://localhost:5921/nix-runner"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.gitea-runner-nix = {
|
systemd.services.gitea-runner-nix = {
|
||||||
environment = let gitea-runner-directory = "/var/lib/gitea-runner"; in {
|
environment = let
|
||||||
XDG_CONFIG_HOME = gitea-runner-directory;
|
gitea-runner-directory = "/var/lib/gitea-runner";
|
||||||
XDG_CACHE_HOME = "${gitea-runner-directory}/.cache";
|
in {
|
||||||
};
|
XDG_CONFIG_HOME = gitea-runner-directory;
|
||||||
serviceConfig.PrivateTmp = false;
|
XDG_CACHE_HOME = "${gitea-runner-directory}/.cache";
|
||||||
};
|
|
||||||
users.groups.gitea-runner = {};
|
|
||||||
users.users.gitea-runner = {
|
|
||||||
isSystemUser = true;
|
|
||||||
group = "gitea-runner";
|
|
||||||
extraGroups = ["docker"];
|
|
||||||
home = "/var/lib/gitea-runner";
|
|
||||||
};
|
};
|
||||||
|
serviceConfig.PrivateTmp = false;
|
||||||
|
};
|
||||||
|
users.groups.gitea-runner = {};
|
||||||
|
users.users.gitea-runner = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "gitea-runner";
|
||||||
|
extraGroups = ["docker"];
|
||||||
|
home = "/var/lib/gitea-runner";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ config, makeEnable, ... }:
|
{
|
||||||
|
config,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.gitea" false {
|
makeEnable config "myModules.gitea" false {
|
||||||
|
|
||||||
services.gitea = {
|
services.gitea = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
{ config, makeEnable, ... }:
|
{
|
||||||
|
config,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.gnome" false {
|
makeEnable config "myModules.gnome" false {
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
desktopManager.gnome.enable = true;
|
desktopManager.gnome.enable = true;
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
{ pkgs, config, lib, makeEnable, realUsers, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
makeEnable,
|
||||||
|
realUsers,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.home-assistant" false {
|
makeEnable config "myModules.home-assistant" false {
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
# For all interfaces (e.g. if you want to accept RA on all):
|
# For all interfaces (e.g. if you want to accept RA on all):
|
||||||
@@ -97,11 +104,12 @@ makeEnable config "myModules.home-assistant" false {
|
|||||||
"yale"
|
"yale"
|
||||||
"zwave_js"
|
"zwave_js"
|
||||||
];
|
];
|
||||||
extraPackages = python3Packages: with python3Packages; [
|
extraPackages = python3Packages:
|
||||||
numpy
|
with python3Packages; [
|
||||||
python-matter-server
|
numpy
|
||||||
universal-silabs-flasher
|
python-matter-server
|
||||||
];
|
universal-silabs-flasher
|
||||||
|
];
|
||||||
config = {
|
config = {
|
||||||
http = {
|
http = {
|
||||||
use_x_forwarded_for = true;
|
use_x_forwarded_for = true;
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: let
|
||||||
let
|
|
||||||
session = import ./session-variables.nix;
|
session = import ./session-variables.nix;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
home-manager.users.imalison = {
|
home-manager.users.imalison = {
|
||||||
imports = [
|
imports = [
|
||||||
./emacs.nix
|
./emacs.nix
|
||||||
@@ -145,8 +143,8 @@ in
|
|||||||
Unit = {
|
Unit = {
|
||||||
Description = "Hyprpaper (managed by home-manager)";
|
Description = "Hyprpaper (managed by home-manager)";
|
||||||
ConditionEnvironment = session.hyprland;
|
ConditionEnvironment = session.hyprland;
|
||||||
PartOf = [ "hyprland-session.target" ];
|
PartOf = ["hyprland-session.target"];
|
||||||
After = [ "hyprland-session.target" ];
|
After = ["hyprland-session.target"];
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: let
|
||||||
let
|
|
||||||
quillIcSrc = pkgs.fetchFromGitHub {
|
quillIcSrc = pkgs.fetchFromGitHub {
|
||||||
owner = "dfinity";
|
owner = "dfinity";
|
||||||
repo = "ic";
|
repo = "ic";
|
||||||
@@ -8,18 +7,19 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
quillFixed = pkgs.quill.overrideAttrs (old: {
|
quillFixed = pkgs.quill.overrideAttrs (old: {
|
||||||
preBuild = (old.preBuild or "") + ''
|
preBuild =
|
||||||
# The vendored git dependency resolves ../ledger.did from source-git-*,
|
(old.preBuild or "")
|
||||||
# not from the vendor root where nixpkgs currently copies it.
|
+ ''
|
||||||
for dir in /build/quill-*-vendor/source-git-*; do
|
# The vendored git dependency resolves ../ledger.did from source-git-*,
|
||||||
if [ -d "$dir" ]; then
|
# not from the vendor root where nixpkgs currently copies it.
|
||||||
cp ${quillIcSrc}/rs/rosetta-api/icp_ledger/ledger.did "$dir/ledger.did"
|
for dir in /build/quill-*-vendor/source-git-*; do
|
||||||
fi
|
if [ -d "$dir" ]; then
|
||||||
done
|
cp ${quillIcSrc}/rs/rosetta-api/icp_ledger/ledger.did "$dir/ledger.did"
|
||||||
'';
|
fi
|
||||||
|
done
|
||||||
|
'';
|
||||||
});
|
});
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
ic-keysmith
|
ic-keysmith
|
||||||
quillFixed
|
quillFixed
|
||||||
|
|||||||
@@ -60,11 +60,11 @@ in {
|
|||||||
settings = {
|
settings = {
|
||||||
plugins."io.containerd.cri.v1.runtime" = {
|
plugins."io.containerd.cri.v1.runtime" = {
|
||||||
enable_cdi = true;
|
enable_cdi = true;
|
||||||
cdi_spec_dirs = [ "/var/run/cdi" ];
|
cdi_spec_dirs = ["/var/run/cdi"];
|
||||||
};
|
};
|
||||||
plugins."io.containerd.grpc.v1.cri" = {
|
plugins."io.containerd.grpc.v1.cri" = {
|
||||||
enable_cdi = true;
|
enable_cdi = true;
|
||||||
cdi_spec_dirs = [ "/var/run/cdi" ];
|
cdi_spec_dirs = ["/var/run/cdi"];
|
||||||
cni.bin_dir = "${plugins-path}/bin";
|
cni.bin_dir = "${plugins-path}/bin";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -97,13 +97,13 @@ in {
|
|||||||
|
|
||||||
systemd.services.mount-railbird-bucket = {
|
systemd.services.mount-railbird-bucket = {
|
||||||
after = ["agenix.service"];
|
after = ["agenix.service"];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = ["multi-user.target"];
|
||||||
description = "Mount railbird bucket";
|
description = "Mount railbird bucket";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
Restart = "on-failure"; # Restart the service on failure
|
Restart = "on-failure"; # Restart the service on failure
|
||||||
RestartSec = 5; # Wait 5 seconds before restarti
|
RestartSec = 5; # Wait 5 seconds before restarti
|
||||||
TimeoutStopSec = 2;
|
TimeoutStopSec = 2;
|
||||||
ExecStartPre = [
|
ExecStartPre = [
|
||||||
"-${pkgs.util-linux}/bin/umount -f ${mount-path}"
|
"-${pkgs.util-linux}/bin/umount -f ${mount-path}"
|
||||||
@@ -114,7 +114,7 @@ in {
|
|||||||
ExecStart = let
|
ExecStart = let
|
||||||
key-file = config.age.secrets.api-service-key.path;
|
key-file = config.age.secrets.api-service-key.path;
|
||||||
in
|
in
|
||||||
pkgs.writeShellScript "mount-railbird-bucket" ''
|
pkgs.writeShellScript "mount-railbird-bucket" ''
|
||||||
while true; do
|
while true; do
|
||||||
if ${pkgs.util-linux}/bin/mount | grep -q "${mount-path}" && [ -d "${mount-path}/dev" ]; then
|
if ${pkgs.util-linux}/bin/mount | grep -q "${mount-path}" && [ -d "${mount-path}/dev" ]; then
|
||||||
echo "Mount path ${mount-path} is mounted and valid (contains directory 'dev')."
|
echo "Mount path ${mount-path} is mounted and valid (contains directory 'dev')."
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ pkgs, config, makeEnable, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.kat" false {
|
makeEnable config "myModules.kat" false {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
obsidian
|
obsidian
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{ ... }: {
|
{...}: {
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
{ services.kbfs.enable = true; }
|
{services.kbfs.enable = true;}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, lib, makeEnable, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.keyd" true {
|
makeEnable config "myModules.keyd" true {
|
||||||
services.keyd = {
|
services.keyd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -6,7 +11,7 @@ makeEnable config "myModules.keyd" true {
|
|||||||
# Base remap applied to all keyboards.
|
# Base remap applied to all keyboards.
|
||||||
keyboards.default = {
|
keyboards.default = {
|
||||||
# Exclude the Glove80 (MoErgo) by vendor:product ID.
|
# Exclude the Glove80 (MoErgo) by vendor:product ID.
|
||||||
ids = [ "*" "-16c0:27db" ];
|
ids = ["*" "-16c0:27db"];
|
||||||
settings = {
|
settings = {
|
||||||
main = {
|
main = {
|
||||||
# Caps Lock -> Control
|
# Caps Lock -> Control
|
||||||
@@ -18,19 +23,19 @@ makeEnable config "myModules.keyd" true {
|
|||||||
rightalt = "layer(hyper)";
|
rightalt = "layer(hyper)";
|
||||||
};
|
};
|
||||||
# Hyper = Ctrl+Alt+Meta while held (matches $hyper = SUPER CTRL ALT)
|
# Hyper = Ctrl+Alt+Meta while held (matches $hyper = SUPER CTRL ALT)
|
||||||
"hyper:C-A-M" = { };
|
"hyper:C-A-M" = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# MoErgo Glove80: only map Right Meta/Super to Hyper.
|
# MoErgo Glove80: only map Right Meta/Super to Hyper.
|
||||||
keyboards.moErgo = {
|
keyboards.moErgo = {
|
||||||
ids = [ "16c0:27db" ];
|
ids = ["16c0:27db"];
|
||||||
settings = {
|
settings = {
|
||||||
main = {
|
main = {
|
||||||
rightmeta = "layer(hyper)";
|
rightmeta = "layer(hyper)";
|
||||||
};
|
};
|
||||||
# Hyper = Ctrl+Alt+Meta while held (matches $hyper = SUPER CTRL ALT)
|
# Hyper = Ctrl+Alt+Meta while held (matches $hyper = SUPER CTRL ALT)
|
||||||
"hyper:C-A-M" = { };
|
"hyper:C-A-M" = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, makeEnable, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.kubelet" false {
|
makeEnable config "myModules.kubelet" false {
|
||||||
age.secrets."api_service_account_key.json.age".file = ./secrets/api_service_account_key.json.age;
|
age.secrets."api_service_account_key.json.age".file = ./secrets/api_service_account_key.json.age;
|
||||||
services.kubernetes.kubelet = {
|
services.kubernetes.kubelet = {
|
||||||
@@ -11,7 +16,7 @@ makeEnable config "myModules.kubelet" false {
|
|||||||
};
|
};
|
||||||
registerNode = true;
|
registerNode = true;
|
||||||
cni = {
|
cni = {
|
||||||
packages = [ pkgs.cni-plugins pkgs.calico-cni-plugin ];
|
packages = [pkgs.cni-plugins pkgs.calico-cni-plugin];
|
||||||
};
|
};
|
||||||
extraOpts = ''
|
extraOpts = ''
|
||||||
--fail-swap-on=false
|
--fail-swap-on=false
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
{ makeEnable, config, ... }:
|
{
|
||||||
|
makeEnable,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.laptop" true {
|
makeEnable config "myModules.laptop" true {
|
||||||
services.logind.settings.Login.HandleLidSwitchExternalPower = "ignore";
|
services.logind.settings.Login.HandleLidSwitchExternalPower = "ignore";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
{ lib, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
inputs.nixos-hardware.nixosModules.dell-xps-17-9700-nvidia
|
inputs.nixos-hardware.nixosModules.dell-xps-17-9700-nvidia
|
||||||
];
|
];
|
||||||
@@ -32,11 +35,11 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
videoDrivers = [ "nvidia" ];
|
videoDrivers = ["nvidia"];
|
||||||
};
|
};
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
@@ -55,17 +58,17 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/18af5b4c-69c7-41a8-865e-bc3f5269d2f9";
|
device = "/dev/disk/by-uuid/18af5b4c-69c7-41a8-865e-bc3f5269d2f9";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/8A9F-D7D2";
|
device = "/dev/disk/by-uuid/8A9F-D7D2";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [];
|
||||||
|
|
||||||
networking.hostName = "adell";
|
networking.hostName = "adell";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
{ lib, pkgs, config, inputs, ... }:
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
];
|
];
|
||||||
@@ -25,17 +30,19 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
users.users.ben = {
|
users.users.ben = {
|
||||||
extraGroups = [
|
extraGroups =
|
||||||
"audio"
|
[
|
||||||
"adbusers"
|
"audio"
|
||||||
"disk"
|
"adbusers"
|
||||||
"docker"
|
"disk"
|
||||||
"networkmanager"
|
"docker"
|
||||||
"openrazer"
|
"networkmanager"
|
||||||
"plugdev"
|
"openrazer"
|
||||||
"syncthing"
|
"plugdev"
|
||||||
"systemd-journal"
|
"syncthing"
|
||||||
"video"
|
"systemd-journal"
|
||||||
] ++ ["wheel"];
|
"video"
|
||||||
|
]
|
||||||
|
++ ["wheel"];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
|
||||||
let biskcomp-nginx-hostnames = "192.168.1.44 railbird.ai 1896Folsom.duckdns.org biskcomp.local 0.0.0.0 67.162.131.71";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
biskcomp-nginx-hostnames = "192.168.1.44 railbird.ai 1896Folsom.duckdns.org biskcomp.local 0.0.0.0 67.162.131.71";
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
../raspberry-pi.nix
|
../raspberry-pi.nix
|
||||||
@@ -151,7 +155,10 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{ device = "/swapfile"; size = 8192; } # size is in MiB
|
{
|
||||||
|
device = "/swapfile";
|
||||||
|
size = 8192;
|
||||||
|
} # size is in MiB
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "biskcomp";
|
networking.hostName = "biskcomp";
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
];
|
];
|
||||||
@@ -21,12 +24,12 @@
|
|||||||
hardware.nvidiaOptimus.disable = true;
|
hardware.nvidiaOptimus.disable = true;
|
||||||
|
|
||||||
# install nvidia drivers in addition to intel one
|
# install nvidia drivers in addition to intel one
|
||||||
hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ];
|
hardware.opengl.extraPackages = [pkgs.linuxPackages.nvidia_x11.out];
|
||||||
hardware.opengl.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ];
|
hardware.opengl.extraPackages32 = [pkgs.linuxPackages.nvidia_x11.lib32];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod"];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
{ lib, pkgs, config, inputs, ... }:
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
{ lib, pkgs, config, inputs, ... }:
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
];
|
];
|
||||||
@@ -18,12 +21,18 @@
|
|||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = ["amdgpu"];
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [
|
||||||
"nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" "amdgpu"
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"rtsx_pci_sdmmc"
|
||||||
|
"amdgpu"
|
||||||
];
|
];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = ["kvm-amd"];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
@@ -34,8 +43,8 @@
|
|||||||
services.libinput.enable = true;
|
services.libinput.enable = true;
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
videoDrivers = [ "amdgpu" ];
|
videoDrivers = ["amdgpu"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
];
|
];
|
||||||
@@ -84,30 +87,30 @@
|
|||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
myModules.nvidia.enable = true;
|
myModules.nvidia.enable = true;
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod"];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
hardware.nvidia.modesetting.enable = true;
|
hardware.nvidia.modesetting.enable = true;
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
videoDrivers = [ "nvidia" ];
|
videoDrivers = ["nvidia"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/30583504-9530-4095-a556-da1209ef9b63";
|
device = "/dev/disk/by-uuid/30583504-9530-4095-a556-da1209ef9b63";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/CE95-E46C";
|
device = "/dev/disk/by-uuid/CE95-E46C";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{ device = "/dev/disk/by-uuid/598e9aa1-4940-4410-a2fa-3dfd8b7d2c0d"; }
|
{device = "/dev/disk/by-uuid/598e9aa1-4940-4410-a2fa-3dfd8b7d2c0d";}
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
];
|
];
|
||||||
@@ -36,15 +39,15 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.otbr-agent = {
|
systemd.services.otbr-agent = {
|
||||||
wants = [ "network-online.target" ];
|
wants = ["network-online.target"];
|
||||||
after = [ "network-online.target" ];
|
after = ["network-online.target"];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openthread-border-router = {
|
services.openthread-border-router = {
|
||||||
enable = true;
|
enable = true;
|
||||||
backboneInterface = "wpan0";
|
backboneInterface = "wpan0";
|
||||||
logLevel = "debug";
|
logLevel = "debug";
|
||||||
radio = {
|
radio = {
|
||||||
device = "/dev/serial/by-id/usb-Nabu_Casa_Home_Assistant_Connect_ZBT-1_0cd053abfa38ef119c66e1d154516304-if00-port0";
|
device = "/dev/serial/by-id/usb-Nabu_Casa_Home_Assistant_Connect_ZBT-1_0cd053abfa38ef119c66e1d154516304-if00-port0";
|
||||||
baudRate = 460800;
|
baudRate = 460800;
|
||||||
flowControl = true;
|
flowControl = true;
|
||||||
@@ -60,13 +63,14 @@
|
|||||||
services.matter-server = {
|
services.matter-server = {
|
||||||
enable = true;
|
enable = true;
|
||||||
logLevel = "debug";
|
logLevel = "debug";
|
||||||
extraArgs = let cert-dir = pkgs.fetchFromGitHub {
|
extraArgs = let
|
||||||
repo = "connectedhomeip";
|
cert-dir = pkgs.fetchFromGitHub {
|
||||||
owner = "project-chip";
|
repo = "connectedhomeip";
|
||||||
rev = "6e8676be6142bb541fa68048c77f2fc56a21c7b1";
|
owner = "project-chip";
|
||||||
hash = "sha256-QwPKn2R4mflTKMyr1k4xF04t0PJIlzNCOdXEiQwX5wk=";
|
rev = "6e8676be6142bb541fa68048c77f2fc56a21c7b1";
|
||||||
}; in
|
hash = "sha256-QwPKn2R4mflTKMyr1k4xF04t0PJIlzNCOdXEiQwX5wk=";
|
||||||
[
|
};
|
||||||
|
in [
|
||||||
"--bluetooth-adapter=0"
|
"--bluetooth-adapter=0"
|
||||||
"--paa-root-cert-dir=${cert-dir}/credentials/production/paa-root-certs"
|
"--paa-root-cert-dir=${cert-dir}/credentials/production/paa-root-certs"
|
||||||
"--enable-test-net-dcl"
|
"--enable-test-net-dcl"
|
||||||
@@ -109,11 +113,12 @@
|
|||||||
"wyoming"
|
"wyoming"
|
||||||
"yale"
|
"yale"
|
||||||
];
|
];
|
||||||
extraPackages = python3Packages: with python3Packages; [
|
extraPackages = python3Packages:
|
||||||
numpy
|
with python3Packages; [
|
||||||
python-matter-server
|
numpy
|
||||||
universal-silabs-flasher
|
python-matter-server
|
||||||
];
|
universal-silabs-flasher
|
||||||
|
];
|
||||||
config = {
|
config = {
|
||||||
http = {
|
http = {
|
||||||
use_x_forwarded_for = true;
|
use_x_forwarded_for = true;
|
||||||
@@ -170,27 +175,27 @@
|
|||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [];
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
||||||
# Add Intel Wi-Fi firmware
|
# Add Intel Wi-Fi firmware
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableAllFirmware = true;
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/453d28a1-26f2-4b25-ac72-c6d301fd0bb8";
|
device = "/dev/disk/by-uuid/453d28a1-26f2-4b25-ac72-c6d301fd0bb8";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/184E-E5E8";
|
device = "/dev/disk/by-uuid/184E-E5E8";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [];
|
||||||
|
|
||||||
networking.hostName = "justin-bieber-creek";
|
networking.hostName = "justin-bieber-creek";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
{ config, lib, pkgs, inputs, ... }:
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
];
|
];
|
||||||
@@ -29,10 +34,10 @@
|
|||||||
networking.hostName = "nixquick";
|
networking.hostName = "nixquick";
|
||||||
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [];
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
||||||
hardware.nvidia.modesetting.enable = true;
|
hardware.nvidia.modesetting.enable = true;
|
||||||
@@ -40,20 +45,19 @@
|
|||||||
# This also enables v4l2loopback
|
# This also enables v4l2loopback
|
||||||
programs.droidcam.enable = true;
|
programs.droidcam.enable = true;
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/64a7c1f5-727a-413c-81a2-cb108728cff6";
|
device = "/dev/disk/by-uuid/64a7c1f5-727a-413c-81a2-cb108728cff6";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/EE25-DC15";
|
device = "/dev/disk/by-uuid/EE25-DC15";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/c0dcff59-8072-48fb-b242-a7a1797e4b48"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{device = "/dev/disk/by-uuid/c0dcff59-8072-48fb-b242-a7a1797e4b48";}
|
||||||
|
];
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
orgAgendaApiContainer ? null,
|
orgAgendaApiContainer ? null,
|
||||||
orgAgendaApiImageName ? "localhost/org-agenda-api:colonelpanic-dbb1cb8-030a673",
|
orgAgendaApiImageName ? "localhost/org-agenda-api:colonelpanic-dbb1cb8-030a673",
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
@@ -16,7 +15,7 @@
|
|||||||
networking.hostName = "railbird-sf";
|
networking.hostName = "railbird-sf";
|
||||||
|
|
||||||
# Allow nginx to serve content synced into /var/lib/syncthing/* (owned by syncthing:syncthing, 2770 perms).
|
# Allow nginx to serve content synced into /var/lib/syncthing/* (owned by syncthing:syncthing, 2770 perms).
|
||||||
users.users.nginx.extraGroups = [ "syncthing" ];
|
users.users.nginx.extraGroups = ["syncthing"];
|
||||||
|
|
||||||
# org-agenda-api hosting with nginx + Let's Encrypt
|
# org-agenda-api hosting with nginx + Let's Encrypt
|
||||||
# Separate secrets for org-agenda-api: auth password (env format) and SSH key (raw file)
|
# Separate secrets for org-agenda-api: auth password (env format) and SSH key (raw file)
|
||||||
@@ -25,7 +24,7 @@
|
|||||||
};
|
};
|
||||||
age.secrets.org-api-ssh-key = {
|
age.secrets.org-api-ssh-key = {
|
||||||
file = ../secrets/org-api-ssh-key.age;
|
file = ../secrets/org-api-ssh-key.age;
|
||||||
mode = "0400"; # Restrictive permissions for SSH key
|
mode = "0400"; # Restrictive permissions for SSH key
|
||||||
};
|
};
|
||||||
|
|
||||||
services.org-agenda-api-host = {
|
services.org-agenda-api-host = {
|
||||||
@@ -38,10 +37,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = ["kvm-amd"];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [];
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
myModules.postgres.enable = true;
|
myModules.postgres.enable = true;
|
||||||
features.full.enable = true;
|
features.full.enable = true;
|
||||||
@@ -100,19 +99,19 @@
|
|||||||
# Note: you may still need router/NAT port-forwards for inbound access from the internet.
|
# Note: you may still need router/NAT port-forwards for inbound access from the internet.
|
||||||
services.syncthing.openDefaultPorts = true;
|
services.syncthing.openDefaultPorts = true;
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/a317d456-6f84-41ee-a149-8e466e414aae";
|
device = "/dev/disk/by-uuid/a317d456-6f84-41ee-a149-8e466e414aae";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/B875-39D4";
|
device = "/dev/disk/by-uuid/B875-39D4";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [
|
||||||
[ { device = "/dev/disk/by-uuid/129345f3-e1e1-4d45-9db9-643160c6d564"; }
|
{device = "/dev/disk/by-uuid/129345f3-e1e1-4d45-9db9-643160c6d564";}
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
android-studio
|
android-studio
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{ lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
];
|
];
|
||||||
@@ -46,23 +48,23 @@
|
|||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
||||||
boot.initrd.luks.devices."cryptroot".device = "/dev/nvme0n1p5";
|
boot.initrd.luks.devices."cryptroot".device = "/dev/nvme0n1p5";
|
||||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
boot.initrd.kernelModules = ["dm-snapshot"];
|
||||||
|
|
||||||
# install nvidia drivers in addition to intel one
|
# install nvidia drivers in addition to intel one
|
||||||
hardware.graphics.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ];
|
hardware.graphics.extraPackages = [pkgs.linuxPackages.nvidia_x11.out];
|
||||||
hardware.graphics.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ];
|
hardware.graphics.extraPackages32 = [pkgs.linuxPackages.nvidia_x11.lib32];
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
videoDrivers = [ "nvidia" ];
|
videoDrivers = ["nvidia"];
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.nvidia.modesetting.enable = true;
|
hardware.nvidia.modesetting.enable = true;
|
||||||
|
|
||||||
hardware.graphics.enable32Bit = true;
|
hardware.graphics.enable32Bit = true;
|
||||||
|
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = ["kvm-amd"];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/356173ab-d076-43e0-aeb6-6a6829c4402b";
|
device = "/dev/disk/by-uuid/356173ab-d076-43e0-aeb6-6a6829c4402b";
|
||||||
@@ -77,11 +79,11 @@
|
|||||||
fileSystems."/shared" = {
|
fileSystems."/shared" = {
|
||||||
device = "/dev/disk/by-uuid/D4009CE8009CD33A";
|
device = "/dev/disk/by-uuid/D4009CE8009CD33A";
|
||||||
fsType = "ntfs";
|
fsType = "ntfs";
|
||||||
options = [ "nofail" "uid=0" "gid=users" "umask=002" ];
|
options = ["nofail" "uid=0" "gid=users" "umask=002"];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{ device = "/dev/disk/by-uuid/f719b44e-295a-4909-9a60-84f87acb7f77"; }
|
{device = "/dev/disk/by-uuid/f719b44e-295a-4909-9a60-84f87acb7f77";}
|
||||||
];
|
];
|
||||||
|
|
||||||
# nix.settings.maxJobs = lib.mkDefault 16;
|
# nix.settings.maxJobs = lib.mkDefault 16;
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
{ lib, pkgs, config, inputs, ... }:
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{ lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
../nixified.ai.nix
|
../nixified.ai.nix
|
||||||
@@ -64,14 +66,14 @@
|
|||||||
networking.interfaces.enp5s0.useDHCP = true;
|
networking.interfaces.enp5s0.useDHCP = true;
|
||||||
networking.interfaces.wlp4s0.useDHCP = true;
|
networking.interfaces.wlp4s0.useDHCP = true;
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
||||||
|
|
||||||
hardware.nvidia.modesetting.enable = true;
|
hardware.nvidia.modesetting.enable = true;
|
||||||
|
|
||||||
hardware.graphics.enable32Bit = true;
|
hardware.graphics.enable32Bit = true;
|
||||||
|
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = ["kvm-amd"];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/9bd06145-8151-4f7b-bcfe-f1809e0db1ea";
|
device = "/dev/disk/by-uuid/9bd06145-8151-4f7b-bcfe-f1809e0db1ea";
|
||||||
@@ -86,11 +88,14 @@
|
|||||||
fileSystems."/shared" = {
|
fileSystems."/shared" = {
|
||||||
device = "/dev/disk/by-uuid/D4009CE8009CD33A";
|
device = "/dev/disk/by-uuid/D4009CE8009CD33A";
|
||||||
fsType = "ntfs";
|
fsType = "ntfs";
|
||||||
options = [ "nofail" "uid=0" "gid=users" "umask=002" ];
|
options = ["nofail" "uid=0" "gid=users" "umask=002"];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{ device = "/swapfile"; size = 49152; }
|
{
|
||||||
|
device = "/swapfile";
|
||||||
|
size = 49152;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
# nix.settings.maxJobs = lib.mkDefault 16;
|
# nix.settings.maxJobs = lib.mkDefault 16;
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
{ lib, pkgs, config, inputs, ... }:
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
{ config, lib, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
inputs.nixos-hardware.nixosModules.asus-rog-strix-g834jzr
|
inputs.nixos-hardware.nixosModules.asus-rog-strix-g834jzr
|
||||||
@@ -61,10 +65,10 @@
|
|||||||
boot.kernelPackages = pkgs.linuxPackages;
|
boot.kernelPackages = pkgs.linuxPackages;
|
||||||
# See https://github.com/NixOS/nixpkgs/issues/467814 for why this was needed
|
# See https://github.com/NixOS/nixpkgs/issues/467814 for why this was needed
|
||||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = ["vmd" "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||||
boot.initrd.kernelModules = [ "nvidia" "nvidia_drm" "nvidia_uvm" "nvidia_modeset" ];
|
boot.initrd.kernelModules = ["nvidia" "nvidia_drm" "nvidia_uvm" "nvidia_modeset"];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [];
|
||||||
hardware.nvidia.powerManagement.enable = true;
|
hardware.nvidia.powerManagement.enable = true;
|
||||||
# This laptop has a hardware MUX, so prefer dGPU-only mode instead of
|
# This laptop has a hardware MUX, so prefer dGPU-only mode instead of
|
||||||
# PRIME sync hybrid mode to keep the compositor and displays on NVIDIA.
|
# PRIME sync hybrid mode to keep the compositor and displays on NVIDIA.
|
||||||
@@ -91,8 +95,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{ device = "/dev/disk/by-uuid/27f277a0-b552-43a0-904d-625e48922bb9"; }
|
{device = "/dev/disk/by-uuid/27f277a0-b552-43a0-904d-625e48922bb9";}
|
||||||
{ device = "/swapfile"; size = 16384; } # size is in MiB (adds 16 GiB)
|
{
|
||||||
|
device = "/swapfile";
|
||||||
|
size = 16384;
|
||||||
|
} # size is in MiB (adds 16 GiB)
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "strixi-minaj";
|
networking.hostName = "strixi-minaj";
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
lib: config: pathStr: default: configAttrs:
|
lib: config: pathStr: default: configAttrs: let
|
||||||
let
|
pathToAttrSet = str: value: let
|
||||||
|
|
||||||
pathToAttrSet = str: value:
|
|
||||||
let
|
|
||||||
parts = lib.splitString "." str;
|
parts = lib.splitString "." str;
|
||||||
in
|
in
|
||||||
if lib.length parts == 1 then
|
if lib.length parts == 1
|
||||||
{ ${lib.head parts} = value; }
|
then {${lib.head parts} = value;}
|
||||||
else
|
else {${lib.head parts} = pathToAttrSet (lib.concatStringsSep "." (lib.tail parts)) value;};
|
||||||
{ ${lib.head parts} = pathToAttrSet (lib.concatStringsSep "." (lib.tail parts)) value; };
|
|
||||||
|
|
||||||
optionsSet = pathToAttrSet pathStr {
|
optionsSet = pathToAttrSet pathStr {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
@@ -17,15 +13,16 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cfg = lib.attrByPath (lib.splitString "." pathStr) { enable = false; } config;
|
cfg = lib.attrByPath (lib.splitString "." pathStr) {enable = false;} config;
|
||||||
|
|
||||||
# Extract 'imports' from configAttrs, if it exists
|
# Extract 'imports' from configAttrs, if it exists
|
||||||
importsAttr = if configAttrs ? imports then configAttrs.imports else [];
|
importsAttr =
|
||||||
|
if configAttrs ? imports
|
||||||
|
then configAttrs.imports
|
||||||
|
else [];
|
||||||
# Remove 'imports' from configAttrs
|
# Remove 'imports' from configAttrs
|
||||||
configAttrsWithoutImports = lib.attrsets.removeAttrs configAttrs ["imports"];
|
configAttrsWithoutImports = lib.attrsets.removeAttrs configAttrs ["imports"];
|
||||||
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
options = optionsSet;
|
options = optionsSet;
|
||||||
config = lib.mkIf cfg.enable configAttrsWithoutImports;
|
config = lib.mkIf cfg.enable configAttrsWithoutImports;
|
||||||
imports = importsAttr;
|
imports = importsAttr;
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
{ inputs, config, pkgs, specialArgs, ... }:
|
{
|
||||||
let
|
inputs,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
specialArgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
system = pkgs.stdenv.hostPlatform.system;
|
system = pkgs.stdenv.hostPlatform.system;
|
||||||
|
|
||||||
nixifiedAiComfyuiModule =
|
nixifiedAiComfyuiModule = import (inputs.nixified-ai + "/flake-modules/projects/comfyui/module.nix") {
|
||||||
import (inputs.nixified-ai + "/flake-modules/projects/comfyui/module.nix") {
|
overlays = patchedNixifiedAiOverlays;
|
||||||
overlays = patchedNixifiedAiOverlays;
|
};
|
||||||
};
|
|
||||||
|
|
||||||
patchedNixifiedAiOverlays = [
|
patchedNixifiedAiOverlays = [
|
||||||
patchedNixifiedAiComfyuiOverlay
|
patchedNixifiedAiComfyuiOverlay
|
||||||
@@ -13,14 +17,13 @@ let
|
|||||||
inputs.nixified-ai.overlays.fetchers
|
inputs.nixified-ai.overlays.fetchers
|
||||||
];
|
];
|
||||||
|
|
||||||
patchedNixifiedAiComfyuiOverlay = final: prev:
|
patchedNixifiedAiComfyuiOverlay = final: prev: let
|
||||||
let
|
upstream = inputs.nixified-ai.overlays.comfyui final prev;
|
||||||
upstream = inputs.nixified-ai.overlays.comfyui final prev;
|
in
|
||||||
in
|
(builtins.removeAttrs upstream ["python3Packages"])
|
||||||
(builtins.removeAttrs upstream [ "python3Packages" ]) // {
|
// {
|
||||||
python3Packages = prev.python3Packages.overrideScope (
|
python3Packages = prev.python3Packages.overrideScope (
|
||||||
python-final: python-prev:
|
python-final: python-prev: let
|
||||||
let
|
|
||||||
extraPackages = final.lib.packagesFromDirectoryRecursive {
|
extraPackages = final.lib.packagesFromDirectoryRecursive {
|
||||||
inherit (python-final) callPackage;
|
inherit (python-final) callPackage;
|
||||||
directory = inputs.nixified-ai + "/flake-modules/packages";
|
directory = inputs.nixified-ai + "/flake-modules/packages";
|
||||||
@@ -28,7 +31,7 @@ let
|
|||||||
packagesAlreadyInPrev =
|
packagesAlreadyInPrev =
|
||||||
builtins.filter (name: python-prev ? ${name}) (builtins.attrNames extraPackages);
|
builtins.filter (name: python-prev ? ${name}) (builtins.attrNames extraPackages);
|
||||||
in
|
in
|
||||||
builtins.removeAttrs extraPackages packagesAlreadyInPrev
|
builtins.removeAttrs extraPackages packagesAlreadyInPrev
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -37,7 +40,7 @@ let
|
|||||||
url = "https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/resolve/main/v23/Qwen-Rapid-AIO-NSFW-v23.safetensors";
|
url = "https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/resolve/main/v23/Qwen-Rapid-AIO-NSFW-v23.safetensors";
|
||||||
hash = "sha256-/bkZ/IG+pj8TdZln/JLJEYFC5ccNTmeVGZIzo17vojM=";
|
hash = "sha256-/bkZ/IG+pj8TdZln/JLJEYFC5ccNTmeVGZIzo17vojM=";
|
||||||
passthru = {
|
passthru = {
|
||||||
comfyui.installPaths = [ "checkpoints" ];
|
comfyui.installPaths = ["checkpoints"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -47,54 +50,55 @@ let
|
|||||||
hash = "sha256-nfliiPRmygP31/qFh61TyAIbeE9C2qvcH1mmG3HEAjg=";
|
hash = "sha256-nfliiPRmygP31/qFh61TyAIbeE9C2qvcH1mmG3HEAjg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
qwenRapidAioWorkflow = pkgs.runCommand "qwen-rapid-aio-v23-nsfw-workflow.json" {
|
qwenRapidAioWorkflow =
|
||||||
nativeBuildInputs = [ pkgs.jq ];
|
pkgs.runCommand "qwen-rapid-aio-v23-nsfw-workflow.json" {
|
||||||
src = pkgs.fetchurl {
|
nativeBuildInputs = [pkgs.jq];
|
||||||
name = "Qwen-Rapid-AIO.json";
|
src = pkgs.fetchurl {
|
||||||
url = "https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/resolve/main/Qwen-Rapid-AIO.json";
|
name = "Qwen-Rapid-AIO.json";
|
||||||
hash = "sha256-oLAF49cJuiQFoPfH2LW2HLHoN9py2REL9i/z/q4ijec=";
|
url = "https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/resolve/main/Qwen-Rapid-AIO.json";
|
||||||
};
|
hash = "sha256-oLAF49cJuiQFoPfH2LW2HLHoN9py2REL9i/z/q4ijec=";
|
||||||
} ''
|
};
|
||||||
jq '
|
} ''
|
||||||
(.nodes[] | select(.type == "CheckpointLoaderSimple") | .widgets_values[0]) = "Qwen-Rapid-AIO-NSFW-v23.safetensors"
|
jq '
|
||||||
| (.nodes[] | select(.id == 7) | .title) = "Input Image 1"
|
(.nodes[] | select(.type == "CheckpointLoaderSimple") | .widgets_values[0]) = "Qwen-Rapid-AIO-NSFW-v23.safetensors"
|
||||||
| (.nodes[] | select(.id == 8) | .title) = "Optional Input Image 2"
|
| (.nodes[] | select(.id == 7) | .title) = "Input Image 1"
|
||||||
| (.nodes[] | select(.id == 7) | .outputs[0].links) |= ((. // []) + [19])
|
| (.nodes[] | select(.id == 8) | .title) = "Optional Input Image 2"
|
||||||
| (.nodes[] | select(.id == 9) | .inputs) = [
|
| (.nodes[] | select(.id == 7) | .outputs[0].links) |= ((. // []) + [19])
|
||||||
{"name": "width", "type": "INT", "link": 20},
|
| (.nodes[] | select(.id == 9) | .inputs) = [
|
||||||
{"name": "height", "type": "INT", "link": 21}
|
{"name": "width", "type": "INT", "link": 20},
|
||||||
]
|
{"name": "height", "type": "INT", "link": 21}
|
||||||
| (.nodes[] | select(.id == 9) | .widgets_values) = [768, 768, 1]
|
]
|
||||||
| .nodes += [
|
| (.nodes[] | select(.id == 9) | .widgets_values) = [768, 768, 1]
|
||||||
{
|
| .nodes += [
|
||||||
"id": 10,
|
{
|
||||||
"type": "GetImageSize",
|
"id": 10,
|
||||||
"pos": [-565.0, 735.0],
|
"type": "GetImageSize",
|
||||||
"size": [210.0, 82.0],
|
"pos": [-565.0, 735.0],
|
||||||
"flags": {},
|
"size": [210.0, 82.0],
|
||||||
"order": 8,
|
"flags": {},
|
||||||
"mode": 0,
|
"order": 8,
|
||||||
"inputs": [
|
"mode": 0,
|
||||||
{"name": "image", "type": "IMAGE", "link": 19}
|
"inputs": [
|
||||||
],
|
{"name": "image", "type": "IMAGE", "link": 19}
|
||||||
"outputs": [
|
],
|
||||||
{"name": "width", "type": "INT", "links": [20]},
|
"outputs": [
|
||||||
{"name": "height", "type": "INT", "links": [21]},
|
{"name": "width", "type": "INT", "links": [20]},
|
||||||
{"name": "batch_size", "type": "INT", "links": null}
|
{"name": "height", "type": "INT", "links": [21]},
|
||||||
],
|
{"name": "batch_size", "type": "INT", "links": null}
|
||||||
"properties": {
|
],
|
||||||
"Node name for S&R": "GetImageSize"
|
"properties": {
|
||||||
},
|
"Node name for S&R": "GetImageSize"
|
||||||
"widgets_values": []
|
},
|
||||||
}
|
"widgets_values": []
|
||||||
]
|
}
|
||||||
| .links += [
|
]
|
||||||
[19, 7, 0, 10, 0, "IMAGE"],
|
| .links += [
|
||||||
[20, 10, 0, 9, 0, "INT"],
|
[19, 7, 0, 10, 0, "IMAGE"],
|
||||||
[21, 10, 1, 9, 1, "INT"]
|
[20, 10, 0, 9, 0, "INT"],
|
||||||
]
|
[21, 10, 1, 9, 1, "INT"]
|
||||||
' "$src" > "$out"
|
]
|
||||||
'';
|
' "$src" > "$out"
|
||||||
|
'';
|
||||||
|
|
||||||
nixifiedComfyuiPkgs = import pkgs.path {
|
nixifiedComfyuiPkgs = import pkgs.path {
|
||||||
inherit system;
|
inherit system;
|
||||||
@@ -107,60 +111,64 @@ let
|
|||||||
|
|
||||||
nixifiedComfyuiPackages = nixifiedComfyuiPkgs.comfyuiPackages;
|
nixifiedComfyuiPackages = nixifiedComfyuiPkgs.comfyuiPackages;
|
||||||
|
|
||||||
patchedComfyuiPackages = nixifiedComfyuiPackages // {
|
patchedComfyuiPackages =
|
||||||
comfyui-unwrapped = nixifiedComfyuiPackages.comfyui-unwrapped.overrideAttrs (old: {
|
nixifiedComfyuiPackages
|
||||||
postPatch = (old.postPatch or "") + ''
|
// {
|
||||||
cp ${qwenImageEditPlusV2Node} comfy_extras/nodes_qwen.py
|
comfyui-unwrapped = nixifiedComfyuiPackages.comfyui-unwrapped.overrideAttrs (old: {
|
||||||
'';
|
postPatch =
|
||||||
});
|
(old.postPatch or "")
|
||||||
};
|
+ ''
|
||||||
|
cp ${qwenImageEditPlusV2Node} comfy_extras/nodes_qwen.py
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
comfyuiPackage = nixifiedComfyuiPackages.comfyui.override {
|
comfyuiPackage = nixifiedComfyuiPackages.comfyui.override {
|
||||||
comfyuiPackages = patchedComfyuiPackages;
|
comfyuiPackages = patchedComfyuiPackages;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
specialArgs.makeEnable config "myModules.nixified-ai" false {
|
specialArgs.makeEnable config "myModules.nixified-ai" false {
|
||||||
imports = [
|
imports = [
|
||||||
nixifiedAiComfyuiModule
|
nixifiedAiComfyuiModule
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.overlays = patchedNixifiedAiOverlays;
|
nixpkgs.overlays = patchedNixifiedAiOverlays;
|
||||||
|
|
||||||
services.comfyui = {
|
services.comfyui = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = comfyuiPackage;
|
package = comfyuiPackage;
|
||||||
host = "0.0.0.0";
|
host = "0.0.0.0";
|
||||||
acceleration = "cuda";
|
acceleration = "cuda";
|
||||||
environmentVariables = {
|
environmentVariables = {
|
||||||
PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True";
|
PYTORCH_CUDA_ALLOC_CONF = "expandable_segments:True";
|
||||||
|
};
|
||||||
|
extraFlags = [
|
||||||
|
"--lowvram"
|
||||||
|
"--fp8_e4m3fn-text-enc"
|
||||||
|
"--cache-none"
|
||||||
|
"--reserve-vram"
|
||||||
|
"2.0"
|
||||||
|
"--disable-smart-memory"
|
||||||
|
];
|
||||||
|
models = [
|
||||||
|
qwenRapidAioNsfwV23
|
||||||
|
(pkgs.fetchurl {
|
||||||
|
name = "lustifySDXLNSFW_v20-inpainting.safetensors";
|
||||||
|
url = "https://huggingface.co/andro-flock/LUSTIFY-SDXL-NSFW-checkpoint-v2-0-INPAINTING/resolve/main/lustifySDXLNSFW_v20-inpainting.safetensors";
|
||||||
|
hash = "sha256-YV8hBx9c6PkWQNIlJTGQTOuL+HNmGVIavuSdlKX434Q=";
|
||||||
|
passthru = {
|
||||||
|
comfyui.installPaths = ["checkpoints"];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
extraFlags = [
|
|
||||||
"--lowvram"
|
|
||||||
"--fp8_e4m3fn-text-enc"
|
|
||||||
"--cache-none"
|
|
||||||
"--reserve-vram"
|
|
||||||
"2.0"
|
|
||||||
"--disable-smart-memory"
|
|
||||||
];
|
|
||||||
models = [
|
|
||||||
qwenRapidAioNsfwV23
|
|
||||||
(pkgs.fetchurl {
|
|
||||||
name = "lustifySDXLNSFW_v20-inpainting.safetensors";
|
|
||||||
url = "https://huggingface.co/andro-flock/LUSTIFY-SDXL-NSFW-checkpoint-v2-0-INPAINTING/resolve/main/lustifySDXLNSFW_v20-inpainting.safetensors";
|
|
||||||
hash = "sha256-YV8hBx9c6PkWQNIlJTGQTOuL+HNmGVIavuSdlKX434Q=";
|
|
||||||
passthru = {
|
|
||||||
comfyui.installPaths = [ "checkpoints" ];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.comfyui.serviceConfig.ExecStartPre = [
|
systemd.services.comfyui.serviceConfig.ExecStartPre = [
|
||||||
"+${pkgs.writeShellScript "install-qwen-rapid-aio-workflow" ''
|
"+${pkgs.writeShellScript "install-qwen-rapid-aio-workflow" ''
|
||||||
rm -f /var/lib/comfyui/workflows/Qwen-Rapid-AIO-v23-SFW.json
|
rm -f /var/lib/comfyui/workflows/Qwen-Rapid-AIO-v23-SFW.json
|
||||||
rm -f /var/lib/comfyui/.local/share/comfyui/user/default/workflows/Qwen-Rapid-AIO-v23-SFW.json
|
rm -f /var/lib/comfyui/.local/share/comfyui/user/default/workflows/Qwen-Rapid-AIO-v23-SFW.json
|
||||||
install -D -m 0644 ${qwenRapidAioWorkflow} /var/lib/comfyui/workflows/Qwen-Rapid-AIO-v23-NSFW.json
|
install -D -m 0644 ${qwenRapidAioWorkflow} /var/lib/comfyui/workflows/Qwen-Rapid-AIO-v23-NSFW.json
|
||||||
install -D -m 0644 ${qwenRapidAioWorkflow} /var/lib/comfyui/.local/share/comfyui/user/default/workflows/Qwen-Rapid-AIO-v23-NSFW.json
|
install -D -m 0644 ${qwenRapidAioWorkflow} /var/lib/comfyui/.local/share/comfyui/user/default/workflows/Qwen-Rapid-AIO-v23-NSFW.json
|
||||||
''}"
|
''}"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
makeEnable,
|
makeEnable,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
system = pkgs.stdenv.hostPlatform.system;
|
system = pkgs.stdenv.hostPlatform.system;
|
||||||
noctaliaPackage = inputs.noctalia.packages.${system}.default;
|
noctaliaPackage = inputs.noctalia.packages.${system}.default;
|
||||||
waitForWayland = pkgs.writeShellScript "noctalia-wait-for-wayland" ''
|
waitForWayland = pkgs.writeShellScript "noctalia-wait-for-wayland" ''
|
||||||
@@ -23,26 +22,25 @@ let
|
|||||||
exit 1
|
exit 1
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
makeEnable config "myModules.noctalia" false {
|
makeEnable config "myModules.noctalia" false {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
noctaliaPackage
|
noctaliaPackage
|
||||||
];
|
];
|
||||||
|
|
||||||
# Noctalia's battery widget talks to UPower. Hosts that deliberately do not
|
# Noctalia's battery widget talks to UPower. Hosts that deliberately do not
|
||||||
# have batteries can still override this back to false.
|
# have batteries can still override this back to false.
|
||||||
services.upower.enable = lib.mkDefault true;
|
services.upower.enable = lib.mkDefault true;
|
||||||
|
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
inputs.noctalia.homeModules.default
|
inputs.noctalia.homeModules.default
|
||||||
({ lib, ... }: {
|
({lib, ...}: {
|
||||||
programs.noctalia-shell = {
|
programs.noctalia-shell = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# This module provides the Hyprland-scoped service below.
|
# This module provides the Hyprland-scoped service below.
|
||||||
systemd.enable = false;
|
systemd.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.activation.noctaliaLauncherOverviewLayer =
|
home.activation.noctaliaLauncherOverviewLayer = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
|
||||||
settings_file="$HOME/.config/noctalia/settings.json"
|
settings_file="$HOME/.config/noctalia/settings.json"
|
||||||
settings_tmp="$(${pkgs.coreutils}/bin/mktemp)"
|
settings_tmp="$(${pkgs.coreutils}/bin/mktemp)"
|
||||||
|
|
||||||
@@ -64,24 +62,24 @@ makeEnable config "myModules.noctalia" false {
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
systemd.user.services.noctalia-shell = {
|
systemd.user.services.noctalia-shell = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Noctalia Shell";
|
Description = "Noctalia Shell";
|
||||||
Documentation = "https://docs.noctalia.dev";
|
Documentation = "https://docs.noctalia.dev";
|
||||||
PartOf = [ "hyprland-session.target" ];
|
PartOf = ["hyprland-session.target"];
|
||||||
After = [ "hyprland-session.target" ];
|
After = ["hyprland-session.target"];
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
ExecCondition = "/run/current-system/sw/bin/desktop_shell_ui exec-condition noctalia";
|
ExecCondition = "/run/current-system/sw/bin/desktop_shell_ui exec-condition noctalia";
|
||||||
ExecStartPre = "${waitForWayland}";
|
ExecStartPre = "${waitForWayland}";
|
||||||
ExecStart = "${lib.getExe noctaliaPackage} --no-duplicate";
|
ExecStart = "${lib.getExe noctaliaPackage} --no-duplicate";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 1;
|
RestartSec = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
Install.WantedBy = [ "hyprland-session.target" ];
|
Install.WantedBy = ["hyprland-session.target"];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,35 @@
|
|||||||
{ config, pkgs, inputs, lib, makeEnable, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.notifications-tray-icon" true {
|
makeEnable config "myModules.notifications-tray-icon" true {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
inputs.notifications-tray-icon.overlays.default
|
inputs.notifications-tray-icon.overlays.default
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
haskellPackages = prev.haskellPackages.override (old: {
|
haskellPackages = prev.haskellPackages.override (old: {
|
||||||
overrides = final.lib.composeExtensions (old.overrides or (_: _: {}))
|
overrides =
|
||||||
|
final.lib.composeExtensions (old.overrides or (_: _: {}))
|
||||||
(hself: hsuper: {
|
(hself: hsuper: {
|
||||||
notifications-tray-icon = final.haskell.lib.overrideCabal
|
notifications-tray-icon =
|
||||||
|
final.haskell.lib.overrideCabal
|
||||||
hsuper.notifications-tray-icon
|
hsuper.notifications-tray-icon
|
||||||
(oldAttrs: {
|
(oldAttrs: {
|
||||||
patches = (oldAttrs.patches or []) ++ [
|
patches =
|
||||||
./patches/notifications-tray-icon-gmail-oauth-detached-browser.patch
|
(oldAttrs.patches or [])
|
||||||
];
|
++ [
|
||||||
|
./patches/notifications-tray-icon-gmail-oauth-detached-browser.patch
|
||||||
|
];
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.imalison = { config, ... }: let
|
home-manager.users.imalison = {config, ...}: let
|
||||||
notificationsTrayIcon = pkgs.haskellPackages.notifications-tray-icon;
|
notificationsTrayIcon = pkgs.haskellPackages.notifications-tray-icon;
|
||||||
gmailExecStart = pkgs.writeShellScript "notifications-tray-icon-gmail" ''
|
gmailExecStart = pkgs.writeShellScript "notifications-tray-icon-gmail" ''
|
||||||
creds_file="${config.xdg.configHome}/gws/client_secret.json"
|
creds_file="${config.xdg.configHome}/gws/client_secret.json"
|
||||||
@@ -37,9 +48,9 @@ makeEnable config "myModules.notifications-tray-icon" true {
|
|||||||
mkService = description: execStart: {
|
mkService = description: execStart: {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = description;
|
Description = description;
|
||||||
After = [ "graphical-session.target" "tray.target" ];
|
After = ["graphical-session.target" "tray.target"];
|
||||||
PartOf = [ "graphical-session.target" ];
|
PartOf = ["graphical-session.target"];
|
||||||
Requires = [ "tray.target" ];
|
Requires = ["tray.target"];
|
||||||
};
|
};
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = execStart;
|
ExecStart = execStart;
|
||||||
@@ -47,20 +58,23 @@ makeEnable config "myModules.notifications-tray-icon" true {
|
|||||||
RestartSec = 3;
|
RestartSec = 3;
|
||||||
};
|
};
|
||||||
Install = {
|
Install = {
|
||||||
WantedBy = [ "graphical-session.target" ];
|
WantedBy = ["graphical-session.target"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
systemd.user.services = {
|
systemd.user.services = {
|
||||||
notifications-tray-icon-github = mkService
|
notifications-tray-icon-github =
|
||||||
|
mkService
|
||||||
"GitHub notifications tray icon"
|
"GitHub notifications tray icon"
|
||||||
"${notificationsTrayIcon}/bin/notifications-tray-icon github --token-pass github-token";
|
"${notificationsTrayIcon}/bin/notifications-tray-icon github --token-pass github-token";
|
||||||
|
|
||||||
notifications-tray-icon-gitea = mkService
|
notifications-tray-icon-gitea =
|
||||||
|
mkService
|
||||||
"Gitea notifications tray icon"
|
"Gitea notifications tray icon"
|
||||||
"${notificationsTrayIcon}/bin/notifications-tray-icon gitea --url https://dev.railbird.ai --token-pass gitea-omni-token";
|
"${notificationsTrayIcon}/bin/notifications-tray-icon gitea --url https://dev.railbird.ai --token-pass gitea-omni-token";
|
||||||
|
|
||||||
notifications-tray-icon-gmail = mkService
|
notifications-tray-icon-gmail =
|
||||||
|
mkService
|
||||||
"Gmail notifications tray icon"
|
"Gmail notifications tray icon"
|
||||||
"${gmailExecStart}";
|
"${gmailExecStart}";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ final: prev: {
|
|||||||
# This is key: multiple outputs, so you can reference them later as:
|
# This is key: multiple outputs, so you can reference them later as:
|
||||||
# $out -> for main
|
# $out -> for main
|
||||||
# $tools -> for the 'tools' output in your new derivation
|
# $tools -> for the 'tools' output in your new derivation
|
||||||
outputs = [ "out" "tools" ];
|
outputs = ["out" "tools"];
|
||||||
|
|
||||||
# No source required for a pure wrap
|
# No source required for a pure wrap
|
||||||
src = null;
|
src = null;
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
dontPatchShell = true;
|
dontPatchShell = true;
|
||||||
nativeBuildInputs = [ final.installShellFiles ] ++ final.lib.optionals final.stdenv.hostPlatform.isLinux [ final.makeWrapper ];
|
nativeBuildInputs = [final.installShellFiles] ++ final.lib.optionals final.stdenv.hostPlatform.isLinux [final.makeWrapper];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
prev.nvidia-container-toolkit
|
prev.nvidia-container-toolkit
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
{ config, pkgs, makeEnable, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
makeEnable,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.nvidia" false {
|
makeEnable config "myModules.nvidia" false {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
nvidia-container-toolkit
|
nvidia-container-toolkit
|
||||||
@@ -16,10 +21,10 @@ makeEnable config "myModules.nvidia" false {
|
|||||||
};
|
};
|
||||||
hardware.nvidia.open = true;
|
hardware.nvidia.open = true;
|
||||||
hardware.graphics.enable32Bit = true;
|
hardware.graphics.enable32Bit = true;
|
||||||
hardware.graphics.extraPackages = [ config.hardware.nvidia.package.out ];
|
hardware.graphics.extraPackages = [config.hardware.nvidia.package.out];
|
||||||
hardware.graphics.extraPackages32 = [ config.hardware.nvidia.package.lib32 ];
|
hardware.graphics.extraPackages32 = [config.hardware.nvidia.package.lib32];
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
videoDrivers = [ "nvidia" ];
|
videoDrivers = ["nvidia"];
|
||||||
};
|
};
|
||||||
# nixpkgs.config.cudaSupport = true;
|
# nixpkgs.config.cudaSupport = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ lib, ... }: {
|
{lib, ...}: {
|
||||||
options = {
|
options = {
|
||||||
myModules.xmonad.picom.vSync.enable = lib.mkOption {
|
myModules.xmonad.picom.vSync.enable = lib.mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
# org-agenda-api-host.nix - Host org-agenda-api container with nginx + Let's Encrypt
|
# org-agenda-api-host.nix - Host org-agenda-api container with nginx + Let's Encrypt
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
with lib;
|
lib,
|
||||||
|
pkgs,
|
||||||
let
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
cfg = config.services.org-agenda-api-host;
|
cfg = config.services.org-agenda-api-host;
|
||||||
# Random high port to avoid conflicts
|
# Random high port to avoid conflicts
|
||||||
containerPort = 51847;
|
containerPort = 51847;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.services.org-agenda-api-host = {
|
options.services.org-agenda-api-host = {
|
||||||
enable = mkEnableOption "org-agenda-api container hosting";
|
enable = mkEnableOption "org-agenda-api container hosting";
|
||||||
|
|
||||||
@@ -22,7 +23,7 @@ in
|
|||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Additional full domain names to serve (each gets its own ACME cert)";
|
description = "Additional full domain names to serve (each gets its own ACME cert)";
|
||||||
example = [ "org-agenda-api.example.com" ];
|
example = ["org-agenda-api.example.com"];
|
||||||
};
|
};
|
||||||
|
|
||||||
acmeEmail = mkOption {
|
acmeEmail = mkOption {
|
||||||
@@ -119,12 +120,13 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
allDomains = [ "org-agenda-api.${cfg.domain}" ] ++ cfg.extraDomains;
|
allDomains = ["org-agenda-api.${cfg.domain}"] ++ cfg.extraDomains;
|
||||||
in builtins.listToAttrs (map mkVirtualHost allDomains);
|
in
|
||||||
|
builtins.listToAttrs (map mkVirtualHost allDomains);
|
||||||
};
|
};
|
||||||
|
|
||||||
# Open firewall for HTTP/HTTPS
|
# Open firewall for HTTP/HTTPS
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
networking.firewall.allowedTCPPorts = [80 443];
|
||||||
|
|
||||||
# Container service using podman
|
# Container service using podman
|
||||||
virtualisation.oci-containers = {
|
virtualisation.oci-containers = {
|
||||||
@@ -133,7 +135,7 @@ in
|
|||||||
image = cfg.containerImage;
|
image = cfg.containerImage;
|
||||||
imageFile = cfg.containerImageFile;
|
imageFile = cfg.containerImageFile;
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
ports = [ "127.0.0.1:${toString containerPort}:80" ];
|
ports = ["127.0.0.1:${toString containerPort}:80"];
|
||||||
environment = {
|
environment = {
|
||||||
TZ = cfg.timezone;
|
TZ = cfg.timezone;
|
||||||
GIT_SYNC_REPOSITORY = cfg.gitSyncRepository;
|
GIT_SYNC_REPOSITORY = cfg.gitSyncRepository;
|
||||||
@@ -141,12 +143,12 @@ in
|
|||||||
GIT_USER_NAME = cfg.gitUserName;
|
GIT_USER_NAME = cfg.gitUserName;
|
||||||
AUTH_USER = cfg.authUser;
|
AUTH_USER = cfg.authUser;
|
||||||
};
|
};
|
||||||
environmentFiles = [ cfg.secretsFile ];
|
environmentFiles = [cfg.secretsFile];
|
||||||
volumes = lib.optionals (cfg.sshKeyFile != null) [
|
volumes = lib.optionals (cfg.sshKeyFile != null) [
|
||||||
"${cfg.sshKeyFile}:/secrets/ssh_key:ro"
|
"${cfg.sshKeyFile}:/secrets/ssh_key:ro"
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--pull=never" # Image is from nix store, don't try to pull
|
"--pull=never" # Image is from nix store, don't try to pull
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,34 +1,37 @@
|
|||||||
# org-agenda-api.nix - Tangled org-config for org-agenda-api container
|
# org-agenda-api.nix - Tangled org-config for org-agenda-api container
|
||||||
{ pkgs, inputs, system }:
|
{
|
||||||
let
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
system,
|
||||||
|
}: let
|
||||||
# Path to org-config.org in the dotfiles
|
# Path to org-config.org in the dotfiles
|
||||||
orgConfigOrg = ../dotfiles/emacs.d/org-config.org;
|
orgConfigOrg = ../dotfiles/emacs.d/org-config.org;
|
||||||
|
|
||||||
# Tangle org-config.org to produce elisp files
|
# Tangle org-config.org to produce elisp files
|
||||||
orgAgendaCustomConfig = pkgs.runCommand "org-agenda-custom-config" {
|
orgAgendaCustomConfig =
|
||||||
buildInputs = [ pkgs.emacs-nox ];
|
pkgs.runCommand "org-agenda-custom-config" {
|
||||||
} ''
|
buildInputs = [pkgs.emacs-nox];
|
||||||
mkdir -p $out
|
} ''
|
||||||
mkdir -p work
|
mkdir -p $out
|
||||||
|
mkdir -p work
|
||||||
|
|
||||||
# Copy org file to writable location (tangle writes to same directory)
|
# Copy org file to writable location (tangle writes to same directory)
|
||||||
cp ${orgConfigOrg} work/org-config.org
|
cp ${orgConfigOrg} work/org-config.org
|
||||||
|
|
||||||
# Tangle org-config.org
|
# Tangle org-config.org
|
||||||
emacs --batch \
|
emacs --batch \
|
||||||
--eval '(require (quote org))' \
|
--eval '(require (quote org))' \
|
||||||
--eval '(org-babel-tangle-file "work/org-config.org")'
|
--eval '(org-babel-tangle-file "work/org-config.org")'
|
||||||
|
|
||||||
# Copy all tangled files to output, stripping :straight keywords
|
|
||||||
# (straight.el is not available in the minimal container Emacs)
|
|
||||||
for f in work/org-config-*.el; do
|
|
||||||
if [ -f "$f" ]; then
|
|
||||||
# Remove :straight nil and :straight t from use-package declarations
|
|
||||||
sed -e 's/:straight nil//g' -e 's/:straight t//g' "$f" > "$out/$(basename "$f")"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
# Copy all tangled files to output, stripping :straight keywords
|
||||||
|
# (straight.el is not available in the minimal container Emacs)
|
||||||
|
for f in work/org-config-*.el; do
|
||||||
|
if [ -f "$f" ]; then
|
||||||
|
# Remove :straight nil and :straight t from use-package declarations
|
||||||
|
sed -e 's/:straight nil//g' -e 's/:straight t//g' "$f" > "$out/$(basename "$f")"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
org-agenda-custom-config = orgAgendaCustomConfig;
|
org-agenda-custom-config = orgAgendaCustomConfig;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,29 +7,25 @@
|
|||||||
nodejs,
|
nodejs,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (
|
stdenv.mkDerivation (
|
||||||
finalAttrs:
|
finalAttrs: let
|
||||||
let
|
|
||||||
toolArchiveSuffix =
|
toolArchiveSuffix =
|
||||||
if stdenv.hostPlatform.isLinux then
|
if stdenv.hostPlatform.isLinux
|
||||||
if stdenv.hostPlatform.isAarch64 then
|
then
|
||||||
"arm64-linux"
|
if stdenv.hostPlatform.isAarch64
|
||||||
else if stdenv.hostPlatform.isx86_64 then
|
then "arm64-linux"
|
||||||
"x64-linux"
|
else if stdenv.hostPlatform.isx86_64
|
||||||
else
|
then "x64-linux"
|
||||||
throw "Unsupported Linux architecture for happy-coder: ${stdenv.hostPlatform.system}"
|
else throw "Unsupported Linux architecture for happy-coder: ${stdenv.hostPlatform.system}"
|
||||||
else if stdenv.hostPlatform.isDarwin then
|
else if stdenv.hostPlatform.isDarwin
|
||||||
if stdenv.hostPlatform.isAarch64 then
|
then
|
||||||
"arm64-darwin"
|
if stdenv.hostPlatform.isAarch64
|
||||||
else if stdenv.hostPlatform.isx86_64 then
|
then "arm64-darwin"
|
||||||
"x64-darwin"
|
else if stdenv.hostPlatform.isx86_64
|
||||||
else
|
then "x64-darwin"
|
||||||
throw "Unsupported Darwin architecture for happy-coder: ${stdenv.hostPlatform.system}"
|
else throw "Unsupported Darwin architecture for happy-coder: ${stdenv.hostPlatform.system}"
|
||||||
else
|
else throw "Unsupported platform for happy-coder: ${stdenv.hostPlatform.system}";
|
||||||
throw "Unsupported platform for happy-coder: ${stdenv.hostPlatform.system}";
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
pname = "happy-coder";
|
pname = "happy-coder";
|
||||||
version = "0.11.2-unstable-2026-03-26";
|
version = "0.11.2-unstable-2026-03-26";
|
||||||
|
|
||||||
@@ -112,7 +108,7 @@ stdenv.mkDerivation (
|
|||||||
description = "Mobile and web client wrapper for Claude Code and Codex with end-to-end encryption";
|
description = "Mobile and web client wrapper for Claude Code and Codex with end-to-end encryption";
|
||||||
homepage = "https://github.com/slopus/happy";
|
homepage = "https://github.com/slopus/happy";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with lib.maintainers; [ onsails ];
|
maintainers = with lib.maintainers; [onsails];
|
||||||
mainProgram = "happy";
|
mainProgram = "happy";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,28 +3,26 @@
|
|||||||
python3,
|
python3,
|
||||||
python3Packages,
|
python3Packages,
|
||||||
writeShellApplication,
|
writeShellApplication,
|
||||||
}:
|
}: let
|
||||||
|
|
||||||
let
|
|
||||||
pykefcontrol = python3Packages.callPackage ../pykefcontrol {};
|
pykefcontrol = python3Packages.callPackage ../pykefcontrol {};
|
||||||
python = python3.withPackages (ps: [
|
python = python3.withPackages (ps: [
|
||||||
pykefcontrol
|
pykefcontrol
|
||||||
ps.zeroconf
|
ps.zeroconf
|
||||||
]);
|
]);
|
||||||
in
|
in
|
||||||
writeShellApplication {
|
writeShellApplication {
|
||||||
name = "kef";
|
name = "kef";
|
||||||
|
|
||||||
runtimeInputs = [ python ];
|
runtimeInputs = [python];
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
exec python ${./kef.py} "$@"
|
exec python ${./kef.py} "$@"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Command-line controller for KEF W2 speakers";
|
description = "Command-line controller for KEF W2 speakers";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with lib.maintainers; [ imalison ];
|
maintainers = with lib.maintainers; [imalison];
|
||||||
mainProgram = "kef";
|
mainProgram = "kef";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
versionCheckHook,
|
versionCheckHook,
|
||||||
writeShellScript,
|
writeShellScript,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildNpmPackage (finalAttrs: {
|
buildNpmPackage (finalAttrs: {
|
||||||
pname = "playwright-cli";
|
pname = "playwright-cli";
|
||||||
version = "0.1.1";
|
version = "0.1.1";
|
||||||
@@ -26,7 +25,7 @@ buildNpmPackage (finalAttrs: {
|
|||||||
# playwright-cli imports playwright/lib/cli/client/program, which current
|
# playwright-cli imports playwright/lib/cli/client/program, which current
|
||||||
# nixpkgs playwright-test does not export, so keep the vendored Playwright
|
# nixpkgs playwright-test does not export, so keep the vendored Playwright
|
||||||
# until nixpkgs Playwright is updated to a compatible version.
|
# until nixpkgs Playwright is updated to a compatible version.
|
||||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
nativeBuildInputs = [makeBinaryWrapper];
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
wrapProgram $out/bin/playwright-cli \
|
wrapProgram $out/bin/playwright-cli \
|
||||||
@@ -34,7 +33,7 @@ buildNpmPackage (finalAttrs: {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
nativeInstallCheckInputs = [versionCheckHook];
|
||||||
versionCheckProgram = writeShellScript "version-check" ''
|
versionCheckProgram = writeShellScript "version-check" ''
|
||||||
"$1" --version >/dev/null
|
"$1" --version >/dev/null
|
||||||
echo "${finalAttrs.version}"
|
echo "${finalAttrs.version}"
|
||||||
@@ -46,7 +45,7 @@ buildNpmPackage (finalAttrs: {
|
|||||||
homepage = "https://github.com/microsoft/playwright-cli";
|
homepage = "https://github.com/microsoft/playwright-cli";
|
||||||
changelog = "https://github.com/microsoft/playwright-cli/releases/tag/v${finalAttrs.version}";
|
changelog = "https://github.com/microsoft/playwright-cli/releases/tag/v${finalAttrs.version}";
|
||||||
license = lib.licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
maintainers = with lib.maintainers; [ imalison ];
|
maintainers = with lib.maintainers; [imalison];
|
||||||
mainProgram = "playwright-cli";
|
mainProgram = "playwright-cli";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
aiohttp,
|
aiohttp,
|
||||||
requests,
|
requests,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pykefcontrol";
|
pname = "pykefcontrol";
|
||||||
version = "0.9.2";
|
version = "0.9.2";
|
||||||
@@ -26,12 +25,12 @@ buildPythonPackage rec {
|
|||||||
requests
|
requests
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [ "pykefcontrol" ];
|
pythonImportsCheck = ["pykefcontrol"];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Python library for controlling KEF LS50WII, LSX II, and LS60 speakers";
|
description = "Python library for controlling KEF LS50WII, LSX II, and LS60 speakers";
|
||||||
homepage = "https://github.com/N0ciple/pykefcontrol";
|
homepage = "https://github.com/N0ciple/pykefcontrol";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with lib.maintainers; [ imalison ];
|
maintainers = with lib.maintainers; [imalison];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,29 +2,27 @@
|
|||||||
lib,
|
lib,
|
||||||
python3,
|
python3,
|
||||||
writeShellApplication,
|
writeShellApplication,
|
||||||
}:
|
}: let
|
||||||
|
|
||||||
let
|
|
||||||
python = python3.withPackages (ps: [
|
python = python3.withPackages (ps: [
|
||||||
ps.python-roborock
|
ps.python-roborock
|
||||||
ps.pyshark
|
ps.pyshark
|
||||||
ps.pyyaml
|
ps.pyyaml
|
||||||
]);
|
]);
|
||||||
in
|
in
|
||||||
writeShellApplication {
|
writeShellApplication {
|
||||||
name = "roborock-control";
|
name = "roborock-control";
|
||||||
|
|
||||||
runtimeInputs = [ python ];
|
runtimeInputs = [python];
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
export ROBOROCK_CONTROL_RUNNER=direct
|
export ROBOROCK_CONTROL_RUNNER=direct
|
||||||
exec python ${../../../dotfiles/lib/bin/roborock-control} "$@"
|
exec python ${../../../dotfiles/lib/bin/roborock-control} "$@"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Command-line controller for Roborock vacuums";
|
description = "Command-line controller for Roborock vacuums";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with lib.maintainers; [ imalison ];
|
maintainers = with lib.maintainers; [imalison];
|
||||||
mainProgram = "roborock-control";
|
mainProgram = "roborock-control";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,8 @@
|
|||||||
electron_40,
|
electron_40,
|
||||||
nodejs,
|
nodejs,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (
|
stdenv.mkDerivation (
|
||||||
finalAttrs:
|
finalAttrs: let
|
||||||
let
|
|
||||||
electron = electron_40;
|
electron = electron_40;
|
||||||
nodeModules = stdenvNoCC.mkDerivation {
|
nodeModules = stdenvNoCC.mkDerivation {
|
||||||
pname = "${finalAttrs.pname}-node_modules";
|
pname = "${finalAttrs.pname}-node_modules";
|
||||||
@@ -81,8 +79,7 @@ stdenv.mkDerivation (
|
|||||||
outputHash = "sha256-yrzdhw+NPYZku10piHoxMy+TUJ8MYySZorMOMOztJY4=";
|
outputHash = "sha256-yrzdhw+NPYZku10piHoxMy+TUJ8MYySZorMOMOztJY4=";
|
||||||
outputHashMode = "recursive";
|
outputHashMode = "recursive";
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
pname = "t3code";
|
pname = "t3code";
|
||||||
version = "0.0.15";
|
version = "0.0.15";
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
@@ -129,21 +126,23 @@ stdenv.mkDerivation (
|
|||||||
--replace-fail 'host: "localhost"' 'host: "127.0.0.1"'
|
--replace-fail 'host: "localhost"' 'host: "127.0.0.1"'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs =
|
||||||
buildPackages.bun
|
[
|
||||||
buildPackages.copyDesktopItems
|
buildPackages.bun
|
||||||
buildPackages.installShellFiles
|
buildPackages.copyDesktopItems
|
||||||
buildPackages.makeBinaryWrapper
|
buildPackages.installShellFiles
|
||||||
buildPackages.node-gyp
|
buildPackages.makeBinaryWrapper
|
||||||
buildPackages.nodejs
|
buildPackages.node-gyp
|
||||||
buildPackages.python3
|
buildPackages.nodejs
|
||||||
buildPackages.writableTmpDirAsHomeHook
|
buildPackages.python3
|
||||||
] ++ lib.optionals stdenv.buildPlatform.isDarwin [
|
buildPackages.writableTmpDirAsHomeHook
|
||||||
buildPackages.cctools.libtool
|
]
|
||||||
buildPackages.xcbuild
|
++ lib.optionals stdenv.buildPlatform.isDarwin [
|
||||||
];
|
buildPackages.cctools.libtool
|
||||||
|
buildPackages.xcbuild
|
||||||
|
];
|
||||||
|
|
||||||
nativeInstallCheckInputs = [ buildPackages.versionCheckHook ];
|
nativeInstallCheckInputs = [buildPackages.versionCheckHook];
|
||||||
doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
@@ -221,7 +220,7 @@ stdenv.mkDerivation (
|
|||||||
terminal = false;
|
terminal = false;
|
||||||
icon = "t3code";
|
icon = "t3code";
|
||||||
startupWMClass = "T3 Code";
|
startupWMClass = "T3 Code";
|
||||||
categories = [ "Development" ];
|
categories = ["Development"];
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
{ pkgs, config, makeEnable, realUsers, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
makeEnable,
|
||||||
|
realUsers,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.plasma" true {
|
makeEnable config "myModules.plasma" true {
|
||||||
services.accounts-daemon.enable = true;
|
services.accounts-daemon.enable = true;
|
||||||
services.displayManager.sddm = {
|
services.displayManager.sddm = {
|
||||||
|
|||||||
@@ -1,23 +1,31 @@
|
|||||||
{ pkgs, config, makeEnable, realUsers, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
makeEnable,
|
||||||
|
realUsers,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.postgres" true {
|
makeEnable config "myModules.postgres" true {
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.postgresql_15;
|
package = pkgs.postgresql_15;
|
||||||
ensureDatabases = [ "railbird" "public" ];
|
ensureDatabases = ["railbird" "public"];
|
||||||
authentication = pkgs.lib.mkOverride 10 ''
|
authentication = pkgs.lib.mkOverride 10 ''
|
||||||
#type database DBuser CIDR-ADDRESS auth-method
|
#type database DBuser CIDR-ADDRESS auth-method
|
||||||
local all all trust
|
local all all trust
|
||||||
host all all 0.0.0.0/0 trust
|
host all all 0.0.0.0/0 trust
|
||||||
host all all ::1/128 trust
|
host all all ::1/128 trust
|
||||||
'';
|
'';
|
||||||
ensureUsers = map (username: {
|
ensureUsers =
|
||||||
|
map (username: {
|
||||||
name = username;
|
name = username;
|
||||||
ensureClauses = {
|
ensureClauses = {
|
||||||
superuser = true;
|
superuser = true;
|
||||||
createrole = true;
|
createrole = true;
|
||||||
createdb = true;
|
createdb = true;
|
||||||
};
|
};
|
||||||
}) realUsers;
|
})
|
||||||
|
realUsers;
|
||||||
# initialScript = pkgs.writeText "init-sql-script" ''
|
# initialScript = pkgs.writeText "init-sql-script" ''
|
||||||
# CREATE DATABASE IF NOT EXISTS railbird;
|
# CREATE DATABASE IF NOT EXISTS railbird;
|
||||||
# \c railbird
|
# \c railbird
|
||||||
@@ -27,6 +35,6 @@ makeEnable config "myModules.postgres" true {
|
|||||||
services.pgadmin = {
|
services.pgadmin = {
|
||||||
enable = false;
|
enable = false;
|
||||||
initialEmail = "IvanMalison@gmail.com";
|
initialEmail = "IvanMalison@gmail.com";
|
||||||
initialPasswordFile = (builtins.toFile "password" "This is the content of the file.");
|
initialPasswordFile = builtins.toFile "password" "This is the content of the file.";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,53 +1,62 @@
|
|||||||
{ config, lib, makeEnable, inputs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
makeEnable,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.quickshell" false {
|
makeEnable config "myModules.quickshell" false {
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
inputs.caelestia-shell.homeManagerModules.default
|
inputs.caelestia-shell.homeManagerModules.default
|
||||||
({ lib, nixos, pkgs, ... }:
|
({
|
||||||
let
|
lib,
|
||||||
hyprlandEnabled = lib.attrByPath ["myModules" "hyprland" "enable"] false nixos.config;
|
nixos,
|
||||||
system = pkgs.stdenv.hostPlatform.system;
|
pkgs,
|
||||||
quickshellBase = inputs.caelestia-shell.inputs.quickshell.packages.${system}.default.override {
|
...
|
||||||
# GCC 15.2 ICEs on generated NetworkManager DBus sources in
|
}: let
|
||||||
# quickshell 0.2.1. Quickshell's own dev shell uses clangStdenv.
|
hyprlandEnabled = lib.attrByPath ["myModules" "hyprland" "enable"] false nixos.config;
|
||||||
stdenv = pkgs.clangStdenv;
|
system = pkgs.stdenv.hostPlatform.system;
|
||||||
withX11 = false;
|
quickshellBase = inputs.caelestia-shell.inputs.quickshell.packages.${system}.default.override {
|
||||||
withI3 = false;
|
# GCC 15.2 ICEs on generated NetworkManager DBus sources in
|
||||||
};
|
# quickshell 0.2.1. Quickshell's own dev shell uses clangStdenv.
|
||||||
quickshellUnwrapped = quickshellBase.unwrapped.overrideAttrs (old: {
|
stdenv = pkgs.clangStdenv;
|
||||||
# Clang then needs PCH disabled because quickshell's PipeWire target
|
withX11 = false;
|
||||||
# adds compile flags that do not match the shared PCH target.
|
withI3 = false;
|
||||||
cmakeFlags = (old.cmakeFlags or []) ++ [ (lib.cmakeBool "NO_PCH" true) ];
|
};
|
||||||
});
|
quickshellUnwrapped = quickshellBase.unwrapped.overrideAttrs (old: {
|
||||||
quickshellPackage = quickshellUnwrapped.stdenv.mkDerivation {
|
# Clang then needs PCH disabled because quickshell's PipeWire target
|
||||||
inherit (quickshellUnwrapped) version meta buildInputs;
|
# adds compile flags that do not match the shared PCH target.
|
||||||
pname = "${quickshellUnwrapped.pname}-wrapped";
|
cmakeFlags = (old.cmakeFlags or []) ++ [(lib.cmakeBool "NO_PCH" true)];
|
||||||
nativeBuildInputs = quickshellUnwrapped.nativeBuildInputs ++ [ pkgs.qt6.wrapQtAppsHook ];
|
});
|
||||||
dontUnpack = true;
|
quickshellPackage = quickshellUnwrapped.stdenv.mkDerivation {
|
||||||
dontConfigure = true;
|
inherit (quickshellUnwrapped) version meta buildInputs;
|
||||||
dontBuild = true;
|
pname = "${quickshellUnwrapped.pname}-wrapped";
|
||||||
installPhase = ''
|
nativeBuildInputs = quickshellUnwrapped.nativeBuildInputs ++ [pkgs.qt6.wrapQtAppsHook];
|
||||||
mkdir -p $out
|
dontUnpack = true;
|
||||||
cp -r ${quickshellUnwrapped}/* $out
|
dontConfigure = true;
|
||||||
'';
|
dontBuild = true;
|
||||||
passthru.unwrapped = quickshellUnwrapped;
|
installPhase = ''
|
||||||
};
|
mkdir -p $out
|
||||||
caelestiaPackage = inputs.caelestia-shell.packages.${system}.with-cli.override {
|
cp -r ${quickshellUnwrapped}/* $out
|
||||||
# Caelestia pins app2unit 1.0.3, which no longer builds on this nixpkgs snapshot.
|
'';
|
||||||
app2unit = pkgs.app2unit;
|
passthru.unwrapped = quickshellUnwrapped;
|
||||||
quickshell = quickshellPackage;
|
};
|
||||||
};
|
caelestiaPackage = inputs.caelestia-shell.packages.${system}.with-cli.override {
|
||||||
in
|
# Caelestia pins app2unit 1.0.3, which no longer builds on this nixpkgs snapshot.
|
||||||
{
|
app2unit = pkgs.app2unit;
|
||||||
programs.caelestia = {
|
quickshell = quickshellPackage;
|
||||||
enable = true;
|
};
|
||||||
package = caelestiaPackage;
|
in {
|
||||||
cli.enable = true;
|
programs.caelestia = {
|
||||||
systemd.target = lib.mkDefault (
|
enable = true;
|
||||||
if hyprlandEnabled
|
package = caelestiaPackage;
|
||||||
then "wayland-session@Hyprland.target"
|
cli.enable = true;
|
||||||
else "graphical-session.target"
|
systemd.target = lib.mkDefault (
|
||||||
);
|
if hyprlandEnabled
|
||||||
};
|
then "wayland-session@Hyprland.target"
|
||||||
})
|
else "graphical-session.target"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
{ pkgs, config, makeEnable, realUsers, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
makeEnable,
|
||||||
|
realUsers,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.rabbitmq" false {
|
makeEnable config "myModules.rabbitmq" false {
|
||||||
services.rabbitmq = {
|
services.rabbitmq = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
{ config, pkgs, inputs, makeEnable, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.raspberry-pi" false {
|
makeEnable config "myModules.raspberry-pi" false {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
||||||
];
|
];
|
||||||
# These are needed to allow hardware acceleration again
|
# These are needed to allow hardware acceleration again
|
||||||
# https://github.com/NixOS/nixos-hardware/issues/631
|
# https://github.com/NixOS/nixos-hardware/issues/631
|
||||||
boot.kernelParams = [ "kunit.enable=0" ];
|
boot.kernelParams = ["kunit.enable=0"];
|
||||||
hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb";
|
hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb";
|
||||||
hardware.raspberry-pi."4".fkms-3d.enable = true;
|
hardware.raspberry-pi."4".fkms-3d.enable = true;
|
||||||
# hardware.raspberry-pi."4".audio.enable = true;
|
# hardware.raspberry-pi."4".audio.enable = true;
|
||||||
@@ -29,7 +34,7 @@ makeEnable config "myModules.raspberry-pi" false {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,67 +1,72 @@
|
|||||||
{ config, lib, pkgs, makeEnable, ... }:
|
{
|
||||||
let
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
cfg = config.myModules.remote-hyprland;
|
cfg = config.myModules.remote-hyprland;
|
||||||
hyprlandPackage = config.programs.hyprland.package;
|
hyprlandPackage = config.programs.hyprland.package;
|
||||||
geometry = "${toString cfg.width}x${toString cfg.height}@${toString cfg.refreshRate}";
|
geometry = "${toString cfg.width}x${toString cfg.height}@${toString cfg.refreshRate}";
|
||||||
monitorRule = "${cfg.output},${geometry},0x0,${toString cfg.scale}";
|
monitorRule = "${cfg.output},${geometry},0x0,${toString cfg.scale}";
|
||||||
remoteHyprlandStartVnc = pkgs.writeShellScript "remote-hyprland-start-vnc" ''
|
remoteHyprlandStartVnc = pkgs.writeShellScript "remote-hyprland-start-vnc" ''
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
export XDG_CURRENT_DESKTOP=Hyprland
|
export XDG_CURRENT_DESKTOP=Hyprland
|
||||||
export XDG_SESSION_DESKTOP=Hyprland
|
export XDG_SESSION_DESKTOP=Hyprland
|
||||||
export XDG_SESSION_TYPE=wayland
|
export XDG_SESSION_TYPE=wayland
|
||||||
export LIBSEAT_BACKEND=seatd
|
export LIBSEAT_BACKEND=seatd
|
||||||
|
|
||||||
for _ in $(${pkgs.coreutils}/bin/seq 1 50); do
|
for _ in $(${pkgs.coreutils}/bin/seq 1 50); do
|
||||||
instance="$(
|
instance="$(
|
||||||
${hyprlandPackage}/bin/hyprctl instances \
|
${hyprlandPackage}/bin/hyprctl instances \
|
||||||
| ${pkgs.gawk}/bin/awk '
|
| ${pkgs.gawk}/bin/awk '
|
||||||
/^instance / {
|
/^instance / {
|
||||||
sig = $2
|
sig = $2
|
||||||
sub(/:$/, "", sig)
|
sub(/:$/, "", sig)
|
||||||
}
|
}
|
||||||
/^[[:space:]]*time:/ { time = $2 }
|
/^[[:space:]]*time:/ { time = $2 }
|
||||||
/^[[:space:]]*wl socket:/ {
|
/^[[:space:]]*wl socket:/ {
|
||||||
if (sig != "" && time != "") {
|
if (sig != "" && time != "") {
|
||||||
print time " " sig " " $3
|
print time " " sig " " $3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
' \
|
' \
|
||||||
| ${pkgs.coreutils}/bin/sort -n \
|
| ${pkgs.coreutils}/bin/sort -n \
|
||||||
| ${pkgs.coreutils}/bin/tail -n 1
|
| ${pkgs.coreutils}/bin/tail -n 1
|
||||||
)"
|
)"
|
||||||
|
|
||||||
if [ -n "$instance" ]; then
|
if [ -n "$instance" ]; then
|
||||||
read -r _ HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY <<EOF
|
read -r _ HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY <<EOF
|
||||||
$instance
|
$instance
|
||||||
EOF
|
EOF
|
||||||
export HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY
|
export HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
${pkgs.coreutils}/bin/sleep 0.1
|
${pkgs.coreutils}/bin/sleep 0.1
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -z "''${HYPRLAND_INSTANCE_SIGNATURE:-}" ] || [ -z "''${WAYLAND_DISPLAY:-}" ]; then
|
if [ -z "''${HYPRLAND_INSTANCE_SIGNATURE:-}" ] || [ -z "''${WAYLAND_DISPLAY:-}" ]; then
|
||||||
echo "Timed out waiting for a Hyprland instance" >&2
|
echo "Timed out waiting for a Hyprland instance" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for _ in $(${pkgs.coreutils}/bin/seq 1 50); do
|
for _ in $(${pkgs.coreutils}/bin/seq 1 50); do
|
||||||
if ${hyprlandPackage}/bin/hyprctl -i "$HYPRLAND_INSTANCE_SIGNATURE" -j monitors >/dev/null 2>&1; then
|
if ${hyprlandPackage}/bin/hyprctl -i "$HYPRLAND_INSTANCE_SIGNATURE" -j monitors >/dev/null 2>&1; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
${pkgs.coreutils}/bin/sleep 0.1
|
${pkgs.coreutils}/bin/sleep 0.1
|
||||||
done
|
done
|
||||||
|
|
||||||
# Give wayvnc a stable output name instead of relying on Hyprland's
|
# Give wayvnc a stable output name instead of relying on Hyprland's
|
||||||
# fallback HEADLESS-* naming.
|
# fallback HEADLESS-* naming.
|
||||||
${hyprlandPackage}/bin/hyprctl -i "$HYPRLAND_INSTANCE_SIGNATURE" output create headless ${cfg.output} >/dev/null 2>&1 || true
|
${hyprlandPackage}/bin/hyprctl -i "$HYPRLAND_INSTANCE_SIGNATURE" output create headless ${cfg.output} >/dev/null 2>&1 || true
|
||||||
${hyprlandPackage}/bin/hyprctl -i "$HYPRLAND_INSTANCE_SIGNATURE" keyword monitor '${monitorRule}' >/dev/null 2>&1 || true
|
${hyprlandPackage}/bin/hyprctl -i "$HYPRLAND_INSTANCE_SIGNATURE" keyword monitor '${monitorRule}' >/dev/null 2>&1 || true
|
||||||
|
|
||||||
exec ${pkgs.wayvnc}/bin/wayvnc \
|
exec ${pkgs.wayvnc}/bin/wayvnc \
|
||||||
--log-level=info \
|
--log-level=info \
|
||||||
--output ${cfg.output} \
|
--output ${cfg.output} \
|
||||||
${cfg.bindAddress} ${toString cfg.port}
|
${cfg.bindAddress} ${toString cfg.port}
|
||||||
'';
|
'';
|
||||||
remoteHyprlandConfig = pkgs.writeText "remote-hyprland.conf" ''
|
remoteHyprlandConfig = pkgs.writeText "remote-hyprland.conf" ''
|
||||||
monitor=${monitorRule}
|
monitor=${monitorRule}
|
||||||
@@ -144,7 +149,7 @@ EOF
|
|||||||
];
|
];
|
||||||
autostartInstall = lib.optionalAttrs cfg.autoStart {
|
autostartInstall = lib.optionalAttrs cfg.autoStart {
|
||||||
Install = {
|
Install = {
|
||||||
WantedBy = [ "default.target" ];
|
WantedBy = ["default.target"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
enabledModule = makeEnable config "myModules.remote-hyprland" false {
|
enabledModule = makeEnable config "myModules.remote-hyprland" false {
|
||||||
@@ -158,119 +163,124 @@ EOF
|
|||||||
users.manageLingering = true;
|
users.manageLingering = true;
|
||||||
users.users.${cfg.user}.linger = true;
|
users.users.${cfg.user}.linger = true;
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.wayvnc ];
|
environment.systemPackages = [pkgs.wayvnc];
|
||||||
|
|
||||||
home-manager.users.${cfg.user} = {
|
home-manager.users.${cfg.user} = {
|
||||||
systemd.user.services = {
|
systemd.user.services = {
|
||||||
remote-hyprland = {
|
remote-hyprland =
|
||||||
Unit = {
|
{
|
||||||
Description = "Headless Hyprland session for remote VNC access";
|
Unit = {
|
||||||
After = [ "default.target" ];
|
Description = "Headless Hyprland session for remote VNC access";
|
||||||
};
|
After = ["default.target"];
|
||||||
Service = {
|
};
|
||||||
ExecStart = "${hyprlandPackage}/bin/start-hyprland --path ${hyprlandPackage}/bin/Hyprland -- --config ${remoteHyprlandConfig}";
|
Service = {
|
||||||
Restart = "on-failure";
|
ExecStart = "${hyprlandPackage}/bin/start-hyprland --path ${hyprlandPackage}/bin/Hyprland -- --config ${remoteHyprlandConfig}";
|
||||||
RestartSec = 5;
|
Restart = "on-failure";
|
||||||
Environment = [
|
RestartSec = 5;
|
||||||
"XDG_CURRENT_DESKTOP=Hyprland"
|
Environment = [
|
||||||
"XDG_SESSION_DESKTOP=Hyprland"
|
"XDG_CURRENT_DESKTOP=Hyprland"
|
||||||
"XDG_SESSION_TYPE=wayland"
|
"XDG_SESSION_DESKTOP=Hyprland"
|
||||||
"LIBSEAT_BACKEND=seatd"
|
"XDG_SESSION_TYPE=wayland"
|
||||||
"PATH=${servicePath}"
|
"LIBSEAT_BACKEND=seatd"
|
||||||
];
|
"PATH=${servicePath}"
|
||||||
};
|
];
|
||||||
} // autostartInstall;
|
};
|
||||||
|
}
|
||||||
|
// autostartInstall;
|
||||||
|
|
||||||
remote-hyprland-wayvnc = {
|
remote-hyprland-wayvnc =
|
||||||
Unit = {
|
{
|
||||||
Description = "VNC server for the headless Hyprland session";
|
Unit = {
|
||||||
After = [ "remote-hyprland.service" ];
|
Description = "VNC server for the headless Hyprland session";
|
||||||
Requires = [ "remote-hyprland.service" ];
|
After = ["remote-hyprland.service"];
|
||||||
PartOf = [ "remote-hyprland.service" ];
|
Requires = ["remote-hyprland.service"];
|
||||||
};
|
PartOf = ["remote-hyprland.service"];
|
||||||
Service = {
|
};
|
||||||
ExecStart = "${remoteHyprlandStartVnc}";
|
Service = {
|
||||||
Restart = "on-failure";
|
ExecStart = "${remoteHyprlandStartVnc}";
|
||||||
RestartSec = 5;
|
Restart = "on-failure";
|
||||||
Environment = [
|
RestartSec = 5;
|
||||||
"XDG_CURRENT_DESKTOP=Hyprland"
|
Environment = [
|
||||||
"XDG_SESSION_DESKTOP=Hyprland"
|
"XDG_CURRENT_DESKTOP=Hyprland"
|
||||||
"XDG_SESSION_TYPE=wayland"
|
"XDG_SESSION_DESKTOP=Hyprland"
|
||||||
"LIBSEAT_BACKEND=seatd"
|
"XDG_SESSION_TYPE=wayland"
|
||||||
"PATH=${servicePath}"
|
"LIBSEAT_BACKEND=seatd"
|
||||||
];
|
"PATH=${servicePath}"
|
||||||
};
|
];
|
||||||
} // autostartInstall;
|
};
|
||||||
|
}
|
||||||
|
// autostartInstall;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
enabledModule // {
|
enabledModule
|
||||||
options = lib.recursiveUpdate enabledModule.options {
|
// {
|
||||||
myModules.remote-hyprland = {
|
options = lib.recursiveUpdate enabledModule.options {
|
||||||
user = lib.mkOption {
|
myModules.remote-hyprland = {
|
||||||
type = lib.types.str;
|
user = lib.mkOption {
|
||||||
default = "imalison";
|
type = lib.types.str;
|
||||||
description = "User account that owns the remote Hyprland session.";
|
default = "imalison";
|
||||||
};
|
description = "User account that owns the remote Hyprland session.";
|
||||||
|
};
|
||||||
|
|
||||||
bindAddress = lib.mkOption {
|
bindAddress = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
description = "Address for wayvnc to bind. Keep localhost when using SSH or Tailscale forwarding.";
|
description = "Address for wayvnc to bind. Keep localhost when using SSH or Tailscale forwarding.";
|
||||||
};
|
};
|
||||||
|
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
type = lib.types.port;
|
type = lib.types.port;
|
||||||
default = 5900;
|
default = 5900;
|
||||||
description = "TCP port for wayvnc.";
|
description = "TCP port for wayvnc.";
|
||||||
};
|
};
|
||||||
|
|
||||||
output = lib.mkOption {
|
output = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "remote";
|
default = "remote";
|
||||||
description = "Stable Hyprland headless output name captured by wayvnc.";
|
description = "Stable Hyprland headless output name captured by wayvnc.";
|
||||||
};
|
};
|
||||||
|
|
||||||
width = lib.mkOption {
|
width = lib.mkOption {
|
||||||
type = lib.types.ints.positive;
|
type = lib.types.ints.positive;
|
||||||
default = 1920;
|
default = 1920;
|
||||||
description = "Remote output width.";
|
description = "Remote output width.";
|
||||||
};
|
};
|
||||||
|
|
||||||
height = lib.mkOption {
|
height = lib.mkOption {
|
||||||
type = lib.types.ints.positive;
|
type = lib.types.ints.positive;
|
||||||
default = 1080;
|
default = 1080;
|
||||||
description = "Remote output height.";
|
description = "Remote output height.";
|
||||||
};
|
};
|
||||||
|
|
||||||
refreshRate = lib.mkOption {
|
refreshRate = lib.mkOption {
|
||||||
type = lib.types.ints.positive;
|
type = lib.types.ints.positive;
|
||||||
default = 60;
|
default = 60;
|
||||||
description = "Remote output refresh rate.";
|
description = "Remote output refresh rate.";
|
||||||
};
|
};
|
||||||
|
|
||||||
scale = lib.mkOption {
|
scale = lib.mkOption {
|
||||||
type = lib.types.number;
|
type = lib.types.number;
|
||||||
default = 1;
|
default = 1;
|
||||||
description = "Remote output scale.";
|
description = "Remote output scale.";
|
||||||
};
|
};
|
||||||
|
|
||||||
terminalCommand = lib.mkOption {
|
terminalCommand = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "${pkgs.ghostty}/bin/ghostty --gtk-single-instance=false";
|
default = "${pkgs.ghostty}/bin/ghostty --gtk-single-instance=false";
|
||||||
description = "Command launched for the default terminal binding and initial window.";
|
description = "Command launched for the default terminal binding and initial window.";
|
||||||
};
|
};
|
||||||
|
|
||||||
autoStart = lib.mkOption {
|
autoStart = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to start the remote Hyprland session automatically with the
|
Whether to start the remote Hyprland session automatically with the
|
||||||
user's systemd manager. Keep this disabled on single-GPU hosts with
|
user's systemd manager. Keep this disabled on single-GPU hosts with
|
||||||
an active display manager, because Hyprland needs DRM master.
|
an active display manager, because Hyprland needs DRM master.
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
}
|
|
||||||
|
|||||||
108
nixos/sni.nix
108
nixos/sni.nix
@@ -1,47 +1,53 @@
|
|||||||
{ config, inputs, lib, pkgs, makeEnable, ... }:
|
{
|
||||||
let
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
system = pkgs.stdenv.hostPlatform.system;
|
system = pkgs.stdenv.hostPlatform.system;
|
||||||
kanshiSniPackage =
|
kanshiSniPackage = inputs.kanshi-sni.packages.${system}.default.overrideAttrs (old: {
|
||||||
inputs.kanshi-sni.packages.${system}.default.overrideAttrs (old: {
|
patches =
|
||||||
patches = (old.patches or [ ]) ++ [
|
(old.patches or [])
|
||||||
|
++ [
|
||||||
./patches/kanshi-sni-refresh-and-reconnect.patch
|
./patches/kanshi-sni-refresh-and-reconnect.patch
|
||||||
./patches/kanshi-sni-keep-menu-root-alive.patch
|
./patches/kanshi-sni-keep-menu-root-alive.patch
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
makeEnable config "myModules.sni" true {
|
makeEnable config "myModules.sni" true {
|
||||||
systemd.user.services.blueman-applet.serviceConfig.ExecStart = lib.mkForce [
|
systemd.user.services.blueman-applet.serviceConfig.ExecStart = lib.mkForce [
|
||||||
""
|
""
|
||||||
"${pkgs.blueman}/bin/blueman-applet"
|
"${pkgs.blueman}/bin/blueman-applet"
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
({ lib, ... }: {
|
({lib, ...}: {
|
||||||
systemd.user.services.kanshi-sni = {
|
systemd.user.services.kanshi-sni = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "kanshi-sni tray app";
|
Description = "kanshi-sni tray app";
|
||||||
After = [ "graphical-session.target" "tray.target" "kanshi.service" ];
|
After = ["graphical-session.target" "tray.target" "kanshi.service"];
|
||||||
PartOf = [ "graphical-session.target" "kanshi.service" ];
|
PartOf = ["graphical-session.target" "kanshi.service"];
|
||||||
Requires = [ "tray.target" ];
|
Requires = ["tray.target"];
|
||||||
Wants = [ "kanshi.service" ];
|
Wants = ["kanshi.service"];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${kanshiSniPackage}/bin/kanshi-sni";
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = 3;
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = ["graphical-session.target"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
Service = {
|
|
||||||
ExecStart = "${kanshiSniPackage}/bin/kanshi-sni";
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = 3;
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
WantedBy = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.kdeconnect = {
|
services.kdeconnect = {
|
||||||
enable = true;
|
enable = true;
|
||||||
indicator = true;
|
indicator = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.activation.disableKdeConnectBluetooth =
|
home.activation.disableKdeConnectBluetooth = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
|
||||||
${pkgs.kdePackages.kconfig}/bin/kwriteconfig6 \
|
${pkgs.kdePackages.kconfig}/bin/kwriteconfig6 \
|
||||||
--file kdeconnect/config \
|
--file kdeconnect/config \
|
||||||
--group General \
|
--group General \
|
||||||
@@ -49,23 +55,23 @@ makeEnable config "myModules.sni" true {
|
|||||||
'BluetoothLinkProvider,AsyncLinkProvider'
|
'BluetoothLinkProvider,AsyncLinkProvider'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services.network-manager-applet.enable = true;
|
services.network-manager-applet.enable = true;
|
||||||
|
|
||||||
# Disable the XDG autostart for nm-applet since we're managing it via systemd.
|
# Disable the XDG autostart for nm-applet since we're managing it via systemd.
|
||||||
# The XDG autostart races with the systemd service and doesn't use --indicator.
|
# The XDG autostart races with the systemd service and doesn't use --indicator.
|
||||||
xdg.configFile."autostart/nm-applet.desktop".text = ''
|
xdg.configFile."autostart/nm-applet.desktop".text = ''
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Hidden=true
|
Hidden=true
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services.udiskie = {
|
services.udiskie = {
|
||||||
enable = true;
|
enable = true;
|
||||||
tray = "always";
|
tray = "always";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.pasystray.enable = true;
|
services.pasystray.enable = true;
|
||||||
|
|
||||||
services.flameshot.enable = true;
|
services.flameshot.enable = true;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
# TODO: reenable
|
# TODO: reenable
|
||||||
# security.pam.sshAgentAuth.enable = true;
|
# security.pam.sshAgentAuth.enable = true;
|
||||||
services.avahi = {
|
services.avahi = {
|
||||||
|
|||||||
@@ -2,49 +2,48 @@
|
|||||||
makeEnable,
|
makeEnable,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
shared = import ../nix-shared/syncthing.nix;
|
shared = import ../nix-shared/syncthing.nix;
|
||||||
inherit (shared) devices allDevices;
|
inherit (shared) devices allDevices;
|
||||||
in
|
in
|
||||||
makeEnable config "myModules.syncthing" true {
|
makeEnable config "myModules.syncthing" true {
|
||||||
system.activationScripts.syncthingPermissions = {
|
system.activationScripts.syncthingPermissions = {
|
||||||
text = ''
|
text = ''
|
||||||
mkdir -p /var/lib/syncthing/sync
|
mkdir -p /var/lib/syncthing/sync
|
||||||
mkdir -p /var/lib/syncthing/sync/Screensaver/use
|
mkdir -p /var/lib/syncthing/sync/Screensaver/use
|
||||||
mkdir -p /var/lib/syncthing/railbird
|
mkdir -p /var/lib/syncthing/railbird
|
||||||
chown -R syncthing:syncthing /var/lib/syncthing
|
chown -R syncthing:syncthing /var/lib/syncthing
|
||||||
chmod -R 2770 /var/lib/syncthing
|
chmod -R 2770 /var/lib/syncthing
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
systemd.services.syncthing = {
|
|
||||||
serviceConfig = {
|
|
||||||
AmbientCapabilities = "CAP_CHOWN";
|
|
||||||
CapabilityBoundingSet = "CAP_CHOWN";
|
|
||||||
};
|
};
|
||||||
};
|
systemd.services.syncthing = {
|
||||||
services.syncthing = {
|
serviceConfig = {
|
||||||
enable = true;
|
AmbientCapabilities = "CAP_CHOWN";
|
||||||
settings = {
|
CapabilityBoundingSet = "CAP_CHOWN";
|
||||||
inherit devices;
|
|
||||||
folders = {
|
|
||||||
sync = {
|
|
||||||
path = "~/sync";
|
|
||||||
devices = allDevices;
|
|
||||||
ignorePerms = true;
|
|
||||||
copyOwnershipFromParent = true;
|
|
||||||
};
|
|
||||||
railbird = {
|
|
||||||
path = "~/railbird";
|
|
||||||
devices = allDevices;
|
|
||||||
ignorePerms = true;
|
|
||||||
copyOwnershipFromParent = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
options = {
|
|
||||||
relaysEnabled = true;
|
|
||||||
localAnnounceEnabled = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
services.syncthing = {
|
||||||
}
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
inherit devices;
|
||||||
|
folders = {
|
||||||
|
sync = {
|
||||||
|
path = "~/sync";
|
||||||
|
devices = allDevices;
|
||||||
|
ignorePerms = true;
|
||||||
|
copyOwnershipFromParent = true;
|
||||||
|
};
|
||||||
|
railbird = {
|
||||||
|
path = "~/railbird";
|
||||||
|
devices = allDevices;
|
||||||
|
ignorePerms = true;
|
||||||
|
copyOwnershipFromParent = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
options = {
|
||||||
|
relaysEnabled = true;
|
||||||
|
localAnnounceEnabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
@@ -239,15 +239,15 @@ in
|
|||||||
rm -f "$HOME/.config/systemd/user/taffybar.service.d/override.conf"
|
rm -f "$HOME/.config/systemd/user/taffybar.service.d/override.conf"
|
||||||
rmdir --ignore-fail-on-non-empty "$HOME/.config/systemd/user/taffybar.service.d" 2>/dev/null || true
|
rmdir --ignore-fail-on-non-empty "$HOME/.config/systemd/user/taffybar.service.d" 2>/dev/null || true
|
||||||
'';
|
'';
|
||||||
systemd.user.services.taffybar.Service = {
|
systemd.user.services.taffybar.Service = {
|
||||||
ExecCondition = "${taffybarExecCondition}";
|
ExecCondition = "${taffybarExecCondition}";
|
||||||
ExecStartPre = "${waitForGraphicalSocket}";
|
ExecStartPre = "${waitForGraphicalSocket}";
|
||||||
ExecStart = lib.mkForce "${taffybarStart}";
|
ExecStart = lib.mkForce "${taffybarStart}";
|
||||||
# Temporary startup debugging: keep a plain-text log outside journald so
|
# Temporary startup debugging: keep a plain-text log outside journald so
|
||||||
# the next login/startup leaves easy-to-inspect tray traces behind.
|
# the next login/startup leaves easy-to-inspect tray traces behind.
|
||||||
StandardOutput = "append:/tmp/taffybar-service.log";
|
StandardOutput = "append:/tmp/taffybar-service.log";
|
||||||
StandardError = "append:/tmp/taffybar-service.log";
|
StandardError = "append:/tmp/taffybar-service.log";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
{ config, lib, pkgs, makeEnable, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.tailscale" true {
|
makeEnable config "myModules.tailscale" true {
|
||||||
# Provide stable SSH connectivity between your machines without needing port
|
# Provide stable SSH connectivity between your machines without needing port
|
||||||
# forwarding (works behind NAT/CGNAT).
|
# forwarding (works behind NAT/CGNAT).
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
|
||||||
# Handy even if you only enable the service and run `tailscale up` manually.
|
# Handy even if you only enable the service and run `tailscale up` manually.
|
||||||
environment.systemPackages = [ pkgs.tailscale ];
|
environment.systemPackages = [pkgs.tailscale];
|
||||||
|
|
||||||
# Optional: unattended enrollment using a pre-auth key stored in agenix.
|
# Optional: unattended enrollment using a pre-auth key stored in agenix.
|
||||||
#
|
#
|
||||||
@@ -27,9 +33,9 @@ makeEnable config "myModules.tailscale" true {
|
|||||||
|
|
||||||
systemd.services.tailscale-autoconnect = {
|
systemd.services.tailscale-autoconnect = {
|
||||||
description = "Auto-connect Tailscale (optional, via agenix auth key)";
|
description = "Auto-connect Tailscale (optional, via agenix auth key)";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = ["multi-user.target"];
|
||||||
after = [ "network-online.target" "tailscaled.service" ];
|
after = ["network-online.target" "tailscaled.service"];
|
||||||
wants = [ "network-online.target" "tailscaled.service" ];
|
wants = ["network-online.target" "tailscaled.service"];
|
||||||
|
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
ConditionPathExists = config.age.secrets.tailscale-authkey.path;
|
ConditionPathExists = config.age.secrets.tailscale-authkey.path;
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
{ config, makeEnable, ... }:
|
{
|
||||||
|
config,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.tts" false {
|
makeEnable config "myModules.tts" false {
|
||||||
services.tts.servers.coqui = {
|
services.tts.servers.coqui = {
|
||||||
enable = true;
|
enable = true;
|
||||||
useCuda = false;
|
useCuda = false;
|
||||||
port = 11115;
|
port = 11115;
|
||||||
model = "tts_models/en/vctk/vits";
|
model = "tts_models/en/vctk/vits";
|
||||||
extraArgs = [ "--speaker_idx" "p376" ];
|
extraArgs = ["--speaker_idx" "p376"];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.tts-coqui.wants = [ "network-online.target" ];
|
systemd.services.tts-coqui.wants = ["network-online.target"];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
{ pkgs, keys, inputs, ... }:
|
{
|
||||||
let
|
pkgs,
|
||||||
|
keys,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"adbusers"
|
"adbusers"
|
||||||
"audio"
|
"audio"
|
||||||
@@ -24,40 +28,51 @@ let
|
|||||||
createHome = true;
|
createHome = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
users.users = with keys; {
|
users.users = with keys; {
|
||||||
imalison = userDefaults // {
|
imalison =
|
||||||
extraGroups = extraGroupsWithWheel;
|
userDefaults
|
||||||
name = "imalison";
|
// {
|
||||||
openssh.authorizedKeys.keys = kanivanKeys;
|
extraGroups = extraGroupsWithWheel;
|
||||||
};
|
name = "imalison";
|
||||||
kat = userDefaults // {
|
openssh.authorizedKeys.keys = kanivanKeys;
|
||||||
extraGroups = extraGroupsWithWheel;
|
};
|
||||||
name = "kat";
|
kat =
|
||||||
openssh.authorizedKeys.keys = kanivanKeys;
|
userDefaults
|
||||||
};
|
// {
|
||||||
dean = userDefaults // {
|
extraGroups = extraGroupsWithWheel;
|
||||||
extraGroups = extraGroupsWithWheel;
|
name = "kat";
|
||||||
name = "dean";
|
openssh.authorizedKeys.keys = kanivanKeys;
|
||||||
openssh.authorizedKeys.keys = kanivanKeys ++ deanKeys;
|
};
|
||||||
};
|
dean =
|
||||||
alex = userDefaults // {
|
userDefaults
|
||||||
extraGroups = extraGroupsWithWheel;
|
// {
|
||||||
name = "alex";
|
extraGroups = extraGroupsWithWheel;
|
||||||
openssh.authorizedKeys.keys = kanivanKeys ++ alexKeys;
|
name = "dean";
|
||||||
};
|
openssh.authorizedKeys.keys = kanivanKeys ++ deanKeys;
|
||||||
loewy = userDefaults // {
|
};
|
||||||
inherit extraGroups;
|
alex =
|
||||||
name = "loewy";
|
userDefaults
|
||||||
openssh.authorizedKeys.keys = kanivanKeys ++ loewyKeys;
|
// {
|
||||||
};
|
extraGroups = extraGroupsWithWheel;
|
||||||
ben = userDefaults // {
|
name = "alex";
|
||||||
inherit extraGroups;
|
openssh.authorizedKeys.keys = kanivanKeys ++ alexKeys;
|
||||||
name = "ben";
|
};
|
||||||
openssh.authorizedKeys.keys = benKeys ++ kanivanKeys;
|
loewy =
|
||||||
};
|
userDefaults
|
||||||
|
// {
|
||||||
|
inherit extraGroups;
|
||||||
|
name = "loewy";
|
||||||
|
openssh.authorizedKeys.keys = kanivanKeys ++ loewyKeys;
|
||||||
|
};
|
||||||
|
ben =
|
||||||
|
userDefaults
|
||||||
|
// {
|
||||||
|
inherit extraGroups;
|
||||||
|
name = "ben";
|
||||||
|
openssh.authorizedKeys.keys = benKeys ++ kanivanKeys;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.sshServe = {
|
nix.sshServe = {
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
{ inputs, config, makeEnable, ... }:
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.vscode" true {
|
makeEnable config "myModules.vscode" true {
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
inputs.vscode-server.homeModules.default
|
inputs.vscode-server.homeModules.default
|
||||||
{ services.vscode-server.enable = true; }
|
{services.vscode-server.enable = true;}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, makeEnable, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.waybar" false {
|
makeEnable config "myModules.waybar" false {
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
{
|
{
|
||||||
@@ -7,9 +12,9 @@ makeEnable config "myModules.waybar" false {
|
|||||||
systemd.user.services.waybar = {
|
systemd.user.services.waybar = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Waybar";
|
Description = "Waybar";
|
||||||
PartOf = [ "wayland-session@Hyprland.target" "tray.target" ];
|
PartOf = ["wayland-session@Hyprland.target" "tray.target"];
|
||||||
After = [ "wayland-session@Hyprland.target" "tray.target" ];
|
After = ["wayland-session@Hyprland.target" "tray.target"];
|
||||||
Wants = [ "tray.target" ];
|
Wants = ["tray.target"];
|
||||||
};
|
};
|
||||||
Service = {
|
Service = {
|
||||||
ExecStartPre = "${pkgs.bash}/bin/bash -lc 'uid=$(id -u); runtime_dir=\"$XDG_RUNTIME_DIR\"; if [ -z \"$runtime_dir\" ]; then runtime_dir=\"/run/user/$uid\"; fi; for i in $(seq 1 50); do if [ -n \"$WAYLAND_DISPLAY\" ] && [ -S \"$runtime_dir/$WAYLAND_DISPLAY\" ]; then found=1; break; fi; sleep 0.1; done; if [ -z \"$found\" ]; then exit 1; fi; \"$HOME/.config/waybar/scripts/render-config\"'";
|
ExecStartPre = "${pkgs.bash}/bin/bash -lc 'uid=$(id -u); runtime_dir=\"$XDG_RUNTIME_DIR\"; if [ -z \"$runtime_dir\" ]; then runtime_dir=\"/run/user/$uid\"; fi; for i in $(seq 1 50); do if [ -n \"$WAYLAND_DISPLAY\" ] && [ -S \"$runtime_dir/$WAYLAND_DISPLAY\" ]; then found=1; break; fi; sleep 0.1; done; if [ -z \"$found\" ]; then exit 1; fi; \"$HOME/.config/waybar/scripts/render-config\"'";
|
||||||
@@ -18,7 +23,7 @@ makeEnable config "myModules.waybar" false {
|
|||||||
RestartSec = 1;
|
RestartSec = 1;
|
||||||
};
|
};
|
||||||
Install = {
|
Install = {
|
||||||
WantedBy = [ "wayland-session@Hyprland.target" ];
|
WantedBy = ["wayland-session@Hyprland.target"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
{ config, pkgs, lib, makeEnable, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.wlsunset" true {
|
makeEnable config "myModules.wlsunset" true {
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
{ config, inputs, pkgs, makeEnable, ... }:
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.wsl" false {
|
makeEnable config "myModules.wsl" false {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixos-wsl.nixosModules.wsl
|
inputs.nixos-wsl.nixosModules.wsl
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ pkgs, config, makeEnable, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
makeEnable config "myModules.wyoming" false {
|
makeEnable config "myModules.wyoming" false {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
alsa-utils
|
alsa-utils
|
||||||
|
|||||||
429
nixos/xmonad.nix
429
nixos/xmonad.nix
@@ -1,217 +1,226 @@
|
|||||||
{ config, pkgs, inputs, lib, makeEnable, ... }:
|
{
|
||||||
let
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
makeEnable,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
session = import ./session-variables.nix;
|
session = import ./session-variables.nix;
|
||||||
in
|
in
|
||||||
makeEnable config "myModules.xmonad" true {
|
makeEnable config "myModules.xmonad" true {
|
||||||
myModules.taffybar.enable = lib.mkDefault (config.myModules.desktop.shellUi == "taffybar");
|
myModules.taffybar.enable = lib.mkDefault (config.myModules.desktop.shellUi == "taffybar");
|
||||||
|
|
||||||
nixpkgs.overlays = with inputs; [
|
nixpkgs.overlays = with inputs; [
|
||||||
xmonad.overlay
|
xmonad.overlay
|
||||||
xmonad-contrib.overlay
|
xmonad-contrib.overlay
|
||||||
(import ../dotfiles/config/xmonad/overlay.nix)
|
(import ../dotfiles/config/xmonad/overlay.nix)
|
||||||
];
|
];
|
||||||
|
|
||||||
services.rumno.enable = true;
|
services.rumno.enable = true;
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
windowManager = {
|
windowManager = {
|
||||||
session = [
|
session = [
|
||||||
{
|
{
|
||||||
name = "xmonad";
|
name = "xmonad";
|
||||||
start = ''
|
start = ''
|
||||||
/usr/bin/env imalison-xmonad &
|
/usr/bin/env imalison-xmonad &
|
||||||
waitPID=$!
|
waitPID=$!
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Haskell Desktop
|
||||||
|
haskellPackages.xmonad
|
||||||
|
haskellPackages.imalison-xmonad
|
||||||
|
# haskellPackages.notifications-tray-icon
|
||||||
|
# haskellPackages.gtk-sni-tray
|
||||||
|
haskellPackages.dbus-hslogger
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.sharedModules = [
|
||||||
|
{
|
||||||
|
services.autorandr.enable = true;
|
||||||
|
systemd.user.services.autorandr.Unit.ConditionEnvironment = session.x11;
|
||||||
|
|
||||||
|
services.random-background = {
|
||||||
|
enable = true;
|
||||||
|
display = "fill";
|
||||||
|
interval = "1h";
|
||||||
|
imageDirectory = "/var/lib/syncthing/sync/Wallpaper/use";
|
||||||
|
};
|
||||||
|
# This service uses feh (X11), so don't run it in Wayland sessions.
|
||||||
|
systemd.user.services.random-background.Unit.ConditionEnvironment = session.x11;
|
||||||
|
|
||||||
|
services.xsettingsd.enable = true;
|
||||||
|
systemd.user.services.xsettingsd.Unit.ConditionEnvironment = session.x11;
|
||||||
|
|
||||||
|
# services.parcellite = {
|
||||||
|
# enable = true;
|
||||||
|
# package = pkgs.clipit;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Completely disable home-manager's picom - we manage everything ourselves
|
||||||
|
# to work around the libconfig list vs array syntax issue for animations
|
||||||
|
services.picom.enable = false;
|
||||||
|
|
||||||
|
# Our own picom systemd service
|
||||||
|
systemd.user.services.picom = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Picom X11 compositor";
|
||||||
|
ConditionEnvironment = session.x11;
|
||||||
|
After = ["graphical-session.target"];
|
||||||
|
PartOf = ["graphical-session.target"];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
# Debug logging to file for monitoring
|
||||||
|
ExecStart = "${pkgs.picom}/bin/picom --config %h/.config/picom/picom.conf --log-level=debug --log-file=%h/.local/share/picom/debug.log";
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = 3;
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = ["graphical-session.target"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Ensure log directory exists
|
||||||
|
xdg.dataFile."picom/.keep".text = "";
|
||||||
|
|
||||||
|
# Write complete picom config directly to avoid home-manager's libconfig generator
|
||||||
|
# which incorrectly uses [] instead of () for the animations list
|
||||||
|
xdg.configFile."picom/picom.conf" = {
|
||||||
|
force = true; # Override home-manager's generated config
|
||||||
|
text = ''
|
||||||
|
# Backend and basic settings
|
||||||
|
backend = "glx";
|
||||||
|
vsync = ${
|
||||||
|
if config.myModules.xmonad.picom.vSync.enable
|
||||||
|
then "true"
|
||||||
|
else "false"
|
||||||
|
};
|
||||||
|
|
||||||
|
# Spring physics animations (mainline picom with spring-physics branch)
|
||||||
|
# Syntax: spring(stiffness, dampening, mass) or spring(stiffness, dampening, mass, clamping)
|
||||||
|
# Set clamping to false for bounce/overshoot effects
|
||||||
|
animations = (
|
||||||
|
# Window move/resize animation with spring physics
|
||||||
|
# "geometry" is alias for "size" + "position" triggers
|
||||||
|
# Suppress opacity changes so they don't interrupt geometry animations
|
||||||
|
{
|
||||||
|
triggers = ["geometry"];
|
||||||
|
suppressions = ["decrease-opacity", "increase-opacity"];
|
||||||
|
offset-x = {
|
||||||
|
curve = "spring(150, 18, 1.5, false)";
|
||||||
|
start = "window-x-before - window-x";
|
||||||
|
end = 0;
|
||||||
|
};
|
||||||
|
offset-y = {
|
||||||
|
curve = "spring(150, 18, 1.5, false)";
|
||||||
|
start = "window-y-before - window-y";
|
||||||
|
end = 0;
|
||||||
|
};
|
||||||
|
scale-x = {
|
||||||
|
curve = "spring(150, 18, 1.5, false)";
|
||||||
|
start = "window-width-before / window-width";
|
||||||
|
end = 1;
|
||||||
|
};
|
||||||
|
scale-y = {
|
||||||
|
curve = "spring(150, 18, 1.5, false)";
|
||||||
|
start = "window-height-before / window-height";
|
||||||
|
end = 1;
|
||||||
|
};
|
||||||
|
},
|
||||||
|
# Window open/show animation with spring physics
|
||||||
|
{
|
||||||
|
triggers = ["open", "show"];
|
||||||
|
# Opacity uses spring with clamping to prevent going above 1
|
||||||
|
opacity = {
|
||||||
|
curve = "spring(150, 18, 1.5, true)";
|
||||||
|
start = 0;
|
||||||
|
end = "window-raw-opacity";
|
||||||
|
};
|
||||||
|
# Scale uses spring with bounce for a nice "pop" effect
|
||||||
|
scale-x = {
|
||||||
|
curve = "spring(150, 18, 1.5, false)";
|
||||||
|
start = 0.85;
|
||||||
|
end = 1;
|
||||||
|
};
|
||||||
|
scale-y = {
|
||||||
|
curve = "spring(150, 18, 1.5, false)";
|
||||||
|
start = 0.85;
|
||||||
|
end = 1;
|
||||||
|
};
|
||||||
|
# Center the scaling effect
|
||||||
|
offset-x = "(1 - scale-x) / 2 * window-width";
|
||||||
|
offset-y = "(1 - scale-y) / 2 * window-height";
|
||||||
|
},
|
||||||
|
# Window close/hide animation with spring physics
|
||||||
|
{
|
||||||
|
triggers = ["close", "hide"];
|
||||||
|
opacity = {
|
||||||
|
curve = "spring(150, 18, 1.5, true)";
|
||||||
|
start = "window-raw-opacity";
|
||||||
|
end = 0;
|
||||||
|
};
|
||||||
|
scale-x = {
|
||||||
|
curve = "spring(150, 18, 1.5, true)";
|
||||||
|
start = 1;
|
||||||
|
end = 0.9;
|
||||||
|
};
|
||||||
|
scale-y = {
|
||||||
|
curve = "spring(150, 18, 1.5, true)";
|
||||||
|
start = 1;
|
||||||
|
end = 0.9;
|
||||||
|
};
|
||||||
|
# Center the scaling effect
|
||||||
|
offset-x = "(1 - scale-x) / 2 * window-width";
|
||||||
|
offset-y = "(1 - scale-y) / 2 * window-height";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
# Fading
|
||||||
|
fading = true;
|
||||||
|
fade-in-step = 0.028;
|
||||||
|
fade-out-step = 0.028;
|
||||||
|
|
||||||
|
# Corners
|
||||||
|
corner-radius = 10;
|
||||||
|
round-borders = 0;
|
||||||
|
rounded-corners-exclude = [
|
||||||
|
"! name~='''",
|
||||||
|
"window_type = 'dock'",
|
||||||
|
"window_type = 'desktop'",
|
||||||
|
"class_g ?= 'Dunst'"
|
||||||
|
];
|
||||||
|
round-borders-exclude = [
|
||||||
|
"! name~='''"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Focus and opacity
|
||||||
|
focus-exclude = ["class_g ?= 'rofi'", "class_g ?= 'Steam'"];
|
||||||
|
invert-color-include = [];
|
||||||
|
|
||||||
|
# Detection
|
||||||
|
detect-rounded-corners = true;
|
||||||
|
detect-client-opacity = true;
|
||||||
|
detect-transient = true;
|
||||||
|
detect-client-leader = true;
|
||||||
|
mark-wmwin-focused = false;
|
||||||
|
mark-ovredir-focused = false;
|
||||||
|
|
||||||
|
# Other settings
|
||||||
|
daemon = false;
|
||||||
|
dbus = false;
|
||||||
|
unredir-if-possible = false;
|
||||||
|
unredir-if-possible-exclude = [];
|
||||||
|
use-damage = false;
|
||||||
|
transparent-clipping = false;
|
||||||
'';
|
'';
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
# Haskell Desktop
|
|
||||||
haskellPackages.xmonad
|
|
||||||
haskellPackages.imalison-xmonad
|
|
||||||
# haskellPackages.notifications-tray-icon
|
|
||||||
# haskellPackages.gtk-sni-tray
|
|
||||||
haskellPackages.dbus-hslogger
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.sharedModules = [
|
|
||||||
{
|
|
||||||
services.autorandr.enable = true;
|
|
||||||
systemd.user.services.autorandr.Unit.ConditionEnvironment = session.x11;
|
|
||||||
|
|
||||||
services.random-background = {
|
|
||||||
enable = true;
|
|
||||||
display = "fill";
|
|
||||||
interval = "1h";
|
|
||||||
imageDirectory = "/var/lib/syncthing/sync/Wallpaper/use";
|
|
||||||
};
|
|
||||||
# This service uses feh (X11), so don't run it in Wayland sessions.
|
|
||||||
systemd.user.services.random-background.Unit.ConditionEnvironment = session.x11;
|
|
||||||
|
|
||||||
services.xsettingsd.enable = true;
|
|
||||||
systemd.user.services.xsettingsd.Unit.ConditionEnvironment = session.x11;
|
|
||||||
|
|
||||||
# services.parcellite = {
|
|
||||||
# enable = true;
|
|
||||||
# package = pkgs.clipit;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Completely disable home-manager's picom - we manage everything ourselves
|
|
||||||
# to work around the libconfig list vs array syntax issue for animations
|
|
||||||
services.picom.enable = false;
|
|
||||||
|
|
||||||
# Our own picom systemd service
|
|
||||||
systemd.user.services.picom = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Picom X11 compositor";
|
|
||||||
ConditionEnvironment = session.x11;
|
|
||||||
After = [ "graphical-session.target" ];
|
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
};
|
};
|
||||||
Service = {
|
}
|
||||||
# Debug logging to file for monitoring
|
];
|
||||||
ExecStart = "${pkgs.picom}/bin/picom --config %h/.config/picom/picom.conf --log-level=debug --log-file=%h/.local/share/picom/debug.log";
|
}
|
||||||
Restart = "always";
|
|
||||||
RestartSec = 3;
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
WantedBy = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Ensure log directory exists
|
|
||||||
xdg.dataFile."picom/.keep".text = "";
|
|
||||||
|
|
||||||
# Write complete picom config directly to avoid home-manager's libconfig generator
|
|
||||||
# which incorrectly uses [] instead of () for the animations list
|
|
||||||
xdg.configFile."picom/picom.conf" = {
|
|
||||||
force = true; # Override home-manager's generated config
|
|
||||||
text = ''
|
|
||||||
# Backend and basic settings
|
|
||||||
backend = "glx";
|
|
||||||
vsync = ${if config.myModules.xmonad.picom.vSync.enable then "true" else "false"};
|
|
||||||
|
|
||||||
# Spring physics animations (mainline picom with spring-physics branch)
|
|
||||||
# Syntax: spring(stiffness, dampening, mass) or spring(stiffness, dampening, mass, clamping)
|
|
||||||
# Set clamping to false for bounce/overshoot effects
|
|
||||||
animations = (
|
|
||||||
# Window move/resize animation with spring physics
|
|
||||||
# "geometry" is alias for "size" + "position" triggers
|
|
||||||
# Suppress opacity changes so they don't interrupt geometry animations
|
|
||||||
{
|
|
||||||
triggers = ["geometry"];
|
|
||||||
suppressions = ["decrease-opacity", "increase-opacity"];
|
|
||||||
offset-x = {
|
|
||||||
curve = "spring(150, 18, 1.5, false)";
|
|
||||||
start = "window-x-before - window-x";
|
|
||||||
end = 0;
|
|
||||||
};
|
|
||||||
offset-y = {
|
|
||||||
curve = "spring(150, 18, 1.5, false)";
|
|
||||||
start = "window-y-before - window-y";
|
|
||||||
end = 0;
|
|
||||||
};
|
|
||||||
scale-x = {
|
|
||||||
curve = "spring(150, 18, 1.5, false)";
|
|
||||||
start = "window-width-before / window-width";
|
|
||||||
end = 1;
|
|
||||||
};
|
|
||||||
scale-y = {
|
|
||||||
curve = "spring(150, 18, 1.5, false)";
|
|
||||||
start = "window-height-before / window-height";
|
|
||||||
end = 1;
|
|
||||||
};
|
|
||||||
},
|
|
||||||
# Window open/show animation with spring physics
|
|
||||||
{
|
|
||||||
triggers = ["open", "show"];
|
|
||||||
# Opacity uses spring with clamping to prevent going above 1
|
|
||||||
opacity = {
|
|
||||||
curve = "spring(150, 18, 1.5, true)";
|
|
||||||
start = 0;
|
|
||||||
end = "window-raw-opacity";
|
|
||||||
};
|
|
||||||
# Scale uses spring with bounce for a nice "pop" effect
|
|
||||||
scale-x = {
|
|
||||||
curve = "spring(150, 18, 1.5, false)";
|
|
||||||
start = 0.85;
|
|
||||||
end = 1;
|
|
||||||
};
|
|
||||||
scale-y = {
|
|
||||||
curve = "spring(150, 18, 1.5, false)";
|
|
||||||
start = 0.85;
|
|
||||||
end = 1;
|
|
||||||
};
|
|
||||||
# Center the scaling effect
|
|
||||||
offset-x = "(1 - scale-x) / 2 * window-width";
|
|
||||||
offset-y = "(1 - scale-y) / 2 * window-height";
|
|
||||||
},
|
|
||||||
# Window close/hide animation with spring physics
|
|
||||||
{
|
|
||||||
triggers = ["close", "hide"];
|
|
||||||
opacity = {
|
|
||||||
curve = "spring(150, 18, 1.5, true)";
|
|
||||||
start = "window-raw-opacity";
|
|
||||||
end = 0;
|
|
||||||
};
|
|
||||||
scale-x = {
|
|
||||||
curve = "spring(150, 18, 1.5, true)";
|
|
||||||
start = 1;
|
|
||||||
end = 0.9;
|
|
||||||
};
|
|
||||||
scale-y = {
|
|
||||||
curve = "spring(150, 18, 1.5, true)";
|
|
||||||
start = 1;
|
|
||||||
end = 0.9;
|
|
||||||
};
|
|
||||||
# Center the scaling effect
|
|
||||||
offset-x = "(1 - scale-x) / 2 * window-width";
|
|
||||||
offset-y = "(1 - scale-y) / 2 * window-height";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
# Fading
|
|
||||||
fading = true;
|
|
||||||
fade-in-step = 0.028;
|
|
||||||
fade-out-step = 0.028;
|
|
||||||
|
|
||||||
# Corners
|
|
||||||
corner-radius = 10;
|
|
||||||
round-borders = 0;
|
|
||||||
rounded-corners-exclude = [
|
|
||||||
"! name~='''",
|
|
||||||
"window_type = 'dock'",
|
|
||||||
"window_type = 'desktop'",
|
|
||||||
"class_g ?= 'Dunst'"
|
|
||||||
];
|
|
||||||
round-borders-exclude = [
|
|
||||||
"! name~='''"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Focus and opacity
|
|
||||||
focus-exclude = ["class_g ?= 'rofi'", "class_g ?= 'Steam'"];
|
|
||||||
invert-color-include = [];
|
|
||||||
|
|
||||||
# Detection
|
|
||||||
detect-rounded-corners = true;
|
|
||||||
detect-client-opacity = true;
|
|
||||||
detect-transient = true;
|
|
||||||
detect-client-leader = true;
|
|
||||||
mark-wmwin-focused = false;
|
|
||||||
mark-ovredir-focused = false;
|
|
||||||
|
|
||||||
# Other settings
|
|
||||||
daemon = false;
|
|
||||||
dbus = false;
|
|
||||||
unredir-if-possible = false;
|
|
||||||
unredir-if-possible-exclude = [];
|
|
||||||
use-damage = false;
|
|
||||||
transparent-clipping = false;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user