mirror of
https://github.com/materusPL/nixos-config
synced 2026-07-04 13:26:42 +00:00
Compare commits
203 Commits
fd3599f7f3
..
old
| Author | SHA1 | Date | |
|---|---|---|---|
|
431fc8f7ae
|
|||
|
2921f8d9cc
|
|||
|
dba31836a5
|
|||
|
a556bc0e8a
|
|||
|
d99f184f31
|
|||
|
81cd54faa8
|
|||
|
a3d6fbeb40
|
|||
|
65492a133e
|
|||
|
15babc1afd
|
|||
|
1091489449
|
|||
|
834ead36d7
|
|||
|
fce385129f
|
|||
|
9c1b52829b
|
|||
|
ed47b3a9d3
|
|||
|
9884d1a8a3
|
|||
|
1e83c8adf7
|
|||
|
4f2a9a71a6
|
|||
|
c9eeaca475
|
|||
|
e85eda8035
|
|||
|
cf1895a14e
|
|||
|
18012450c0
|
|||
|
81f6d6f06d
|
|||
|
371b1b1432
|
|||
|
fd229ecd76
|
|||
|
f5d0d4065f
|
|||
|
c53025cdc4
|
|||
|
c8a9b3cf43
|
|||
|
730482c98b
|
|||
|
a69bbcbf6a
|
|||
|
434aae4ac5
|
|||
|
1ac33dd3a4
|
|||
|
7ddede1bb4
|
|||
|
1e929fedae
|
|||
|
3a1f46d4e6
|
|||
|
8b25020998
|
|||
|
99627a1343
|
|||
|
f7bfded848
|
|||
|
41b70d8fa4
|
|||
|
3146038d53
|
|||
|
7dc2a4befa
|
|||
|
9a1d03dd96
|
|||
|
2076d2c16b
|
|||
|
011ae1606b
|
|||
|
b81698d1e0
|
|||
|
1c84c80bfc
|
|||
|
9733c9fee4
|
|||
|
e374cc2f6f
|
|||
|
241d269789
|
|||
|
30ca0d4dcf
|
|||
|
35380d2465
|
|||
|
44228e35c9
|
|||
|
3c1f23b5d4
|
|||
|
3ee90d9e60
|
|||
|
1d99fb630f
|
|||
|
443da9482a
|
|||
|
1e436f0842
|
|||
|
fec28354bd
|
|||
|
9e97dc6f65
|
|||
|
3d1cc80150
|
|||
|
d3d3397c23
|
|||
|
20ace25096
|
|||
|
9652b3877f
|
|||
|
cecc49700e
|
|||
|
9a31ce388f
|
|||
|
0a20666db2
|
|||
|
ff3cd527f6
|
|||
|
3a6e84cb9c
|
|||
|
c0b1e1fe57
|
|||
|
8affc46e78
|
|||
|
41f8d29038
|
|||
|
2a09e184df
|
|||
|
828f5df566
|
|||
|
b2c7c75790
|
|||
|
ae24e92771
|
|||
|
c390ed0977
|
|||
|
8dbe62606b
|
|||
|
ec15512b0e
|
|||
|
729dce48c5
|
|||
|
9761f22f0c
|
|||
|
b6dbd01553
|
|||
|
8643263568
|
|||
|
5550ce20e7
|
|||
|
6590f99c8d
|
|||
|
aaf9221f44
|
|||
|
fde5aa4bda
|
|||
|
a2cfe918f4
|
|||
|
08870222f3
|
|||
|
2971dd2dc7
|
|||
|
eb746b0e7c
|
|||
|
868a49fb74
|
|||
|
4912a5bc99
|
|||
|
cf452a09ed
|
|||
|
d9995faa9a
|
|||
|
11987e1f3b
|
|||
|
1154c45291
|
|||
|
a69b24ac89
|
|||
|
58f86d3b84
|
|||
|
4dfcc37c3c
|
|||
|
319f3899ab
|
|||
|
b7c314c6cc
|
|||
|
8425f3547c
|
|||
|
d3a1c9260a
|
|||
|
a5199290d4
|
|||
|
0113129093
|
|||
|
1056568b6c
|
|||
|
c2f4b59d90
|
|||
|
1ab225b553
|
|||
|
4737695b57
|
|||
|
0a163b6dc0
|
|||
|
badbe9c8d2
|
|||
|
bb86604348
|
|||
|
0ecfadd82c
|
|||
|
5b908cb519
|
|||
|
9a209160a9
|
|||
|
935de5f352
|
|||
|
c4fccc6f11
|
|||
|
a14063f51d
|
|||
|
a1cf15a3ad
|
|||
|
6d16c995e2
|
|||
|
6ac8524294
|
|||
|
533691247d
|
|||
|
a075a51ed4
|
|||
|
55264c7d5e
|
|||
|
006250b806
|
|||
|
8327d4cfd3
|
|||
|
710108fd6f
|
|||
|
59aaa7f319
|
|||
|
cba573ed94
|
|||
|
fecfdec551
|
|||
|
6bb1330d70
|
|||
|
5b84ce4c5d
|
|||
|
2e8ee98b26
|
|||
|
1f822e8211
|
|||
|
f8acddeb2c
|
|||
|
d4b7c80be6
|
|||
|
7135b53f7d
|
|||
|
879c876721
|
|||
|
79bc6c72df
|
|||
|
c5602cebbf
|
|||
|
ed1b629386
|
|||
|
448e1c58ae
|
|||
|
e233dc9efa
|
|||
|
dd0283e65a
|
|||
|
3406af1780
|
|||
|
f892292aa0
|
|||
|
b9f78639c8
|
|||
|
f0e03b7e01
|
|||
|
fde2617ea8
|
|||
|
fd5e096b37
|
|||
|
4452704de0
|
|||
|
5c9fb14d41
|
|||
|
7ef15e5f5a
|
|||
|
8f2f6b2c37
|
|||
|
e7bff66b1e
|
|||
|
04808eb9da
|
|||
|
b5fa9e6f4c
|
|||
|
1381df6297
|
|||
|
ab0f13a542
|
|||
|
25fffb3879
|
|||
|
9c9d53b976
|
|||
|
bb4b85013c
|
|||
|
c5aeae2cff
|
|||
|
5e96a9fcca
|
|||
|
4fdee87636
|
|||
|
87bdc15245
|
|||
|
b9ce475a3e
|
|||
|
3dc734957e
|
|||
|
f833382298
|
|||
|
94db4c8851
|
|||
|
ffa133d894
|
|||
|
7abe845c5a
|
|||
|
6a1700f0b7
|
|||
|
c8cbb1f2f9
|
|||
|
afbe226504
|
|||
|
3403a4cb3b
|
|||
|
672349895d
|
|||
|
30ca179cb2
|
|||
|
2c27517ab1
|
|||
|
5de90edd9c
|
|||
|
e0394f866c
|
|||
|
3ec62e702a
|
|||
|
026b04add6
|
|||
|
711b0a7860
|
|||
|
a3b69adbdd
|
|||
|
0040f1d23e
|
|||
|
33d7f92b92
|
|||
|
f122625e71
|
|||
|
d9c5af566b
|
|||
|
7d90f5f210
|
|||
|
636eb2a8e6
|
|||
|
b4cafcfe3a
|
|||
|
a8fc766902
|
|||
|
c04f1f41fd
|
|||
|
ab43f858ea
|
|||
|
f4dd3ab0ac
|
|||
|
c4beb9542b
|
|||
|
143a8ef419
|
|||
|
3abec20d7f
|
|||
|
7d42994f21
|
|||
|
cff5051f75
|
|||
|
e901f042fb
|
|||
|
400dadba7f
|
|||
|
c6cdd9d8af
|
@@ -1 +1,2 @@
|
||||
\#*\#
|
||||
.vscode
|
||||
@@ -1,18 +0,0 @@
|
||||
# nixos-config
|
||||
My NixOS and home-manager configs.
|
||||
Dotfiles and helper scripts.
|
||||
|
||||
Not all config is here, some I keep in private flake.
|
||||
|
||||
## Hosts
|
||||
materusPC - my main PC
|
||||
|
||||
Old-materusPC - my old PC, barely used
|
||||
|
||||
flamaster - my laptop, used mostly as server for games.
|
||||
|
||||
valkyrie - VPS, my website and pleroma instance
|
||||
|
||||
waffentrager - raspberry pi4, home server
|
||||
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
#+TITLE: nixos-config
|
||||
#+AUTHOR: materus
|
||||
#+DESCRIPTION: NixOS config and dotfiles
|
||||
#+OPTIONS: \n:t
|
||||
My NixOS and home-manager configs.
|
||||
Dotfiles and helper scripts.
|
||||
|
||||
Part of it is encrypted by git-crypt, mostly just ips and names. Secrets are managed by sops.
|
||||
|
||||
* Hosts
|
||||
[[./configurations/host/materusPC/][materusPC]] - my main PC
|
||||
|
||||
[[./configurations/host/Old-materusPC/][Old-materusPC]] - my old PC, barely used
|
||||
|
||||
[[./configurations/host/flamaster/][flamaster]] - my laptop, used mostly as server for games.
|
||||
|
||||
[[./configurations/host/valkyrie/][valkyrie]] - VPS, my website and pleroma instance
|
||||
|
||||
[[./configurations/host/waffentrager/][waffentrager]] - raspberry pi4, home server
|
||||
|
||||
|
||||
@@ -2,25 +2,43 @@
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, materusArg, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
config,
|
||||
pkgs,
|
||||
materusCfg,
|
||||
materusArg,
|
||||
...
|
||||
}:
|
||||
let
|
||||
unstable = import materusCfg.materusFlake.inputs.nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
nvidia.acceptLicense = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./network.nix
|
||||
];
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
nix.settings.auto-optimise-store = true;
|
||||
nix.settings.substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
nix.settings.trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
|
||||
nix.settings.trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
@@ -32,21 +50,21 @@
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
boot.tmpOnTmpfs = true;
|
||||
boot.kernelPackages = unstable.linuxPackages_zen;
|
||||
boot.tmp.useTmpfs = true;
|
||||
|
||||
services.flatpak.enable = true;
|
||||
services.gvfs.enable = true;
|
||||
|
||||
networking.hostName = "Old-materusPC"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
programs.kdeconnect.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Warsaw";
|
||||
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "materus";
|
||||
dataDir = "/home/materus";
|
||||
};
|
||||
services.fstrim = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
@@ -67,22 +85,13 @@
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
|
||||
hardware.opengl.enable = true;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
|
||||
materus.profile.steam.enable = true;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
materus.profile.steam.enable = false;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.layout = "pl";
|
||||
services.xserver.xkb.layout = "pl";
|
||||
# services.xserver.xkbOptions = {
|
||||
# "eurosign:e";
|
||||
# "caps:escape" # map caps to escape.
|
||||
@@ -92,19 +101,25 @@
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
#sound.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
systemWide = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
jack.enable = true;
|
||||
};
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
|
||||
services.udev = {
|
||||
extraRules = ''
|
||||
KERNEL=="rtc0", GROUP="audio"
|
||||
KERNEL=="hpet", GROUP="audio"
|
||||
DEVPATH=="/devices/virtual/misc/cpu_dma_latency", OWNER="root", GROUP="audio", MODE="0660"
|
||||
'';
|
||||
};
|
||||
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
@@ -112,14 +127,35 @@
|
||||
dockerSocket.enable = true;
|
||||
};
|
||||
|
||||
|
||||
users.users.materus = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" "kvm" "input" "libvirt" "libvirtd" "podman" ];
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"kvm"
|
||||
"input"
|
||||
"libvirt"
|
||||
"libvirtd"
|
||||
"podman"
|
||||
"audio"
|
||||
"pipewire"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
description = "Mateusz Słodkowicz";
|
||||
|
||||
};
|
||||
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
onBoot = "ignore";
|
||||
onShutdown = "shutdown";
|
||||
qemu.ovmf.enable = true;
|
||||
qemu.ovmf.packages = [ pkgs.OVMFFull.fd ];
|
||||
qemu.runAsRoot = true;
|
||||
qemu.swtpm.enable = true;
|
||||
qemu.package = pkgs.qemu_full;
|
||||
};
|
||||
|
||||
environment.sessionVariables = rec {
|
||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
||||
XDG_CONFIG_HOME = "\${HOME}/.config";
|
||||
@@ -131,9 +167,7 @@
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
|
||||
|
||||
MOZ_USE_XINPUT2 = "1";
|
||||
PATH = [
|
||||
"\${XDG_BIN_HOME}"
|
||||
];
|
||||
PATH = [ "\${XDG_BIN_HOME}" ];
|
||||
};
|
||||
environment.shellInit = ''
|
||||
if ! [ -z "$DISPLAY" ]; then xhost +si:localuser:root &> /dev/null; fi;
|
||||
@@ -142,13 +176,23 @@
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
|
||||
|
||||
|
||||
|
||||
i18n.inputMethod.enabled = "fcitx5";
|
||||
i18n.inputMethod.fcitx5.addons = [ pkgs.fcitx5-configtool pkgs.fcitx5-lua pkgs.fcitx5-mozc pkgs.libsForQt5.fcitx5-qt ];
|
||||
i18n.inputMethod.fcitx5.addons = [
|
||||
pkgs.fcitx5-configtool
|
||||
pkgs.fcitx5-lua
|
||||
pkgs.fcitx5-mozc
|
||||
pkgs.libsForQt5.fcitx5-qt
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
(vivaldi.overrideAttrs
|
||||
(oldAttrs: {
|
||||
dontWrapQtApps = false;
|
||||
dontPatchELF = true;
|
||||
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [pkgs.kdePackages.wrapQtAppsHook];
|
||||
}))
|
||||
|
||||
brave
|
||||
|
||||
glibc
|
||||
@@ -163,10 +207,14 @@
|
||||
curl
|
||||
jdk
|
||||
nss_latest
|
||||
aspell
|
||||
aspellDicts.pl
|
||||
aspellDicts.en
|
||||
aspellDicts.en-computers
|
||||
(aspellWithDicts (
|
||||
ds: with ds; [
|
||||
en
|
||||
en-computers
|
||||
en-science
|
||||
pl
|
||||
]
|
||||
))
|
||||
distrobox
|
||||
p7zip
|
||||
unrar
|
||||
@@ -177,6 +225,7 @@
|
||||
xz
|
||||
zip
|
||||
gzip
|
||||
sops
|
||||
|
||||
tree
|
||||
mc
|
||||
@@ -187,12 +236,9 @@
|
||||
iptraf-ng
|
||||
mprocs
|
||||
|
||||
|
||||
|
||||
nix-du
|
||||
git-crypt
|
||||
|
||||
|
||||
wineWowPackages.stagingFull
|
||||
winetricks
|
||||
protontricks
|
||||
@@ -205,9 +251,6 @@
|
||||
inkscape
|
||||
gimp
|
||||
|
||||
|
||||
|
||||
|
||||
virt-manager
|
||||
libguestfs
|
||||
|
||||
@@ -218,12 +261,11 @@
|
||||
|
||||
binutils
|
||||
|
||||
|
||||
];
|
||||
|
||||
fonts.fontDir.enable = true;
|
||||
fonts.enableDefaultFonts = true;
|
||||
fonts.fonts = with pkgs; [
|
||||
fonts.enableDefaultPackages = true;
|
||||
fonts.packages = with pkgs; [
|
||||
dejavu_fonts
|
||||
hack-font
|
||||
noto-fonts
|
||||
@@ -234,27 +276,47 @@
|
||||
ubuntu_font_family
|
||||
wqy_zenhei
|
||||
monocraft
|
||||
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "Meslo" "ProFont" ]; })
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts.droid-sans-mono
|
||||
nerd-fonts.meslo-lg
|
||||
nerd-fonts.profont
|
||||
];
|
||||
fonts.fontconfig.enable = true;
|
||||
fonts.fontconfig.cache32Bit = true;
|
||||
fonts.fontconfig.defaultFonts.sansSerif = [ "Noto Sans" "DejaVu Sans" "WenQuanYi Zen Hei" "Noto Color Emoji" ];
|
||||
fonts.fontconfig.defaultFonts.serif = [ "Noto Serif" "DejaVu Serif" "WenQuanYi Zen Hei" "Noto Color Emoji" ];
|
||||
fonts.fontconfig.defaultFonts.emoji = [ "Noto Color Emoji" "OpenMoji Color" ];
|
||||
fonts.fontconfig.defaultFonts.monospace = [ "Hack Nerd Font" "Noto Sans Mono" "WenQuanYi Zen Hei Mono" ];
|
||||
|
||||
fonts.fontconfig.defaultFonts.sansSerif = [
|
||||
"Noto Sans"
|
||||
"DejaVu Sans"
|
||||
"WenQuanYi Zen Hei"
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
fonts.fontconfig.defaultFonts.serif = [
|
||||
"Noto Serif"
|
||||
"DejaVu Serif"
|
||||
"WenQuanYi Zen Hei"
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
fonts.fontconfig.defaultFonts.emoji = [
|
||||
"Noto Color Emoji"
|
||||
"OpenMoji Color"
|
||||
];
|
||||
fonts.fontconfig.defaultFonts.monospace = [
|
||||
"Hack Nerd Font"
|
||||
"Noto Sans Mono"
|
||||
"WenQuanYi Zen Hei Mono"
|
||||
];
|
||||
|
||||
environment.enableAllTerminfo = true;
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
dedicatedServer.openFirewall = true;
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
fish.enable = true;
|
||||
java.enable = true;
|
||||
java.package = pkgs.graalvmPackages.graalvm-oracle;
|
||||
command-not-found.enable = false;
|
||||
dconf.enable = true;
|
||||
};
|
||||
@@ -263,14 +325,15 @@
|
||||
# programs.mtr.enable = true;
|
||||
services.pcscd.enable = true;
|
||||
|
||||
/*systemd.user.services.gpg-agent.serviceConfig.ExecStart = [
|
||||
/*
|
||||
systemd.user.services.gpg-agent.serviceConfig.ExecStart = [
|
||||
""
|
||||
''
|
||||
${pkgs.gnupg}/bin/gpg-agent --supervised \
|
||||
--pinentry-program ${pkgs.kwalletcli}/bin/pinentry-kwallet
|
||||
''
|
||||
];*/
|
||||
|
||||
];
|
||||
*/
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
@@ -284,13 +347,6 @@
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 24800 5900 5357 4656 ];
|
||||
networking.firewall.allowedUDPPorts = [ 24800 5900 3702 4656 ];
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = true;
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
@@ -305,4 +361,3 @@
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,82 +1,143 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" "vfio-pci" ];
|
||||
boot.kernelModules = [
|
||||
"kvm-intel"
|
||||
"vfio-pci"
|
||||
];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.kernel.sysctl = { "vm.swappiness" = 10; };
|
||||
boot.kernelParams = [ "ibt=off" "intel_iommu=on" "iommu=pt" "pcie_acs_override=downstream,multifunction" ];
|
||||
fileSystems."/" =
|
||||
boot.kernel.sysctl = {
|
||||
"vm.swappiness" = 10;
|
||||
};
|
||||
boot.kernelParams = [
|
||||
"ibt=off"
|
||||
"intel_iommu=on"
|
||||
"iommu=pt"
|
||||
"pcie_acs_override=downstream,multifunction"
|
||||
];
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NixOS_Root";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@"
|
||||
"noatime"
|
||||
"ssd"
|
||||
"space_cache=v2"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/NixOS_Root";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@boot"
|
||||
"ssd"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/materus" = {
|
||||
device = "/dev/disk/by-label/NixOS_Root";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@materus"
|
||||
"noatime"
|
||||
"compress=zstd"
|
||||
"ssd"
|
||||
"space_cache=v2"
|
||||
];
|
||||
neededForBoot = true;
|
||||
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-label/NixOS_Root";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@nix"
|
||||
"noatime"
|
||||
"compress=zstd"
|
||||
"ssd"
|
||||
"space_cache=v2"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-label/NixOS_Home";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@home"
|
||||
"nossd"
|
||||
"noatime"
|
||||
"compress=zstd"
|
||||
"space_cache=v2"
|
||||
"autodefrag"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/materus/data" = {
|
||||
device = "/dev/disk/by-label/NixOS_Home";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@data"
|
||||
"nossd"
|
||||
"noatime"
|
||||
"compress=zstd"
|
||||
"space_cache=v2"
|
||||
"autodefrag"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" = {
|
||||
device = "/dev/disk/by-uuid/A5C2-31D1";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
memoryPercent = 50;
|
||||
priority = 10;
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/dev/disk/by-label/NixOS_Root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" "noatime" "ssd" "space_cache=v2" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
device = "/var/lib/swapfile";
|
||||
size = 32 * 1024;
|
||||
priority = 5;
|
||||
}
|
||||
{
|
||||
device = "/dev/disk/by-label/NixOS_Root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@boot" "ssd" ];
|
||||
};
|
||||
|
||||
fileSystems."/materus" =
|
||||
{
|
||||
device = "/dev/disk/by-label/NixOS_Root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@materus" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
|
||||
neededForBoot = true;
|
||||
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{
|
||||
device = "/dev/disk/by-label/NixOS_Root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@nix" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{
|
||||
device = "/dev/disk/by-label/NixOS_Home";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@home" "nossd" "noatime" "compress=zstd" "space_cache=v2" "autodefrag" ];
|
||||
};
|
||||
|
||||
fileSystems."/materus/data" =
|
||||
{
|
||||
device = "/dev/disk/by-label/NixOS_Home";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@data" "nossd" "noatime" "compress=zstd" "space_cache=v2" "autodefrag" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/A5C2-31D1";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-label/NixOS_Swap"; }];
|
||||
|
||||
fileSystems."/etc/nixos" =
|
||||
{
|
||||
device = "/materus/config/nixos-config";
|
||||
fsType = "none";
|
||||
options = [ "bind" ];
|
||||
depends = [ "/materus" ];
|
||||
};
|
||||
|
||||
device = "/dev/disk/by-label/NixOS_Swap";
|
||||
priority = 0;
|
||||
}
|
||||
];
|
||||
|
||||
fileSystems."/etc/nixos" = {
|
||||
device = "/materus/config/nixos-config";
|
||||
fsType = "none";
|
||||
options = [ "bind" ];
|
||||
depends = [ "/materus" ];
|
||||
};
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, materusArg, lib, ... }:
|
||||
{ config, pkgs, materusArg, materusCfg, lib, ... }:
|
||||
{
|
||||
home.stateVersion = "22.11";
|
||||
home.homeDirectory = "/home/materus";
|
||||
@@ -13,6 +13,38 @@
|
||||
gpg.format = "ssh";
|
||||
};
|
||||
};
|
||||
|
||||
programs.vscode.userSettings = {
|
||||
"vscord.app.name" = "VSCodium";
|
||||
"window.dialogStyle" = "custom";
|
||||
"window.titleBarStyle" = "custom";
|
||||
"editor.fontFamily" = "'Hack Nerd Font', 'monospace', monospace";
|
||||
"workbench.colorTheme" = "Dracula Theme";
|
||||
"workbench.productIconTheme" = "material-product-icons";
|
||||
"workbench.iconTheme" = "material-icon-theme";
|
||||
|
||||
"d.aggressiveUpdate" = false;
|
||||
"d.servedPath" = "${pkgs.serve-d}/bin/serve-d";
|
||||
|
||||
"direnv.path.executable" = "${pkgs.direnv}/bin/direnv";
|
||||
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = "${pkgs.nixd}/bin/nixd";
|
||||
"nix.formatterPath" = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
|
||||
|
||||
"C_Cpp.clang_format_path" = "${pkgs.clang-tools}/bin/clang-format";
|
||||
"C_Cpp.clang_format_fallbackStyle" = "Microsoft";
|
||||
"clang-tidy.executable" = "${pkgs.clang-tools}/bin/clang-tidy";
|
||||
|
||||
"typescript.tsserver.maxTsServerMemory" = 1024 * 8;
|
||||
"typescript.tsserver.nodePath"= lib.mkDefault "${pkgs.nodejs}/bin/node";
|
||||
|
||||
"python.defaultInterpreterPath" = "${pkgs.python3Full}/bin/python";
|
||||
"[cpp]" = {
|
||||
"editor.defaultFormatter" = "xaver.clang-format";
|
||||
};
|
||||
};
|
||||
|
||||
materus.profile = {
|
||||
fonts.enable = lib.mkDefault true;
|
||||
nixpkgs.enable = lib.mkDefault false;
|
||||
@@ -20,7 +52,8 @@
|
||||
enableTerminal = lib.mkDefault true;
|
||||
enableTerminalExtra = lib.mkDefault true;
|
||||
enableNixDevel = lib.mkDefault true;
|
||||
editor.code.fhs.enable = true;
|
||||
editor.code.fhs.enable = false;
|
||||
|
||||
editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_16; in [
|
||||
llvmpkgs.clang
|
||||
llvmpkgs.llvm
|
||||
@@ -68,12 +101,61 @@
|
||||
dub
|
||||
]);
|
||||
|
||||
editor.emacs.enable = false;
|
||||
editor.emacs.enable = true;
|
||||
|
||||
};
|
||||
xdg.desktopEntries.brave-browser =
|
||||
let
|
||||
env = lib.concatStringsSep " " [
|
||||
''__NV_PRIME_RENDER_OFFLOAD="1"''
|
||||
''__NV_PRIME_RENDER_OFFLOAD_PROVIDER="NVIDIA-G0"''
|
||||
''__GLX_VENDOR_LIBRARY_NAME="nvidia"''
|
||||
''__VK_LAYER_NV_optimus="NVIDIA_only"''
|
||||
''NIXOS_OZONE_WL="1"''
|
||||
];
|
||||
script = pkgs.writeShellScript "brave" ''
|
||||
${env} brave "$@"
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
name = "Brave Web Browser";
|
||||
genericName = "Przeglądarka WWW";
|
||||
comment = "Skorzystaj z internetu";
|
||||
exec = "${script} %U";
|
||||
icon = "brave-browser";
|
||||
terminal = false;
|
||||
categories = [ "Application" "Network" "WebBrowser" ];
|
||||
mimeType = [
|
||||
"application/pdf"
|
||||
"application/rdf+xml"
|
||||
"application/rss+xml"
|
||||
"application/xhtml+xml"
|
||||
"application/xhtml_xml"
|
||||
"application/xml"
|
||||
"image/gif"
|
||||
"image/jpeg"
|
||||
"image/png"
|
||||
"image/webp"
|
||||
"text/html"
|
||||
"text/xml"
|
||||
"x-scheme-handler/http"
|
||||
"x-scheme-handler/https"
|
||||
"x-scheme-handler/ipfs"
|
||||
"x-scheme-handler/ipns"
|
||||
];
|
||||
actions.new-windows = {
|
||||
exec = "${script}";
|
||||
name = "Nowe okno";
|
||||
};
|
||||
actions.new-private-windows = {
|
||||
exec = "${script} --incognito";
|
||||
name = "Nowe okno incognito";
|
||||
};
|
||||
};
|
||||
home.packages = [
|
||||
pkgs.papirus-icon-theme
|
||||
(materusArg.pkgs.polymc.wrap { extraJDKs = [ pkgs.graalvmPackages.graalvm-oracle pkgs.graalvmPackages.graalvm-oracle_17]; })
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
{ config, pkgs, lib, materusArg, ... }:
|
||||
{
|
||||
sops.templates."networkmanager.env".content = ''
|
||||
WIREGUARD_PRIVATEKEY="${config.sops.placeholder.wg-key}"
|
||||
'';
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
networking.hostName = "Old-materusPC";
|
||||
networking.wireless.iwd.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 24800 5900 5357 4656
|
||||
22000 config.services.syncthing.relay.statusPort config.services.syncthing.relay.port # Syncthing
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [ 24800 5900 3702 4656
|
||||
22000 21027 # Syncthing
|
||||
];
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = true;
|
||||
networking.networkmanager.settings = {
|
||||
connectivity = {
|
||||
uri = "http://nmcheck.gnome.org/check_network_status.txt";
|
||||
};
|
||||
};
|
||||
|
||||
networking.networkmanager.ensureProfiles.environmentFiles = [
|
||||
config.sops.templates."networkmanager.env".path
|
||||
];
|
||||
networking.networkmanager.ensureProfiles.profiles = {
|
||||
wg0 = {
|
||||
connection = {
|
||||
id = "wg0";
|
||||
type = "wireguard";
|
||||
interface-name = "wg0";
|
||||
};
|
||||
wireguard = {
|
||||
private-key = "$WIREGUARD_PRIVATEKEY";
|
||||
};
|
||||
"wireguard-peer.${materusArg.wireguard.pubKeys.valkyrie}" = {
|
||||
endpoint = "${materusArg.ips.valkyrie}:${materusArg.wireguard.port}";
|
||||
allowed-ips = "${materusArg.ip-masks.wireguard.main};${materusArg.ip-masks.wireguard.guest};${materusArg.ip-masks.wireguard.asia};${materusArg.ips.wireguard.valkyrie}/32;";
|
||||
persistent-keepalive = "20";
|
||||
};
|
||||
ipv4 = {
|
||||
address1 = "${materusArg.ips.wireguard.Old-materusPC}/32";
|
||||
dns = "${materusArg.ips.wireguard.valkyrie};";
|
||||
method = "manual";
|
||||
never-default = "true";
|
||||
};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "stable-privacy";
|
||||
method = "disabled";
|
||||
};
|
||||
proxy = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -2,17 +2,10 @@
|
||||
{
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = true;
|
||||
prime = {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
open = true;
|
||||
|
||||
};
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
@@ -28,5 +21,9 @@
|
||||
];
|
||||
materus.profile.steam.extraEnv = {
|
||||
VK_ICD_FILENAMES=''''$VK_ICD_FILENAMES:/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json:/run/opengl-driver-32/share/vulkan/icd.d/nvidia_icd.i686.json'';
|
||||
__NV_PRIME_RENDER_OFFLOAD="1";
|
||||
__NV_PRIME_RENDER_OFFLOAD_PROVIDER="NVIDIA-G0";
|
||||
__GLX_VENDOR_LIBRARY_NAME="nvidia";
|
||||
__VK_LAYER_NV_optimus="NVIDIA_only";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.displayManager.sddm.wayland.enable = true;
|
||||
services.xserver.displayManager.sddm.settings = {
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.displayManager.sddm.wayland.enable = true;
|
||||
services.displayManager.sddm.settings = {
|
||||
General = {
|
||||
InputMethod = "";
|
||||
};
|
||||
@@ -16,6 +16,10 @@
|
||||
QT_PLUGIN_PATH = [ "${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}" ];
|
||||
XCURSOR_THEME = "breeze_cursors";
|
||||
};
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.wlr.enable = true;
|
||||
xdg.portal.xdgOpenUsePortal = true;
|
||||
xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.desktopManager.plasma6.enableQt5Integration = true;
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [ kwallet kwalletmanager kwallet-pam ];
|
||||
|
||||
@@ -13,6 +13,7 @@ let
|
||||
inherit host;
|
||||
inherit hm;
|
||||
inherit hmAsModule;
|
||||
inherit arch;
|
||||
nixerus = if stable then inputs.configInputs-stable.nixerus else inputs.configInputs.nixerus;
|
||||
configInputs = if stable then inputs.configInputs-stable else inputs.configInputs;
|
||||
path = materusFlake.selfPath;
|
||||
@@ -30,9 +31,13 @@ let
|
||||
(if hmAsModule then hm.nixosModules.home-manager else { })
|
||||
(if hmAsModule then
|
||||
{
|
||||
|
||||
home-manager.backupFileExtension = "hm-backup";
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.sharedModules = [
|
||||
materusCfg.configInputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
materusCfg.configInputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
home-manager.users = (builtins.foldl' (a: b: a // b) { } (builtins.map
|
||||
(user: {
|
||||
${user} = ({ ... }:
|
||||
@@ -52,10 +57,10 @@ let
|
||||
}) // { inherit materusCfg; };
|
||||
in
|
||||
{
|
||||
materusPC = makeSystem { host = "materusPC"; stable = false; };
|
||||
materusPC = makeSystem { host = "materusPC"; stable = true; };
|
||||
flamaster = makeSystem { host = "flamaster"; stable = true; };
|
||||
valkyrie = makeSystem { host = "valkyrie"; stable = true; };
|
||||
waffentrager = makeSystem { host = "waffentrager"; stable = true; arch = "aarch64-linux"; };
|
||||
|
||||
Old-materusPC = makeSystem { host = "Old-materusPC"; stable = false; };
|
||||
Old-materusPC = makeSystem { host = "Old-materusPC"; stable = true; };
|
||||
}
|
||||
|
||||
@@ -56,11 +56,12 @@
|
||||
time.timeZone = "Europe/Warsaw";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "pl_PL.utf8";
|
||||
i18n.defaultLocale = "pl_PL.UTF-8";
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
hardware.nvidia.open = false;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.opengl.enable = true;
|
||||
hardware.nvidia.prime = {
|
||||
@@ -76,7 +77,7 @@
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
services.xserver.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
@@ -91,7 +92,7 @@
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
#sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
@@ -108,7 +109,7 @@
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
services.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.materus = {
|
||||
@@ -117,7 +118,7 @@
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ];
|
||||
packages = with pkgs; [
|
||||
kate
|
||||
kdePackages.kate
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
@@ -138,7 +139,7 @@
|
||||
distrobox
|
||||
|
||||
|
||||
config.materus.profile.packages.firefox
|
||||
firefox
|
||||
config.programs.java.package
|
||||
|
||||
|
||||
@@ -156,37 +157,40 @@
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.openssh.settings.PermitRootLogin = "no";
|
||||
services.openssh.settings.PasswordAuthentication = false;
|
||||
services.openssh.openFirewall = true;
|
||||
programs.ssh.startAgent = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 22 27015 25565 24454 8123 ];
|
||||
networking.firewall.allowedTCPPorts = [ 22 27015 25565 25570 8123 8100 24800 ];
|
||||
networking.firewall.allowedTCPPortRanges = [{ from = 16262; to = 16272; }];
|
||||
networking.firewall.allowedUDPPorts = [ 22 16261 16262 8766 8767 25565 24454 8123 ];
|
||||
networking.firewall.allowedUDPPorts = [ 22 16261 16262 8766 8767 25565 24454 8123 24800 ];
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = true;
|
||||
|
||||
networking.networkmanager.extraConfig = lib.mkDefault ''
|
||||
[connectivity]
|
||||
uri=http://nmcheck.gnome.org/check_network_status.txt
|
||||
'';
|
||||
networking.networkmanager.settings = {
|
||||
connectivity = { uri = lib.mkDefault "http://nmcheck.gnome.org/check_network_status.txt"; };
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
|
||||
|
||||
programs.neovim.enable = true;
|
||||
programs.neovim.vimAlias = true;
|
||||
programs.neovim.viAlias = true;
|
||||
programs.neovim.enable = true;
|
||||
programs.neovim.vimAlias = true;
|
||||
programs.neovim.viAlias = true;
|
||||
|
||||
services.flatpak.enable = true;
|
||||
xdg.portal.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
xdg.portal.enable = true;
|
||||
|
||||
virtualisation.podman.enable = true;
|
||||
virtualisation.podman.dockerCompat = true;
|
||||
virtualisation.podman.enableNvidia = true;
|
||||
virtualisation.podman.dockerSocket.enable = true;
|
||||
}
|
||||
virtualisation.podman.enable = true;
|
||||
virtualisation.podman.dockerCompat = true;
|
||||
virtualisation.podman.enableNvidia = true;
|
||||
virtualisation.podman.dockerSocket.enable = true;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
./configuration.nix
|
||||
];
|
||||
materus.profile.nix.enable = true;
|
||||
materus.profile.steam.enable = true;
|
||||
#materus.profile.steam.enable = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,12 @@
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@nix" "noatime" "compress=zstd" "ssd" "space_cache=v2" ];
|
||||
};
|
||||
fileSystems."/data" =
|
||||
{
|
||||
device = "/dev/disk/by-label/HDD_DATA";
|
||||
fsType = "btrfs";
|
||||
options = [ "noatime" "compress=zstd" "nossd" "autodefrag" ];
|
||||
};
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
device = "/dev/disk/by-label/NixOS_Root_Laptop";
|
||||
@@ -48,10 +54,15 @@
|
||||
};
|
||||
|
||||
swapDevices = [{
|
||||
device = "/var/.swapfile";
|
||||
device = "/data/.swapfile";
|
||||
size = 32 * 1024;
|
||||
}];
|
||||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
memoryPercent = 50;
|
||||
};
|
||||
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
home.stateVersion = "23.05";
|
||||
home.homeDirectory = "/home/materus";
|
||||
|
||||
xdg.dataFile."java-runtimes/graalvm-oracle-17".source = pkgs.graalvmPackages.graalvm-oracle_17;
|
||||
xdg.dataFile."java-runtimes/graalvm-oracle-latest".source = pkgs.graalvmPackages.graalvm-oracle;
|
||||
xdg.dataFile."java-runtimes/openjdk21".source = pkgs.jdk21;
|
||||
|
||||
materus.profile = {
|
||||
fonts.enable = lib.mkDefault true;
|
||||
nixpkgs.enable = lib.mkDefault false;
|
||||
@@ -11,7 +15,67 @@
|
||||
enableTerminalExtra = lib.mkDefault true;
|
||||
enableNixDevel = lib.mkDefault true;
|
||||
|
||||
bash.enable = true;
|
||||
zsh.enable = true;
|
||||
editor.code.fhs.enable = true;
|
||||
editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_16; in [
|
||||
llvmpkgs.clang
|
||||
llvmpkgs.llvm
|
||||
llvmpkgs.bintools
|
||||
llvmpkgs.lld
|
||||
llvmpkgs.lldb
|
||||
llvmpkgs.libllvm
|
||||
llvmpkgs.libllvm.dev
|
||||
|
||||
raylib
|
||||
gcc
|
||||
gdb
|
||||
materusArg.unstable.nixd
|
||||
nixfmt-rfc-style
|
||||
nixpkgs-fmt
|
||||
cmake
|
||||
gnumake
|
||||
ninja
|
||||
binutils
|
||||
coreutils
|
||||
util-linux
|
||||
openssl
|
||||
openssl.dev
|
||||
pkg-config
|
||||
dotnet-sdk_8
|
||||
mono
|
||||
mold
|
||||
python3
|
||||
lua
|
||||
gtk4.dev
|
||||
gtk4
|
||||
miniaudio
|
||||
SDL2.dev
|
||||
SDL2
|
||||
freeglut.dev
|
||||
freeglut
|
||||
boost.dev
|
||||
boost
|
||||
glew.dev
|
||||
libGL.dev
|
||||
libGLU.dev
|
||||
vulkan-loader.dev
|
||||
xorg.xorgproto
|
||||
xorg.libX11.dev
|
||||
xorg.libXrandr.dev
|
||||
xorg.libXrender.dev
|
||||
rustup
|
||||
freetype.dev
|
||||
|
||||
fpc
|
||||
openjdk21
|
||||
bison
|
||||
flex
|
||||
|
||||
ldc
|
||||
dmd
|
||||
dub
|
||||
]);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
|
||||
sound.enable = true;
|
||||
#REGION test
|
||||
#sound.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
@@ -9,20 +9,20 @@
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
systemWide = false;
|
||||
systemWide = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
environment.sessionVariables =
|
||||
let
|
||||
makePluginPath = format:
|
||||
(lib.makeSearchPath format [
|
||||
makePluginPath =
|
||||
format:
|
||||
"$HOME/.${format}:"
|
||||
+ (lib.makeSearchPath format [
|
||||
"$HOME/.nix-profile/lib"
|
||||
"/run/current-system/sw/lib"
|
||||
"/etc/profiles/per-user/$USER/lib"
|
||||
])
|
||||
+ ":$HOME/.${format}";
|
||||
]);
|
||||
in
|
||||
{
|
||||
ALSOFT_DRIVERS = "pulse";
|
||||
@@ -36,10 +36,37 @@
|
||||
|
||||
};
|
||||
|
||||
services.udev = {
|
||||
services.udev = let
|
||||
script = pkgs.writeShellScript "arch-mknod" ''
|
||||
ACTION=$1
|
||||
KERNEL=$(basename $2)
|
||||
MAJOR=$3
|
||||
MINOR=$4
|
||||
|
||||
|
||||
if (systemctl is-active --quiet systemd-nspawn@archlinux); then
|
||||
if [[ $ACTION == "add" || "$ACTION" == "change" ]]; then
|
||||
machinectl shell root@archlinux /bin/bash -c "
|
||||
if ! [ -f /dev/$KERNEL ]; then
|
||||
mknod /dev/$KERNEL c $MAJOR $MINOR
|
||||
chmod 660 /dev/$KERNEL
|
||||
chown root:input /dev/$KERNEL
|
||||
fi
|
||||
"
|
||||
elif [[ $ACTION == "remove" ]]; then
|
||||
machinectl shell root@archlinux /bin/rm /dev/$KERNEL
|
||||
fi
|
||||
fi
|
||||
|
||||
'';
|
||||
in {
|
||||
extraRules = ''
|
||||
KERNEL=="rtc0", GROUP="audio"
|
||||
KERNEL=="hpet", GROUP="audio"
|
||||
DEVPATH=="/devices/virtual/misc/cpu_dma_latency", OWNER="root", GROUP="audio", MODE="0660"
|
||||
|
||||
|
||||
SUBSYSTEM=="hidraw", KERNEL=="hidraw*", RUN+="${script} ''$env{ACTION} ''$env{DEVNAME} ''$env{MAJOR} ''$env{MINOR}"
|
||||
'';
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
mainMirror = "https://ftp.icm.edu.pl/pub/Linux/dist/archlinux";
|
||||
extraMirrors = [ ];
|
||||
getty = [
|
||||
6
|
||||
7
|
||||
];
|
||||
ttys = [
|
||||
6
|
||||
7
|
||||
8
|
||||
] ++ getty;
|
||||
|
||||
startPkgs = lib.strings.concatStringsSep " " [
|
||||
"base"
|
||||
"base-devel"
|
||||
"dbus"
|
||||
"less"
|
||||
"nano"
|
||||
"bash-completion"
|
||||
];
|
||||
scripts = {
|
||||
preStart = pkgs.writeShellScript "arch-pre-start" ''
|
||||
if [ ! -d "/var/lib/machines/archlinux" ]; then
|
||||
export PATH=''${PATH:+''${PATH}:}${
|
||||
lib.strings.makeBinPath (
|
||||
with pkgs;
|
||||
[
|
||||
wget
|
||||
coreutils-full
|
||||
gnutar
|
||||
zstd
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
ARCH_IMAGE=$(mktemp)
|
||||
trap 'rm $ARCH_IMAGE' EXIT
|
||||
|
||||
wget "${mainMirror}/iso/latest/archlinux-bootstrap-x86_64.tar.zst" -O $ARCH_IMAGE
|
||||
mkdir -p /var/lib/machines/archlinux
|
||||
trap 'rm -rf /var/lib/machines/archlinux' ERR
|
||||
|
||||
tar -xaf $ARCH_IMAGE -C "/var/lib/machines/archlinux" --strip-components=1 --numeric-owner
|
||||
printf 'Server = %s/$repo/os/$arch\n' "${mainMirror}" > /var/lib/machines/archlinux/etc/pacman.d/mirrorlist
|
||||
rm "/var/lib/machines/archlinux/etc/resolv.conf"
|
||||
|
||||
[ -f "/var/lib/machines/archlinux/etc/securetty" ] && \
|
||||
printf 'pts/%d\n' $(seq 0 10) >>"/var/lib/machines/archlinux/etc/securetty"
|
||||
|
||||
systemd-machine-id-setup --root="/var/lib/machines/archlinux"
|
||||
systemd-nspawn -q --settings=false --system-call-filter=@sandbox -D "/var/lib/machines/archlinux" /bin/sh -c "
|
||||
export PATH=/bin
|
||||
touch /etc/systemd/do-not-udevadm-trigger-on-update
|
||||
pacman-key --init && pacman-key --populate
|
||||
pacman -Rs --noconfirm arch-install-scripts
|
||||
pacman -Sy --noconfirm --needed ${startPkgs}
|
||||
pacman -Syu --noconfirm
|
||||
|
||||
systemctl disable getty@tty1.service
|
||||
${
|
||||
lib.strings.concatStringsSep "\n" (
|
||||
lib.lists.forEach getty (x: "systemctl enable getty@tty${builtins.toString x}.service")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
systemd.nspawn."archlinux" = {
|
||||
enable = true;
|
||||
execConfig = {
|
||||
Boot = true;
|
||||
SystemCallFilter = [ "@known" ];
|
||||
Timezone = "symlink";
|
||||
Capability = "all";
|
||||
PrivateUsers = "no";
|
||||
ResolvConf = "copy-host";
|
||||
};
|
||||
|
||||
filesConfig = {
|
||||
BindReadOnly = [
|
||||
"/nix"
|
||||
|
||||
"/run/current-system"
|
||||
"/run/booted-system"
|
||||
"/run/opengl-driver"
|
||||
"/run/opengl-driver-32"
|
||||
|
||||
];
|
||||
Bind = [
|
||||
"/:/run/host-root"
|
||||
|
||||
"/run/udev"
|
||||
"/run/pipewire"
|
||||
"/run/pulse"
|
||||
|
||||
"/sys/class"
|
||||
"/sys/devices"
|
||||
|
||||
"/dev/fuse"
|
||||
"/dev/snd"
|
||||
"/dev/input"
|
||||
"/dev/uinput"
|
||||
"/dev/shm"
|
||||
"/dev/kfd"
|
||||
"/dev/dri"
|
||||
"/dev/tty"
|
||||
"/dev/tty0"
|
||||
|
||||
"/var/lib/flatpak"
|
||||
"/var/lib/containers"
|
||||
|
||||
"/tmp/.X11-unix"
|
||||
|
||||
/materus
|
||||
|
||||
] ++ lib.lists.forEach ttys (x: "/dev/tty${builtins.toString x}");
|
||||
};
|
||||
networkConfig = {
|
||||
Private = false;
|
||||
};
|
||||
};
|
||||
systemd.services."systemd-nspawn@archlinux" = {
|
||||
enable = true;
|
||||
preStart = "${scripts.preStart}";
|
||||
overrideStrategy = "asDropin";
|
||||
serviceConfig = {
|
||||
DeviceAllow = [
|
||||
"char-* rwm"
|
||||
"block-* rwm"
|
||||
"/dev/shm rwm"
|
||||
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{...}:
|
||||
{
|
||||
imports = [
|
||||
./arch.nix
|
||||
./fedora.nix
|
||||
];
|
||||
virtualisation.lxc.enable = true;
|
||||
virtualisation.lxc.lxcfs.enable = true;
|
||||
virtualisation.lxd.enable = false;
|
||||
|
||||
virtualisation.waydroid.enable = true;
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
dockerSocket.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ttys = [
|
||||
9
|
||||
10
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
systemd.nspawn."fedora" = {
|
||||
enable = true;
|
||||
execConfig = {
|
||||
Boot = true;
|
||||
SystemCallFilter = [ "@known" ];
|
||||
Timezone = "symlink";
|
||||
Capability = "all";
|
||||
PrivateUsers = "no";
|
||||
ResolvConf = "off";
|
||||
};
|
||||
|
||||
filesConfig = {
|
||||
BindReadOnly = [
|
||||
"/nix"
|
||||
|
||||
"/run/current-system"
|
||||
"/run/booted-system"
|
||||
"/run/opengl-driver"
|
||||
"/run/opengl-driver-32"
|
||||
|
||||
];
|
||||
Bind = [
|
||||
"/:/run/host-root"
|
||||
|
||||
"/run/udev"
|
||||
|
||||
"/dev/fuse"
|
||||
"/dev/snd"
|
||||
"/dev/input"
|
||||
"/dev/shm"
|
||||
"/dev/kfd"
|
||||
"/dev/dri"
|
||||
"/dev/tty"
|
||||
"/dev/tty0"
|
||||
|
||||
"/var/lib/flatpak"
|
||||
|
||||
"/tmp/.X11-unix"
|
||||
|
||||
/materus
|
||||
|
||||
] ++ lib.lists.forEach ttys (x: "/dev/tty${builtins.toString x}");
|
||||
};
|
||||
networkConfig = {
|
||||
Bridge="br0";
|
||||
};
|
||||
};
|
||||
systemd.services."systemd-nspawn@fedora" = {
|
||||
enable = true;
|
||||
overrideStrategy = "asDropin";
|
||||
serviceConfig = {
|
||||
ConditionPathExists="/var/lib/machines/fedora";
|
||||
DeviceAllow = [
|
||||
"char-tty rwm"
|
||||
"char-input rwm"
|
||||
"char-drm rwm"
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -6,15 +6,14 @@
|
||||
./hardware
|
||||
./vm
|
||||
./secrets
|
||||
./containers
|
||||
./other
|
||||
|
||||
./scripts.nix
|
||||
./tmp.nix
|
||||
./network.nix
|
||||
|
||||
./kde.nix
|
||||
|
||||
./audio.nix
|
||||
./apps.nix
|
||||
];
|
||||
|
||||
|
||||
@@ -26,6 +25,11 @@
|
||||
materus.profile.nix.enable = true;
|
||||
materus.profile.nixpkgs.enable = true;
|
||||
materus.profile.fonts.enable = true;
|
||||
materus.profile.steam.enable = true;
|
||||
materus.profile.steam.enable = false;
|
||||
|
||||
services.logind.extraConfig = ''
|
||||
NAutoVTs=4
|
||||
ReserveVT=4
|
||||
'';
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ config, pkgs, lib, materusArg, ... }:
|
||||
let
|
||||
video = [
|
||||
|
||||
@@ -13,26 +13,49 @@ let
|
||||
|
||||
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
#Kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
boot.kernelParams = [ "rcu_nocbs=8-15,24-31" "nohz_full=8-15,24-31" "vfio_iommu_type1.allow_unsafe_interrupts=1" "pcie_acs_override=downstream,multifunction" /*"pci-stub.ids=1002:744c"*/ "nox2apic" "nvme_core.default_ps_max_latency_us=0" "nvme_core.io_timeout=255" "nvme_core.max_retries=10" "nvme_core.shutdown_timeout=10" "amd_iommu=on" "iommu=pt" ] ++ video;
|
||||
boot.kernelModules = [ "pci-stub" "amdgpu" "i2c_dev" "kvm_amd" "vfio" "vfio_iommu_type1" "vfio-pci"];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_zen;
|
||||
|
||||
boot.kernelParams = [
|
||||
"rcu_nocbs=${materusArg.materusPC.vmCores}"
|
||||
"nohz_full=${materusArg.materusPC.vmCores}"
|
||||
"vfio_iommu_type1.allow_unsafe_interrupts=1"
|
||||
"pcie_acs_override=downstream,multifunction"
|
||||
#''vfio-pci.ids="1002:744c"''
|
||||
"nox2apic"
|
||||
"nvme_core.default_ps_max_latency_us=0"
|
||||
"nvme_core.io_timeout=255"
|
||||
"nvme_core.max_retries=10"
|
||||
"nvme_core.shutdown_timeout=10"
|
||||
"amd_iommu=on"
|
||||
"amdgpu.ppfeaturemask=0xffffffff"
|
||||
#"amdgpu.runpm=0"
|
||||
"iommu=pt"
|
||||
"psi=1"
|
||||
"i915.force_probe=!56a6"
|
||||
"xe.force_probe=56a6"
|
||||
] ++ video;
|
||||
boot.kernelModules = [ "pci-stub" "amdgpu" "i2c_dev" "kvm_amd" "vfio" "vfio_iommu_type1" "vfio-pci" "kvmfr" "xe" ];
|
||||
boot.extraModprobeConfig = ''
|
||||
options kvm_amd nested=1 avic=1 npt=1 sev=0
|
||||
options vfio_iommu_type1 allow_unsafe_interrupts=1
|
||||
options kvmfr static_size_mb=64
|
||||
'';
|
||||
boot.kernel.sysctl = {
|
||||
"vm.max_map_count" = 1000000;
|
||||
"vm.swappiness" = 10;
|
||||
"net.ipv4.ip_forward"=1;
|
||||
};
|
||||
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.initrd.kernelModules = [ "vfio-pci" "amdgpu" ];
|
||||
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback kvmfr ];
|
||||
|
||||
|
||||
boot.supportedFilesystems = [ "ntfs" "btrfs" "vfat" "exfat" "ext4" ];
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
];
|
||||
hardware.firmware = with pkgs; [
|
||||
materusArg.pkgs.amdgpu-pro-libs.firmware.vcn
|
||||
#materusArg.pkgs.amdgpu-pro-libs.firmware
|
||||
materusArg.pkgs.amdgpu-pro-libs.firmware
|
||||
linux-firmware
|
||||
alsa-firmware
|
||||
sof-firmware
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
environment.variables = {
|
||||
DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1 = "1";
|
||||
VK_ICD_FILENAMES = "${pkgs.mesa.drivers}/share/vulkan/icd.d/radeon_icd.x86_64.json:${pkgs.driversi686Linux.mesa.drivers}/share/vulkan/icd.d/radeon_icd.i686.json";
|
||||
#VK_ICD_FILENAMES = "${pkgs.mesa.drivers}/share/vulkan/icd.d/radeon_icd.x86_64.json:${pkgs.driversi686Linux.mesa.drivers}/share/vulkan/icd.d/radeon_icd.i686.json";
|
||||
AMD_VULKAN_ICD = "RADV";
|
||||
RADV_PERFTEST = "gpl,rt,sam";
|
||||
OCL_ICD_VENDORS = "${pkgs.rocmPackages.clr.icd}/etc/OpenCL/vendors/";
|
||||
#OCL_ICD_VENDORS = "${pkgs.rocmPackages.clr.icd}/etc/OpenCL/vendors/";
|
||||
};
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkForce true;
|
||||
|
||||
@@ -31,8 +31,11 @@
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
vpl-gpu-rt
|
||||
intel-media-driver
|
||||
libvdpau-va-gl
|
||||
amdvlk
|
||||
vkbasalt
|
||||
rocmPackages.clr.icd
|
||||
rocmPackages.clr
|
||||
materusArg.pkgs.amdgpu-pro-libs.vulkan
|
||||
@@ -40,16 +43,17 @@
|
||||
];
|
||||
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
vaapiVdpau
|
||||
vkbasalt
|
||||
pkgs.driversi686Linux.amdvlk
|
||||
materusArg.pkgs.i686Linux.amdgpu-pro-libs.vulkan
|
||||
libvdpau-va-gl
|
||||
];
|
||||
services.udev.extraRules = ''
|
||||
/*services.udev.extraRules = ''
|
||||
|
||||
#GPU bar size
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x744c", ATTR{resource0_resize}="15"
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x744c", ATTR{resource2_resize}="8"
|
||||
'';
|
||||
'';*/
|
||||
|
||||
|
||||
#Trim
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
memoryPercent = 25;
|
||||
memoryPercent = 50;
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
|
||||
@@ -1,96 +1,188 @@
|
||||
{ pkgs, materusArg, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
materusArg,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./plasma.nix
|
||||
];
|
||||
home.stateVersion = "23.05";
|
||||
home.homeDirectory = "/home/materus";
|
||||
|
||||
materus.profile.wezterm.enable = true;
|
||||
|
||||
programs.git.signing.signByDefault = true;
|
||||
|
||||
xdg.userDirs.enable = true;
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.xdgOpenUsePortal = true;
|
||||
xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
|
||||
xdg.portal.configPackages = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
|
||||
materus.profile = {
|
||||
|
||||
fonts.enable = lib.mkDefault true;
|
||||
nixpkgs.enable = lib.mkDefault false;
|
||||
enableDesktop = lib.mkDefault true;
|
||||
enableTerminal = lib.mkDefault true;
|
||||
enableTerminalExtra = lib.mkDefault true;
|
||||
enableNixDevel = lib.mkDefault true;
|
||||
editor.emacs.enable = true;
|
||||
editor.code.fhs.enable = true;
|
||||
editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_16; in [
|
||||
llvmpkgs.clang
|
||||
llvmpkgs.llvm
|
||||
llvmpkgs.bintools
|
||||
llvmpkgs.lld
|
||||
llvmpkgs.lldb
|
||||
llvmpkgs.libllvm
|
||||
llvmpkgs.libllvm.dev
|
||||
editor.code.fhs.packages = (
|
||||
ps:
|
||||
with ps;
|
||||
let
|
||||
llvmpkgs = llvmPackages_18;
|
||||
in
|
||||
[
|
||||
llvmpkgs.clang
|
||||
llvmpkgs.llvm
|
||||
llvmpkgs.bintools
|
||||
llvmpkgs.lld
|
||||
llvmpkgs.lldb
|
||||
llvmpkgs.libllvm
|
||||
llvmpkgs.mlir
|
||||
llvmpkgs.libllvm.dev
|
||||
|
||||
raylib
|
||||
gcc
|
||||
gdb
|
||||
nil
|
||||
nixfmt
|
||||
nixpkgs-fmt
|
||||
cmake
|
||||
gnumake
|
||||
ninja
|
||||
binutils
|
||||
coreutils
|
||||
util-linux
|
||||
openssl
|
||||
openssl.dev
|
||||
pkg-config
|
||||
dotnet-sdk_8
|
||||
mono
|
||||
mold
|
||||
python3
|
||||
lua
|
||||
gtk4.dev
|
||||
gtk4
|
||||
miniaudio
|
||||
SDL2.dev
|
||||
SDL2
|
||||
freeglut.dev
|
||||
freeglut
|
||||
boost.dev
|
||||
boost
|
||||
glew.dev
|
||||
libGL.dev
|
||||
libGLU.dev
|
||||
vulkan-loader.dev
|
||||
xorg.xorgproto
|
||||
xorg.libX11.dev
|
||||
xorg.libXrandr.dev
|
||||
xorg.libXrender.dev
|
||||
rustup
|
||||
freetype.dev
|
||||
fpc
|
||||
xmake
|
||||
raylib
|
||||
gcc
|
||||
gdb
|
||||
materusArg.unstable.nixd
|
||||
nixfmt-rfc-style
|
||||
nixpkgs-fmt
|
||||
cmake
|
||||
gnumake
|
||||
ninja
|
||||
binutils
|
||||
coreutils
|
||||
util-linux
|
||||
openssl
|
||||
openssl.dev
|
||||
pkg-config
|
||||
dotnet-sdk_8
|
||||
mono
|
||||
mold
|
||||
python3
|
||||
lua
|
||||
gtk4.dev
|
||||
gtk4
|
||||
glib
|
||||
glib.dev
|
||||
miniaudio
|
||||
SDL2.dev
|
||||
SDL2
|
||||
freeglut.dev
|
||||
freeglut
|
||||
boost.dev
|
||||
boost
|
||||
glew.dev
|
||||
libGL.dev
|
||||
libGLU.dev
|
||||
vulkan-loader.dev
|
||||
vulkan-headers
|
||||
xorg.xorgproto
|
||||
xorg.libX11.dev
|
||||
xorg.libXrandr.dev
|
||||
xorg.libXrender.dev
|
||||
rustup
|
||||
freetype.dev
|
||||
|
||||
fpc
|
||||
openjdk21
|
||||
bison
|
||||
flex
|
||||
fpc
|
||||
gradle
|
||||
bison
|
||||
flex
|
||||
|
||||
ldc
|
||||
dmd
|
||||
dub
|
||||
]);
|
||||
|
||||
editor.emacs.enable = false;
|
||||
ldc
|
||||
dmd
|
||||
dub
|
||||
]
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
pkgs.papirus-icon-theme
|
||||
materusArg.pkgs.ffmpeg6-amf-full
|
||||
(materusArg.pkgs.polymc.wrap { extraJDKs = [ pkgs.graalvm-ce ]; extraLibs = [ ]; })
|
||||
(pkgs.ffmpeg-full)
|
||||
(materusArg.pkgs.polymc.wrap {
|
||||
extraJDKs = [ pkgs.graalvm-ce ];
|
||||
extraLibs = [ ];
|
||||
})
|
||||
pkgs.git-crypt
|
||||
pkgs.obsidian
|
||||
];
|
||||
|
||||
programs.obs-studio = {
|
||||
enable = false;
|
||||
plugins = with pkgs.obs-studio-plugins; [ wlrobs obs-vaapi obs-vkcapture obs-gstreamer input-overlay obs-multi-rtmp obs-pipewire-audio-capture ];
|
||||
package = materusArg.pkgs.obs-amf;
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
wlrobs
|
||||
input-overlay
|
||||
|
||||
obs-source-switcher
|
||||
obs-tuna
|
||||
obs-vaapi
|
||||
obs-vkcapture
|
||||
obs-gstreamer
|
||||
obs-backgroundremoval
|
||||
obs-multi-rtmp
|
||||
obs-pipewire-audio-capture
|
||||
];
|
||||
};
|
||||
|
||||
home.file.".gradle/gradle.properties".text = ''
|
||||
org.gradle.java.installations.fromEnv=JAVA_8_HOME,JAVA_17_HOME,JAVA_21_HOME
|
||||
org.gradle.home=${pkgs.jdk21}
|
||||
'';
|
||||
|
||||
xdg.dataFile."java-runtimes/graalvm-oracle-17".source = pkgs.graalvmPackages.graalvm-oracle_17;
|
||||
xdg.dataFile."java-runtimes/graalvm-oracle-latest".source = pkgs.graalvmPackages.graalvm-oracle;
|
||||
xdg.dataFile."java-runtimes/openjdk21".source = pkgs.jdk21;
|
||||
|
||||
xdg.desktopEntries.brave-browser =
|
||||
let
|
||||
env = lib.concatStringsSep " " [
|
||||
];
|
||||
script = pkgs.writeShellScript "brave" ''
|
||||
${env} brave "$@"
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
name = "Brave Web Browser";
|
||||
genericName = "Przeglądarka WWW";
|
||||
comment = "Skorzystaj z internetu";
|
||||
exec = "${script} %U";
|
||||
icon = "brave-browser";
|
||||
terminal = false;
|
||||
categories = [
|
||||
"Application"
|
||||
"Network"
|
||||
"WebBrowser"
|
||||
];
|
||||
mimeType = [
|
||||
"application/pdf"
|
||||
"application/rdf+xml"
|
||||
"application/rss+xml"
|
||||
"application/xhtml+xml"
|
||||
"application/xhtml_xml"
|
||||
"application/xml"
|
||||
"image/gif"
|
||||
"image/jpeg"
|
||||
"image/png"
|
||||
"image/webp"
|
||||
"text/html"
|
||||
"text/xml"
|
||||
"x-scheme-handler/http"
|
||||
"x-scheme-handler/https"
|
||||
"x-scheme-handler/ipfs"
|
||||
"x-scheme-handler/ipns"
|
||||
];
|
||||
actions.new-windows = {
|
||||
exec = "${script}";
|
||||
name = "Nowe okno";
|
||||
};
|
||||
actions.new-private-windows = {
|
||||
exec = "${script} --incognito";
|
||||
name = "Nowe okno incognito";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
{ pkgs, materusArg, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.papirus-icon-theme
|
||||
pkgs.nerd-fonts.hack
|
||||
];
|
||||
|
||||
xdg.dataFile."konsole/materus-linux.keytab".source = ("${materusArg.cfg.path}" + "/extraFiles/config/plasma/materus-linux.keytab");
|
||||
programs.konsole = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
materus = {
|
||||
colorScheme = "Breeze";
|
||||
font.name = "Hack Nerd Font";
|
||||
extraConfig = {
|
||||
Keyboard = {
|
||||
KeyBindings="materus-linux";
|
||||
};
|
||||
Scrolling = {
|
||||
HistoryMode = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
extraConfig = {
|
||||
KonsoleWindow = {
|
||||
RememberWindowSize = "false";
|
||||
};
|
||||
MainWindow = {
|
||||
MenuBar = "Enabled";
|
||||
};
|
||||
|
||||
"Desktop Entry" = {
|
||||
DefaultProfile = "materus.profile";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.plasma = {
|
||||
enable = true;
|
||||
overrideConfig = false;
|
||||
|
||||
|
||||
|
||||
workspace = {
|
||||
lookAndFeel = "org.kde.breezedark.desktop";
|
||||
iconTheme = "Papirus-Dark";
|
||||
};
|
||||
|
||||
shortcuts = {
|
||||
"kwin"."Grid View" = "Meta+Alt+Tab";
|
||||
"kwin"."Overview" = "Meta+Tab";
|
||||
"services/org.kde.kcalc.desktop"."_launch" = [ ];
|
||||
};
|
||||
spectacle.shortcuts = {
|
||||
captureActiveWindow = "Meta+Print";
|
||||
captureCurrentMonitor = "Print";
|
||||
captureEntireDesktop = "Shift+Print";
|
||||
captureRectangularRegion = "Meta+S";
|
||||
launchWithoutCapturing = "Meta+Shift+S";
|
||||
launch = "Meta+Alt+S";
|
||||
};
|
||||
|
||||
kwin = {
|
||||
effects = {
|
||||
wobblyWindows.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
input = {
|
||||
keyboard = {
|
||||
options = [ "caps:none" ];
|
||||
};
|
||||
};
|
||||
kscreenlocker = {
|
||||
autoLock = false;
|
||||
};
|
||||
|
||||
panels = [
|
||||
{
|
||||
location = "left";
|
||||
screen = 0;
|
||||
widgets = [
|
||||
{
|
||||
name = "org.kde.plasma.kickerdash";
|
||||
config = {
|
||||
General = {
|
||||
icon = "nix-snowflake-white";
|
||||
customButtonImage="nix-snowflake-white";
|
||||
alphaSort = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
"org.kde.plasma.icontasks"
|
||||
"org.kde.plasma.marginsseparator"
|
||||
"org.kde.plasma.systemtray"
|
||||
{
|
||||
name = "org.kde.plasma.digitalclock";
|
||||
config = {
|
||||
Appearance = {
|
||||
showDate = "false";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
];
|
||||
configFile = {
|
||||
"kwinrc"."Effect-overview"."BorderActivate" = 9;
|
||||
|
||||
"klaunchrc"."BusyCursorSettings"."Timeout" = 1;
|
||||
"klaunchrc"."FeedbackStyle"."TaskbarButton" = false;
|
||||
|
||||
"kcminputrc"."Libinput/9610/46/SINOWEALTH Wired Gaming Mouse"."PointerAccelerationProfile" = 1;
|
||||
"kcminputrc"."Libinput/9610/47/SINOWEALTH 2.4G Wireless Receiver"."PointerAccelerationProfile" = 1;
|
||||
|
||||
"spectaclerc"."ImageSave"."imageFilenameTemplate" = "<yyyy>-<MM>-<dd>.<hh>_<mm>_<ss>-<t>.materusPC";
|
||||
"spectaclerc"."VideoSave"."videoFilenameTemplate" = "<yyyy>-<MM>-<dd>.<hh>_<mm>_<ss>-<t>.materusPC";
|
||||
"spectaclerc"."ImageSave"."preferredImageFormat" = "WEBP";
|
||||
"spectaclerc"."ImageSave"."translatedScreenshotsFolder" = "Zrzuty ekranu";
|
||||
"spectaclerc"."VideoSave"."translatedScreencastsFolder" = "Nagranie ekranu";
|
||||
|
||||
"dolphinrc"."General"."RememberOpenedTabs" = false;
|
||||
|
||||
"kwalletrc"."Wallet"."Enabled" = true;
|
||||
|
||||
};
|
||||
dataFile = {
|
||||
"dolphin/view_properties/global/.directory"."Settings"."HiddenFilesShown" = true;
|
||||
};
|
||||
|
||||
resetFiles = [
|
||||
"spectaclerc"
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
@@ -4,19 +4,42 @@
|
||||
WIREGUARD_PRIVATEKEY="${config.sops.placeholder.wireguard}"
|
||||
'';
|
||||
|
||||
networking.firewall = {
|
||||
logReversePathDrops = false;
|
||||
# wireguard trips rpfilter up
|
||||
extraCommands = ''
|
||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport ${materusArg.wireguard.port} -j RETURN
|
||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport ${materusArg.wireguard.port} -j RETURN
|
||||
'';
|
||||
extraStopCommands = ''
|
||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport ${materusArg.wireguard.port} -j RETURN || true
|
||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport ${materusArg.wireguard.port} -j RETURN || true
|
||||
'';
|
||||
};
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
networking.hostName = "materusPC";
|
||||
networking.wireless.iwd.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
#networking.networkmanager.wifi.backend = "iwd";
|
||||
networking.firewall.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 24800 5900 5357 4656 8080 9943 9944 ];
|
||||
networking.firewall.allowedUDPPorts = [ 24800 5900 3702 4656 6000 9943 9944 ];
|
||||
#Fix warning
|
||||
networking.networkmanager.extraConfig = lib.mkDefault ''
|
||||
[connectivity]
|
||||
uri=http://nmcheck.gnome.org/check_network_status.txt
|
||||
'';
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
24800 5900 5357 4656 8080 9943 9944
|
||||
22000 config.services.syncthing.relay.statusPort config.services.syncthing.relay.port # Syncthing
|
||||
25565 25570 8100 # Minecraft + BlueMap + Velocity
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [ (lib.strings.toInt materusArg.wireguard.port)
|
||||
24800 5900 3702 4656 6000 9943 9944
|
||||
22000 21027 # Syncthing
|
||||
17000 17001 # zomboid
|
||||
24454 # Minecraft Voice Chat
|
||||
];
|
||||
networking.networkmanager.settings = {
|
||||
connectivity = {
|
||||
uri = "http://nmcheck.gnome.org/check_network_status.txt";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
networking.networkmanager.ensureProfiles.environmentFiles = [
|
||||
config.sops.templates."networkmanager.env".path
|
||||
@@ -33,10 +56,11 @@
|
||||
};
|
||||
"wireguard-peer.${materusArg.wireguard.pubKeys.valkyrie}" = {
|
||||
endpoint = "${materusArg.ips.valkyrie}:${materusArg.wireguard.port}";
|
||||
allowed-ips = "${materusArg.ip-masks.wireguard.general};";
|
||||
allowed-ips = "${materusArg.ip-masks.wireguard.main};${materusArg.ip-masks.wireguard.guest};${materusArg.ip-masks.wireguard.asia};${materusArg.ips.wireguard.valkyrie}/32;";
|
||||
persistent-keepalive = "20";
|
||||
};
|
||||
ipv4 = {
|
||||
address1 = "${materusArg.ips.wireguard.materusPC}/23";
|
||||
address1 = "${materusArg.ips.wireguard.materusPC}/32";
|
||||
dns = "${materusArg.ips.wireguard.valkyrie};";
|
||||
method = "manual";
|
||||
never-default = "true";
|
||||
@@ -48,4 +72,11 @@
|
||||
proxy = { };
|
||||
};
|
||||
};
|
||||
services = {
|
||||
syncthing = {
|
||||
enable = true;
|
||||
user = "materus";
|
||||
dataDir = "/home/materus";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
+57
-16
@@ -1,10 +1,45 @@
|
||||
{config, pkgs, materusArg, ...}:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
gamescope
|
||||
config,
|
||||
pkgs,
|
||||
materusArg,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
#services.jackett.enable = true;
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
|
||||
];
|
||||
programs.chromium.enable = true;
|
||||
programs.chromium.enablePlasmaBrowserIntegration = true;
|
||||
|
||||
services.guix.enable = true;
|
||||
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
vivaldi
|
||||
|
||||
#(pkgs.lutris.override { extraLibraries = pkgs: with pkgs; [ pkgs.samba pkgs.jansson pkgs.tdb pkgs.libunwind pkgs.libusb1 pkgs.gnutls pkgs.gtk3 pkgs.pango ]; })
|
||||
materusArg.pkgs.amdgpu-pro-libs.prefixes
|
||||
(pkgs.bottles.override { extraPkgs = pkgs: [ pkgs.libsForQt5.breeze-qt5 pkgs.kdePackages.breeze-gtk pkgs.nss_latest ]; extraLibraries = pkgs: [ pkgs.samba pkgs.jansson pkgs.tdb pkgs.libunwind pkgs.libusb1 pkgs.gnutls pkgs.gtk3 pkgs.pango ]; })
|
||||
(pkgs.bottles.override {
|
||||
extraPkgs = pkgs: [
|
||||
pkgs.libsForQt5.breeze-qt5
|
||||
pkgs.kdePackages.breeze-gtk
|
||||
pkgs.nss_latest
|
||||
];
|
||||
extraLibraries = pkgs: [
|
||||
pkgs.samba
|
||||
pkgs.jansson
|
||||
pkgs.tdb
|
||||
pkgs.libunwind
|
||||
pkgs.libusb1
|
||||
pkgs.gnutls
|
||||
pkgs.gtk3
|
||||
pkgs.pango
|
||||
];
|
||||
})
|
||||
glibc
|
||||
glib
|
||||
gtk3
|
||||
@@ -12,6 +47,8 @@
|
||||
gsettings-desktop-schemas
|
||||
kdePackages.dolphin
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
vlc
|
||||
vkbasalt-cli
|
||||
|
||||
patchelf
|
||||
killall
|
||||
@@ -29,10 +66,14 @@
|
||||
|
||||
pciutils
|
||||
|
||||
aspell
|
||||
aspellDicts.pl
|
||||
aspellDicts.en
|
||||
aspellDicts.en-computers
|
||||
(aspellWithDicts (
|
||||
ds: with ds; [
|
||||
en
|
||||
en-computers
|
||||
en-science
|
||||
pl
|
||||
]
|
||||
))
|
||||
steamtinkerlaunch
|
||||
distrobox
|
||||
# WebP support
|
||||
@@ -69,8 +110,7 @@
|
||||
|
||||
nix-du
|
||||
|
||||
|
||||
kate
|
||||
kdePackages.kate
|
||||
krusader
|
||||
|
||||
wineWowPackages.stagingFull
|
||||
@@ -84,23 +124,24 @@
|
||||
monkeysphere
|
||||
gparted
|
||||
|
||||
|
||||
|
||||
virt-viewer
|
||||
|
||||
inkscape
|
||||
gimp
|
||||
|
||||
|
||||
|
||||
git-crypt
|
||||
|
||||
bubblewrap
|
||||
bindfs
|
||||
|
||||
|
||||
|
||||
binutils
|
||||
|
||||
materusArg.unstable.qbittorrent
|
||||
mkvtoolnix
|
||||
nicotine-plus
|
||||
picard
|
||||
opusTools
|
||||
aegisub
|
||||
audacity
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./apps.nix
|
||||
./java.nix
|
||||
./users.nix
|
||||
./desktop
|
||||
];
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./kde.nix
|
||||
./sddm.nix
|
||||
|
||||
];
|
||||
|
||||
}
|
||||
+1
-7
@@ -1,12 +1,6 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
|
||||
|
||||
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.displayManager.gdm.wayland = true;
|
||||
|
||||
|
||||
services.displayManager.defaultSession = "gnome";
|
||||
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
services.xserver.desktopManager.gnome.sessionPath = [ pkgs.gnome.gpaste ];
|
||||
@@ -0,0 +1,40 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.wlr.enable = true;
|
||||
xdg.portal.xdgOpenUsePortal = true;
|
||||
xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
|
||||
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.desktopManager.plasma6.enableQt5Integration = true;
|
||||
#programs.gnupg.agent.pinentryPackage = lib.mkForce (pkgs.kwalletcli.overrideAttrs {meta.mainProgram = "pinentry-kwallet";});
|
||||
#environment.plasma6.excludePackages = with pkgs.kdePackages; [ kwallet kwalletmanager kwallet-pam ];
|
||||
environment.variables = {
|
||||
# Old fix for black cursor on amdgpu, seems to work fine now
|
||||
#KWIN_DRM_NO_AMS = "1";
|
||||
|
||||
#Fix for amdgpu crashes
|
||||
KWIN_DRM_USE_MODIFIERS = "0";
|
||||
KWIN_DRM_NO_DIRECT_SCANOUT = "1";
|
||||
QT_PLUGIN_PATH = [
|
||||
"${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}"
|
||||
"${pkgs.kdePackages.ffmpegthumbs}/${pkgs.qt6.qtbase.qtPluginPrefix}"
|
||||
];
|
||||
XCURSOR_THEME = "breeze_cursors";
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
kdePackages.ark
|
||||
kdePackages.kcalc
|
||||
];
|
||||
programs.kdeconnect.enable = true;
|
||||
materus.profile.steam.extraPkgs = [ pkgs.kdePackages.breeze pkgs.kdePackages.breeze-gtk pkgs.kdePackages.dolphin pkgs.vlc pkgs.vkbasalt-cli ];
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
autoConfig = builtins.readFile(builtins.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/MrOtherGuy/fx-autoconfig/master/program/config.js";
|
||||
sha256 = "1mx679fbc4d9x4bnqajqx5a95y1lfasvf90pbqkh9sm3ch945p40";
|
||||
});
|
||||
};
|
||||
}
|
||||
+33
-25
@@ -1,7 +1,19 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
westonSddm = let xcfg = config.services.xserver; in pkgs.writeText "weston.ini"
|
||||
''
|
||||
plasma-materus = pkgs.writeScript "plasma-materus" ''
|
||||
export KWIN_DRM_DEVICES="/dev/dri/by-path/pci-0000\:53\:00.0-card"
|
||||
${pkgs.kdePackages.plasma-workspace}/libexec/plasma-dbus-run-session-if-needed ${pkgs.kdePackages.plasma-workspace}/bin/startplasma-wayland
|
||||
'';
|
||||
westonSddm =
|
||||
let
|
||||
xcfg = config.services.xserver;
|
||||
in
|
||||
pkgs.writeText "weston.ini" ''
|
||||
[core]
|
||||
xwayland=false
|
||||
shell=fullscreen-shell.so
|
||||
@@ -21,7 +33,7 @@ let
|
||||
mode=1920x1080@240
|
||||
|
||||
[output]
|
||||
name=DP-2
|
||||
name=DP-4
|
||||
mode=off
|
||||
|
||||
[output]
|
||||
@@ -31,7 +43,8 @@ let
|
||||
'';
|
||||
in
|
||||
{
|
||||
services.displayManager.defaultSession = "plasma";
|
||||
services.displayManager.defaultSession = "plasma-materus";
|
||||
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.displayManager.sddm.wayland.enable = true;
|
||||
services.displayManager.sddm.wayland.compositor = lib.mkForce "weston";
|
||||
@@ -40,6 +53,21 @@ in
|
||||
"--shell=kiosk"
|
||||
"-c ${westonSddm}"
|
||||
];
|
||||
services.displayManager.sessionPackages = [
|
||||
(
|
||||
(pkgs.writeTextDir "share/wayland-sessions/plasma-materus.desktop" ''
|
||||
[Desktop Entry]
|
||||
Name=Plasma (Wayland Materus)
|
||||
Comment=Plasma Desktop with KWIN_DRM_DEVICES env
|
||||
Exec=${plasma-materus}
|
||||
DesktopNames=KDE
|
||||
Type=Application
|
||||
'').overrideAttrs
|
||||
(_: {
|
||||
passthru.providedSessions = [ "plasma-materus" ];
|
||||
})
|
||||
)
|
||||
];
|
||||
|
||||
services.displayManager.sddm.settings = {
|
||||
General = {
|
||||
@@ -50,24 +78,4 @@ in
|
||||
CursorSize = "24";
|
||||
};
|
||||
};
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.desktopManager.plasma6.enableQt5Integration = true;
|
||||
programs.gnupg.agent.pinentryPackage = lib.mkForce pkgs.pinentry-gnome3;
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [ kwallet kwalletmanager kwallet-pam ];
|
||||
|
||||
environment.variables = {
|
||||
# Old fix for black cursor on amdgpu, seems to work fine now
|
||||
#KWIN_DRM_NO_AMS = "1";
|
||||
|
||||
#Fix for amdgpu crashes
|
||||
KWIN_DRM_USE_MODIFIERS = "0";
|
||||
KWIN_DRM_NO_DIRECT_SCANOUT = "1";
|
||||
QT_PLUGIN_PATH = [ "${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}" ];
|
||||
XCURSOR_THEME = "breeze_cursors";
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
kdePackages.ark
|
||||
];
|
||||
|
||||
materus.profile.steam.extraPkgs = [ pkgs.kdePackages.breeze pkgs.kdePackages.breeze-gtk pkgs.kdePackages.dolphin ];
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs = {
|
||||
java.enable = true;
|
||||
java.package = pkgs.jdk;
|
||||
java.binfmt = true;
|
||||
};
|
||||
|
||||
environment.variables = {
|
||||
JAVA_8_HOME = "${pkgs.jdk8}/lib/openjdk/";
|
||||
JAVA_17_HOME = "${pkgs.jdk17}/lib/openjdk/";
|
||||
JAVA_21_HOME = "${pkgs.jdk21}/lib/openjdk/";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{ pkgs, materusArg, config, ... }:
|
||||
{
|
||||
|
||||
users.users.materus = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"audio"
|
||||
"video"
|
||||
"render"
|
||||
"pipewire"
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"input"
|
||||
"kvm"
|
||||
"libvirt-qemu"
|
||||
"libvirt"
|
||||
"libvirtd"
|
||||
"podman"
|
||||
"scanner"
|
||||
"lp"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
description = "Mateusz Słodkowicz";
|
||||
openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ];
|
||||
#hashedPasswordFile = config.sops.secrets."users/materus".path;
|
||||
};
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
sops.gnupg.sshKeyPaths = [ ];
|
||||
sops.age.sshKeyPaths = [ "/materus/root/ssh_host_ed25519_key" ];
|
||||
sops.defaultSopsFile = materusCfg.hostPath + "/secrets/secrets.yaml";
|
||||
sops.secrets."users/materus" = { neededForUsers = true; };
|
||||
#sops.secrets."users/materus" = { neededForUsers = true; };
|
||||
sops.secrets.wireguard = { };
|
||||
|
||||
services.openssh.hostKeys = [
|
||||
|
||||
@@ -1,41 +1,47 @@
|
||||
{ config, pkgs, materusArg, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
materusArg,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
virtualisation.lxc.enable = true;
|
||||
virtualisation.lxc.lxcfs.enable = true;
|
||||
virtualisation.lxd.enable = true;
|
||||
|
||||
programs.gamemode.enable = true;
|
||||
|
||||
|
||||
|
||||
programs.corectrl.enable = true;
|
||||
|
||||
services.teamviewer.enable = true;
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
||||
];
|
||||
systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ];
|
||||
|
||||
# Gamepad
|
||||
services.udev = {
|
||||
packages = with pkgs; [
|
||||
game-devices-udev-rules
|
||||
];
|
||||
};
|
||||
hardware.uinput.enable = true;
|
||||
hardware.steam-hardware.enable = true;
|
||||
|
||||
nix.package = pkgs.nixVersions.nix_2_28;
|
||||
programs.steam = {
|
||||
enable = false;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||
};
|
||||
services.flatpak.enable = true;
|
||||
services.gvfs.enable = true;
|
||||
|
||||
|
||||
services.xserver.xkb.layout = "pl";
|
||||
|
||||
|
||||
services.xserver.enable = true;
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
#services.xserver.videoDrivers = [ "amdgpu" "intel" ];
|
||||
services.dbus.enable = true;
|
||||
services.dbus.packages = [ pkgs.gcr ];
|
||||
|
||||
|
||||
|
||||
services.xserver.displayManager.startx.enable = false;
|
||||
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.wlr.enable = true;
|
||||
xdg.portal.xdgOpenUsePortal = true;
|
||||
|
||||
services.xserver.exportConfiguration = true;
|
||||
services.xserver.extraConfig = pkgs.lib.mkDefault ''
|
||||
Section "OutputClass"
|
||||
@@ -50,47 +56,9 @@
|
||||
|
||||
'';
|
||||
|
||||
|
||||
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
|
||||
|
||||
|
||||
services.xserver.libinput.enable = true;
|
||||
|
||||
virtualisation.waydroid.enable = false;
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
dockerSocket.enable = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
users.users.materus = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"audio"
|
||||
"video"
|
||||
"render"
|
||||
"pipewire"
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"input"
|
||||
"kvm"
|
||||
"libvirt-qemu"
|
||||
"libvirt"
|
||||
"libvirtd"
|
||||
"podman"
|
||||
"lxd"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
description = "Mateusz Słodkowicz";
|
||||
};
|
||||
services.libinput.enable = true;
|
||||
|
||||
environment.sessionVariables = {
|
||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
||||
@@ -103,11 +71,8 @@
|
||||
XMODIFIERS = "@im=fcitx";
|
||||
SDL_IM_MODULE = "fcitx";
|
||||
|
||||
|
||||
MOZ_USE_XINPUT2 = "1";
|
||||
PATH = [
|
||||
"\${XDG_BIN_HOME}"
|
||||
];
|
||||
PATH = [ "\${XDG_BIN_HOME}" ];
|
||||
};
|
||||
environment.shellInit = ''
|
||||
if ! [ -z "$DISPLAY" ]; then xhost +si:localuser:root &> /dev/null; fi;
|
||||
@@ -115,18 +80,50 @@
|
||||
'';
|
||||
|
||||
i18n.inputMethod.enabled = "fcitx5";
|
||||
i18n.inputMethod.fcitx5.addons = [ pkgs.kdePackages.fcitx5-configtool pkgs.fcitx5-lua pkgs.fcitx5-mozc pkgs.fcitx5-gtk pkgs.kdePackages.fcitx5-qt ];
|
||||
|
||||
|
||||
i18n.inputMethod.fcitx5.addons = [
|
||||
pkgs.kdePackages.fcitx5-configtool
|
||||
pkgs.fcitx5-lua
|
||||
pkgs.fcitx5-mozc
|
||||
pkgs.fcitx5-gtk
|
||||
pkgs.kdePackages.fcitx5-qt
|
||||
];
|
||||
|
||||
services.pcscd.enable = true;
|
||||
services.samba-wsdd.enable = true;
|
||||
|
||||
services.samba-wsdd.enable = true;
|
||||
services.samba-wsdd.openFirewall = true;
|
||||
services.samba = {
|
||||
enable = true;
|
||||
package = pkgs.sambaFull;
|
||||
};
|
||||
securityType = "user";
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
global = {
|
||||
"workgroup" = "WORKGROUP";
|
||||
"server string" = "smbmaterus";
|
||||
"netbios name " = "smbmaterus";
|
||||
"security" = "user";
|
||||
"hosts allow" = "192.168.122. 127.0.0.1 localhost";
|
||||
"hosts deny" = "0.0.0.0/0";
|
||||
"guest account" = "nobody";
|
||||
"map to guest" = "bad user";
|
||||
"allow insecure wide links" = "yes";
|
||||
};
|
||||
windows = {
|
||||
"path" = "/materus/data/VM/windows_shared";
|
||||
"browseable" = "yes";
|
||||
"read only" = "no";
|
||||
"guest ok" = "no";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
"force user" = "materus";
|
||||
"force group" = "users";
|
||||
"follow symlinks" = "yes";
|
||||
"wide links" = "yes";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
@@ -136,23 +133,36 @@
|
||||
};
|
||||
programs.ssh.startAgent = true;
|
||||
services.openssh.enable = true;
|
||||
services.openssh.settings.PermitRootLogin = "no";
|
||||
services.openssh.settings.PasswordAuthentication = false;
|
||||
services.openssh.openFirewall = true;
|
||||
|
||||
services.sunshine = {
|
||||
enable = true;
|
||||
capSysAdmin = true;
|
||||
openFirewall = true;
|
||||
autoStart = false;
|
||||
};
|
||||
|
||||
environment.enableAllTerminfo = true;
|
||||
environment.pathsToLink = [ "/share/zsh" "/share/bash-completion" "/share/fish" ];
|
||||
environment.shells = with pkgs; [ zsh bashInteractive fish ];
|
||||
environment.pathsToLink = [
|
||||
"/share/zsh"
|
||||
"/share/bash-completion"
|
||||
"/share/fish"
|
||||
];
|
||||
environment.shells = with pkgs; [
|
||||
zsh
|
||||
bashInteractive
|
||||
fish
|
||||
];
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
java.enable = true;
|
||||
java.package = pkgs.graalvm-ce;
|
||||
java.binfmt = true;
|
||||
command-not-found.enable = false;
|
||||
dconf.enable = true;
|
||||
};
|
||||
|
||||
materus.profile.browser.enable = true;
|
||||
|
||||
|
||||
services.davfs2.enable = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./win10
|
||||
./win-vfio
|
||||
];
|
||||
|
||||
materus.materusArg.materusPC = {
|
||||
allCores = "0-31";
|
||||
allCoresMask = "ffffffff";
|
||||
hostCores = "0-7,16-23";
|
||||
hostCoresMask = "00ff00ff";
|
||||
vmCores = "8-15,24-31";
|
||||
vmCoresMask = "ff00ff00";
|
||||
};
|
||||
systemd.mounts = [
|
||||
{
|
||||
where = "/dev/hugepages";
|
||||
@@ -69,6 +76,7 @@
|
||||
bindfs
|
||||
qemu-utils
|
||||
psmisc
|
||||
procps
|
||||
];
|
||||
};
|
||||
in
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
{ config, pkgs, materusArg, ... }:
|
||||
let
|
||||
bar0_guest="15";
|
||||
bar2_guest="8";
|
||||
bar0_host="15";
|
||||
bar2_host="8";
|
||||
|
||||
VM_UUID = "ad2632db-0da0-4204-98b3-0592a185ebd0";
|
||||
|
||||
startedHook = ''
|
||||
# Renice QEMU process and threads
|
||||
|
||||
QEMU_PID=$(ps aux | grep qemu-system-x86_64 | grep "${VM_UUID}" | tr -s ' ' | cut -d " " -f 2)
|
||||
for pid in $(ls /proc/$QEMU_PID/task); do
|
||||
renice -n "-15" -p "$pid";
|
||||
done
|
||||
renice -n "-10" -p "$QEMU_PID";
|
||||
'';
|
||||
startHook = /*''
|
||||
|
||||
|
||||
# Debugging
|
||||
exec 19>/home/materus/startlogfile
|
||||
BASH_XTRACEFD=19
|
||||
set -x
|
||||
|
||||
exec 3>&1 4>&2
|
||||
trap 'exec 2>&4 1>&3' 0 1 2 3
|
||||
exec 1>/home/materus/startlogfile.out 2>&1
|
||||
''
|
||||
+*/
|
||||
''
|
||||
# Service for my shared qcow2 drive, it's mounted to host when VM not running
|
||||
systemctl stop windows-share-mount.service
|
||||
systemctl stop systemd-nspawn@archlinux
|
||||
|
||||
# Remember non symlink path to card and render, symlink might get deleted
|
||||
DRI_RENDER=$(readlink -f /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-render)
|
||||
DRI_CARD=$(readlink -f /dev/dri/by-path/pci-$VIRSH_GPU_VIDEO-card)
|
||||
|
||||
# Send "remove" event so wayland compositors can release gpu, sleep because it doesnt work instantly
|
||||
echo remove > /sys/bus/pci/devices/$VIRSH_GPU_VIDEO/drm/card*/uevent
|
||||
sleep 3s
|
||||
|
||||
# Remove all permissions from DRI nodes so no new processes will attach to it, kill all processes currently using it
|
||||
chmod 0 $DRI_RENDER
|
||||
chmod 0 $DRI_CARD
|
||||
fuser -k $DRI_RENDER
|
||||
fuser -k $DRI_CARD
|
||||
|
||||
# Seems to fix reset bug for 7900 XTX
|
||||
echo "0" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/d3cold_allowed"
|
||||
|
||||
# Unbind GPU from drivers
|
||||
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
|
||||
echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind"
|
||||
|
||||
# Optionally resize bars, it's pointless for me since it's full size here but keeping just in case
|
||||
echo "${bar0_guest}" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
|
||||
echo "${bar2_guest}" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
|
||||
|
||||
# Compact memory if possible to make continuous space for transparent huge pages
|
||||
sync
|
||||
echo "3" > /proc/sys/vm/drop_caches
|
||||
sync
|
||||
echo "1" > /proc/sys/vm/compact_memory
|
||||
|
||||
|
||||
|
||||
# Set host cgroups and workqueue to use defined cpu cores (I'm using first half of cpu on host, second half on guest)
|
||||
systemctl set-property --runtime -- user.slice AllowedCPUs=${materusArg.materusPC.hostCores}
|
||||
systemctl set-property --runtime -- system.slice AllowedCPUs=${materusArg.materusPC.hostCores}
|
||||
systemctl set-property --runtime -- init.scope AllowedCPUs=${materusArg.materusPC.hostCores}
|
||||
echo "${materusArg.materusPC.hostCoresMask}" > /sys/bus/workqueue/devices/writeback/cpumask
|
||||
|
||||
# Set performance governor if not set
|
||||
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
|
||||
# Reduce interval of memory statistics to 120s from default 1s
|
||||
sysctl vm.stat_interval=120
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'';
|
||||
stopHook = ''
|
||||
|
||||
# Debugging
|
||||
# exec 19>/home/materus/stoplogfile
|
||||
# BASH_XTRACEFD=19
|
||||
# set -x
|
||||
|
||||
# exec 3>&1 4>&2
|
||||
# trap 'exec 2>&4 1>&3' 0 1 2 3
|
||||
# exec 1>/home/materus/stoplogfile.out 2>&1
|
||||
|
||||
|
||||
# echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
|
||||
sysctl vm.stat_interval=1
|
||||
|
||||
|
||||
sleep 1s
|
||||
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
|
||||
echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind"
|
||||
|
||||
|
||||
|
||||
|
||||
echo "${bar0_host}" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
|
||||
echo "${bar2_host}" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
|
||||
|
||||
echo "1" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/d3cold_allowed"
|
||||
|
||||
|
||||
echo ''$VIRSH_GPU_VIDEO > /sys/bus/pci/drivers/amdgpu/bind
|
||||
echo ''$VIRSH_GPU_AUDIO > /sys/bus/pci/drivers/snd_hda_intel/bind
|
||||
|
||||
|
||||
systemctl start windows-share-mount.service
|
||||
|
||||
systemctl set-property --runtime -- user.slice AllowedCPUs=${materusArg.materusPC.allCores}
|
||||
systemctl set-property --runtime -- system.slice AllowedCPUs=${materusArg.materusPC.allCores}
|
||||
systemctl set-property --runtime -- init.scope AllowedCPUs=${materusArg.materusPC.allCores}
|
||||
echo "${materusArg.materusPC.allCoresMask}" > /sys/bus/workqueue/devices/writeback/cpumask
|
||||
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
virtualisation.libvirtd.qemu.verbatimConfig = ''
|
||||
cgroup_device_acl = [
|
||||
"/dev/null", "/dev/full", "/dev/zero",
|
||||
"/dev/random", "/dev/urandom",
|
||||
"/dev/ptmx", "/dev/kvm", "/dev/kqemu",
|
||||
"/dev/rtc","/dev/hpet", "/dev/vfio/vfio",
|
||||
"/dev/kvmfr0"
|
||||
]
|
||||
'';
|
||||
virtualisation.libvirtd.hooks.qemu = {
|
||||
"windows-vfio" = pkgs.writeShellScript "windows.sh" ''
|
||||
VIRSH_GPU_VIDEO="0000:03:00.0"
|
||||
VIRSH_GPU_AUDIO="0000:03:00.1"
|
||||
VIRSH_USB1="0000:10:00.0"
|
||||
|
||||
if [ ''$1 = "windows-vfio" ]; then
|
||||
if [ ''$2 = "prepare" ] && [ ''$3 = "begin" ]; then
|
||||
${startHook}
|
||||
fi
|
||||
|
||||
#if [ ''$2 = "started" ] && [ ''$3 = "begin" ]; then
|
||||
${startedHook}
|
||||
#fi
|
||||
|
||||
if [ ''$2 = "release" ] && [ ''$3 = "end" ]; then
|
||||
${stopHook}
|
||||
fi
|
||||
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.windows-share-mount = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ config.virtualisation.libvirtd.qemu.package pkgs.util-linux pkgs.kmod pkgs.coreutils ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.RemainAfterExit = true;
|
||||
script = ''
|
||||
modprobe nbd max_part=16
|
||||
sleep 1
|
||||
qemu-nbd -c /dev/nbd10 /materus/data/VM/data.qcow2 --discard=unmap
|
||||
sleep 1
|
||||
mount /dev/nbd10p1 /materus/data/Windows -o uid=1000,gid=100
|
||||
'';
|
||||
preStop = ''
|
||||
umount -r /dev/nbd10p1
|
||||
qemu-nbd -d /dev/nbd10
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
startHook = /*''
|
||||
|
||||
|
||||
# Debugging
|
||||
exec 19>/home/materus/startlogfile
|
||||
BASH_XTRACEFD=19
|
||||
set -x
|
||||
|
||||
exec 3>&1 4>&2
|
||||
trap 'exec 2>&4 1>&3' 0 1 2 3
|
||||
exec 1>/home/materus/startlogfile.out 2>&1
|
||||
''
|
||||
+*/
|
||||
''
|
||||
# Make sure nothing renders on gpu to prevent "sysfs: cannot create duplicate filename" after rebinding to amdgpu
|
||||
chmod 0 /dev/dri/renderD128
|
||||
fuser -k /dev/dri/renderD128
|
||||
|
||||
# Seems to fix reset bug for 7900 XTX
|
||||
echo "0" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/d3cold_allowed"
|
||||
|
||||
systemctl stop mountWin10Share.service
|
||||
|
||||
|
||||
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
|
||||
echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind"
|
||||
|
||||
sleep 1s
|
||||
|
||||
echo "10" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
|
||||
echo "8" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
|
||||
|
||||
echo "3" > /proc/sys/vm/drop_caches
|
||||
echo "1" > /proc/sys/vm/compact_memory
|
||||
#echo "8192" > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
|
||||
|
||||
|
||||
|
||||
systemctl set-property --runtime -- user.slice AllowedCPUs=0-7,16-23
|
||||
systemctl set-property --runtime -- system.slice AllowedCPUs=0-7,16-23
|
||||
systemctl set-property --runtime -- init.scope AllowedCPUs=0-7,16-23
|
||||
|
||||
|
||||
'';
|
||||
stopHook = ''
|
||||
|
||||
# Debugging
|
||||
# exec 19>/home/materus/stoplogfile
|
||||
# BASH_XTRACEFD=19
|
||||
# set -x
|
||||
|
||||
# exec 3>&1 4>&2
|
||||
# trap 'exec 2>&4 1>&3' 0 1 2 3
|
||||
# exec 1>/home/materus/stoplogfile.out 2>&1
|
||||
|
||||
|
||||
|
||||
sleep 1s
|
||||
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
|
||||
echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind"
|
||||
|
||||
|
||||
|
||||
|
||||
echo "15" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
|
||||
echo "8" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
|
||||
echo "1" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/d3cold_allowed"
|
||||
|
||||
|
||||
echo ''$VIRSH_GPU_VIDEO > /sys/bus/pci/drivers/amdgpu/bind
|
||||
echo ''$VIRSH_GPU_AUDIO > /sys/bus/pci/drivers/snd_hda_intel/bind
|
||||
|
||||
#echo "0" > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
|
||||
|
||||
systemctl start mountWin10Share.service
|
||||
|
||||
systemctl set-property --runtime -- user.slice AllowedCPUs=0-31
|
||||
systemctl set-property --runtime -- system.slice AllowedCPUs=0-31
|
||||
systemctl set-property --runtime -- init.scope AllowedCPUs=0-31
|
||||
|
||||
|
||||
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
virtualisation.libvirtd.hooks.qemu = {
|
||||
"win10" = pkgs.writeShellScript "win10.sh" ''
|
||||
VIRSH_GPU_VIDEO="0000:03:00.0"
|
||||
VIRSH_GPU_AUDIO="0000:03:00.1"
|
||||
VIRSH_USB1="0000:10:00.0"
|
||||
|
||||
if [ ''$1 = "win10" ] || [ ''$1 = "win11" ]; then
|
||||
if [ ''$2 = "prepare" ] && [ ''$3 = "begin" ]; then
|
||||
${startHook}
|
||||
fi
|
||||
|
||||
if [ ''$2 = "release" ] && [ ''$3 = "end" ]; then
|
||||
${stopHook}
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.mountWin10Share = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ config.virtualisation.libvirtd.qemu.package pkgs.util-linux pkgs.kmod pkgs.coreutils ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.RemainAfterExit = true;
|
||||
script = ''
|
||||
modprobe nbd max_part=16
|
||||
sleep 1
|
||||
qemu-nbd -c /dev/nbd0 /materus/data/VM/data.qcow2 --cache=unsafe --discard=unmap
|
||||
sleep 1
|
||||
mount /dev/nbd0p1 /materus/data/Windows -o uid=1000,gid=100
|
||||
'';
|
||||
preStop = ''
|
||||
umount /materus/data/Windows
|
||||
qemu-nbd -d /dev/nbd0
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -64,7 +64,7 @@
|
||||
# hardware.pulseaudio.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
services.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.materus = {
|
||||
@@ -142,6 +142,11 @@
|
||||
};
|
||||
|
||||
|
||||
virtualisation.podman.autoPrune.enable = true;
|
||||
virtualisation.podman.autoPrune.dates = "daily";
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
|
||||
|
||||
security.acme.acceptTerms = true;
|
||||
security.acme.defaults.email = "materus+acme@podkos.pl";
|
||||
security.acme.defaults.credentialsFile = config.sops.secrets.certs.path;
|
||||
@@ -160,21 +165,5 @@
|
||||
dnsProvider = "ovh";
|
||||
};
|
||||
|
||||
security.acme.certs."podkos.xyz" = {
|
||||
domain = "podkos.xyz";
|
||||
group = "nginx";
|
||||
extraDomainNames = [ "*.podkos.xyz" ];
|
||||
dnsProvider = "ovh";
|
||||
};
|
||||
|
||||
|
||||
security.acme.certs."${materusArg.waffentrager.samba.domain}" = {
|
||||
domain = materusArg.waffentrager.samba.domain;
|
||||
extraDomainNames = [
|
||||
"${materusArg.waffentrager.samba.netbiosName}.${materusArg.waffentrager.samba.domain}"
|
||||
];
|
||||
dnsProvider = "ovh";
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "virtio_pci" "floppy" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernel.sysctl = { "net.ipv4.ip_forward" = 1; };
|
||||
boot.kernel.sysctl = { "net.ipv4.ip_forward" = 1; "net.ipv6.conf.all.forwarding" = 1; };
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.tmp.useTmpfs = true;
|
||||
|
||||
Binary file not shown.
@@ -5,7 +5,7 @@ spotify-client-secret: ENC[AES256_GCM,data:TnR+zLLklTfzMdR4woaZWuMVJQ9VIYsFM588G
|
||||
youtube-api: ENC[AES256_GCM,data:qmpFlFvudS9rXQfN+Th/UrPWCW0mg5GkpMucS/01AmOnlChqtojC,iv:q3bKwI2I6BNa3L9ezKCE1fWT/vZLiJ8uzug1z2z+TWA=,tag:gKG3HTz8jp2LAFh8e8O6sg==,type:str]
|
||||
steamladder-api: ENC[AES256_GCM,data:m30o5atqugwqn/WbXGkUq5GvqiIKQT0kSRQCtHc1Gxk/dC3YcbDvMw==,iv:duLKl1NvysD0XMaUOkl/6nclMQB6seXcQYkGMrm7K7Y=,tag:9dw+UH10uAdca5fVdlw1Mg==,type:str]
|
||||
webarchive-accesskey: ENC[AES256_GCM,data:jdKlHsZq2Dkk1BcBfUVv5g==,iv:BXCgPb/2W57PYXxRktInz1LxSEwlw6m3xnQU4TOPMeY=,tag:kK4+InaH7K4D4n1hyGaR+w==,type:str]
|
||||
webarchive-secretkey: ENC[AES256_GCM,data:nuA9G5dNtrNfbcx0G/GUTg==,iv:RRuTm4kZr5dNjBt9Zvk/NVefHCZYODmRvWAqZizKGJY=,tag:J2V0Q3BzXNWifVVvAkwYyg==,type:str]
|
||||
webarchive-secretkey: ENC[AES256_GCM,data:t7lZ1aA72BrBxaE+jXmE3w==,iv:A8PF/MyRTIluqEzzt4uCw7eNCYDXAt4iB29PSrwlVyY=,tag:6HbtcrFeFcpagjzPXOANzA==,type:str]
|
||||
certs: ENC[AES256_GCM,data:ttmSNTTx51a3L2HTC8RnSphDLHO2OSyIgXQ0YpZGySTdu69mgEyhaiSi+IAXg/1AHKRjpFJgE4fhsLAiW78pNYb+Zg7aDL47YtABO99sTZrZnBxZo6k6itpZ3oClDch2ZALzoXChLroc0tUbZKwsfOwGe3pw9lOJZJT34AhV+BVoXDDLQcpQoxz23Baa8oxklecT6wpJ1u1nW+aAHw33gm41Vw==,iv:b0aNZwaRKBg+ipe5+19BowyFbCjZt52S738om6emYGo=,tag:lUqtcc4vVWKx/fnc19vj7A==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
@@ -22,8 +22,8 @@ sops:
|
||||
d2dMUUh1RDB3UnpEdFJsNHpQRXFWemMKc41dlOapTsvH91QLNhdPbrzerPFakOiX
|
||||
J/uoZDMIhsmQxgQM7Fqxr05NywhI/ZjOtJS2bayp73O57xjjMYcyNQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-04-05T22:42:16Z"
|
||||
mac: ENC[AES256_GCM,data:KSRGzHipb58uNYaRYXAy3y+D9cBG53RGxZpNrx2gy+CHbGtkUW1SWc4PPrBwBhb6+TN0vb1zHuOB4HK4Bys/jqmvGgVkO2VKj15MTFMpF5n6w0blFM7d5bCDydHAhvXEZA/PFWq97DTI1Zxb+N/HWJlefKCzYOHHWj7i4leKNjk=,iv:88Ekp0sjEo5UTBLUyYSrkP+MbIFcCmegclJIK3+0jOQ=,tag:H/ESeQhC1PEF00RiDnamyw==,type:str]
|
||||
lastmodified: "2024-11-18T09:01:39Z"
|
||||
mac: ENC[AES256_GCM,data:CVsqff1qCcxyQ0e78ewottYKgqA2rG3j1m8X0Sb8If3qibAiBMMblc8T0doB+Fg4dVhPpbJSZdCx4JiV7sHopv2wNdguXd6Xe0L8iJqWtBeHTGTxSLvJ8UIHknak9c+JeQzZz8jAkbHYUXsc7VyeJaXoQptosz1BbE74D48Xjrg=,iv:0e+etjwabJx7PXgDUoh41Ha3aziQxBlH6QJZGG02ME0=,tag:oQIf503tmFlPoLE5d8Y24w==,type:str]
|
||||
pgp:
|
||||
- created_at: "2024-03-21T22:55:36Z"
|
||||
enc: |-
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
{ config, pkgs, lib, materusArg, ... }:
|
||||
{
|
||||
options.valkyrieService.dcbot.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable dcbot";
|
||||
|
||||
|
||||
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
materusArg,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.valkyrieService.dcbot.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable muse bot";
|
||||
|
||||
config =
|
||||
let
|
||||
cfg = config.valkyrieService.dcbot;
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
sops.templates."dcbot.env".content = ''
|
||||
TOKEN=${config.sops.placeholder.discord-token}
|
||||
MAX_PLAYLIST_SIZE=100
|
||||
PRUNING=false
|
||||
LOCALE=pl
|
||||
DEFAULT_VOLUME=100
|
||||
STAY_TIME=30
|
||||
sops.templates."muse.env".content = ''
|
||||
CACHE_LIMIT=512MB
|
||||
BOT_STATUS=online
|
||||
BOT_ACTIVITY_TYPE=LISTENING
|
||||
BOT_ACTIVITY=Coś
|
||||
DISCORD_TOKEN=${config.sops.placeholder.discord-token}
|
||||
YOUTUBE_API_KEY=${config.sops.placeholder.youtube-api}
|
||||
SPOTIFY_CLIENT_ID=${config.sops.placeholder.spotify-client-id}
|
||||
SPOTIFY_CLIENT_SECRET=${config.sops.placeholder.spotify-client-secret}
|
||||
'';
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/muse 0776 root root -"
|
||||
];
|
||||
|
||||
virtualisation.oci-containers.containers.dcbot = {
|
||||
image = "eritislami/evobot:latest";
|
||||
volumes = [
|
||||
];
|
||||
environmentFiles = [
|
||||
config.sops.templates."dcbot.env".path
|
||||
];
|
||||
image = "ghcr.io/museofficial/muse:latest";
|
||||
volumes = [ "/var/lib/muse:/data" ];
|
||||
environmentFiles = [ config.sops.templates."muse.env".path ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
services.adguardhome.enable = true;
|
||||
|
||||
valkyrieService.pihole.enable = false;
|
||||
valkyrieService.pleroma.enable = true;
|
||||
valkyrieService.pleroma.enable = false;
|
||||
valkyrieService.dcbot.enable = true;
|
||||
valkyrieService.secureyoursoul.enable = true;
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ in
|
||||
"L+ /var/lib/pleroma/static/frontends/soapbox/${soapbox.version} 0766 pleroma pleroma - ${soapbox}"
|
||||
];
|
||||
|
||||
services.nginx.virtualHosts."podkos.xyz" = {
|
||||
services.nginx.virtualHosts."podkos.xyz" = {
|
||||
http2 = true;
|
||||
useACMEHost = "podkos.xyz";
|
||||
forceSSL = true;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running `nixos-help`).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, materusArg, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
@@ -10,7 +10,8 @@
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 1900 ];
|
||||
networking.firewall.allowedUDPPorts = [ 1900 7359];
|
||||
materus.profile.nixpkgs.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
libraspberrypi
|
||||
@@ -27,7 +28,7 @@
|
||||
gzip
|
||||
|
||||
];
|
||||
sound.enable = false;
|
||||
|
||||
boot.tmp.useTmpfs = true;
|
||||
services.xserver.enable = false;
|
||||
networking.hostName = "waffentrager";
|
||||
@@ -38,9 +39,7 @@
|
||||
users.users.materus = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPEDY+H8Hc/RSLE064AAh8IojvqxPd8BE5gec2aOfYMh materus@podkos.pl"
|
||||
];
|
||||
openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ];
|
||||
hashedPasswordFile = config.sops.secrets."users/materus".path;
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
@@ -48,7 +47,7 @@
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [ "nix-command" "flakes" "repl-flake" "no-url-literals" ];
|
||||
experimental-features = [ "nix-command" "flakes" "no-url-literals" ];
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
@@ -100,7 +99,7 @@
|
||||
# hardware.pulseaudio.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
services.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
# users.users.alice = {
|
||||
|
||||
@@ -7,4 +7,12 @@
|
||||
./secrets
|
||||
./services
|
||||
];
|
||||
|
||||
virtualisation.podman.autoPrune.enable = true;
|
||||
virtualisation.podman.autoPrune.dates = "daily";
|
||||
virtualisation.podman.defaultNetwork.settings = {
|
||||
default_subnet = "10.88.0.0/16";
|
||||
};
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
|
||||
}
|
||||
|
||||
@@ -25,4 +25,14 @@
|
||||
sops.secrets."users/materus" = { neededForUsers = true; };
|
||||
sops.secrets.elements = { };
|
||||
sops.secrets.nextcloud-adminpass = { };
|
||||
sops.secrets.maloja = { };
|
||||
sops.secrets.maloja-api = { };
|
||||
sops.secrets.spotify-client-id = {};
|
||||
sops.secrets.spotify-client-secret = {};
|
||||
sops.secrets.lastfm-user= {};
|
||||
sops.secrets.lastfm-pass = {};
|
||||
sops.secrets.lastfm-api = {};
|
||||
sops.secrets.lastfm-secret = {};
|
||||
sops.secrets.lastfm-token = {};
|
||||
sops.secrets.listenbrainz-api = {};
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,8 +1,23 @@
|
||||
wireguard: ENC[AES256_GCM,data:QLngCAtEa6wfRRrZwywbARhsS1oGj9+hGTlC1QV6xnRmlZLorAoftGb8jTg=,iv:rNbE0tfJKTjo0pPwfw3oKxOZmSO9PGgW/xDo9zi8lCU=,tag:ZT4mfXaToiR6SjzOwSz4HA==,type:str]
|
||||
wireguard: ENC[AES256_GCM,data:fFQKj78HGLDmslDST+usAZxWDanHkUORBgIeOb7lQN4EPXdz6mQODHhn1ek=,iv:/BbbiFlfk8fMX4yFgVXuYkxitbRJqai5PHku2wZUFw4=,tag:cutoXkApljbB3bgSvaS1LQ==,type:str]
|
||||
nextcloud-adminpass: ENC[AES256_GCM,data:5vohRPEcJJ8gIRro38O73ufSYYEp1DXpBgjCPdPnMcg=,iv:STh3k5wUwx3AfSDTPCXhuXbPb3d+Vi1cAaQN2a9eW1w=,tag:Ef/Z2Idvl6575Jvs2GDJ8A==,type:str]
|
||||
jwt: ENC[AES256_GCM,data:1Qn7DaBZr8vEa8VZiv2BpwePPOBYRTdHEiDv0asUbvhCtfHvhG4mX5/plyRPlQok6FLEjEzKZTEdnvyyOtFEgA==,iv:kqfHkEr0jkKAro9gQup6CeopQnjfMGhEqbVL81wnDgc=,tag:gP/WACy5cOzzmQOh1v8wsQ==,type:str]
|
||||
lldap-database: ENC[AES256_GCM,data:rNLS4WwvqRd3TFWDXaf8UmDTRsHZNPPS,iv:URV4Oz4ik2vHb03+Zh7ND+AbozSmoXpxENpvad4yvRI=,tag:6TbuMCnHwtTaG5mMWVN/mQ==,type:str]
|
||||
authelia-storagekey: ENC[AES256_GCM,data:T5b5QWf6vlGHniuUic0tEFSJNNWaFbvi3emZOWEQz0AhNqDpxJZqO57KdjZ02NVMoxHN54c0ChWlHRCoAj234A==,iv:Rch5RQ0oblTTWXz0it7zZuYQNYhYMa0MsorAx9N4GV0=,tag:+GlwGnPXLukzDnW6BUf6Hg==,type:str]
|
||||
authelia-database: ENC[AES256_GCM,data:XZYk4clzLaMb3/plELOnEoy4bwu/YSQg,iv:TGDKjLdcdmwEI12XDDNGHTgYnJxB+vV6RaomKU+jwpY=,tag:c/p7X4tzPWWiLvAL7DJmYg==,type:str]
|
||||
ldap-master: ENC[AES256_GCM,data:jiinK8xzuKiTwB9k44okgj+sWWEgbeay,iv:Slvci3EBylIbP/I6NFIJTd3eitxVApXrORtnXY48eGg=,tag:OwaVYBNxNbQyIHrqOcUGhg==,type:str]
|
||||
elements: ENC[AES256_GCM,data:Kh6ueReXpj9h5yQ3P0qY8X1ow4RRZD9zyXZLS6DUIIVuthgqgu9dPzBc7ojnz6nXoYTHt1I2LJJKLOGQYZC+iVxXOk+QADJMPwY4NCyeZ3prgvYMghlD,iv:WFA/UQ0XDFjpbgaDEacrBxkteLitXv3CJP54ANVSJHM=,tag:M+tTpTR0alvQxvUiP2MWlA==,type:str]
|
||||
users:
|
||||
materus: ENC[AES256_GCM,data:MhPrMJ4/0oxEsFZDUKcYb3WMUWLI2ZbRTgnh1fQZG1Ly2J781jcUWtA8vVAdMBedNfWky0mDq5+KEQ/2fJNGU4IkTBvLdAqnWw==,iv:Dpl+M+x1weNIVkEsf3I/uXpG0SM6bDz+d9w7AYwn/MY=,tag:yGc1D2ODp6Te/QAztOj7yA==,type:str]
|
||||
maloja: ENC[AES256_GCM,data:V/WV0181zupKLiDtf5pinwYFFzL1hg+j,iv:KmGHapsD7thnmgkHwnTYFP/fvBS6dft9ZmmFN4AZEXs=,tag:uEmZaFkvBIQfu+3+0gQFlg==,type:str]
|
||||
maloja-api: ENC[AES256_GCM,data:8vLC1a5pL8ldS7LWXqA/HOqtnyYFQk7/oisGgOOYH7TtnpBL93I2O3mWQIGCZUwWqMWFLvbOxIAnpoS0Qmg=,iv:swziHFypoh1YZkyEpDhqH2BhqUrWi0J63CqzORyY4s4=,tag:B9kkYHqyWP0KGPMD4S1I1A==,type:str]
|
||||
spotify-client-id: ENC[AES256_GCM,data:2vC2E7rHBrZ2VHTGqYRJp1fWNWprDaYq4J6gJ7tTfF0=,iv:KQJgzUiD70N2vQeTO9r8ucC96xc9mSW9VlU2IGmKT7Y=,tag:kWR+1Hhb4yGK/AAqxMCd3A==,type:str]
|
||||
spotify-client-secret: ENC[AES256_GCM,data:MKHo36AF1hHiXERltKdeMiuMhiGyyH8E3TqQfTf1tqc=,iv:/dPWUqjDtxZUOLZRx2lrHuU5Sf2fch2Fvnl+20KZ5dk=,tag:ZgsbCFBNHXSUuHbdSlrm4w==,type:str]
|
||||
lastfm-user: ENC[AES256_GCM,data:o/FUjIiB9PcFTQ==,iv:UtovNmHISz9jUj+HFZPIduZj6h3ayjA5RyVlh11k8LM=,tag:bS3ReGR2BRcs3lcutt95UQ==,type:str]
|
||||
lastfm-pass: ENC[AES256_GCM,data:g90kxN+HkSqN+B9XFH6AvbD376bHFPVI,iv:ZRxKxdKXIgKOm7TKKPLR1yLzTBjuCWQk4tTJN5d/0N4=,tag:soIJI75WAhoiXwVYlxkmQA==,type:str]
|
||||
lastfm-api: ENC[AES256_GCM,data:UxGOqFEsjDb5zBXjm6G+66zlr5M0pk/NdTad3a5MBVE=,iv:3v9Lg0bjmlAhcSOjCW44CN7FezSdNG3KVVLrk1G9Ies=,tag:amgDr25PYiB+E7+D/fVEOw==,type:str]
|
||||
lastfm-secret: ENC[AES256_GCM,data:z+XqodyRm9qnZwYwdON/KwAQ3E6hSI+mA0Nby0PQVT4=,iv:sY3Eqr7ZCx5lwjZaRFSghx/3OjuWlDQHQywgt7LpoIo=,tag:f7j1PFanHfLdDK+ASusCMA==,type:str]
|
||||
lastfm-token: ENC[AES256_GCM,data:X877lDOXtou5OF0KbkvuJ4rhJ+3IY5XnyXlqq4LuSb8=,iv:f8t36ut6zlHvBuKGmJabyc9nHViQvUcqNvCVy0YIeB8=,tag:0h9Jm1h2cxegUXXk6UTz9Q==,type:str]
|
||||
listenbrainz-api: ENC[AES256_GCM,data:eh03MPc5kn7CUDXXnEJTx4DXv9BpyabyRL+ENDFJw+kS66tV,iv:gerOaZ3gqM7ccLursFuCJrW1HcSjlTGk0wOLM8x4/2A=,tag:ZqxYNlgdqV0zRUUHm7VK3Q==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
@@ -18,8 +33,8 @@ sops:
|
||||
eFN4VVdUMkVjcTVWNFdLM0xtbExLdncK6LYUufWzIcd2jFyEeZDypo0xkJQ4z91F
|
||||
ULyGxJLLWl6/inYXtxHNdxIIPfwW+5yppBAbXaOgvABi1E7tf1JZcA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-04-12T11:21:33Z"
|
||||
mac: ENC[AES256_GCM,data:TbWjHvrJAB55AjFsbOK/IPb7v4wzqL2JGLvnNTr+ah/c2brdlq6DWeAF2+HA3FpLRt2a0MajwMTCsconoe8hW6Am/WO0FJBoYlneLAl/RlAv7BYfyorTD/Vyp9am7ml5T3f2pdYdsw1k/5RSn1ulUg43vSgi5es5Co8CtzC5hPE=,iv:+V48Azrr9yArwqNi3POYh7QaRMfUreCf7Bmv7kjV9qo=,tag:HDcMMCnyfVQRHTQJZB0R3Q==,type:str]
|
||||
lastmodified: "2024-09-13T18:29:55Z"
|
||||
mac: ENC[AES256_GCM,data:djOmSpNrZoFgUK4JlueCUpZtvHldVEsH90ASO+strLJ7wd1MEFdQaYyNonvTaUUzJQkUncyX3cXdO9Aoj9B6CPSKAuSKE7LRScCCXn+OezwUB5d5m/jLy4KmRhtADO0QHap4+/3fXzOupsHyZpVMIjwUw4tJ9MZMT8iMtbaHv2A=,iv:x4RaxRelUOyyTWpTLFRik92TibE+2mFctz/OYHvBoZA=,tag:S9dIzTc7rVBSFXUISuEDAQ==,type:str]
|
||||
pgp:
|
||||
- created_at: "2024-03-21T18:15:00Z"
|
||||
enc: |-
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
{ config, pkgs, lib, materusArg, ... }:
|
||||
{
|
||||
options.waffentragerService.auth.authelia.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable authelia";
|
||||
config =
|
||||
let
|
||||
cfg = config.waffentragerService.auth.authelia;
|
||||
port = 9091;
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
sops.secrets."authelia-storagekey" = { owner = "authelia"; };
|
||||
sops.secrets."authelia-database" = { owner = "authelia"; };
|
||||
sops.secrets."ldap-master" = { owner = "authelia"; };
|
||||
users.users.authelia = {
|
||||
group = "lldap";
|
||||
isSystemUser = true;
|
||||
};
|
||||
services.authelia.instances.main = {
|
||||
enable = true;
|
||||
user = "authelia";
|
||||
environmentVariables = {
|
||||
AUTHELIA_AUTHENTICATION_BACKEND_LDAP_PASSWORD_FILE = config.sops.secrets."ldap-master".path;
|
||||
AUTHELIA_STORAGE_POSTGRES_PASSWORD_FILE = config.sops.secrets."authelia-database".path;
|
||||
};
|
||||
secrets = {
|
||||
jwtSecretFile = config.sops.secrets.jwt.path;
|
||||
storageEncryptionKeyFile = config.sops.secrets."authelia-storagekey".path;
|
||||
};
|
||||
settings = {
|
||||
access_control = {
|
||||
default_policy = "one_factor";
|
||||
};
|
||||
authentication_backend = {
|
||||
ldap.url = "ldap://127.0.0.1:3890";
|
||||
ldap.implementation = "custom";
|
||||
ldap.base_dn = config.services.lldap.settings.ldap_base_dn;
|
||||
ldap.user = "CN=master,ou=people,DC=podkos,DC=pl";
|
||||
ldap.additional_users_dn = "OU=people";
|
||||
ldap.users_filter = "(&({username_attribute}={input})(objectClass=person))";
|
||||
ldap.additional_groups_dn = "OU=groups";
|
||||
ldap.groups_filter = "(&(member={dn})(objectClass=groupOfNames))";
|
||||
};
|
||||
storage = {
|
||||
postgres.host = "/var/run/postgresql";
|
||||
postgres.port = "5432";
|
||||
postgres.database = "authelia";
|
||||
postgres.username = "authelia";
|
||||
|
||||
};
|
||||
notifier = {
|
||||
disable_startup_check = false;
|
||||
filesystem.filename = "/tmp/test_notification.txt";
|
||||
};
|
||||
session = {
|
||||
name = "materus-session";
|
||||
domain = "materus.pl";
|
||||
};
|
||||
|
||||
default_redirection_url = "https://materus.pl";
|
||||
server.port = port;
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."gatekeeper.materus.pl" = {
|
||||
forceSSL = true;
|
||||
http3 = true;
|
||||
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
|
||||
sslCertificateKey = "/var/lib/mnt_acme/materus.pl/key.pem";
|
||||
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${builtins.toString port}";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,63 +1,13 @@
|
||||
{ config, materusArg, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.waffentragerService.auth;
|
||||
in
|
||||
{
|
||||
options.waffentragerService.auth.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable auth";
|
||||
imports =
|
||||
[
|
||||
./samba.nix
|
||||
./lldap.nix
|
||||
./authelia.nix
|
||||
];
|
||||
config = lib.mkIf cfg.enable
|
||||
config =
|
||||
{
|
||||
waffentragerService.elements.enable = true;
|
||||
waffentragerService.nginx.enable = true;
|
||||
|
||||
|
||||
security.acme.defaults.credentialsFile = config.sops.secrets.certs.path;
|
||||
|
||||
systemd.services.resolvconf.enable = false;
|
||||
networking.hosts = {
|
||||
"${materusArg.ips.wireguard.waffentrager}" = [
|
||||
materusArg.waffentrager.samba.domain
|
||||
"${materusArg.waffentrager.samba.netbiosName}.${materusArg.waffentrager.samba.domain}"
|
||||
materusArg.waffentrager.samba.netbiosName
|
||||
];
|
||||
};
|
||||
environment.etc = {
|
||||
resolvconf = {
|
||||
text = ''
|
||||
search ${materusArg.waffentrager.samba.domain}
|
||||
nameserver ${materusArg.waffentrager.samba.dnsIp}
|
||||
nameserver 9.9.9.9
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
systemd.timers.rsync-acme = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "1min";
|
||||
OnUnitActiveSec = "1h";
|
||||
Unit = "rsync-acme.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.rsync-acme = {
|
||||
description = "Sync acme for samba";
|
||||
path = [ pkgs.rsync ];
|
||||
requires = [ "var-lib-mnt_acme.mount" ];
|
||||
after = [ "var-lib-mnt_acme.mount" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.RemainAfterExit = false;
|
||||
script = ''
|
||||
rsync -avzr --chmod=0600 --chown=root:root /var/lib/mnt_acme/${materusArg.waffentrager.samba.domain}/key.pem ${materusArg.waffentrager.samba.servicePath}/tls/
|
||||
rsync -avzr --chmod=0640 --chown=root:root /var/lib/mnt_acme/${materusArg.waffentrager.samba.domain}/chain.pem ${materusArg.waffentrager.samba.servicePath}/tls/
|
||||
rsync -avzr --chmod=0640 --chown=root:root /var/lib/mnt_acme/${materusArg.waffentrager.samba.domain}/fullchain.pem ${materusArg.waffentrager.samba.servicePath}/tls/
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
|
||||
waffentragerService.auth.lldap.enable = true;
|
||||
waffentragerService.auth.authelia.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
{ config, pkgs, lib, materusArg, ... }:
|
||||
{
|
||||
options.waffentragerService.auth.lldap.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable lldap";
|
||||
config =
|
||||
let
|
||||
cfg = config.waffentragerService.auth.lldap;
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
waffentragerService.elements.enable = true;
|
||||
waffentragerService.nginx.enable = true;
|
||||
services.nginx.virtualHosts."mamba.podkos.pl" = {
|
||||
forceSSL = true;
|
||||
http3 = true;
|
||||
sslTrustedCertificate = "/var/lib/mnt_acme/mamba.podkos.pl/chain.pem";
|
||||
sslCertificateKey = "/var/lib/mnt_acme/mamba.podkos.pl/key.pem";
|
||||
sslCertificate = "/var/lib/mnt_acme/mamba.podkos.pl/fullchain.pem";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:17170";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
|
||||
allow ${materusArg.ip-masks.wireguard.main};
|
||||
allow 192.168.100.0/24;
|
||||
deny all;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.lldap = {
|
||||
requires = [ "elements-mount.service" ];
|
||||
after = [ "elements-mount.service" ];
|
||||
serviceConfig = {
|
||||
DynamicUser = lib.mkForce false;
|
||||
WorkingDirectory = lib.mkForce config.waffentragerService.elements.lldapDir;
|
||||
};
|
||||
};
|
||||
users.groups.lldap = { };
|
||||
users.users.lldap = {
|
||||
group = "lldap";
|
||||
isSystemUser = true;
|
||||
};
|
||||
sops.secrets.jwt = { owner = "lldap"; group = "lldap"; mode = "0440"; };
|
||||
sops.secrets."lldap-database" = { owner = "lldap"; group = "lldap"; };
|
||||
services.lldap.enable = true;
|
||||
services.lldap.environmentFile = config.sops.templates."lldap.env".path;
|
||||
sops.templates."lldap.env" = {
|
||||
content = ''
|
||||
LLDAP_JWT_SECRET_FILE="${config.sops.secrets.jwt.path}"
|
||||
LLDAP_DATABASE_URL="postgres://lldap:${config.sops.placeholder."lldap-database"}@%2Fvar%2Frun%2Fpostgresql/lldap"
|
||||
'';
|
||||
owner = "lldap";
|
||||
group = "lldap";
|
||||
};
|
||||
|
||||
services.lldap.settings = {
|
||||
ldap_base_dn = "dc=podkos,dc=pl";
|
||||
|
||||
ldap_host = "127.0.0.1";
|
||||
http_url = "https://mamba.podkos.pl";
|
||||
ldap_user_dn = "master";
|
||||
ldap_user_email = "materus@podkos.pl";
|
||||
ldap_port = 3890;
|
||||
key_seed = materusArg.waffentrager.lldap.seed;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
{ materusArg, config, lib, pkgs, ... }:
|
||||
{
|
||||
|
||||
|
||||
config =
|
||||
let
|
||||
cfg = config.waffentragerService.auth;
|
||||
sambaCfg = config.services.samba;
|
||||
servicePath = materusArg.waffentrager.samba.servicePath;
|
||||
smbToString = x:
|
||||
if builtins.typeOf x == "bool"
|
||||
then lib.boolToString x
|
||||
else builtins.toString x;
|
||||
shareConfig = name:
|
||||
let share = lib.getAttr name cfg.shares; in
|
||||
"[${name}]\n " + (smbToString (
|
||||
map
|
||||
(key: "${key} = ${smbToString (lib.getAttr key share)}\n")
|
||||
(lib.attrNames share)
|
||||
));
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
|
||||
systemd.services.samba-smbd.enable = false;
|
||||
systemd.services.samba = {
|
||||
description = "Samba Service Daemon";
|
||||
requires = [ "rsync-acme.service" ];
|
||||
after = [ "rsync-acme.service" ];
|
||||
requiredBy = [ "samba.target" ];
|
||||
partOf = [ "samba.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.samba4Full}/sbin/samba --foreground --no-process-group";
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||
LimitNOFILE = 16384;
|
||||
PIDFile = "/run/samba.pid";
|
||||
Type = "notify";
|
||||
NotifyAccess = "all";
|
||||
};
|
||||
unitConfig.RequiresMountsFor = servicePath;
|
||||
};
|
||||
# https://wiki.samba.org/index.php/Samba_AD_DC_Port_Usage
|
||||
networking.firewall.allowedTCPPorts = [ 139 445 389 88 53 464 636 3268];
|
||||
networking.firewall.allowedUDPPorts = [ 135 137 138 389 88 53 123 464];
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${servicePath}/tls/ 0600 root 3000000 -"
|
||||
"d ${servicePath}/private/ 0600 root 3000000 -"
|
||||
"d ${servicePath}/lock/ 0600 root 3000000 -"
|
||||
"d ${servicePath}/cache/ 0600 root 3000000 -"
|
||||
];
|
||||
services.samba = {
|
||||
enable = true;
|
||||
enableNmbd = false;
|
||||
enableWinbindd = false;
|
||||
package = pkgs.samba4Full;
|
||||
configText = ''
|
||||
# Global parameters
|
||||
[global]
|
||||
dns forwarder = ${materusArg.waffentrager.samba.dnsIp}
|
||||
netbios name = ${materusArg.waffentrager.samba.netbiosName}
|
||||
realm = ${lib.toUpper materusArg.waffentrager.samba.domain}
|
||||
server role = active directory domain controller
|
||||
workgroup = ${materusArg.waffentrager.samba.workgroup}
|
||||
idmap_ldb:use rfc2307 = yes
|
||||
ldap server require strong auth = yes
|
||||
private dir = ${servicePath}/private
|
||||
lock dir = ${servicePath}/lock
|
||||
state directory = ${servicePath}/lock
|
||||
cache directory = ${servicePath}/cache
|
||||
tls enabled = yes
|
||||
tls keyfile = ${servicePath}/tls/key.pem
|
||||
tls certfile = ${servicePath}/tls/fullchain.pem
|
||||
tls cafile = ${servicePath}/tls/chain.pem
|
||||
|
||||
[sysvol]
|
||||
path = ${servicePath}/sysvol
|
||||
read only = No
|
||||
|
||||
[netlogon]
|
||||
path = ${servicePath}/sysvol/${materusArg.waffentrager.samba.domain}/scripts
|
||||
read only = No
|
||||
|
||||
|
||||
${sambaCfg.extraConfig}
|
||||
|
||||
${smbToString (map shareConfig (lib.attrNames sambaCfg.shares))}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
@@ -2,12 +2,17 @@
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./elements.nix
|
||||
./postgresql.nix
|
||||
./mount-acme.nix
|
||||
./gitea.nix
|
||||
./storage/elements.nix
|
||||
./storage/mount-acme.nix
|
||||
./storage/gitea.nix
|
||||
./storage/nextcloud.nix
|
||||
./storage/samba.nix
|
||||
./storage/syncthing.nix
|
||||
./multimedia/jellyfin.nix
|
||||
./multimedia/scrobbling.nix
|
||||
./monitoring.nix
|
||||
./nginx.nix
|
||||
./nextcloud.nix
|
||||
./postgresql.nix
|
||||
./auth
|
||||
];
|
||||
waffentragerService.elements.enable = true;
|
||||
@@ -16,5 +21,10 @@
|
||||
waffentragerService.gitea.enable = true;
|
||||
waffentragerService.nginx.enable = true;
|
||||
waffentragerService.nextcloud.enable = true;
|
||||
waffentragerService.auth.enable = true;
|
||||
waffentragerService.samba.enable = true;
|
||||
waffentragerService.jellyfin.enable = true;
|
||||
waffentragerService.scrobbling.enable = true;
|
||||
|
||||
waffentragerService.syncthing.enable = true;
|
||||
waffentragerService.monitoring.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{ materusArg, config, lib, ... }:
|
||||
{
|
||||
options.waffentragerService.monitoring.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable monitoring";
|
||||
config =
|
||||
let
|
||||
cfg = config.waffentragerService.monitoring;
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
services.grafana = {
|
||||
dataDir = "${config.waffentragerService.elements.path}/services/grafana";
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
http_addr = "127.0.0.1";
|
||||
http_port = 3232;
|
||||
|
||||
domain = "watchman.materus.pl";
|
||||
serve_from_sub_path = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
port = 3233;
|
||||
globalConfig.scrape_interval = "30s";
|
||||
stateDir = "elements/services/prometheus";
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "node";
|
||||
static_configs = [{
|
||||
targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ];
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
services.prometheus.exporters.node = {
|
||||
enable = true;
|
||||
port = 3234;
|
||||
enabledCollectors = [ "systemd" ];
|
||||
extraFlags = [ "--collector.ethtool" "--collector.softirqs" "--collector.tcpstat" "--collector.wifi" ];
|
||||
|
||||
};
|
||||
services.nginx.virtualHosts."watchman.materus.pl" = {
|
||||
addSSL = true;
|
||||
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
|
||||
sslCertificateKey = "/var/lib/mnt_acme/materus.pl/key.pem";
|
||||
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
|
||||
http2 = false;
|
||||
http3 = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${toString config.services.grafana.settings.server.http_addr}:${toString config.services.grafana.settings.server.http_port}";
|
||||
proxyWebsockets = true;
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
{ lib, config, materusArg, ... }:
|
||||
{
|
||||
options.waffentragerService.jellyfin.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable jellyfin";
|
||||
|
||||
config =
|
||||
let
|
||||
cfg = config.waffentragerService.jellyfin;
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
services.jellyfin = rec {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
user = "materus";
|
||||
group = "nextcloud";
|
||||
dataDir = config.waffentragerService.elements.jellyfinDir;
|
||||
cacheDir = "${dataDir}/cache";
|
||||
};
|
||||
/*
|
||||
services.jellyseerr = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};*/
|
||||
|
||||
services.nginx = {
|
||||
appendHttpConfig = ''
|
||||
map $request_uri $h264Level { ~(h264-level=)(.+?)& $2; }
|
||||
map $request_uri $h264Profile { ~(h264-profile=)(.+?)& $2; }
|
||||
'';
|
||||
proxyCachePath."jellyfin" = {
|
||||
enable = true;
|
||||
maxSize = "1g";
|
||||
levels = "1:2";
|
||||
keysZoneName = "jellyfin";
|
||||
keysZoneSize = "100m";
|
||||
inactive = "1d";
|
||||
useTempPath = false;
|
||||
|
||||
};
|
||||
virtualHosts = {
|
||||
"noot.materus.pl" = {
|
||||
extraConfig = ''
|
||||
client_max_body_size 20M;
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-XSS-Protection "0"; # Do NOT enable. This is obsolete/dangerous
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
add_header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), battery=(), bluetooth=(), camera=(), clipboard-read=(), display-capture=(), document-domain=(), encrypted-media=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), idle-detection=(), interest-cohort=(), keyboard-map=(), local-fonts=(), magnetometer=(), microphone=(), payment=(), publickey-credentials-get=(), serial=(), sync-xhr=(), usb=(), xr-spatial-tracking=()" always;
|
||||
'';
|
||||
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
|
||||
sslCertificateKey = "/var/lib/mnt_acme/materus.pl/key.pem";
|
||||
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
|
||||
addSSL = true;
|
||||
http2 = false;
|
||||
http3 = true;
|
||||
locations."~ /Items/(.*)/Images" = {
|
||||
proxyPass = "http://127.0.0.1:8096";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Protocol $scheme;
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
|
||||
proxy_cache jellyfin;
|
||||
proxy_cache_revalidate on;
|
||||
proxy_cache_lock on;
|
||||
'';
|
||||
};
|
||||
locations."~ ^/web/htmlVideoPlayer-plugin.[0-9a-z]+.chunk.js$" = {
|
||||
proxyPass = "http://127.0.0.1:8096";
|
||||
extraConfig = ''
|
||||
proxy_set_header Accept-Encoding "";
|
||||
|
||||
sub_filter_types *;
|
||||
sub_filter 'return u=30' 'return u=600';
|
||||
sub_filter 'return u=6' 'return u=60';
|
||||
sub_filter 'maxBufferLength:u' 'maxBufferLength:u,maxBufferSize:180000000';
|
||||
sub_filter_once on;
|
||||
'';
|
||||
};
|
||||
locations."~* ^/Videos/(.*)/(?!live)" = {
|
||||
proxyPass = "http://127.0.0.1:8096";
|
||||
extraConfig = ''
|
||||
# Set size of a slice (this amount will be always requested from the backend by nginx)
|
||||
# Higher value means more latency, lower more overhead
|
||||
# This size is independent of the size clients/browsers can request
|
||||
slice 2m;
|
||||
|
||||
proxy_cache jellyfin;
|
||||
proxy_cache_valid 200 206 301 302 30d;
|
||||
proxy_ignore_headers Expires Cache-Control Set-Cookie X-Accel-Expires;
|
||||
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
|
||||
proxy_connect_timeout 15s;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
# Transmit slice range to the backend
|
||||
proxy_set_header Range $slice_range;
|
||||
|
||||
# This saves bandwidth between the proxy and jellyfin, as a file is only downloaded one time instead of multiple times when multiple clients want to at the same time
|
||||
# The first client will trigger the download, the other clients will have to wait until the slice is cached
|
||||
# Esp. practical during SyncPlay
|
||||
proxy_cache_lock on;
|
||||
proxy_cache_lock_age 60s;
|
||||
|
||||
proxy_cache_key "jellyvideo$uri?MediaSourceId=$arg_MediaSourceId&VideoCodec=$arg_VideoCodec&AudioCodec=$arg_AudioCodec&AudioStreamIndex=$arg_AudioStreamIndex&VideoBitrate=$arg_VideoBitrate&AudioBitrate=$arg_AudioBitrate&SubtitleMethod=$arg_SubtitleMethod&TranscodingMaxAudioChannels=$arg_TranscodingMaxAudioChannels&RequireAvc=$arg_RequireAvc&SegmentContainer=$arg_SegmentContainer&MinSegments=$arg_MinSegments&BreakOnNonKeyFrames=$arg_BreakOnNonKeyFrames&h264-profile=$h264Profile&h264-level=$h264Level&slicerange=$slice_range";
|
||||
|
||||
'';
|
||||
};
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8096";
|
||||
extraConfig = ''
|
||||
proxy_pass_request_headers on;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
|
||||
|
||||
'';
|
||||
};
|
||||
locations."/socket" = {
|
||||
proxyPass = "http://127.0.0.1:8096";
|
||||
extraConfig = ''
|
||||
proxy_pass_request_headers on;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Protocol $scheme;
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,240 @@
|
||||
{ config, pkgs, lib, materusArg, ... }:
|
||||
{
|
||||
options.waffentragerService.scrobbling.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable scrobbling";
|
||||
|
||||
|
||||
|
||||
|
||||
config =
|
||||
let
|
||||
cfg = config.waffentragerService.scrobbling;
|
||||
in
|
||||
|
||||
|
||||
#### MALOJA --------------------------------------------------------------------
|
||||
lib.mkIf cfg.enable {
|
||||
sops.templates."maloja.env".content = ''
|
||||
MALOJA_DATA_DIRECTORY=/data
|
||||
MALOJA_DIRECTORY_STATE=/data/state
|
||||
MALOJA_DIRECTORY_CACHE=/data/cache
|
||||
|
||||
MALOJA_SKIP_SETUP=yes
|
||||
MALOJA_FORCE_PASSWORD=${config.sops.placeholder.maloja}
|
||||
MALOJA_SPOTIFY_API_ID=${config.sops.placeholder.spotify-client-id}
|
||||
MALOJA_SPOTIFY_API_SECRET=${config.sops.placeholder.spotify-client-secret}
|
||||
|
||||
MALOJA_NAME=Melody
|
||||
|
||||
MALOJA_WEEK_OFFSET=1
|
||||
|
||||
PUID=${builtins.toString config.users.users.scrobbler.uid}
|
||||
PGID=${builtins.toString config.users.groups.scrobbler.gid}
|
||||
TC=Europe/Warsaw
|
||||
TIMEZONE=Europe/Warsaw
|
||||
'';
|
||||
services.nginx.virtualHosts = {
|
||||
"melody.materus.pl" = {
|
||||
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
|
||||
sslCertificateKey = "/var/lib/mnt_acme/materus.pl/key.pem";
|
||||
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
|
||||
addSSL = true;
|
||||
http2 = false;
|
||||
http3 = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:42010";
|
||||
extraConfig = ''
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
virtualisation.oci-containers.containers.maloja =
|
||||
{
|
||||
|
||||
image = "krateng/maloja:latest";
|
||||
ports = [
|
||||
"42010:42010"
|
||||
];
|
||||
volumes = [
|
||||
"${config.waffentragerService.elements.malojaDir}:/data"
|
||||
];
|
||||
environmentFiles = [
|
||||
config.sops.templates."maloja.env".path
|
||||
];
|
||||
};
|
||||
systemd.services."${config.virtualisation.oci-containers.backend}-maloja" =
|
||||
|
||||
let
|
||||
malojaCfg = pkgs.writeText "settings.ini" ''[MALOJA]
|
||||
directory_config = /data
|
||||
lastfm_api_key = False
|
||||
audiodb_api_key = False
|
||||
spotify_api_id = False
|
||||
spotify_api_secret = False
|
||||
delimiters_feat = ["ft.","ft","feat.","feat","featuring","Ft.","Ft","Feat.","Feat","Featuring"]
|
||||
delimiters_informal = ["vs.","vs","&","with"]
|
||||
delimiters_formal = ["; ",";"]
|
||||
metadata_providers = ["spotify","deezer","lastfm","audiodb","musicbrainz"]
|
||||
|
||||
'';
|
||||
in
|
||||
{
|
||||
requires = [ "elements-mount.service" ];
|
||||
after = [ "elements-mount.service" ];
|
||||
preStart = ''cp --update=none ${malojaCfg} ${config.waffentragerService.elements.malojaDir}/settings.ini'';
|
||||
|
||||
};
|
||||
|
||||
#### MULTI SCROBBLER --------------------------------------------------------------------
|
||||
users.groups.scrobbler = { gid = 3000; };
|
||||
users.users.scrobbler = {
|
||||
group = "scrobbler";
|
||||
uid = 3000;
|
||||
isSystemUser = true;
|
||||
};
|
||||
sops.templates."multi-scrobbler.env".content = ''
|
||||
TC=Europe/Warsaw
|
||||
CONFIG_DIR=/config
|
||||
PUID=${builtins.toString config.users.users.scrobbler.uid}
|
||||
PGID=${builtins.toString config.users.groups.scrobbler.gid}
|
||||
'';
|
||||
sops.templates."multi-scrobbler.json".owner = "scrobbler";
|
||||
sops.templates."multi-scrobbler.json".group = "scrobbler";
|
||||
sops.templates."multi-scrobbler.json".content = builtins.toJSON {
|
||||
baseUrl = "https://scrobbler.materus.pl";
|
||||
disableWeb = false;
|
||||
debugMode = false;
|
||||
sources = [
|
||||
{
|
||||
name = "materus-spotify";
|
||||
enable = true;
|
||||
clients = [ "maloja" ];
|
||||
data = {
|
||||
clientId = "${config.sops.placeholder.spotify-client-id}";
|
||||
clientSecret = "${config.sops.placeholder.spotify-client-secret}";
|
||||
redirectUri = "https://scrobbler.materus.pl/callback";
|
||||
interval = 30;
|
||||
};
|
||||
type = "spotify";
|
||||
}
|
||||
{
|
||||
name = "materus-jellyfin";
|
||||
enable = true;
|
||||
clients = [ "maloja" ];
|
||||
data = {
|
||||
users = [
|
||||
"materus"
|
||||
];
|
||||
servers = [
|
||||
"waffentrager"
|
||||
];
|
||||
};
|
||||
options = {
|
||||
logPayload = false;
|
||||
logFilterFailure = "warn";
|
||||
};
|
||||
type = "jellyfin";
|
||||
}
|
||||
];
|
||||
clients = [
|
||||
{
|
||||
name = "maloja";
|
||||
enable = true;
|
||||
data = {
|
||||
url = "https://melody.materus.pl/";
|
||||
apiKey = "${config.sops.placeholder.maloja-api}";
|
||||
};
|
||||
type = "maloja";
|
||||
}
|
||||
{
|
||||
name = "materus-brainz";
|
||||
enable = true;
|
||||
configureAs = "client";
|
||||
data = {
|
||||
token = "${config.sops.placeholder.listenbrainz-api}";
|
||||
username = "materus";
|
||||
};
|
||||
type = "listenbrainz";
|
||||
}
|
||||
{
|
||||
name = "materus-lastfm";
|
||||
enable = true;
|
||||
configureAs = "client";
|
||||
data = {
|
||||
apiKey = "${config.sops.placeholder.lastfm-api}";
|
||||
secret = "${config.sops.placeholder.lastfm-secret}";
|
||||
redirectUri = "https://scrobbler.materus.pl/lastfm/callback";
|
||||
};
|
||||
type = "lastfm";
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
"scrobbler.materus.pl" = {
|
||||
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
|
||||
sslCertificateKey = "/var/lib/mnt_acme/materus.pl/key.pem";
|
||||
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
|
||||
addSSL = true;
|
||||
http2 = false;
|
||||
http3 = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:42011";
|
||||
extraConfig = ''
|
||||
allow ${materusArg.ip-masks.wireguard.main};
|
||||
allow 192.168.100.0/24;
|
||||
deny all;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
systemd.services."${config.virtualisation.oci-containers.backend}-multi-scrobbler" =
|
||||
{
|
||||
preStart = ''cp -f ${config.sops.templates."multi-scrobbler.json".path} ${config.waffentragerService.elements.malojaDir}/multi-scrobbler/config.json'';
|
||||
requires = [ "elements-mount.service" ];
|
||||
after = [ "elements-mount.service" ];
|
||||
};
|
||||
virtualisation.oci-containers.containers.multi-scrobbler = {
|
||||
image = "foxxmd/multi-scrobbler:latest";
|
||||
ports = [
|
||||
"127.0.0.1:42011:9078"
|
||||
];
|
||||
volumes = [
|
||||
"${config.waffentragerService.elements.malojaDir}/multi-scrobbler:/config"
|
||||
];
|
||||
environmentFiles = [
|
||||
config.sops.templates."multi-scrobbler.env".path
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ materusArg, config, lib, ... }:
|
||||
{ materusArg, config, lib, pkgs, ... }:
|
||||
{
|
||||
options.waffentragerService.nginx.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable nginx";
|
||||
|
||||
@@ -14,6 +14,16 @@
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
package = pkgs.tengine;
|
||||
virtualHosts."default" = {
|
||||
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
|
||||
sslCertificateKey = "/var/lib/mnt_acme/materus.pl/key.pem";
|
||||
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
|
||||
forceSSL = true;
|
||||
http2 = false;
|
||||
default = true;
|
||||
locations."/" = { extraConfig = ''deny all;''; };
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.nginx = {
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
services.postgresql.authentication = pkgs.lib.mkOverride 10 ''
|
||||
local all all trust
|
||||
host all all 127.0.0.1/32 scram-sha-256
|
||||
host all all ::1/128 scram-sha-256
|
||||
'';
|
||||
systemd.services.postgresql = {
|
||||
partOf = [ "elements-mount.service" ];
|
||||
requires = [ "elements-mount.service" ];
|
||||
after = [ "elements-mount.service" ];
|
||||
};
|
||||
|
||||
+31
-6
@@ -5,6 +5,10 @@
|
||||
options.waffentragerService.elements.uuid = lib.mkOption { default = "e32039c6-e98d-44b0-8e7d-120994bf7be1"; };
|
||||
options.waffentragerService.elements.postgresqlDir = lib.mkOption { default = "${config.waffentragerService.elements.path}/services/postgresql"; };
|
||||
options.waffentragerService.elements.nextcloudDir = lib.mkOption { default = "${config.waffentragerService.elements.path}/services/nextcloud"; };
|
||||
options.waffentragerService.elements.lldapDir = lib.mkOption { default = "${config.waffentragerService.elements.path}/services/lldap"; };
|
||||
options.waffentragerService.elements.jellyfinDir = lib.mkOption { default = "${config.waffentragerService.elements.path}/services/jellyfin"; };
|
||||
options.waffentragerService.elements.malojaDir = lib.mkOption { default = "${config.waffentragerService.elements.path}/services/maloja"; };
|
||||
|
||||
config =
|
||||
let
|
||||
cfg = config.waffentragerService.elements;
|
||||
@@ -21,12 +25,6 @@
|
||||
mkdir -p ${cfg.path}
|
||||
cryptsetup luksOpen /dev/disk/by-uuid/${cfg.uuid} elements -d ${config.sops.secrets.elements.path}
|
||||
mount /dev/mapper/elements ${cfg.path}
|
||||
'' + lib.optionalString config.waffentragerService.postgresql.enable ''
|
||||
mkdir -p ${cfg.postgresqlDir}/${config.waffentragerService.postgresql.version}
|
||||
chown -R postgres:postgres ${cfg.postgresqlDir}
|
||||
'' + lib.optionalString config.waffentragerService.nextcloud.enable ''
|
||||
mkdir -p ${cfg.nextcloudDir}
|
||||
chown -R nextcloud:nextcloud ${cfg.nextcloudDir}
|
||||
''
|
||||
|
||||
;
|
||||
@@ -36,5 +34,32 @@
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.elements-dirmake = {
|
||||
description = "Create dirs in elements drive";
|
||||
path = [ pkgs.cryptsetup pkgs.coreutils pkgs.util-linux ];
|
||||
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.RemainAfterExit = false;
|
||||
script = lib.optionalString config.waffentragerService.postgresql.enable ''
|
||||
mkdir -p ${cfg.postgresqlDir}/${config.waffentragerService.postgresql.version}
|
||||
chown -R postgres:postgres ${cfg.postgresqlDir}
|
||||
'' + lib.optionalString config.waffentragerService.nextcloud.enable ''
|
||||
mkdir -p ${cfg.nextcloudDir}
|
||||
chown -R nextcloud:nextcloud ${cfg.nextcloudDir}
|
||||
'' + lib.optionalString config.waffentragerService.auth.lldap.enable ''
|
||||
mkdir -p ${cfg.lldapDir}
|
||||
chown -R lldap:lldap ${cfg.lldapDir}
|
||||
'' + lib.optionalString config.waffentragerService.jellyfin.enable ''
|
||||
mkdir -p ${cfg.jellyfinDir}
|
||||
chown -R materus:nextcloud ${cfg.jellyfinDir}
|
||||
'' + lib.optionalString config.waffentragerService.scrobbling.enable ''
|
||||
mkdir -p ${cfg.malojaDir}/multi-scrobbler
|
||||
chown -R scrobbler:scrobbler ${cfg.malojaDir}
|
||||
''
|
||||
|
||||
|
||||
;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
+16
-9
@@ -22,16 +22,14 @@
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
notify_push.enable = true;
|
||||
package = pkgs.nextcloud28;
|
||||
package = pkgs.nextcloud31;
|
||||
hostName = "waffentrager.materus.pl";
|
||||
home = config.waffentragerService.elements.nextcloudDir;
|
||||
config.adminuser = "master";
|
||||
config.adminuser = "nextcloud-master";
|
||||
config.adminpassFile = config.sops.secrets.nextcloud-adminpass.path;
|
||||
config.dbtype = "pgsql";
|
||||
config.defaultPhoneRegion = "PL";
|
||||
config.trustedProxies = [ materusArg.ips.valkyrie materusArg.ips.wireguard.valkyrie materusArg.ips.wireguard.waffentrager ];
|
||||
extraAppsEnable = true;
|
||||
maxUploadSize = "4G";
|
||||
maxUploadSize = "8G";
|
||||
https = true;
|
||||
enableImagemagick = true;
|
||||
configureRedis = true;
|
||||
@@ -39,10 +37,14 @@
|
||||
appstoreEnable = true;
|
||||
database.createLocally = true;
|
||||
nginx.recommendedHttpHeaders = true;
|
||||
extraApps = with pkgs.nextcloud28Packages.apps; {
|
||||
extraApps = with pkgs.nextcloud31Packages.apps; {
|
||||
inherit notify_push previewgenerator;
|
||||
};
|
||||
extraOptions = {
|
||||
settings = {
|
||||
log_type = "file";
|
||||
"profile.enabled" = true;
|
||||
default_phone_region = "PL";
|
||||
trusted_proxies = [ materusArg.ips.valkyrie materusArg.ips.wireguard.valkyrie materusArg.ips.wireguard.waffentrager ];
|
||||
mail_smtpmode = "sendmail";
|
||||
mail_sendmailmode = "pipe";
|
||||
enable_previews = true;
|
||||
@@ -55,6 +57,8 @@
|
||||
''OC\Preview\BMP''
|
||||
''OC\Preview\XBitmap''
|
||||
''OC\Preview\MP3''
|
||||
''OC\Preview\OGG''
|
||||
''OC\Preview\OPUS''
|
||||
''OC\Preview\MP4''
|
||||
''OC\Preview\TXT''
|
||||
''OC\Preview\MarkDown''
|
||||
@@ -66,7 +70,6 @@
|
||||
];
|
||||
"overwrite.cli.url" = "https://${config.services.nextcloud.hostName}";
|
||||
};
|
||||
globalProfiles = true;
|
||||
|
||||
phpOptions = {
|
||||
"opcache.memory_consumption" = "512";
|
||||
@@ -79,7 +82,7 @@
|
||||
"opcache.fast_shutdown" = "1";
|
||||
"opcache.save_comments" = "1";
|
||||
};
|
||||
phpExtraExtensions = ex: [ ex.zip ex.zlib ex.tidy ex.smbclient ];
|
||||
phpExtraExtensions = ex: [ ex.zip ex.zlib ex.tidy ex.smbclient ex.sodium ];
|
||||
};
|
||||
services.nginx.virtualHosts.${config.services.nextcloud.hostName} = {
|
||||
forceSSL = true;
|
||||
@@ -89,6 +92,10 @@
|
||||
sslCertificate = "/var/lib/mnt_acme/materus.pl/fullchain.pem";
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
dav_methods PUT DELETE MKCOL COPY MOVE;
|
||||
dav_ext_methods PROPFIND OPTIONS;
|
||||
create_full_put_path on;
|
||||
dav_access user:rw group:rw all:r;
|
||||
'';
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,57 @@
|
||||
{ lib, pkgs, materusArg, config, ... }:
|
||||
{
|
||||
options.waffentragerService.samba.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable samba";
|
||||
|
||||
config =
|
||||
let
|
||||
cfg = config.waffentragerService.samba;
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
waffentragerService.elements.enable = true;
|
||||
|
||||
systemd.services.samba-nmbd = {
|
||||
requires = [ "elements-mount.service" ];
|
||||
after = [ "elements-mount.service" ];
|
||||
};
|
||||
systemd.services.samba-wsdd = {
|
||||
requires = [ "elements-mount.service" ];
|
||||
after = [ "elements-mount.service" ];
|
||||
};
|
||||
services.samba-wsdd.enable = true;
|
||||
services.samba-wsdd.openFirewall = true;
|
||||
services.samba = {
|
||||
enable = true;
|
||||
package = pkgs.sambaFull;
|
||||
securityType = "user";
|
||||
openFirewall = true;
|
||||
settings =
|
||||
{
|
||||
global = {
|
||||
"workgroup" = "WORKGROUP";
|
||||
"server string" = "smbwaffentrager";
|
||||
"netbios name" = "smbwaffentrager";
|
||||
"security" = "user";
|
||||
"hosts allow" = "${materusArg.wireguard.sambaIp} 192.168.100. 127.0.0.1 localhost";
|
||||
"hosts deny" = "0.0.0.0/0";
|
||||
"guest account" = "nobody";
|
||||
"map to guest" = "bad user";
|
||||
"mangled names" = "no";
|
||||
"dos charset" = "CP850";
|
||||
"unix charset" = "UTF-8";
|
||||
"display charset" = "UTF-8";
|
||||
"catia:mappings" = "0x22:0xa8,0x2a:0xa4,0x2f:0xf8,0x3a:0xf7,0x3c:0xab,0x3e:0xbb,0x3f:0xbf,0x5c:0xff,0x7c:0xa6";
|
||||
};
|
||||
materus = {
|
||||
"path" = "${config.waffentragerService.elements.path}/storage/materus";
|
||||
"browseable" = "yes";
|
||||
"read only" = "no";
|
||||
"guest ok" = "no";
|
||||
"create mask" = "0770";
|
||||
"directory mask" = "0770";
|
||||
"force user" = "materus";
|
||||
"force group" = "nextcloud";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{ lib, pkgs, materusArg, config, ... }:
|
||||
{
|
||||
options.waffentragerService.syncthing.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable syncthing";
|
||||
|
||||
config =
|
||||
let
|
||||
cfg = config.waffentragerService.syncthing;
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
waffentragerService.elements.enable = true; networking.firewall.allowedTCPPorts = [ 22000 config.services.syncthing.relay.statusPort config.services.syncthing.relay.port];
|
||||
networking.firewall.allowedUDPPorts = [ 22000 21027 ];
|
||||
systemd.services.syncthing = {
|
||||
requires = [ "elements-mount.service" ];
|
||||
after = [ "elements-mount.service" ];
|
||||
};
|
||||
services = {
|
||||
syncthing = {
|
||||
enable = true;
|
||||
user = "materus";
|
||||
group = "nextcloud";
|
||||
dataDir = "${config.waffentragerService.elements.path}/storage/materus";
|
||||
configDir = "${config.waffentragerService.elements.path}/storage/materus/Inne/Config/Syncthing/waffentrager/";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -4,6 +4,8 @@ let
|
||||
pkgs = (import materusCfg.nixerus { inherit pkgs; }) //
|
||||
(if pkgs.system == "x86_64-linux" then { i686Linux = import materusCfg.nixerus { pkgs = pkgs.pkgsi686Linux; }; } else { });
|
||||
cfg = materusCfg;
|
||||
unstable = import materusCfg.materusFlake.inputs.nixpkgs { system = materusCfg.arch; config = { allowUnfree = true; nvidia.acceptLicense = true; }; };
|
||||
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ in
|
||||
};
|
||||
config.nixpkgs.overlays = lib.mkIf cfg.enableOverlays [ materusArg.cfg.configInputs.emacs-overlay.overlay ];
|
||||
|
||||
config.nix.package = lib.mkDefault pkgs.nixUnstable;
|
||||
config.nix.package = lib.mkDefault pkgs.nixVersions.latest;
|
||||
config.nix.registry = lib.mkIf config.materus.profile.nix.enableRegistry {
|
||||
nixpkgs-stable = {
|
||||
from = { type = "indirect"; id = "nixpkgs-stable"; };
|
||||
@@ -81,11 +81,19 @@ in
|
||||
flake = materusCfg.configInputs.git-agecrypt;
|
||||
};
|
||||
|
||||
plasma-manager = {
|
||||
from = { type = "indirect"; id = "plasma-manager"; };
|
||||
flake = materusCfg.configInputs.plasma-manager;
|
||||
};
|
||||
|
||||
nur = {
|
||||
from = { type = "indirect"; id = "nur"; };
|
||||
flake = materusCfg.configInputs.nur;
|
||||
};
|
||||
|
||||
nix-vscode-extensions = {
|
||||
from = { type = "indirect"; id = "nix-vscode-extensions"; };
|
||||
flake = materusCfg.configInputs.nix-vscode-extensions;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,53 +1,76 @@
|
||||
{ config, pkgs, lib, materusArg, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
materusArg,
|
||||
...
|
||||
}:
|
||||
with materusArg.pkgs.lib;
|
||||
{
|
||||
imports = [
|
||||
./fonts.nix
|
||||
];
|
||||
imports = [ ./fonts.nix ];
|
||||
|
||||
#Single Packages
|
||||
options.materus.profile.packages.home-manager = mkPrivateVar materusArg.cfg.configInputs.home-manager.packages.${pkgs.system}.home-manager;
|
||||
options.materus.profile.packages.firefox = mkPrivateVar (pkgs.firefox.override {
|
||||
nativeMessagingHosts = [
|
||||
pkgs.plasma-browser-integration
|
||||
];
|
||||
});
|
||||
options.materus.profile.packages.home-manager =
|
||||
mkPrivateVar
|
||||
materusArg.cfg.configInputs.home-manager.packages.${pkgs.system}.home-manager;
|
||||
options.materus.profile.packages.firefox = mkPrivateVar (
|
||||
pkgs.firefox.override { nativeMessagingHosts = [ pkgs.plasma-browser-integration ]; }
|
||||
);
|
||||
|
||||
#Package Lists
|
||||
options.materus.profile.packages.list.nixRelated = mkPrivateVar (with pkgs; [
|
||||
nix-prefetch
|
||||
nix-prefetch-scripts
|
||||
nix-prefetch-github
|
||||
nix-prefetch-docker
|
||||
nixfmt
|
||||
nix-top
|
||||
nix-tree
|
||||
nix-diff
|
||||
nix-ld
|
||||
nil
|
||||
nixpkgs-fmt
|
||||
nixpkgs-review
|
||||
]);
|
||||
options.materus.profile.packages.list.nixRelated = mkPrivateVar (
|
||||
with pkgs;
|
||||
[
|
||||
nix-prefetch
|
||||
nix-prefetch-scripts
|
||||
nix-prefetch-github
|
||||
nix-prefetch-docker
|
||||
nixfmt-rfc-style
|
||||
nix-top
|
||||
nix-tree
|
||||
nix-diff
|
||||
nix-ld
|
||||
nixpkgs-fmt
|
||||
nixpkgs-review
|
||||
]
|
||||
);
|
||||
|
||||
options.materus.profile.packages.list.desktopApps = mkPrivateVar (with pkgs; [
|
||||
(discord.override { nss = nss_latest; withOpenASAR = true; withTTS = true; })
|
||||
tdesktop
|
||||
mpv
|
||||
ani-cli
|
||||
obsidian
|
||||
nextcloud-client
|
||||
spotify
|
||||
thunderbird
|
||||
keepassxc
|
||||
(aspellWithDicts (ds: with ds; [ en en-computers en-science pl ]))
|
||||
onlyoffice-bin
|
||||
]);
|
||||
options.materus.profile.packages.list.desktopApps = mkPrivateVar (
|
||||
with pkgs;
|
||||
[
|
||||
(discord.override {
|
||||
nss = nss_latest;
|
||||
withOpenASAR = true;
|
||||
withTTS = true;
|
||||
})
|
||||
tdesktop
|
||||
syncplay
|
||||
ani-cli
|
||||
nextcloud-client
|
||||
spotify
|
||||
thunderbird
|
||||
keepassxc
|
||||
(aspellWithDicts (
|
||||
ds: with ds; [
|
||||
en
|
||||
en-computers
|
||||
en-science
|
||||
pl
|
||||
]
|
||||
))
|
||||
onlyoffice-bin
|
||||
qalculate-qt
|
||||
]
|
||||
);
|
||||
|
||||
options.materus.profile.packages.list.terminalApps = mkPrivateVar (with pkgs; [
|
||||
neofetch
|
||||
ripgrep
|
||||
fd
|
||||
]);
|
||||
options.materus.profile.packages.list.terminalApps = mkPrivateVar (
|
||||
with pkgs;
|
||||
[
|
||||
neofetch
|
||||
ripgrep
|
||||
fd
|
||||
micro
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17,14 +17,17 @@ let
|
||||
pkgs.wqy_zenhei
|
||||
pkgs.corefonts
|
||||
pkgs.hack-font
|
||||
(pkgs.nerdfonts.override { fonts = [ "Hack" ]; })
|
||||
pkgs.nerd-fonts.hack
|
||||
|
||||
] ++ defaultFonts;
|
||||
|
||||
moreFonts = [
|
||||
pkgs.ubuntu_font_family
|
||||
pkgs.monocraft
|
||||
(pkgs.nerdfonts.override { fonts = [ "DroidSansMono" "Meslo" "ProFont" "FiraCode"]; })
|
||||
pkgs.nerd-fonts.droid-sans-mono
|
||||
pkgs.nerd-fonts.meslo-lg
|
||||
pkgs.nerd-fonts.profont
|
||||
pkgs.nerd-fonts.fira-code
|
||||
];
|
||||
in
|
||||
{
|
||||
|
||||
Binary file not shown.
@@ -27,6 +27,20 @@ in
|
||||
(if cfg.enableTerminal then packages.list.terminalApps else [ ]);
|
||||
#Desktop
|
||||
programs.feh.enable = lib.mkDefault cfg.enableDesktop;
|
||||
programs.mpv = lib.mkIf cfg.enableDesktop {
|
||||
enable = true;
|
||||
config = {
|
||||
ytdl-format = "bestvideo+bestaudio";
|
||||
slang="pl,pol,Polish,Polski,en,eng,English";
|
||||
alang="ja,jp,jpn,Japanese,pl,pol,Polski,en,eng,English";
|
||||
demuxer-max-bytes="500MiB";
|
||||
demuxer-max-back-bytes="150MiB";
|
||||
cache="yes";
|
||||
cache-pause-wait="10";
|
||||
cache-pause-initial="yes";
|
||||
keep-open="yes";
|
||||
};
|
||||
};
|
||||
|
||||
#Terminal
|
||||
programs.git = {
|
||||
|
||||
@@ -1,16 +1,158 @@
|
||||
{ config, lib, pkgs, materusArg, ... }:
|
||||
{ config, lib, pkgs, materusArg, materusCfg, ... }:
|
||||
let
|
||||
cfg = config.materus.profile.editor.code;
|
||||
in
|
||||
{
|
||||
options.materus.profile.editor.code.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable VSCodium with materus cfg";
|
||||
options.materus.profile.editor.code.fhs.enable = materusArg.pkgs.lib.mkBoolOpt false "Use fhs vscodium";
|
||||
options.materus.profile.editor.code.fhs.packages = lib.mkOption { default = (ps: [ ]); };
|
||||
ext = let
|
||||
market =
|
||||
(materusCfg.configInputs.nix-vscode-extensions.extensions."${materusCfg.arch}".forVSCodeVersion
|
||||
config.programs.vscode.package.version);
|
||||
marketNv =
|
||||
(materusCfg.configInputs.nix-vscode-extensions.extensions."${materusCfg.arch}");
|
||||
in with market;
|
||||
with pkgs; [
|
||||
#Cpp
|
||||
open-vsx.twxs.cmake
|
||||
vscode-extensions.ms-vscode.cpptools
|
||||
vscode-marketplace.ms-vscode.cmake-tools
|
||||
vscode-marketplace.cs128.cs128-clang-tidy
|
||||
|
||||
#Python
|
||||
#vscode-marketplace.ms-python.python
|
||||
#vscode-marketplace.ms-python.vscode-pylance
|
||||
#vscode-marketplace.ms-python.debugpy
|
||||
|
||||
# CSharp
|
||||
open-vsx.muhammad-sammy.csharp
|
||||
|
||||
#Java
|
||||
vscode-marketplace.redhat.java
|
||||
vscode-marketplace.vscjava.vscode-java-debug
|
||||
vscode-marketplace.vscjava.vscode-java-test
|
||||
vscode-marketplace.vscjava.vscode-gradle
|
||||
vscode-marketplace.vscjava.vscode-java-dependency
|
||||
|
||||
#JS
|
||||
vscode-marketplace.angular.ng-template
|
||||
#DLang
|
||||
open-vsx.webfreak.code-d
|
||||
|
||||
#Nix
|
||||
open-vsx.jnoortheen.nix-ide
|
||||
|
||||
#Web
|
||||
open-vsx.ecmel.vscode-html-css
|
||||
open-vsx.formulahendry.auto-close-tag
|
||||
|
||||
#Lua
|
||||
open-vsx.sumneko.lua
|
||||
|
||||
#YAML, XML
|
||||
open-vsx.redhat.vscode-yaml
|
||||
open-vsx.redhat.vscode-xml
|
||||
|
||||
#Git
|
||||
open-vsx.donjayamanne.githistory
|
||||
#open-vsx.mhutchie.git-graph
|
||||
open-vsx.eamodio.gitlens
|
||||
|
||||
#Other
|
||||
#open-vsx.asciidoctor.asciidoctor-vscode
|
||||
open-vsx.ms-azuretools.vscode-docker
|
||||
open-vsx.webfreak.debug
|
||||
open-vsx.mkhl.direnv
|
||||
#vscode-marketplace.ms-vscode-remote.remote-wsl
|
||||
#vscode-marketplace.ms-vscode-remote.remote-containers
|
||||
open-vsx.esbenp.prettier-vscode
|
||||
open-vsx.formulahendry.code-runner
|
||||
open-vsx.leonardssh.vscord
|
||||
open-vsx.ms-vscode.hexeditor
|
||||
open-vsx.alefragnani.project-manager
|
||||
vscode-marketplace.cantonios.project-templates
|
||||
vscode-marketplace.betterthantomorrow.joyride
|
||||
|
||||
#Icons
|
||||
open-vsx.pkief.material-icon-theme
|
||||
open-vsx.pkief.material-product-icons
|
||||
#Themes
|
||||
open-vsx.dracula-theme.theme-dracula
|
||||
open-vsx.ahmadawais.shades-of-purple
|
||||
|
||||
#Languages
|
||||
marketNv.vscode-marketplace.ms-ceintl.vscode-language-pack-pl
|
||||
|
||||
];
|
||||
set = {
|
||||
"vscord.app.name" = lib.mkDefault "VSCodium";
|
||||
"window.dialogStyle" = lib.mkDefault "custom";
|
||||
"window.titleBarStyle" = lib.mkDefault "custom";
|
||||
"editor.fontFamily" =
|
||||
lib.mkDefault "'Hack Nerd Font', 'monospace', monospace";
|
||||
"workbench.colorTheme" = lib.mkDefault "Shades of Purple";
|
||||
"workbench.productIconTheme" = lib.mkDefault "material-product-icons";
|
||||
"workbench.iconTheme" = lib.mkDefault "material-icon-theme";
|
||||
|
||||
"d.aggressiveUpdate" = lib.mkDefault false;
|
||||
"d.servedPath" = lib.mkDefault "${pkgs.serve-d}/bin/serve-d";
|
||||
|
||||
"direnv.path.executable" = lib.mkDefault "${pkgs.direnv}/bin/direnv";
|
||||
|
||||
"nix.enableLanguageServer" = lib.mkDefault true;
|
||||
"nix.serverPath" = lib.mkDefault "${pkgs.nixd}/bin/nixd";
|
||||
"nix.formatterPath" = lib.mkDefault "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
|
||||
"nix.serverSettings" = {
|
||||
"nixd" = { "formatting" = { "command" = lib.mkDefault [ "nixfmt" ]; }; };
|
||||
};
|
||||
|
||||
"C_Cpp.clang_format_path" =
|
||||
lib.mkDefault "${pkgs.clang-tools}/bin/clang-format";
|
||||
"C_Cpp.clang_format_fallbackStyle" = lib.mkDefault "Microsoft";
|
||||
"clang-tidy.executable" =
|
||||
lib.mkDefault "${pkgs.clang-tools}/bin/clang-tidy";
|
||||
"redhat.telemetry.enabled" = lib.mkDefault false;
|
||||
"python.defaultInterpreterPath" =
|
||||
lib.mkDefault "${pkgs.python3Full}/bin/python";
|
||||
"[cpp]" = {
|
||||
"editor.defaultFormatter" = lib.mkDefault "xaver.clang-format";
|
||||
};
|
||||
"[javascript]" = {
|
||||
"editor.defaultFormatter" = lib.mkDefault "esbenp.prettier-vscode";
|
||||
};
|
||||
"typescript.tsserver.maxTsServerMemory" = 1024 * 8;
|
||||
"typescript.tsserver.nodePath"= lib.mkDefault "${pkgs.nodejs}/bin/node";
|
||||
"cmake.showOptionsMovedNotification" = false;
|
||||
"cmake.pinnedCommands" = [
|
||||
"workbench.action.tasks.configureTaskRunner"
|
||||
"workbench.action.tasks.runTask"
|
||||
];
|
||||
|
||||
};
|
||||
in {
|
||||
options.materus.profile.editor.code.enable =
|
||||
materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop
|
||||
"Enable VSCodium with materus cfg";
|
||||
options.materus.profile.editor.code.fhs.enable =
|
||||
materusArg.pkgs.lib.mkBoolOpt false "Use fhs vscodium";
|
||||
options.materus.profile.editor.code.fhs.packages =
|
||||
lib.mkOption { default = (ps: [ ]); };
|
||||
options.materus.profile.editor.code.extensions =
|
||||
lib.mkOption { default = [ ]; };
|
||||
options.materus.profile.editor.code.settings =
|
||||
lib.mkOption { default = { }; };
|
||||
config = lib.mkIf cfg.enable {
|
||||
materus.profile.editor.code.extensions = ext;
|
||||
materus.profile.editor.code.settings = set;
|
||||
programs.vscode = {
|
||||
enable = lib.mkDefault true;
|
||||
package = lib.mkDefault (if (cfg.fhs.enable) then (pkgs.vscodium.fhsWithPackages cfg.fhs.packages) else pkgs.vscodium);
|
||||
mutableExtensionsDir = lib.mkDefault true;
|
||||
package = lib.mkDefault (if (cfg.fhs.enable) then
|
||||
(pkgs.vscodium.fhsWithPackages cfg.fhs.packages)
|
||||
else
|
||||
pkgs.vscodium);
|
||||
mutableExtensionsDir =
|
||||
lib.mkDefault config.materus.profile.editor.code.fhs.enable;
|
||||
extensions = lib.mkDefault config.materus.profile.editor.code.extensions;
|
||||
enableExtensionUpdateCheck =
|
||||
lib.mkDefault config.materus.profile.editor.code.fhs.enable;
|
||||
enableUpdateCheck = lib.mkDefault false;
|
||||
userSettings = lib.mkDefault config.materus.profile.editor.code.settings;
|
||||
};
|
||||
materus.profile.fonts.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
@@ -1,122 +1,296 @@
|
||||
{ config, lib, pkgs, materusArg, ... }:
|
||||
let
|
||||
configPath = "${materusArg.cfg.path}" + "/extraFiles/config/emacs/";
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
materusArg,
|
||||
materusCfg,
|
||||
...
|
||||
}: let
|
||||
emacs-pkg = materusCfg.configInputs.emacs-overlay.packages.x86_64-linux.emacs-git;
|
||||
|
||||
inits = import ./init.nix { path = configPath; inherit pkgs; };
|
||||
packages = epkgs: with epkgs; [
|
||||
load-relative
|
||||
elcord
|
||||
persp-mode
|
||||
dashboard
|
||||
magit
|
||||
helm
|
||||
avy
|
||||
corfu
|
||||
vterm
|
||||
centaur-tabs
|
||||
projectile
|
||||
company
|
||||
clipetty
|
||||
|
||||
treemacs
|
||||
treemacs-nerd-icons
|
||||
treemacs-perspective
|
||||
treemacs-icons-dired
|
||||
treemacs-magit
|
||||
treemacs-projectile
|
||||
tree-edit
|
||||
vertico
|
||||
nerd-icons
|
||||
nerd-icons-completion
|
||||
perspective
|
||||
minions
|
||||
telephone-line
|
||||
rainbow-delimiters
|
||||
use-package
|
||||
|
||||
cmake-mode
|
||||
lsp-mode
|
||||
lsp-java
|
||||
lsp-jedi
|
||||
lsp-haskell
|
||||
lsp-ui
|
||||
lsp-treemacs
|
||||
dap-mode
|
||||
d-mode
|
||||
multiple-cursors
|
||||
org
|
||||
org-rainbow-tags
|
||||
org-roam
|
||||
org-roam-ui
|
||||
org-review
|
||||
markdown-mode
|
||||
json-mode
|
||||
nix-mode
|
||||
|
||||
minimap
|
||||
materus-nix = e:
|
||||
e.trivialBuild {
|
||||
pname = "materus-nix";
|
||||
src = pkgs.writeText "materus-nix.el" ''
|
||||
(when (file-exists-p "${config.programs.emacs.package}/opt/emacs/buildtime")
|
||||
(setq emacs-build-time (decode-time (seconds-to-time (string-to-number (with-temp-buffer
|
||||
(insert-file-contents "${config.programs.emacs.package}/opt/emacs/buildtime")
|
||||
(buffer-string)))))))
|
||||
|
||||
|
||||
moe-theme
|
||||
doom-themes
|
||||
];
|
||||
|
||||
|
||||
default-config = ''
|
||||
(defvar materus/nix-packages t)
|
||||
(defvar materus/init-from-home nil)
|
||||
(unless materus/init-from-home
|
||||
(message "Config loading not from homeDir, need \"materus/init-from-home\" variable in init.el")
|
||||
${setNixInit}
|
||||
${inits.initText}
|
||||
)
|
||||
'';
|
||||
(defvar lsp-java-configuration-runtimes nil)
|
||||
(setq dap-lldb-debug-program '("${pkgs.llvmPackages.lldb}/bin/lldb-vscode"))
|
||||
(setq lsp-java-configuration-runtimes '[(:name "JavaSE-1.8"
|
||||
:path "${pkgs.jdk8}/lib/openjdk/")
|
||||
(:name "JavaSE-17"
|
||||
:path "${pkgs.jdk17}/lib/openjdk/")
|
||||
(:name "JavaSE-21"
|
||||
:path "${pkgs.jdk21}/lib/openjdk/"
|
||||
:default t)])
|
||||
|
||||
emacsPkgs = with pkgs;[
|
||||
python3
|
||||
lua
|
||||
multimarkdown
|
||||
git
|
||||
];
|
||||
(setq lsp-nix-nixd-nixos-options-expr (concat "(builtins.getFlake \"/etc/nixos\").nixosConfigurations." (system-name) ".options"))
|
||||
(setenv "JAVA_HOME" "${pkgs.jdk21}/lib/openjdk")
|
||||
(setenv "PATH" (concat "${emacsEnv}/bin:" (getenv "PATH")))
|
||||
(setq exec-path (append '("${emacsEnv}/bin") exec-path))
|
||||
|
||||
|
||||
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 148 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
|
||||
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 66 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
|
||||
|
||||
(provide 'materus-nix)
|
||||
'';
|
||||
version = "1.0.0";
|
||||
};
|
||||
|
||||
packages = epkgs:
|
||||
with epkgs; [
|
||||
treesit-grammars.with-all-grammars
|
||||
use-package
|
||||
elcord
|
||||
dashboard
|
||||
magit
|
||||
git-timemachine
|
||||
avy
|
||||
vterm
|
||||
direnv
|
||||
projectile
|
||||
clipetty
|
||||
which-key
|
||||
iedit
|
||||
hideshowvis
|
||||
perspective
|
||||
treemacs
|
||||
treemacs-perspective
|
||||
treemacs-nerd-icons
|
||||
treemacs-icons-dired
|
||||
treemacs-magit
|
||||
treemacs-projectile
|
||||
tree-edit
|
||||
nerd-icons
|
||||
nerd-icons-completion
|
||||
minions
|
||||
rainbow-delimiters
|
||||
rainbow-mode
|
||||
cmake-mode
|
||||
lsp-mode
|
||||
lsp-java
|
||||
lsp-jedi
|
||||
lsp-haskell
|
||||
lsp-pascal
|
||||
lsp-pyright
|
||||
lsp-ui
|
||||
lsp-treemacs
|
||||
dap-mode
|
||||
flycheck
|
||||
gradle-mode
|
||||
groovy-mode
|
||||
kotlin-mode
|
||||
d-mode
|
||||
lua-mode
|
||||
multiple-cursors
|
||||
org
|
||||
org-contrib
|
||||
org-ql
|
||||
org-rainbow-tags
|
||||
org-roam
|
||||
org-roam-ui
|
||||
org-review
|
||||
org-present
|
||||
org-modern
|
||||
org-auto-tangle
|
||||
ox-pandoc
|
||||
visual-fill-column
|
||||
csharp-mode
|
||||
markdown-mode
|
||||
json-mode
|
||||
nix-mode
|
||||
nixfmt
|
||||
nix-ts-mode
|
||||
no-littering
|
||||
right-click-context
|
||||
dracula-theme
|
||||
doom-themes
|
||||
doom-modeline
|
||||
popper
|
||||
undo-tree
|
||||
bash-completion
|
||||
eldoc-box
|
||||
yasnippet
|
||||
yasnippet-capf
|
||||
async
|
||||
request
|
||||
markdown-ts-mode
|
||||
llvm-ts-mode
|
||||
treesit-fold
|
||||
treesit-auto
|
||||
tree-sitter-langs
|
||||
eat
|
||||
vlf
|
||||
edit-indirect
|
||||
zones
|
||||
sudo-edit
|
||||
toc-org
|
||||
#empv
|
||||
volatile-highlights
|
||||
highlight
|
||||
elfeed
|
||||
elfeed-goodies
|
||||
drag-stuff
|
||||
dirvish
|
||||
rg
|
||||
shfmt
|
||||
mermaid-mode
|
||||
ob-mermaid
|
||||
visual-replace
|
||||
scroll-restore
|
||||
highlight-indent-guides
|
||||
diff-hl
|
||||
transient
|
||||
embark
|
||||
embark-consult
|
||||
ef-themes
|
||||
pdf-tools
|
||||
minimap
|
||||
geiser-guile
|
||||
fennel-mode
|
||||
paredit
|
||||
# Completions & Minibuffer
|
||||
corfu
|
||||
corfu-terminal
|
||||
kind-icon
|
||||
cape
|
||||
orderless
|
||||
vertico
|
||||
marginalia
|
||||
];
|
||||
|
||||
emacsEnv = pkgs.buildEnv {
|
||||
name = "emacs-env";
|
||||
paths = with pkgs; [
|
||||
jdk21
|
||||
|
||||
luaformatter
|
||||
pandoc
|
||||
(luajit.withPackages (p: [
|
||||
p.fennel
|
||||
p.lua-lsp
|
||||
]))
|
||||
fennel-ls
|
||||
fnlfmt
|
||||
sbcl
|
||||
silver-searcher
|
||||
guile
|
||||
plantuml
|
||||
mermaid-cli
|
||||
pyright
|
||||
shfmt
|
||||
ripgrep
|
||||
cmake
|
||||
gnumake
|
||||
nixfmt-rfc-style
|
||||
(python3.withPackages (python-pkgs: with python-pkgs; [
|
||||
matplotlib
|
||||
pandas
|
||||
requests
|
||||
]))
|
||||
multimarkdown
|
||||
git
|
||||
emacs-lsp-booster
|
||||
llvmPackages.clang-tools
|
||||
llvmPackages.clang
|
||||
llvmPackages.lldb
|
||||
(hiPrio gcc)
|
||||
gdb
|
||||
materusArg.unstable.nixd
|
||||
jdt-language-server
|
||||
gradle
|
||||
fpc
|
||||
nodejs
|
||||
omnisharp-roslyn
|
||||
texlive.combined.scheme-full
|
||||
];
|
||||
};
|
||||
|
||||
cfg = config.materus.profile.editor.emacs;
|
||||
|
||||
|
||||
setNixInit = ''
|
||||
(setenv "PATH" (concat (getenv "PATH") ":${lib.makeBinPath emacsPkgs}"))
|
||||
${builtins.concatStringsSep "\n" (builtins.map (x: "(setq exec-path (append exec-path '(\""+x+"/bin\")))" ) emacsPkgs)}
|
||||
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 66 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.materus.profile.editor.emacs.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable emacs with materus cfg";
|
||||
in {
|
||||
options.materus.profile.editor.emacs.enable =
|
||||
materusArg.pkgs.lib.mkBoolOpt false "Enable emacs with materus cfg";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.activation.emacsCompile = lib.hm.dag.entryAfter [ "linkGeneration" ] ''
|
||||
run ${config.programs.emacs.finalPackage}/bin/emacs --batch \
|
||||
--eval '(setq warning-minimum-log-level :error)' \
|
||||
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/early-init.el")' \
|
||||
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/init.el")'
|
||||
'';
|
||||
xdg.configFile."emacs/init.el".text = ''
|
||||
(defvar materus/nix-packages nil)
|
||||
(defvar materus/init-from-home t)
|
||||
(setq-default materus/init-from-home t)
|
||||
home.activation.emacsSetup = lib.hm.dag.entryAfter ["linkGeneration"] '''';
|
||||
|
||||
${setNixInit}
|
||||
${inits.initText}
|
||||
'';
|
||||
|
||||
xdg.configFile."emacs/early-init.el".text = ''
|
||||
${inits.earlyInitText}
|
||||
'';
|
||||
#Emacsclient with COLORTERM env variable, without it display in "-nw" client is broken
|
||||
xdg.desktopEntries.emacs = {
|
||||
name = "Emacs";
|
||||
genericName = "Edytor tekstu";
|
||||
comment = "Edytuj tekst";
|
||||
exec = ''env COLORTERM=truecolor emacsclient -a "" -r %F'';
|
||||
icon = "emacs";
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
categories = [
|
||||
"Development"
|
||||
"TextEditor"
|
||||
];
|
||||
mimeType = [
|
||||
"text/english"
|
||||
"text/plain"
|
||||
"text/x-makefile"
|
||||
"text/x-c++hdr"
|
||||
"text/x-c++src"
|
||||
"text/x-chdr"
|
||||
"text/x-csrc"
|
||||
"text/x-java"
|
||||
"text/x-moc"
|
||||
"text/x-pascal"
|
||||
"text/x-tcl"
|
||||
"text/x-tex"
|
||||
"application/x-shellscript"
|
||||
"text/x-c"
|
||||
"text/x-c++"
|
||||
"x-scheme-handler/org-protocol"
|
||||
];
|
||||
actions.new-window = {
|
||||
exec = ''env COLORTERM=truecolor emacsclient -a "" -c %F'';
|
||||
name = "Nowe okno";
|
||||
};
|
||||
actions.no-daemon = {
|
||||
exec = "env COLORTERM=truecolor emacs %F";
|
||||
name = "Instancja samodzielna";
|
||||
};
|
||||
};
|
||||
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = with pkgs; lib.mkDefault materusArg.pkgs.emacs-materus;
|
||||
extraPackages = epkgs: ((packages epkgs));
|
||||
extraConfig = default-config;
|
||||
};
|
||||
extraPackages = epkgs: [(materus-nix epkgs) epkgs.vterm epkgs.treesit-grammars.with-all-grammars];
|
||||
package = lib.mkDefault (
|
||||
(emacs-pkg.override {
|
||||
withSQLite3 = true;
|
||||
withWebP = true;
|
||||
withX = true;
|
||||
#withXwidgets = true;
|
||||
withGTK3 = true;
|
||||
withAlsaLib = true;
|
||||
|
||||
#withGconf = true;
|
||||
withImageMagick = true;
|
||||
})
|
||||
.overrideAttrs
|
||||
(
|
||||
f: p: {
|
||||
#Remove .desktop files, will use my own. Add file with buildtime in case of using elpaca
|
||||
postInstall =
|
||||
p.postInstall
|
||||
+ ''
|
||||
rm -fr $out/share/applications/*
|
||||
mkdir -p $out/opt/emacs
|
||||
date +%s | tr -d '\n' > $out/opt/emacs/buildtime
|
||||
'';
|
||||
}
|
||||
)
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
{ path, pkgs }:
|
||||
{
|
||||
|
||||
earlyInitText = ''
|
||||
${builtins.readFile (path + "early-init.el")}
|
||||
'';
|
||||
initText = ''
|
||||
(defvar materus/init-from-home nil)
|
||||
(when materus/init-from-home
|
||||
(setq-default inhibit-defaul-init 1)
|
||||
)
|
||||
(setq-default materus/nix-packages (require 'doom-themes nil 'noerror))
|
||||
${builtins.readFile (path + "packages.el")}
|
||||
${builtins.readFile (path + "init.el")}
|
||||
'';
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
From 75e41ae5bd1c0879b323ed0ddc4bac29badb29ff Mon Sep 17 00:00:00 2001
|
||||
From: fanshi1028 <jackychany321@gmail.com>
|
||||
Date: Fri, 1 Nov 2024 14:41:26 +0000
|
||||
Subject: [PATCH] fix lsp-org breaks with org 9.7 (#4300)
|
||||
|
||||
---
|
||||
lsp-mode.el | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lsp-mode.el b/lsp-mode.el
|
||||
index f5c700dbf3..a149d6d2c7 100644
|
||||
--- a/lsp-mode.el
|
||||
+++ b/lsp-mode.el
|
||||
@@ -9668,7 +9668,7 @@ defaults to `progress-bar."
|
||||
(save-excursion
|
||||
(funcall goto-buffer)
|
||||
(funcall f))))))
|
||||
- ((&plist :begin :end :post-blank :language) (cl-second (org-element-context)))
|
||||
+ ((begin end post-blank language) (--map (org-element-property it (org-element-context) nil t) '(:begin :end :post-blank :language)))
|
||||
((&alist :tangle file-name) (cl-third (org-babel-get-src-block-info 'light)))
|
||||
|
||||
(file-name (if file-name
|
||||
@@ -7,24 +7,29 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
coc.enable = true;
|
||||
coc.package = pkgs.vimPlugins.coc-nvim;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
defaultEditor = lib.mkDefault false;
|
||||
|
||||
|
||||
extraConfig = ''
|
||||
set number
|
||||
'';
|
||||
extraLuaConfig = ''
|
||||
'';
|
||||
|
||||
extraPackages = with pkgs;[
|
||||
];
|
||||
|
||||
plugins = with pkgs.vimPlugins;[
|
||||
syntastic
|
||||
|
||||
vim-fugitive
|
||||
vim-airline
|
||||
vim-nix
|
||||
|
||||
nvim-fzf
|
||||
nvim-treesitter.withAllGrammars
|
||||
|
||||
|
||||
@@ -9,11 +9,17 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
programs.bash = {
|
||||
|
||||
enable = true;
|
||||
enableCompletion = lib.mkDefault true;
|
||||
enableVteIntegration = lib.mkDefault true;
|
||||
historyControl = lib.mkDefault [ "erasedups" "ignorespace" ];
|
||||
shellOptions = lib.mkDefault [ "autocd" "checkwinsize" "cmdhist" "expand_aliases" "extglob" "globstar" "checkjobs" "nocaseglob" ];
|
||||
initExtra = ''
|
||||
if [ -n "$EAT_SHELL_INTEGRATION_DIR" ]; then
|
||||
source "$EAT_SHELL_INTEGRATION_DIR/bash";
|
||||
fi
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{config, pkgs, lib, ...}:
|
||||
{
|
||||
|
||||
imports = [
|
||||
@@ -6,4 +7,12 @@
|
||||
./fish.nix
|
||||
./starship.nix
|
||||
];
|
||||
home.sessionVariables = {
|
||||
EDITOR = lib.mkDefault (if (config.materus.profile.editor.emacs.enable) then
|
||||
lib.getBin (pkgs.writeShellScript "editor" ''${config.programs.emacs.finalPackage}/bin/emacsclient --alternate-editor= -c -nw $@'')
|
||||
else "${pkgs.micro}/bin/micro");
|
||||
VISUAL = lib.mkDefault (if (config.materus.profile.editor.emacs.enable) then
|
||||
lib.getBin (pkgs.writeShellScript "editor-visual" ''exec env COLORTERM=truecolor ${config.programs.emacs.finalPackage}/bin/emacsclient --alternate-editor= -c $@'')
|
||||
else "${pkgs.micro}/bin/micro");
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
{ config, pkgs, lib, materusArg, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
materusArg,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
||||
relToDotDir = file: (lib.optionalString (config.programs.zsh.dotDir != null) (config.programs.zsh.dotDir + "/")) + file;
|
||||
relToDotDir =
|
||||
file:
|
||||
(lib.optionalString (config.programs.zsh.dotDir != null) (config.programs.zsh.dotDir + "/")) + file;
|
||||
pluginsDir =
|
||||
if config.programs.zsh.dotDir != null then
|
||||
relToDotDir "plugins" else "${config.home.homeDirectory}/.zsh/plugins";
|
||||
|
||||
|
||||
relToDotDir "plugins"
|
||||
else
|
||||
"${config.home.homeDirectory}/.zsh/plugins";
|
||||
|
||||
p10kcfg = "${zshcfg}/p10kcfg";
|
||||
zshcfg = "${materusArg.cfg.path}" + "/extraFiles/config/zsh";
|
||||
@@ -19,11 +27,6 @@ let
|
||||
fi
|
||||
'';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
makePlugin = nameArg: fileArg: srcArg: rec {
|
||||
name = nameArg;
|
||||
src = srcArg;
|
||||
@@ -33,15 +36,18 @@ let
|
||||
};
|
||||
|
||||
extraPlugins = {
|
||||
powerlevel10k = makePlugin "powerlevel10k" "powerlevel10k.zsh-theme" (pkgs.fetchFromGitHub {
|
||||
owner = "romkatv";
|
||||
repo = "powerlevel10k";
|
||||
rev = "v1.20.0";
|
||||
sha256 = "sha256-ES5vJXHjAKw/VHjWs8Au/3R+/aotSbY7PWnWAMzCR8E=";
|
||||
});
|
||||
powerlevel10k = makePlugin "powerlevel10k" "powerlevel10k.zsh-theme" (
|
||||
pkgs.fetchFromGitHub {
|
||||
owner = "romkatv";
|
||||
repo = "powerlevel10k";
|
||||
rev = "v1.20.0";
|
||||
sha256 = "sha256-ES5vJXHjAKw/VHjWs8Au/3R+/aotSbY7PWnWAMzCR8E=";
|
||||
}
|
||||
);
|
||||
sudo = makePlugin "sudo" "sudo.plugin.zsh" "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/sudo";
|
||||
extract = makePlugin "extract" "extract.plugin.zsh" "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/extract";
|
||||
|
||||
extract =
|
||||
makePlugin "extract" "extract.plugin.zsh"
|
||||
"${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/extract";
|
||||
|
||||
};
|
||||
in
|
||||
@@ -58,42 +64,44 @@ in
|
||||
type = lib.types.lines;
|
||||
};
|
||||
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [
|
||||
pkgs.ripgrep
|
||||
];
|
||||
home.packages = [ pkgs.ripgrep ];
|
||||
|
||||
home.file = lib.mkMerge [
|
||||
(builtins.foldl' (a: b: a // b) { } (builtins.map (plugin: { ${plugin.path}.source = plugin.src; }) (builtins.attrValues extraPlugins)))
|
||||
(builtins.foldl' (a: b: a // b) { } (
|
||||
builtins.map (plugin: { ${plugin.path}.source = plugin.src; }) (builtins.attrValues extraPlugins)
|
||||
))
|
||||
{ "${relToDotDir ".zshrc"}".text = lib.mkAfter cfg.endConfig; }
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableSyntaxHighlighting = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
enableVteIntegration = true;
|
||||
historySubstringSearch.enable = true;
|
||||
historySubstringSearch.searchUpKey = "$key[Up]";
|
||||
historySubstringSearch.searchDownKey = "$key[Down]";
|
||||
|
||||
|
||||
envExtra = ''
|
||||
${makeEnv "__MATERUS_HM_ZSH" "1"}
|
||||
${makeEnv "__MATERUS_HM_ZSH_PROMPT" cfg.prompt}
|
||||
${makeEnv "__MATERUS_HM_ZSH_PRIVATE" "0"}
|
||||
'';
|
||||
initExtraFirst = ''
|
||||
bindkey -e
|
||||
if [ -n "$EAT_SHELL_INTEGRATION_DIR" ]; then
|
||||
source "$EAT_SHELL_INTEGRATION_DIR/zsh";
|
||||
fi
|
||||
|
||||
${makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" ''
|
||||
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
||||
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
||||
fi
|
||||
if [[ -f "${extraPlugins.powerlevel10k.fullPath}" ]]; then
|
||||
source "${extraPlugins.powerlevel10k.fullPath}"
|
||||
fi
|
||||
''
|
||||
}
|
||||
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
||||
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
||||
fi
|
||||
if [[ -f "${extraPlugins.powerlevel10k.fullPath}" ]]; then
|
||||
source "${extraPlugins.powerlevel10k.fullPath}"
|
||||
fi
|
||||
''}
|
||||
if zmodload zsh/terminfo && (( "$terminfo[colors]" >= "256" )); then
|
||||
__MATERUS_HM_ZSH_256COLORS="''${__MATERUS_HM_ZSH_256COLORS:-1}"; else
|
||||
__MATERUS_HM_ZSH_256COLORS="''${__MATERUS_HM_ZSH_256COLORS:-0}";
|
||||
@@ -107,12 +115,9 @@ in
|
||||
path+="${extraPlugins.extract.path}"
|
||||
fpath+="${extraPlugins.extract.path}"
|
||||
fi
|
||||
'';
|
||||
'';
|
||||
|
||||
|
||||
|
||||
plugins = [
|
||||
];
|
||||
plugins = [ ];
|
||||
|
||||
history = {
|
||||
extended = true;
|
||||
@@ -125,58 +130,67 @@ in
|
||||
};
|
||||
|
||||
completionInit = ''
|
||||
ZSH_COMPDUMP="''${ZSH_COMPDUMP:-''${XDG_CACHE_HOME:-${config.home.homeDirectory}/.cache}/.zcompdump-''${HOST}-''${ZSH_VERSION}}"
|
||||
autoload -U compinit && compinit -d $ZSH_COMPDUMP
|
||||
ZSH_COMPDUMP="''${ZSH_COMPDUMP:-''${XDG_CACHE_HOME:-${config.home.homeDirectory}/.cache}/.zcompdump-''${HOST}-''${ZSH_VERSION}}"
|
||||
autoload -U compinit && compinit -d $ZSH_COMPDUMP
|
||||
'';
|
||||
initExtra = ''
|
||||
if [[ "$__ETC_ZSHRC_SOURCED" != "1" ]]; then
|
||||
. ${zshcfg}/zinputrc
|
||||
fi
|
||||
source ${zshcfg}/zshcompletion.zsh
|
||||
initExtra =
|
||||
''
|
||||
if [[ "$__ETC_ZSHRC_SOURCED" != "1" ]]; then
|
||||
. ${zshcfg}/zinputrc
|
||||
fi
|
||||
source ${zshcfg}/zshcompletion.zsh
|
||||
|
||||
history-substring-search-up-prefixed(){
|
||||
HISTORY_SUBSTRING_SEARCH_PREFIXED=1 history-substring-search-up
|
||||
}
|
||||
history-substring-search-down-prefixed(){
|
||||
HISTORY_SUBSTRING_SEARCH_PREFIXED=1 history-substring-search-down
|
||||
}
|
||||
history-substring-search-up-prefixed(){
|
||||
HISTORY_SUBSTRING_SEARCH_PREFIXED=1 history-substring-search-up
|
||||
}
|
||||
history-substring-search-down-prefixed(){
|
||||
HISTORY_SUBSTRING_SEARCH_PREFIXED=1 history-substring-search-down
|
||||
}
|
||||
|
||||
|
||||
zle -N history-substring-search-up-prefixed
|
||||
zle -N history-substring-search-down-prefixed
|
||||
zle -N history-substring-search-up-prefixed
|
||||
zle -N history-substring-search-down-prefixed
|
||||
|
||||
|
||||
bindkey -r "^["
|
||||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
bindkey "^[[1;5A" history-substring-search-up-prefixed
|
||||
bindkey "^[[1;5B" history-substring-search-down-prefixed
|
||||
bindkey -r "^["
|
||||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
bindkey "^[[1;5A" history-substring-search-up-prefixed
|
||||
bindkey "^[[1;5B" history-substring-search-down-prefixed
|
||||
|
||||
zsh-private() {
|
||||
__MATERUS_HM_ZSH_PRIVATE=1 ${lib.getExe config.programs.zsh.package}
|
||||
}
|
||||
bindkey '^[[3~' delete-char
|
||||
bindkey '^[[3;2~' delete-word
|
||||
|
||||
myip() {
|
||||
${lib.getExe pkgs.wget} -qO- https://wtfismyip.com/text
|
||||
}
|
||||
zsh-private() {
|
||||
__MATERUS_HM_ZSH_PRIVATE=1 ${lib.getExe config.programs.zsh.package}
|
||||
}
|
||||
|
||||
speedtest() {
|
||||
${lib.getExe pkgs.curl} -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | ${lib.getExe pkgs.python3}
|
||||
}
|
||||
myip() {
|
||||
${lib.getExe pkgs.wget} -qO- https://wtfismyip.com/text
|
||||
}
|
||||
|
||||
speedtest() {
|
||||
${lib.getExe pkgs.curl} -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | ${lib.getExe pkgs.python3}
|
||||
}
|
||||
${lib.optionalString config.materus.profile.editor.emacs.enable ''alias "e"="emacsclient -nw -c --alternate-editor= "''}
|
||||
${lib.optionalString config.materus.profile.editor.emacs.enable ''alias "ee"="emacsclient -n -r --alternate-editor= "''}
|
||||
|
||||
|
||||
'' +
|
||||
makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" ''
|
||||
if [[ "$__MATERUS_HM_ZSH_256COLORS" = "1" ]] ; then
|
||||
[[ ! -f ${p10kcfg}/fullcolor.zsh ]] || source ${p10kcfg}/fullcolor.zsh
|
||||
else
|
||||
[[ ! -f ${p10kcfg}/compatibility.zsh ]] || source ${p10kcfg}/compatibility.zsh
|
||||
fi
|
||||
'' + makeIfVar "__MATERUS_HM_ZSH_PRIVATE" "1" ''
|
||||
unset HISTFILE
|
||||
${lib.optionalString config.programs.zsh.history.share "unsetopt SHARE_HISTORY"}
|
||||
alias -- 'zsh'="__MATERUS_HM_ZSH_PRIVATE=0 zsh "
|
||||
''
|
||||
|
||||
|
||||
''
|
||||
+ makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" ''
|
||||
if [[ "$__MATERUS_HM_ZSH_256COLORS" = "1" ]] ; then
|
||||
[[ ! -f ${p10kcfg}/fullcolor.zsh ]] || source ${p10kcfg}/fullcolor.zsh
|
||||
else
|
||||
[[ ! -f ${p10kcfg}/compatibility.zsh ]] || source ${p10kcfg}/compatibility.zsh
|
||||
fi
|
||||
''
|
||||
+ makeIfVar "__MATERUS_HM_ZSH_PRIVATE" "1" ''
|
||||
unset HISTFILE
|
||||
${lib.optionalString config.programs.zsh.history.share "unsetopt SHARE_HISTORY"}
|
||||
alias -- 'zsh'="__MATERUS_HM_ZSH_PRIVATE=0 zsh "
|
||||
''
|
||||
|
||||
;
|
||||
|
||||
@@ -185,5 +199,4 @@ in
|
||||
programs.starship.enableZshIntegration = lib.mkDefault false;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ let
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.materus.profile.wezterm.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable materus wezterm config";
|
||||
options.materus.profile.wezterm.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus wezterm config";
|
||||
options.materus.profile.wezterm.enableHackFont = materusArg.pkgs.lib.mkBoolOpt true "Enable hack nerd font for wezterm";
|
||||
options.materus.profile.wezterm.enableWezcraft = materusArg.pkgs.lib.mkBoolOpt true "Enable alias to start wezcraft with monocraft font";
|
||||
options.materus.profile.wezterm.extraConfig = lib.mkOption {
|
||||
@@ -31,9 +31,7 @@ in
|
||||
'';
|
||||
|
||||
home.packages = [
|
||||
(lib.mkIf cfg.enableHackFont (pkgs.nerdfonts.override {
|
||||
fonts = [ "Hack" ];
|
||||
}))
|
||||
(lib.mkIf cfg.enableHackFont (pkgs.nerd-fonts.hack))
|
||||
(lib.mkIf cfg.enableWezcraft (pkgs.monocraft))
|
||||
(lib.mkIf cfg.enableWezcraft (pkgs.writeShellScriptBin "wezcraft" ''
|
||||
${lib.getExe config.programs.wezterm.package} --config font="wezterm.font 'Monocraft Nerd Font'" $@
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
{ config, pkgs, lib, ... }: {
|
||||
imports = [
|
||||
./nix.nix
|
||||
./fonts.nix
|
||||
@@ -18,12 +17,17 @@
|
||||
font = lib.mkDefault "LatArCyrHeb-16";
|
||||
keyMap = lib.mkDefault "pl";
|
||||
};
|
||||
environment.sessionVariables = {
|
||||
MATERUS_CONFIG_DIR = lib.mkDefault "/etc/nixos/";
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
enable = lib.mkDefault true;
|
||||
clock24 = lib.mkDefault true;
|
||||
};
|
||||
environment.systemPackages = lib.mkIf config.programs.tmux.enable [ pkgs.tmux.terminfo ];
|
||||
environment.systemPackages =
|
||||
lib.mkIf config.programs.tmux.enable [ pkgs.tmux.terminfo ];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ let
|
||||
pkgs.keyutils
|
||||
pkgs.libGL
|
||||
pkgs.libglvnd
|
||||
pkgs.gamescope
|
||||
pkgs.steamPackages.steam
|
||||
pkgs.libxcrypt
|
||||
pkgs.gnutls
|
||||
@@ -93,6 +92,8 @@ in
|
||||
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.gamescope.enable = lib.mkDefault true;
|
||||
programs.gamescope.capSysNice = lib.mkDefault false;
|
||||
hardware.steam-hardware.enable = lib.mkDefault true;
|
||||
materus.profile.steam.extraEnv = {
|
||||
XDG_DATA_DIRS = "/usr/share:\${XDG_DATA_DIRS}";
|
||||
@@ -102,6 +103,7 @@ in
|
||||
enable = lib.mkDefault true;
|
||||
dedicatedServer.openFirewall = lib.mkDefault true;
|
||||
remotePlay.openFirewall = lib.mkDefault true;
|
||||
gamescopeSession.enable = lib.mkDefault true;
|
||||
};
|
||||
environment.sessionVariables = rec {
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = lib.mkDefault "\${HOME}/.steam/root/compatibilitytools.d";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, lib, materusArg, ... }:
|
||||
{ config, pkgs, lib, materusArg, materusCfg, ... }:
|
||||
let
|
||||
cfg = config.materus.profile.nix;
|
||||
in
|
||||
@@ -7,7 +7,7 @@ in
|
||||
config.nix = lib.mkIf cfg.enable {
|
||||
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" "repl-flake" "no-url-literals" ];
|
||||
experimental-features = lib.mkMerge [[ "nix-command" "flakes" "no-url-literals" ]];
|
||||
auto-optimise-store = true;
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ let
|
||||
(materusFlake.selfPath + "/configurations/shared/home/${username}")
|
||||
(materusFlake.selfPath + "/configurations/host/${host}/home/${username}")
|
||||
profiles.homeProfile
|
||||
materusFlake.nixosConfigurations.${host}.materusCfg.configInputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
};
|
||||
}]
|
||||
@@ -49,6 +48,7 @@ let
|
||||
./${username}
|
||||
profiles.homeProfile
|
||||
materusCfg.configInputs.sops-nix.homeManagerModules.sops
|
||||
materusCfg.configInputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,17 +4,17 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
if [ $# = 0 ] || ( [ $# = 1 ] && [ $1 = "help" ] ); then
|
||||
echo "Use \"unlock\" to unlock with pgp"
|
||||
echo "Use \"unlock\" /path/to/key to unlock with symmetric key"
|
||||
echo "Use \"lock\": to lock repository"
|
||||
exit
|
||||
echo "Use \"unlock\" to unlock with pgp"
|
||||
echo "Use \"unlock\" /path/to/key to unlock with symmetric key"
|
||||
echo "Use \"lock\": to lock repository"
|
||||
exit
|
||||
fi
|
||||
check_git () {
|
||||
if [ "$(git status --porcelain)" ]; then
|
||||
echo "Working directory not clean."
|
||||
echo "Please commit your changes or 'git stash' them before running this script"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$(git status --porcelain)" ]; then
|
||||
echo "Working directory not clean."
|
||||
echo "Please commit your changes or 'git stash' them before running this script"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
create_decrypt () {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,28 +1,87 @@
|
||||
;;; -*- lexical-binding: t; -*-
|
||||
|
||||
;;; VARIABLES
|
||||
|
||||
|
||||
(setenv "LSP_USE_PLISTS" "true") ; Make lsp-mode use plists
|
||||
|
||||
(setq c-default-style nil) ; Clear default styles for languages, will set them up later
|
||||
(setq default-input-method nil) ; Disable default input method, I'm not using them anyway so far
|
||||
|
||||
(setq initial-major-mode 'emacs-lisp-mode)
|
||||
|
||||
(setq auto-save-default nil) ; TODO: configure auto saves, disable for now
|
||||
(setq backup-directory-alist
|
||||
`((".*" . ,(concat user-emacs-directory "var/backups/")))) ; Set backup location
|
||||
(setq auto-save-file-name-transforms
|
||||
`((".*" ,(concat user-emacs-directory "var/recovery/") t))) ; Set auto-save location
|
||||
(setq auto-save-list-file-prefix (concat user-emacs-directory "var/auto-save/sessions/")) ; Set auto-save-list location
|
||||
(setq load-prefer-newer t) ; Prefer newer files to load
|
||||
|
||||
|
||||
(setq package-enable-at-startup nil)
|
||||
(setq package-quickstart nil) ; Disable package quickstart
|
||||
|
||||
(setq inhibit-startup-screen t)
|
||||
|
||||
(setq inhibit-compacting-font-caches t) ; Don't compact fonts
|
||||
|
||||
(set-language-environment "UTF-8") ; Use UTF-8
|
||||
(setq-default buffer-file-coding-system 'utf-8-unix)
|
||||
|
||||
(setq custom-file (concat user-emacs-directory "etc/custom.el")) ; Set custom file location, don't want clutter in main directory
|
||||
(setq custom-theme-directory
|
||||
(concat user-emacs-directory "/etc/materus/themes" )) ; Set custom themes location
|
||||
|
||||
(setq ring-bell-function 'ignore) ; Disable bell
|
||||
|
||||
|
||||
(defvar materus/emacs-gc-cons-threshold (* 64 1024 1024)
|
||||
"The value of `gc-cons-threshold' after Emacs startup.") ; Define after init garbage collector threshold
|
||||
|
||||
|
||||
;;; GARBAGE COLLECTOR
|
||||
(setq gc-cons-threshold most-positive-fixnum) ; Set `gc-cons-threshold' so it won't collectect during initialization
|
||||
|
||||
(add-hook 'emacs-startup-hook
|
||||
(lambda ()
|
||||
(setq gc-cons-threshold materus/emacs-gc-cons-threshold))) ; Set `gc-cons-threshold' to desired value after startup
|
||||
|
||||
|
||||
|
||||
(defvar materus/init-early t)
|
||||
(setq materus/init-early t)
|
||||
|
||||
(tool-bar-mode -1)
|
||||
(setq initial-major-mode 'fundamental-mode)
|
||||
(setq-default package-quickstart t)
|
||||
(setq native-comp-speed 3)
|
||||
(add-hook 'emacs-startup-hook (lambda () (package-initialize)
|
||||
(setq gc-cons-threshold 100000000 ; ~100mb
|
||||
gc-cons-percentage 0.1)
|
||||
))
|
||||
;;; FRAMES
|
||||
|
||||
(unless (daemonp)
|
||||
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
|
||||
gc-cons-percentage 0.6)
|
||||
(setq package-enable-at-startup nil)
|
||||
(setq frame-inhibit-implied-resize t)
|
||||
(setq frame-resize-pixelwise t)
|
||||
(setq window-resize-pixelwise t) ; Allow pixelwise resizing of window and frame
|
||||
|
||||
(unless (daemonp)
|
||||
(add-to-list 'initial-frame-alist '(fullscreen . maximized))) ; Start first frame maximized if not running as daemon, daemon frame are set up later in config
|
||||
(setq default-frame-alist ; Set default size for frames
|
||||
'((width . 130)
|
||||
(height . 40)))
|
||||
|
||||
(advice-add #'tty-run-terminal-initialization :override #'ignore)
|
||||
(add-hook 'window-setup-hook
|
||||
(lambda ()
|
||||
(advice-remove #'tty-run-terminal-initialization #'ignore)
|
||||
(tty-run-terminal-initialization (selected-frame) nil t)
|
||||
)
|
||||
)
|
||||
)
|
||||
(lambda ()
|
||||
(unless (display-graphic-p)
|
||||
(advice-remove #'tty-run-terminal-initialization #'ignore)
|
||||
(tty-run-terminal-initialization (selected-frame) nil t)
|
||||
)))
|
||||
|
||||
|
||||
;;; NATIVE COMPILATION
|
||||
|
||||
(setq native-comp-async-report-warnings-errors nil) ; Silence warnings
|
||||
(setq native-comp-speed 2) ; Set native-comp speed
|
||||
|
||||
(setq native-comp-jit-compilation t
|
||||
native-comp-deferred-compilation t
|
||||
package-native-compile t)
|
||||
|
||||
|
||||
;; Setting up native-comp cache location
|
||||
|
||||
(when (boundp 'native-comp-eln-load-path)
|
||||
(startup-redirect-eln-cache (expand-file-name "var/eln-cache/" user-emacs-directory)))
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
;;; corfu-mouse.el --- Mouse support for Corfu -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2021, 2022 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2022 Akib Azmain Turja.
|
||||
|
||||
;; Author: Akib Azmain Turja <akib@disroot.org>
|
||||
;; Maintainer: Akib Azmain Turja <akib@disroot.org>
|
||||
;; Created: 2022
|
||||
;; Version: 0.1
|
||||
;; Package-Requires: ((emacs "24.4") (corfu "0.25"))
|
||||
;; Homepage: https://codeberg.org/akib/emacs-corfu-mouse
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;; Disclaimer: This file is based on vertico-mouse.el of Vertico
|
||||
;; package, which is a part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This package is a Corfu extension, which adds mouse support.
|
||||
|
||||
;; To enable, M-x corfu-mouse-mode.
|
||||
|
||||
|
||||
;; Modified to support pixel-scroll-precision-mode and fixed adding spaces
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'corfu)
|
||||
(defgroup corfu-mouse nil
|
||||
"Mouse support for Corfu."
|
||||
:group 'corfu
|
||||
:link '(url-link "https://codeberg.org/akib/emacs-corfu-mouse")
|
||||
:prefix "corfu-mouse-")
|
||||
|
||||
(defface corfu-mouse
|
||||
'((t :inherit highlight))
|
||||
"Face used for mouse highlighting."
|
||||
:group 'corfu-mouse)
|
||||
|
||||
(defvar corfu-mouse--completion-buffer nil
|
||||
"The buffer for which the popup is being shown.")
|
||||
|
||||
(defun corfu-mouse--candidate-map (index)
|
||||
"Return keymap for candidate with INDEX."
|
||||
(let ((map (make-sparse-keymap))
|
||||
(mouse-1 (make-symbol "corfu-mouse--on-mouse-1"))
|
||||
(mouse-3 (make-symbol "corfu-mouse--on-mouse-3")))
|
||||
(fset mouse-1 (lambda ()
|
||||
(interactive)
|
||||
(corfu--goto index)
|
||||
(corfu-insert)))
|
||||
(fset mouse-3 (lambda ()
|
||||
(interactive)
|
||||
(corfu--goto index)
|
||||
(corfu-complete)))
|
||||
(define-key map [mouse-1] mouse-1)
|
||||
(define-key map [mouse-3] mouse-3)
|
||||
|
||||
;; Ignore these events to keep completion session alive.
|
||||
(define-key map [down-mouse-1] #'ignore)
|
||||
(define-key map [down-mouse-3] #'ignore)
|
||||
map))
|
||||
|
||||
(defun corfu-mouse--format-candidates (fcands)
|
||||
"Format candidates.
|
||||
FCANDS is the return value of `corfu--format-candidates'."
|
||||
(let ((index corfu--scroll)
|
||||
(cands (caddr fcands)))
|
||||
(while cands
|
||||
(let ((line (car cands)))
|
||||
;; Append necessary amount of spaces to make it as wide as the
|
||||
;; popup.
|
||||
(let ((strlen (- (cadr fcands) (string-width line))))
|
||||
(when (> strlen 0)
|
||||
(setq line (concat line (make-string strlen ? )))))
|
||||
|
||||
(add-text-properties 0 (length line)
|
||||
`(mouse-face
|
||||
corfu-mouse
|
||||
keymap
|
||||
,(corfu-mouse--candidate-map index))
|
||||
line)
|
||||
(setcar cands line)
|
||||
(setq cands (cdr cands))
|
||||
(setq index (1+ index))))
|
||||
fcands))
|
||||
|
||||
(defun corfu-mouse--scroll-up (n)
|
||||
"Scroll up by N lines."
|
||||
(with-current-buffer corfu-mouse--completion-buffer
|
||||
(corfu-next n)))
|
||||
|
||||
(defun corfu-mouse--scroll-down (n)
|
||||
"Scroll down by N lines."
|
||||
(corfu-mouse--scroll-up (- n)))
|
||||
|
||||
(defun corfu-mouse-mwheel-scroll ()
|
||||
"Call `mwheel-scroll'."
|
||||
(interactive)
|
||||
(call-interactively #'mwheel-scroll))
|
||||
|
||||
(defun corfu-mouse--setup-scrolling (buffer)
|
||||
"Setup mouse scrolling on BUFFER."
|
||||
(let ((current-buffer (current-buffer)))
|
||||
(with-current-buffer buffer
|
||||
(when (boundp 'pixel-scroll-precision-mode)
|
||||
(setq-local pixel-scroll-precision-mode nil))
|
||||
(setq-local mwheel-scroll-up-function #'corfu-mouse--scroll-up)
|
||||
(setq-local mwheel-scroll-down-function
|
||||
#'corfu-mouse--scroll-down)
|
||||
(setq-local corfu-mouse--completion-buffer current-buffer)))
|
||||
buffer)
|
||||
|
||||
(defun corfu-mouse--post-command-set-buffer ()
|
||||
"Set `corfu-mouse--completion-buffer' the current buffer."
|
||||
(when corfu-mouse--completion-buffer
|
||||
(switch-to-buffer corfu-mouse--completion-buffer)))
|
||||
|
||||
;;;###autoload
|
||||
(define-minor-mode corfu-mouse-mode
|
||||
"Mouse support for Corfu."
|
||||
:global t :group 'corfu
|
||||
(let ((scroll-events '(wheel-up wheel-down mouse-4 mouse-5))
|
||||
(continue-commands '("corfu-mouse--on-mouse-1"
|
||||
"corfu-mouse--on-mouse-3"
|
||||
corfu-mouse-mwheel-scroll)))
|
||||
(cond
|
||||
(corfu-mouse-mode
|
||||
(advice-add #'corfu--format-candidates :filter-return
|
||||
#'corfu-mouse--format-candidates)
|
||||
(advice-add #'corfu--make-buffer :filter-return
|
||||
#'corfu-mouse--setup-scrolling)
|
||||
(advice-add #'corfu--post-command :before
|
||||
#'corfu-mouse--post-command-set-buffer)
|
||||
(setq corfu-continue-commands
|
||||
(append corfu-continue-commands continue-commands))
|
||||
(dolist (event scroll-events)
|
||||
(define-key corfu--mouse-ignore-map (vector event)
|
||||
#'corfu-mouse-mwheel-scroll)))
|
||||
(t
|
||||
(advice-remove #'corfu--format-candidates
|
||||
#'corfu-mouse--format-candidates)
|
||||
(advice-remove #'corfu--make-buffer
|
||||
#'corfu-mouse--setup-scrolling)
|
||||
(advice-remove #'corfu--post-command
|
||||
#'corfu-mouse--post-command-set-buffer)
|
||||
(dolist (command continue-commands)
|
||||
(setq corfu-continue-commands
|
||||
(delete command corfu-continue-commands)))
|
||||
(dolist (event scroll-events)
|
||||
(define-key corfu--mouse-ignore-map (vector event)
|
||||
#'ignore))))))
|
||||
|
||||
(provide 'corfu-mouse)
|
||||
;;; corfu-mouse.el ends here
|
||||
+659
-74
@@ -1,95 +1,680 @@
|
||||
|
||||
(setq native-comp-async-report-warnings-errors nil)
|
||||
(setq package-enable-at-startup nil)
|
||||
(setq frame-inhibit-implied-resize t)
|
||||
(defvar materus/init-early nil)
|
||||
(unless materus/init-early
|
||||
(tool-bar-mode -1)
|
||||
(setq initial-major-mode 'fundamental-mode)
|
||||
(setq-default package-quickstart t)
|
||||
(setq native-comp-speed 3)
|
||||
(add-hook 'emacs-startup-hook (lambda () (package-initialize)
|
||||
(setq gc-cons-threshold 100000000 ; ~100mb
|
||||
gc-cons-percentage 0.1)
|
||||
))
|
||||
(unless (daemonp)
|
||||
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
|
||||
gc-cons-percentage 0.6)
|
||||
(setq package-enable-at-startup nil)
|
||||
|
||||
(advice-add #'tty-run-terminal-initialization :override #'ignore)
|
||||
(add-hook 'window-setup-hook
|
||||
(lambda ()
|
||||
(advice-remove #'tty-run-terminal-initialization #'ignore)
|
||||
(tty-run-terminal-initialization (selected-frame) nil t)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(setq auto-save-list-file-prefix (concat user-emacs-directory "backups/"))
|
||||
(setq backup-directory-alist
|
||||
`(("." . ,(concat user-emacs-directory "backups/"))))
|
||||
|
||||
(require 'telephone-line)
|
||||
(require 'elcord)
|
||||
(require 'dashboard)
|
||||
(require 'minions)
|
||||
(require 'doom-themes)
|
||||
|
||||
|
||||
;Graphical
|
||||
(when (display-graphic-p)
|
||||
(set-frame-font "Hack Nerd Font" nil t)
|
||||
)
|
||||
|
||||
|
||||
|
||||
;;; -*- lexical-binding: t; -*-
|
||||
;; Prepare
|
||||
(require 'materus-nix nil t)
|
||||
(require 'elec-pair)
|
||||
(when (not emacs-build-time)
|
||||
(print "WARN: emacs-build-time not set up, using current time")
|
||||
(setq emacs-build-time (decode-time (current-time))))
|
||||
(add-to-list 'load-path (concat user-emacs-directory "etc/pkgs/")) ; Extra load path for packages
|
||||
(setq read-process-output-max (* 1024 1024 3))
|
||||
(setq custom-file (concat user-emacs-directory "custom.el"))
|
||||
(when (or (not (display-graphic-p)) (daemonp))
|
||||
(xterm-mouse-mode 1)
|
||||
)
|
||||
|
||||
;; Elpaca Init
|
||||
(defvar elpaca-installer-version 0.11)
|
||||
(defvar elpaca-directory (expand-file-name "var/elpaca/" user-emacs-directory))
|
||||
(defvar elpaca-builds-directory (expand-file-name (concat "builds/" emacs-version "/") elpaca-directory))
|
||||
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||
:ref nil :depth 1 :inherit ignore
|
||||
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
|
||||
:build (:not elpaca--activate-package)))
|
||||
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||
(order (cdr elpaca-order))
|
||||
(default-directory repo))
|
||||
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||
(unless (file-exists-p repo)
|
||||
(make-directory repo t)
|
||||
(when (<= emacs-major-version 28) (require 'subr-x))
|
||||
(condition-case-unless-debug err
|
||||
(if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
|
||||
,@(when-let* ((depth (plist-get order :depth)))
|
||||
(list (format "--depth=%d" depth) "--no-single-branch"))
|
||||
,(plist-get order :repo) ,repo))))
|
||||
((zerop (call-process "git" nil buffer t "checkout"
|
||||
(or (plist-get order :ref) "--"))))
|
||||
(emacs (concat invocation-directory invocation-name))
|
||||
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||
((require 'elpaca))
|
||||
((elpaca-generate-autoloads "elpaca" repo)))
|
||||
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
|
||||
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||
(unless (require 'elpaca-autoloads nil t)
|
||||
(require 'elpaca)
|
||||
(elpaca-generate-autoloads "elpaca" repo)
|
||||
(let ((load-source-file-function nil)) (load "./elpaca-autoloads"))))
|
||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||
(elpaca `(,@elpaca-order))
|
||||
|
||||
(elpaca elpaca-use-package
|
||||
(elpaca-use-package-mode)
|
||||
(setq elpaca-use-package-by-default t))
|
||||
|
||||
(defvar materus/nixos-config (getenv "MATERUS_CONFIG_DIR"))
|
||||
(defvar materus/server-env nil)
|
||||
(defvar materus/pkgs/vterm-enable nil)
|
||||
|
||||
(let ((vars-file (expand-file-name "etc/variables.el" user-emacs-directory)))
|
||||
(unless (file-exists-p vars-file) (make-empty-file vars-file))
|
||||
(load vars-file))
|
||||
;; Use package preffering built-in / nix packages
|
||||
(defmacro materus/use-package (package &rest body)
|
||||
(if (locate-library (symbol-name `,package))
|
||||
`(progn
|
||||
(cl-pushnew (quote ,package) elpaca-ignored-dependencies)
|
||||
(use-package ,package :ensure nil ,@body))
|
||||
`(use-package ,package ,@body)))
|
||||
|
||||
(defun materus/--outli-modes ()
|
||||
"Check if supported mode"
|
||||
(or (eq major-mode 'nix-mode)
|
||||
(eq major-mode 'nix-ts-mode)
|
||||
(eq major-mode 'c-mode)
|
||||
(eq major-mode 'c-ts-mode)
|
||||
(eq major-mode 'c++-mode)
|
||||
(eq major-mode 'c++-ts-mode)))
|
||||
|
||||
(defun materus/anchor-outli-headers ()
|
||||
"Remove whitespaces before outli headers"
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(widen)
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward (concat "^[ ]+\\(" comment-start "\\*+ +[^ ].*\\)[ ]*") nil t)
|
||||
(replace-match "\\1")))))
|
||||
(defun materus/--fix-outli-formatting (FORMATTER STATUS)
|
||||
(materus/anchor-outli-headers)
|
||||
)
|
||||
|
||||
(defun materus/--electric-indent-ignore-outli (char)
|
||||
"Don't indent outli headers"
|
||||
(when (materus/--outli-modes)
|
||||
(save-excursion
|
||||
(backward-char)
|
||||
(beginning-of-line)
|
||||
(if (not (looking-at-p (concat "^\\(" comment-start "\\*+ +[^ ].*\\)[ ]*"))) nil 'no-indent))))
|
||||
(use-package no-littering
|
||||
:ensure (:wait t)
|
||||
:config
|
||||
(require 'recentf)
|
||||
(setq package-quickstart-file
|
||||
(concat user-emacs-directory "var/quickstart/package-quickstart-" emacs-version ".el" ))
|
||||
(add-to-list 'recentf-exclude
|
||||
(recentf-expand-file-name no-littering-var-directory))
|
||||
(add-to-list 'recentf-exclude
|
||||
(recentf-expand-file-name no-littering-etc-directory)))
|
||||
|
||||
;; Font & Text init
|
||||
(when (display-graphic-p)
|
||||
(set-frame-font "Hack Nerd Font" nil t))
|
||||
(setq-default cursor-type '(bar . 2))
|
||||
(setq truncate-string-ellipsis "…")
|
||||
|
||||
|
||||
(setq text-mode-ispell-word-completion nil) ; Disable ispell
|
||||
(global-completion-preview-mode 1)
|
||||
(electric-pair-mode 1)
|
||||
(electric-indent-mode -1)
|
||||
|
||||
(setq isearch-allow-scroll t) ; Allows scrolling without closing isearch
|
||||
;; Frame Init
|
||||
(when (daemonp)
|
||||
(add-hook 'after-make-frame-functions
|
||||
(lambda (frame) (when (= (length (frame-list)) 2)
|
||||
(set-frame-parameter frame 'fullscreen 'maximized))
|
||||
(select-frame-set-input-focus frame) )))
|
||||
(global-tab-line-mode 1)
|
||||
(setq tab-line-close-tab-function 'kill-buffer)
|
||||
|
||||
(setq window-divider-default-bottom-width 1)
|
||||
(setq window-divider-default-right-width 1)
|
||||
(window-divider-mode 1)
|
||||
(tool-bar-mode -1)
|
||||
(load-theme 'doom-horizon t)
|
||||
|
||||
(setq ring-bell-function 'ignore)
|
||||
(setq-default cursor-type '(bar . 1))
|
||||
(pixel-scroll-precision-mode 1)
|
||||
(setq-default display-line-numbers-width 3)
|
||||
(setq-default display-line-numbers-widen t)
|
||||
|
||||
(defun startup-screen-advice (orig-fun &rest args)
|
||||
(when (= (seq-count #'buffer-file-name (buffer-list)) 0)
|
||||
(apply orig-fun args)))
|
||||
(advice-add 'display-startup-screen :around #'startup-screen-advice) ; Hide startup screen if started with file
|
||||
;; Mouse Init
|
||||
(context-menu-mode 1)
|
||||
(setq mouse-wheel-follow-mouse 't)
|
||||
(setq scroll-step 1)
|
||||
(setq mouse-drag-and-drop-region t)
|
||||
(telephone-line-mode 1)
|
||||
(xterm-mouse-mode 1)
|
||||
(pixel-scroll-precision-mode 1)
|
||||
(setq-default pixel-scroll-precision-large-scroll-height 10.0)
|
||||
(minions-mode 1)
|
||||
(elcord-mode)
|
||||
(add-to-list 'c-default-style '(awk-mode . "awk"))
|
||||
(add-to-list 'c-default-style '(other . "bsd"))
|
||||
|
||||
;Hide startup screen if started with file
|
||||
(defun startup-screen-advice (orig-fun &rest args)
|
||||
(when (= (seq-count #'buffer-file-name (buffer-list)) 0)
|
||||
(apply orig-fun args)))
|
||||
(advice-add 'display-startup-screen :around #'startup-screen-advice)
|
||||
(setq-default tab-width 4)
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default c-basic-offset 4)
|
||||
(setq-default c-indent-level 4)
|
||||
|
||||
(setq-default c-ts-mode-indent-offset 4)
|
||||
(setq-default c-ts-mode-indent-style 'bsd)
|
||||
|
||||
(setq-default c-hungry-delete-key t)
|
||||
|
||||
|
||||
|
||||
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
|
||||
(add-hook 'prog-mode-hook 'electric-indent-local-mode)
|
||||
(add-hook 'electric-indent-functions 'materus/--electric-indent-ignore-outli)
|
||||
(use-package dracula-theme :config
|
||||
(if (daemonp)
|
||||
(add-hook 'after-make-frame-functions
|
||||
(lambda (frame)
|
||||
(with-selected-frame frame (load-theme 'dracula t))))
|
||||
(load-theme 'dracula t)))
|
||||
|
||||
(use-package rainbow-mode
|
||||
:hook
|
||||
((org-mode . rainbow-mode)
|
||||
(prog-mode . rainbow-mode)))
|
||||
(use-package rainbow-delimiters
|
||||
:hook
|
||||
(prog-mode . rainbow-delimiters-mode)
|
||||
:config
|
||||
(set-face-attribute 'rainbow-delimiters-depth-1-face nil :foreground "#FFFFFF")
|
||||
(set-face-attribute 'rainbow-delimiters-depth-2-face nil :foreground "#FFFF00")
|
||||
(set-face-attribute 'rainbow-delimiters-depth-5-face nil :foreground "#6A5ACD")
|
||||
(set-face-attribute 'rainbow-delimiters-unmatched-face nil :foreground "#FF0000"))
|
||||
|
||||
;Enable dashboard
|
||||
(setq dashboard-center-content t)
|
||||
(dashboard-setup-startup-hook)
|
||||
(use-package doom-modeline
|
||||
:init (setq doom-modeline-support-imenu t)
|
||||
:hook (elpaca-after-init . doom-modeline-mode)
|
||||
:config
|
||||
(setq doom-modeline-icon t)
|
||||
(setq doom-modeline-project-detection 'auto)
|
||||
(setq doom-modeline-height 20)
|
||||
(setq doom-modeline-enable-word-count t)
|
||||
(setq doom-modeline-minor-modes t)
|
||||
(setq display-time-24hr-format t)
|
||||
(display-time-mode 1)
|
||||
(column-number-mode 1)
|
||||
(line-number-mode 1))
|
||||
|
||||
(use-package minions
|
||||
:hook (elpaca-after-init . minions-mode))
|
||||
(use-package dashboard
|
||||
:after (nerd-icons projectile)
|
||||
:config
|
||||
(setq dashboard-center-content t)
|
||||
(setq dashboard-display-icons-p t)
|
||||
(setq dashboard-icon-type 'nerd-icons)
|
||||
(setq dashboard-projects-backend 'projectile)
|
||||
(setq dashboard-items '((recents . 5)
|
||||
(bookmarks . 5)
|
||||
(projects . 5)
|
||||
(agenda . 5)
|
||||
(registers . 5)))
|
||||
(when (or (daemonp) (< (length command-line-args) 2))
|
||||
(add-hook 'elpaca-after-init-hook #'dashboard-insert-startupify-lists)
|
||||
(add-hook 'elpaca-after-init-hook #'dashboard-initialize)
|
||||
(dashboard-setup-startup-hook)))
|
||||
(when (daemonp)
|
||||
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) ; Show dashboard when emacs is running as daemon
|
||||
)
|
||||
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))) ; Show dashboard when emacs is running as daemon)
|
||||
(use-package highlight-indent-guides
|
||||
:hook ((prog-mode . highlight-indent-guides-mode)))
|
||||
(use-package outli
|
||||
:ensure (:host github :repo "jdtsmith/outli")
|
||||
:hook ((prog-mode . outli-mode)))
|
||||
(use-package visual-replace
|
||||
:defer t
|
||||
:bind (("C-r" . visual-replace)
|
||||
:map isearch-mode-map
|
||||
("C-r" . visual-replace-from-isearch)))
|
||||
(use-package eat)
|
||||
|
||||
(when (or materus/pkgs/vterm-enable (locate-library (symbol-name 'vterm)))
|
||||
(materus/use-package vterm))
|
||||
(use-package orderless
|
||||
:init
|
||||
;; Tune the global completion style settings to your liking!
|
||||
;; This affects the minibuffer and non-lsp completion at point.
|
||||
(setq completion-styles '(basic partial-completion orderless)
|
||||
completion-category-defaults nil
|
||||
completion-category-overrides nil))
|
||||
(use-package consult)
|
||||
(use-package marginalia)
|
||||
(use-package embark)
|
||||
(use-package embark-consult
|
||||
:after (embark consult))
|
||||
|
||||
(use-package vertico
|
||||
:ensure t
|
||||
:after (consult marginalia embark)
|
||||
:config
|
||||
(setq completion-in-region-function
|
||||
(lambda (&rest args)
|
||||
(apply (if vertico-mode
|
||||
#'consult-completion-in-region
|
||||
#'completion--in-region)
|
||||
args)))
|
||||
(vertico-mode 1)
|
||||
(marginalia-mode 1))
|
||||
(use-package vertico-mouse
|
||||
:config
|
||||
(vertico-mouse-mode 1)
|
||||
:ensure nil
|
||||
:after (vertico))
|
||||
(use-package cape)
|
||||
|
||||
(use-package corfu
|
||||
:ensure t
|
||||
:after (lsp-mode cape)
|
||||
;; Optional customizations
|
||||
:custom
|
||||
(corfu-cycle nil) ;; Enable cycling for `corfu-next/previous'
|
||||
(corfu-auto t) ;; Enable auto completion
|
||||
(global-corfu-minibuffer nil)
|
||||
;; (corfu-quit-at-boundary nil) ;; Never quit at completion boundary
|
||||
;; (corfu-quit-no-match nil) ;; Never quit, even if there is no match
|
||||
(corfu-preview-current nil) ;; Disable current candidate preview
|
||||
;; (corfu-preselect 'prompt) ;; Preselect the prompt
|
||||
;; (corfu-on-exact-match nil) ;; Configure handling of exact matches
|
||||
|
||||
;; Enable Corfu only for certain modes. See also `global-corfu-modes'.
|
||||
;; :hook ((prog-mode . corfu-mode)
|
||||
;; (shell-mode . corfu-mode)
|
||||
;; (eshell-mode . corfu-mode))
|
||||
|
||||
;; Recommended: Enable Corfu globally. This is recommended since Dabbrev can
|
||||
;; be used globally (M-/). See also the customization variable
|
||||
;; `global-corfu-modes' to exclude certain modes.
|
||||
:init
|
||||
(global-corfu-mode 1)
|
||||
(corfu-popupinfo-mode 1)
|
||||
(corfu-history-mode 1)
|
||||
|
||||
(defun materus/orderless-dispatch-flex-first (_pattern index _total)
|
||||
(and (eq index 0) 'orderless-flex))
|
||||
|
||||
(defun materus/lsp-mode-setup-completion ()
|
||||
(setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults))
|
||||
'(orderless))
|
||||
;; Optionally configure the first word as flex filtered.
|
||||
(add-hook 'orderless-style-dispatchers #'materus/orderless-dispatch-flex-first nil 'local)
|
||||
;; Optionally configure the cape-capf-buster.
|
||||
(setq-local completion-at-point-functions (list (cape-capf-buster #'lsp-completion-at-point))))
|
||||
|
||||
:hook
|
||||
(lsp-completion-mode . materus/lsp-mode-setup-completion))
|
||||
|
||||
|
||||
|
||||
(use-package corfu-terminal
|
||||
:after (corfu)
|
||||
:config
|
||||
(when (or (daemonp) (not (display-graphic-p)))
|
||||
(corfu-terminal-mode)))
|
||||
|
||||
;CUA
|
||||
(cua-mode 1)
|
||||
(global-set-key (kbd "C-y") 'undo-redo)
|
||||
(use-package corfu-mouse
|
||||
:after (corfu)
|
||||
:ensure (:type git :repo "https://codeberg.org/materus/emacs-corfu-mouse.git")
|
||||
:config
|
||||
(corfu-mouse-mode)
|
||||
(keymap-set corfu--mouse-ignore-map "<mouse-movement>" 'ignore)
|
||||
(keymap-set corfu-map "<mouse-movement>" 'ignore))
|
||||
|
||||
;(define-key key-translation-map [8711] 'event-apply-hyper-modifier )
|
||||
;(global-set-key (kbd "C-∇") (kbd "C-H"))
|
||||
;(global-set-key (kbd "H-∇") (lambda () (interactive) (insert-char #x2207)))
|
||||
(use-package kind-icon
|
||||
:after (corfu)
|
||||
:config
|
||||
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter))
|
||||
|
||||
|
||||
|
||||
(use-package dirvish
|
||||
:after (nerd-icons)
|
||||
:config
|
||||
(setq dired-mouse-drag-files t)
|
||||
(dirvish-override-dired-mode 1)
|
||||
(setq dirvish-attributes
|
||||
'(vc-state
|
||||
subtree-state
|
||||
nerd-icons
|
||||
collapse
|
||||
git-msg
|
||||
file-time
|
||||
file-size))
|
||||
)
|
||||
|
||||
(use-package treemacs)
|
||||
(use-package treemacs-projectile
|
||||
:after (projectile treemacs))
|
||||
(use-package treemacs-nerd-icons
|
||||
:after (nerd-icons treemacs))
|
||||
(use-package treemacs-perspective
|
||||
:after (treemacs))
|
||||
(use-package treemacs-mouse-interface
|
||||
:after (treemacs)
|
||||
:ensure nil)
|
||||
(use-package lsp-ui
|
||||
:after (lsp-mode))
|
||||
(use-package lsp-mode
|
||||
;; :custom
|
||||
;; (lsp-completion-provider :none) ;; we use Corfu!
|
||||
:config
|
||||
(setq lsp-keep-workspace-alive nil)
|
||||
(setq lsp-enable-on-type-formatting nil)
|
||||
(setq lsp-ui-doc-show-with-mouse nil)
|
||||
|
||||
(defun lsp-booster--advice-json-parse (old-fn &rest args)
|
||||
"Try to parse bytecode instead of json."
|
||||
(or
|
||||
(when (equal (following-char) ?#)
|
||||
(let ((bytecode (read (current-buffer))))
|
||||
(when (byte-code-function-p bytecode)
|
||||
(funcall bytecode))))
|
||||
(apply old-fn args)))
|
||||
(advice-add (if (progn (require 'json)
|
||||
(fboundp 'json-parse-buffer))
|
||||
'json-parse-buffer
|
||||
'json-read)
|
||||
:around
|
||||
#'lsp-booster--advice-json-parse)
|
||||
|
||||
(defun lsp-booster--advice-final-command (old-fn cmd &optional test?)
|
||||
"Prepend emacs-lsp-booster command to lsp CMD."
|
||||
(let ((orig-result (funcall old-fn cmd test?)))
|
||||
(if (and (not test?) ; for check lsp-server-present?
|
||||
(not (file-remote-p default-directory)) ; see lsp-resolve-final-command, it would add extra shell wrapper
|
||||
lsp-use-plists
|
||||
(not (functionp 'json-rpc-connection)) ; native json-rpc
|
||||
(executable-find "emacs-lsp-booster"))
|
||||
(progn
|
||||
(when-let* ((command-from-exec-path (executable-find (car orig-result)))) ; resolve command from exec-path (in case not found in $PATH)
|
||||
(setcar orig-result command-from-exec-path))
|
||||
(message "Using emacs-lsp-booster for %s!" orig-result)
|
||||
(cons "emacs-lsp-booster" orig-result))
|
||||
orig-result)))
|
||||
(advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command))
|
||||
(use-package lsp-treemacs
|
||||
:after (lsp-mode treemacs)
|
||||
:config
|
||||
(lsp-treemacs-sync-mode 0))
|
||||
|
||||
|
||||
(use-package dap-mode
|
||||
:after (lsp-mode)
|
||||
:config
|
||||
(require 'dap-lldb)
|
||||
(require 'dap-gdb-lldb)
|
||||
(require 'dap-cpptools)
|
||||
(setq dap-gdb-lldb-extension-version "0.27.0")
|
||||
(setq dap-auto-configure-features '(sessions locals breakpoints controls))
|
||||
(dap-auto-configure-mode 1))
|
||||
|
||||
(use-package format-all
|
||||
:hook ((prog-mode . format-all-mode))
|
||||
:config
|
||||
(defun format-all--buffer-from-hook () nil) ; I don't want formatting on save
|
||||
(add-hook 'format-all-after-format-functions 'materus/--fix-outli-formatting)
|
||||
(setq-default format-all-formatters
|
||||
'(("Nix" (nixfmt))
|
||||
("C++" (clang-format "--fallback-style=microsoft"))
|
||||
("C" (clang-format "--fallback-style=microsoft")))))
|
||||
(use-package yasnippet
|
||||
:config
|
||||
(yas-global-mode 1))
|
||||
(use-package lsp-clangd
|
||||
:ensure nil
|
||||
:after (lsp-mode)
|
||||
:config
|
||||
(setq lsp-clients-clangd-args '("--fallback-style=microsoft"))
|
||||
|
||||
(add-hook 'c-mode-hook 'lsp-deferred)
|
||||
(add-hook 'c-mode-hook 'display-line-numbers-mode)
|
||||
(add-hook 'c-ts-mode-hook 'lsp-deferred)
|
||||
(add-hook 'c-ts-mode-hook 'display-line-numbers-mode)
|
||||
|
||||
(add-hook 'c++-mode-hook 'lsp-deferred)
|
||||
(add-hook 'c++-mode-hook 'display-line-numbers-mode)
|
||||
(add-hook 'c++-ts-mode-hook 'lsp-deferred)
|
||||
(add-hook 'c++-ts-mode-hook 'display-line-numbers-mode)
|
||||
(when (treesit-language-available-p 'c) (push '(c-mode . c-ts-mode) major-mode-remap-alist))
|
||||
(when (treesit-language-available-p 'cpp) (push '(c++-mode . c++-ts-mode) major-mode-remap-alist))
|
||||
|
||||
(add-to-list 'c-default-style '(c-mode . "bsd"))
|
||||
(add-to-list 'c-default-style '(c++-mode . "bsd"))
|
||||
(add-to-list 'c-default-style '(c-ts-mode . "bsd"))
|
||||
(add-to-list 'c-default-style '(c++-ts-mode . "bsd")))
|
||||
|
||||
(use-package lsp-java
|
||||
:after (lsp-mode)
|
||||
:config
|
||||
(setq lsp-java-vmargs '("-XX:+UseParallelGC" "-XX:GCTimeRatio=4" "-XX:AdaptiveSizePolicyWeight=90" "-Dsun.zip.disableMemoryMapping=true" "-Xmx4G" "-Xms512m"))
|
||||
;;(add-hook 'java-mode-hook (lambda () (when (getenv "JDTLS_PATH") (setq lsp-java-server-install-dir (getenv "JDTLS_PATH")))))
|
||||
(add-hook 'java-mode-hook #'lsp)
|
||||
(add-hook 'java-mode-hook #'display-line-numbers-mode)
|
||||
(add-hook 'java-mode-hook #'lsp-lens-mode)
|
||||
(add-hook 'java-mode-hook #'lsp-java-boot-lens-mode)
|
||||
|
||||
;;(add-hook 'java-ts-mode-hook (lambda () (when (getenv "JDTLS_PATH") (setq lsp-java-server-install-dir (getenv "JDTLS_PATH")))))
|
||||
(add-hook 'java-ts-mode-hook #'lsp)
|
||||
(add-hook 'java-ts-mode-hook #'display-line-numbers-mode)
|
||||
(add-hook 'java-ts-mode-hook #'lsp-lens-mode)
|
||||
(add-hook 'java-ts-mode-hook #'lsp-java-boot-lens-mode)
|
||||
|
||||
(when (treesit-language-available-p 'java) (push '(java-mode . java-ts-mode) major-mode-remap-alist))
|
||||
|
||||
(add-to-list 'c-default-style '(java-mode . "java"))
|
||||
(add-to-list 'c-default-style '(java-ts-mode . "java")))
|
||||
(use-package lsp-pyright
|
||||
:after (lsp-mode)
|
||||
:if (executable-find "python")
|
||||
:config
|
||||
(setq lsp-pyright-langserver-command "pyright")
|
||||
(add-hook 'python-mode-hook 'lsp-deferred)
|
||||
(add-hook 'python-ts-mode-hook 'lsp-deferred)
|
||||
(when (treesit-language-available-p 'python) (push '(python-mode . python-ts-mode) major-mode-remap-alist)))
|
||||
(use-package nix-mode
|
||||
:config
|
||||
(advice-add 'nix-format-buffer :after #'materus/anchor-outli-headers))
|
||||
(use-package nix-ts-mode)
|
||||
(use-package lsp-nix
|
||||
:after (lsp-mode nix-mode nix-ts-mode format-all)
|
||||
:ensure nil
|
||||
:config
|
||||
(add-to-list 'lsp-disabled-clients '(nix-mode . nix-nil))
|
||||
(setq lsp-nix-nixd-server-path "nixd")
|
||||
(when (executable-find "nixfmt")
|
||||
(setq lsp-nix-nixd-formatting-command [ "nixfmt" ]))
|
||||
|
||||
(unless lsp-nix-nixd-nixos-options-expr
|
||||
(setq lsp-nix-nixd-nixos-options-expr (concat "(builtins.getFlake \"/etc/nixos\").nixosConfigurations." (system-name) ".options")))
|
||||
(unless lsp-nix-nixd-nixpkgs-expr
|
||||
(setq lsp-nix-nixd-nixpkgs-expr (concat "(builtins.getFlake \"/etc/nixos\").nixosConfigurations." (system-name) ".pkgs")))
|
||||
(add-hook 'nix-mode-hook 'lsp-deferred)
|
||||
(add-hook 'nix-mode-hook 'display-line-numbers-mode)
|
||||
|
||||
(add-hook 'nix-ts-mode-hook 'lsp-deferred)
|
||||
(add-hook 'nix-ts-mode-hook 'display-line-numbers-mode)
|
||||
|
||||
(when (treesit-language-available-p 'nix) (push '(nix-mode . nix-ts-mode) major-mode-remap-alist)))
|
||||
(use-package paredit)
|
||||
|
||||
(use-package sly
|
||||
:if (executable-find "sbcl")
|
||||
:config
|
||||
(setq inferior-lisp-program "sbcl"))
|
||||
(use-package bash-completion)
|
||||
(use-package diff-hl
|
||||
:config
|
||||
(setq diff-hl-side 'right)
|
||||
(global-diff-hl-mode 1)
|
||||
(diff-hl-margin-mode 1)
|
||||
(diff-hl-flydiff-mode 1)
|
||||
(global-diff-hl-show-hunk-mouse-mode 1))
|
||||
|
||||
(use-package magit
|
||||
:after (transient))
|
||||
|
||||
(use-package git-timemachine
|
||||
:defer t)
|
||||
(use-package org
|
||||
:mode (("\\.org$" . org-mode))
|
||||
:hook
|
||||
((org-mode . org-indent-mode)
|
||||
(org-mode . display-line-numbers-mode)
|
||||
)
|
||||
:config
|
||||
(require 'org-mouse)
|
||||
(require 'org-tempo)
|
||||
(setq org-src-window-setup 'current-window)
|
||||
(setq org-latex-pdf-process '("latexmk -xelatex -quiet -shell-escape -f -output-directory=%o %f"))
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((latex . t)
|
||||
(emacs-lisp . t)
|
||||
(shell . t)
|
||||
(css . t)
|
||||
(C . t)
|
||||
(calc . t)
|
||||
(awk . t)
|
||||
(sql . t)
|
||||
(sqlite . t)))
|
||||
(add-hook 'org-mode-hook (lambda ()
|
||||
(setq-local
|
||||
electric-pair-inhibit-predicate
|
||||
`(lambda (c)
|
||||
(if
|
||||
(char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))))
|
||||
(use-package org-modern
|
||||
:after (org)
|
||||
:hook
|
||||
(org-indent-mode . org-modern-mode)
|
||||
(org-agenda-finalize . org-modern-agenda)
|
||||
:config
|
||||
(setq org-modern-block-name '("▼ " . "▲ ")))
|
||||
(use-package org-auto-tangle
|
||||
:after (org)
|
||||
:hook (org-mode . org-auto-tangle-mode)
|
||||
)
|
||||
(use-package toc-org
|
||||
:after (org)
|
||||
:hook
|
||||
((org-mode . toc-org-mode )
|
||||
(markdown-mode . toc-org-mode)))
|
||||
(use-package org-transclusion
|
||||
:after (org))
|
||||
(use-package org-roam
|
||||
:after (org))
|
||||
|
||||
(use-package undo-tree
|
||||
:config
|
||||
(global-undo-tree-mode 1)
|
||||
(defvar materus/undo-tree-dir (concat user-emacs-directory "var/undo-tree/"))
|
||||
(unless (file-exists-p materus/undo-tree-dir)
|
||||
(make-directory materus/undo-tree-dir t))
|
||||
(setq undo-tree-visualizer-diff t)
|
||||
(setq undo-tree-history-directory-alist `(("." . ,materus/undo-tree-dir )))
|
||||
(setq undo-tree-visualizer-timestamps t))
|
||||
|
||||
(use-package which-key
|
||||
:config
|
||||
(which-key-mode 1))
|
||||
(use-package projectile
|
||||
:config (projectile-mode 1))
|
||||
(use-package perspective
|
||||
:config
|
||||
(setq persp-mode-prefix-key (kbd "C-c M-p"))
|
||||
(setq persp-modestring-short t)
|
||||
(persp-mode 1)
|
||||
)
|
||||
|
||||
(use-package elcord
|
||||
:if (not materus/server-env)
|
||||
:config
|
||||
(defun materus/elcord-toggle (&optional _frame)
|
||||
"Toggle elcord based on visible frames"
|
||||
(if (> (length (frame-list)) 1)
|
||||
(elcord-mode 1)
|
||||
(elcord-mode -1))
|
||||
)
|
||||
(unless (daemonp) (elcord-mode 1))
|
||||
(add-hook 'after-delete-frame-functions 'materus/elcord-toggle)
|
||||
(add-hook 'server-after-make-frame-hook 'materus/elcord-toggle))
|
||||
(use-package drag-stuff)
|
||||
(use-package popper)
|
||||
(use-package visual-fill-column)
|
||||
(use-package so-long
|
||||
:defer t)
|
||||
(use-package vlf
|
||||
:defer t)
|
||||
(use-package crux)
|
||||
|
||||
(use-package nerd-icons)
|
||||
(use-package svg-lib)
|
||||
(use-package transient)
|
||||
;; Keybindings
|
||||
(defun materus/keybind-set ()
|
||||
(require 'cua-base)
|
||||
|
||||
;; CUA-like global
|
||||
(define-key global-map (kbd "C-s") 'save-buffer)
|
||||
(define-key global-map (kbd "C-a") 'mark-whole-buffer)
|
||||
(define-key global-map (kbd "C-f") 'isearch-forward)
|
||||
(define-key global-map (kbd "C-S-f") 'isearch-backward)
|
||||
(define-key isearch-mode-map (kbd "C-f") 'isearch-repeat-forward)
|
||||
(define-key isearch-mode-map (kbd "C-S-f") 'isearch-repeat-backward)
|
||||
|
||||
;; CUA
|
||||
(define-key cua--cua-keys-keymap (kbd "C-z") 'undo-tree-undo)
|
||||
(define-key cua--cua-keys-keymap (kbd "C-y") 'undo-tree-redo)
|
||||
(define-key cua-global-keymap (kbd "C-SPC") 'completion-at-point)
|
||||
(define-key cua-global-keymap (kbd "C-M-SPC") 'cua-set-mark)
|
||||
(cua-mode 1)
|
||||
;; TAB
|
||||
(define-key global-map (kbd "C-<iso-lefttab>") #'indent-rigidly-left)
|
||||
(define-key global-map (kbd "C-<tab>") #'indent-rigidly-right)
|
||||
|
||||
;; Hyper
|
||||
(define-key key-translation-map (kbd "<XF86Calculator>") 'event-apply-hyper-modifier )
|
||||
(define-key key-translation-map (kbd "<Calculator>") 'event-apply-hyper-modifier )
|
||||
(define-key key-translation-map (kbd "∇") 'event-apply-hyper-modifier )
|
||||
|
||||
|
||||
;; Unbind
|
||||
(define-key isearch-mode-map (kbd "C-s") nil)
|
||||
(define-key isearch-mode-map (kbd "C-r") nil)
|
||||
|
||||
|
||||
;; Dashboard
|
||||
(define-key dashboard-mode-map (kbd "C-r") #'dashboard-refresh-buffer)
|
||||
;; Eat
|
||||
(defvar cua--eat-semi-char-keymap (copy-keymap cua--cua-keys-keymap) "EAT semi-char mode CUA keymap")
|
||||
(defvar cua--eat-char-keymap (copy-keymap cua--cua-keys-keymap) "EAT char mode CUA keymap")
|
||||
|
||||
|
||||
(define-key cua--eat-semi-char-keymap (kbd "C-v") #'eat-yank)
|
||||
(define-key cua--eat-char-keymap (kbd "C-S-v") #'eat-yank)
|
||||
(define-key cua--eat-semi-char-keymap (kbd "C-c") #'copy-region-as-kill)
|
||||
(define-key cua--eat-char-keymap (kbd "C-S-c") #'copy-region-as-kill)
|
||||
(define-key eat-mode-map (kbd "C-<right>") #'eat-self-input)
|
||||
(define-key eat-mode-map (kbd "C-<left>") #'eat-self-input)
|
||||
|
||||
|
||||
(defun cua--eat-semi-char-override-keymap ()
|
||||
(setq-local cua--keymap-alist (copy-tree cua--keymap-alist))
|
||||
(setf (alist-get 'cua--ena-cua-keys-keymap cua--keymap-alist) cua--eat-semi-char-keymap))
|
||||
(defun cua--eat-char-override-keymap ()
|
||||
(setq-local cua--keymap-alist (copy-tree cua--keymap-alist))
|
||||
(setf (alist-get 'cua--ena-cua-keys-keymap cua--keymap-alist) cua--eat-char-keymap))
|
||||
|
||||
(advice-add 'eat-semi-char-mode :after #'cua--eat-semi-char-override-keymap)
|
||||
(advice-add 'eat-char-mode :after #'cua--eat-char-override-keymap)
|
||||
(add-hook 'eat-char-mode-hook #'cua--eat-char-override-keymap)
|
||||
|
||||
;; Treemacs
|
||||
(define-key global-map (kbd "C-H-t") 'treemacs))
|
||||
|
||||
|
||||
(add-hook 'elpaca-after-init-hook #'materus/keybind-set )
|
||||
;; Custom File
|
||||
(add-hook 'elpaca-after-init-hook (lambda () (load custom-file 'noerror)))
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
(defvar materus/nix-packages nil)
|
||||
|
||||
|
||||
|
||||
(when (not materus/nix-packages)
|
||||
(message "Not using config from nix packages, using straight")
|
||||
(defvar bootstrap-version)
|
||||
(let ((bootstrap-file
|
||||
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||
(bootstrap-version 6))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(load bootstrap-file nil 'nomessage))
|
||||
(declare-function straight-use-package "straight" (&optional ARG))
|
||||
(straight-use-package 'load-relative)
|
||||
|
||||
(straight-use-package 'use-package)
|
||||
(straight-use-package 'telephone-line)
|
||||
(straight-use-package 'elcord)
|
||||
(straight-use-package 'dashboard)
|
||||
(straight-use-package 'minions)
|
||||
(straight-use-package 'lsp-mode)
|
||||
(straight-use-package 'lsp-ui)
|
||||
|
||||
(straight-use-package 'moe-theme)
|
||||
(straight-use-package 'doom-themes)
|
||||
)
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
keyboard "Domyślny (XFree 4) - materus"
|
||||
key Clear+KeyPad : "\E[E"
|
||||
key Space+Ctrl : "\x00"
|
||||
key Backspace+Ctrl : "\b"
|
||||
key Backspace-Ctrl : "\x7f"
|
||||
key F8+AnyModifier : "\E[19;*~"
|
||||
key F8-AnyModifier : "\E[19~"
|
||||
key Enter-NewLine : "\r"
|
||||
key Enter+NewLine : "\r\n"
|
||||
key Return+Shift : "\EOM"
|
||||
key Return-Shift+NewLine : "\r\n"
|
||||
key Return-Shift-NewLine : "\r"
|
||||
key PgUp+Shift+Ctrl-AppScreen : ScrollPromptUp
|
||||
key PgUp+Shift-Ctrl-AppScreen : ScrollPageUp
|
||||
key PgUp+Shift+AppScreen : "\E[5;*~"
|
||||
key PgUp-Shift+AnyModifier : "\E[5;*~"
|
||||
key PgUp-Shift-AnyModifier : "\E[5~"
|
||||
key PgUp-Shift+KeyPad : "\E[5~"
|
||||
key Esc : "\E"
|
||||
key Tab+Ctrl-Ansi : "\t"
|
||||
key Tab+Ctrl+Ansi : "\E[27;5;9~"
|
||||
key Tab+Shift-Ansi : "\t"
|
||||
key Tab+Shift+Ansi : "\E[Z"
|
||||
key Tab-Shift : "\t"
|
||||
key F6+AnyModifier : "\E[17;*~"
|
||||
key F6-AnyModifier : "\E[17~"
|
||||
key Down+Shift-Ctrl-Alt-AppScreen : ScrollLineDown
|
||||
key Down-Shift+KeyPad+Ansi-AppCursorKeys : "\E[B"
|
||||
key Down-Shift+KeyPad+Ansi+AppCursorKeys : "\EOB"
|
||||
key Down+Shift+Ctrl-AppScreen : "\E[1;*B"
|
||||
key Down+Shift+Alt-AppScreen : "\E[1;*B"
|
||||
key Down+Shift+AppScreen : "\E[1;*B"
|
||||
key Down-Shift+Ansi+AnyModifier : "\E[1;*B"
|
||||
key Down-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[B"
|
||||
key Down-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOB"
|
||||
key Down-Shift-Ansi : "\EB"
|
||||
key Up+Shift-Ctrl-Alt-AppScreen : ScrollLineUp
|
||||
key Up-Shift+KeyPad+Ansi-AppCursorKeys : "\E[A"
|
||||
key Up-Shift+KeyPad+Ansi+AppCursorKeys : "\EOA"
|
||||
key Up+Shift+Ctrl-AppScreen : "\E[1;*A"
|
||||
key Up+Shift+Alt-AppScreen : "\E[1;*A"
|
||||
key Up+Shift+AppScreen : "\E[1;*A"
|
||||
key Up-Shift+Ansi+AnyModifier : "\E[1;*A"
|
||||
key Up-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[A"
|
||||
key Up-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOA"
|
||||
key Up-Shift-Ansi : "\EA"
|
||||
key F10+AnyModifier : "\E[21;*~"
|
||||
key F10-AnyModifier : "\E[21~"
|
||||
key Left-Shift+KeyPad+Ansi-AppCursorKeys : "\E[D"
|
||||
key Left-Shift+KeyPad+Ansi+AppCursorKeys : "\EOD"
|
||||
key Left+Shift+Ctrl-AppScreen : "\E[1;*D"
|
||||
key Left+Shift+Alt-AppScreen : "\E[1;*D"
|
||||
key Left+Shift+AppScreen : "\E[1;*D"
|
||||
key Left-Shift+Ansi+AnyModifier : "\E[1;*D"
|
||||
key Left-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[D"
|
||||
key Left-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOD"
|
||||
key Left-Shift-Ansi : "\ED"
|
||||
key F5+AnyModifier : "\E[15;*~"
|
||||
key F5-AnyModifier : "\E[15~"
|
||||
key F9+AnyModifier : "\E[20;*~"
|
||||
key F9-AnyModifier : "\E[20~"
|
||||
key F1+AnyModifier : "\EO*P"
|
||||
key F1-AnyModifier : "\EOP"
|
||||
key F12+AnyModifier : "\E[24;*~"
|
||||
key F12-AnyModifier : "\E[24~"
|
||||
key Right-Shift+KeyPad+Ansi-AppCursorKeys : "\E[C"
|
||||
key Right-Shift+KeyPad+Ansi+AppCursorKeys : "\EOC"
|
||||
key Right+Shift+Ctrl-AppScreen : "\E[1;*C"
|
||||
key Right+Shift+Alt-AppScreen : "\E[1;*C"
|
||||
key Right+Shift+AppScreen : "\E[1;*C"
|
||||
key Right-Shift+Ansi+AnyModifier : "\E[1;*C"
|
||||
key Right-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[C"
|
||||
key Right-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOC"
|
||||
key Right-Shift-Ansi : "\EC"
|
||||
key F4+AnyModifier : "\EO*S"
|
||||
key F4-AnyModifier : "\EOS"
|
||||
key F11+AnyModifier : "\E[23;*~"
|
||||
key F11-AnyModifier : "\E[23~"
|
||||
key Home+Shift-AppScreen : ScrollUpToTop
|
||||
key Home+AnyModifier : "\E[1;*H"
|
||||
key Home+AppCursorKeys-AnyModifier : "\EOH"
|
||||
key Home-AppCursorKeys-AnyModifier : "\E[H"
|
||||
key Home+KeyPad-AppCursorKeys : "\E[H"
|
||||
key Home+KeyPad+AppCursorKeys : "\EOH"
|
||||
key F7+AnyModifier : "\E[18;*~"
|
||||
key F7-AnyModifier : "\E[18~"
|
||||
key End+Shift-AppScreen : ScrollDownToBottom
|
||||
key End+AnyModifier : "\E[1;*F"
|
||||
key End+AppCursorKeys-AnyModifier : "\EOF"
|
||||
key End-AppCursorKeys-AnyModifier : "\E[F"
|
||||
key End+KeyPad-AppCursorKeys : "\E[F"
|
||||
key End+KeyPad+AppCursorKeys : "\EOF"
|
||||
key F2+AnyModifier : "\EO*Q"
|
||||
key F2-AnyModifier : "\EOQ"
|
||||
key F3+AnyModifier : "\EO*R"
|
||||
key F3-AnyModifier : "\EOR"
|
||||
key Backtab+Ctrl-Ansi : "\t"
|
||||
key Backtab+Ctrl+Ansi : "\E[27;6;9~"
|
||||
key Backtab-Ansi : "\t"
|
||||
key Backtab+Ansi : "\E[Z"
|
||||
key PgDown+Shift+Ctrl-AppScreen : ScrollPromptDown
|
||||
key PgDown+Shift-Ctrl-AppScreen : ScrollPageDown
|
||||
key PgDown+Shift+AppScreen : "\E[6;*~"
|
||||
key PgDown-Shift+AnyModifier : "\E[6;*~"
|
||||
key PgDown-Shift-AnyModifier : "\E[6~"
|
||||
key PgDown-Shift+KeyPad : "\E[6~"
|
||||
key Del+AnyModifier : "\E[3;*~"
|
||||
key Del-AnyModifier : "\E[3~"
|
||||
key Del+KeyPad : "\E[3~"
|
||||
key Ins+AnyModifier : "\E[2;*~"
|
||||
key Ins-AnyModifier : "\E[2~"
|
||||
key Ins+KeyPad : "\E[2~"
|
||||
key Calculator : "\xe2\x88\x87"
|
||||
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
#/usr/bin/env bash
|
||||
IFS=$'\n'
|
||||
nix build nixpkgs\#imagemagick --no-link
|
||||
CONVERT="$(nix eval nixpkgs\#imagemagick.outPath | tr -d '"')/bin/magick"
|
||||
convert_cmd () {
|
||||
if ! command -v magick &> /dev/null; then $CONVERT "$@"; else convert "$@"; fi
|
||||
}
|
||||
|
||||
|
||||
function max16 {
|
||||
while [ `jobs | wc -l` -ge 16 ]
|
||||
do
|
||||
sleep 2
|
||||
done
|
||||
}
|
||||
|
||||
change_to_webp() {
|
||||
f="$1"
|
||||
file="${f%.*}"
|
||||
file_webp="${file}.webp"
|
||||
echo "Trying to convert to $file_webp"
|
||||
if convert_cmd "$f" -define webp:thread-level=1 -define webp:method=6 -quality 99 "$file_webp"; then
|
||||
if touch -r "$f" "$file_webp"; then
|
||||
rm "$f"
|
||||
echo "Finished converting $f"
|
||||
else
|
||||
echo "Failed to set old date to new file"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Failed to convert $f"
|
||||
exit 1;
|
||||
fi
|
||||
}
|
||||
|
||||
pushd $XDG_PICTURES_DIR
|
||||
for f in `find "." \( -name "*.png" -type f -o -name "*.jpg" -type f -o -name "*.jpeg" -type f -o -name "*.avif" -type f \) \
|
||||
-a -not \( -path "./Inne/Special/*" -o -path "./Inne/Emojis/*" -o -path "./Inne/MCSkins/*" -o -path "./Avatar/*" -o -path "./Inne/GIF/*" \)`;
|
||||
do
|
||||
max16; change_to_webp "$f" &
|
||||
done
|
||||
|
||||
|
||||
for job in `jobs -p`
|
||||
do
|
||||
echo "Waiting for: $job"
|
||||
wait $job || let "FAIL+=1"
|
||||
done
|
||||
|
||||
popd
|
||||
Generated
+483
-164
@@ -5,11 +5,11 @@
|
||||
"fromYaml": "fromYaml"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709025227,
|
||||
"narHash": "sha256-KXcORItjYJTdEO/BlBd0Uym1Xa3eBu43uvpFiWjJOdY=",
|
||||
"lastModified": 1755819240,
|
||||
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "base16.nix",
|
||||
"rev": "4e9b16c8b44958bc6bf46d99c3bb1b59c9c9c764",
|
||||
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -24,11 +24,11 @@
|
||||
"fromYaml": "fromYaml_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709025227,
|
||||
"narHash": "sha256-KXcORItjYJTdEO/BlBd0Uym1Xa3eBu43uvpFiWjJOdY=",
|
||||
"lastModified": 1755819240,
|
||||
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "base16.nix",
|
||||
"rev": "4e9b16c8b44958bc6bf46d99c3bb1b59c9c9c764",
|
||||
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -46,20 +46,22 @@
|
||||
"flake-utils": "flake-utils",
|
||||
"git-agecrypt": "git-agecrypt",
|
||||
"home-manager": "home-manager",
|
||||
"nix-vscode-extensions": "nix-vscode-extensions",
|
||||
"nixerus": "nixerus",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nur": "nur_2",
|
||||
"plasma-manager": "plasma-manager",
|
||||
"sops-nix": "sops-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709405283,
|
||||
"narHash": "sha256-x5B2/Yp+80kJh/thzqIb61jFQk3zg92N0VO+unEN2po=",
|
||||
"lastModified": 1730405317,
|
||||
"narHash": "sha256-+0BfujrFEGC8xJD2rNwFslMjnrE89TXyDDUCVLCet5k=",
|
||||
"owner": "materusPL",
|
||||
"repo": "nixos-config",
|
||||
"rev": "ac5447eff2d074e1937908738e56741d4cb6a426",
|
||||
"rev": "a7421ce7dd63f27c2118be2eaf41e38402f959a8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -79,20 +81,22 @@
|
||||
"home-manager": [
|
||||
"hm-stable"
|
||||
],
|
||||
"nix-vscode-extensions": "nix-vscode-extensions_2",
|
||||
"nixerus": "nixerus_2",
|
||||
"nixos-hardware": "nixos-hardware_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs-stable"
|
||||
],
|
||||
"nur": "nur_4",
|
||||
"plasma-manager": "plasma-manager_2",
|
||||
"sops-nix": "sops-nix_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709405283,
|
||||
"narHash": "sha256-x5B2/Yp+80kJh/thzqIb61jFQk3zg92N0VO+unEN2po=",
|
||||
"lastModified": 1730405317,
|
||||
"narHash": "sha256-+0BfujrFEGC8xJD2rNwFslMjnrE89TXyDDUCVLCet5k=",
|
||||
"owner": "materusPL",
|
||||
"repo": "nixos-config",
|
||||
"rev": "ac5447eff2d074e1937908738e56741d4cb6a426",
|
||||
"rev": "a7421ce7dd63f27c2118be2eaf41e38402f959a8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -104,21 +108,17 @@
|
||||
},
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"configInputs",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"configInputs",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713532798,
|
||||
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
|
||||
"lastModified": 1741473158,
|
||||
"narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
|
||||
"rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -130,21 +130,17 @@
|
||||
},
|
||||
"devshell_2": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"configInputs-stable",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"configInputs-stable",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713532798,
|
||||
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
|
||||
"lastModified": 1741473158,
|
||||
"narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
|
||||
"rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -156,10 +152,6 @@
|
||||
},
|
||||
"emacs-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"configInputs",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"configInputs",
|
||||
"nixpkgs"
|
||||
@@ -167,11 +159,11 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713517520,
|
||||
"narHash": "sha256-t59lpRo7EulX9J0/bc5/8cUEo7hl6z9YOYukzg54cyU=",
|
||||
"lastModified": 1759739185,
|
||||
"narHash": "sha256-mO3kaYc+xdbwf8roqexsKq1ocQCQsZzFha0fIJMbRRw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "a8692d4e570e93061d2bbe10af4a1590afe82e15",
|
||||
"rev": "722d8e6f96a0fd1dcf3d49a1f2dc38aec8c4039d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -183,22 +175,18 @@
|
||||
},
|
||||
"emacs-overlay_2": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"configInputs-stable",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"configInputs-stable",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable_3"
|
||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713517520,
|
||||
"narHash": "sha256-t59lpRo7EulX9J0/bc5/8cUEo7hl6z9YOYukzg54cyU=",
|
||||
"lastModified": 1759739185,
|
||||
"narHash": "sha256-mO3kaYc+xdbwf8roqexsKq1ocQCQsZzFha0fIJMbRRw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "a8692d4e570e93061d2bbe10af4a1590afe82e15",
|
||||
"rev": "722d8e6f96a0fd1dcf3d49a1f2dc38aec8c4039d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -208,16 +196,127 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"configInputs",
|
||||
"nixerus",
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"configInputs",
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_3": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"configInputs-stable",
|
||||
"nixerus",
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_4": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"configInputs-stable",
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_5": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -232,11 +331,11 @@
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -249,11 +348,11 @@
|
||||
"fromYaml": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1689549921,
|
||||
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=",
|
||||
"lastModified": 1731966426,
|
||||
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "fromYaml",
|
||||
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84",
|
||||
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -265,11 +364,11 @@
|
||||
"fromYaml_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1689549921,
|
||||
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=",
|
||||
"lastModified": 1731966426,
|
||||
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "fromYaml",
|
||||
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84",
|
||||
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -337,16 +436,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1712386041,
|
||||
"narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=",
|
||||
"lastModified": 1758463745,
|
||||
"narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff",
|
||||
"rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.11",
|
||||
"ref": "release-25.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -359,11 +458,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713539802,
|
||||
"narHash": "sha256-aub7mcsDv5J6PcYNxcLUCIaNGNlInPCAYYoCA1x76oY=",
|
||||
"lastModified": 1759756027,
|
||||
"narHash": "sha256-wcRWJgk0DNWjmJjLtfkoTYy/1sMIVQZp8Kqn6upIGoM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "1f305c363ecd7c6505f03fc7baba15505f3aa630",
|
||||
"rev": "ed10023224107dc8479ead95a448d66f046785e0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -375,20 +474,73 @@
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1712317700,
|
||||
"narHash": "sha256-rnkQ6qMhlxfjpCECkTMlFXHU/88QvC5KpdJWq5H6F1E=",
|
||||
"path": "/nix/store/6kq2krynx50y7ws18xhpljn5rjzk37ps-source",
|
||||
"rev": "782eed8bb64b27acaeb7c17be4a095c85e65717f",
|
||||
"type": "path"
|
||||
"lastModified": 1759756027,
|
||||
"narHash": "sha256-wcRWJgk0DNWjmJjLtfkoTYy/1sMIVQZp8Kqn6upIGoM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ed10023224107dc8479ead95a448d66f046785e0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "home-manager",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nix-vscode-extensions": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"configInputs",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"configInputs",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759715292,
|
||||
"narHash": "sha256-x6Z+bHpF6qQuBiI8mHNo1eBZwk4encZe5eCn5OtbOMI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-vscode-extensions",
|
||||
"rev": "1f6a9062a119b04c607ae291fb058011b19ac047",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "master",
|
||||
"repo": "nix-vscode-extensions",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-vscode-extensions_2": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"configInputs-stable",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"configInputs-stable",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759715292,
|
||||
"narHash": "sha256-x6Z+bHpF6qQuBiI8mHNo1eBZwk4encZe5eCn5OtbOMI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-vscode-extensions",
|
||||
"rev": "1f6a9062a119b04c607ae291fb058011b19ac047",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "master",
|
||||
"repo": "nix-vscode-extensions",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixerus": {
|
||||
"inputs": {
|
||||
"home-manager": [
|
||||
@@ -402,11 +554,11 @@
|
||||
"nur": "nur"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1712344538,
|
||||
"narHash": "sha256-Cg9tOeingv0tPUnENdlxfsoWLuZfYUjFgFjrG5+P1js=",
|
||||
"lastModified": 1756146915,
|
||||
"narHash": "sha256-kzqvt4h0nzmm+KnFWmQ4PWDn430FHDLYhE2j3MOt6X0=",
|
||||
"owner": "materusPL",
|
||||
"repo": "Nixerus",
|
||||
"rev": "14e31ce7591aae41102c8e417f3f0fb02700c126",
|
||||
"rev": "7071878ada9d4ec712f8b99a841d6ee641ac97cd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -429,11 +581,11 @@
|
||||
"nur": "nur_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1712344538,
|
||||
"narHash": "sha256-Cg9tOeingv0tPUnENdlxfsoWLuZfYUjFgFjrG5+P1js=",
|
||||
"lastModified": 1756146915,
|
||||
"narHash": "sha256-kzqvt4h0nzmm+KnFWmQ4PWDn430FHDLYhE2j3MOt6X0=",
|
||||
"owner": "materusPL",
|
||||
"repo": "Nixerus",
|
||||
"rev": "14e31ce7591aae41102c8e417f3f0fb02700c126",
|
||||
"rev": "7071878ada9d4ec712f8b99a841d6ee641ac97cd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -445,11 +597,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1713521961,
|
||||
"narHash": "sha256-EwR8wW9AqJhSIY+0oxWRybUZ32BVKuZ9bjlRh8SJvQ8=",
|
||||
"lastModified": 1759582739,
|
||||
"narHash": "sha256-spZegilADH0q5OngM86u6NmXxduCNv5eX9vCiUPhOYc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "5d48925b815fd202781bfae8fb6f45c07112fdb2",
|
||||
"rev": "3441b5242af7577230a78ffb03542add264179ab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -461,11 +613,11 @@
|
||||
},
|
||||
"nixos-hardware_2": {
|
||||
"locked": {
|
||||
"lastModified": 1713521961,
|
||||
"narHash": "sha256-EwR8wW9AqJhSIY+0oxWRybUZ32BVKuZ9bjlRh8SJvQ8=",
|
||||
"lastModified": 1759582739,
|
||||
"narHash": "sha256-spZegilADH0q5OngM86u6NmXxduCNv5eX9vCiUPhOYc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "5d48925b815fd202781bfae8fb6f45c07112fdb2",
|
||||
"rev": "3441b5242af7577230a78ffb03542add264179ab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -477,15 +629,15 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1711703276,
|
||||
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1755615617,
|
||||
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
|
||||
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
@@ -493,91 +645,107 @@
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1713344939,
|
||||
"narHash": "sha256-jpHkAt0sG2/J7ueKnG7VvLLkBYUMQbXQ2L8OBpVG53s=",
|
||||
"lastModified": 1759580034,
|
||||
"narHash": "sha256-YWo57PL7mGZU7D4WeKFMiW4ex/O6ZolUS6UNBHTZfkI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e402c3eb6d88384ca6c52ef1c53e61bdc9b84ddd",
|
||||
"rev": "3bcc93c5f7a4b30335d31f21e2f1281cba68c318",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.11",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1713434076,
|
||||
"narHash": "sha256-+/p5edwlkqKZc6GDAQl+92Hoe1f3NNbUF9uj+X9H3pU=",
|
||||
"lastModified": 1759580034,
|
||||
"narHash": "sha256-YWo57PL7mGZU7D4WeKFMiW4ex/O6ZolUS6UNBHTZfkI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8494ae076b7878d61a7d2d25e89a847fe8f8364c",
|
||||
"rev": "3bcc93c5f7a4b30335d31f21e2f1281cba68c318",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-23.11",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable_3": {
|
||||
"locked": {
|
||||
"lastModified": 1713344939,
|
||||
"narHash": "sha256-jpHkAt0sG2/J7ueKnG7VvLLkBYUMQbXQ2L8OBpVG53s=",
|
||||
"lastModified": 1759580034,
|
||||
"narHash": "sha256-YWo57PL7mGZU7D4WeKFMiW4ex/O6ZolUS6UNBHTZfkI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e402c3eb6d88384ca6c52ef1c53e61bdc9b84ddd",
|
||||
"rev": "3bcc93c5f7a4b30335d31f21e2f1281cba68c318",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable_4": {
|
||||
"locked": {
|
||||
"lastModified": 1713434076,
|
||||
"narHash": "sha256-+/p5edwlkqKZc6GDAQl+92Hoe1f3NNbUF9uj+X9H3pU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8494ae076b7878d61a7d2d25e89a847fe8f8364c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable_5": {
|
||||
"locked": {
|
||||
"lastModified": 1713344939,
|
||||
"narHash": "sha256-jpHkAt0sG2/J7ueKnG7VvLLkBYUMQbXQ2L8OBpVG53s=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e402c3eb6d88384ca6c52ef1c53e61bdc9b84ddd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.11",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1713297878,
|
||||
"narHash": "sha256-hOkzkhLT59wR8VaMbh1ESjtZLbGi+XNaBN6h49SPqEc=",
|
||||
"lastModified": 1741173522,
|
||||
"narHash": "sha256-k7VSqvv0r1r53nUI/IfPHCppkUAddeXn843YlAC5DR0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d69ab0d71b22fa1ce3dbeff666e6deb4917db049",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1755615617,
|
||||
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1741173522,
|
||||
"narHash": "sha256-k7VSqvv0r1r53nUI/IfPHCppkUAddeXn843YlAC5DR0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d69ab0d71b22fa1ce3dbeff666e6deb4917db049",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1759381078,
|
||||
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "66adc1e47f8784803f2deb6cacd5e07264ec2d5c",
|
||||
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -587,13 +755,50 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1711043201,
|
||||
"narHash": "sha256-jxx3+oFnKKtL26uq3vlHxbWmS3kqif2F6CVErMMzy3w=",
|
||||
"path": "/nix/store/sr2qvyjjrp7d3qmdqj9141b97hyg8gd2-source",
|
||||
"rev": "ef102b2c8fa81a28f1da791930042696cafd6bda",
|
||||
"type": "path"
|
||||
"lastModified": 1759381078,
|
||||
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1759381078,
|
||||
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1756145408,
|
||||
"narHash": "sha256-ltkbs5Watrq+V2l9hWefSdM7cfvxLkabtMJeZn0MiCo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "c9c985b60eb46d97370f7d3fefdc300b953c044d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nur",
|
||||
@@ -601,12 +806,17 @@
|
||||
}
|
||||
},
|
||||
"nur_2": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713540396,
|
||||
"narHash": "sha256-mc9hP0I2K2I23fx0py4bp6k28liXgBRilVQRc5hb3LU=",
|
||||
"lastModified": 1753980880,
|
||||
"narHash": "sha256-aj1pbYxL6N+XFqBHjB4B1QP0bnKRcg1AfpgT5zUFsW8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "e16ee8a64f1ab6bfbd54f24985141a0bd1243c29",
|
||||
"rev": "16db3e61da7606984a05b4dfc33cd1d26d22fb22",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -617,12 +827,17 @@
|
||||
}
|
||||
},
|
||||
"nur_3": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_3",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1711043201,
|
||||
"narHash": "sha256-jxx3+oFnKKtL26uq3vlHxbWmS3kqif2F6CVErMMzy3w=",
|
||||
"path": "/nix/store/sr2qvyjjrp7d3qmdqj9141b97hyg8gd2-source",
|
||||
"rev": "ef102b2c8fa81a28f1da791930042696cafd6bda",
|
||||
"type": "path"
|
||||
"lastModified": 1756145408,
|
||||
"narHash": "sha256-ltkbs5Watrq+V2l9hWefSdM7cfvxLkabtMJeZn0MiCo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "c9c985b60eb46d97370f7d3fefdc300b953c044d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nur",
|
||||
@@ -630,12 +845,17 @@
|
||||
}
|
||||
},
|
||||
"nur_4": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_4",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"treefmt-nix": "treefmt-nix_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713540396,
|
||||
"narHash": "sha256-mc9hP0I2K2I23fx0py4bp6k28liXgBRilVQRc5hb3LU=",
|
||||
"lastModified": 1753980880,
|
||||
"narHash": "sha256-aj1pbYxL6N+XFqBHjB4B1QP0bnKRcg1AfpgT5zUFsW8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "e16ee8a64f1ab6bfbd54f24985141a0bd1243c29",
|
||||
"rev": "16db3e61da7606984a05b4dfc33cd1d26d22fb22",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -646,18 +866,75 @@
|
||||
}
|
||||
},
|
||||
"nur_5": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_5",
|
||||
"nixpkgs": "nixpkgs_7"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1712342638,
|
||||
"narHash": "sha256-0yvbIJSRMh09d3BEySpbC+ZNHV7o+nlLH9emLxB6Uq4=",
|
||||
"path": "/nix/store/v54rd44np54b7ka6vsz92vrwnq7bi5gi-source",
|
||||
"rev": "08506b97dda7b6e5b483885d7bb0f5e6bfdc9b57",
|
||||
"type": "path"
|
||||
"lastModified": 1759755583,
|
||||
"narHash": "sha256-ZY0EZTqlb3RwCEolM6d7S1ccVhay8GsXF9V2yLbdCmo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "58e23a2765d244dd4283f8f25c3a1b9a8f06417a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nur",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"plasma-manager": {
|
||||
"inputs": {
|
||||
"home-manager": [
|
||||
"configInputs",
|
||||
"home-manager"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"configInputs",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759321049,
|
||||
"narHash": "sha256-8XkU4gIrLT2DJZWQyvsP5woXGZF5eE/7AnKfwQkiwYU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "plasma-manager",
|
||||
"rev": "205dcfd4a30d4a5d1b4f28defee69daa7c7252cd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "trunk",
|
||||
"repo": "plasma-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plasma-manager_2": {
|
||||
"inputs": {
|
||||
"home-manager": [
|
||||
"configInputs-stable",
|
||||
"home-manager"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"configInputs-stable",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759321049,
|
||||
"narHash": "sha256-8XkU4gIrLT2DJZWQyvsP5woXGZF5eE/7AnKfwQkiwYU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "plasma-manager",
|
||||
"rev": "205dcfd4a30d4a5d1b4f28defee69daa7c7252cd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "trunk",
|
||||
"repo": "plasma-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"private": {
|
||||
"locked": {
|
||||
"lastModified": 1684365822,
|
||||
@@ -680,8 +957,8 @@
|
||||
"configInputs-stable": "configInputs-stable",
|
||||
"hm-stable": "hm-stable",
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-stable": "nixpkgs-stable_5",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs-stable": "nixpkgs-stable_3",
|
||||
"nur": "nur_5",
|
||||
"private": "private"
|
||||
}
|
||||
@@ -691,15 +968,14 @@
|
||||
"nixpkgs": [
|
||||
"configInputs",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713532771,
|
||||
"narHash": "sha256-vfKxhYVMzG2tg48/1rewBoSLCrKIjQsG1j7Nm/Y2gf4=",
|
||||
"lastModified": 1759635238,
|
||||
"narHash": "sha256-UvzKi02LMFP74csFfwLPAZ0mrE7k6EiYaKecplyX9Qk=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "a929a011a09db735abc45a8a45d1ff7fdee62755",
|
||||
"rev": "6e5a38e08a2c31ae687504196a230ae00ea95133",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -714,15 +990,14 @@
|
||||
"nixpkgs": [
|
||||
"configInputs-stable",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable_4"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713532771,
|
||||
"narHash": "sha256-vfKxhYVMzG2tg48/1rewBoSLCrKIjQsG1j7Nm/Y2gf4=",
|
||||
"lastModified": 1759635238,
|
||||
"narHash": "sha256-UvzKi02LMFP74csFfwLPAZ0mrE7k6EiYaKecplyX9Qk=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "a929a011a09db735abc45a8a45d1ff7fdee62755",
|
||||
"rev": "6e5a38e08a2c31ae687504196a230ae00ea95133",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -761,6 +1036,50 @@
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"configInputs",
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733222881,
|
||||
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"configInputs-stable",
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733222881,
|
||||
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
type = "github";
|
||||
owner = "NixOS";
|
||||
repo = "nixpkgs";
|
||||
ref = "nixos-23.11";
|
||||
ref = "nixos-25.05";
|
||||
};
|
||||
|
||||
hm-stable = {
|
||||
type = "github";
|
||||
owner = "nix-community";
|
||||
repo = "home-manager";
|
||||
ref = "release-23.11";
|
||||
ref = "release-25.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user