Compare commits
15
Commits
main
..
49deb7991d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49deb7991d
|
||
|
|
039cd96329
|
||
|
|
786be7bdc9
|
||
|
|
fe4ca266c2
|
||
|
|
8acede0964
|
||
|
|
9eb4e7b429
|
||
|
|
017a73cf7d
|
||
|
|
b678e90455
|
||
|
|
ad66564dea
|
||
|
|
90bb720391
|
||
|
|
2261876326
|
||
|
|
52dbd6e3cf
|
||
|
|
457134dbc4
|
||
|
|
8cb2e05312
|
||
|
|
1528eee84e
|
@@ -3,5 +3,3 @@ nix/nixos.qcow2
|
||||
nix_file.tar.gz
|
||||
nvim
|
||||
tmux/plugins
|
||||
modules/quickshell/quickshell/.qmlls.ini
|
||||
result
|
||||
|
||||
+3
-8
@@ -2,12 +2,7 @@
|
||||
creation_rules:
|
||||
# Rule to encrypt YAML secret files in a specific directory
|
||||
- encrypted_regex: '^(data|stringData)$' # Encrypt data and stringData by default (useful for Kubernetes secrets)
|
||||
path_regex: config/modules/secrets/content/*.*\.yaml$ # Applies to all files in the secrets/ directory
|
||||
path_regex: secrets/.*\.yaml$ # Applies to all files in the secrets/ directory
|
||||
age:
|
||||
- "age1ykcy2r4kk729e7adqxu8s24ujc60z5eux7ma0ca4ruzydwgm5p6qmdp838" # pc-user-doloro
|
||||
- "age1e6vws55p0g23qzthm4qa93hpt6lqmck6670gkygph0sc0j7my4uq5wqjfh" # pc-system
|
||||
- "age1x3lahhkefkap67cdmdjcqaxan9hp62er78akr79v9m73nvgugpeqk0y32a" # laptop-user-doloro
|
||||
- "age1exzngtk4d9vcsmcq6ap5xx3ca9qacqjkrv86ymged7msx9z6vfyqsf5sjq" # laptop-system
|
||||
- "age1fw4xnh2q52juce94ffn54js708cr6umfwpv0mykuddkea7kr4f0q7a9h05" # rpi5
|
||||
- "age15mxdhlvk7zxtqlw06cu29zdzk9jxjfgvx9s335wxyyk5r7wr9pvqv9894t" # laptop-surface-user-doloro
|
||||
- "age129rxje3pr8w5ulgszgmt98kt4kr06kdwhsg9js78sjte878ngf5qealch2" # laptop-surface-system
|
||||
- "age1ykcy2r4kk729e7adqxu8s24ujc60z5eux7ma0ca4ruzydwgm5p6qmdp838" # pc
|
||||
- "age1exzngtk4d9vcsmcq6ap5xx3ca9qacqjkrv86ymged7msx9z6vfyqsf5sjq" # laptop
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
# Doloro's Dotfiles
|
||||
|
||||
NixOS dotfiles managed via **flake-parts** + **den** (custom flake framework). Multi-host: desktop, laptop, WSL, RPi5 server.
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
dotfiles/
|
||||
├── flake.nix # Entry point: `outputs = inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./config);`
|
||||
├── .sops.yaml # Age-encrypted secrets (6 keys: desktop/laptop user+system, rpi5)
|
||||
├── config/
|
||||
│ ├── dendritic.nix # Root config import
|
||||
│ ├── inputs.nix # Flake input definitions
|
||||
│ ├── namespace.nix # Namespace setup
|
||||
│ ├── defaults.nix # Default values
|
||||
│ ├── hosts/
|
||||
│ │ ├── computers.nix # desktop (x86_64), laptop (aarch64), wsl (aarch64), doloro-bootable
|
||||
│ │ ├── servers.nix # rpi5 (aarch64)
|
||||
│ │ └── aspects/ # Host-specific configurations
|
||||
│ │ ├── doloro-shared.nix # Common to all doloro hosts (nixvim, tmux, git, ssh, hyfetch)
|
||||
│ │ ├── doloro-desktop/ # Desktop-specific (disko, hardware, home, host)
|
||||
│ │ ├── doloro-laptop/ # Laptop-specific (disko, hardware, home, host, power-management)
|
||||
│ │ ├── doloro-wsl/ # WSL-specific (home, host)
|
||||
│ │ ├── doloro-bootable/ # Bootable USB (home, host)
|
||||
│ │ └── servers/rpi5.nix # Raspberry Pi 5
|
||||
│ └── modules/ # Reusable configuration modules
|
||||
│ ├── ai/ # AI tools (pi-coding-agent, OpenMeteo)
|
||||
│ ├── gaming/ # Steam, gamemode, gamepad
|
||||
│ ├── hyprland/ # Window manager
|
||||
│ ├── niri/ # Alternative WM
|
||||
│ ├── nixvim/ # Neovim config
|
||||
│ ├── power-management/ # TLP, auto-cpufreq, battery targets
|
||||
│ ├── secrets/ # SOPS-managed secrets
|
||||
│ ├── services/ # Caddy, DDNS, Home Assistant, Traefik, RTMP
|
||||
│ └── ...
|
||||
```
|
||||
|
||||
## Hosts
|
||||
|
||||
| Host | Arch | Type | Key Modules |
|
||||
| ------ | ------ | ------ | ------------- |
|
||||
| `desktop` | x86_64 | NixOS + HM | Hyprland, gaming, disko, full stack |
|
||||
| `laptop` | aarch64 | NixOS + HM | Power management, Hyprland |
|
||||
| `wsl` | aarch64 | NixOS | WSL setup |
|
||||
| `doloro-bootable` | x86_64 | NixOS | Bootable USB recovery |
|
||||
| `rpi5` | aarch64 | NixOS | Server, no GUI |
|
||||
|
||||
## Key Tools & Stack
|
||||
|
||||
- **Window Manager**: Hyprland (primary), Niri (alternative)
|
||||
- **Editor**: Nixvim (Neovim) — Gruvbox Material, LSP (rust-analyzer, nixd, tsserver), Treesitter, Lualine, Telescope, LazyGit
|
||||
- **Shell**: Fish
|
||||
- **AI**: Pi Coding Agent v0.81.1 (LiteLLM via `scuggo` proxy)
|
||||
- Models: meow (litellm), claude-opus-4-8, gpt-5.5, gpt-5.4-mini (recap/title)
|
||||
- Skills: pi-lens, pi-lean-ctx, pi-vitals, pi-spark, pi-caveman, pi-pretty, pi-context-engineering
|
||||
- **Terminal**: Kitty
|
||||
- **Browser**: Zen Browser, Helium
|
||||
- **Music**: Spicetify (Spotify)
|
||||
- **Aurora**: Stylix (themes), NixOS-Hardware
|
||||
- **Container**: Podman
|
||||
- **Flatpak**: nix-flatpak
|
||||
- **Secrets**: SOPS + Age (6 keys for desktop/laptop user+system, rpi5)
|
||||
- **Nerd Fonts**: Custom patched (Doloro1978/nix-nerd-fonts-patcher)
|
||||
|
||||
## Conventions
|
||||
|
||||
1. **Never edit `flake.nix` directly** — run `nix run .#write-flake` to regenerate
|
||||
2. **Secrets** live in `config/modules/secrets/` — encrypted via SOPS age keys in `.sops.yaml`
|
||||
3. **Modules** are modular: split by concern (ai, gaming, hyprland, power-management, services)
|
||||
4. **Hosts** split into `computers.nix` and `servers.nix` — each host gets `aspect` references
|
||||
5. **Shared config** lives in `doloro-shared.nix` — imported by all doloro hosts
|
||||
6. **Disko** handles disk layouts for desktop/laptop
|
||||
7. **Power management** is laptop-specific: TLP, auto-cpufreq, battery AC targets, Intel GPU, TDP
|
||||
8. **CachyOS kernel** available as module for desktop
|
||||
|
||||
## Common Operations
|
||||
|
||||
```bash
|
||||
# Apply configuration
|
||||
sudo nixos-rebuild switch --flake .#desktop
|
||||
|
||||
# Home Manager (doloro user)
|
||||
home-manager switch --flake .#doloro-desktop
|
||||
|
||||
# Update flake inputs
|
||||
nix flake update
|
||||
|
||||
# Write regenerated flake.nix
|
||||
nix run .#write-flake
|
||||
|
||||
# Encrypt a secret
|
||||
nix run .#sops-encrypt <file>
|
||||
|
||||
# Enter development shell
|
||||
nix develop
|
||||
```
|
||||
|
||||
## Validating Config Changes
|
||||
|
||||
Standard validation sequence before relying on any edit to a `.nix` module (used for opencode, ai, and other module changes):
|
||||
|
||||
1. **Parse check** (fast, catches syntax/brace errors):
|
||||
```bash
|
||||
nix-instantiate --parse config/modules/ai/ai.nix >/dev/null && echo "PARSE OK"
|
||||
```
|
||||
2. **Hash verification** for any downloaded file pinned via `pkgs.fetchurl` — compute the sha256 locally and confirm it matches the `sha256` in the module:
|
||||
```bash
|
||||
nix hash file token-tracker.tsx # or: sha256sum token-tracker.tsx
|
||||
```
|
||||
3. **Flake evaluation** — full `nix flake check` may fail on unrelated pre-existing issues (e.g. `<den/primary-user>` not on NIX_PATH in pure mode). Distinguish pre-existing failures from edit-induced ones before touching the code. `nix flake show --impure` lists the configuration names (`nixosConfigurations: desktop, doloro-bootable, laptop, rpi5, wsl`).
|
||||
4. **Runtime output check** — the generated config is a home-manager symlink into `/nix/store`. After a rebuild, confirm the live files actually contain the change:
|
||||
```bash
|
||||
readlink -f ~/.config/opencode/opencode.json # → /nix/store/...-opencode.json
|
||||
rg -n "my-change" "$(readlink -f ~/.config/opencode/opencode.json)"
|
||||
```
|
||||
Also verify supporting files that the change depends on (plugins dir, extra packages, etc.):
|
||||
```bash
|
||||
ls -la ~/.config/opencode/plugins/ && readlink -f ~/.config/opencode/plugins/*.tsx
|
||||
```
|
||||
5. **Cache check** for npm-resolved opencode plugins — confirm opencode actually downloaded the package into its plugin cache:
|
||||
```bash
|
||||
ls ~/.cache/opencode/packages/ | rg "plugin-name"
|
||||
```
|
||||
If the package is absent or an old version, the plugin won't load regardless of config.
|
||||
6. **Log check** — search opencode's log for plugin-load errors, filtering out your own tool-call noise:
|
||||
```bash
|
||||
rg -i "plugin" ~/.local/share/opencode/log/opencode.log | rg -v "evaluated permission" | tail -30
|
||||
```
|
||||
7. **Config is loaded once at startup** — a running opencode session keeps the config it loaded at launch. After changing any config file, restart opencode (and run a home-manager rebuild first) before expecting the change to take effect.
|
||||
|
||||
## Important Notes
|
||||
|
||||
- `allowUnfree = true` globally for proprietary packages (Steam, Spotify, etc.)
|
||||
- Multiple cachix substitutes configured for speed (hyprland, nix-community, niri, raspberrypi, cuda)
|
||||
- Pi coding agent uses `scuggo` LiteLLM proxy at `https://9f5db439.fwds.scug.io`
|
||||
- API key via env var `$SCUG_IO_API_KEY`
|
||||
- WSL host uses `nixos-wsl` flake input
|
||||
- RPi5 uses `nixos-raspberrypi` and `raspberry-pi-nix`
|
||||
|
||||
## File Rules
|
||||
|
||||
- `.gitignore`: exclude `nix/result`, `result`, `nvim`, `tmux/plugins`, `modules/quickshell/quickshell/.qmlls.ini`
|
||||
- `.new` file exists (empty) — likely a marker
|
||||
- `.claude/` directory present (Claude Code config)
|
||||
@@ -1,7 +0,0 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
den.default = {
|
||||
nixos.system.stateVersion = "25.11";
|
||||
homeManager.home.stateVersion = "25.11";
|
||||
};
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{ inputs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.flake-file.flakeModules.dendritic
|
||||
inputs.den.flakeModules.dendritic
|
||||
];
|
||||
flake-file.do-not-edit = "You FAGGOT; Do NOT edit this file !!!!, run 'nix run .#write-flake' ";
|
||||
flake-file.outputs = lib.mkForce ''
|
||||
inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./config)
|
||||
'';
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.doloro-bootable = {
|
||||
includes = [
|
||||
<den/primary-user>
|
||||
den.aspects.doloro-shared
|
||||
modules.nixvim
|
||||
];
|
||||
homeManager = {
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
btrfs-progs
|
||||
chntpw
|
||||
ddrescue
|
||||
fd
|
||||
gpart
|
||||
ntfs3g
|
||||
parted
|
||||
ranger
|
||||
rsync
|
||||
testdisk
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
den.aspects.doloro-bootable = {
|
||||
nixos = {
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
networking.hostName = "doloro-recovery";
|
||||
networking.networkmanager.enable = true;
|
||||
services.openssh.enable = true;
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
boot.loader.grub.efiSupport = true;
|
||||
boot.loader.grub.efiInstallAsRemovable = true;
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"ehci_pci"
|
||||
"xen_blkfront"
|
||||
"sr_mod"
|
||||
"nvme"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
btrfs-progs
|
||||
btop
|
||||
chntpw
|
||||
ddrescue
|
||||
e2fsprogs
|
||||
fastfetch
|
||||
fd
|
||||
gpart
|
||||
git
|
||||
ntfs3g
|
||||
parted
|
||||
pavucontrol
|
||||
pciutils
|
||||
ranger
|
||||
rsync
|
||||
testdisk
|
||||
util-linux
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
users.users.doloro = {
|
||||
isNormalUser = true;
|
||||
group = "doloro";
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
initialPassword = "recovery";
|
||||
};
|
||||
|
||||
users.groups.doloro = {};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
services.getty.autologinUser = "doloro";
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@tty1".enable = false;
|
||||
|
||||
services.xserver.enable = false;
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
{
|
||||
modules,
|
||||
__findFile,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.desktop = {
|
||||
includes = [ modules.disko ];
|
||||
nixos =
|
||||
{ lib, ... }:
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
device = lib.mkDefault "/dev/disk/by-id/nvme-CT1000P2SSD8_2221E632CD1F";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
ESP = {
|
||||
name = "ESP";
|
||||
priority = 1;
|
||||
size = "4G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
# Subvolumes must set a mountpoint in order to be mounted,
|
||||
# unless their parent is mounted
|
||||
subvolumes = {
|
||||
# Subvolume name is different from mountpoint
|
||||
"@" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
# Subvolume name is the same as the mountpoint
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
};
|
||||
# Parent is not mounted so the mountpoint must be set
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
"@blackhole" = {
|
||||
mountpoint = "/var/blackhole";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
den.aspects.desktop = {
|
||||
nixos =
|
||||
{
|
||||
modulesPath,
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,160 +0,0 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.doloro-desktop = {
|
||||
includes = [
|
||||
<den/primary-user>
|
||||
den.aspects.doloro-shared
|
||||
modules.sops
|
||||
modules.flatpaks
|
||||
modules.gamemode
|
||||
modules.gameaudio
|
||||
modules.hyprland
|
||||
modules.fish
|
||||
modules.tuigreet
|
||||
modules.kitty
|
||||
modules.nikpkgs
|
||||
modules.fonts
|
||||
modules.unity
|
||||
modules.printing
|
||||
<modules/hyprland/doloro-settings>
|
||||
(modules.obs {
|
||||
audio = true;
|
||||
autostart = true;
|
||||
})
|
||||
<modules/common/gaming>
|
||||
modules.hytale-launcher
|
||||
# modules.helium
|
||||
(<modules/helium> {
|
||||
default = true;
|
||||
})
|
||||
# modules.niri # Testing
|
||||
modules.stylix
|
||||
# modules.quickshell
|
||||
modules.barbar
|
||||
modules.nix-ld
|
||||
modules.spotify
|
||||
# modules.easyeffects
|
||||
# modules.lavd
|
||||
<modules/ai/secrets>
|
||||
# modules.ai
|
||||
modules.pi-coding # inactive: swapped to opencode
|
||||
# modules.omp
|
||||
modules.podman
|
||||
modules.wivrn
|
||||
# <modules/ai/ollama-cuda>
|
||||
];
|
||||
nixos =
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
users.users.doloro = {
|
||||
shell = pkgs.fish;
|
||||
hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path;
|
||||
extraGroups = [
|
||||
"libvirtd"
|
||||
"gamemode"
|
||||
"dialout"
|
||||
];
|
||||
};
|
||||
# Register GSettings schemas so GTK/GLib apps (orca-slicer) can find
|
||||
# them; without this GLib aborts with "No GSettings schemas are
|
||||
# installed on the system" on non-GNOME desktops.
|
||||
programs.dconf.enable = true;
|
||||
virtualisation.libvirtd.enable = false;
|
||||
# virtualisation.waydroid.enable = true;
|
||||
# # Newer kernel versions may need
|
||||
# virtualisation.waydroid.package = pkgs.waydroid-nftables;
|
||||
programs.virt-manager.enable = false;
|
||||
};
|
||||
homeManager =
|
||||
{
|
||||
home,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
xdg.configFile."hypr/hyprland-local.lua" = {
|
||||
text = ''
|
||||
-- Host overrides (desktop): pin workspaces to monitors.
|
||||
-- HDMI-A-1 (left) shows workspace 1, DP-2 (right) shows workspace 2.
|
||||
hl.workspace_rule({ workspace = "name:1", monitor = "HDMI-A-1" })
|
||||
hl.workspace_rule({ workspace = "name:2", monitor = "DP-2" })
|
||||
|
||||
-- Autostart (workspace placement applies only to these spawned windows)
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("steam", { workspace = "6 silent" })
|
||||
hl.exec_cmd("telegram-desktop", { workspace = "8 silent" })
|
||||
hl.exec_cmd("equibop", { workspace = "8 silent" })
|
||||
hl.exec_cmd("spotify", { workspace = "9 silent" })
|
||||
hl.exec_cmd("obs", { workspace = "10 silent" })
|
||||
end)
|
||||
'';
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
equibop
|
||||
telegram-desktop
|
||||
obsidian
|
||||
# pear-desktop
|
||||
prismlauncher
|
||||
# deadlock-mod-manager
|
||||
inputs.grimoire.packages.x86_64-linux.grimoire
|
||||
# gamescope
|
||||
android-studio
|
||||
blender
|
||||
qbittorrent
|
||||
mpv
|
||||
krita
|
||||
clang
|
||||
mold
|
||||
# (tetrio-desktop.override { withTetrioPlus = true; })
|
||||
# bottles
|
||||
# orca-slicer's wrapGAppsHook does not actually wrap the installed
|
||||
# binary, so neither the GSettings schema path nor the NVIDIA/zink
|
||||
# workaround env from `withNvidiaGLWorkaround` reach the process.
|
||||
# Wrap it ourselves: prepend the gtk3 + gsettings-desktop schema dirs
|
||||
# to XDG_DATA_DIRS (fixes "No GSettings schemas are installed on the
|
||||
# system") and set the zink GL workaround explicitly.
|
||||
(pkgs.symlinkJoin {
|
||||
name = "orca-slicer";
|
||||
paths = [ (pkgs.orca-slicer.override { withNvidiaGLWorkaround = true; }) ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/orca-slicer \
|
||||
--prefix XDG_DATA_DIRS : "${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}" \
|
||||
--set __GLX_VENDOR_LIBRARY_NAME mesa \
|
||||
--set __EGL_VENDOR_LIBRARY_FILENAMES /run/opengl-driver/share/glvnd/egl_vendor.d/50_mesa.json \
|
||||
--set MESA_LOADER_DRIVER_OVERRIDE zink \
|
||||
--set GALLIUM_DRIVER zink \
|
||||
--set WEBKIT_DISABLE_DMABUF_RENDERER 1
|
||||
'';
|
||||
})
|
||||
inputs.nix-output-monitor.packages.x86_64-linux.default
|
||||
# prusa-slicer
|
||||
];
|
||||
programs.lutris.enable = true;
|
||||
nixpkgs.overlays = [
|
||||
# Skipping tests while upstream sorts it out, revert once
|
||||
# Hydra consistently builds openldap green.
|
||||
# (final: prev: {
|
||||
# openldap = prev.openldap.overrideAttrs (_: {
|
||||
# doCheck = false;
|
||||
# });
|
||||
# })
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.problems.handlers = {
|
||||
tetrio-plus.broken = "warn";
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,145 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
pkgs,
|
||||
inputs,
|
||||
__findFile,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.desktop = {
|
||||
includes = [
|
||||
modules.nix
|
||||
];
|
||||
nixos =
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "nodev";
|
||||
boot.loader.grub.devices = [
|
||||
"/dev/disk/by-id/nvme-CT1000P2SSD8_2221E632CD1F"
|
||||
"nodev"
|
||||
];
|
||||
#boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.grub.efiSupport = true;
|
||||
boot.loader.grub.efiInstallAsRemovable = true;
|
||||
networking.hostName = "doloroo-main"; # Define your hostname.
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.initrd.verbose = false;
|
||||
boot.kernelParams = [
|
||||
"boot.shell_on_fail"
|
||||
"rd.systemd.show_status=auto"
|
||||
];
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
configPackages = [ pkgs.xdg-desktop-portal-wlr ];
|
||||
wlr = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall.enable = false;
|
||||
|
||||
environment.systemPackages = with pkgs; [ polkit_gnome ];
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
libva-minimal
|
||||
vulkan-loader
|
||||
];
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
NVD_BACKEND = "direct";
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
fileSystems."/mnt/2tb" = {
|
||||
device = "/dev/disk/by-uuid/0f49aec7-4af2-4f4f-b475-3f4fad2b59c2";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
# If you don't have this options attribute, it'll default to "defaults"
|
||||
# boot options for fstab. Search up fstab mount options you can use
|
||||
"defaults"
|
||||
"users" # Allows any user to mount and unmount
|
||||
"nofail" # Prevent system from failing if this drive doesn't mount
|
||||
"exec"
|
||||
];
|
||||
};
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
hardware.nvidia = {
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = false;
|
||||
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
# prime.offload.enable = true;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
open = true;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 8192;
|
||||
}
|
||||
];
|
||||
|
||||
boot.binfmt.emulatedSystems = [
|
||||
"aarch64-linux"
|
||||
];
|
||||
# services.scx = {
|
||||
# enable = true;
|
||||
# package = pkgs.scx.rustscheds;
|
||||
# };
|
||||
# systemd.services.scx.environment = {
|
||||
# SCX_SCHEDULER_OVERRIDE = "scx_lavd";
|
||||
# SCX_FLAGS_OVERRIDE = "--performance --no-core-compaction";
|
||||
# };
|
||||
systemd.oomd = {
|
||||
enable = true;
|
||||
enableUserSlices = true;
|
||||
enableRootSlice = true;
|
||||
enableSystemSlice = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
{
|
||||
modules,
|
||||
__findFile,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.laptop = {
|
||||
includes = [ modules.disko ];
|
||||
nixos =
|
||||
{ lib, ... }:
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
device = "/dev/disk/by-id/nvme-MZ9L4256HCJQ-00BMV-SAMSUNG_S69VNF1X404046";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
ESP = {
|
||||
name = "ESP";
|
||||
priority = 1;
|
||||
size = "4G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
plainSwap = {
|
||||
size = "16G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both"; # Both "once" and page discard policies
|
||||
resumeDevice = true; # Use for hibernation resume device
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
# Subvolumes must set a mountpoint in order to be mounted,
|
||||
# unless their parent is mounted
|
||||
subvolumes = {
|
||||
# Subvolume name is different from mountpoint
|
||||
"@" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
# Subvolume name is the same as the mountpoint
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
};
|
||||
# Parent is not mounted so the mountpoint must be set
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
__findFile,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.laptop = {
|
||||
nixos =
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
# (modulesPath + "/hardware/cpu/intel-npu.nix")
|
||||
# (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
# boot.initrd.availableKernelModules = [
|
||||
# "xhci_pci"
|
||||
# "thunderbolt"
|
||||
# "vmd"
|
||||
# "nvme"
|
||||
# ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
# boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
# hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
# hardware.cpu.intel.npu.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.doloro-laptop = {
|
||||
includes = [
|
||||
<den/primary-user>
|
||||
den.aspects.doloro-shared
|
||||
modules.hyprland
|
||||
<modules/hyprland/doloro-settings>
|
||||
modules.sops
|
||||
modules.fish
|
||||
modules.surface-touchpad
|
||||
(<modules/helium> {
|
||||
default = true;
|
||||
})
|
||||
modules.kitty
|
||||
modules.stylix
|
||||
# modules.quickshell
|
||||
modules.barbar
|
||||
# modules.lavd
|
||||
# modules.omp
|
||||
# modules.podman
|
||||
# modules.openvivo
|
||||
];
|
||||
nixos =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
users.users.doloro = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path;
|
||||
};
|
||||
};
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
telegram-desktop
|
||||
equibop
|
||||
obsidian
|
||||
# intel-gpu-tools
|
||||
brightnessctl
|
||||
surface-control
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,252 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
__findFile,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.laptop = {
|
||||
includes = [
|
||||
modules.nix
|
||||
modules.tuigreet
|
||||
# <modules/common/laptop-power-management>
|
||||
modules.fonts
|
||||
modules.surface-patches
|
||||
modules.nikpkgs
|
||||
modules.auto-cpufreq
|
||||
modules.tlp
|
||||
# (modules.tdp {
|
||||
# batt = {
|
||||
# cpu = {
|
||||
# long-term = 13;
|
||||
# short-term = 7;
|
||||
# };
|
||||
# mmio = {
|
||||
# long-term = 10;
|
||||
# short-term = 7;
|
||||
# };
|
||||
# };
|
||||
# ac = {
|
||||
# cpu = {
|
||||
# long-term = 120;
|
||||
# short-term = 120;
|
||||
# };
|
||||
# mmio = {
|
||||
# long-term = 40;
|
||||
# short-term = 20;
|
||||
# };
|
||||
# };
|
||||
# })
|
||||
];
|
||||
nixos =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
services.upower.enable = true;
|
||||
networking.hostName = "doloro-nixos-laptop"; # Define your hostname.
|
||||
# security.rtkit.enable = true;
|
||||
|
||||
# Configure network connections interactively with nmcli or nmtui.
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
boot.initrd = {
|
||||
systemd = {
|
||||
enable = true;
|
||||
emergencyAccess = true;
|
||||
tpm2.enable = false;
|
||||
};
|
||||
};
|
||||
systemd.units."dev-tpm0.device".enable = false;
|
||||
systemd.units."dev-tpmrm0.device".enable = false;
|
||||
|
||||
# Set your time zone.
|
||||
# time.timeZone = "Europe/London";
|
||||
services.automatic-timezoned.enable = true;
|
||||
networking.wireless.iwd.enable = false;
|
||||
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
"https://attic.scug.io/pkgs"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"pkgs:+sRbfiZMMX5R3PuAPtIRz/emowDoGZNpozibrnrAvuc="
|
||||
];
|
||||
experimental-features = [
|
||||
"flakes"
|
||||
"nix-command"
|
||||
];
|
||||
trusted-users = [
|
||||
"doloro"
|
||||
];
|
||||
};
|
||||
|
||||
# services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
|
||||
};
|
||||
hardware = {
|
||||
# Qualcomm Adreno X1-85 (freedreno/turnip) + IRIS need the qcom
|
||||
# firmware blobs (gen70500_sqe.fw / gmu.bin / zap.mbn). On most
|
||||
# Snapdragon X laptops these must be extracted from Windows unless
|
||||
# shipped by linux-firmware (e.g. ThinkPad T14s Gen 6).
|
||||
firmware = [ pkgs.linux-firmware ];
|
||||
graphics = {
|
||||
enable = true;
|
||||
# Adreno has no userspace driver package to add here: GL/Vulkan
|
||||
# (freedreno/turnip) come from mesa (auto-included), and IRIS video
|
||||
# has no usable VA-API backend yet, so extraPackages stays empty.
|
||||
extraPackages = with pkgs; [
|
||||
];
|
||||
};
|
||||
};
|
||||
# NOTE: removed LIBVA_DRIVER_NAME="iHD" — that forces the Intel media
|
||||
# driver and is wrong on Qualcomm Adreno (aarch64).
|
||||
|
||||
# services.fwupd = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = true;
|
||||
PermitRootLogin = "prohibit-password";
|
||||
};
|
||||
};
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaa6Z5qtBSLEz+A4fQGYPfkOISsRQlmKkVbcx2zxML7"
|
||||
];
|
||||
|
||||
# Select internationalisation properties.
|
||||
# i18n.defaultLocale = "en_US.UTF-8";
|
||||
# console = {
|
||||
# font = "Lat2-Terminus16";
|
||||
# keyMap = "us";
|
||||
# useXkbConfig = true; # use xkb.options in tty.
|
||||
# };
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
services.libinput.enable = true;
|
||||
|
||||
# boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
# users.users.doloro = {
|
||||
# isNormalUser = true;
|
||||
# shell = pkgs.fish;
|
||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
# packages = with pkgs; [
|
||||
# tree
|
||||
# ];
|
||||
# hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path;
|
||||
# openssh.authorizedKeys.keys = [
|
||||
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaa6Z5qtBSLEz+A4fQGYPfkOISsRQlmKkVbcx2zxML7" # pc public key
|
||||
# ];
|
||||
# # initialPassword = "sex";
|
||||
# };
|
||||
users.users.root = {
|
||||
initialPassword = "meowmeowmeow";
|
||||
};
|
||||
users.mutableUsers = false;
|
||||
services.system76-scheduler.enable = false;
|
||||
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
# powertop.enable = true;
|
||||
};
|
||||
|
||||
boot.kernelParams = [
|
||||
# "mem_sleep_default=deep"
|
||||
# "i915.fastboot=1"
|
||||
# "i915.modeset=1"
|
||||
"ahci.mobile_lpm_policy=1"
|
||||
# "intel_idle.max_cstate=10"
|
||||
"processor.max_cstate=10"
|
||||
"pci=noaer"
|
||||
"quiet"
|
||||
"splash"
|
||||
# "idle=halt"
|
||||
];
|
||||
boot.binfmt.emulatedSystems = [
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
services.logind.settings.Login = {
|
||||
# HandleLidSwitch = "suspend";
|
||||
# HandleLidSwitchExternalPower = "suspend";
|
||||
# HandleLidSwitchDocked = "ignore";
|
||||
};
|
||||
# systemd.sleep.extraConfig = ''
|
||||
# HibernateDelaySec=30min
|
||||
# SuspendEstimationSec=120
|
||||
# '';
|
||||
|
||||
# programs.firefox.enable = true;
|
||||
|
||||
# List packages installed in system profile.
|
||||
# You can use https://search.nixos.org/ to find more packages (and options).
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# git
|
||||
# wget
|
||||
# # tlp-pd
|
||||
# brightnessctl
|
||||
# nvtopPackages.intel
|
||||
# seahorse
|
||||
# ];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||
# to actually do that.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
__findFile,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.doloro-shared = {
|
||||
includes = [
|
||||
modules.nixvim
|
||||
modules.nix
|
||||
modules.tmux
|
||||
<modules/git/doloro>
|
||||
modules.hyfetch
|
||||
modules.ssh
|
||||
];
|
||||
homeManager =
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home = {
|
||||
username = "doloro";
|
||||
homeDirectory = "/home/doloro";
|
||||
packages = with pkgs; [
|
||||
wl-clipboard
|
||||
# home-manager
|
||||
btop
|
||||
pavucontrol
|
||||
];
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
};
|
||||
nixos = { lib, ... }: {
|
||||
boot.kernelModules = [ "ntsync" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
__findFile,
|
||||
...
|
||||
}: {
|
||||
den.aspects.doloro-wsl = {
|
||||
includes = [
|
||||
<den/primary-user>
|
||||
den.aspects.doloro-shared
|
||||
modules.fish
|
||||
modules.tmux
|
||||
modules.nix
|
||||
modules.omp
|
||||
modules.hyfetch
|
||||
modules.git
|
||||
];
|
||||
nixos = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
users.users.doloro = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
uid = 1000;
|
||||
# hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path;
|
||||
};
|
||||
};
|
||||
|
||||
homeManager = {...}: {
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
...
|
||||
}: {
|
||||
flake-file.inputs = {
|
||||
};
|
||||
den.aspects.wsl = {
|
||||
includes = [
|
||||
modules.wsl
|
||||
modules.tmux
|
||||
modules.nix
|
||||
modules.omp
|
||||
modules.hyfetch
|
||||
modules.git
|
||||
];
|
||||
nixos = {lib, ...}: {
|
||||
wsl.enable = true;
|
||||
wsl.defaultUser = "doloro";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.rpi5 = {
|
||||
includes = [
|
||||
<modules/raspberry-pi/5>
|
||||
# <modules/services/traefik>
|
||||
<modules/services/caddy>
|
||||
<modules/services/home-assistant>
|
||||
<modules/services/docker-registry>
|
||||
<modules/services/ddns>
|
||||
<modules/services/rtmp-to-whip>
|
||||
];
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "nixos-001-rp5";
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
"/boot/firmware" = {
|
||||
device = "/dev/disk/by-uuid/2175-794E";
|
||||
fsType = "vfat";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
8080
|
||||
];
|
||||
allowedUDPPortRanges = [ ];
|
||||
};
|
||||
|
||||
system.activationScripts.docker-config-fix = ''
|
||||
if [ -d /root/.docker/config.json ]; then
|
||||
rm -rf /root/.docker/config.json
|
||||
echo '{}' > /root/.docker/config.json
|
||||
fi
|
||||
'';
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.package = pkgs.docker;
|
||||
virtualisation.docker.autoPrune = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
flags = [
|
||||
"--all"
|
||||
"--volumes"
|
||||
];
|
||||
};
|
||||
virtualisation.oci-containers.backend = "docker";
|
||||
|
||||
services.openssh.enable = true;
|
||||
nixpkgs.hostPlatform = "aarch64-linux";
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
};
|
||||
};
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.btop
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# Homes
|
||||
den.homes.x86_64-linux.doloro-desktop = {
|
||||
aspect = "doloro-desktop";
|
||||
userName = "doloro";
|
||||
};
|
||||
# TODO
|
||||
den.homes.aarch64-linux.doloro-laptop = {
|
||||
userName = "doloro";
|
||||
};
|
||||
den.homes.aarch64-linux.doloro-wsl = {
|
||||
userName = "doloro";
|
||||
};
|
||||
# Machines
|
||||
den.hosts.x86_64-linux.desktop = {
|
||||
users.doloro = {
|
||||
aspect = "doloro-desktop";
|
||||
home-manager.enable = true;
|
||||
};
|
||||
};
|
||||
# TODO
|
||||
den.hosts.aarch64-linux.laptop = {
|
||||
users.doloro = {
|
||||
aspect = "doloro-laptop";
|
||||
home-manager.enable = true;
|
||||
};
|
||||
};
|
||||
den.hosts.aarch64-linux.wsl = {
|
||||
users.doloro = {
|
||||
aspect = "doloro-wsl";
|
||||
home-manager.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
den.hosts.x86_64-linux.doloro-bootable = {
|
||||
users.doloro = {
|
||||
aspect = "doloro-bootable";
|
||||
homeManager.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
den.schema.user.classes = lib.mkDefault ["homeManager"];
|
||||
|
||||
# Fixes 'The option `flake.homeConfigurations' is defined multiple times while it's expected to be unique.'
|
||||
flake.options.homeConfigurations = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
description = "Home Manager configurations for users.";
|
||||
};
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# The single rpi5 i have running on the side of my desk
|
||||
den.aspects = {
|
||||
doloro-server = {
|
||||
includes = [
|
||||
<modules/publicKeys/doloro>
|
||||
];
|
||||
nixos = {
|
||||
users.users.doloro = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
root-server = {
|
||||
includes = [
|
||||
<modules/publicKeys/doloro>
|
||||
];
|
||||
};
|
||||
};
|
||||
den.hosts.aarch64-linux.rpi5 = {
|
||||
includes = [ ];
|
||||
users.doloro = {
|
||||
aspect = "doloro-server";
|
||||
};
|
||||
users.root = {
|
||||
aspect = "root-server";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{ ... }:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
den.url = "github:vic/den?ref=8101ec865c0bf4027d40b9fd8951e3e435a86d64";
|
||||
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
|
||||
# Builds from its own locked nixpkgs (electron lib paths pinned to that rev).
|
||||
grimoire.url = "github:Slush97/grimoire";
|
||||
nix-output-monitor.url = "git+ssh://git@git.scug.io:/nikkuss/nix-output.git";
|
||||
};
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.ai = {
|
||||
provides = {
|
||||
ollama-cuda = {
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.ollama-cuda ];
|
||||
};
|
||||
};
|
||||
};
|
||||
homeManager =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.claude-code
|
||||
pkgs.snip
|
||||
];
|
||||
programs.opencode = {
|
||||
enable = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
# rust-analyzer
|
||||
typescript-language-server
|
||||
];
|
||||
context = ''
|
||||
Instructions:
|
||||
|
||||
- Do NOT preemptively load all references - use lazy loading based on actual need
|
||||
- When loaded, treat content as mandatory instructions that override defaults
|
||||
- Follow references recursively when needed
|
||||
|
||||
- NO EMOJIS
|
||||
- If you've been looking a lot for something you cant seem to find and you havent been explicitly told to keep going, you're allowed to say 'i cant find it'
|
||||
'';
|
||||
settings = {
|
||||
"lsp" = true;
|
||||
plugin = [
|
||||
"@tarquinen/opencode-dcp@latest"
|
||||
"@xberg-io/opencode-xberg"
|
||||
# "@xberg-io/opencode-crawlberg"
|
||||
# "@xberg-io/opencode-html-to-markdown"
|
||||
"@xberg-io/opencode-liter-llm"
|
||||
"opencode-plugin-litellm@latest"
|
||||
"@dietrichgebert/ponytail"
|
||||
"opencode-autodiscover"
|
||||
"@xberg-io/opencode-tree-sitter-language-pack"
|
||||
# Token slimming: filters shell command output via snip CLI
|
||||
# (https://github.com/VincentHardouin/opencode-snip)
|
||||
"opencode-snip@latest"
|
||||
# Replace/extend the per-model system prompt via
|
||||
# ~/.config/opencode/system-prompts.json
|
||||
# (https://github.com/kmcquade/opencode-sysprompt-override-plugin)
|
||||
# "opencode-sysprompt-override@latest"
|
||||
];
|
||||
provider.litellm = {
|
||||
npm = "@ai-sdk/openai-compatible";
|
||||
name = "LiteLLM (scuggo)";
|
||||
options = {
|
||||
baseURL = "https://9f5db439.fwds.scug.io/v1";
|
||||
apiKey = "{env:SCUG_IO_API_KEY}";
|
||||
};
|
||||
};
|
||||
# Built-in OpenCode Go provider (https://opencode.ai/zen/go) —
|
||||
# key from sops secret opencode-go-zen-key via $OPENCODE_GO_API_KEY
|
||||
provider.opencode-go = {
|
||||
options = {
|
||||
apiKey = "{env:OPENCODE_GO_API_KEY}";
|
||||
};
|
||||
};
|
||||
# provider.commandcode = {
|
||||
# npm = "@ai-sdk/openai-compatible";
|
||||
# name = "Command Code";
|
||||
# options = {
|
||||
# baseURL = "https://api.commandcode.ai/provider/v1";
|
||||
# apiKey = "{env:COMMANDCODE_API_KEY}";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
# TUI plugin: token-tracker (https://github.com/eserete/opencode-token-tracker)
|
||||
tui = {
|
||||
plugin = [ "./plugins/token-tracker.tsx" ];
|
||||
};
|
||||
};
|
||||
xdg.configFile."opencode/plugins/token-tracker.tsx" = {
|
||||
source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/eserete/opencode-token-tracker/main/token-tracker.tsx";
|
||||
sha256 = "a1d56f6d86f512ca2e81653a57ff372c2ea0a3398bcdbebda6de9f9ed89ee45a";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
/**
|
||||
* Model cost display extension - shows cost info in status bar.
|
||||
*
|
||||
* Format: "$X.XX (Y.YY) in" where Y.YY is cache write cost if present.
|
||||
*
|
||||
* Usage: pi -e ./model-cost.ts
|
||||
*/
|
||||
|
||||
import type {
|
||||
ExtensionAPI,
|
||||
ModelSelectEvent,
|
||||
UIContext,
|
||||
} from "@earendil-works/pi-coding-agent";
|
||||
|
||||
export default function (pi: ExtensionAPI) {
|
||||
const modelSelectHandler = async (
|
||||
event: ModelSelectEvent,
|
||||
ctx: UIContext,
|
||||
) => {
|
||||
const { model } = event;
|
||||
|
||||
// Get cost data from model config
|
||||
const cost = getModelCost(model);
|
||||
|
||||
if (cost) {
|
||||
ctx.ui.setStatus("model", cost);
|
||||
} else {
|
||||
ctx.ui.setStatus("model", "");
|
||||
}
|
||||
};
|
||||
|
||||
pi.on("model_select", modelSelectHandler);
|
||||
}
|
||||
|
||||
function getModelCost(model: any): string {
|
||||
if (!model?.cost) return "";
|
||||
|
||||
const { input, output, cacheRead, cacheWrite } = model.cost;
|
||||
|
||||
// Only show if there's actual cost data
|
||||
const hasCost =
|
||||
input !== 0 || output !== 0 || cacheRead !== 0 || cacheWrite !== 0;
|
||||
if (!hasCost) return "";
|
||||
|
||||
// Format: "$X.XX (Y.YY) in"
|
||||
const parts: string[] = [];
|
||||
|
||||
if (input !== 0) {
|
||||
const cachePrefix = cacheRead > 0 ? ` (↙${cacheRead}) ` : "";
|
||||
parts.push(`$${input}${cachePrefix}in`);
|
||||
}
|
||||
|
||||
if (output !== 0) {
|
||||
const cachePrefix = cacheWrite > 0 ? ` (↗${cacheWrite}) ` : "";
|
||||
parts.push(`$${output}${cachePrefix}out`);
|
||||
}
|
||||
|
||||
if (parts.length === 0) return "";
|
||||
|
||||
return parts.join(" / ");
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
// @ts-nocheck — jiti-loaded pi extension: package imports resolve via pi's
|
||||
// extension loader aliases at runtime, not from this directory. No typecheck.
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
||||
import { getBuiltinModels } from "@earendil-works/pi-ai/providers/all";
|
||||
import type { Model } from "@earendil-works/pi-ai";
|
||||
|
||||
interface ProviderFilter {
|
||||
/** Keep only models whose cost is all zero (free). */
|
||||
freeOnly?: boolean;
|
||||
/** Keep only these model ids. */
|
||||
keep?: string[];
|
||||
/** Drop these model ids. */
|
||||
drop?: string[];
|
||||
/** Keep only models whose id contains any of these substrings. */
|
||||
keepIdContaining?: string[];
|
||||
}
|
||||
|
||||
const isFree = (m: Model): boolean => {
|
||||
const c = m.cost;
|
||||
const baseFree =
|
||||
c.input === 0 && c.output === 0 && c.cacheRead === 0 && c.cacheWrite === 0;
|
||||
// A model with cost tiers is not free: tiers kick in above a token threshold.
|
||||
return baseFree && !(c.tiers && c.tiers.length > 0);
|
||||
};
|
||||
|
||||
const matches = (m: Model, f: ProviderFilter): boolean => {
|
||||
if (f.freeOnly && !isFree(m)) return false;
|
||||
if (f.keep && f.keep.length > 0 && !f.keep.includes(m.id)) return false;
|
||||
if (f.drop && f.drop.includes(m.id)) return false;
|
||||
if (f.keepIdContaining && f.keepIdContaining.length > 0) {
|
||||
if (!f.keepIdContaining.some((s) => m.id.includes(s))) return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
export default function (pi: ExtensionAPI): void {
|
||||
const configPath = path.join(
|
||||
os.homedir(),
|
||||
".pi",
|
||||
"agent",
|
||||
"model-filters.json",
|
||||
);
|
||||
let config: { providers?: Record<string, ProviderFilter> };
|
||||
try {
|
||||
config = JSON.parse(fs.readFileSync(configPath, "utf8"));
|
||||
} catch {
|
||||
return; // no config, no-op
|
||||
}
|
||||
for (const [providerId, filter] of Object.entries(config.providers ?? {})) {
|
||||
const all = getBuiltinModels(providerId);
|
||||
if (all.length === 0) {
|
||||
console.warn(
|
||||
"[model-filter] no built-in catalog for provider: " + providerId,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
const models = all.filter((m) => matches(m, filter));
|
||||
// registerProvider with `models` replaces the provider's full model list;
|
||||
// auth and streaming are inherited from the built-in provider.
|
||||
pi.registerProvider(providerId, { models });
|
||||
console.log(
|
||||
"[model-filter] " +
|
||||
providerId +
|
||||
": " +
|
||||
all.length +
|
||||
" -> " +
|
||||
models.length +
|
||||
" models",
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
modules,
|
||||
den,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
omp-nix.url = "git+https://git.molez.org/mandlm/omp-nix?ref=main";
|
||||
};
|
||||
modules.omp = {
|
||||
homeManager = {
|
||||
imports = [ inputs.omp-nix.homeManagerModules.omp ];
|
||||
oh-my-pi.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,297 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
modules.pi-coding = {
|
||||
homeManager =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
programs.pi-coding-agent = {
|
||||
enable = true;
|
||||
extraPackages = [
|
||||
pkgs.nodejs
|
||||
# pkgs.lean-lsp-mcp
|
||||
];
|
||||
settings = {
|
||||
"defaultProvider" = "opencode-go";
|
||||
"defaultModel" = "mimo-v2.5";
|
||||
"defaultThinkingLevel" = "medium";
|
||||
"litellm" = {
|
||||
"providers" = {
|
||||
"litellm" = {
|
||||
"displayName" = "scuggo";
|
||||
"baseUrl" = "https://ai-proxy.fwds.scug.io";
|
||||
"apiKey" = "$SCUG_IO_API_KEY";
|
||||
};
|
||||
};
|
||||
"skills" = {
|
||||
"enabled" = true;
|
||||
};
|
||||
};
|
||||
"mcp" = {
|
||||
"enabled" = true;
|
||||
};
|
||||
"uiMode" = "fullscreen";
|
||||
"showCacheMissNotices" = true;
|
||||
"vstack" = {
|
||||
"extensionManager" = {
|
||||
"config" = { };
|
||||
};
|
||||
};
|
||||
packages = [
|
||||
# "npm:@odinlayer/pi-provider-litellm"
|
||||
"npm:pi-provider-litellm"
|
||||
# Web search / content extraction (opencode-crawlberg + opencode-html-to-markdown equivalent)
|
||||
# "npm:pi-web-access"
|
||||
# Local document parsing / OCR (opencode-xberg equivalent)
|
||||
"npm:pi-docparser"
|
||||
# "npm:@gotgenes/pi-permission-system"
|
||||
# "npm:@vanillagreen/pi-extension-manager"
|
||||
# "npm:@vanillagreen/pi-qol"
|
||||
"npm:pi-vitals"
|
||||
# "npm:pi-spark"
|
||||
# "npm:pi-caveman"
|
||||
"npm:@tmustier/pi-usage-extension"
|
||||
"npm:@heyhuynhgiabuu/pi-pretty"
|
||||
# "npm:pi-lens"
|
||||
# "npm:pi-lean-ctx"
|
||||
# "npm:@rohaquinlop/pi-deepseek-cache"
|
||||
"npm:pi-cache-optimizer"
|
||||
"npm:pi-opencode-go-cache"
|
||||
"npm:@pi-vault/pi-dcp"
|
||||
"git:github.com/DietrichGebert/ponytail"
|
||||
"npm:pi-open-tui"
|
||||
# "npm:pi-commandcode-provider"
|
||||
];
|
||||
};
|
||||
context = ''
|
||||
Core Directive: precise execution, strict safety, long-term solutions.
|
||||
1. Standards: hard fail unless overridden; files <=300 lines (refactor if exceeded); no hardcoding — config/env/consts only; no defaults — fail on missing config; no legacy/shims/auto-migrations, assume clean state; root fixes only, no cosmetic patches (report unrelated bugs).
|
||||
2. Safety: never run destructive ops (rm, reset --hard, deletions) without explicit prior approval; respect sandbox mode (ro/write), request approval if blocked; new code = creative, existing code = minimal deltas (no style/rename drift).
|
||||
3. Tools: todowrite for multi-step — exactly one in_progress, update on completion; rg for search; outputs truncated (~256 lines/10KB), read large files in chunks (<250 lines); edit = trust tool, no re-read, no added headers/comments; build/test/lint before yielding, yield only after todowrite done.
|
||||
4. Communication: AGENTS.md governs — deepest file wins, user prompt overrides; 1-sentence next-action preamble before any tool call; final output GFM with clickable file refs (src/main.ts:50), no file://, technical/dense/impersonal.
|
||||
|
||||
[CORE TOOLING DOCTRINE]
|
||||
- Files: read truncates at 2000 lines/50KB (use offset/limit); write creates/overwrites/auto-parents; edit = smallest unique oldText, merge nearby, never include huge unchanged regions. Never cat/echo/tee/sed -i/head/tail for file content.
|
||||
- Search: rg -n for text; grep tool (glob filter) for content; find tool for glob discovery only.
|
||||
- Navigation: symbol_search → module_report → read_symbol/read_enclosing; never find + manual parsing.
|
||||
- Diagnostics: lens_diagnostics (delta=this turn, all=session, full=project-wide before done); lsp_diagnostics before builds.
|
||||
- Context: recall_context(id) to recover compressed/expired/truncated content.
|
||||
- bash: only for git/nix/builds/scripts/network/system mgmt; set timeout for long ops.
|
||||
- CRITICAL: never find on /nix/store — unpruned walk locks up execution; ls known paths, ask user for unknown paths. ABSOLUTE.
|
||||
- You have a web-search tool. Use it sparingly but reach for it in situations where info isnt directly known. (i.e, "common problem" -> get from memory, think hard if needed, "hard problem that isnt in your training data or request for you to read docs for a lib or program" -> search online)
|
||||
- Searching for anything (including with wildcards ("/nix/store/*/**" or others)) isnt permitted at all. You must find paths inside the project, such a result/
|
||||
'';
|
||||
};
|
||||
|
||||
# pi-vitals config
|
||||
home.file.".pi/agent/powerline.json" = {
|
||||
text = builtins.toJSON {
|
||||
leftSegments = [
|
||||
"pi"
|
||||
"separator"
|
||||
"model"
|
||||
"thinking"
|
||||
"ext_status"
|
||||
"separator"
|
||||
"path"
|
||||
"git"
|
||||
"separator"
|
||||
"token_total"
|
||||
"token_in"
|
||||
"token_out"
|
||||
"cache_read"
|
||||
"cache_write"
|
||||
];
|
||||
rightSegments = [
|
||||
"separator"
|
||||
"cost"
|
||||
"model_cost"
|
||||
"context_pct"
|
||||
];
|
||||
icons = {
|
||||
pi = "π";
|
||||
model = "◈";
|
||||
thinking = "🧠";
|
||||
folder = "📁";
|
||||
repo = "📦";
|
||||
git = "⎇";
|
||||
tokens = "⊛";
|
||||
input = "↑";
|
||||
output = "↓";
|
||||
cacheRead = "↙";
|
||||
cacheWrite = "↗";
|
||||
contextPct = "◫";
|
||||
cost = "$";
|
||||
modelCost = "(in/out)";
|
||||
separator = "│";
|
||||
};
|
||||
colors = {
|
||||
pi = "accent";
|
||||
model = "#d787af";
|
||||
path = "#00afaf";
|
||||
git = "success";
|
||||
gitDirty = "warning";
|
||||
gitClean = "success";
|
||||
thinking = "muted";
|
||||
context = "dim";
|
||||
contextWarn = "warning";
|
||||
contextError = "error";
|
||||
cost = "text";
|
||||
modelCost = "text";
|
||||
tokens = "muted";
|
||||
separator = "dim";
|
||||
};
|
||||
segmentOptions = {
|
||||
path = {
|
||||
mode = "basename";
|
||||
};
|
||||
git = {
|
||||
showBranch = true;
|
||||
showStaged = true;
|
||||
showUnstaged = true;
|
||||
showUntracked = true;
|
||||
};
|
||||
context_pct = {
|
||||
showAutoIcon = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
home.file.".pi/agent/auth.json" = {
|
||||
text = builtins.toJSON {
|
||||
"opencode-go" = {
|
||||
"type" = "api_key";
|
||||
"key" = "$OPENCODE_GO_API_KEY";
|
||||
};
|
||||
"opencode" = {
|
||||
"type" = "api_key";
|
||||
"key" = "$OPENCODE_GO_API_KEY";
|
||||
};
|
||||
# "command-code" = {
|
||||
# "type" = "api_key";
|
||||
# "key" = "$COMMANDCODE_API_KEY";
|
||||
# };
|
||||
};
|
||||
};
|
||||
|
||||
# Cache/routing compat overrides (provider-level minimal)
|
||||
home.file.".pi/agent/models.json" = {
|
||||
text = builtins.toJSON {
|
||||
"providers" = {
|
||||
"opencode" = {
|
||||
"compat" = {
|
||||
"sendSessionAffinityHeaders" = true;
|
||||
};
|
||||
};
|
||||
"opencode-go" = {
|
||||
"compat" = {
|
||||
"supportsLongCacheRetention" = true;
|
||||
"sendSessionAffinityHeaders" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Restrict providers to a subset of their built-in models.
|
||||
# Filter config: ~/.pi/agent/model-filters.json (see below).
|
||||
home.file.".pi/agent/extensions/model-filter.ts" = {
|
||||
source = ./model-filter.ts;
|
||||
};
|
||||
|
||||
# Show model cost in status bar
|
||||
home.file.".pi/agent/extensions/model-cost.ts" = {
|
||||
source = ./model-cost.ts;
|
||||
};
|
||||
|
||||
# Model filter config: per-provider filters applied by model-filter.ts
|
||||
home.file.".pi/agent/model-filters.json" = {
|
||||
text = builtins.toJSON {
|
||||
providers = {
|
||||
# opencode: only free models (all cost zero)
|
||||
opencode = {
|
||||
freeOnly = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# pi-web-access config: raw results, no curator / no AI summarising
|
||||
home.file.".pi/web-search.json" = {
|
||||
text = builtins.toJSON {
|
||||
workflow = "none";
|
||||
};
|
||||
};
|
||||
|
||||
# open-tui.json config
|
||||
home.file.".pi/agent/open-tui.json" = {
|
||||
text = builtins.toJSON {
|
||||
enabled = true;
|
||||
settingsLanguage = "en";
|
||||
cursorStyle = "block";
|
||||
fullscreen = {
|
||||
wheelScrollLines = 4;
|
||||
};
|
||||
icons = {
|
||||
mode = "auto";
|
||||
};
|
||||
footerSegments = {
|
||||
cwd = true;
|
||||
sessionName = false;
|
||||
gitBranch = true;
|
||||
gitStatus = true;
|
||||
gitCommit = false;
|
||||
runtime = true;
|
||||
context = true;
|
||||
tokens = true;
|
||||
cost = true;
|
||||
extensionStatuses = false;
|
||||
};
|
||||
telemetry = {
|
||||
enabled = true;
|
||||
tps = false;
|
||||
ttft = false;
|
||||
duration = true;
|
||||
tokens = true;
|
||||
stalls = true;
|
||||
cost = true;
|
||||
};
|
||||
thinkingPeek = {
|
||||
lines = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# pi-spark config
|
||||
home.file.".pi/agent/spark.json" = {
|
||||
text = builtins.toJSON {
|
||||
editor = {
|
||||
spinner = "tildes";
|
||||
};
|
||||
footer = false;
|
||||
presets = {
|
||||
"scuggo" = {
|
||||
provider = "litellm";
|
||||
model = "Ornith-1.0-9B";
|
||||
thinkingLevel = "medium";
|
||||
};
|
||||
"claude" = {
|
||||
provider = "anthropic";
|
||||
model = "claude-opus-4-8";
|
||||
thinkingLevel = "high";
|
||||
};
|
||||
"gpt" = {
|
||||
provider = "openai-codex";
|
||||
model = "gpt-5.5";
|
||||
thinkingLevel = "medium";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
{ modules, ... }:
|
||||
{
|
||||
modules.ai = {
|
||||
provides = {
|
||||
secrets = {
|
||||
homeManager =
|
||||
{ config, ... }:
|
||||
{
|
||||
sops = {
|
||||
secrets.scug-io-ai-key = {
|
||||
# Decrypted file path (available at runtime, not eval time)
|
||||
path = config.home.homeDirectory + "/.secrets/scug_io_api_key";
|
||||
sopsFile = ../secrets/content/secrets.yaml;
|
||||
};
|
||||
secrets.opencode-go-zen-key = {
|
||||
# Decrypted file path (available at runtime, not eval time)
|
||||
path = config.home.homeDirectory + "/.secrets/opencode-go-zen-key";
|
||||
sopsFile = ../secrets/content/secrets.yaml;
|
||||
};
|
||||
secrets.commandcode-key = {
|
||||
# Decrypted file path (available at runtime, not eval time)
|
||||
path = config.home.homeDirectory + "/.secrets/commandcode-key";
|
||||
sopsFile = ../secrets/content/secrets.yaml;
|
||||
};
|
||||
};
|
||||
programs.fish = {
|
||||
shellInit = ''
|
||||
if test -f "$HOME/.secrets/scug_io_api_key"
|
||||
set -x SCUG_IO_API_KEY (cat "$HOME/.secrets/scug_io_api_key")
|
||||
end
|
||||
if test -f "$HOME/.secrets/opencode-go-zen-key"
|
||||
set -x OPENCODE_GO_API_KEY (cat "$HOME/.secrets/opencode-go-zen-key")
|
||||
end
|
||||
if test -f "$HOME/.secrets/commandcode-key"
|
||||
set -x COMMANDCODE_API_KEY (cat "$HOME/.secrets/commandcode-key")
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
{ modules, inputs, ... }: {
|
||||
flake-file.inputs = {
|
||||
barbar.url = "git+https://git.scug.io/doloro/barbar?ref=master";
|
||||
};
|
||||
modules.barbar = {
|
||||
homeManager = { pkgs, ... }: {
|
||||
imports = [ inputs.barbar.homeManagerModules.default ];
|
||||
programs.barbar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
display = {
|
||||
monitor = "DP-2";
|
||||
height = 20;
|
||||
antialiasing = true;
|
||||
default_text_size = 14.0;
|
||||
padding = 4.0;
|
||||
spacing = 8.0;
|
||||
# Absolute store path: barbar resolves `[display].theme` against
|
||||
# its cwd, which is not the home dir under systemd.
|
||||
theme = "${pkgs.writeText "barbar-base16.yaml" ''
|
||||
scheme: "Gruvbox dark, medium"
|
||||
author: "https://github.com/morhetz/gruvbox"
|
||||
base00: "282828" # bg
|
||||
base01: "3c3836" # bg1
|
||||
base02: "504945" # bg2
|
||||
base03: "665c54" # bg3
|
||||
base04: "bdae93" # fg4
|
||||
base05: "d5c4a1" # fg
|
||||
base06: "ebdbb2" # fg2
|
||||
base07: "fbf1c7" # fg0
|
||||
base08: "fb4934" # red
|
||||
base09: "fe8019" # orange
|
||||
base0A: "fabd2f" # yellow
|
||||
base0B: "b8bb26" # green
|
||||
base0C: "8ec07c" # aqua
|
||||
base0D: "83a598" # blue
|
||||
base0E: "d3869b" # purple
|
||||
base0F: "d65d0e" # brown
|
||||
''}";
|
||||
};
|
||||
order = {
|
||||
left = [ "workspaces" ];
|
||||
middle = [ ];
|
||||
right = [
|
||||
"audio"
|
||||
"clock"
|
||||
];
|
||||
};
|
||||
modules.clock.show_seconds = false;
|
||||
modules.workspaces = {
|
||||
count = 10;
|
||||
gap = 3.0;
|
||||
slot_w = 10.0;
|
||||
slot_h = 17.0;
|
||||
radius = 2.5;
|
||||
scale_active = 1.0;
|
||||
scale_exists = 0.85;
|
||||
scale_absent = 0.65;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
modules,
|
||||
den,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release";
|
||||
};
|
||||
# inputs.nix-cachyos-kernel.legacyPackages.x86_64-linux.linuxPackages-cachyos-lts-lto;
|
||||
modules.cachyos-kernel = {
|
||||
nixos = {
|
||||
nixpkgs.overlays = [
|
||||
inputs.nix-cachyos-kernel.overlays.pinned
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs.disko.url = "github:nix-community/disko";
|
||||
modules.disko = {
|
||||
nixos =
|
||||
{ ... }:
|
||||
{
|
||||
imports = [ inputs.disko.nixosModules.disko ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{ modules, ... }:
|
||||
{
|
||||
modules.dunst = {
|
||||
homeManager = {
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
# systemd.enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
font = "Noto Nerd Font 8";
|
||||
monitor = "DP-2";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.easyeffects = {
|
||||
homeManager = {
|
||||
services.easyeffects.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
{
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
direnv-instant.url = "github:Mic92/direnv-instant";
|
||||
};
|
||||
modules.fish = {
|
||||
nixos = {
|
||||
programs.fish.enable = true;
|
||||
# imports = [ inputs.direnv-instant.nixosModules.direnv-instant ];
|
||||
# programs.direnv-instant.enable = true;
|
||||
};
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.shell.enableFishIntegration = true;
|
||||
home.packages = [
|
||||
# pkgs.nix-output-monitor
|
||||
# pkgs.devenv
|
||||
];
|
||||
imports = [ inputs.direnv-instant.homeModules.direnv-instant ];
|
||||
programs.direnv-instant.enable = true;
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
shellInit = ''
|
||||
set -g theme_nerd_fonts yes
|
||||
set -g theme_color_scheme nord
|
||||
set -g theme_display_user yes
|
||||
set -g fish_color_autosuggestion 6F6578
|
||||
alias nik 'nix'
|
||||
|
||||
if not set -q TMUX
|
||||
set -gx COLORTERM truecolor
|
||||
end
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "bobthefish";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "oh-my-fish";
|
||||
repo = "theme-bobthefish";
|
||||
rev = "e3b4d4eafc23516e35f162686f08a42edf844e40";
|
||||
sha256 = "sha256-cXOYvdn74H4rkMWSC7G6bT4wa9d3/3vRnKed2ixRnuA=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
eza = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
icons = "auto";
|
||||
git = true;
|
||||
extraOptions = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
{ modules, inputs, ... }:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
||||
};
|
||||
modules.flatpaks = {
|
||||
nixos = {
|
||||
imports = [
|
||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
];
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
homeManager = {
|
||||
imports = [
|
||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||
];
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
packages = [
|
||||
{
|
||||
flatpakref = "https://dl.flathub.org/repo/appstream/org.vinegarhq.Sober.flatpakref";
|
||||
sha256 = "15ak2i5nk64wbmswqml2cqfgidczawqybmc7pmw94yp8wcd4yv6i";
|
||||
}
|
||||
];
|
||||
};
|
||||
services.flatpak.remotes = [
|
||||
{
|
||||
name = "flathub-beta";
|
||||
location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
font-patcher.url = "github:Doloro1978/nix-nerd-fonts-patcher";
|
||||
};
|
||||
modules.fonts = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
config.fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages =
|
||||
with pkgs;
|
||||
[
|
||||
material-design-icons
|
||||
material-symbols
|
||||
nerd-fonts.caskaydia-cove
|
||||
nerd-fonts.noto
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
]
|
||||
++ [
|
||||
(inputs.font-patcher.lib.patchFont {
|
||||
font = "${pkgs.googlesans-code}/share/fonts/googlesans-code/GoogleSansCode[wght].ttf";
|
||||
name = "Google Sans Code Nerd Font";
|
||||
inherit system;
|
||||
})
|
||||
];
|
||||
fontDir.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
{
|
||||
modules.gameaudio = {
|
||||
homeManager =
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = [
|
||||
# Launch a program with all of its audio routed to GameAudioSink.
|
||||
# Usage: run-on-gameaudio <command> [args...]
|
||||
(pkgs.writeShellScriptBin "run-on-gameaudio" ''
|
||||
if [ "$#" -eq 0 ]; then
|
||||
echo "usage: run-on-gameaudio <command> [args...]" >&2
|
||||
exit 1
|
||||
fi
|
||||
export PIPEWIRE_PROPS="target.object=GameAudioSink"
|
||||
exec "$@"
|
||||
'')
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.common.provides = {
|
||||
gaming = {
|
||||
includes = [ modules.steam ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
{ modules, ... }:
|
||||
{
|
||||
modules.gamemode = {
|
||||
homeManager =
|
||||
{ home, ... }:
|
||||
{
|
||||
|
||||
};
|
||||
nixos =
|
||||
{ nixos, ... }:
|
||||
{
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
enableRenice = true;
|
||||
settings = {
|
||||
general = {
|
||||
renice = 10;
|
||||
ioprio = 0;
|
||||
inhibit_screensaver = 1;
|
||||
disable_splitlock = 1;
|
||||
};
|
||||
cpu = {
|
||||
park_cores = "no";
|
||||
pin_cores = "yes";
|
||||
};
|
||||
gpu = {
|
||||
apply_gpu_optimisations = "accept-responsibility";
|
||||
gpu_device = 1;
|
||||
nv_powermizer_mode = 1;
|
||||
nv_perf_level = -1;
|
||||
};
|
||||
script = {
|
||||
gamestart = "nvidia-smi --power-limit=175";
|
||||
gamestop = "nvidia-smi --power-limit=125";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.steam = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
package = (
|
||||
pkgs.gamescope.overrideAttrs {
|
||||
enableWsi = true;
|
||||
# Fixes some games being blurry under wayland backend
|
||||
NIX_CFLAGS_COMPILE = [ "-fno-fast-math" ];
|
||||
}
|
||||
);
|
||||
# Breaks steam launching gamescope
|
||||
# capSysNice = true;
|
||||
};
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
# Ensure gamescope is inside the steam "fhs"
|
||||
package = pkgs.steam.override {
|
||||
extraLibraries = pkgs: [ pkgs.libxcb ];
|
||||
extraPkgs =
|
||||
pkgs: with pkgs; [
|
||||
attr
|
||||
libxcursor
|
||||
libxi
|
||||
libxinerama
|
||||
libxscrnsaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
mangohud
|
||||
# gamemode
|
||||
lsof
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.git = {
|
||||
provides = {
|
||||
doloro = {
|
||||
homeManager =
|
||||
{ home, pkgs, ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = "Doloro1978";
|
||||
email = "doloroo@proton.me";
|
||||
signingKey = "089B373588540877";
|
||||
};
|
||||
# commit = {
|
||||
# gpgSign = true;
|
||||
# };
|
||||
pull = {
|
||||
rebase = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
};
|
||||
services = {
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
pinentry = {
|
||||
package = pkgs.pinentry-qt;
|
||||
program = "pinentry-qt";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
inputs,
|
||||
lib,
|
||||
stdenv,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
heliumFlake = {
|
||||
url = "github:vikingnope/helium-browser-nix-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
modules.helium = settings: {
|
||||
homeManager =
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
heliumPkg = inputs.heliumFlake.packages.${pkgs.stdenv.hostPlatform.system}.helium;
|
||||
# The upstream `helium` launcher is a plain Nix wrapper that ignores any
|
||||
# *-flags.conf file (that convention is Arch-specific, not NixOS). So to
|
||||
# actually pass command-line flags we re-wrap the launcher here.
|
||||
#
|
||||
# Flag names verified against this Helium build's binary strings.
|
||||
# - AcceleratedVideoDecodeLinuxGL / ...ZeroCopyGL: the VA-API GL decode
|
||||
# path (renamed from the old Vaapi* names, which are no-ops here).
|
||||
# - VaapiOnNvidiaGPUs: required. Chromium disables VA-API on NVIDIA by
|
||||
# default and hard-skips the nvidia-drm device ("Should skip nVidia
|
||||
# device named: nvidia-drm" in the logs); this re-enables it, routing
|
||||
# decode to NVDEC through the nvidia-vaapi-driver bridge.
|
||||
# - VaapiIgnoreDriverChecks: bypass the driver allowlist.
|
||||
# HEVC decode itself needs no runtime flag in this build (enable_platform_hevc
|
||||
# is compiled in and on by default). Wayland-only: the NVIDIA VA-API path
|
||||
# is broken under X11. Upstream considers nvidia-vaapi-driver unsupported,
|
||||
# so confirm via chrome://media-internals (decoder should read VaapiVideoDecoder).
|
||||
helium = pkgs.symlinkJoin {
|
||||
name = "helium-wrapped";
|
||||
paths = [ heliumPkg ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/helium \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ pkgs.vulkan-loader ]}" \
|
||||
--add-flags "--enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL,VaapiOnNvidiaGPUs,VaapiIgnoreDriverChecks" \
|
||||
--add-flags "--ignore-gpu-blocklist" \
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = [ helium ];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
# Gives me widevine support. yay
|
||||
xdg.configFile."net.imput.helium/WidevineCdm/latest-component-updated-widevine-cdm" = {
|
||||
text = ''{"Path":"${pkgs.widevine-cdm}/share/google/chrome/WidevineCdm"}'';
|
||||
};
|
||||
wayland.windowManager.hyprland.settings.bind = lib.mkIf settings.default [
|
||||
{ _args = [ "SUPER + E" (lib.generators.mkLuaInline ''hl.dsp.exec_cmd("helium")'') ]; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.hyfetch = {
|
||||
homeManager =
|
||||
{ home, pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.fastfetch ];
|
||||
programs.hyfetch = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"preset" = "bisexual";
|
||||
"mode" = "rgb";
|
||||
"auto_detect_light_dark" = true;
|
||||
"light_dark" = "dark";
|
||||
"lightness" = 0.5;
|
||||
"color_align" = {
|
||||
"mode" = "custom";
|
||||
"custom_colors" = {
|
||||
"1" = 1;
|
||||
"2" = 0;
|
||||
};
|
||||
};
|
||||
"backend" = "fastfetch";
|
||||
"args" = null;
|
||||
"distro" = null;
|
||||
"pride_month_disable" = false;
|
||||
"custom_ascii_path" = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,508 +0,0 @@
|
||||
{ modules, ... }:
|
||||
{
|
||||
modules.hyprland = {
|
||||
provides = {
|
||||
doloro-settings = {
|
||||
includes = [
|
||||
modules.dunst
|
||||
modules.hyprlock
|
||||
];
|
||||
homeManager =
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
tofiCfg = pkgs.writeTextFile {
|
||||
name = "hyprland-tofi-config";
|
||||
text = ''
|
||||
width = 100%
|
||||
height = 100%
|
||||
border-width = 0
|
||||
outline-width = 0
|
||||
padding-left = 35%
|
||||
padding-top = 35%
|
||||
result-spacing = 25
|
||||
num-results = 5
|
||||
font = monospace
|
||||
background-color = #000A
|
||||
'';
|
||||
};
|
||||
meowScript = pkgs.writeShellScript "meow" ''
|
||||
fish -c 'grim -g $(slurp) -t png - &| wl-copy -t image/png; killall wayfreeze'
|
||||
'';
|
||||
mreowScript = pkgs.writeShellScript "mreow" ''
|
||||
exec $(tofi-drun -c ${tofiCfg})
|
||||
'';
|
||||
|
||||
mainMod = "SUPER";
|
||||
|
||||
# Each `settings.<fn>` list entry renders as `hl.<fn>(<table>)`.
|
||||
# `_args` renders a multi-argument call instead of one Lua table,
|
||||
# and mkLuaInline passes raw Lua through for dispatchers.
|
||||
dsp = lib.generators.mkLuaInline;
|
||||
bind = key: dispatcher: {
|
||||
_args = [
|
||||
key
|
||||
dispatcher
|
||||
];
|
||||
};
|
||||
bezier = name: points: {
|
||||
_args = [
|
||||
name
|
||||
{
|
||||
type = "bezier";
|
||||
inherit points;
|
||||
}
|
||||
];
|
||||
};
|
||||
wsBinds = lib.concatLists (
|
||||
builtins.genList (
|
||||
i:
|
||||
let
|
||||
ws = toString (i + 1);
|
||||
in
|
||||
[
|
||||
(bind "${mainMod} + ${ws}" (dsp "hl.dsp.focus({ workspace = ${ws} })"))
|
||||
(bind "${mainMod} + SHIFT + ${ws}" (dsp "hl.dsp.window.move({ workspace = ${ws} })"))
|
||||
]
|
||||
) 9
|
||||
);
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.hyprcursor
|
||||
pkgs.hyprshutdown
|
||||
pkgs.tofi
|
||||
pkgs.killall
|
||||
pkgs.grim
|
||||
pkgs.slurp
|
||||
pkgs.wayclip
|
||||
];
|
||||
# wlogout menu. Default layout, except Shutdown hands off to
|
||||
# hyprshutdown so apps close gracefully before poweroff.
|
||||
# programs.wlogout only accepts one command per button, so
|
||||
# --post-cmd carries the actual poweroff.
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "lock";
|
||||
action = "hyprlock";
|
||||
text = "Lock";
|
||||
keybind = "l";
|
||||
}
|
||||
{
|
||||
label = "hibernate";
|
||||
action = "systemctl hibernate";
|
||||
text = "Hibernate";
|
||||
keybind = "h";
|
||||
}
|
||||
{
|
||||
label = "logout";
|
||||
action = "loginctl terminate-user $USER";
|
||||
text = "Logout";
|
||||
keybind = "e";
|
||||
}
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "hyprshutdown --post-cmd 'systemctl poweroff'";
|
||||
text = "Shutdown";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
label = "suspend";
|
||||
action = "systemctl suspend";
|
||||
text = "Suspend";
|
||||
keybind = "u";
|
||||
}
|
||||
{
|
||||
label = "reboot";
|
||||
action = "hyprshutdown --post-cmd 'systemctl reboot'";
|
||||
text = "Reboot";
|
||||
keybind = "r";
|
||||
}
|
||||
];
|
||||
};
|
||||
home.pointerCursor = {
|
||||
enable = true;
|
||||
name = "rose-pine-hyprcursor";
|
||||
package = pkgs.rose-pine-hyprcursor;
|
||||
hyprcursor.enable = true;
|
||||
};
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
splash = true;
|
||||
wallpaper = [
|
||||
{
|
||||
monitor = "HDMI-A-1";
|
||||
path = "/home/doloro/Wallpaper.jpg";
|
||||
}
|
||||
{
|
||||
monitor = "DP-2";
|
||||
path = "/home/doloro/Wallpaper.jpg";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
# The systemd session activation hooks (hyprland-session.target
|
||||
# start/stop + dbus-update-activation-environment --systemd --all)
|
||||
# are still generated by Home Manager; only the imperative tail of
|
||||
# the config needs raw Lua.
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
config = {
|
||||
general = {
|
||||
gaps_in = 1;
|
||||
gaps_out = 1;
|
||||
border_size = 1;
|
||||
resize_on_border = false;
|
||||
allow_tearing = true;
|
||||
layout = "dwindle";
|
||||
};
|
||||
input = {
|
||||
follow_mouse = 2;
|
||||
kb_layout = "gb";
|
||||
};
|
||||
decoration = {
|
||||
rounding = 4;
|
||||
rounding_power = 1;
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 1.0;
|
||||
shadow.enabled = false;
|
||||
blur = {
|
||||
enabled = true;
|
||||
passes = 1;
|
||||
new_optimizations = true;
|
||||
ignore_opacity = false;
|
||||
};
|
||||
};
|
||||
cursor.default_monitor = "DP-2";
|
||||
cursor.no_hardware_cursors = false;
|
||||
dwindle.preserve_split = true;
|
||||
misc = {
|
||||
force_default_wallpaper = -1;
|
||||
disable_hyprland_logo = false;
|
||||
enable_anr_dialog = false;
|
||||
};
|
||||
};
|
||||
|
||||
monitor = [
|
||||
{
|
||||
output = "HDMI-A-1";
|
||||
mode = "1920x1080@60";
|
||||
position = "0x0";
|
||||
scale = "1";
|
||||
}
|
||||
{
|
||||
output = "DP-2";
|
||||
mode = "1920x1080@120";
|
||||
position = "1920x0";
|
||||
scale = "1";
|
||||
}
|
||||
];
|
||||
workspace_rule = [
|
||||
{
|
||||
workspace = "2";
|
||||
monitor = "DP-2";
|
||||
default = true;
|
||||
}
|
||||
]
|
||||
++ builtins.genList (i: {
|
||||
workspace = toString (i + 2);
|
||||
monitor = "DP-2";
|
||||
}) 9;
|
||||
|
||||
device = {
|
||||
name = "default";
|
||||
kb_layout = "gb";
|
||||
sensitivity = -0.5;
|
||||
};
|
||||
|
||||
# Curves are sorted ahead of animations by the module's
|
||||
# `importantPrefixes` default, so the beziers exist by name.
|
||||
curve = [
|
||||
(bezier "easeOutQuint" [
|
||||
[
|
||||
0.23
|
||||
1
|
||||
]
|
||||
[
|
||||
0.32
|
||||
1
|
||||
]
|
||||
])
|
||||
(bezier "easeInOutCubic" [
|
||||
[
|
||||
0.65
|
||||
0.05
|
||||
]
|
||||
[
|
||||
0.36
|
||||
1
|
||||
]
|
||||
])
|
||||
(bezier "linear" [
|
||||
[
|
||||
0
|
||||
0
|
||||
]
|
||||
[
|
||||
1
|
||||
1
|
||||
]
|
||||
])
|
||||
(bezier "almostLinear" [
|
||||
[
|
||||
0.5
|
||||
0.5
|
||||
]
|
||||
[
|
||||
0.75
|
||||
1
|
||||
]
|
||||
])
|
||||
(bezier "quick" [
|
||||
[
|
||||
0.15
|
||||
0
|
||||
]
|
||||
[
|
||||
0.1
|
||||
1
|
||||
]
|
||||
])
|
||||
];
|
||||
|
||||
animation = [
|
||||
{
|
||||
leaf = "global";
|
||||
enabled = true;
|
||||
speed = 10;
|
||||
bezier = "default";
|
||||
}
|
||||
{
|
||||
leaf = "border";
|
||||
enabled = true;
|
||||
speed = 5.39;
|
||||
bezier = "easeOutQuint";
|
||||
}
|
||||
{
|
||||
leaf = "windows";
|
||||
enabled = true;
|
||||
speed = 2.79;
|
||||
bezier = "easeOutQuint";
|
||||
}
|
||||
{
|
||||
leaf = "windowsIn";
|
||||
enabled = true;
|
||||
speed = 1;
|
||||
bezier = "easeOutQuint";
|
||||
style = "popin 87%";
|
||||
}
|
||||
{
|
||||
leaf = "windowsOut";
|
||||
enabled = true;
|
||||
speed = 1;
|
||||
bezier = "linear";
|
||||
style = "popin 87%";
|
||||
}
|
||||
{
|
||||
leaf = "windowsMove";
|
||||
enabled = true;
|
||||
speed = 1;
|
||||
bezier = "easeInOutCubic";
|
||||
}
|
||||
{
|
||||
leaf = "fadeIn";
|
||||
enabled = true;
|
||||
speed = 0.5;
|
||||
bezier = "almostLinear";
|
||||
}
|
||||
{
|
||||
leaf = "fadeOut";
|
||||
enabled = true;
|
||||
speed = 0.5;
|
||||
bezier = "almostLinear";
|
||||
}
|
||||
{
|
||||
leaf = "fade";
|
||||
enabled = true;
|
||||
speed = 1;
|
||||
bezier = "quick";
|
||||
}
|
||||
{
|
||||
leaf = "layers";
|
||||
enabled = true;
|
||||
speed = 3.81;
|
||||
bezier = "easeOutQuint";
|
||||
}
|
||||
{
|
||||
leaf = "layersIn";
|
||||
enabled = true;
|
||||
speed = 4;
|
||||
bezier = "easeOutQuint";
|
||||
style = "fade";
|
||||
}
|
||||
{
|
||||
leaf = "layersOut";
|
||||
enabled = true;
|
||||
speed = 1.5;
|
||||
bezier = "linear";
|
||||
style = "fade";
|
||||
}
|
||||
{
|
||||
leaf = "fadeLayersIn";
|
||||
enabled = true;
|
||||
speed = 1.79;
|
||||
bezier = "almostLinear";
|
||||
}
|
||||
{
|
||||
leaf = "fadeLayersOut";
|
||||
enabled = true;
|
||||
speed = 1.39;
|
||||
bezier = "almostLinear";
|
||||
}
|
||||
{
|
||||
leaf = "workspaces";
|
||||
enabled = true;
|
||||
speed = 1;
|
||||
bezier = "almostLinear";
|
||||
style = "slide";
|
||||
}
|
||||
{
|
||||
leaf = "workspacesIn";
|
||||
enabled = true;
|
||||
speed = 1;
|
||||
bezier = "easeInOutCubic";
|
||||
style = "slide";
|
||||
}
|
||||
{
|
||||
leaf = "workspacesOut";
|
||||
enabled = true;
|
||||
speed = 1;
|
||||
bezier = "easeInOutCubic";
|
||||
style = "slide";
|
||||
}
|
||||
{
|
||||
leaf = "zoomFactor";
|
||||
enabled = true;
|
||||
speed = 7;
|
||||
bezier = "quick";
|
||||
}
|
||||
];
|
||||
|
||||
bind = [
|
||||
(bind "${mainMod} + R" (dsp ''hl.dsp.exec_cmd("${mreowScript}")''))
|
||||
(bind "${mainMod} + C" (dsp "hl.dsp.window.close()"))
|
||||
(bind "${mainMod} + M" (dsp ''hl.dsp.exec_cmd("uwsm stop")''))
|
||||
(bind "${mainMod} + Q" (dsp ''hl.dsp.exec_cmd("kitty")''))
|
||||
(bind "${mainMod} + V" (dsp ''hl.dsp.window.float({ action = "toggle" })''))
|
||||
(bind "${mainMod} + left" (dsp ''hl.dsp.focus({ direction = "left" })''))
|
||||
(bind "${mainMod} + right" (dsp ''hl.dsp.focus({ direction = "right" })''))
|
||||
(bind "${mainMod} + up" (dsp ''hl.dsp.focus({ direction = "up" })''))
|
||||
(bind "${mainMod} + down" (dsp ''hl.dsp.focus({ direction = "down" })''))
|
||||
(bind "${mainMod} + L" (dsp ''hl.dsp.exec_cmd("wlogout")''))
|
||||
(bind "${mainMod} + S" (dsp ''hl.dsp.exec_cmd("wayfreeze --after-freeze-cmd '${meowScript}'")''))
|
||||
(bind "${mainMod} + F" (dsp ''hl.dsp.window.fullscreen({ action = "toggle" })''))
|
||||
(bind "${mainMod} + SHIFT + Q" (dsp "hl.dsp.window.close()"))
|
||||
(bind "${mainMod} + mouse_down" (dsp ''hl.dsp.focus({ workspace = "e+1" })''))
|
||||
(bind "${mainMod} + mouse_up" (dsp ''hl.dsp.focus({ workspace = "e-1" })''))
|
||||
|
||||
# Mouse binds
|
||||
(bind "${mainMod} + mouse:272" (dsp "hl.dsp.window.drag()"))
|
||||
(bind "${mainMod} + mouse:273" (dsp "hl.dsp.window.resize()"))
|
||||
|
||||
# Media keys
|
||||
(bind "XF86AudioLowerVolume" (dsp ''hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-")''))
|
||||
(bind "XF86AudioRaiseVolume" (dsp ''hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+")''))
|
||||
(bind "XF86AudioMute" (dsp ''hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle")''))
|
||||
(bind "XF86AudioPlay" (dsp ''hl.dsp.exec_cmd("playerctl play-pause")''))
|
||||
(bind "XF86AudioNext" (dsp ''hl.dsp.exec_cmd("playerctl next")''))
|
||||
(bind "XF86AudioPrev" (dsp ''hl.dsp.exec_cmd("playerctl previous")''))
|
||||
(bind "XF86AudioMicMute" (dsp ''hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle")''))
|
||||
(bind "home" (dsp ''hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle")''))
|
||||
(bind "end" (dsp ''hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle")''))
|
||||
(bind "F8" (dsp "hl.dsp.pass({ window = [[match:class:^(com.obsproject.Studio)$]] })"))
|
||||
|
||||
# Workspaces
|
||||
(bind "${mainMod} + 0" (dsp "hl.dsp.focus({ workspace = 10 })"))
|
||||
(bind "${mainMod} + SHIFT + 0" (dsp "hl.dsp.window.move({ workspace = 10 })"))
|
||||
]
|
||||
++ wsBinds;
|
||||
|
||||
window_rule = [
|
||||
{ suppress_event = "maximize"; }
|
||||
{
|
||||
match.class = "gamescope";
|
||||
workspace = "5";
|
||||
immediate = true;
|
||||
confine_pointer = true;
|
||||
}
|
||||
{
|
||||
match.initial_title = "OBS Studio Crash Detected";
|
||||
pin = true;
|
||||
}
|
||||
# Steam, Discord (equibop), Telegram, Spotify and OBS
|
||||
# always open on their own workspace regardless of how
|
||||
# they were launched. These sit before the "Discord
|
||||
# Popout" rule: window rules apply in declaration order
|
||||
# and the last match wins, so popouts still land on
|
||||
# workspace 1.
|
||||
{
|
||||
match.class = "steam";
|
||||
workspace = "6 silent";
|
||||
}
|
||||
{
|
||||
match.class = "equibop";
|
||||
workspace = "8 silent";
|
||||
}
|
||||
{
|
||||
match.class = "org.telegram.desktop";
|
||||
workspace = "8 silent";
|
||||
}
|
||||
{
|
||||
match.class = "spotify";
|
||||
workspace = "9 silent";
|
||||
}
|
||||
{
|
||||
match.class = "com.obsproject.Studio";
|
||||
workspace = "10 silent";
|
||||
}
|
||||
{
|
||||
match.initial_title = "Discord Popout";
|
||||
workspace = "1 silent";
|
||||
}
|
||||
];
|
||||
|
||||
layer_rule = [
|
||||
{
|
||||
match.namespace = "notifications";
|
||||
no_screen_share = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Host-specific overrides: load ~/.config/hypr/hyprland-local.lua
|
||||
# if present (must be valid Lua). Runs last so a host can override
|
||||
# anything set above.
|
||||
extraConfig = ''
|
||||
local home = os.getenv("HOME")
|
||||
if home then
|
||||
local localPath = home .. '/.config/hypr/hyprland-local.lua'
|
||||
local f = io.open(localPath, 'r')
|
||||
if f then
|
||||
f:close()
|
||||
local chunk, err = loadfile(localPath)
|
||||
if chunk then chunk() else io.stderr:write('hyprland-local.lua error: ' .. err .. '\n') end
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
{
|
||||
modules,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
};
|
||||
modules.hyprland = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [ inputs.hyprland.nixosModules.default ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
wayfreeze
|
||||
grim
|
||||
slurp
|
||||
wlogout
|
||||
ranger
|
||||
];
|
||||
programs.xwayland.enable = true;
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
# withUWSM = true;
|
||||
# set the flake package
|
||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
# make sure to also set the portal package, so that they are in sync
|
||||
portalPackage =
|
||||
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
# gtk.enable = lib.mkForce false;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [
|
||||
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland
|
||||
];
|
||||
};
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
hardware.graphics = {
|
||||
# package = pkgs-unstable.mesa;
|
||||
|
||||
# if you also want 32-bit support (e.g for Steam)
|
||||
# enable32Bit = true;
|
||||
# package32 = pkgs-unstable.pkgsi686Linux.mesa;
|
||||
};
|
||||
};
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
gtk = {
|
||||
enable = true;
|
||||
};
|
||||
# backupFileExtension = "backupHM";
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
systemd.variables = [ "--all" ];
|
||||
configType = "lua";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
{ modules, ... }:
|
||||
{
|
||||
modules.hyprlock = {
|
||||
homeManager =
|
||||
_:
|
||||
let
|
||||
# Palette extracted from the hyprpaper wallpaper so the input field
|
||||
# matches the background. Regenerate and update when Wallpaper.jpg
|
||||
# changes:
|
||||
# nix run nixpkgs#matugen -- image ~/Wallpaper.jpg -m dark \
|
||||
# --source-color-index 0 --dry-run --show-colors
|
||||
#
|
||||
# name (matugen token) hex rgb()
|
||||
primary = "rgb(135, 209, 235)"; # #87D1EB accent / success
|
||||
tertiary = "rgb(194, 195, 235)"; # #C2C3EB capslock
|
||||
error = "rgb(255, 180, 171)"; # #FFB4AB failure
|
||||
outline = "rgb(137, 146, 150)"; # #899296 neutral border
|
||||
on_surface = "rgb(222, 227, 230)"; # #DEE3E6 text/dots
|
||||
inner_color = "rgba(27, 32, 35, 0.6)"; # #1B2023 @ 60%
|
||||
in
|
||||
{
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Reuse the hyprpaper wallpaper (see doloro-settings hyprpaper
|
||||
# config) as the lock screen background. monitor = "" covers every
|
||||
# output.
|
||||
background = [
|
||||
{
|
||||
monitor = "";
|
||||
path = "/home/doloro/Wallpaper.jpg";
|
||||
}
|
||||
];
|
||||
# hyprlock has no input-field by default, so one must be declared
|
||||
# explicitly or there is no password prompt to unlock with.
|
||||
input-field = [
|
||||
{
|
||||
monitor = "DP-2";
|
||||
size = "200, 50";
|
||||
position = "0, -80";
|
||||
rounding = 4;
|
||||
dots_center = true;
|
||||
dots_size = 0.33;
|
||||
hide_input = false;
|
||||
fade_on_empty = false;
|
||||
font_family = "CaskaydiaCove Nerd Font Mono";
|
||||
placeholder_text = ''<span foreground="##899296">Password...</span>'';
|
||||
fail_text = ''<i>$FAIL <b>($ATTEMPTS)</b></i>'';
|
||||
inherit inner_color;
|
||||
outer_color = outline;
|
||||
check_color = primary;
|
||||
fail_color = error;
|
||||
capslock_color = tertiary;
|
||||
font_color = on_surface;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
nixos.security.pam.services.hyprlock = { };
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.wlsunset = {
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
systemd.user.services = {
|
||||
wlsunset = {
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
hytale-launcher.url = "github:JPyke3/hytale-launcher-nix";
|
||||
};
|
||||
modules.hytale-launcher = {
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
inputs.hytale-launcher.packages.${pkgs.system}.default
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
{
|
||||
modules.kitty = {
|
||||
homeManager = {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "Google Sans Code Nerd Font";
|
||||
size = 11;
|
||||
};
|
||||
settings = {
|
||||
sync_to_monitor = "yes";
|
||||
background_opacity = 0.6;
|
||||
cursor_trail = 1;
|
||||
auto_reload_config = -1;
|
||||
# input_delay = 1;
|
||||
# repaint_delay = 2;
|
||||
wayland_enable_ime = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
flake-file.inputs = {
|
||||
nik-pkgs = {
|
||||
url = "git+https://git.scug.io/nikkuss/pkgs.git?ref=main";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
modules.nikpkgs = {
|
||||
nixos = {
|
||||
nixpkgs.overlays = [inputs.nik-pkgs.overlays.default];
|
||||
};
|
||||
# debug = inputs.nik-pkgs;
|
||||
};
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
{
|
||||
modules,
|
||||
inputs,
|
||||
lib,
|
||||
den,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
niri-flake = {
|
||||
url = "github:sodiboo/niri-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
modules.niri = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [ inputs.niri-flake.nixosModules.niri ];
|
||||
programs.niri.enable = true;
|
||||
programs.niri.package = pkgs.niri-unstable;
|
||||
nixpkgs.overlays = [ inputs.niri-flake.overlays.niri ];
|
||||
};
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# The nixos module already imports the hm module
|
||||
# imports = [ inputs.niri-flake.homeModules.niri ];
|
||||
gtk.enable = lib.mkForce false;
|
||||
programs = {
|
||||
niri = {
|
||||
# enable = true;
|
||||
# package = pkgs.niri-unstable;
|
||||
settings = {
|
||||
input = {
|
||||
keyboard = {
|
||||
xkb = {
|
||||
layout = "gb";
|
||||
};
|
||||
numlock = true;
|
||||
};
|
||||
};
|
||||
cursor = {
|
||||
size = 16;
|
||||
};
|
||||
outputs = {
|
||||
DP-3 = {
|
||||
# Philips Consumer Electronics Company PHL 272E1GZ UK02101011104
|
||||
mode = {
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
refresh = 144.0;
|
||||
};
|
||||
focus-at-startup = true;
|
||||
variable-refresh-rate = false;
|
||||
};
|
||||
HDMI-A-1 = {
|
||||
position = {
|
||||
x = -1920;
|
||||
y = 0;
|
||||
};
|
||||
scale = 1;
|
||||
};
|
||||
};
|
||||
binds = {
|
||||
# Navigation
|
||||
"Mod+Shift+WheelScrollDown" = {
|
||||
hotkey-overlay.title = "Workspace Down";
|
||||
cooldown-ms = 150;
|
||||
action.focus-workspace-down = [ ];
|
||||
};
|
||||
"Mod+Shift+WheelScrollUp" = {
|
||||
hotkey-overlay.title = "Workspace Up";
|
||||
cooldown-ms = 150;
|
||||
action.focus-workspace-up = [ ];
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
hotkey-overlay.title = "Workspace Left";
|
||||
action.focus-column-right = [ ];
|
||||
};
|
||||
"Mod+WheelScrollDown" = {
|
||||
hotkey-overlay.title = "Workspace Right";
|
||||
action.focus-column-left = [ ];
|
||||
};
|
||||
"Super+Tab" = {
|
||||
hotkey-overlay.title = "Overview";
|
||||
action.toggle-overview = [ ];
|
||||
};
|
||||
# --
|
||||
# Utility
|
||||
"Super+S" = {
|
||||
action.screenshot = [ ];
|
||||
};
|
||||
"Super+C" = {
|
||||
action.close-window = [ ];
|
||||
};
|
||||
"Super+L" = {
|
||||
action.spawn = "wlogout";
|
||||
};
|
||||
# Program Spawning
|
||||
"Mod+E".action.spawn = "helium";
|
||||
|
||||
"Mod+R".action.spawn =
|
||||
let
|
||||
config = pkgs.writeTextFile {
|
||||
name = "config";
|
||||
text = ''
|
||||
width = 100%
|
||||
height = 100%
|
||||
border-width = 0
|
||||
outline-width = 0
|
||||
padding-left = 35%
|
||||
padding-top = 35%
|
||||
result-spacing = 25
|
||||
num-results = 5
|
||||
font = monospace
|
||||
background-color = #000A
|
||||
'';
|
||||
};
|
||||
script = pkgs.writeShellScript "mreow" ''
|
||||
exec $(tofi-drun -c ${config})
|
||||
'';
|
||||
in
|
||||
"${script}";
|
||||
|
||||
"Mod+Q".action.spawn = "kitty";
|
||||
# --
|
||||
};
|
||||
window-rules = [
|
||||
{
|
||||
matches = [ ];
|
||||
geometry-corner-radius = {
|
||||
bottom-left = 3.0;
|
||||
bottom-right = 3.0;
|
||||
top-left = 3.0;
|
||||
top-right = 3.0;
|
||||
};
|
||||
clip-to-geometry = true;
|
||||
draw-border-with-background = false;
|
||||
focus-ring.width = 2;
|
||||
}
|
||||
];
|
||||
xwayland-satellite = {
|
||||
enable = true;
|
||||
path = lib.getExe pkgs.xwayland-satellite;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.nix-ld = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [
|
||||
# List by default
|
||||
zlib
|
||||
zstd
|
||||
stdenv.cc.cc
|
||||
curl
|
||||
openssl
|
||||
attr
|
||||
libssh
|
||||
bzip2
|
||||
libxml2
|
||||
acl
|
||||
libsodium
|
||||
util-linux
|
||||
xz
|
||||
systemd
|
||||
|
||||
# My own additions
|
||||
libxcomposite
|
||||
libxtst
|
||||
libxrandr
|
||||
libxext
|
||||
libx11
|
||||
libxfixes
|
||||
libGL
|
||||
libva
|
||||
pipewire
|
||||
libxcb
|
||||
libxdamage
|
||||
libxshmfence
|
||||
libxxf86vm
|
||||
libelf
|
||||
|
||||
# Required
|
||||
glib
|
||||
gtk2
|
||||
|
||||
# Inspired by steam
|
||||
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/st/steam/package.nix#L36-L85
|
||||
networkmanager
|
||||
vulkan-loader
|
||||
libgbm
|
||||
libdrm
|
||||
libxcrypt
|
||||
coreutils
|
||||
pciutils
|
||||
zenity
|
||||
# glibc_multi.bin # Seems to cause issue in ARM
|
||||
|
||||
# # Without these it silently fails
|
||||
libxinerama
|
||||
libxcursor
|
||||
libxrender
|
||||
libxscrnsaver
|
||||
libxi
|
||||
libsm
|
||||
libice
|
||||
# gnome2.GConf
|
||||
nspr
|
||||
nss
|
||||
cups
|
||||
libcap
|
||||
SDL2
|
||||
libusb1
|
||||
dbus-glib
|
||||
ffmpeg
|
||||
# Only libraries are needed from those two
|
||||
libudev0-shim
|
||||
|
||||
# needed to run unity
|
||||
gtk3
|
||||
icu
|
||||
libnotify
|
||||
gsettings-desktop-schemas
|
||||
# https://github.com/NixOS/nixpkgs/issues/72282
|
||||
# https://github.com/NixOS/nixpkgs/blob/2e87260fafdd3d18aa1719246fd704b35e55b0f2/pkgs/applications/misc/joplin-desktop/default.nix#L16
|
||||
# log in /home/leo/.config/unity3d/Editor.log
|
||||
# it will segfault when opening files if you don’t do:
|
||||
# export XDG_DATA_DIRS=/nix/store/0nfsywbk0qml4faa7sk3sdfmbd85b7ra-gsettings-desktop-schemas-43.0/share/gsettings-schemas/gsettings-desktop-schemas-43.0:/nix/store/rkscn1raa3x850zq7jp9q3j5ghcf6zi2-gtk+3-3.24.35/share/gsettings-schemas/gtk+3-3.24.35/:$XDG_DATA_DIRS
|
||||
# other issue: (Unity:377230): GLib-GIO-CRITICAL **: 21:09:04.706: g_dbus_proxy_call_sync_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed
|
||||
|
||||
# Verified games requirements
|
||||
libxt
|
||||
libxmu
|
||||
libogg
|
||||
libvorbis
|
||||
SDL
|
||||
SDL2_image
|
||||
glew_1_10
|
||||
libidn
|
||||
tbb
|
||||
|
||||
# Other things from runtime
|
||||
flac
|
||||
freeglut
|
||||
libjpeg
|
||||
libpng
|
||||
libpng12
|
||||
libsamplerate
|
||||
libmikmod
|
||||
libtheora
|
||||
libtiff
|
||||
pixman
|
||||
speex
|
||||
SDL_image
|
||||
SDL_ttf
|
||||
SDL_mixer
|
||||
SDL2_ttf
|
||||
SDL2_mixer
|
||||
# libappindicator-gtk2
|
||||
# libdbusmenu-gtk2
|
||||
# libindicator-gtk2
|
||||
libcaca
|
||||
libcanberra
|
||||
libgcrypt
|
||||
libvpx
|
||||
librsvg
|
||||
libxft
|
||||
libvdpau
|
||||
# ...
|
||||
# Some more libraries that I needed to run programs
|
||||
pango
|
||||
cairo
|
||||
atk
|
||||
gdk-pixbuf
|
||||
fontconfig
|
||||
freetype
|
||||
dbus
|
||||
alsa-lib
|
||||
expat
|
||||
# for blender
|
||||
libxkbcommon
|
||||
|
||||
libxcrypt-legacy # For natron
|
||||
libGLU # For natron
|
||||
|
||||
fribidi
|
||||
harfbuzz
|
||||
libgpg-error
|
||||
|
||||
# Appimages need fuse, e.g. https://musescore.org/fr/download/musescore-x86_64.AppImage
|
||||
fuse
|
||||
e2fsprogs
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
{...}: {
|
||||
flake-file.inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
modules.nix = {
|
||||
nixos = {...}: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix.settings = {
|
||||
extra-substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
"https://attic.scug.io/pkgs"
|
||||
"https://cache.nixos-cuda.org"
|
||||
"https://niri.cachix.org"
|
||||
"https://attic.xuyh0120.win/lantian"
|
||||
"https://nixos-raspberrypi.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"pkgs:+sRbfiZMMX5R3PuAPtIRz/emowDoGZNpozibrnrAvuc="
|
||||
"cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M="
|
||||
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
||||
"lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc="
|
||||
"nixos-raspberrypi.cachix.org-1:4iMO9LXa8BqhU+Rpg6LQKiGa2lsNh/j2oiYLNOQ5sPI="
|
||||
];
|
||||
experimental-features = [
|
||||
"flakes"
|
||||
"nix-command"
|
||||
];
|
||||
trusted-users = [
|
||||
"doloro"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,525 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Its in its own folder for future modulizaion efforts
|
||||
flake-file.inputs = {
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
};
|
||||
};
|
||||
modules = {
|
||||
nixvim = {
|
||||
nixos =
|
||||
{ home-manager, ... }:
|
||||
{
|
||||
};
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
tiny-code-action = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "tiny-code-action.nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "rachartier";
|
||||
repo = "tiny-code-action.nvim";
|
||||
rev = "0d040ed81f7953118b81cd12681fcdfcac069803";
|
||||
hash = "sha256-UF9zeO5Uujdt2MEwy2d2Lhk6JRnEN4vrEvYslv0/zaA";
|
||||
};
|
||||
nvimSkipModules = [ "tiny-code-action.previewers.snacks" ];
|
||||
};
|
||||
cmp-lsp-rs = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "nvim-cmp-lsp-rs";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zjp-CN";
|
||||
repo = "nvim-cmp-lsp-rs";
|
||||
rev = "329075b806deb719d3ce4f55a7e443541ce5289d";
|
||||
hash = "sha256-rBABhsShCrx7Gofm1mC6DQAL0KeNtQidW9eMr9kfwGI=";
|
||||
};
|
||||
# nvim-cmp on rtp during the require check (cmp_lsp_rs requires cmp.types.lsp at load time)
|
||||
dependencies = [ pkgs.vimPlugins.nvim-cmp ];
|
||||
};
|
||||
treesitter-rhai-grammar = pkgs.tree-sitter.buildGrammar {
|
||||
language = "rhai";
|
||||
version = "0.0.0+rev=4ac7384";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "elkowar";
|
||||
repo = "tree-sitter-rhai";
|
||||
rev = "4ac7384d487ffcb54e746ef1569585a749370c5b";
|
||||
hash = "sha256-XGGcEGHke/O00STKqwSk9jGj91Xm2LE2KxwwX5+bBg0=";
|
||||
};
|
||||
meta.homepage = "https://github.com/elkowar/tree-sitter-rhai";
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
];
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
source = inputs.nixpkgs;
|
||||
};
|
||||
colorschemes.gruvbox-material.enable = true;
|
||||
# colorschemes.melange = {
|
||||
# enable = true;
|
||||
# autoLoad = false;
|
||||
# };
|
||||
dependencies.rust-analyzer.enable = false;
|
||||
extraPackages = with pkgs; [
|
||||
# formatters
|
||||
nixfmt-rs
|
||||
rustfmt
|
||||
# misc
|
||||
ripgrep
|
||||
nixd
|
||||
tree-sitter
|
||||
# rust-analyzer
|
||||
# rustc
|
||||
# cargo
|
||||
];
|
||||
performance.byteCompileLua = {
|
||||
enable = true;
|
||||
plugins = true;
|
||||
nvimRuntime = true;
|
||||
luaLib = true;
|
||||
configs = true;
|
||||
};
|
||||
plugins = {
|
||||
luasnip.enable = true;
|
||||
cmp_luasnip.enable = true;
|
||||
fidget.enable = true;
|
||||
mini-comment.enable = true;
|
||||
# cord.enable = true;
|
||||
todo-comments.enable = true;
|
||||
transparent.enable = true;
|
||||
which-key.enable = true;
|
||||
snacks.enable = true;
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
formatters_by_ft = {
|
||||
nix = [ "nixfmt" ];
|
||||
rust = [ "rustfmt" ];
|
||||
"_" = [
|
||||
"squeeze_blanks"
|
||||
"trim_whitespace"
|
||||
"trim_newlines"
|
||||
];
|
||||
};
|
||||
format_on_save = {
|
||||
timeout_ms = 500;
|
||||
lsp_format = "fallback";
|
||||
};
|
||||
};
|
||||
};
|
||||
# efmls-configs = {
|
||||
# enable = true;
|
||||
# languages = {
|
||||
# scss = {
|
||||
# formatter = "prettier";
|
||||
# linter = "stylelint";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
rustaceanvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
default_settings = {
|
||||
rust-analyzer = {
|
||||
cargo.targetDir = true;
|
||||
diagnostics.refresh_update = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
onAttach = ''
|
||||
if client.name == "rust-analyzer" then
|
||||
client.server_capabilities.semanticTokensProvider = nil
|
||||
end
|
||||
'';
|
||||
servers = {
|
||||
# qmlls = {
|
||||
# enable = true;
|
||||
# config = {
|
||||
# cmd = "-E";
|
||||
# };
|
||||
# };
|
||||
# rust_analyzer = {
|
||||
# enable = true;
|
||||
# installCargo = false;
|
||||
# installRustc = false;
|
||||
# };
|
||||
nixd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
nixd = {
|
||||
nixpkgs.expr = "import (builtins.getFlake \"${toString /home/doloro/dotfiles}\").inputs.nixpkgs { }";
|
||||
};
|
||||
};
|
||||
};
|
||||
astro = {
|
||||
enable = false;
|
||||
};
|
||||
ts_ls = {
|
||||
enable = true;
|
||||
};
|
||||
cssls = {
|
||||
enable = true;
|
||||
package = pkgs.vscode-langservers-extracted;
|
||||
};
|
||||
svelte.enable = true;
|
||||
};
|
||||
};
|
||||
# mini-statusline.enable = true;
|
||||
lualine = {
|
||||
enable = true;
|
||||
settings = {
|
||||
sections = {
|
||||
lualine_a = [ "mode" ];
|
||||
lualine_b = [
|
||||
"branch"
|
||||
"diff"
|
||||
"diagnostics"
|
||||
];
|
||||
lualine_c = [ "filename" ];
|
||||
lualine_x = [
|
||||
"encoding"
|
||||
"fileformat"
|
||||
"filetype"
|
||||
];
|
||||
lualine_y = [ "progress" ];
|
||||
lualine_z = [ "location" ];
|
||||
};
|
||||
inactive_sections = {
|
||||
lualine_a = [ ];
|
||||
lualine_b = [ ];
|
||||
lualine_c = [ "filename" ];
|
||||
lualine_x = [ "location" ];
|
||||
lualine_y = [ ];
|
||||
lualine_z = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
web-devicons.enable = true;
|
||||
lazygit.enable = true;
|
||||
mini-indentscope = {
|
||||
enable = true;
|
||||
settings = {
|
||||
draw = {
|
||||
delay = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
mini-files = {
|
||||
enable = true;
|
||||
settings = {
|
||||
windows = {
|
||||
preview = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
trouble = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auto_close = true;
|
||||
use_diagnostic_signs = true;
|
||||
};
|
||||
};
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
cmdline = {
|
||||
":" = {
|
||||
mapping.__raw = "cmp.mapping.preset.cmdline()";
|
||||
sources = [
|
||||
{ name = "cmdline"; }
|
||||
];
|
||||
};
|
||||
"/" = {
|
||||
mapping.__raw = "cmp.mapping.preset.cmdline()";
|
||||
sources = [
|
||||
{ name = "buffer"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
snippet.expand.__raw = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
sources = [
|
||||
{
|
||||
name = "nvim_lsp";
|
||||
priority = 100;
|
||||
entry_filter = "require('cmp_lsp_rs').filter_out.rust_entry_filter";
|
||||
}
|
||||
{
|
||||
name = "luasnip";
|
||||
priority = 75;
|
||||
}
|
||||
{
|
||||
name = "buffer";
|
||||
priority = 50;
|
||||
}
|
||||
];
|
||||
mapping = {
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<S-Tab>" =
|
||||
"cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() elseif require('luasnip').jumpable(-1) then require('luasnip').jump(-1) else fallback() end end, {'i', 's'})";
|
||||
"<Tab>" =
|
||||
"cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() elseif require('luasnip').expand_or_jumpable() then require('luasnip').expand_or_jump() else fallback() end end, {'i', 's'})";
|
||||
};
|
||||
sorting = {
|
||||
comparators = [
|
||||
"require('cmp.config.compare').exact"
|
||||
"require('cmp.config.compare').score"
|
||||
"require('cmp_lsp_rs').comparators.inscope_inherent_import"
|
||||
"require('cmp_lsp_rs').comparators.sort_by_label_but_underscore_last"
|
||||
];
|
||||
};
|
||||
window = {
|
||||
completion = {
|
||||
border = "rounded";
|
||||
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,CursorLine:PmenuSel,Search:None";
|
||||
};
|
||||
documentation = {
|
||||
border = "rounded";
|
||||
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lspkind.enable = true;
|
||||
tiny-inline-diagnostic.enable = true;
|
||||
# tiny-code-action.enable = true;
|
||||
# persisted.enable = true;
|
||||
wakatime.enable = true;
|
||||
treesitter = {
|
||||
enable = true;
|
||||
grammarPackages = (with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
||||
bash
|
||||
css
|
||||
html
|
||||
javascript
|
||||
json
|
||||
lua
|
||||
make
|
||||
markdown
|
||||
rust
|
||||
nix
|
||||
regex
|
||||
toml
|
||||
tsx
|
||||
typescript
|
||||
vim
|
||||
vimdoc
|
||||
xml
|
||||
yaml
|
||||
svelte
|
||||
]) ++ [ treesitter-rhai-grammar ];
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
indent.enable = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
extraPlugins = with pkgs; [
|
||||
tiny-code-action
|
||||
cmp-lsp-rs
|
||||
treesitter-rhai-grammar
|
||||
];
|
||||
opts = {
|
||||
number = true;
|
||||
bg = "dark";
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
termguicolors = true;
|
||||
completeopt = "menu,menuone,noselect";
|
||||
};
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
};
|
||||
extraConfigLua = ''
|
||||
-- LSP client writes server stderr + errors to disk on the main loop; nixd spams info logs -> 5MB+ logs.
|
||||
-- warn level: captures server stderr (incl. rust-analyzer slow-request timing) without nixd's info spam.
|
||||
vim.lsp.set_log_level("warn")
|
||||
-- tree-sitter-nix uses (#is-not? local) which the new nvim-treesitter main branch no longer registers
|
||||
vim.treesitter.query.add_predicate("is-not?", function() return true end, { force = true })
|
||||
|
||||
require('tiny-code-action').setup({
|
||||
backend = 'vim',
|
||||
picker = 'snacks',
|
||||
resolve_timeout = 100,
|
||||
notify = {
|
||||
enabled = true,
|
||||
on_empty = true,
|
||||
},
|
||||
})
|
||||
'';
|
||||
keymaps = [
|
||||
{
|
||||
action = "<cmd>lua require('snacks.picker').files()<cr>";
|
||||
key = "<leader>ff";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>:lua MiniFiles.open()<cr>";
|
||||
key = "<leader>fv";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>LazyGit<cr>";
|
||||
key = "<leader>lg";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('snacks.picker').buffers()<cr>";
|
||||
key = "<leader>fb";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('snacks.picker').grep()<cr>";
|
||||
key = "<leader>fg";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>Trouble diagnostics toggle<cr>";
|
||||
key = "<leader>fd";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Toggle diagnostics (Trouble)";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('tiny-code-action').code_action()<cr>";
|
||||
key = "<leader>ca";
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
# LSP
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.definition()<cr>";
|
||||
key = "gd";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Go to definition";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.declaration()<cr>";
|
||||
key = "gD";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Go to declaration";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.implementation()<cr>";
|
||||
key = "gi";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Go to implementation";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.type_definition()<cr>";
|
||||
key = "<leader>D";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Go to type definition";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('snacks.picker').lsp_references()<cr>";
|
||||
key = "gr";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "LSP references";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.hover()<cr>";
|
||||
key = "K";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Hover docs";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.signature_help()<cr>";
|
||||
key = "<C-k>";
|
||||
mode = [
|
||||
"n"
|
||||
"i"
|
||||
];
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Signature help";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.rename()<cr>";
|
||||
key = "<leader>rn";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Rename symbol";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.diagnostic.goto_prev()<cr>";
|
||||
key = "[d";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Previous diagnostic";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.diagnostic.goto_next()<cr>";
|
||||
key = "]d";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Next diagnostic";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.diagnostic.open_float()<cr>";
|
||||
key = "<leader>e";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Show diagnostic float";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
{
|
||||
modules.obs = settings: {
|
||||
homeManager =
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs = {
|
||||
obs-studio = {
|
||||
enable = true;
|
||||
# package = (
|
||||
# (pkgs.obs-studio.overrideAttrs (old: {
|
||||
# version = "32.2.0-beta2-unstable";
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "obsproject";
|
||||
# repo = "obs-studio";
|
||||
# rev = "27ac23ef750aafb2bb7ddd499ede5755a5a3087f";
|
||||
# hash = "sha256-3wPHNgYzR+ZIbCYMh5ocyK/nsQxy24Wfa03kheYOU88=";
|
||||
# fetchSubmodules = true;
|
||||
# };
|
||||
# cmakeFlags = (old.cmakeFlags or []) ++ [
|
||||
# "-DOBS_VERSION_OVERRIDE=32.2.0-beta2"
|
||||
# ];
|
||||
# })).override
|
||||
# {
|
||||
# cudaSupport = true;
|
||||
# }
|
||||
# );
|
||||
package = pkgs.obs-studio.override { cudaSupport = true; };
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
obs-pipewire-audio-capture
|
||||
obs-vkcapture
|
||||
obs-gstreamer
|
||||
];
|
||||
};
|
||||
};
|
||||
systemd.user.services =
|
||||
let
|
||||
audio-set = lib.mkIf settings.audio {
|
||||
pw-discordaudio-virtual-device = {
|
||||
Unit = {
|
||||
Description = "OBS daemon";
|
||||
After = [ "hyprland-session.target" ];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.writeShellScript "discord_audio_virt_device" ''
|
||||
pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=DiscordSink' -n DiscordSink
|
||||
''}";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
};
|
||||
};
|
||||
pw-gameaudio-virtual-device = {
|
||||
Unit = {
|
||||
Description = "OBS daemon";
|
||||
After = [ "hyprland-session.target" ];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.writeShellScript "game_audio_virt_device" ''
|
||||
pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=GameAudioSink' -n GameAudioSink
|
||||
''}";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
lib.mergeAttrsList [ audio-set ];
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# exec-once = ["${config.programs.obs-studio.finalPackage}/bin/obs --startreplaybuffer"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
modules.openvivo = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
llama = pkgs.fetchFromGitHub ({
|
||||
owner = "ravi9";
|
||||
repo = "llama.cpp";
|
||||
rev = "1117e77";
|
||||
hash = "sha256-7NMhKGxfutZ7i16ra3EA4pYEnLl0S23E6TFY7IhVPXU=";
|
||||
});
|
||||
in
|
||||
{
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
virtualisation.oci-containers.containers = {
|
||||
openvino = {
|
||||
image = "openvino:latest";
|
||||
imageFile = pkgs.dockerTools.buildImage {
|
||||
name = "openvino";
|
||||
tag = "latest";
|
||||
fromImage = "${llama}/.devops/openvino.Dockerfile";
|
||||
};
|
||||
autoStart = true;
|
||||
ports = [ "127.0.0.1:1234:1234" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.podman = {
|
||||
nixos =
|
||||
{ ... }:
|
||||
{
|
||||
virtualisation = {
|
||||
containers.enable = true;
|
||||
podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings = {
|
||||
dns_enabled = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
users.users."doloro" = {
|
||||
extraGroups = [ "podman" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.auto-cpufreq = {
|
||||
nixos =
|
||||
{ ... }:
|
||||
{
|
||||
services.auto-cpufreq.settings = {
|
||||
battery = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
};
|
||||
charger = {
|
||||
governor = "performance";
|
||||
turbo = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.battery-ac-targets = {
|
||||
nixos =
|
||||
{ ... }:
|
||||
{
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="/run/current-system/systemd/bin/systemctl start battery.target"
|
||||
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="/run/current-system/systemd/bin/systemctl start ac.target"
|
||||
'';
|
||||
systemd.targets = {
|
||||
"ac" = {
|
||||
description = "On AC power";
|
||||
unitConfig = {
|
||||
StopWhenUnneeded = "yes";
|
||||
};
|
||||
};
|
||||
"battery" = {
|
||||
description = "On battery power";
|
||||
unitConfig = {
|
||||
StopWhenUnneeded = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.common.provides = {
|
||||
laptop-power-management = {
|
||||
includes = [
|
||||
# modules.auto-cpufreq
|
||||
modules.battery-ac-targets
|
||||
modules.intel-mgm
|
||||
modules.tlp
|
||||
modules.rfkill-sleep
|
||||
# modules.ppd
|
||||
];
|
||||
nixos = {
|
||||
services.upower.enable = true;
|
||||
services.thermald.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{ modules, den, ... }:
|
||||
{
|
||||
modules.flash = {
|
||||
nixos = {
|
||||
services.scx = {
|
||||
enable = true;
|
||||
## Commented out because the service impl is bugged and doesnt actually set these
|
||||
# scheduler = "scx_lavd";
|
||||
# extraArgs = [
|
||||
# "--cpu-pref-order 20-21,12-19,0-11"
|
||||
# "--autopilot"
|
||||
# ];
|
||||
};
|
||||
# Most energy efficent scheduler setup..
|
||||
systemd.services.scx.environment = {
|
||||
SCX_SCHEDULER_OVERRIDE = "scx_flash";
|
||||
# Flags are from cachyos sched-ext tutorial
|
||||
SCX_FLAGS_OVERRIDE = "-m powersave -I 10000 -t 1000 -s 10000 -S 1000";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
# Intel Mobile Gpu Management
|
||||
modules.intel-mgm = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
batt-gpu = pkgs.writeShellScript "batt-igpu" ''
|
||||
${pkgs.intel-gpu-tools}/bin/intel_gpu_frequency -e;
|
||||
echo '1250' > /sys/class/drm/card1/gt_boost_freq_mhz;
|
||||
'';
|
||||
ac-gpu = pkgs.writeShellScript "ac-igpu" ''
|
||||
${pkgs.intel-gpu-tools}/bin/intel_gpu_frequency -d;
|
||||
echo '2350' > /sys/class/drm/card1/gt_boost_freq_mhz;
|
||||
'';
|
||||
in
|
||||
{
|
||||
systemd.services.gpu-limit-on-batt = {
|
||||
enable = true;
|
||||
description = "Gpu Limit";
|
||||
before = [ "battery.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${batt-gpu}";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
wantedBy = [ "battery.target" ];
|
||||
partOf = [ "battery.target" ];
|
||||
};
|
||||
systemd.services.gpu-limit-on-ac = {
|
||||
enable = true;
|
||||
description = "Gpu Limit";
|
||||
before = [ "ac.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${ac-gpu}";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
wantedBy = [ "ac.target" ];
|
||||
partOf = [ "ac.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
{ modules, den, ... }:
|
||||
{
|
||||
modules.lavd = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
nixpkgs.config.allowUnsupportedSystem = true;
|
||||
services.scx = {
|
||||
enable = true;
|
||||
package = pkgs.scx.rustscheds;
|
||||
## Commented out because the service impl is bugged and doesnt actually set these
|
||||
# scheduler = "scx_lavd";
|
||||
# extraArgs = [
|
||||
# "--cpu-pref-order 20-21,12-19,0-11"
|
||||
# "--autopilot"
|
||||
# ];
|
||||
};
|
||||
# Most energy efficent scheduler setup..
|
||||
systemd.services.scx.environment = {
|
||||
# SCX_SCHEDULER_OVERRIDE = "scx_lavd";
|
||||
# SCX_FLAGS_OVERRIDE = "--powersave --no-core-compaction";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.ppd = {
|
||||
nixos = {
|
||||
services.power-profiles-daemon.enable = true;
|
||||
powerManagement = {
|
||||
cpuFreqGovernor = "schedutil";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.rfkill-sleep = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# My laptop doesn't like having connectivity when it goes to sleep, it burns through battery
|
||||
systemd.services.sleep-rfkill = {
|
||||
description = "Custom suspend/resume hook";
|
||||
wantedBy = [ "sleep.target" ];
|
||||
before = [ "sleep.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
# Command to run BEFORE system suspends
|
||||
ExecStart = "${pkgs.util-linux}/bin/rfkill block all";
|
||||
# Command to run AFTER system resumes
|
||||
ExecStop = "${pkgs.util-linux}/bin/rfkill unblock all";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
unitConfig = {
|
||||
StopWhenUnneeded = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
{ modules, den, ... }:
|
||||
{
|
||||
modules.tdp = settings: {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
batt-tdp = pkgs.writeShellScript "batt-cpu-tdp" ''
|
||||
${pkgs.powercap}/bin/powercap-set intel-rapl -z 0 -c 0 -l ${
|
||||
toString (settings.batt.cpu.long-term * 1000000)
|
||||
}
|
||||
${pkgs.powercap}/bin/powercap-set intel-rapl -z 0 -c 1 -l ${
|
||||
toString (settings.batt.cpu.short-term * 1000000)
|
||||
}
|
||||
|
||||
${pkgs.powercap}/bin/powercap-set intel-rapl-mmio -z 0 -c 0 -l ${
|
||||
toString (settings.batt.mmio.long-term * 1000000)
|
||||
}
|
||||
${pkgs.powercap}/bin/powercap-set intel-rapl-mmio -z 0 -c 1 -l ${
|
||||
toString (settings.batt.mmio.short-term * 1000000)
|
||||
}
|
||||
'';
|
||||
ac-tdp = pkgs.writeShellScript "ac-cpu-tdp" ''
|
||||
${pkgs.powercap}/bin/powercap-set intel-rapl -z 0 -c 0 -l ${
|
||||
toString (settings.ac.cpu.long-term * 1000000)
|
||||
}
|
||||
${pkgs.powercap}/bin/powercap-set intel-rapl -z 0 -c 1 -l ${
|
||||
toString (settings.ac.cpu.short-term * 1000000)
|
||||
}
|
||||
|
||||
${pkgs.powercap}/bin/powercap-set intel-rapl-mmio -z 0 -c 0 -l ${
|
||||
toString (settings.batt.mmio.long-term * 1000000)
|
||||
}
|
||||
${pkgs.powercap}/bin/powercap-set intel-rapl-mmio -z 0 -c 1 -l ${
|
||||
toString (settings.batt.mmio.short-term * 1000000)
|
||||
}
|
||||
'';
|
||||
in
|
||||
{
|
||||
systemd.services.tdp-on-batt = {
|
||||
enable = true;
|
||||
before = [ "battery.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${batt-tdp}";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
wantedBy = [ "battery.target" ];
|
||||
partOf = [ "battery.target" ];
|
||||
};
|
||||
systemd.services.tdp-on-ac = {
|
||||
enable = true;
|
||||
before = [ "ac.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${ac-tdp}";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
wantedBy = [ "ac.target" ];
|
||||
partOf = [ "ac.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.tlp = {
|
||||
homeManager = { };
|
||||
nixos = {
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
pd.enable = true;
|
||||
settings = {
|
||||
# Wireless power saving
|
||||
WIFI_PWR_ON_BAT = "on";
|
||||
|
||||
# USB autosuspend
|
||||
USB_AUTOSUSPEND = "on";
|
||||
|
||||
# SATA drive power management
|
||||
SATA_LINKPWR_ON_BAT = "min_power";
|
||||
|
||||
RUNTIME_PM_ON_AC = "auto";
|
||||
RUNTIME_PM_ON_BAT = "auto";
|
||||
|
||||
# Disable Bluetooth on battery
|
||||
# DEVICES_TO_DISABLE_ON_BAT = "bluetooth";
|
||||
|
||||
# Restore brightness on battery
|
||||
RESTORE_BRIGHTNESS_ON_BAT = "1";
|
||||
PCIE_ASPM_ON_AC = "default";
|
||||
PCIE_ASPM_ON_BAT = "powersave";
|
||||
DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE = "bluetooth";
|
||||
INTEL_GPU_MAX_FREQ_ON_AC = 0;
|
||||
INTEL_GPU_MAX_FREQ_ON_BAT = 800;
|
||||
INTEL_GPU_BOOST_FREQ_ON_AC = 0;
|
||||
INTEL_GPU_BOOST_FREQ_ON_BAT = 1250;
|
||||
INTEL_GPU_POWER_PROFILE_ON_BAT = "power_saving";
|
||||
|
||||
# CPU_MAX_PERF_ON_BAT = 30;
|
||||
|
||||
# CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "schedutil";
|
||||
# CPU_HWP_DYN_BOOST_ON_AC = "1";
|
||||
# CPU_HWP_DYN_BOOST_ON_BAT = "0";
|
||||
# CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
# CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
MAX_LOST_WORK_SECS_ON_BAT = "60";
|
||||
MAX_LOST_WORK_SECS_ON_AC = "15";
|
||||
DISK_IDLE_SECS_ON_AC = "0";
|
||||
WOL_DISABLE = "Y";
|
||||
SOUND_POWER_SAVE_CONTROLLER = "Y";
|
||||
DISK_IDLE_SECS_ON_BAT = "2";
|
||||
SOUND_POWER_SAVE_ON_BAT = "1";
|
||||
SOUND_POWER_SAVE_ON_AC = "1";
|
||||
SCHED_POWERSAVE_ON_AC = 0;
|
||||
SCHED_POWERSAVE_ON_BAT = 1;
|
||||
NMI_WATCHDOG = 0;
|
||||
|
||||
PLATFORM_PROFILE_ON_AC = "balanced";
|
||||
PLATFORM_PROFILE_ON_BAT = "quiet";
|
||||
STOP_CHARGE_THRESH_BAT0 = 80;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{ modules, ... }:
|
||||
{
|
||||
modules.printing = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs; [
|
||||
cups-filters
|
||||
cups-browsed
|
||||
brlaser
|
||||
];
|
||||
};
|
||||
};
|
||||
homeManager =
|
||||
{ ... }:
|
||||
{
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{ modules, ... }:
|
||||
{
|
||||
# Applys doloro's public keys to the users openssh
|
||||
modules.publicKeys.provides = {
|
||||
doloro =
|
||||
{ user, host, ... }:
|
||||
{
|
||||
nixos = {
|
||||
users.users.${user.userName} = {
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE/4h+WCBBW82puv8SMdUbkWymF4amEMuZitgFztB6oZ" # laptop pub key
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaa6Z5qtBSLEz+A4fQGYPfkOISsRQlmKkVbcx2zxML7" # pc pub key
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.quickshell = {
|
||||
homeManager =
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.quickshell = {
|
||||
systemd.enable = true;
|
||||
systemd.target = "hyprland-session.target";
|
||||
enable = true;
|
||||
activeConfig = "main";
|
||||
configs = {
|
||||
main = config.lib.file.mkOutOfStoreSymlink "/home/doloro/dotfiles/config/modules/quickshell/quickshell";
|
||||
};
|
||||
};
|
||||
# systemd.user.services.quickshell = {
|
||||
# partOf = [ "hyprland-session.target" ];
|
||||
# after = [ "hyprland-session.target" ];
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
/run/user/1000/quickshell/vfs/ca6d8e2cdd46bffdf799708f31d409fa/.qmlls.ini
|
||||
@@ -1,52 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Services.UPower
|
||||
import Quickshell.Services.Pipewire
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
property PwNode defaultSpeaker: Pipewire.preferredDefaultAudioSink
|
||||
property PwNode defaultMic: Pipewire.defaultAudioSource
|
||||
|
||||
PwObjectTracker {
|
||||
objects: [root.defaultSpeaker, root.defaultMic]
|
||||
}
|
||||
visible: root.defaultSpeaker.audio.muted || root.defaultMic.audio.muted
|
||||
implicitHeight: 20
|
||||
implicitWidth: content.width
|
||||
color: Colors.backgroundAlt
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
radius: 3.5
|
||||
RowLayout {
|
||||
id: content
|
||||
height: 20
|
||||
anchors.centerIn: parent
|
||||
spacing: 4
|
||||
Rectangle {
|
||||
implicitWidth: 24
|
||||
implicitHeight: 20
|
||||
color: "transparent"
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: root.defaultSpeaker.audio.muted ? "" : ""
|
||||
font.family: "CaskaydiaCove NF"
|
||||
font.pixelSize: 20
|
||||
color: Colors.textPrimary
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
implicitWidth: 24
|
||||
implicitHeight: 20
|
||||
color: "transparent"
|
||||
radius: 3
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: root.defaultMic.audio.muted ? "" : ""
|
||||
font.family: "CaskaydiaCove NFM"
|
||||
font.pixelSize: 30
|
||||
color: Colors.textPrimary
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
// Bar.qml
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
Scope {
|
||||
id: root
|
||||
|
||||
PanelWindow {
|
||||
required property var modelData
|
||||
screen: modelData
|
||||
color: "transparent"
|
||||
|
||||
anchors {
|
||||
top: true
|
||||
left: true
|
||||
right: true
|
||||
}
|
||||
|
||||
implicitHeight: 20
|
||||
|
||||
RowLayout {
|
||||
visible: true
|
||||
height: parent.height
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
// bottomMargin: 2
|
||||
leftMargin: 0
|
||||
rightMargin: 0
|
||||
}
|
||||
RowLayout {
|
||||
// Left
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
// To make sure no children mess with the height of all the other children.
|
||||
// because if one widget is too height, it'll ofset all the other children in the bar
|
||||
Layout.preferredHeight: 20
|
||||
Workspaces {}
|
||||
}
|
||||
RowLayout {
|
||||
// Center
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.preferredHeight: 20
|
||||
}
|
||||
RowLayout {
|
||||
// Right
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Layout.preferredHeight: 20
|
||||
// spacing: 100
|
||||
spacing: 10
|
||||
Audio {}
|
||||
BatteryWidget {}
|
||||
Rectangle {
|
||||
implicitWidth: clockText.width
|
||||
implicitHeight: clockText.height
|
||||
radius: 3.5
|
||||
|
||||
color: Colors.backgroundAlt
|
||||
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Text {
|
||||
id: clockText
|
||||
color: Colors.textPrimary
|
||||
font: "CaskaydiaCove NFM"
|
||||
text: Clock.time
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Services.UPower
|
||||
|
||||
RowLayout {
|
||||
id: content
|
||||
height: 20
|
||||
anchors.centerIn: root
|
||||
visible: UPower.displayDevice.percentage != 0
|
||||
property string charging: UPower.displayDevice.state == UPowerDeviceState.Charging ? "Charging.." : ""
|
||||
Rectangle {
|
||||
implicitHeight: text.height
|
||||
implicitWidth: text.width
|
||||
color: Colors.backgroundAlt
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
radius: 3.5
|
||||
Text {
|
||||
id: text
|
||||
property int power: UPower.displayDevice.percentage * 100
|
||||
anchors.centerIn: parent
|
||||
text: charging + " " + power + "%"
|
||||
color: Colors.textPrimary
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
// Time.qml
|
||||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
// an expression can be broken across multiple lines using {}
|
||||
readonly property string time: {
|
||||
// The passed format string matches the default output of
|
||||
// the `date` command.
|
||||
Qt.formatDateTime(clock.date, "ddd MMM d HH:mm");
|
||||
}
|
||||
|
||||
SystemClock {
|
||||
id: clock
|
||||
precision: SystemClock.minutes
|
||||
}
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
pragma Singleton
|
||||
import QtQuick 2.15
|
||||
|
||||
// Gruvbox Dark — base24 QML singleton
|
||||
// Notes:
|
||||
// - This is a template for a "base24" palette. Replace the baseNN hex values
|
||||
// with your exact base24 values if you have them.
|
||||
// - Semantic aliases (background, textPrimary, accentBlue, etc.) map to the
|
||||
// palette entries and make QML usage easier.
|
||||
|
||||
// "Thanks CoPilot" - Doloro
|
||||
|
||||
QtObject {
|
||||
id: gruvbox
|
||||
|
||||
// ---- Base24 palette (base00 .. base23) ----
|
||||
// Replace these hex values with exact ones from the base24 palette if needed.
|
||||
property color base00: "#1d2021" // darkest background
|
||||
property color base01: "#282828"
|
||||
property color base02: "#32302f"
|
||||
property color base03: "#3c3836"
|
||||
property color base04: "#504945"
|
||||
property color base05: "#665c54"
|
||||
property color base06: "#7c6f64"
|
||||
property color base07: "#928374"
|
||||
property color base08: "#bdae93"
|
||||
property color base09: "#d5c4a1"
|
||||
property color base10: "#ebdbb2" // main foreground
|
||||
property color base11: "#fbf1c7"
|
||||
property color base12: "#cc241d" // red
|
||||
property color base13: "#d65d0e" // orange
|
||||
property color base14: "#d79921" // yellow
|
||||
property color base15: "#98971a" // green
|
||||
property color base16: "#689d6a" // aqua/green
|
||||
property color base17: "#8ec07c" // light aqua
|
||||
property color base18: "#458588" // blue
|
||||
property color base19: "#b16286" // purple
|
||||
property color base20: "#a89984" // muted
|
||||
property color base21: "#7c6f64" // subtle
|
||||
property color base22: "#504945"
|
||||
property color base23: "#282828" // repeat or very dark
|
||||
|
||||
// ---- Semantic aliases (use these in your QML components) ----
|
||||
property color background: base00
|
||||
property color backgroundAlt: base01
|
||||
property color surface: base02
|
||||
property color surfaceAlt: base03
|
||||
|
||||
property color textPrimary: base10
|
||||
property color textSecondary: base06
|
||||
property color textDisabled: base04
|
||||
property color border: base05
|
||||
property color muted: base20
|
||||
|
||||
// accents
|
||||
property color accentRed: base12
|
||||
property color accentOrange: base13
|
||||
property color accentYellow: base14
|
||||
property color accentGreen: base15
|
||||
property color accentAqua: base16
|
||||
property color accentLightAqua: base17
|
||||
property color accentBlue: base18
|
||||
property color accentPurple: base19
|
||||
|
||||
// Example semantic levels for UI elements
|
||||
property color windowBackground: background
|
||||
property color panelBackground: surface
|
||||
property color cardBackground: surfaceAlt
|
||||
property color primaryText: textPrimary
|
||||
property color secondaryText: textSecondary
|
||||
property color highlight: accentBlue
|
||||
property color danger: accentRed
|
||||
property color success: accentGreen
|
||||
property color warning: accentYellow
|
||||
|
||||
// ---- Helper function ----
|
||||
// Returns a color by semantic name (string). Useful for dynamic lookups.
|
||||
function colorFor(name) {
|
||||
switch (name) {
|
||||
case "background":
|
||||
return gruvbox.background;
|
||||
case "panelBackground":
|
||||
return gruvbox.panelBackground;
|
||||
case "cardBackground":
|
||||
return gruvbox.cardBackground;
|
||||
case "primaryText":
|
||||
return gruvbox.primaryText;
|
||||
case "secondaryText":
|
||||
return gruvbox.secondaryText;
|
||||
case "highlight":
|
||||
return gruvbox.highlight;
|
||||
case "danger":
|
||||
return gruvbox.danger;
|
||||
case "success":
|
||||
return gruvbox.success;
|
||||
case "warning":
|
||||
return gruvbox.warning;
|
||||
case "accentBlue":
|
||||
return gruvbox.accentBlue;
|
||||
case "accentRed":
|
||||
return gruvbox.accentRed;
|
||||
case "accentGreen":
|
||||
return gruvbox.accentGreen;
|
||||
default:
|
||||
// fallback to primary text if unknown
|
||||
return gruvbox.textPrimary;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
// Time.qml
|
||||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
function getHyprlandWorkspaceById(id) {
|
||||
for (var x of Hyprland.workspaces.values) {
|
||||
if (x.id == id) {
|
||||
return x;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
// Bar.qml
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Item {
|
||||
id: root
|
||||
width: row.width
|
||||
height: row.height
|
||||
RowLayout {
|
||||
id: row
|
||||
height: 15
|
||||
Repeater {
|
||||
id: repeater
|
||||
model: 10
|
||||
delegate: Item {
|
||||
id: content
|
||||
required property int index
|
||||
property bool focused: HyprlandHelpers.getHyprlandWorkspaceById(index + 1).focused
|
||||
property bool exists: HyprlandHelpers.getHyprlandWorkspaceById(index + 1) ? true : false
|
||||
state: focused ? "FOCUSED" : (exists ? "EXISTS" : "NOT")
|
||||
states: [
|
||||
State {
|
||||
name: "FOCUSED"
|
||||
PropertyChanges {
|
||||
target: content
|
||||
implicitWidth: 10
|
||||
scale: 1
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "EXISTS"
|
||||
PropertyChanges {
|
||||
target: content
|
||||
implicitWidth: 10
|
||||
scale: 0.85
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "NOT"
|
||||
PropertyChanges {
|
||||
target: content
|
||||
implicitWidth: 10
|
||||
scale: 0.75
|
||||
}
|
||||
}
|
||||
]
|
||||
height: 15
|
||||
Rectangle {
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
radius: 2.5
|
||||
color: {
|
||||
if (HyprlandHelpers.getHyprlandWorkspaceById(index + 1) != null) {
|
||||
if (HyprlandHelpers.getHyprlandWorkspaceById(index + 1).focused) {
|
||||
return Colors.primaryText;
|
||||
}
|
||||
return Colors.textSecondary;
|
||||
} else {
|
||||
return Colors.textDisabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
/nix/store/ynim9hhkc1smj1h2plrw3ap978dlm3qj-home-manager-files/.config/quickshell/main
|
||||
@@ -1,11 +0,0 @@
|
||||
// @ pragma UseQApplication
|
||||
//@ pragma Env QS_NO_RELOAD_POPUP=0
|
||||
//@ pragma Env QT_QUICK_CONTROLS_STYLE=Basic
|
||||
//@ pragma Env QT_QUICK_FLICKABLE_WHEEL_DECELERATION=10000
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
|
||||
Scope {
|
||||
Bar {}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
// an expression can be broken across multiple lines using {}
|
||||
readonly property string time: {
|
||||
// The passed format string matches the default output of
|
||||
// the `date` command.
|
||||
Qt.formatDateTime(clock.date, "ddd MMM d hh:mm:ss AP t yyyy");
|
||||
}
|
||||
|
||||
SystemClock {
|
||||
id: clock
|
||||
precision: SystemClock.Seconds
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
raspberry-pi-nix.url = "github:cmyk/raspberry-pi-nix";
|
||||
nixos-raspberrypi.url = "github:nvmd/nixos-raspberrypi/main";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
};
|
||||
modules.raspberry-pi = {
|
||||
provides = {
|
||||
"5" = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.raspberry-pi-5
|
||||
];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages;
|
||||
boot.kernel.sysctl."vm.mmap_rnd_bits" = pkgs.lib.mkForce 16;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
libraspberrypi
|
||||
];
|
||||
|
||||
boot.supportedFilesystems.zfs = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
doloro-hashed_password: ENC[AES256_GCM,data:RYB/bSNTz1TeGucdFHrxxhOqvqQYvQS3lm44I1Lf3LIEVMXL5s41zxIw0S+JVdlq8I3oHDY4C3o5V4lu+8qAWMyIZYp/6Xp4cw==,iv:yOuKk95skNZ5z805vtoJwvyOdsh08BuyBSgXN+M4Ybo=,tag:QAFhUYuqHT6Spw/l4feY4g==,type:str]
|
||||
root-hashed_password: ENC[AES256_GCM,data:vzVtz1Ht4XD+omdKjU/Zvoaftq8jKE4kxOjAGZTvoYI07hjItR2TSsYrLw0lwsxyJosfoyF3bVsZSFCuuN7njdchGMSSujZJhg==,iv:0av3n4fcGOHYQB4zidt/qn+blBSiDQ29LN15sVufLLs=,tag:nKKVDbCGxB7wDrMPAyJOaw==,type:str]
|
||||
wakatime-scug-io-api-key: ENC[AES256_GCM,data:XQUccNW4210U8ZpHSGVcsdbAirzyTvmcy4y6emk7n4N6MO/W,iv:9/f9ceLshA7l8hJB+IDIPvEwYwSkFlPOLmpvtYXLTpU=,tag:x7hESZCouzYVNef2C+iCSA==,type:str]
|
||||
meow: ENC[AES256_GCM,data:JVzenw==,iv:oCOo9//r5s2K4pSeH5UNEj0LL+9h2yq0G0DPOfwjmyQ=,tag:0gu9FNOrjQ8fpB+B+RbGSg==,type:str]
|
||||
meoww: ENC[AES256_GCM,data:WPeszDfMWxY=,iv:JJMOror5wj7cTNKfrUj2LDXlO3WCKzb7jk4AeZ0oD+Q=,tag:qs3oyM7K1FGy5cXvS6OHpQ==,type:str]
|
||||
scug-io-ai-key: ENC[AES256_GCM,data:b2AT2+A5eoGa1eZsCYKDFg449sOgffDcQA==,iv:NDIS3x1unq6/UtjtsyBTHx5v12utagDA3BbNzs5v3L0=,tag:MhbJGATIDWyOZUqXqRAeVA==,type:str]
|
||||
opencode-go-zen-key: ENC[AES256_GCM,data:fwgV/QK+4tpizC6J3evbGxD57BQCWn5Eyex7iIeNYCQHk6ZD8eTukqhUbLcfXyO4RQot3B1B2xbQVVBsuOWWcQYQKA==,iv:aKwQM8d0gP+MyuqWFk2VfOWDgKPcE/HAvL0I0r6o1nU=,tag:/AeSgscy0mxUMwoP8LaCXg==,type:str]
|
||||
commandcode-key: ENC[AES256_GCM,data:LJBlDoYslglFOpJnySLdPx5sEv67wR/EzJahQh6rvMyCrSCLjqH8oErynYCaGjbAh5Rh+rKxp9vmnv03rxQiL114gxBipqUmzrr9lSUfesyZ2krhljFf6WFen2Q=,iv:IAP72IShIZoJEVdppGSl3/J5BO9GemPVHbHYjZck9+w=,tag:j1GpvC7981wKxPIZaLKyzA==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBvaG1YSUF0UUFmV0QzbFA1
|
||||
RnhlRVNWQ3h6R0xMcmIvM0EzNGJleUxSTTJzCi81QWpMdXJxQWYreE9DUnJGeHF6
|
||||
SUI1d2wxY016dHhxSHdsL3NXUUt2SncKLS0tIENjMkJERFlMMEU0TVFFM1lubUtF
|
||||
OTlaSlRPTUt5d3NjNVF4NFJaMkJsUUEKvjnPwfODT5D8pWp8lrksyfvpC822xZ0h
|
||||
GV4pwteQG/iIRDa71ScR8yolFaI6gZb8BMu93fdd130OHw1ySMGr0A==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age1ykcy2r4kk729e7adqxu8s24ujc60z5eux7ma0ca4ruzydwgm5p6qmdp838
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBkeHkyektGNEpEdzhySERs
|
||||
VW1PVzgvUjZWbG5sbG8zTllvMWVzV0w4M2lrCnJHd3lqYXRDNEhBa2pRUmJCTXg3
|
||||
Z3RTaXhuczV6QjV3MkV0RVFURlgxOHcKLS0tIHFKajZlMk84eGk3d05xVTR2ZzN0
|
||||
ajRQeW16ZzJZb1NhSVBwZlVtRGs0KzQKJfdPbIftdtckf5m4Tom+eiVhh888Y3Am
|
||||
wDG0eui4p+fueF3Eirpwlei+KxMFlaXdpIBrnKL+Ep9lQtuF/Jh7Dg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age1e6vws55p0g23qzthm4qa93hpt6lqmck6670gkygph0sc0j7my4uq5wqjfh
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlZXJjNW54V1MwR1k3V3By
|
||||
bUdIRFdBclJyVVdMVE1ucHNtcnBkTWpsNlUwCnJMUU8vd3Q5aHc4RU5NRzZpQnZQ
|
||||
dTBIS2U5R09LQkFJZ1VkNHdtNnJaQ3cKLS0tIGcrKzNkS25BWGYzZUgzQTVUUzJo
|
||||
a0d1Sm54enlZMEV3dXQzb1o5WlRwZlkKvLmWcazC7TYVJsozaxTnWv5xMLOuXYHf
|
||||
pU2KWjd6RRzoDKW/uizeTmXQzkYRWrrWW4PCXmOpK9XZt4iTJfuTqQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age1x3lahhkefkap67cdmdjcqaxan9hp62er78akr79v9m73nvgugpeqk0y32a
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBsQ2hIdGc3eWorLzByV1RO
|
||||
VVlzd0ZMUWVPMU4xWThsOUFtRkp6b1ZjQndZCkJJT2ZoZWxad0xzN2R3MnlDZlUw
|
||||
NzRyUVllZ092RUhLUzZ6cHY4b3c0ZXcKLS0tIC9JN211V01TWG5VcjVOQ2Nuc3Na
|
||||
c1NOaTg3ZVpRc0Q2TWV0djZqRFp1aE0KHDr4n+nbkRUKKdVgOm9+KU00hvLxR9Vs
|
||||
2HwTIJEftEWZotf+0cuuEM6SBOpvitUeGC+ZsAoLg8upyFi0ewxqsg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age1exzngtk4d9vcsmcq6ap5xx3ca9qacqjkrv86ymged7msx9z6vfyqsf5sjq
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB5aWFUSmJQamdEOVcvRXlY
|
||||
R2ZMYS9qM0Zna09ScjVCVWNHaUJTNVRuL1RrCmJyT1BzMEJkZkRLcHJGT3JmMXRx
|
||||
azFWSHlBUStyV0tiNjllQm1nQVMxSTQKLS0tIFFYQlZOV3poTk9ZSThsVzBZVDdI
|
||||
MWZ2TDZXR2IrQXV1a3BlQ3FoUGkwSHMKc5Br5nIbPTX9DjT/qJA14R6JfGbks0s7
|
||||
lIZUvIflvKYYPRcpReijwmfPMAJFK9S0fRucDDW90APO1gYh7bJ4PA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age1fw4xnh2q52juce94ffn54js708cr6umfwpv0mykuddkea7kr4f0q7a9h05
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBhWUprMUlDaVdCMXVIVnIx
|
||||
Qk9WMWlWeDNRd0dQVWNUdjR0VC9vUXlBbVRRCldBZWtOcEdua0oyOG8vaGg2SVJK
|
||||
VWdJbzl3SHZDTmhTTVRwc09Jd2t0UFkKLS0tIFlhcUhyeEcwNDV3elE2K1VWWjlJ
|
||||
VHVyR1ZxUVFFNHRLU0FBQjI0WU9taU0KhBXUKdgr/gvMtIxJshXRmSyV3zua9Po4
|
||||
ucj3AsLEsicoUm0qypvbbxLaOgk3VVZ5ZVQzTGVbH7beDiIbCxCoHg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age15mxdhlvk7zxtqlw06cu29zdzk9jxjfgvx9s335wxyyk5r7wr9pvqv9894t
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwcnFnMWVhamFiYmlraFpp
|
||||
eXcyS3ZQRjk0T3gzZHhuaUNDeE5PeW54aDE0Ci9yaFFKT0FxNUpSUXNIazNCQWZC
|
||||
VStpc0NZWlZLM2drUDUrU0hvZXZURjQKLS0tIGJMKzdpSXdJaTA2RkdRbndMWVVy
|
||||
bTVGSlFGczFpUHRoZ0Fnbkk5dTV1QzgKSuLf3KdRBsTPDDcqd2+rGU3y3lrCjEKO
|
||||
eIMjTcvJO4GhmDIwNfvI/j2+2qPLMEkyfR6eTXXCB4YDibaUndN/9Q==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age129rxje3pr8w5ulgszgmt98kt4kr06kdwhsg9js78sjte878ngf5qealch2
|
||||
lastmodified: "2026-08-30T23:52:17Z"
|
||||
mac: ENC[AES256_GCM,data:SJJtGZ842iStZ2RFIeEGLhHnrwOp6f6mDS5T80ldxmS2aD/o+3k6TlGKHuUM302+Gflksb7dwSdj0VUFhV6HIalYUO9exo2b37AEwACDt8HKs5QF1ruJ8/vz5vW9EpOvFH2wpGKSbczpc9RDsn8AVUo26G06SubUDWLk3fjCRl8=,iv:9DrnXEsgwC9ZSJJ6f5AZN9fjzeRGXqA5ZpBB0SQhiLo=,tag:MOpn7wbn845NwKkYTXRzYg==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.13.3
|
||||
@@ -1,71 +0,0 @@
|
||||
namedotcom_api__key: fbf0bc2133da020b64bbe9c884f616afe59dfdf7
|
||||
test: test
|
||||
sops:
|
||||
age:
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUTzdydzQraXExRzJueUtn
|
||||
dDZGdXJoR090cjRUZXlRMk5kaDlUOU1lWUU0Clh1aDBDYkxZMTRBakJsNFJ1K2VT
|
||||
L1RLNHNaNDAxSW1xR01nTWZsRm01cFUKLS0tIEVuVUFzZmR6SmVrSytoaFl5eTBW
|
||||
VE50c0dCRGVuNS9MbmptUTVYSkFLbTgKh4ZsKbDK3TcIYqoeWEB87W7sJhKGnmnJ
|
||||
ffIASIUv8YpJAoonspPMl0e2yjmRb1HpxM53JTOwbM5rRzia89VRow==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age1ykcy2r4kk729e7adqxu8s24ujc60z5eux7ma0ca4ruzydwgm5p6qmdp838
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWM2FPdFRvUTU2cU1Vd0pP
|
||||
SXNpZkhyVUkrM1htK0dpRGxvb1FKUXBWTUVnClNPNGtYclJDNURieEpIS2pIYzBt
|
||||
YVNvMmdnTXViVHNrNGNHRmpndlNBQ3cKLS0tIHJxZWp2OFEyUS9aRVhLVk5XMzlP
|
||||
OS83eXdZWnBhNzhSeU5UWEMwKzJBc2MKRRq9CHKpP91fZNMDGEVmZFss5s9D3LIs
|
||||
r8BgdSqg5MACnFSCTa6l6oYXq8JnMeg01K46vyauSb6jDMOJ2yGVZQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age1e6vws55p0g23qzthm4qa93hpt6lqmck6670gkygph0sc0j7my4uq5wqjfh
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBMcEF1NWNrU2pTcHlPQVhG
|
||||
dnZzbUZxVG0rVXBhMCtqSElWaTBGb2txalcwCllITmlKdnhrYnFWTU4vTExOTldW
|
||||
Z0Y4c25reUZNLzc0dzY3aVAwejNiajQKLS0tIFgzOXd4T3pxZ0JVZDJOQzA1ekJz
|
||||
eE5zNXRwYjQ1R1NDOHA3SWhtVHVJWG8KY6XA08Ow+bhc5k+LmumzCqVWZ5G70Spj
|
||||
+I5PrnlLg+9IPUm6ht8uE/+GdaOqjjgOHChTb8zTD7Cxv8Ymm68ydg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age1x3lahhkefkap67cdmdjcqaxan9hp62er78akr79v9m73nvgugpeqk0y32a
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBFRkM2VExXREptVW1BQlZG
|
||||
ZW92ekZRZ3lKdmEyMnc0dFA1QXp1SFdpcUVBCi9qbzNFRUFoTmxYQnFPNXdibm1n
|
||||
OVAvNUhrWm83aGhWUXVtV050VHlVT2MKLS0tIEZPRDBwd05XL0hQcGE0WkMweHFh
|
||||
Z3g0T1pZWW4yYXlPVVdQMDBJU1ozU0EKhV/d5gYZuBo/xmVB3Ce6CVG45GHeiJZQ
|
||||
Z8HfKMcBD8DoWjodruuZzGotwotDLXzFLL+NW4BExh4PF+Enqr1dUQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age1exzngtk4d9vcsmcq6ap5xx3ca9qacqjkrv86ymged7msx9z6vfyqsf5sjq
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIS3A4QiszRmlVMzdhK0E1
|
||||
dkdCVThrYlpRbG9OVUJySDcrTmFlVXRWZW5ZCk14Rlp4VW1JdlhmZk9POUc4WjhD
|
||||
SXZwdlJKRjFwS2ttRis3WEFmT3dTZVkKLS0tIDZTOHd0RzNmekE2ODRMcy9sV0Zo
|
||||
QzVTOTU5bGVCR0N4YXJEcVZWL2N4S0UKf/JY8ue8QiBC5BPxO5hArxgES7Us3N4O
|
||||
XLO6+/KrxwemgE8Eubf3J8NUe7cV8sVoxDSrx79LbQkgIq/AdWjfVA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age1fw4xnh2q52juce94ffn54js708cr6umfwpv0mykuddkea7kr4f0q7a9h05
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBNeFY0SDlxR0Y1dW5UUHI0
|
||||
UlByQmlIWUlyWEpwb1ptL0svTllnTkVXbWdzCjhIZ05PMkJpWHZzWnpJMUxRVUdV
|
||||
VkFKTjU4VXFCbTh1cnF3cjlwSTY1dTgKLS0tICtGbnZGSzkzc1RmdTMrd3Z2NHdG
|
||||
MGUxR25naDFJSjdqNUx0QjRmdHh1K3cKGcE1BgLs0c0UtrPcxk/L8WTo6Bd4VMsh
|
||||
uklBQ6vpc6RWNJ32ROXKCekLFSpbsD4qMwfvb4mOG6nXfwPWytnVHA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age15mxdhlvk7zxtqlw06cu29zdzk9jxjfgvx9s335wxyyk5r7wr9pvqv9894t
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBoYWdqK2oyTEdZTGtKV2kr
|
||||
cUlNNjZWUEU3MGlkTzFISGsvR2JrOXdtOHd3ClV2WEtaYVAwbHg4MlkwRjNnei9h
|
||||
NmZ1N3lhUklxd2FSdGdyM3ZRSXRnZDAKLS0tIGhweFdoK1R2N2x1bmQvWXdYek9u
|
||||
L05NZ0piWkdUTUIvdld6a1Y4WVRsRE0K3m8CLO2V2l3DJ7T/EXbqCdYDK/INqmUj
|
||||
Eu9wliqeIOF5Lg3IrmB3WkOafxVw8HAVB+htkwwvD8MYk9/XubbQvw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age129rxje3pr8w5ulgszgmt98kt4kr06kdwhsg9js78sjte878ngf5qealch2
|
||||
encrypted_regex: ^(data|stringData)$
|
||||
lastmodified: "2026-02-14T00:09:32Z"
|
||||
mac: ENC[AES256_GCM,data:nYWQYK5QOA0u3DYGTozSGFMYhx2uMqkAWoqhthgagRFRnKA/j852fVKqRFcwn+fPSQ4e8i4WpcvoM7FVwuFDC+ixNp7xtz16pnswiNS4N/mNEYXfajkon7wIoUYNtrHahUeYlAnID0vYSQFA3XKgV7ZDD9b4V8X5N+yMlVXex4c=,iv:IW7276v0nnmFBe9Z7HIn6Tl9vX4sDoqWdDfJ1uwKoAY=,tag:YC8OiTcoL+nYV4x8rkivbg==,type:str]
|
||||
version: 3.11.0
|
||||
@@ -1,24 +0,0 @@
|
||||
{ inputs, modules, ... }:
|
||||
{
|
||||
modules.sops.provides.server = {
|
||||
nixos =
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
sops = {
|
||||
# age.keyFile = "/etc/ssh/ssh_host_ed25519_key";
|
||||
defaultSopsFile = ./server.yaml;
|
||||
secrets = {
|
||||
root-hashed_password = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
doloro-hashed_password = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
{ inputs, modules, ... }:
|
||||
{
|
||||
#
|
||||
flake-file.inputs = {
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
modules.sops = {
|
||||
homeManager =
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
nixpkgs.overlays = [
|
||||
# Sops's go version went EOL, https://github.com/Mic92/sops-nix/issues/983
|
||||
(final: prev: {
|
||||
buildGo125Module = prev.buildGoModule;
|
||||
})
|
||||
];
|
||||
sops = {
|
||||
age.keyFile = "/home/doloro/.config/sops/age/keys.txt"; # must have no password!
|
||||
# I HATE YOU
|
||||
defaultSopsFile = ./content/secrets.yaml;
|
||||
};
|
||||
};
|
||||
nixos =
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
nixpkgs.overlays = [
|
||||
# Sops's go version went EOL, https://github.com/Mic92/sops-nix/issues/983
|
||||
(final: prev: {
|
||||
buildGo125Module = prev.buildGoModule;
|
||||
})
|
||||
];
|
||||
sops = {
|
||||
# age.keyFile = "/etc/ssh/ssh_host_ed25519_key";
|
||||
defaultSopsFile = ./content/secrets.yaml;
|
||||
secrets = {
|
||||
root-hashed_password = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
doloro-hashed_password = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
...
|
||||
}: {
|
||||
# Basic caddy
|
||||
modules.services.provides.caddy = {
|
||||
nixos = {config, ...}: {
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
email = "doloroo@proton.me";
|
||||
enableReload = true;
|
||||
globalConfig = ''
|
||||
acme_ca https://acme-v02.api.letsencrypt.org/directory
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
...
|
||||
}: {
|
||||
# Basic traefik
|
||||
modules.services.provides.ddns = {
|
||||
nixos = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
ddnsImg = pkgs.dockerTools.pullImage {
|
||||
imageName = "qmcgaw/ddns-updater";
|
||||
imageDigest = "sha256:ee16ab4f6203bf9e5b0925d38a0b4ebf2d9f23771f933cfb2f5a2dbd5f9a2f88";
|
||||
finalImageName = "qmcgaw/ddns-updater";
|
||||
finalImageTag = "latest";
|
||||
sha256 = "sha256-dMCHkvoFaORmGwbIM9io4Vc9fq+wBks25k2dmnW7naI=";
|
||||
arch = "arm64";
|
||||
};
|
||||
in {
|
||||
virtualisation.oci-containers.containers = {
|
||||
ddns = {
|
||||
image = "qmcgaw/ddns-updater";
|
||||
imageFile = ddnsImg;
|
||||
volumes = [
|
||||
"/data/ddns:/updater/data"
|
||||
"/etc/localtime:/etc/localtime:ro"
|
||||
];
|
||||
ports = ["0.0.0.0:8125:8000"];
|
||||
# networks = [ "meow" ];
|
||||
};
|
||||
};
|
||||
services.caddy = pkgs.lib.mkIf config.services.caddy.enable {
|
||||
virtualHosts."ddns.h.doloro.co.uk".extraConfig = ''
|
||||
reverse_proxy :8125
|
||||
basic_auth {
|
||||
doloro $2a$14$FH.UkwC0PUsQ7IEV9XLAf.6/11KLsugCbrX/o6dPTx7NBlJWv3aiO
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Basic traefik
|
||||
modules.services.provides.home-assistant = {
|
||||
nixos =
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
homeAssistantImg = pkgs.dockerTools.pullImage {
|
||||
imageName = "homeassistant/home-assistant";
|
||||
imageDigest = "sha256:17441c45ba14560b4ef727ee06aac4d605cf0dc0625fc4f2e043cb2551d72749";
|
||||
finalImageName = "homeassistant/home-assistant";
|
||||
finalImageTag = "latest";
|
||||
sha256 = "sha256-fSQ3luRSFHiWP0qDzsiZsEf/l+wYgyrdicjSayZ61yQ=";
|
||||
arch = "arm64";
|
||||
};
|
||||
in
|
||||
{
|
||||
virtualisation.oci-containers.containers = {
|
||||
home-assistant = {
|
||||
image = "homeassistant/home-assistant";
|
||||
imageFile = homeAssistantImg;
|
||||
volumes = [
|
||||
"/data/homeAssistant:/config"
|
||||
"/run/dbus:/run/dbus:ro"
|
||||
"/etc/localtime:/etc/localtime:ro"
|
||||
];
|
||||
ports = [ "0.0.0.0:8123:8123" ];
|
||||
# networks = [ "meow" ];
|
||||
};
|
||||
};
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [
|
||||
8123
|
||||
];
|
||||
allowedUDPPortRanges = [ ];
|
||||
};
|
||||
services.caddy = pkgs.lib.mkIf config.services.caddy.enable {
|
||||
virtualHosts."ha.h.doloro.co.uk".extraConfig = ''
|
||||
reverse_proxy :8123
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
...
|
||||
}: {
|
||||
# Basic traefik
|
||||
modules.services.provides.docker-registry = {
|
||||
nixos = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
registryImg = pkgs.dockerTools.pullImage {
|
||||
imageName = "registry";
|
||||
imageDigest = "sha256:85347ed2ecde64161c7a4788a4d7d3dcc9d6f86f7be95834022e3c6a423a945a";
|
||||
finalImageName = "registry";
|
||||
finalImageTag = "3";
|
||||
sha256 = "sha256-rLG0q/MVVz52veqZuZs5W0Qke6FugXkx7fMe3QnE3gU";
|
||||
arch = "arm64";
|
||||
};
|
||||
in {
|
||||
virtualisation.oci-containers.containers = {
|
||||
docker-registry = {
|
||||
image = "registry";
|
||||
imageFile = registryImg;
|
||||
volumes = [
|
||||
"/data/dockerRegistry:/var/lib/registry"
|
||||
"/run/dbus:/run/dbus:ro"
|
||||
"/etc/localtime:/etc/localtime:ro"
|
||||
];
|
||||
ports = ["0.0.0.0:5000:5000"];
|
||||
# networks = [ "meow" ];
|
||||
};
|
||||
};
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [
|
||||
5000
|
||||
];
|
||||
allowedUDPPortRanges = [];
|
||||
};
|
||||
services.caddy = pkgs.lib.mkIf config.services.caddy.enable {
|
||||
virtualHosts."https://reg.h.doloro.co.uk".extraConfig = ''
|
||||
reverse_proxy :5000
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
{
|
||||
modules.services.provides.rtmp-to-whip = {
|
||||
nixos =
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
systemd.services.init-rtmp-to-whip-network = {
|
||||
description = "Create rtmp-to-whip docker network";
|
||||
after = [
|
||||
"docker.service"
|
||||
"docker.socket"
|
||||
];
|
||||
requires = [
|
||||
"docker.service"
|
||||
"docker.socket"
|
||||
];
|
||||
before = [
|
||||
"docker-rtmp-to-whip.service"
|
||||
"docker-rtmp-to-whip-frontend.service"
|
||||
];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
${pkgs.docker}/bin/docker network inspect rtmp-to-whip >/dev/null 2>&1 || \
|
||||
${pkgs.docker}/bin/docker network create rtmp-to-whip
|
||||
'';
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
rtmp-to-whip = {
|
||||
image = "reg.h.doloro.co.uk/doloro/rtmp-to-whip:latest-aarch64";
|
||||
ports = [
|
||||
"0.0.0.0:1935:1935"
|
||||
"0.0.0.0:6969:6969/udp"
|
||||
"127.0.0.1:3001:3000"
|
||||
];
|
||||
environment = {
|
||||
PUBLIC_DOMAIN = "stream.h.doloro.co.uk";
|
||||
RTC_PORT = "6969";
|
||||
SIGNUP_CODE = "mreowmreow-pawsatyou";
|
||||
RUST_LOG = "info";
|
||||
};
|
||||
volumes = [
|
||||
"/data/rtmp-to-whip/db:/db"
|
||||
];
|
||||
extraOptions = [ "--network=rtmp-to-whip" ];
|
||||
};
|
||||
|
||||
rtmp-to-whip-frontend = {
|
||||
image = "reg.h.doloro.co.uk/doloro/rtmp-to-whip-frontend:latest-aarch64";
|
||||
ports = [
|
||||
"127.0.0.1:3002:3000"
|
||||
];
|
||||
environment = {
|
||||
VITE_API_URL = "https://stream.h.doloro.co.uk/api";
|
||||
};
|
||||
extraOptions = [ "--network=rtmp-to-whip" ];
|
||||
};
|
||||
|
||||
rtmp-to-whip-watchtower = {
|
||||
image = "ghcr.io/nicholas-fedor/watchtower:latest";
|
||||
volumes = [
|
||||
"/var/run/docker.sock:/var/run/docker.sock"
|
||||
];
|
||||
environment = {
|
||||
WATCHTOWER_CLEANUP = "true";
|
||||
WATCHTOWER_POLL_INTERVAL = "300";
|
||||
};
|
||||
cmd = [
|
||||
"rtmp-to-whip"
|
||||
"rtmp-to-whip-frontend"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 1935 ];
|
||||
allowedUDPPorts = [ 6969 ];
|
||||
};
|
||||
|
||||
services.caddy = pkgs.lib.mkIf config.services.caddy.enable {
|
||||
virtualHosts."stream.h.doloro.co.uk".extraConfig = ''
|
||||
handle /api* {
|
||||
reverse_proxy :3001
|
||||
}
|
||||
handle {
|
||||
reverse_proxy :3002
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Basic traefik
|
||||
modules.services.provides.traefik = {
|
||||
nixos =
|
||||
{ config, ... }:
|
||||
{
|
||||
services.traefik = {
|
||||
enable = true;
|
||||
|
||||
staticConfigOptions = {
|
||||
entryPoints = {
|
||||
web = {
|
||||
address = ":80";
|
||||
http.redirections.entrypoint = {
|
||||
to = "websecure";
|
||||
scheme = "https";
|
||||
};
|
||||
asDefault = true;
|
||||
};
|
||||
websecure = {
|
||||
address = ":443";
|
||||
asDefault = true;
|
||||
http.tls.certResolver = "letsencrypt";
|
||||
};
|
||||
traefik = {
|
||||
address = ":8080";
|
||||
};
|
||||
};
|
||||
certificatesResolvers.letsencrypt.acme = {
|
||||
email = "doloroo@proton.me";
|
||||
storage = "${config.services.traefik.dataDir}/acme.json";
|
||||
httpChallenge.entryPoint = "web";
|
||||
};
|
||||
providers = {
|
||||
docker = {
|
||||
};
|
||||
};
|
||||
api.dashboard = true;
|
||||
api.insecure = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
|
||||
};
|
||||
modules.spotify = {
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.system};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# Example for NixOS
|
||||
inputs.spicetify-nix.homeManagerModules.spicetify
|
||||
];
|
||||
programs.spicetify = {
|
||||
enable = true;
|
||||
enabledExtensions = with spicePkgs.extensions; [
|
||||
adblockify
|
||||
hidePodcasts
|
||||
shuffle # shuffle+ (special characters are sanitized out of extension names)
|
||||
];
|
||||
theme = spicePkgs.themes.onepunch;
|
||||
colorScheme = "dark";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.ssh = {
|
||||
homeManager =
|
||||
{ home, ... }:
|
||||
{
|
||||
programs = {
|
||||
ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
settings = {
|
||||
"*" = {
|
||||
AddKeysToAgent = "yes";
|
||||
IdentityFile = [
|
||||
"~/.ssh/id_ed25519"
|
||||
"~/.ssh/id_gitea_scug"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
flake-file.inputs = {
|
||||
stylix = {
|
||||
url = "github:nix-community/stylix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
modules.stylix = {
|
||||
homeManager = {pkgs, ...}: {
|
||||
imports = [inputs.stylix.homeModules.stylix];
|
||||
# gtk.gtk4.theme = null;
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = false;
|
||||
targets.gtk.enable = true;
|
||||
targets.qt.enable = true;
|
||||
targets.tmux.enable = false;
|
||||
fonts = {
|
||||
monospace = {
|
||||
name = "CaskaydiaCove Nerd Font Mono";
|
||||
package = pkgs.nerd-fonts.caskaydia-cove;
|
||||
};
|
||||
};
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
|
||||
};
|
||||
};
|
||||
nixos = {pkgs, ...}: {
|
||||
imports = [inputs.stylix.nixosModules.stylix];
|
||||
stylix.enable = false;
|
||||
stylix.autoEnable = false;
|
||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
x1e-kernel.url = "git+ssh://git@git.scug.io:/nikkuss/x1e-staging.git?ref=staging";
|
||||
x1e-kernel.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
modules.surface-patches = {
|
||||
nixos =
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
imports = with inputs; [
|
||||
x1e-kernel.nixosModules.default
|
||||
];
|
||||
|
||||
# x1e.model = "15"; # "13" (default) or "15" — selects the correct DTB
|
||||
# x1e.cpuParking = false; # loads cpu_parking at boot
|
||||
# x1e.ecReboot = true; # loads ec_reboot at boot, exposes /sys/kernel/ec_reboot/reboot
|
||||
x1e = {
|
||||
model = "15";
|
||||
cpuParking = false;
|
||||
ecReboot = true;
|
||||
el2 = {
|
||||
debugTools = false;
|
||||
enable = false;
|
||||
};
|
||||
iso = {
|
||||
enable = true;
|
||||
modules = [ ];
|
||||
};
|
||||
msm = {
|
||||
extraPatches = [ ];
|
||||
};
|
||||
pmSdamTrace = {
|
||||
enable = true;
|
||||
};
|
||||
psr = {
|
||||
enable = false;
|
||||
};
|
||||
ramoops = {
|
||||
enable = false;
|
||||
};
|
||||
spiHid = {
|
||||
# drivers = [ "legacy" ];
|
||||
legacy = {
|
||||
enable = false;
|
||||
};
|
||||
v4 = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
ssamPmNotifier = {
|
||||
enable = false;
|
||||
};
|
||||
ssamRequestTimeout = {
|
||||
enable = true;
|
||||
};
|
||||
touchscreen = {
|
||||
enable = true;
|
||||
};
|
||||
systemIdleState = {
|
||||
enable = true;
|
||||
};
|
||||
video = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Prevent reboot hang - qcom_smd_qrtr workers stuck in D-state
|
||||
systemd.settings.Manager.DefaultTimeoutStopSec = "15s";
|
||||
systemd.settings.Manager.DefaultDeviceTimeoutSec = "15s";
|
||||
|
||||
# Hardware watchdog (SBSA Generic Watchdog) as safety net
|
||||
systemd.settings.Manager = {
|
||||
KExecWatchdogSec = "30s";
|
||||
RebootWatchdogSec = "30s";
|
||||
RuntimeWatchdogSec = "30s";
|
||||
};
|
||||
|
||||
# Override udevd stop timeout (D-state workers can't be killed)
|
||||
systemd.services.systemd-udevd.serviceConfig.TimeoutStopSec = lib.mkForce "10s";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{ modules, inputs, ... }:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
iptsd.url = "git+ssh://git@git.scug.io:/nikkuss/iptsd-rs.git?ref=main";
|
||||
iptsd.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
modules.surface-touchpad = {
|
||||
nixos = {
|
||||
imports = [ inputs.iptsd.nixosModules.default ];
|
||||
config.services.iptsd-rs.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
{ modules, ... }:
|
||||
{
|
||||
modules.tmux = {
|
||||
homeManager =
|
||||
{
|
||||
home,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
sensible
|
||||
minimal-tmux-status
|
||||
];
|
||||
extraConfig = ''
|
||||
set-option -g default-terminal "tmux-256color"
|
||||
set -as terminal-features ",xterm-256color:RGB"
|
||||
set -g status-bg black
|
||||
set -g status-fg white
|
||||
set -g mouse on
|
||||
set -g extended-keys on
|
||||
set -g allow-passthrough on
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.tuigreet = {
|
||||
nixos =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.tuigreet}/bin/tuigreet --sessions ${config.services.displayManager.sessionData.desktops}/share/xsessions:${config.services.displayManager.sessionData.desktops}/share/wayland-sessions --remember --remember-user-session --greeting 'meow meow meow' --time";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.services.greetd.serviceConfig = {
|
||||
Type = "idle";
|
||||
StandardInput = "tty";
|
||||
StandardOutput = "tty";
|
||||
StandardError = "journal"; # Without this errors will spam on screen
|
||||
# Without these bootlogs will spam on screen
|
||||
TTYReset = true;
|
||||
TTYVHangup = true;
|
||||
TTYVTDisallocate = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{modules, ...}: {
|
||||
modules.unity = {
|
||||
homeManager = {pkgs, ...}: {
|
||||
home.packages = [pkgs.unityhub pkgs.alcom pkgs.unityhub.fhsEnv];
|
||||
home.file."unityExec" = {
|
||||
source = "${pkgs.unityhub}/bin/unityhub";
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user