Compare commits
183 Commits
d4624bd695
...
dendritic
| Author | SHA1 | Date | |
|---|---|---|---|
| 25c6507c3e | |||
| b33c816191 | |||
| f2c68c8511 | |||
| 06848de32a | |||
| 29413b1f67 | |||
| bfeeacc434 | |||
| 749ee86763 | |||
| e56b948f91 | |||
| c0da93fe55 | |||
| 9b931a6284 | |||
| f16c1137f9 | |||
| eb7217973d | |||
| d9bbfff120 | |||
| 21fe0c40e9 | |||
| 7be2e897d4 | |||
| deddffad50 | |||
| 00f6800290 | |||
| 56aed1cf2d | |||
| 88266b040f | |||
| 5f7fc8ea05 | |||
| 3a634375a0 | |||
| 7a3d2fee77 | |||
| d4db1e7f09 | |||
| 33702f4552 | |||
| 4d9e050344 | |||
| a938343f87 | |||
| 637e665581 | |||
| 0d35a34e9b | |||
| 9104f3b5af | |||
| bbc74a9614 | |||
| bd5fdfb8f3 | |||
| 458ff46192 | |||
| 44b51bf454 | |||
| 9d20805a2b | |||
| fb74703c0d | |||
| f5664dd863 | |||
| 0920cf080d | |||
| 0c8cd3dd3d | |||
| 3601a4a53a | |||
| a865a34754 | |||
| f41b716d95 | |||
| 72a91337ee | |||
| 1910db8bd2 | |||
| 599f44a5a9 | |||
| 896db79184 | |||
| e77cb49ffc | |||
| 1a70f20213 | |||
| 921edd90e3 | |||
| 1ffd4c02f4 | |||
| 12776bf609 | |||
| 0b58bfecfc | |||
| cc1d60ce13 | |||
| 904b387fa7 | |||
| 460c6daf76 | |||
| 7455cc5c0f | |||
| 19c22f9386 | |||
| b0f1bc9ee0 | |||
| 9dab291884 | |||
| 5c9c915457 | |||
| 839e1fd5f5 | |||
| 7aa01ae0dd | |||
| 7e788e5c8e | |||
| 11133b4bb0 | |||
| 2d158c556f | |||
| 40862064c9 | |||
| 651bd62c00 | |||
| b149325e23 | |||
| a67e855aca | |||
| b615ba2ff1 | |||
| c8a12d7988 | |||
| 0e57b9d04e | |||
| 1972d8ec31 | |||
| 4a2730ed44 | |||
| a3ad40702b | |||
| 624d204412 | |||
| 47296ec554 | |||
| c1ce520858 | |||
| f9b5c03e87 | |||
| 86188bc3d8 | |||
| ee4ce13a10 | |||
| d18e1476dd | |||
| dd8369d01e | |||
| f9ab6fa233 | |||
| 47228d878c | |||
| 80627250ec | |||
| 3a5d414b43 | |||
| 52e9f0a94c | |||
| d61fb98c9f | |||
| 02b09173b8 | |||
| a47e0d751a | |||
| da03a794a4 | |||
| 275a32523a | |||
| 22627b61ec | |||
| 901ce4f01f | |||
| 9651e02cbe | |||
| a440aab9f1 | |||
| b8ac7247a5 | |||
| 196170c8df | |||
| 17c9f87218 | |||
| 246745f2f7 | |||
| 60a5ef23ec | |||
| 2d4df68db4 | |||
| 5cc1835f21 | |||
| 59d2a8acfb | |||
| 3bb63059fa | |||
| 1e9783a97d | |||
| 1f9820e7b7 | |||
| 32db47b96a | |||
| bdca2fdc0f | |||
| 0ba9ee4bad | |||
| c5166d8c07 | |||
| bdb76684d9 | |||
| 05b0864145 | |||
| 2d9e205897 | |||
| 7e753132ea | |||
| 5d7739d0f6 | |||
| 0f1b783aa3 | |||
| b4e0d9f475 | |||
| 59575477d5 | |||
| f3e93f9ae7 | |||
| a02f96f6ca | |||
| d28858fb45 | |||
| 06d93d6e4f | |||
| cc155d4252 | |||
| 75f0e2993f | |||
| 36f5d5cdd7 | |||
| 0630db91fb | |||
| 13119c8f7b | |||
| b4350f2dae | |||
| 3609e42d8f | |||
| 8b04d1763e | |||
| 4fd7db083b | |||
| 3644a0f265 | |||
| f08555296c | |||
| 44404e02a0 | |||
| 65e5fd2d99 | |||
| ddb1d3c8d2 | |||
| e7b1f5acaf | |||
| 8f97b6ff34 | |||
| 2a0fbdcd16 | |||
| 7c74a61821 | |||
| 1862996855 | |||
| f7058034fe | |||
| f49745b4e4 | |||
| 1a656d3231 | |||
| c0993eb22f | |||
| e252ee0613 | |||
| 783a29e700 | |||
| 134914f561 | |||
| 2f7142135f | |||
| 38f6ec8305 | |||
| 3dadc29a37 | |||
| 48535bb6d4 | |||
| 087a924e5a | |||
| 2e7541e5c3 | |||
| 0c2d3329cb | |||
| 80f5b4a8f2 | |||
| 4f14a61b6b | |||
| ae3dbafe8b | |||
| 63862ae5d9 | |||
| fea8fde271 | |||
| cba857e830 | |||
| 2e7fa85c5a | |||
| deb946154f | |||
| 27285a33e2 | |||
| 454977900e | |||
| 8ca322be98 | |||
| 96452d4a90 | |||
| 74fe377b0c | |||
| 8118984fac | |||
| 911930bcc3 | |||
| f3d247f8ca | |||
| 2dff283566 | |||
| 5d02f49c43 | |||
| 3be9cbe622 | |||
| 94f0e793d7 | |||
| 72221d9157 | |||
| f117c77624 | |||
| 8553a02ca6 | |||
| e3650d5adb | |||
| cd9716a7f2 | |||
| 37e89dbe28 | |||
| f9adbedd20 |
7
.gitignore
vendored
@@ -1 +1,8 @@
|
|||||||
.session
|
.session
|
||||||
|
/nixos.qcow2
|
||||||
|
/result
|
||||||
|
/HACKSTATION.qcow2
|
||||||
|
/result-man
|
||||||
|
.gitsecret/keys/random_seed
|
||||||
|
!*.secret
|
||||||
|
modules/features/gotify-desktop/gotify-key
|
||||||
|
|||||||
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "modules/features/nvim/config"]
|
||||||
|
path = modules/features/nvim/config
|
||||||
|
url = https://git.voidarc.co.uk/voidarc/nvim
|
||||||
BIN
.gitsecret/keys/pubring.kbx
Normal file
BIN
.gitsecret/keys/pubring.kbx~
Normal file
BIN
.gitsecret/keys/trustdb.gpg
Normal file
1
.gitsecret/paths/mapping.cfg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
modules/features/gotify-desktop/gotify-key:f6129ad401b60d5a491d582169088600bb58a537d232b93c22923aede129d5cc
|
||||||
74
README.md
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
# The Void
|
||||||
|
*An opinionated dendritic nix configuration*
|
||||||
|
|
||||||
|
## The Concept
|
||||||
|
|
||||||
|
I have been trying to get consistent, across device experiences from the second that I
|
||||||
|
started using linux. I tried my best with arch, but I foolishly believed that just remembering
|
||||||
|
what packages I installed would be enough. Then I started managing my dotfiles with GNU stow,
|
||||||
|
but that only allowed for a single host per repo. I moved over to doot, and simultaneously nixos.
|
||||||
|
|
||||||
|
I believed a dotfiles manager was my endgame. The final evolution, but it was far from ideal. I had to
|
||||||
|
manage a mess of dotfiles, submodules and nix packages that were completely uncoupled from the apps that
|
||||||
|
used them. Hyprland just assumed that I had all of my apps installed, assumed that otter-launcher's
|
||||||
|
config existed. Just by forgetting an app or a toml file, I had the potential to brick my entire setup.
|
||||||
|
|
||||||
|
This is no longer the case.
|
||||||
|
|
||||||
|
The solution is similar to that of safely typed languages, like rust. Rust, instead of having optional parameters
|
||||||
|
like typescript, requires that a variable be passed to a function, regardless of whether it contains anything.
|
||||||
|
This leads to what is essentially a fixed dependancy tree, where there are no points of failiure, only allowing
|
||||||
|
for logic errors and such. The same methodology can be applied to nix, using flake parts and wrapper scripts.
|
||||||
|
|
||||||
|
Instead of defining the packages beside the app, and its config, you can use the config to define the required binaries.
|
||||||
|
By wrapping a config that contains a nix variable, ie a binary, that binary is intrinsically linked to that config,
|
||||||
|
and will therefore always be installed. No more dependancy issues, and because the configs are defined within nix too, no
|
||||||
|
more potential for missing config files. Dotfile managers are no more, long live dotfile managers. Any app with a `--config`
|
||||||
|
flag can now be fully versioned and self contained within one repo, config and all, accessible on any machine with nix.
|
||||||
|
|
||||||
|
One command for a truly reproducible, fully contained, configured system. This is the endgame.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Usage is similar to any other flake, with everything in the module directory being an output.
|
||||||
|
|
||||||
|
The folder structure is simply defined:
|
||||||
|
```
|
||||||
|
modules/
|
||||||
|
|- features/ - all available apps, every subfolder contains a seperate wrapped binary
|
||||||
|
|- attrs/ - attributes composed of other modules, no new features defined
|
||||||
|
|- system/ - basic system modules, no binaries. Should not be run standalone. (Think network and audio config)
|
||||||
|
|- hosts/ - available presets for machines. Output names match subfolder names, eg #HACKSTATION, and hostnames
|
||||||
|
```
|
||||||
|
|
||||||
|
### Nixos Configurations
|
||||||
|
|
||||||
|
Due to the host module referencing `/etc/nixos/hardware-configuration.nix`, so that it is seperated from the repo,
|
||||||
|
all rebuild commands will need `--impure`, unless you copy your configuration into the repo.
|
||||||
|
|
||||||
|
HACKSTATION is the heavier system, mobile02 is minimal and has no specialist hyprland config.
|
||||||
|
|
||||||
|
It is recommended to clone the repo beforehand, but the system can be built directly from remote
|
||||||
|
```bash
|
||||||
|
# Local Clone, . is the directory containing flake.nix
|
||||||
|
sudo nixos-rebuild switch --impure --flake .
|
||||||
|
|
||||||
|
# Build from remote
|
||||||
|
sudo nixos-rebuild switch --impure --flake "git+https://git.voidarc.co.uk/voidarc/nixos.git?ref=dendritic"
|
||||||
|
```
|
||||||
|
Both of these commands can be appended with a desired hostname in order to build that configuration.
|
||||||
|
```bash
|
||||||
|
# Example of building mobile02 from a local repo
|
||||||
|
sudo nixos-rebuild switch --impure --flake .#mobile02
|
||||||
|
```
|
||||||
|
There is no default output, so if the current hostname doesn't match a host, you will get an error.
|
||||||
|
Building this config should be non destructive to any existing dotfiles, but will remove all users (not home directories)
|
||||||
|
from the system other than `user01`, who's default password is `qwer`.
|
||||||
|
|
||||||
|
### Binaries
|
||||||
|
|
||||||
|
Any binary can be run with the same base command (will change when merged to main)
|
||||||
|
```bash
|
||||||
|
nix run "git+https://git.voidarc.co.uk/voidarc/nixos.git?ref=dendritic#appname"
|
||||||
|
```
|
||||||
|
`Appname` can be substituted for the name of any folder in the `modules/features` dir, ie `kitty` or `otter-launcher`
|
||||||
@@ -1,376 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
/etc/nixos/hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Allow Nix command and flakes (ofc)
|
|
||||||
nix.settings = {
|
|
||||||
cores = 6;
|
|
||||||
experimental-features = [
|
|
||||||
"nix-command"
|
|
||||||
"flakes"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs = {
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
packageOverrides = pkgs: {
|
|
||||||
unstable = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") {
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Nix store shit
|
|
||||||
nix.optimise.automatic = true;
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "daily";
|
|
||||||
options = "--delete-older-than 5d";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Boot
|
|
||||||
boot = {
|
|
||||||
loader = {
|
|
||||||
timeout = 2;
|
|
||||||
efi = {
|
|
||||||
canTouchEfiVariables = true;
|
|
||||||
};
|
|
||||||
grub = {
|
|
||||||
efiSupport = true;
|
|
||||||
device = "nodev";
|
|
||||||
theme = pkgs.catppuccin-grub;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
plymouth = {
|
|
||||||
enable = true;
|
|
||||||
theme = "catppuccin-mocha";
|
|
||||||
themePackages = with pkgs; [
|
|
||||||
# By default we would install all themes
|
|
||||||
(catppuccin-plymouth.override {
|
|
||||||
variant = "mocha";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Use latest kernel.
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
networking.networkmanager.dns = "none";
|
|
||||||
networking.nameservers = [
|
|
||||||
"1.1.1.1"
|
|
||||||
"8.8.8.8"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enable bluetooth
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
hardware.xpadneo.enable = true;
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/London";
|
|
||||||
|
|
||||||
# Locale
|
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "en_GB.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "en_GB.UTF-8";
|
|
||||||
LC_MEASUREMENT = "en_GB.UTF-8";
|
|
||||||
LC_MONETARY = "en_GB.UTF-8";
|
|
||||||
LC_NAME = "en_GB.UTF-8";
|
|
||||||
LC_NUMERIC = "en_GB.UTF-8";
|
|
||||||
LC_PAPER = "en_GB.UTF-8";
|
|
||||||
LC_TELEPHONE = "en_GB.UTF-8";
|
|
||||||
LC_TIME = "en_GB.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Windowing Systems
|
|
||||||
services.xserver.enable = true;
|
|
||||||
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
|
||||||
};
|
|
||||||
security.polkit.enable = true;
|
|
||||||
|
|
||||||
# Keymap
|
|
||||||
services.xserver.xkb = {
|
|
||||||
layout = "gb";
|
|
||||||
variant = "";
|
|
||||||
};
|
|
||||||
console.keyMap = "uk";
|
|
||||||
|
|
||||||
# Pipewire
|
|
||||||
services.pulseaudio.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Local User
|
|
||||||
users.users.user01 = {
|
|
||||||
isNormalUser = true;
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
description = "user01";
|
|
||||||
extraGroups = [
|
|
||||||
"input"
|
|
||||||
"root"
|
|
||||||
"plugdev"
|
|
||||||
"bluetooth"
|
|
||||||
"networkmanager"
|
|
||||||
"docker"
|
|
||||||
"wheel"
|
|
||||||
];
|
|
||||||
packages =
|
|
||||||
with pkgs;
|
|
||||||
let
|
|
||||||
input =
|
|
||||||
{
|
|
||||||
package,
|
|
||||||
output ? "default",
|
|
||||||
}:
|
|
||||||
inputs.${package}.packages.${pkgs.stdenv.hostPlatform.system}.${output};
|
|
||||||
wrap =
|
|
||||||
{
|
|
||||||
name,
|
|
||||||
pkg,
|
|
||||||
modules,
|
|
||||||
}:
|
|
||||||
pkgs.symlinkJoin {
|
|
||||||
inherit name;
|
|
||||||
paths = [ pkg ];
|
|
||||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
|
||||||
postBuild = ''
|
|
||||||
wrapProgram $out/bin/${name} \
|
|
||||||
--prefix PATH : ${pkgs.lib.makeBinPath modules}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
[
|
|
||||||
# Ricing
|
|
||||||
bibata-cursors
|
|
||||||
catppuccin-gtk
|
|
||||||
waybar
|
|
||||||
hyprlock
|
|
||||||
cava
|
|
||||||
cmatrix
|
|
||||||
swaynotificationcenter
|
|
||||||
(input {
|
|
||||||
package = "chataigne";
|
|
||||||
output = "chataigne";
|
|
||||||
})
|
|
||||||
wlogout
|
|
||||||
wpaperd
|
|
||||||
kando
|
|
||||||
oh-my-posh
|
|
||||||
grimblast
|
|
||||||
(wrap {
|
|
||||||
name = "otter-launcher";
|
|
||||||
pkg = (
|
|
||||||
input {
|
|
||||||
package = "otter-launcher";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
modules = [
|
|
||||||
chafa
|
|
||||||
wl-clipboard
|
|
||||||
jq
|
|
||||||
];
|
|
||||||
})
|
|
||||||
(input {
|
|
||||||
package = "fsel";
|
|
||||||
})
|
|
||||||
|
|
||||||
# Terminal
|
|
||||||
carapace
|
|
||||||
bat
|
|
||||||
kitty
|
|
||||||
github-cli
|
|
||||||
wl-clipboard
|
|
||||||
p7zip
|
|
||||||
bluetuith
|
|
||||||
wget
|
|
||||||
playerctl
|
|
||||||
git
|
|
||||||
fastfetch
|
|
||||||
zellij
|
|
||||||
lsd
|
|
||||||
(input {
|
|
||||||
package = "doot";
|
|
||||||
})
|
|
||||||
stow
|
|
||||||
fzf
|
|
||||||
ripgrep
|
|
||||||
zsh-autocomplete
|
|
||||||
nodejs
|
|
||||||
lazygit
|
|
||||||
tailscale
|
|
||||||
|
|
||||||
# Thunar stuff
|
|
||||||
xfce.thunar
|
|
||||||
xfce.thunar-volman
|
|
||||||
xfce.thunar-vcs-plugin
|
|
||||||
xfce.thunar-archive-plugin
|
|
||||||
|
|
||||||
# Apps
|
|
||||||
pavucontrol
|
|
||||||
firefox
|
|
||||||
htop
|
|
||||||
input-remapper
|
|
||||||
tor-browser
|
|
||||||
gotify-desktop
|
|
||||||
techmino
|
|
||||||
mpv
|
|
||||||
prismlauncher
|
|
||||||
delfin
|
|
||||||
onlyoffice-desktopeditors
|
|
||||||
syncthing
|
|
||||||
blueman
|
|
||||||
jellyfin-tui
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Zsh
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
enableBashCompletion = true;
|
|
||||||
autosuggestions.enable = true;
|
|
||||||
syntaxHighlighting.enable = true;
|
|
||||||
histSize = 10000;
|
|
||||||
ohMyZsh = {
|
|
||||||
enable = true;
|
|
||||||
plugins = [
|
|
||||||
"git"
|
|
||||||
"dirhistory"
|
|
||||||
"history"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# User programs
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
programs.xfconf.enable = true;
|
|
||||||
|
|
||||||
# User Services
|
|
||||||
services.gvfs.enable = true;
|
|
||||||
services.tailscale.enable = true;
|
|
||||||
services.printing.enable = true;
|
|
||||||
services.upower.enable = true;
|
|
||||||
services.openssh.enable = true;
|
|
||||||
services.avahi.enable = true;
|
|
||||||
|
|
||||||
# Fonts
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
nerd-fonts.fira-mono
|
|
||||||
];
|
|
||||||
|
|
||||||
fonts.fontconfig.defaultFonts.serif = [ "Fira Mono Nerd Font" ];
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
|
|
||||||
inputs.nvim-wrapped.packages.${stdenv.hostPlatform.system}.default
|
|
||||||
# (pkgs.symlinkJoin {
|
|
||||||
# name = "nvim-with-lsp";
|
|
||||||
# paths = [ pkgs.neovim ];
|
|
||||||
# buildInputs = [ pkgs.makeWrapper ];
|
|
||||||
# postBuild = ''
|
|
||||||
# export TREE_SITTER_LIB_PATH="/run/current-system/sw/lib"
|
|
||||||
# wrapProgram $out/bin/nvim \
|
|
||||||
# --prefix PATH : ${
|
|
||||||
# pkgs.lib.makeBinPath [
|
|
||||||
# # lsps
|
|
||||||
# pkgs.lua-language-server
|
|
||||||
# pkgs.vscode-langservers-extracted
|
|
||||||
# pkgs.emmet-ls
|
|
||||||
# pkgs.prettier
|
|
||||||
# pkgs.black
|
|
||||||
# pkgs.nixfmt
|
|
||||||
# pkgs.nil
|
|
||||||
# pkgs.python313Packages.python-lsp-server
|
|
||||||
# pkgs.typescript-language-server
|
|
||||||
# pkgs.tailwindcss-language-server
|
|
||||||
# pkgs.stylua
|
|
||||||
# pkgs.nixd
|
|
||||||
#
|
|
||||||
# # other shit
|
|
||||||
# pkgs.lua5_1
|
|
||||||
# pkgs.tree-sitter
|
|
||||||
# pkgs.ripgrep
|
|
||||||
# pkgs.gcc
|
|
||||||
# pkgs.gnumake
|
|
||||||
# pkgs.imagemagick
|
|
||||||
# pkgs.luajitPackages.magick
|
|
||||||
# pkgs.ghostscript
|
|
||||||
# pkgs.luarocks
|
|
||||||
# (pkgs.texlive.combine {
|
|
||||||
# inherit (pkgs.texlive)
|
|
||||||
# scheme-basic
|
|
||||||
# varwidth
|
|
||||||
# preview
|
|
||||||
# mathtools
|
|
||||||
# amsfonts
|
|
||||||
# amscdx
|
|
||||||
# xcolor
|
|
||||||
# dvisvgm
|
|
||||||
# dvipng # for preview and export as html
|
|
||||||
# wrapfig
|
|
||||||
# standalone
|
|
||||||
# graphicxbox
|
|
||||||
# amsmath
|
|
||||||
# ulem
|
|
||||||
# hyperref
|
|
||||||
# capt-of
|
|
||||||
# ;
|
|
||||||
# })
|
|
||||||
# ]
|
|
||||||
# }
|
|
||||||
# '';
|
|
||||||
# })
|
|
||||||
vim
|
|
||||||
unzip
|
|
||||||
python310 # Its python like come on
|
|
||||||
usbutils
|
|
||||||
|
|
||||||
# Graphics Drivers
|
|
||||||
mesa
|
|
||||||
vulkan-tools
|
|
||||||
|
|
||||||
# FileSystem Dependancies
|
|
||||||
gvfs
|
|
||||||
|
|
||||||
# C copmpiler
|
|
||||||
clang
|
|
||||||
|
|
||||||
# XDG Desktop Portal Etc
|
|
||||||
xdg-desktop-portal
|
|
||||||
xdg-desktop-portal-hyprland
|
|
||||||
|
|
||||||
# Other things (from gnome)
|
|
||||||
glib
|
|
||||||
gnutls
|
|
||||||
appimage-run
|
|
||||||
libnotify
|
|
||||||
gsettings-desktop-schemas
|
|
||||||
];
|
|
||||||
|
|
||||||
# The comment
|
|
||||||
system.stateVersion = "25.05"; # Did you read the comment?
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
networking.hostName = "mobile02"; # Define your hostname.
|
|
||||||
|
|
||||||
# Opengl and vulkan
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
intel-vaapi-driver
|
|
||||||
libva-vdpau-driver
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.displayManager.sddm = {
|
|
||||||
enable = true;
|
|
||||||
theme = "catppuccin-mocha-mauve";
|
|
||||||
package = pkgs.kdePackages.sddm;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
# Catppuccin sddm theme
|
|
||||||
(pkgs.catppuccin-sddm.override {
|
|
||||||
flavor = "mocha";
|
|
||||||
font = "Fira Mono Nerd Font";
|
|
||||||
fontSize = "11";
|
|
||||||
background = null;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
# Local User
|
|
||||||
users.users.user01 = {
|
|
||||||
extraGroups = [ ];
|
|
||||||
packages = with pkgs; [
|
|
||||||
# Ricing
|
|
||||||
inputs.way-edges.packages.${stdenv.hostPlatform.system}.way-edges
|
|
||||||
|
|
||||||
# Terminal
|
|
||||||
light
|
|
||||||
# Apps
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
networking.hostName = "HACKSTATION";
|
|
||||||
|
|
||||||
# Enable nix-ld to run unpatched binaries
|
|
||||||
programs.nix-ld.enable = true;
|
|
||||||
programs.nix-ld.libraries = with pkgs; [
|
|
||||||
stdenv.cc.cc
|
|
||||||
zlib
|
|
||||||
libusb1
|
|
||||||
];
|
|
||||||
|
|
||||||
# Add Samsung USB udev rules
|
|
||||||
services.udev.extraRules = ''
|
|
||||||
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
|
|
||||||
'';
|
|
||||||
|
|
||||||
hardware.amdgpu.initrd.enable = true;
|
|
||||||
|
|
||||||
# Opengl and vulkan
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
libva-vdpau-driver
|
|
||||||
libvdpau-va-gl
|
|
||||||
];
|
|
||||||
enable32Bit = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.amdgpu.opencl.enable = true;
|
|
||||||
|
|
||||||
boot.kernelParams = [
|
|
||||||
"amdgpu.ppfeaturemask=0xffffffff"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Wake on Lan
|
|
||||||
networking.interfaces.enp5s0.wakeOnLan.enable = true;
|
|
||||||
networking.firewall.enable = false;
|
|
||||||
|
|
||||||
systemd.services.NetworkManager-wait-online.enable = false;
|
|
||||||
|
|
||||||
services.displayManager = {
|
|
||||||
autoLogin.enable = true;
|
|
||||||
autoLogin.user = "user01";
|
|
||||||
sddm = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Local User
|
|
||||||
users.users.user01 = {
|
|
||||||
extraGroups = [
|
|
||||||
"adbusers"
|
|
||||||
"docker"
|
|
||||||
];
|
|
||||||
packages = with pkgs; [
|
|
||||||
bottles
|
|
||||||
ferdium
|
|
||||||
android-tools
|
|
||||||
anki
|
|
||||||
vesktop
|
|
||||||
wine64
|
|
||||||
delfin
|
|
||||||
docker
|
|
||||||
orca-slicer
|
|
||||||
exiftool
|
|
||||||
ffmpeg
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
inputs.sls-steam.packages.${pkgs.stdenv.hostPlatform.system}.wrapped
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.steam.override {
|
|
||||||
extraEnv = {
|
|
||||||
LD_AUDIT = "${
|
|
||||||
inputs.sls-steam.packages.${pkgs.stdenv.hostPlatform.system}.sls-steam
|
|
||||||
}/library-inject.so:${
|
|
||||||
inputs.sls-steam.packages.${pkgs.stdenv.hostPlatform.system}.sls-steam
|
|
||||||
}/SLSsteam.so";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.wivrn = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.unstable.wivrn;
|
|
||||||
openFirewall = true;
|
|
||||||
defaultRuntime = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.docker = {
|
|
||||||
enable = true;
|
|
||||||
enableOnBoot = false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
1051
flake.lock
generated
88
flake.nix
@@ -2,59 +2,47 @@
|
|||||||
description = "Master flake for Voidarc nix config";
|
description = "Master flake for Voidarc nix config";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
# System
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||||
|
|
||||||
sls-steam = {
|
# Apps
|
||||||
url = "github:AceSLS/SLSsteam";
|
nvim.url = "git+https://git.voidarc.co.uk/voidarc/nvim";
|
||||||
|
hyprland = {
|
||||||
|
url = "git+https://git.voidarc.co.uk/voidarc/hypr";
|
||||||
|
};
|
||||||
|
otter-launcher = {
|
||||||
|
url = "github:kuokuo123/otter-launcher";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
gotify-desktop = {
|
||||||
|
url = "github:voidarclabs/gotify-desktop";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
sls-steam.url = "github:AceSLS/SLSsteam";
|
||||||
|
davinci.url = "git+https://git.voidarc.co.uk/voidarc/nixos.davinci";
|
||||||
|
quickshell = {
|
||||||
|
url = "git+https://git.voidarc.co.uk/voidarc/quickshell";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
omnisearch = {
|
||||||
|
url = "git+https://git.voidarc.co.uk/voidarc/omnisearch";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
woomer = {
|
||||||
|
url = "github:coffeeispower/woomer";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
wshowkeys.url = "github:voidarclabs/wshowkeys";
|
||||||
|
weylus = {
|
||||||
|
url = "github:voidarclabs/WeylusCommunityEdition";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
# Flake parts
|
||||||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
chataigne.url = "./modules/chataigne";
|
import-tree.url = "github:vic/import-tree";
|
||||||
nvim-wrapped.url = "git+file:///home/user01/.dotfiles/.config/nvim";
|
wrappers.url = "github:BirdeeHub/nix-wrapper-modules";
|
||||||
|
|
||||||
tree-sitter.url = "github:tree-sitter/tree-sitter?ref=8b8199775f96ca8642cf7860da46100875b38453";
|
|
||||||
|
|
||||||
doot.url = "github:voidarclabs/nixos.doot";
|
|
||||||
way-edges.url = "github:way-edges/way-edges";
|
|
||||||
otter-launcher.url = "github:kuokuo123/otter-launcher";
|
|
||||||
fsel.url = "github:Mjoyufull/fsel";
|
|
||||||
|
|
||||||
mesa-davinci.url = "github:nixos/nixpkgs?ref=599ddd2b79331c1e6153e1659bdaab65d62c4c82";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs = inputs: inputs.flake-parts.lib.mkFlake {inherit inputs;} (inputs.import-tree ./modules);
|
||||||
{
|
|
||||||
self,
|
|
||||||
nixpkgs,
|
|
||||||
...
|
|
||||||
}@inputs:
|
|
||||||
let
|
|
||||||
system = "x86_64-linux";
|
|
||||||
|
|
||||||
hardwareConfig = import /etc/nixos/hardware-configuration.nix;
|
|
||||||
common = import ./configs/common.nix;
|
|
||||||
|
|
||||||
mkSystem =
|
|
||||||
extraModules:
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
specialArgs = { inherit inputs; };
|
|
||||||
modules = [
|
|
||||||
common
|
|
||||||
hardwareConfig
|
|
||||||
]
|
|
||||||
++ extraModules;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
nixosConfigurations = {
|
|
||||||
mobile02 = mkSystem [ ./configs/configuration-laptop.nix ];
|
|
||||||
hackstation = mkSystem [
|
|
||||||
./configs/configuration-pc.nix
|
|
||||||
./modules/davinci/davinci.nix
|
|
||||||
./modules/i3/i3.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
18
modules/attrs/bottles/default.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.bottles = moduleWithSystem ({pkgs, ...}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
(bottles.override {
|
||||||
|
removeWarningPopup = true;
|
||||||
|
})
|
||||||
|
wineWow64Packages.stable
|
||||||
|
winetricks
|
||||||
|
wine
|
||||||
|
wine64
|
||||||
|
freetype
|
||||||
|
];
|
||||||
|
});
|
||||||
|
}
|
||||||
19
modules/attrs/development/default.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.development = moduleWithSystem ({pkgs, ...}: let
|
||||||
|
modules = with self.nixosModules; [
|
||||||
|
git
|
||||||
|
nvim
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
imports = modules;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
opencode
|
||||||
|
devenv
|
||||||
|
jellyfin-tui
|
||||||
|
];
|
||||||
|
});
|
||||||
|
}
|
||||||
13
modules/attrs/gaming/default.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.gaming = moduleWithSystem ({...}: let
|
||||||
|
modules = with self.nixosModules; [
|
||||||
|
steam
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
imports = modules;
|
||||||
|
});
|
||||||
|
}
|
||||||
16
modules/attrs/youtube/default.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.youtube = moduleWithSystem ({...}: let
|
||||||
|
modules = with self.nixosModules; [
|
||||||
|
obs-studio
|
||||||
|
wshowkeys
|
||||||
|
woomer
|
||||||
|
mumble
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
imports = modules;
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
{ pkgs, pinnedPkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
# 1. Define the AppImage source.
|
|
||||||
appImageSrc = ./Chataigne-linux-x64-bleedingedge.AppImage;
|
|
||||||
|
|
||||||
# 2a. Libraries pulled from the modern, current Nixpkgs (for small size).
|
|
||||||
modernLibs = with pkgs; [
|
|
||||||
alsa-lib
|
|
||||||
freetype
|
|
||||||
avahi
|
|
||||||
libglvnd
|
|
||||||
curl
|
|
||||||
SDL2
|
|
||||||
hidapi
|
|
||||||
libXrandr
|
|
||||||
];
|
|
||||||
|
|
||||||
# 2b. Libraries pulled from the older, pinned package set (ONLY the ones that failed).
|
|
||||||
pinnedCurlLibs = with pinnedPkgs; [
|
|
||||||
curlWithGnuTls # This is the critical component for the CURL_GNUTLS_3 symbol.
|
|
||||||
gnutls
|
|
||||||
];
|
|
||||||
|
|
||||||
# 3. Combine the modern runtime dependencies with the pinned compatibility libraries.
|
|
||||||
appImageDeps = [
|
|
||||||
pkgs.steam-run
|
|
||||||
pkgs.stdenv.cc.cc.lib # Ensures the modern C++ runtime is available
|
|
||||||
]
|
|
||||||
++ modernLibs
|
|
||||||
++ pinnedCurlLibs;
|
|
||||||
|
|
||||||
chataigneDesktopItem = {
|
|
||||||
desktopName = "Chataigne";
|
|
||||||
name = "chataigne";
|
|
||||||
exec = "chataigne"; # The name of the wrapper script in $out/bin
|
|
||||||
icon = "chataigne"; # The name of the icon file (without extension)
|
|
||||||
genericName = "Creative Control Software";
|
|
||||||
comment = "Control and experiment with creative applications, hardware, and media.";
|
|
||||||
categories = [
|
|
||||||
"AudioVideo"
|
|
||||||
"Development"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
# 4. Create the final runnable derivation
|
|
||||||
pkgs.stdenv.mkDerivation {
|
|
||||||
pname = "chataigne-runner";
|
|
||||||
version = "1.0";
|
|
||||||
|
|
||||||
# --- Attributes needed for AppImage running (not compiling) ---
|
|
||||||
src = ./.;
|
|
||||||
dontUnpack = true;
|
|
||||||
dontBuild = true;
|
|
||||||
# --------------------------------------------------
|
|
||||||
|
|
||||||
# Inject the combined dependencies into the environment
|
|
||||||
buildInputs = appImageDeps;
|
|
||||||
|
|
||||||
# The install phase creates an executable wrapper script, extracts the AppImage,
|
|
||||||
# and now handles the desktop file and icon.
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
|
|
||||||
# --- STRATEGY: Extract AppImage contents to bypass FUSE, then fix LD_LIBRARY_PATH ---
|
|
||||||
echo "Extracting AppImage contents to bypass FUSE requirement..."
|
|
||||||
|
|
||||||
# Use the absolute Nix Store path of the AppImage
|
|
||||||
${appImageSrc} --appimage-extract
|
|
||||||
echo "appimage extracted"
|
|
||||||
|
|
||||||
# 2. Check if extraction worked and move the content to $out
|
|
||||||
if [ ! -d "squashfs-root" ]; then
|
|
||||||
echo "Extraction failed. The AppImage may not support --appimage-extract."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 2. CRITICAL FIX: Manually create and install the .desktop file
|
|
||||||
mkdir -p $out/share/applications
|
|
||||||
|
|
||||||
# pkgs.lib.makeDesktopItem takes the metadata and creates a small derivation
|
|
||||||
# We copy the resulting .desktop file from that derivation's output path ($desktop_file_path)
|
|
||||||
local desktop_file_path="${pkgs.makeDesktopItem chataigneDesktopItem}"
|
|
||||||
|
|
||||||
# The file is typically named $name.desktop inside the share/applications folder of the new derivation
|
|
||||||
cp $desktop_file_path/share/applications/chataigne.desktop $out/share/applications/
|
|
||||||
|
|
||||||
# Copy the extracted contents into the output directory
|
|
||||||
cp -r squashfs-root $out/
|
|
||||||
|
|
||||||
# --- DESKTOP ENTRY & ICON (NEW) ---
|
|
||||||
echo "Processing icon and desktop file..."
|
|
||||||
|
|
||||||
# AppImages usually place the icon in squashfs-root/.DirIcon or similar
|
|
||||||
# We will assume it's in the root of the extracted content.
|
|
||||||
local icon_source="$out/squashfs-root/.DirIcon"
|
|
||||||
local icon_target="$out/share/icons/hicolor/128x128/apps/chataigne.png" # Standard location
|
|
||||||
|
|
||||||
# Use the icon if it exists (AppImages often use a .png or .svg)
|
|
||||||
if [ -f "$icon_source" ]; then
|
|
||||||
mkdir -p "$(dirname "$icon_target")"
|
|
||||||
cp "$icon_source" "$icon_target"
|
|
||||||
else
|
|
||||||
echo "Warning: Could not find icon at $icon_source. Using default/no icon."
|
|
||||||
fi
|
|
||||||
# ----------------------------------
|
|
||||||
|
|
||||||
# 3. Create the 'chataigne' executable wrapper
|
|
||||||
cat > $out/bin/chataigne << EOF
|
|
||||||
#!${pkgs.stdenv.shell}
|
|
||||||
|
|
||||||
# The LD_LIBRARY_PATH is created using all dependencies (excluding the wrapper 'steam-run').
|
|
||||||
# This ensures the AppImage finds the pinned CURL library.
|
|
||||||
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath (pkgs.lib.remove pkgs.steam-run appImageDeps)}:$LD_LIBRARY_PATH"
|
|
||||||
|
|
||||||
# Use steam-run to launch the main execution script inside the extracted folder.
|
|
||||||
exec ${pkgs.steam-run}/bin/steam-run "$out/squashfs-root/AppRun" "\$@"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
chmod +x $out/bin/chataigne
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Declarative runner for the Chataigne AppImage, providing necessary dependencies.";
|
|
||||||
homepage = "https://chataigne.io/"; # Example: Add the actual homepage
|
|
||||||
license = pkgs.lib.licenses.unfree; # AppImages are often proprietary/unfree
|
|
||||||
platforms = [ "x86_64-linux" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
{
|
|
||||||
description = "A flake for running the Chataigne AppImage with necessary patched dependencies.";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # Modern Nixpkgs
|
|
||||||
|
|
||||||
# Pinned Nixpkgs for compatibility (the commit that fixes the CURL_GNUTLS_3 issue)
|
|
||||||
pinned-nixpkgs = {
|
|
||||||
url = "github:NixOS/nixpkgs/5171d7b0a9fbaaf216c873622eb5115b6db97957";
|
|
||||||
flake = false; # Treat as a tarball input, not a flake
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs =
|
|
||||||
{
|
|
||||||
self,
|
|
||||||
nixpkgs,
|
|
||||||
pinned-nixpkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
# Supported systems
|
|
||||||
supportedSystems = [ "x86_64-linux" ];
|
|
||||||
|
|
||||||
# The main package definition logic is imported as a function
|
|
||||||
chataigne-appimage-runner = import ./chataigne.nix;
|
|
||||||
|
|
||||||
# Function to generate the package set for each system
|
|
||||||
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
|
|
||||||
in
|
|
||||||
{
|
|
||||||
packages = forAllSystems (
|
|
||||||
system:
|
|
||||||
let
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
pinnedPkgs = import pinned-nixpkgs { inherit system; };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
chataigne = chataigne-appimage-runner {
|
|
||||||
inherit pkgs pinnedPkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Also expose the default package for convenience
|
|
||||||
default = self.packages.${system}.chataigne;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,199 +0,0 @@
|
|||||||
# Tested on Davinci 20.2.2. It works for loading videos and exporting in H264/5 & AV1
|
|
||||||
# Even if following this guide https://www.reddit.com/r/LinuxCrackSupport/comments/1nfqhld/davinci_resolve_studio_202_fix_linux_crack_guide/
|
|
||||||
# nixpkgs rev used for this tests: 4652ba995a945108fb891191c1e910b9a6ed9064
|
|
||||||
|
|
||||||
{ lib, inputs, ... }:
|
|
||||||
let
|
|
||||||
mesa-good-pkg = inputs.mesa-davinci.legacyPackages.x86_64-linux.mesa;
|
|
||||||
pkgs = import (builtins.fetchTarball {
|
|
||||||
url = "https://github.com/NixOS/nixpkgs/archive/ec7c70d12ce2fc37cb92aff673dcdca89d187bae.tar.gz";
|
|
||||||
}) { config.allowUnfree = true; };
|
|
||||||
pkgs-pinned =
|
|
||||||
import
|
|
||||||
(builtins.fetchTarball {
|
|
||||||
url = "https://github.com/NixOS/nixpkgs/archive/497ee3c70707fd71b45c37d48ae1d45e79751047.tar.gz";
|
|
||||||
})
|
|
||||||
{
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
ffmpeg-encoder-plugin = pkgs.stdenv.mkDerivation (finalAttrs: {
|
|
||||||
pname = "ffmpeg-encoder-plugin";
|
|
||||||
version = "1.2.1";
|
|
||||||
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "EdvinNilsson";
|
|
||||||
repo = "ffmpeg_encoder_plugin";
|
|
||||||
tag = "v${finalAttrs.version}";
|
|
||||||
hash = "sha256-F4Q8YCXD5UldTwLbWK4nHacNPQ/B+4yLL96sq7xZurM=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
|
||||||
cmake
|
|
||||||
ffmpeg-full
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = with pkgs; [ ffmpeg ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
mkdir -p $out
|
|
||||||
cp ffmpeg_encoder_plugin.dvcp $out/
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
|
|
||||||
davinci-resolve-studio-cracked =
|
|
||||||
let
|
|
||||||
davinci-patched = pkgs-pinned.davinci-resolve-studio.davinci.overrideAttrs (old: {
|
|
||||||
# script based on https://www.reddit.com/r/LinuxCrackSupport/comments/1nfqhld/davinci_resolve_studio_202_fix_linux_crack_guide/
|
|
||||||
#
|
|
||||||
# Additionally, it will install ffmpeg_encoder_plugin to enable H264/5 & AV1 exports:
|
|
||||||
# https://github.com/EdvinNilsson/ffmpeg_encoder_plugin
|
|
||||||
#
|
|
||||||
# Note: $out IS /opt/resolve
|
|
||||||
postInstall = ''
|
|
||||||
${old.postInstall or ""}
|
|
||||||
${lib.getExe pkgs.perl} -pi -e 's/\x74\x11\xe8\x21\x23\x00\x00/\xeb\x11\xe8\x21\x23\x00\x00/g' $out/bin/resolve
|
|
||||||
${lib.getExe pkgs.perl} -pi -e 's/\x03\x00\x89\x45\xFC\x83\x7D\xFC\x00\x74\x11\x48\x8B\x45\xC8\x8B/\x03\x00\x89\x45\xFC\x83\x7D\xFC\x00\xEB\x11\x48\x8B\x45\xC8\x8B/' $out/bin/resolve
|
|
||||||
${lib.getExe pkgs.perl} -pi -e 's/\x74\x11\x48\x8B\x45\xC8\x8B\x55\xFC\x89\x50\x58\xB8\x00\x00\x00/\xEB\x11\x48\x8B\x45\xC8\x8B\x55\xFC\x89\x50\x58\xB8\x00\x00\x00/' $out/bin/resolve
|
|
||||||
${lib.getExe pkgs.perl} -pi -e 's/\x41\xb6\x01\x84\xc0\x0f\x84\xb0\x00\x00\x00\x48\x85\xdb\x74\x08\x45\x31\xf6\xe9\xa3\x00\x00\x00/\x41\xb6\x00\x84\xc0\x0f\x84\xb0\x00\x00\x00\x48\x85\xdb\x74\x08\x45\x31\xf6\xe9\xa3\x00\x00\x00/' $out/bin/resolve
|
|
||||||
touch $out/.license/blackmagic.lic
|
|
||||||
echo -e "LICENSE blackmagic davinciresolvestudio 999999 permanent uncounted\n hostid=ANY issuer=CGP customer=CGP issued=28-dec-2023\n akey=0000-0000-0000-0000 _ck=00 sig=\"00\"" > $out/.license/blackmagic.lic
|
|
||||||
|
|
||||||
mkdir -p $out/IOPlugins/ffmpeg_encoder_plugin.dvcp.bundle/Contents/Linux-x86-64/
|
|
||||||
cp ${ffmpeg-encoder-plugin}/ffmpeg_encoder_plugin.dvcp $out/IOPlugins/ffmpeg_encoder_plugin.dvcp.bundle/Contents/Linux-x86-64/
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
in
|
|
||||||
|
|
||||||
# the following was copied from davinci's derivation from nixpkgs.
|
|
||||||
# if davinci updates, this should be updated too
|
|
||||||
# but remember to replace "davinci" with "davinci-patched"
|
|
||||||
pkgs.buildFHSEnv {
|
|
||||||
inherit (davinci-patched) pname version;
|
|
||||||
|
|
||||||
targetPkgs =
|
|
||||||
pkgs:
|
|
||||||
with pkgs;
|
|
||||||
[
|
|
||||||
alsa-lib
|
|
||||||
aprutil
|
|
||||||
bzip2
|
|
||||||
dbus
|
|
||||||
expat
|
|
||||||
fontconfig
|
|
||||||
freetype
|
|
||||||
glib
|
|
||||||
libGL
|
|
||||||
libGLU
|
|
||||||
libarchive
|
|
||||||
libcap
|
|
||||||
librsvg
|
|
||||||
libtool
|
|
||||||
libuuid
|
|
||||||
libxcrypt # provides libcrypt.so.1
|
|
||||||
libxkbcommon
|
|
||||||
nspr
|
|
||||||
ocl-icd
|
|
||||||
opencl-headers
|
|
||||||
python3
|
|
||||||
python3.pkgs.numpy
|
|
||||||
udev
|
|
||||||
xdg-utils # xdg-open needed to open URLs
|
|
||||||
libICE
|
|
||||||
libSM
|
|
||||||
libX11
|
|
||||||
libXcomposite
|
|
||||||
libXcursor
|
|
||||||
libXdamage
|
|
||||||
libXext
|
|
||||||
libXfixes
|
|
||||||
libXi
|
|
||||||
libXinerama
|
|
||||||
libXrandr
|
|
||||||
libXrender
|
|
||||||
libXt
|
|
||||||
libXtst
|
|
||||||
libXxf86vm
|
|
||||||
libxcb
|
|
||||||
xcbutil
|
|
||||||
xcbutilimage
|
|
||||||
xcbutilkeysyms
|
|
||||||
xcbutilrenderutil
|
|
||||||
xcbutilwm
|
|
||||||
xkeyboardconfig
|
|
||||||
zlib
|
|
||||||
ocl-icd
|
|
||||||
rocmPackages.clr.icd
|
|
||||||
libGL
|
|
||||||
libGLU
|
|
||||||
]
|
|
||||||
++ [
|
|
||||||
mesa-good-pkg
|
|
||||||
davinci-patched
|
|
||||||
];
|
|
||||||
|
|
||||||
extraPreBwrapCmds = ''
|
|
||||||
mkdir -p ~/.local/share/DaVinciResolve/Extras || exit 1
|
|
||||||
'';
|
|
||||||
|
|
||||||
extraBwrapArgs = [
|
|
||||||
''--bind "$HOME"/.local/share/DaVinciResolve/Extras ${davinci-patched}/Extras''
|
|
||||||
];
|
|
||||||
|
|
||||||
runScript = "${lib.getExe pkgs.bash} ${pkgs.writeText "davinci-wrapper" ''
|
|
||||||
export QT_XKB_CONFIG_ROOT="${pkgs.xkeyboard_config}/share/X11/xkb"
|
|
||||||
export QT_PLUGIN_PATH="${davinci-patched}/libs/plugins:$QT_PLUGIN_PATH"
|
|
||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/lib32:${davinci-patched}/libs
|
|
||||||
# Force Resolve to use X11 (via XWayland) to avoid Aquamarine/Hyprland conflicts
|
|
||||||
export QT_QPA_PLATFORM=xcb
|
|
||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${davinci-patched}/libs
|
|
||||||
|
|
||||||
# Prevent Resolve from trying to talk to the Wayland socket directly
|
|
||||||
unset WAYLAND_DISPLAY
|
|
||||||
${davinci-patched}/bin/resolve
|
|
||||||
''}";
|
|
||||||
|
|
||||||
extraInstallCommands = ''
|
|
||||||
mkdir -p $out/share/applications $out/share/icons/hicolor/128x128/apps
|
|
||||||
ln -s ${davinci-patched}/share/applications/*.desktop $out/share/applications/
|
|
||||||
ln -s ${davinci-patched}/graphics/DV_Resolve.png $out/share/icons/hicolor/128x128/apps/davinci-resolve-studio.png
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = {
|
|
||||||
inherit davinci-patched;
|
|
||||||
updateScript = lib.getExe (
|
|
||||||
pkgs.writeShellApplication {
|
|
||||||
name = "update-davinci-resolve";
|
|
||||||
runtimeInputs = [
|
|
||||||
pkgs.curl
|
|
||||||
pkgs.jq
|
|
||||||
pkgs.common-updater-scripts
|
|
||||||
];
|
|
||||||
text = ''
|
|
||||||
set -o errexit
|
|
||||||
drv=pkgs/by-name/da/davinci-resolve/package.nix
|
|
||||||
currentVersion=${lib.escapeShellArg davinci-patched.version}
|
|
||||||
downloadsJSON="$(curl --fail --silent https://www.blackmagicdesign.com/api/support/us/downloads.json)"
|
|
||||||
|
|
||||||
latestLinuxVersion="$(echo "$downloadsJSON" | jq '[.downloads[] | select(.urls.Linux) | .urls.Linux[] | select(.downloadTitle | test("DaVinci Resolve")) | .downloadTitle]' | grep -oP 'DaVinci Resolve \K\d+\.\d+(\.\d+)?' | sort | tail -n 1)"
|
|
||||||
update-source-version davinci-resolve "$latestLinuxVersion" --source-key=davinci.src
|
|
||||||
|
|
||||||
# Since the standard and studio both use the same version we need to reset it before updating studio
|
|
||||||
sed -i -e "s/""$latestLinuxVersion""/""$currentVersion""/" "$drv"
|
|
||||||
|
|
||||||
latestStudioLinuxVersion="$(echo "$downloadsJSON" | jq '[.downloads[] | select(.urls.Linux) | .urls.Linux[] | select(.downloadTitle | test("DaVinci Resolve")) | .downloadTitle]' | grep -oP 'DaVinci Resolve Studio \K\d+\.\d+(\.\d+)?' | sort | tail -n 1)"
|
|
||||||
update-source-version davinci-resolve-studio "$latestStudioLinuxVersion" --source-key=davinci.src
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
environment.systemPackages = [ davinci-resolve-studio-cracked ];
|
|
||||||
}
|
|
||||||
28
modules/empty.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.name = moduleWithSystem ({
|
||||||
|
pkgs,
|
||||||
|
self',
|
||||||
|
inputs',
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
modules = with self.nixosModules; [];
|
||||||
|
in {
|
||||||
|
imports = modules;
|
||||||
|
programs.name = {
|
||||||
|
enable = true;
|
||||||
|
package = self'.packages.hello;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
perSystem = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
self',
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
packages.hello = pkgs.hello;
|
||||||
|
};
|
||||||
|
}
|
||||||
14
modules/features/davinci/default.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
moduleWithSystem,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.davinci = moduleWithSystem ({self', ...}: {
|
||||||
|
environment.systemPackages = with self'.packages; [
|
||||||
|
davinci-resolve
|
||||||
|
];
|
||||||
|
});
|
||||||
|
perSystem = {inputs', ...}: {
|
||||||
|
packages.davinci-resolve = inputs'.davinci.packages.default;
|
||||||
|
};
|
||||||
|
}
|
||||||
40
modules/features/git/default.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.git = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
package = self.packages.${pkgs.stdenv.hostPlatform.system}.git;
|
||||||
|
};
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
pinentryPackage = pkgs.pinentry-all;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
perSystem = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
self',
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
packages.git = inputs.wrappers.wrappers.git.wrap {
|
||||||
|
inherit pkgs;
|
||||||
|
runtimePkgs = with pkgs; [
|
||||||
|
git-secret
|
||||||
|
];
|
||||||
|
settings = {
|
||||||
|
user = {
|
||||||
|
email = "admin@voidarc.co.uk";
|
||||||
|
name = "voidarc";
|
||||||
|
};
|
||||||
|
credential.helper = "store";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
36
modules/features/gotify-desktop/default.nix
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.gotify-desktop = moduleWithSystem ({self', ...}: {
|
||||||
|
environment.systemPackages = with self'.packages; [
|
||||||
|
gotify-desktop
|
||||||
|
];
|
||||||
|
});
|
||||||
|
perSystem = {
|
||||||
|
pkgs,
|
||||||
|
inputs',
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
packages = {
|
||||||
|
gotify-desktop = let
|
||||||
|
# Requires gpg keyring cert in order to get api key
|
||||||
|
config-file = pkgs.writeText "config.toml" ''
|
||||||
|
[gotify]
|
||||||
|
url = "wss://ntfy.voidarc.co.uk:443"
|
||||||
|
token = { command = "${pkgs.gnupg}/bin/gpg --quiet --batch --decrypt ${./gotify-key.secret}" }
|
||||||
|
[notification]
|
||||||
|
min_priority = 1
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
inputs.wrappers.lib.wrapPackage ({...}: {
|
||||||
|
inherit pkgs;
|
||||||
|
package = inputs'.gotify-desktop.packages.default;
|
||||||
|
flags = {
|
||||||
|
"-c" = config-file;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
BIN
modules/features/gotify-desktop/gotify-key.secret
Normal file
80
modules/features/hyprland/default.nix
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
moduleWithSystem,
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.hyprland = moduleWithSystem ({
|
||||||
|
self',
|
||||||
|
pkgs,
|
||||||
|
inputs',
|
||||||
|
...
|
||||||
|
}: {config, ...}: let
|
||||||
|
modules = with self.nixosModules; [
|
||||||
|
audio
|
||||||
|
systemTheme
|
||||||
|
];
|
||||||
|
|
||||||
|
runtimePkgs = self'.packages.hyprland.passthru.runtimePackages;
|
||||||
|
lib = pkgs.lib;
|
||||||
|
|
||||||
|
runtimeTarget = name: pkg:
|
||||||
|
if config.security.wrappers ? ${name}
|
||||||
|
then "/run/wrappers/bin/${name}"
|
||||||
|
else lib.getExe pkg;
|
||||||
|
in {
|
||||||
|
imports = modules;
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
package = self'.packages.hyprland;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.displayManager.defaultSession = "hyprland";
|
||||||
|
services.xserver.enable = true;
|
||||||
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
hyprlock
|
||||||
|
gsettings-desktop-schemas
|
||||||
|
];
|
||||||
|
|
||||||
|
system.activationScripts.hyprRuntimeEnv = lib.stringAfter ["specialfs"] ''
|
||||||
|
mkdir -p /run/hypr-runtime-env/bin
|
||||||
|
${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: pkg: ''
|
||||||
|
ln -sfn ${runtimeTarget name pkg} /run/hypr-runtime-env/bin/${name}
|
||||||
|
'')
|
||||||
|
runtimePkgs)}
|
||||||
|
'';
|
||||||
|
|
||||||
|
system.activationScripts.hyprConfig = lib.stringAfter ["specialfs"] ''
|
||||||
|
mkdir -p /run/hypr/config
|
||||||
|
ln -sfn ${inputs'.hyprland.packages.repo-files}/* /run/hypr/config
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
perSystem = {
|
||||||
|
self',
|
||||||
|
system,
|
||||||
|
inputs',
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
packages = {
|
||||||
|
hyprland = inputs'.hyprland.packages.default.override {
|
||||||
|
flags."--config" = "/run/hypr/config/hyprland.lua";
|
||||||
|
env."MODULES_ROOT" = "/run/hypr/config/modules";
|
||||||
|
runtimePackages =
|
||||||
|
inputs.hyprland.lib.defaultRuntimePkgs.${system}
|
||||||
|
// {
|
||||||
|
wpaperd = self'.packages.wpaperd;
|
||||||
|
kitty = self'.packages.kitty;
|
||||||
|
gotify-desktop = self'.packages.gotify-desktop;
|
||||||
|
otter-launcher = self'.packages.otter-launcher;
|
||||||
|
quickshell = self'.packages.quickshell;
|
||||||
|
wshowkeys = self'.packages.wshowkeys;
|
||||||
|
waybar = self'.packages.waybar;
|
||||||
|
wlogout = self'.packages.wlogout;
|
||||||
|
way-edges = self'.packages.way-edges;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
71
modules/features/i3/config
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
set $mod Mod4
|
||||||
|
set $term kitty
|
||||||
|
set $menu dmenu_run
|
||||||
|
|
||||||
|
exec --no-startup-id xrandr --output HDMI-1 --mode 1920x1080 --rate 60 --pos -1920x0 --output DP-1 --mode 1920x1080 --rate 60 --pos 0x0 --output DP-2 --mode 1920x1080 --rate 60 --pos 1920x0
|
||||||
|
|
||||||
|
font pango:FiraMono Nerd Font 10
|
||||||
|
|
||||||
|
workspace 1 output DP-1
|
||||||
|
workspace 2 output HDMI-A-1
|
||||||
|
workspace 3 output DP-2
|
||||||
|
|
||||||
|
# Window functions
|
||||||
|
bindsym $mod+BackSpace kill
|
||||||
|
bindsym $mod+b fullscreen toggle
|
||||||
|
|
||||||
|
# Apps
|
||||||
|
bindsym $mod+Return exec --no-startup-id $term
|
||||||
|
bindsym $mod+d exec --no-startup-id $menu
|
||||||
|
bindsym $mod+f exec --no-startup-id firefox
|
||||||
|
bindsym $mod+s exec --no-startup-id nemo
|
||||||
|
|
||||||
|
# Focus windows
|
||||||
|
bindsym $mod+k focus up
|
||||||
|
bindsym $mod+j focus down
|
||||||
|
bindsym $mod+h focus left
|
||||||
|
bindsym $mod+l focus right
|
||||||
|
|
||||||
|
# Move windows
|
||||||
|
bindsym $mod+Shift+h move left
|
||||||
|
bindsym $mod+Shift+l move right
|
||||||
|
bindsym $mod+Shift+k move up
|
||||||
|
bindsym $mod+Shift+j move down
|
||||||
|
|
||||||
|
# Workspaces
|
||||||
|
bindsym $mod+q workspace number 1
|
||||||
|
bindsym $mod+w workspace number 2
|
||||||
|
bindsym $mod+e workspace number 3
|
||||||
|
bindsym $mod+r workspace number 4
|
||||||
|
bindsym $mod+t workspace number 5
|
||||||
|
bindsym $mod+y workspace number 6
|
||||||
|
bindsym $mod+u workspace number 7
|
||||||
|
bindsym $mod+i workspace number 8
|
||||||
|
bindsym $mod+o workspace number 9
|
||||||
|
bindsym $mod+p workspace number 10
|
||||||
|
|
||||||
|
# Move container to workspace
|
||||||
|
bindsym $mod+Shift+q move container to workspace number 1
|
||||||
|
bindsym $mod+Shift+w move container to workspace number 2
|
||||||
|
bindsym $mod+Shift+e move container to workspace number 3
|
||||||
|
bindsym $mod+Shift+r move container to workspace number 4
|
||||||
|
bindsym $mod+Shift+t move container to workspace number 5
|
||||||
|
bindsym $mod+Shift+y move container to workspace number 6
|
||||||
|
bindsym $mod+Shift+u move container to workspace number 7
|
||||||
|
bindsym $mod+Shift+i move container to workspace number 8
|
||||||
|
bindsym $mod+Shift+o move container to workspace number 9
|
||||||
|
bindsym $mod+Shift+p move container to workspace number 10
|
||||||
|
|
||||||
|
# Logout menu
|
||||||
|
bindsym $mod+Shift+a exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||||
|
|
||||||
|
# Reload
|
||||||
|
bindsym $mod+Shift+m reload
|
||||||
|
|
||||||
|
# Drag windows with titlebar
|
||||||
|
tiling_drag modifier titlebar
|
||||||
|
|
||||||
|
# Bar
|
||||||
|
bar {
|
||||||
|
status_command i3status
|
||||||
|
}
|
||||||
48
modules/features/i3/default.nix
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.i3 = moduleWithSystem ({
|
||||||
|
pkgs,
|
||||||
|
self',
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
desktopManager = {
|
||||||
|
xterm.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
windowManager.i3 = {
|
||||||
|
enable = true;
|
||||||
|
package = self'.packages.i3;
|
||||||
|
extraPackages = with pkgs;
|
||||||
|
[
|
||||||
|
dmenu
|
||||||
|
i3status
|
||||||
|
xinit
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
perSystem = {pkgs, self', ...}: {
|
||||||
|
packages.i3 = inputs.wrappers.lib.wrapPackage ({...}: {
|
||||||
|
inherit pkgs;
|
||||||
|
package = pkgs.i3;
|
||||||
|
runtimePkgs = with pkgs;
|
||||||
|
[
|
||||||
|
xrandr
|
||||||
|
firefox
|
||||||
|
]
|
||||||
|
++ (with self'.packages; [
|
||||||
|
kitty
|
||||||
|
nemo
|
||||||
|
]);
|
||||||
|
flags = {
|
||||||
|
"-c" = ./config;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
49
modules/features/kitty/default.nix
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.kitty = moduleWithSystem (
|
||||||
|
{self'}: {
|
||||||
|
environment.systemPackages = with self'.packages; [
|
||||||
|
kitty
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
perSystem = {pkgs, ...}: {
|
||||||
|
packages.kitty = let
|
||||||
|
fira-mono = pkgs.nerd-fonts.fira-mono;
|
||||||
|
fontsConf = pkgs.makeFontsConf {
|
||||||
|
fontDirectories = [fira-mono];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
inputs.wrappers.wrappers.kitty.wrap {
|
||||||
|
inherit pkgs;
|
||||||
|
environment = {
|
||||||
|
"FONTCONFIG_FILE" = "${fontsConf}";
|
||||||
|
};
|
||||||
|
font = {
|
||||||
|
name = "FiraMono Nerd Font Mono";
|
||||||
|
size = 11;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
font_size = 11;
|
||||||
|
scrollbar = "never";
|
||||||
|
pixel_scroll = false;
|
||||||
|
window_padding_width = 9;
|
||||||
|
background_opacity = 0.50;
|
||||||
|
confirm_os_window_close = 0;
|
||||||
|
enable_audio_bell = false;
|
||||||
|
cursor_trail = 1;
|
||||||
|
cursor_trail_start_threshold = 1;
|
||||||
|
cursor_trail_color = "#cba6f7";
|
||||||
|
cursor_shape = "beam";
|
||||||
|
allow_remote_control = true;
|
||||||
|
};
|
||||||
|
keybindings = {
|
||||||
|
"ctrl+backspace" = "send_text all \\x17";
|
||||||
|
};
|
||||||
|
themeFile = "Catppuccin-Mocha";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
51
modules/features/lazygit/default.nix
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.lazygit = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
self.packages.${pkgs.stdenv.hostPlatform.system}.lazygit
|
||||||
|
];
|
||||||
|
};
|
||||||
|
perSystem = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
self',
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
config-file = pkgs.writeText "config.yml" ''
|
||||||
|
gui:
|
||||||
|
nerdFontsVersion: "3"
|
||||||
|
|
||||||
|
customCommands:
|
||||||
|
- key: 'p'
|
||||||
|
context: 'global'
|
||||||
|
command: 'git pull --recurse-submodules'
|
||||||
|
loadingText: 'Pulling with submodules'
|
||||||
|
output: 'log'
|
||||||
|
- key: '<c-p>'
|
||||||
|
context: 'global'
|
||||||
|
command: 'git pull'
|
||||||
|
loadingText: 'Pulling remote repo'
|
||||||
|
output: 'log'
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
packages.lazygit = inputs.wrappers.lib.wrapPackage ({
|
||||||
|
config,
|
||||||
|
wlib,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
inherit pkgs;
|
||||||
|
package = pkgs.lazygit;
|
||||||
|
flags = {
|
||||||
|
"--use-config-file" = config-file;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
75
modules/features/mumble/default.nix
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.mumble = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
modules = with self.nixosModules; [
|
||||||
|
audio
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
imports = modules;
|
||||||
|
services.murmur = {
|
||||||
|
enable = true;
|
||||||
|
bandwidth = 540000;
|
||||||
|
bonjour = true;
|
||||||
|
password = "password";
|
||||||
|
autobanTime = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
mumble
|
||||||
|
];
|
||||||
|
|
||||||
|
services.pipewire.extraConfig.pipewire = {
|
||||||
|
"97-null-sink" = {
|
||||||
|
"context.objects" = [
|
||||||
|
{
|
||||||
|
factory = "adapter";
|
||||||
|
args = {
|
||||||
|
"factory.name" = "support.null-audio-sink";
|
||||||
|
"node.name" = "Null-Sink";
|
||||||
|
"node.description" = "Null Sink";
|
||||||
|
"media.class" = "Audio/Sink";
|
||||||
|
"audio.position" = "FL,FR";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
factory = "adapter";
|
||||||
|
args = {
|
||||||
|
"factory.name" = "support.null-audio-sink";
|
||||||
|
"node.name" = "Null-Source";
|
||||||
|
"node.description" = "Null Source";
|
||||||
|
"media.class" = "Audio/Source";
|
||||||
|
"audio.position" = "FL,FR";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"98-virtual-mic" = {
|
||||||
|
"context.modules" = [
|
||||||
|
{
|
||||||
|
name = "libpipewire-module-loopback";
|
||||||
|
args = {
|
||||||
|
"audio.position" = "FL,FR";
|
||||||
|
"node.description" = "Mumble as Microphone";
|
||||||
|
"capture.props" = {
|
||||||
|
# Mumble's output node name.
|
||||||
|
"node.target" = "Mumble";
|
||||||
|
"node.passive" = true;
|
||||||
|
};
|
||||||
|
"playback.props" = {
|
||||||
|
"node.name" = "Virtual-Mumble-Microphone";
|
||||||
|
"media.class" = "Audio/Source";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/features/nvim/default.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{moduleWithSystem, ...}: {
|
||||||
|
flake.nixosModules.nvim = moduleWithSystem ({self', ...}: {
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
package = self'.packages.nvim;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
perSystem = {inputs', ...}: {
|
||||||
|
packages.nvim = inputs'.nvim.packages.default;
|
||||||
|
};
|
||||||
|
}
|
||||||
8
modules/features/obs-studio/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{moduleWithSystem, ...}: {
|
||||||
|
flake.nixosModules.obs-studio = moduleWithSystem ({...}: {
|
||||||
|
programs.obs-studio = {
|
||||||
|
enable = true;
|
||||||
|
enableVirtualCamera = true;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
14
modules/features/omnisearch/default.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
moduleWithSystem,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.omnisearch = moduleWithSystem ({...}: let
|
||||||
|
modules = [
|
||||||
|
inputs.omnisearch.nixosModules.default
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
imports = modules;
|
||||||
|
services.omnisearch.enable = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
BIN
modules/features/otter-launcher/cat.png
Normal file
|
After Width: | Height: | Size: 180 KiB |
111
modules/features/otter-launcher/config.toml
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
[general]
|
||||||
|
default_module = "app" # module to run when no prefix is matched
|
||||||
|
empty_module = "app" # run with an empty prompt
|
||||||
|
exec_cmd = "zsh -c" # exec command of your shell
|
||||||
|
vi_mode = false # set true to use vi keybinds, false emacs keybinds
|
||||||
|
esc_to_abort = true # useful for vi users
|
||||||
|
cheatsheet_entry = "?" # when prompted, will show a list of configured modules
|
||||||
|
cheatsheet_viewer = "less -R; clear" # command to show cheatsheet; through piping stdout
|
||||||
|
clear_screen_after_execution = false
|
||||||
|
loop_mode = false # don't quit after executing a module, useful with scratchpads; stderr is hidden in loop mode
|
||||||
|
external_editor = "nvim" # if set, press ctrl+x ctrl+ee (or v in vi normal mode) to edit prompt in the specified program
|
||||||
|
delay_startup = 0 # sometimes the otter runs too fast even before the terminal window is ready; this slows it down by milliseconds; useful when chafa image is skewed
|
||||||
|
|
||||||
|
[interface]
|
||||||
|
# use three quotes to write longer codes
|
||||||
|
header = """
|
||||||
|
\x1b[1;38;2;203;166;247m$USER@nixos\x1b[0m
|
||||||
|
"""
|
||||||
|
header_cmd = '' # run a command and print stdout above the header
|
||||||
|
header_cmd_trimmed_lines = 0 # remove trailing lines from header_cmd output, in case of some programs appending excessive empty lines
|
||||||
|
place_holder = "execute" # at the input field
|
||||||
|
suggestion_mode = "list" # available options: list, hint
|
||||||
|
separator = """
|
||||||
|
$( \
|
||||||
|
text=" "; \
|
||||||
|
printf "\u001B[0;90m$text \
|
||||||
|
$(printf -v line '%*s' \"$(( COLUMNS - $(printf "$text" | wc -m) - 3 ))\" ''; printf '%s' \"${line// /─}\")" \
|
||||||
|
)"""
|
||||||
|
footer = "" # add a line after suggestion list
|
||||||
|
suggestion_lines = 7 # 0 to disable suggestions and tab completion
|
||||||
|
list_prefix = " "
|
||||||
|
selection_prefix = "\u001B[31;1m "
|
||||||
|
prefix_padding = 3 # format prefixes to have a uniformed width
|
||||||
|
default_module_message = " \u001B[33mlaunch\u001B[0m app" # shown when the default module is in use
|
||||||
|
empty_module_message = "" # shown when the empty module is in use
|
||||||
|
customized_list_order = false # false to list modules alphabetically; true to list as per the configured order in the below [[modules]] section
|
||||||
|
indicator_with_arg_module = " * " # the sign showing whether a module should run with an argument
|
||||||
|
indicator_no_arg_module = " "
|
||||||
|
# below color options affect all modules; per-module coloring can be configured using ansi codes individually
|
||||||
|
prefix_color = "\u001B[33m"
|
||||||
|
description_color = "\u001B[39m"
|
||||||
|
place_holder_color = "\u001B[30m"
|
||||||
|
hint_color = "\u001B[30m" # suggestion color in hint mode
|
||||||
|
# move the interface rightward or downward
|
||||||
|
move_interface_right = 21
|
||||||
|
move_interface_down = 0
|
||||||
|
|
||||||
|
[[modules]]
|
||||||
|
description = "programs"
|
||||||
|
prefix = "app"
|
||||||
|
cmd = """
|
||||||
|
hyprctl dispatch 'hl.dsp.window.resize({x = 700, y = 700, window = activewindow})' &&
|
||||||
|
hyprctl dispatch 'hl.dsp.window.center({window = activewindow})'&&
|
||||||
|
hyprctl dispatch "hl.dsp.exec_cmd('$(fsel --no-exec)')"
|
||||||
|
"""
|
||||||
|
|
||||||
|
[[modules]]
|
||||||
|
description = "bluetooth"
|
||||||
|
prefix = "bl"
|
||||||
|
cmd = """
|
||||||
|
hyprctl dispatch 'hl.dsp.window.resize({x = 650, y = 400, window = activewindow})' &&
|
||||||
|
hyprctl dispatch 'hl.dsp.window.center({window = activewindow})'&&
|
||||||
|
bluetui
|
||||||
|
"""
|
||||||
|
|
||||||
|
[[modules]]
|
||||||
|
description = "nixos wiki"
|
||||||
|
prefix = "nw"
|
||||||
|
cmd = """
|
||||||
|
hyprctl dispatch "hl.dsp.exec_cmd('firefox --new-window https://wiki.nixos.org/w/index.php?search={}')"
|
||||||
|
"""
|
||||||
|
with_argument = true
|
||||||
|
url_encode = true
|
||||||
|
unbind_proc = true
|
||||||
|
|
||||||
|
[[modules]]
|
||||||
|
description = "nixpkgs"
|
||||||
|
prefix = "nix"
|
||||||
|
cmd = """
|
||||||
|
hyprctl dispatch "hl.dsp.exec_cmd('firefox --new-window https://search.nixos.org/packages?query={}')"
|
||||||
|
"""
|
||||||
|
with_argument = true
|
||||||
|
url_encode = true
|
||||||
|
unbind_proc = true
|
||||||
|
|
||||||
|
[[modules]]
|
||||||
|
description = "jellyfin"
|
||||||
|
prefix = "jf"
|
||||||
|
cmd = """
|
||||||
|
hyprctl dispatch 'hl.dsp.exec_cmd("kitty --class jf-tui -e jellyfin-tui", {workspace = "special:music"})'
|
||||||
|
"""
|
||||||
|
|
||||||
|
[[modules]]
|
||||||
|
description = "youtube"
|
||||||
|
prefix = "y"
|
||||||
|
cmd = """
|
||||||
|
hyprctl dispatch "hl.dsp.exec_cmd('firefox --new-window https://www.youtube.com')"
|
||||||
|
"""
|
||||||
|
with_argument = false
|
||||||
|
url_encode = true
|
||||||
|
unbind_proc = true
|
||||||
|
|
||||||
|
[[modules]]
|
||||||
|
description = "whatsapp"
|
||||||
|
prefix = "w"
|
||||||
|
cmd = """
|
||||||
|
hyprctl dispatch "hl.dsp.exec_cmd('firefox --new-window https://web.whatsapp.com')"
|
||||||
|
"""
|
||||||
|
with_argument = false
|
||||||
|
url_encode = true
|
||||||
|
unbind_proc = true
|
||||||
44
modules/features/otter-launcher/default.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.otter-launcher = moduleWithSystem ({self', ...}: {
|
||||||
|
environment.systemPackages = [
|
||||||
|
self'.packages.otter-launcher
|
||||||
|
];
|
||||||
|
});
|
||||||
|
perSystem = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
self',
|
||||||
|
inputs',
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
packages = {
|
||||||
|
otter-launcher = let
|
||||||
|
extra-config = ''
|
||||||
|
[overlay]
|
||||||
|
overlay_cmd = "${lib.getExe pkgs.kitty} +kitten icat --fit height --align left --no-trailing-newline ${./cat.png}"
|
||||||
|
overlay_trimmed_lines = 0
|
||||||
|
'';
|
||||||
|
final-config = pkgs.writeText "config.toml" ''
|
||||||
|
${extra-config}
|
||||||
|
|
||||||
|
${builtins.readFile ./config.toml}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
inputs.wrappers.lib.wrapPackage ({...}: {
|
||||||
|
inherit pkgs;
|
||||||
|
package = inputs'.otter-launcher.packages.default;
|
||||||
|
runtimePkgs = with pkgs; [
|
||||||
|
fsel
|
||||||
|
bluetui
|
||||||
|
];
|
||||||
|
flags = {
|
||||||
|
"-c" = final-config;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
22
modules/features/quickshell/default.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
moduleWithSystem,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.quickshell = moduleWithSystem ({
|
||||||
|
self',
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
environment.systemPackages = with self'.packages; [
|
||||||
|
quickshell
|
||||||
|
];
|
||||||
|
});
|
||||||
|
perSystem = {pkgs, ...}: {
|
||||||
|
packages.quickshell = inputs.wrappers.wrappers.quickshell.wrap {
|
||||||
|
inherit pkgs;
|
||||||
|
configDir = inputs.quickshell;
|
||||||
|
configFile = "${inputs.quickshell}/shell.qml";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
16
modules/features/sddm/autologin.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.sddm-autologin = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
services.displayManager = {
|
||||||
|
autoLogin.enable = true;
|
||||||
|
autoLogin.user = "user01";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
25
modules/features/sddm/default.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.sddm = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.catppuccin-sddm.override {
|
||||||
|
flavor = "mocha";
|
||||||
|
font = "Fira Mono Nerd Font";
|
||||||
|
fontSize = "11";
|
||||||
|
background = null;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
services.displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
theme = "catppuccin-mocha-mauve";
|
||||||
|
package = pkgs.kdePackages.sddm;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
30
modules/features/steam/default.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{moduleWithSystem, ...}: {
|
||||||
|
flake.nixosModules.steam = moduleWithSystem ({
|
||||||
|
pkgs,
|
||||||
|
unfreePkgs,
|
||||||
|
inputs',
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# If buying isn't owning than piracy isn't stealing
|
||||||
|
environment.systemPackages = [
|
||||||
|
inputs'.sls-steam.packages.default
|
||||||
|
];
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
protontricks.enable = true;
|
||||||
|
extraCompatPackages = with pkgs; [
|
||||||
|
proton-ge-bin
|
||||||
|
];
|
||||||
|
package = unfreePkgs.steam.override {
|
||||||
|
extraEnv = {
|
||||||
|
LD_AUDIT = "${
|
||||||
|
inputs'.sls-steam.packages.sls-steam
|
||||||
|
}/library-inject.so:${
|
||||||
|
inputs'.sls-steam.packages.sls-steam
|
||||||
|
}/SLSsteam.so";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
11
modules/features/tailscale/default.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.tailscale = moduleWithSystem ({...}: {
|
||||||
|
services.tailscale = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
60
modules/features/way-edges/config.jsonc
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
"allow-trailing-commas": true,
|
||||||
|
"widgets": [
|
||||||
|
{
|
||||||
|
"type": "slider",
|
||||||
|
"edge": "right",
|
||||||
|
"position": "top",
|
||||||
|
"thickness": 30,
|
||||||
|
"length": "25%",
|
||||||
|
"margins": {
|
||||||
|
"top": "50%"
|
||||||
|
},
|
||||||
|
"border-width": 4,
|
||||||
|
"border-color": "#cba6f7ff",
|
||||||
|
"fg-color": "#cba6f7bb",
|
||||||
|
"bg-color": "#31324466",
|
||||||
|
"fg-text-color": "#11111bff",
|
||||||
|
"bg-text-color": "#bac2dedd",
|
||||||
|
"transition-duration": 100,
|
||||||
|
"redraw-only-on-internal-update": true,
|
||||||
|
"radius": 10, // corner radius
|
||||||
|
"obtuse-angle": 90, // in degrees(90~180). controls how much curve the widget has
|
||||||
|
"scroll-unit": 0.005,
|
||||||
|
"pinnable": false,
|
||||||
|
"preset": {
|
||||||
|
"type": "speaker",
|
||||||
|
"animation-curve": "Linear", // mute animation
|
||||||
|
"mute-text-color": "#f38ba8ff",
|
||||||
|
"mute-color": "#f38ba8bb",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "slider",
|
||||||
|
"edge": "right",
|
||||||
|
"position": "top",
|
||||||
|
"thickness": 30,
|
||||||
|
"length": "25%",
|
||||||
|
"margins": {
|
||||||
|
"top": "25%"
|
||||||
|
},
|
||||||
|
"border-width": 4,
|
||||||
|
"border-color": "#f9e2afff",
|
||||||
|
"fg-color": "#f9e2afbb",
|
||||||
|
"bg-color": "#31324466",
|
||||||
|
"fg-text-color": "#11111bff",
|
||||||
|
"bg-text-color": "#bac2dedd",
|
||||||
|
"transition-duration": 100,
|
||||||
|
"redraw-only-on-internal-update": true,
|
||||||
|
"radius": 10, // corner radius
|
||||||
|
"obtuse-angle": 90, // in degrees(90~180). controls how much curve the widget has
|
||||||
|
"scroll-unit": 0.005,
|
||||||
|
"pinnable": false,
|
||||||
|
"preset": {
|
||||||
|
"type": "backlight",
|
||||||
|
"device": "intel_backlight", // this is the name of the device. Find it under `/sys/class/backlight/` It should be something like `nvidia_0`, `intel_0`, etc.
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
20
modules/features/way-edges/default.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.way-edges = moduleWithSystem ({self', ...}: {
|
||||||
|
environment.systemPackages = with self'.packages; [
|
||||||
|
way-edges
|
||||||
|
];
|
||||||
|
});
|
||||||
|
perSystem = {pkgs, ...}: {
|
||||||
|
packages.way-edges = inputs.wrappers.lib.wrapPackage ({...}: {
|
||||||
|
inherit pkgs;
|
||||||
|
package = pkgs.way-edges;
|
||||||
|
flags = {
|
||||||
|
"--config-path" = ./config.jsonc;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
42
modules/features/waybar/default.nix
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
moduleWithSystem,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.waybar = moduleWithSystem ({self', ...}: {
|
||||||
|
environment.systemPackages = with self'.packages; [
|
||||||
|
waybar
|
||||||
|
];
|
||||||
|
});
|
||||||
|
perSystem = {pkgs, ...}: {
|
||||||
|
packages.waybar = inputs.wrappers.wrappers.waybar.wrap {
|
||||||
|
inherit pkgs;
|
||||||
|
"style.css".path = ./style.css;
|
||||||
|
configFile.content = ''
|
||||||
|
{
|
||||||
|
"include": [
|
||||||
|
"${./modules.jsonc}"
|
||||||
|
],
|
||||||
|
"height": 20,
|
||||||
|
"margin": "3 6",
|
||||||
|
"reload_style_on_change": true,
|
||||||
|
"position": "top",
|
||||||
|
"modules-left": [
|
||||||
|
"custom/logo",
|
||||||
|
"hyprland/workspaces"
|
||||||
|
],
|
||||||
|
"modules-center": [
|
||||||
|
"mpris"
|
||||||
|
],
|
||||||
|
"modules-right": [
|
||||||
|
"network",
|
||||||
|
"bluetooth",
|
||||||
|
"custom/notifs",
|
||||||
|
"battery",
|
||||||
|
"clock"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
78
modules/features/waybar/modules.jsonc
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
{
|
||||||
|
"custom/logo": {
|
||||||
|
"format": ""
|
||||||
|
},
|
||||||
|
"mpris": {
|
||||||
|
"format": "{status_icon} {title} - {artist}",
|
||||||
|
"title-len": 50,
|
||||||
|
"artist-len": 20,
|
||||||
|
"status-icons": {
|
||||||
|
"playing": "",
|
||||||
|
"paused": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
"format": "",
|
||||||
|
"format-ethernet": "",
|
||||||
|
"format-wifi": "{icon}",
|
||||||
|
"format-icons": [
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"format-alt": "{ipaddr} / {gwaddr}",
|
||||||
|
"tooltip-format": "{ifname} - {essid}"
|
||||||
|
},
|
||||||
|
"bluetooth": {
|
||||||
|
"format": "",
|
||||||
|
"format-connected": "",
|
||||||
|
"tooltip-format": "{status} - {device_alias}",
|
||||||
|
"on-click": "kitty --class otter --title otter-launcher -e sh -c 'sleep 0.05 && otter-launcher bl'"
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"format": "{icon} {capacity}%",
|
||||||
|
"format-plugged": " {capacity}%",
|
||||||
|
"format-charging": " {capacity}%",
|
||||||
|
"states": {
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format-icons": [
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"custom/notifs": {
|
||||||
|
"format": "",
|
||||||
|
"on-click": "kitty --class otter --title otter-launcher -e sh -c 'sleep 0.05 && otter-launcher dunst'"
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": " {percentage}%",
|
||||||
|
"tooltip-format": "{used:0.1f}GiB, {swapUsed:0.1f}GiB Swap"
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": " {usage}%"
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"interval": 1,
|
||||||
|
"format": "{:%T}",
|
||||||
|
"tooltip-format": "<tt><small>{calendar}</small></tt>",
|
||||||
|
"calendar": {
|
||||||
|
"mode" : "year",
|
||||||
|
"mode-mon-col" : 3,
|
||||||
|
"weeks-pos" : "right",
|
||||||
|
"on-scroll" : 1,
|
||||||
|
"format": {
|
||||||
|
"months": "<span color='#89b4fa'><b>{}</b></span>",
|
||||||
|
"days": "<span color='#eba0ac'><b>{}</b></span>",
|
||||||
|
"weeks": "<span color='#a6e3a1'><b>W{}</b></span>",
|
||||||
|
"weekdays": "<span color='#fab387'><b>{}</b></span>",
|
||||||
|
"today": "<span color='#cba6f7'><b><u>{}</u></b></span>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
158
modules/features/waybar/style.css
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
* {
|
||||||
|
font-family: "Fira Mono Nerd Font Propo";
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
min-height: 16px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module {
|
||||||
|
background-color: rgba(30, 30, 46, 0.8);
|
||||||
|
margin: 0 3px;
|
||||||
|
padding: 0 9px;
|
||||||
|
border-radius: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-logo {
|
||||||
|
background-color: #cba6f7;
|
||||||
|
color: #1e1e2e;
|
||||||
|
font-size: 21px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces {
|
||||||
|
padding: 3px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
background-color: #585b70;
|
||||||
|
margin: 0 2px;
|
||||||
|
padding: 0 2px;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:first-child {
|
||||||
|
border-radius: 5px 2px 2px 5px;
|
||||||
|
margin: 0;
|
||||||
|
margin-right: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:last-child {
|
||||||
|
border-radius: 2px 5px 5px 4px;
|
||||||
|
margin: 0;
|
||||||
|
margin-left: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:only-child {
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 0 12px;
|
||||||
|
margin: 0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
background-color: #b4befe;
|
||||||
|
color: #313244;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpris {
|
||||||
|
font-size: 14px;
|
||||||
|
transition:
|
||||||
|
color 0.5s,
|
||||||
|
background-color 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpris.paused {
|
||||||
|
color: #f2cdcd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpris.playing {
|
||||||
|
color: rgba(30, 30, 46, 0.8);
|
||||||
|
background-color: #ca9ee6;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
background-color: #f38ba8;
|
||||||
|
color: #1e1e2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bluetooth {
|
||||||
|
background-color: #fab387;
|
||||||
|
color: #1e1e2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-notifs {
|
||||||
|
background-color: #f9e2af;
|
||||||
|
color: #1e1e2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
background-color: #a6e3a1;
|
||||||
|
color: #1e1e2e;
|
||||||
|
transition:
|
||||||
|
color 0.5s,
|
||||||
|
background-color 0.5s,
|
||||||
|
linear-gradient 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: #1e1e2e;
|
||||||
|
background: #f38ba8;
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(243, 139, 168, 1) 0%,
|
||||||
|
rgba(166, 218, 149, 1) 65%,
|
||||||
|
rgba(166, 218, 149, 1) 100%
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.charging {
|
||||||
|
background-color: #40a02b;
|
||||||
|
background: #cba6f7;
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(203, 166, 247, 1) 0%,
|
||||||
|
rgba(166, 218, 149, 1) 65%,
|
||||||
|
rgba(166, 218, 149, 1) 100%
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.plugged {
|
||||||
|
background-color: #40a02b;
|
||||||
|
background: #cba6f7;
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(203, 166, 247, 1) 0%,
|
||||||
|
rgba(166, 218, 149, 1) 65%,
|
||||||
|
rgba(166, 218, 149, 1) 100%
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: #f38ba8;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
padding-right: 3px;
|
||||||
|
border-radius: 7px 0 0 7px;
|
||||||
|
margin-right: 0;
|
||||||
|
background-color: #89dceb;
|
||||||
|
color: #1e1e2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu {
|
||||||
|
padding-left: 3px;
|
||||||
|
border-radius: 0 7px 7px 0;
|
||||||
|
margin-left: 0;
|
||||||
|
background-color: #89dceb;
|
||||||
|
color: #1e1e2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
background-color: #89b4fa;
|
||||||
|
color: #1e1e2e;
|
||||||
|
}
|
||||||
|
|
||||||
9
modules/features/weylus/default.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{moduleWithSystem, ...}: {
|
||||||
|
flake.nixosModules.weylus = moduleWithSystem ({inputs', ...}: {
|
||||||
|
programs.weylus = {
|
||||||
|
enable = true;
|
||||||
|
package = inputs'.weylus.packages.default;
|
||||||
|
users = ["user01"];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
22
modules/features/wlogout/default.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.wlogout = moduleWithSystem ({self', ...}: {
|
||||||
|
environment.systemPackages = with self'.packages; [
|
||||||
|
wlogout
|
||||||
|
];
|
||||||
|
});
|
||||||
|
perSystem = {pkgs, ...}: {
|
||||||
|
packages.wlogout = inputs.wrappers.lib.wrapPackage ({...}: {
|
||||||
|
inherit pkgs;
|
||||||
|
package = pkgs.wlogout;
|
||||||
|
flags = {
|
||||||
|
"--css" = ./style.css;
|
||||||
|
"--layout" = ./layout;
|
||||||
|
"--buttons-per-row" = "5";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
BIN
modules/features/wlogout/icons/exit.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
modules/features/wlogout/icons/lock.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
modules/features/wlogout/icons/power.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
modules/features/wlogout/icons/reload.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
modules/features/wlogout/icons/slwwp.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
30
modules/features/wlogout/layout
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"label" : "lock",
|
||||||
|
"action" : "hyprlock",
|
||||||
|
"text" : "Lock",
|
||||||
|
"keybind" : "l"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "logout",
|
||||||
|
"action" : "hyprctl dispatch 'hl.dsp.exit()'" ,
|
||||||
|
"text" : "Logout",
|
||||||
|
"keybind" : "e"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "shutdown",
|
||||||
|
"action" : "systemctl poweroff",
|
||||||
|
"text" : "Shutdown",
|
||||||
|
"keybind" : "s"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "suspend",
|
||||||
|
"action" : "systemctl suspend",
|
||||||
|
"text" : "Sleep",
|
||||||
|
"keybind" : "u"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "reboot",
|
||||||
|
"action" : "systemctl reboot",
|
||||||
|
"text" : "Reboot",
|
||||||
|
"keybind" : "r"
|
||||||
|
}
|
||||||
73
modules/features/wlogout/style.css
Executable file
@@ -0,0 +1,73 @@
|
|||||||
|
* {
|
||||||
|
background-image: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
background-color: rgba(12, 12, 12, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border-radius: 0;
|
||||||
|
border-color: #cba6f7;
|
||||||
|
text-decoration-color: #ffffff;
|
||||||
|
color: #FFFFFF;
|
||||||
|
background-color: #313244;
|
||||||
|
border-style: solid none;
|
||||||
|
border-width: 4px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: 50% 30%;
|
||||||
|
background-size: 75%;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:first-child {
|
||||||
|
border-top-left-radius: 10px;
|
||||||
|
border-bottom-left-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:last-child {
|
||||||
|
border-top-right-radius: 10px;
|
||||||
|
border-bottom-right-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#lock {
|
||||||
|
border-left-style: solid;
|
||||||
|
background-image: image(url("./icons/lock.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#logout {
|
||||||
|
background-image: image(url("./icons/exit.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#suspend {
|
||||||
|
background-image: image(url("./icons/slwwp.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#shutdown {
|
||||||
|
background-image: image(url("./icons/power.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#reboot {
|
||||||
|
border-right-style: solid;
|
||||||
|
background-image: image(url("./icons/reload.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#lock:focus {
|
||||||
|
background-color: #f38ba8;
|
||||||
|
}
|
||||||
|
|
||||||
|
#logout:focus {
|
||||||
|
background-color: #fab387;
|
||||||
|
}
|
||||||
|
|
||||||
|
#shutdown:focus {
|
||||||
|
background-color: #a6e3a1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#suspend:focus {
|
||||||
|
background-color: #f9e2af;
|
||||||
|
}
|
||||||
|
|
||||||
|
#reboot:focus {
|
||||||
|
background-color: #cba6f7;
|
||||||
|
}
|
||||||
26
modules/features/woomer/default.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.woomer = moduleWithSystem ({self', ...}: {
|
||||||
|
environment.systemPackages = with self'.packages; [
|
||||||
|
woomer
|
||||||
|
];
|
||||||
|
});
|
||||||
|
perSystem = {
|
||||||
|
pkgs,
|
||||||
|
inputs',
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
packages.woomer = inputs.wrappers.lib.wrapPackage ({...}: {
|
||||||
|
inherit pkgs;
|
||||||
|
package = inputs'.woomer.packages.default;
|
||||||
|
flags = {
|
||||||
|
"--monitor" = "DP-1";
|
||||||
|
"--output" = "DP-1";
|
||||||
|
"--radius" = "2";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
35
modules/features/wpaperd/default.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
moduleWithSystem,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.wpaperd = moduleWithSystem ({self', ...}: {
|
||||||
|
environment.systemPackages = with self'.packages; [
|
||||||
|
wpaperd
|
||||||
|
];
|
||||||
|
});
|
||||||
|
perSystem = {pkgs, ...}: {
|
||||||
|
packages.wpaperd = let
|
||||||
|
config-file = builtins.toFile "config.toml" ''
|
||||||
|
[any]
|
||||||
|
path = "${./wallpapers}"
|
||||||
|
|
||||||
|
[HDMI-A-1]
|
||||||
|
path = "${./wallpapers/topo1.png}"
|
||||||
|
|
||||||
|
[DP-1]
|
||||||
|
path = "${./wallpapers/topo2.png}"
|
||||||
|
|
||||||
|
[DP-2]
|
||||||
|
path = "${./wallpapers/topo3.png}"
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
inputs.wrappers.lib.wrapPackage ({...}: {
|
||||||
|
inherit pkgs;
|
||||||
|
package = pkgs.wpaperd;
|
||||||
|
flags = {
|
||||||
|
"--config" = config-file;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
BIN
modules/features/wpaperd/wallpapers/aesthetic.jpg
Normal file
|
After Width: | Height: | Size: 227 KiB |
BIN
modules/features/wpaperd/wallpapers/bars.jpg
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
modules/features/wpaperd/wallpapers/black-hole.png
Normal file
|
After Width: | Height: | Size: 1.9 MiB |
BIN
modules/features/wpaperd/wallpapers/city-horizon.jpg
Normal file
|
After Width: | Height: | Size: 250 KiB |
BIN
modules/features/wpaperd/wallpapers/dragon.jpg
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
modules/features/wpaperd/wallpapers/flower-field.jpg
Normal file
|
After Width: | Height: | Size: 653 KiB |
BIN
modules/features/wpaperd/wallpapers/ocean.png
Normal file
|
After Width: | Height: | Size: 6.9 MiB |
BIN
modules/features/wpaperd/wallpapers/pink-clouds.jpg
Normal file
|
After Width: | Height: | Size: 406 KiB |
BIN
modules/features/wpaperd/wallpapers/sakura-trees-over-river.jpg
Normal file
|
After Width: | Height: | Size: 551 KiB |
|
After Width: | Height: | Size: 8.7 MiB |
BIN
modules/features/wpaperd/wallpapers/sunset.jpg
Normal file
|
After Width: | Height: | Size: 310 KiB |
BIN
modules/features/wpaperd/wallpapers/topo1.png
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
modules/features/wpaperd/wallpapers/topo2.png
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
modules/features/wpaperd/wallpapers/topo3.png
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
BIN
modules/features/wpaperd/wallpapers/tree.jpg
Normal file
|
After Width: | Height: | Size: 2.9 MiB |
BIN
modules/features/wpaperd/wallpapers/unused/wide_lines.png.unused
Normal file
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
BIN
modules/features/wpaperd/wallpapers/voyager-8.jpg
Normal file
|
After Width: | Height: | Size: 286 KiB |
BIN
modules/features/wpaperd/wallpapers/wallpaper-sun.jpg
Executable file
|
After Width: | Height: | Size: 592 KiB |
BIN
modules/features/wpaperd/wallpapers/waves.png
Normal file
|
After Width: | Height: | Size: 194 KiB |
17
modules/features/wshowkeys/default.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{moduleWithSystem, ...}: {
|
||||||
|
flake.nixosModules.wshowkeys = moduleWithSystem ({
|
||||||
|
self',
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
lib = pkgs.lib;
|
||||||
|
in {
|
||||||
|
programs.wshowkeys = {
|
||||||
|
enable = true;
|
||||||
|
package = self'.packages.wshowkeys;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
perSystem = {inputs', ...}: {
|
||||||
|
packages.wshowkeys = inputs'.wshowkeys.packages.default;
|
||||||
|
};
|
||||||
|
}
|
||||||
105
modules/features/zsh/config.toml
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
console_title_template = '{{ .Shell }} in {{ .Folder }}'
|
||||||
|
version = 3
|
||||||
|
final_space = true
|
||||||
|
|
||||||
|
[secondary_prompt]
|
||||||
|
template = '❯❯ '
|
||||||
|
foreground = 'magenta'
|
||||||
|
background = 'transparent'
|
||||||
|
|
||||||
|
[transient_prompt]
|
||||||
|
template = '❯ '
|
||||||
|
background = 'transparent'
|
||||||
|
foreground_templates = ['{{if gt .Code 0}}red{{end}}', '{{if eq .Code 0}}magenta{{end}}']
|
||||||
|
|
||||||
|
[[blocks]]
|
||||||
|
type = 'prompt'
|
||||||
|
alignment = 'left'
|
||||||
|
newline = true
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
type = 'text'
|
||||||
|
style = 'plain'
|
||||||
|
template = '''
|
||||||
|
{{- if .Env.DEVSHELL_NAME -}}
|
||||||
|
{{- $parts := split "|" .Env.DEVSHELL_NAME -}}
|
||||||
|
{{- range $part := $parts -}}
|
||||||
|
{{- if $part -}}
|
||||||
|
{{- $sub := split "/" $part -}}
|
||||||
|
{{- if eq (len $sub) 2 -}}
|
||||||
|
<{{ index $sub "_1" }}>{{ index $sub "_0" }}</> <#7f849c>| </>
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
'''
|
||||||
|
|
||||||
|
[[blocks.segments]] # Hostname
|
||||||
|
type = 'text'
|
||||||
|
style = 'plain'
|
||||||
|
template = '{{ if eq .HostName "server02" }}<green> {{.HostName}}</> <#7f849c>|</> {{ end }}'
|
||||||
|
|
||||||
|
[[blocks.segments]] # Python venv
|
||||||
|
type = 'text'
|
||||||
|
style = 'plain'
|
||||||
|
template = '{{ if .Env.VIRTUAL_ENV }}<yellow>🐍 venv</> <#7f849c>|</> {{ end }}'
|
||||||
|
|
||||||
|
[[blocks.segments]] # Nix shell indicator
|
||||||
|
type = 'text'
|
||||||
|
style = 'plain'
|
||||||
|
template = '{{ if and .Env.IN_NIX_SHELL (not .Env.DEVSHELL_NAME) }}<blue> nsh</> <#7f849c>|</> {{ end }}'
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
template = '{{ .Path }}'
|
||||||
|
foreground = 'blue'
|
||||||
|
background = 'transparent'
|
||||||
|
type = 'path'
|
||||||
|
style = 'plain'
|
||||||
|
|
||||||
|
[blocks.segments.properties]
|
||||||
|
cache_duration = 'none'
|
||||||
|
style = 'full'
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}<yellow> *</>{{ end }} <cyan>{{ if gt .Behind 0 }}{{ end }}{{ if gt .Ahead 0 }}{{ end }}</>'
|
||||||
|
foreground = 'green'
|
||||||
|
background = 'transparent'
|
||||||
|
type = 'git'
|
||||||
|
style = 'plain'
|
||||||
|
|
||||||
|
[blocks.segments.properties]
|
||||||
|
branch_icon = ''
|
||||||
|
cache_duration = 'none'
|
||||||
|
commit_icon = '@'
|
||||||
|
fetch_status = true
|
||||||
|
|
||||||
|
[[blocks]]
|
||||||
|
type = 'rprompt'
|
||||||
|
overflow = 'hidden'
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
template = '{{ .FormattedMs }}'
|
||||||
|
foreground = 'yellow'
|
||||||
|
background = 'transparent'
|
||||||
|
type = 'executiontime'
|
||||||
|
style = 'plain'
|
||||||
|
|
||||||
|
[blocks.segments.properties]
|
||||||
|
cache_duration = 'none'
|
||||||
|
threshold = 5000
|
||||||
|
|
||||||
|
[[blocks]]
|
||||||
|
type = 'prompt'
|
||||||
|
alignment = 'left'
|
||||||
|
newline = true
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
template = '❯'
|
||||||
|
background = 'transparent'
|
||||||
|
type = 'text'
|
||||||
|
style = 'plain'
|
||||||
|
foreground_templates = ['{{if gt .Code 0}}red{{end}}', '{{if eq .Code 0}}magenta{{end}}']
|
||||||
|
|
||||||
|
[blocks.segments.properties]
|
||||||
|
cache_duration = 'none'
|
||||||
|
|
||||||
113
modules/features/zsh/default.nix
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.zsh = moduleWithSystem ({
|
||||||
|
pkgs,
|
||||||
|
self',
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
zsh = self'.packages.zsh;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
enableBashCompletion = true;
|
||||||
|
autosuggestions.enable = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
histSize = 10000;
|
||||||
|
};
|
||||||
|
users.defaultUserShell = pkgs.zsh;
|
||||||
|
});
|
||||||
|
perSystem = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
self',
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
packages = {
|
||||||
|
zsh = let
|
||||||
|
flakeLocation = builtins.getEnv "PWD";
|
||||||
|
in
|
||||||
|
lib.warnIf (flakeLocation == "") "Flake Location is undefined. Are you building in the right directory?"
|
||||||
|
inputs.wrappers.wrappers.zsh.wrap {
|
||||||
|
inherit pkgs;
|
||||||
|
runtimePkgs = [pkgs.carapace pkgs.devenv pkgs.fzf];
|
||||||
|
zshAliases = {
|
||||||
|
ls = "${lib.getExe pkgs.lsd} -l";
|
||||||
|
v = lib.getExe self'.packages.nvim;
|
||||||
|
cat = lib.getExe pkgs.bat;
|
||||||
|
lg = lib.getExe pkgs.lazygit;
|
||||||
|
man = "man -P \"${lib.getExe pkgs.bat} -p\"";
|
||||||
|
nsh = "nix-shell -p";
|
||||||
|
nrs =
|
||||||
|
if flakeLocation != ""
|
||||||
|
then "( cd ${flakeLocation} && sudo nixos-rebuild switch --impure --flake . )"
|
||||||
|
else "echo 'Flake location not specified. Did you build with --impure?'";
|
||||||
|
vinix =
|
||||||
|
if flakeLocation != ""
|
||||||
|
then "nvim --cmd 'cd ${flakeLocation}'"
|
||||||
|
else "echo 'Flake location not specified. Did you build with --impure?'";
|
||||||
|
};
|
||||||
|
zshrc.content = ''
|
||||||
|
source ${./devenv.zsh}
|
||||||
|
|
||||||
|
if (( ''${+terminfo[smkx]} )) && (( ''${+terminfo[rmkx]} )); then
|
||||||
|
function zle-line-init() { echoti smkx }
|
||||||
|
function zle-line-finish() { echoti rmkx }
|
||||||
|
zle -N zle-line-init
|
||||||
|
zle -N zle-line-finish
|
||||||
|
fi
|
||||||
|
|
||||||
|
autoload -U compinit && compinit
|
||||||
|
export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional
|
||||||
|
zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m'
|
||||||
|
source <(${lib.getExe pkgs.carapace} _carapace)
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||||
|
|
||||||
|
autoload -U select-word-style
|
||||||
|
select-word-style bash
|
||||||
|
|
||||||
|
autoload -U up-line-or-beginning-search down-line-or-beginning-search
|
||||||
|
zle -N up-line-or-beginning-search
|
||||||
|
zle -N down-line-or-beginning-search
|
||||||
|
bindkey "^[OA" up-line-or-beginning-search
|
||||||
|
bindkey "^[OB" down-line-or-beginning-search
|
||||||
|
|
||||||
|
bindkey "^[[1;5C" forward-word
|
||||||
|
bindkey "^[[1;5D" backward-word
|
||||||
|
bindkey "^[[3;5~" kill-word
|
||||||
|
bindkey "^H" backward-kill-word
|
||||||
|
|
||||||
|
source <(${lib.getExe pkgs.fzf} --zsh)
|
||||||
|
|
||||||
|
setopt NO_CASE_GLOB
|
||||||
|
|
||||||
|
${lib.getExe pkgs.any-nix-shell} zsh --info-right | source /dev/stdin
|
||||||
|
|
||||||
|
export EDITOR=nvim
|
||||||
|
|
||||||
|
eval "$(${lib.getExe self'.packages.ohMyPosh} init zsh)"
|
||||||
|
|
||||||
|
eval "$(${lib.getExe pkgs.devenv} hook zsh)"
|
||||||
|
|
||||||
|
typeset -ag precmd_functions
|
||||||
|
if (( ! ''${precmd_functions[(I)__devenv_reload_apply]} )); then
|
||||||
|
precmd_functions+=(__devenv_reload_apply)
|
||||||
|
fi
|
||||||
|
if (( ! ''${precmd_functions[(I)__devenv_restore_path]} )); then
|
||||||
|
precmd_functions+=(__devenv_restore_path)
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
ohMyPosh = inputs.wrappers.wrappers.oh-my-posh.wrap {
|
||||||
|
inherit pkgs;
|
||||||
|
configFile = ./config.toml;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
82
modules/features/zsh/devenv.zsh
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
__devenv_reload_apply() {
|
||||||
|
if [ -n "$DEVENV_RELOAD_FILE" ] && [ -f "$DEVENV_RELOAD_FILE" ]; then
|
||||||
|
local output
|
||||||
|
output=$(DEVENV_RELOAD_FILE="$DEVENV_RELOAD_FILE" bash <<'RELOAD_BASH' 2>/dev/null
|
||||||
|
__devenv_ignored_var() {
|
||||||
|
case "$1" in
|
||||||
|
_*|PWD|OLDPWD|SHLVL|SHELL|SHELLOPTS|BASHOPTS|BASH_*|HISTCMD|HISTFILE)
|
||||||
|
return 0 ;;
|
||||||
|
PS1|PS2|PS3|PS4|PROMPT|PROMPT_COMMAND|PROMPT_DIRTRIM)
|
||||||
|
return 0 ;;
|
||||||
|
COMP_*|READLINE_*|MAILCHECK|COLUMNS|LINES|RANDOM|SECONDS|LINENO|EPOCHSECONDS|EPOCHREALTIME|SRANDOM)
|
||||||
|
return 0 ;;
|
||||||
|
STARSHIP_*|__fish*|DIRENV_*|nix_saved_*)
|
||||||
|
return 0 ;;
|
||||||
|
*) return 1 ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
__devenv_capture_env() { declare -p -x 2>/dev/null | LC_ALL=C sort; }
|
||||||
|
__devenv_serialize_diff() { gzip -c | base64 -w0; }
|
||||||
|
__devenv_deserialize_diff() { echo "$1" | base64 -d | gzip -d 2>/dev/null; }
|
||||||
|
__devenv_compute_diff() {
|
||||||
|
local before_file="$1" after_file diff_content
|
||||||
|
after_file=$(mktemp); diff_content=$(mktemp)
|
||||||
|
__devenv_capture_env > "$after_file"
|
||||||
|
local -A before_vars after_vars
|
||||||
|
while IFS= read -r line; do
|
||||||
|
[[ "$line" != declare\ -x\ * ]] && continue
|
||||||
|
local vardef="${line#declare -x }" var="${vardef%%=*}"
|
||||||
|
[[ -z "$var" ]] && continue
|
||||||
|
__devenv_ignored_var "$var" && continue
|
||||||
|
before_vars["$var"]="$line"
|
||||||
|
done < "$before_file"
|
||||||
|
while IFS= read -r line; do
|
||||||
|
[[ "$line" != declare\ -x\ * ]] && continue
|
||||||
|
local vardef="${line#declare -x }" var="${vardef%%=*}"
|
||||||
|
[[ -z "$var" ]] && continue
|
||||||
|
__devenv_ignored_var "$var" && continue
|
||||||
|
after_vars["$var"]="$line"
|
||||||
|
done < "$after_file"
|
||||||
|
for var in "${!before_vars[@]}"; do
|
||||||
|
[[ "${after_vars[$var]}" != "${before_vars[$var]}" ]] && echo "P:${before_vars[$var]}" >> "$diff_content"
|
||||||
|
done
|
||||||
|
for var in "${!after_vars[@]}"; do
|
||||||
|
if [[ -z "${before_vars[$var]+x}" ]]; then echo "N:$var" >> "$diff_content"
|
||||||
|
elif [[ "${after_vars[$var]}" != "${before_vars[$var]}" ]]; then echo "N:$var" >> "$diff_content"; fi
|
||||||
|
done
|
||||||
|
_DEVENV_DIFF=$(__devenv_serialize_diff < "$diff_content"); export _DEVENV_DIFF
|
||||||
|
rm -f "$after_file" "$diff_content"
|
||||||
|
}
|
||||||
|
__devenv_apply_reverse_diff() {
|
||||||
|
[[ -z "$_DEVENV_DIFF" ]] && return
|
||||||
|
local -A prev_vars
|
||||||
|
local diff_content; diff_content=$(__devenv_deserialize_diff "$_DEVENV_DIFF")
|
||||||
|
while IFS= read -r line; do
|
||||||
|
if [[ "$line" == P:declare\ * ]]; then
|
||||||
|
local decl="${line#P:}" var="${decl#declare -x }"; var="${var%%=*}"
|
||||||
|
prev_vars["$var"]=1; eval "export ${decl#declare -x }" 2>/dev/null
|
||||||
|
fi
|
||||||
|
done <<< "$diff_content"
|
||||||
|
while IFS= read -r line; do
|
||||||
|
if [[ "$line" == N:* ]]; then
|
||||||
|
local var="${line#N:}"
|
||||||
|
[[ -z "${prev_vars[$var]+x}" ]] && unset "$var"
|
||||||
|
fi
|
||||||
|
done <<< "$diff_content"
|
||||||
|
}
|
||||||
|
__devenv_apply_reverse_diff
|
||||||
|
_before=$(mktemp); __devenv_capture_env > "$_before"
|
||||||
|
if { : >/dev/tty; } 2>/dev/null; then _devenv_reload_out=/dev/tty; else _devenv_reload_out=/dev/null; fi
|
||||||
|
source "$DEVENV_RELOAD_FILE" >"$_devenv_reload_out" 2>"$_devenv_reload_out"
|
||||||
|
rm -f "$DEVENV_RELOAD_FILE"; unset _devenv_reload_out
|
||||||
|
__devenv_compute_diff "$_before"; rm -f "$_before"
|
||||||
|
export -p
|
||||||
|
RELOAD_BASH
|
||||||
|
)
|
||||||
|
if [ -n "$output" ]; then eval "$output"; fi
|
||||||
|
_DEVENV_PATH="$PATH"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
__devenv_restore_path() {
|
||||||
|
[ -n "$_DEVENV_PATH" ] && export PATH="$_DEVENV_PATH"
|
||||||
|
}
|
||||||
22
modules/hosts/HACKSTATION/default.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosConfigurations.HACKSTATION = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
modules = with self.nixosModules; [
|
||||||
|
desktop
|
||||||
|
hackstationConfiguration
|
||||||
|
amdDrivers
|
||||||
|
youtube
|
||||||
|
development
|
||||||
|
bottles
|
||||||
|
gaming
|
||||||
|
davinci
|
||||||
|
sddm-autologin
|
||||||
|
nix-ld
|
||||||
|
|
||||||
|
i3
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
15
modules/hosts/HACKSTATION/hackstationConfiguration.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{...}: {
|
||||||
|
flake.nixosModules.hackstationConfiguration = {pkgs, ...}: {
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
networking = {
|
||||||
|
interfaces.enp5s0.wakeOnLan.enable = true;
|
||||||
|
hostName = "HACKSTATION";
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
tor-browser
|
||||||
|
tor
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
15
modules/hosts/mobile02/default.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosConfigurations.mobile02 = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
modules = with self.nixosModules; [
|
||||||
|
desktop
|
||||||
|
mobile02Configuration
|
||||||
|
intelDrivers
|
||||||
|
development
|
||||||
|
upower
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/hosts/mobile02/mobile02Configuration.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.mobile02Configuration = {...}: {
|
||||||
|
networking = {
|
||||||
|
hostName = "mobile02";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
services.libinput.enable = true;
|
|
||||||
|
|
||||||
services.displayManager.defaultSession = "hyprland";
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
desktopManager = {
|
|
||||||
xterm.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
windowManager.i3 = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
dmenu # application launcher most people use
|
|
||||||
i3status # gives you the default i3 status bar
|
|
||||||
xorg.xinit
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
10
modules/parts.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
config = {
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
29
modules/system/audio/default.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.audio = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
playerctl
|
||||||
|
pavucontrol
|
||||||
|
pulseaudioFull
|
||||||
|
];
|
||||||
|
services.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
nixpkgs.config.pulseaudio = true;
|
||||||
|
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
36
modules/system/core/boot.nix
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.bootloader = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
timeout = 2;
|
||||||
|
efi = {
|
||||||
|
canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
grub = {
|
||||||
|
efiSupport = true;
|
||||||
|
device = "nodev";
|
||||||
|
theme = pkgs.catppuccin-grub;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
plymouth = {
|
||||||
|
enable = true;
|
||||||
|
theme = "catppuccin-mocha";
|
||||||
|
themePackages = with pkgs; [
|
||||||
|
# By default we would install all themes
|
||||||
|
(catppuccin-plymouth.override {
|
||||||
|
variant = "mocha";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
42
modules/system/core/default.nix
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.core = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
modules = with self.nixosModules; [
|
||||||
|
user
|
||||||
|
bootloader
|
||||||
|
nix
|
||||||
|
hardware
|
||||||
|
locale
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
/etc/nixos/hardware-configuration.nix
|
||||||
|
]
|
||||||
|
++ modules;
|
||||||
|
services = {
|
||||||
|
openssh.enable = true;
|
||||||
|
avahi.enable = true;
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vim
|
||||||
|
unzip
|
||||||
|
p7zip-rar
|
||||||
|
usbutils
|
||||||
|
lsof
|
||||||
|
gvfs
|
||||||
|
libnotify
|
||||||
|
python315
|
||||||
|
curlWithGnuTls
|
||||||
|
wget
|
||||||
|
];
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
};
|
||||||
|
}
|
||||||
16
modules/system/core/hardware.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.hardware = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
hardware = {
|
||||||
|
bluetooth.enable = true;
|
||||||
|
xpadneo.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
32
modules/system/core/locale.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.locale = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
time.timeZone = "Europe/London";
|
||||||
|
i18n = {
|
||||||
|
defaultLocale = "en_GB.UTF-8";
|
||||||
|
extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_GB.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_GB.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_GB.UTF-8";
|
||||||
|
LC_MONETARY = "en_GB.UTF-8";
|
||||||
|
LC_NAME = "en_GB.UTF-8";
|
||||||
|
LC_NUMERIC = "en_GB.UTF-8";
|
||||||
|
LC_PAPER = "en_GB.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_GB.UTF-8";
|
||||||
|
LC_TIME = "en_GB.UTF-8";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "gb";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
console.keyMap = "uk";
|
||||||
|
};
|
||||||
|
}
|
||||||
52
modules/system/core/nix-settings.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{inputs, ...}: {
|
||||||
|
perSystem = {system, ...}: {
|
||||||
|
_module.args.unfreePkgs = import inputs.nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
flake.nixosModules.nix = {...}: {
|
||||||
|
nix = {
|
||||||
|
registry = {
|
||||||
|
voidarc = {
|
||||||
|
from = {
|
||||||
|
id = "voidarc";
|
||||||
|
type = "indirect";
|
||||||
|
};
|
||||||
|
to = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://git.voidarc.co.uk/voidarc/flakes.git";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
cores = 6;
|
||||||
|
trusted-users = ["root" "user01"];
|
||||||
|
download-buffer-size = 524288000;
|
||||||
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||||
|
optimise.automatic = true;
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "daily";
|
||||||
|
options = "--delete-older-than 5d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nixpkgs = {
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
packageOverrides = pkgs: {
|
||||||
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
modules/system/core/user.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.user = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
modules = with self.nixosModules; [
|
||||||
|
zsh
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
imports = modules;
|
||||||
|
users.users.user01 = {
|
||||||
|
isNormalUser = true;
|
||||||
|
initialPassword = "qwer";
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
description = "user01";
|
||||||
|
extraGroups = [
|
||||||
|
"root"
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
21
modules/system/desktop/default.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
moduleWithSystem,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.desktop = moduleWithSystem ({pkgs, ...}: let
|
||||||
|
modules = with self.nixosModules; [
|
||||||
|
core
|
||||||
|
hyprland
|
||||||
|
sddm
|
||||||
|
network
|
||||||
|
omnisearch
|
||||||
|
tailscale
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
imports = modules;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
mpv
|
||||||
|
];
|
||||||
|
});
|
||||||
|
}
|
||||||
34
modules/system/drivers/amd.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{...}: {
|
||||||
|
flake.nixosModules.amdDrivers = {pkgs, ...}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
mesa
|
||||||
|
rocmPackages.rocm-smi
|
||||||
|
rocmPackages.rocminfo
|
||||||
|
vulkan-tools
|
||||||
|
];
|
||||||
|
hardware = {
|
||||||
|
graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
libva-vdpau-driver
|
||||||
|
libvdpau-va-gl
|
||||||
|
rocmPackages.clr.icd
|
||||||
|
];
|
||||||
|
};
|
||||||
|
amdgpu = {
|
||||||
|
initrd.enable = true;
|
||||||
|
opencl.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.kernelParams = [
|
||||||
|
"amdgpu.ppfeaturemask=0xffffffff"
|
||||||
|
];
|
||||||
|
|
||||||
|
# For rOCM
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"L+ /opt/rocm - - - - ${pkgs.rocmPackages.clr}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
23
modules/system/drivers/intel.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.intelDrivers = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
mesa
|
||||||
|
vulkan-tools
|
||||||
|
];
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
intel-vaapi-driver
|
||||||
|
libva-vdpau-driver
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/system/drivers/upower.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{...}: {
|
||||||
|
flake.nixosModules.upower = {pkgs, ...}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
upower
|
||||||
|
];
|
||||||
|
services = {
|
||||||
|
upower.enable = true;
|
||||||
|
power-profiles-daemon.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
28
modules/system/network/default.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.nixosModules.network = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
networking = {
|
||||||
|
networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
dns = "none";
|
||||||
|
};
|
||||||
|
nameservers = [
|
||||||
|
"1.1.1.1"
|
||||||
|
"8.8.8.8"
|
||||||
|
];
|
||||||
|
firewall.enable = false;
|
||||||
|
};
|
||||||
|
services.unbound = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.NetworkManager-wait-online.enable = false;
|
||||||
|
};
|
||||||
|
}
|
||||||