Compare commits
130 Commits
79d2d3b623
...
nftables_t
| Author | SHA1 | Date | |
|---|---|---|---|
|
a624cbcfd1
|
|||
|
f7246dc661
|
|||
|
5fc1e89975
|
|||
|
071ee11601
|
|||
|
e4b6972c36
|
|||
|
cc95668f6d
|
|||
|
9f1d4c2bfe
|
|||
|
466ab42ee8
|
|||
|
fd7b458be1
|
|||
|
ac5ab2d85d
|
|||
|
650c50889e
|
|||
|
9f78cde62f
|
|||
|
1240d5d3a2
|
|||
|
9b8aa0c6b2
|
|||
|
77e24e385a
|
|||
|
e571ae07c0
|
|||
|
89841d00aa
|
|||
|
9513508d3d
|
|||
|
f2015b81da
|
|||
|
8791c104e1
|
|||
|
9fac7fdac3
|
|||
|
1829280f14
|
|||
|
6c3b0aa239
|
|||
|
17da0a855c
|
|||
|
c75a967110
|
|||
|
350bcfed05
|
|||
|
378ff6c9fd
|
|||
|
09bf9a3b17
|
|||
|
0b069d7277
|
|||
|
e3673902e2
|
|||
|
a9f02a8462
|
|||
|
3f5747d8e0
|
|||
|
da2c2dcd8c
|
|||
|
fca1cd048e
|
|||
|
d1f26e838d
|
|||
|
5440679d16
|
|||
|
fa1392dce8
|
|||
|
0751e0ac30
|
|||
|
a2cf986bc4
|
|||
|
0a95372a68
|
|||
|
ecf5065588
|
|||
|
bb6f0ab772
|
|||
|
90f939e056
|
|||
|
8740cc57fe
|
|||
|
f7eda08683
|
|||
|
15e60767b6
|
|||
|
d9d0ccaed5
|
|||
|
2818f61e28
|
|||
|
b1d4994f92
|
|||
|
4b6e99130b
|
|||
|
a2458211e3
|
|||
|
1f15bf221b
|
|||
|
908c352932
|
|||
|
db9139a08c
|
|||
|
54e4e82dc7
|
|||
|
30560f07cd
|
|||
|
91a9568828
|
|||
|
472105eb8a
|
|||
|
3d46b03022
|
|||
|
dbd3e323f8
|
|||
|
af9b6b9177
|
|||
|
4673549042
|
|||
|
b06f2546d6
|
|||
|
3d774357fd
|
|||
|
29e7cfbc65
|
|||
|
793d778428
|
|||
|
d272b50176
|
|||
|
27d3561623
|
|||
|
467daedae4
|
|||
|
1dc699e5b1
|
|||
|
df3e54c1ca
|
|||
|
0d2dd68933
|
|||
|
2641287a1c
|
|||
|
f854e137cb
|
|||
|
e62d5f62b8
|
|||
|
9551d72d8d
|
|||
|
6eb21658dd
|
|||
|
bdc019547e
|
|||
|
c7ac111ca4
|
|||
|
3576d4081a
|
|||
|
097357e838
|
|||
|
289ab74ca6
|
|||
|
ef20f44154
|
|||
|
cc92ccc52c
|
|||
|
d6ac321923
|
|||
|
fbbd2e3c8a
|
|||
|
7c135d2291
|
|||
|
4b114f6f51
|
|||
|
d32fcecea1
|
|||
|
fed978a9b6
|
|||
|
d4bae9aa7a
|
|||
|
15c7f6e3b5
|
|||
|
784477f82f
|
|||
|
7755c92d27
|
|||
|
f26f27355a
|
|||
|
6984ee4446
|
|||
|
064a2e6554
|
|||
|
e90f05bf99
|
|||
|
8509f81135
|
|||
|
6d08a3883f
|
|||
|
466dbc574d
|
|||
|
cfc66a92cb
|
|||
|
390d3a3ddb
|
|||
|
7a647287bb
|
|||
|
82efa133b3
|
|||
|
0e58c0a65f
|
|||
|
d1da1f149b
|
|||
|
58d1ee5a4c
|
|||
|
3fa43bff25
|
|||
|
5ed8aedf41
|
|||
|
4ae136ea6d
|
|||
|
cb38433656
|
|||
|
4f35747f51
|
|||
|
99ddee1f5e
|
|||
|
5630b394f0
|
|||
|
1a6ab2840a
|
|||
|
bf948813da
|
|||
|
059cfef98a
|
|||
|
e7632ff743
|
|||
|
f6105ac717
|
|||
|
654432249a
|
|||
|
282cac1b70
|
|||
|
a3948bc9a7
|
|||
|
7eb54d5293
|
|||
|
7cb3e2aae4
|
|||
|
511aee2794
|
|||
|
a418ea4145
|
|||
|
e1cfb9032c
|
|||
|
7024f0e216
|
|||
|
4e83712fc0
|
@@ -2,7 +2,8 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -13,14 +14,17 @@
|
|||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
gc.options = "--delete-older-than 7d";
|
gc.options = "--delete-older-than 7d";
|
||||||
package = pkgs.nixUnstable;
|
package = pkgs.nixVersions.latest;
|
||||||
settings.experimental-features = ["nix-command" "flakes"];
|
settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
kernelParams = ["msr.allow_writes=on"];
|
kernelParams = [ "msr.allow_writes=on" ];
|
||||||
supportedFilesystems = ["btrfs"];
|
supportedFilesystems = [ "btrfs" ];
|
||||||
tmpOnTmpfs = true;
|
tmpOnTmpfs = true;
|
||||||
initrd.compressor = "zstd";
|
initrd.compressor = "zstd";
|
||||||
loader.systemd-boot = {
|
loader.systemd-boot = {
|
||||||
@@ -39,7 +43,7 @@
|
|||||||
doas.enable = true;
|
doas.enable = true;
|
||||||
doas.extraRules = [
|
doas.extraRules = [
|
||||||
{
|
{
|
||||||
users = ["akill"];
|
users = [ "akill" ];
|
||||||
keepEnv = true;
|
keepEnv = true;
|
||||||
persist = true;
|
persist = true;
|
||||||
}
|
}
|
||||||
@@ -53,15 +57,16 @@
|
|||||||
networking = {
|
networking = {
|
||||||
firewall.enable = true;
|
firewall.enable = true;
|
||||||
hostName = "blue";
|
hostName = "blue";
|
||||||
nameservers = ["127.0.0.1" "::1"];
|
nameservers = [
|
||||||
|
"127.0.0.1"
|
||||||
|
"::1"
|
||||||
|
];
|
||||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||||
|
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dns = "none";
|
dns = "none";
|
||||||
/*
|
# wifi.backend = "iwd";
|
||||||
wifi.backend = "iwd";
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -92,8 +97,8 @@
|
|||||||
services = {
|
services = {
|
||||||
"caps2esc" = {
|
"caps2esc" = {
|
||||||
description = "Intercepts keyboard udev events";
|
description = "Intercepts keyboard udev events";
|
||||||
wants = ["systemd-udevd.service"];
|
wants = [ "systemd-udevd.service" ];
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig.Nice = -20;
|
serviceConfig.Nice = -20;
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.interception-tools}/bin/intercept \
|
${pkgs.interception-tools}/bin/intercept \
|
||||||
@@ -152,7 +157,10 @@
|
|||||||
windowManager.i3.enable = true;
|
windowManager.i3.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
udev.packages = [pkgs.rtl-sdr pkgs.openhantek6022];
|
udev.packages = [
|
||||||
|
pkgs.rtl-sdr
|
||||||
|
pkgs.openhantek6022
|
||||||
|
];
|
||||||
|
|
||||||
tlp = {
|
tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -162,32 +170,38 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
bindings = [
|
bindings = [
|
||||||
{
|
{
|
||||||
keys = [113];
|
keys = [ 113 ];
|
||||||
events = ["key"];
|
events = [ "key" ];
|
||||||
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master toggle'";
|
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master toggle'";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
keys = [114];
|
keys = [ 114 ];
|
||||||
events = ["key" "rep"];
|
events = [
|
||||||
|
"key"
|
||||||
|
"rep"
|
||||||
|
];
|
||||||
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%- unmute'";
|
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%- unmute'";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
keys = [115];
|
keys = [ 115 ];
|
||||||
events = ["key" "rep"];
|
events = [
|
||||||
|
"key"
|
||||||
|
"rep"
|
||||||
|
];
|
||||||
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%+ unmute'";
|
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%+ unmute'";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
keys = [224];
|
keys = [ 224 ];
|
||||||
events = ["key"];
|
events = [ "key" ];
|
||||||
command = "${pkgs.light}/bin/light -U 5";
|
command = "${pkgs.light}/bin/light -U 5";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
keys = [225];
|
keys = [ 225 ];
|
||||||
events = ["key"];
|
events = [ "key" ];
|
||||||
command = "${pkgs.light}/bin/light -A 5";
|
command = "${pkgs.light}/bin/light -A 5";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -237,7 +251,7 @@
|
|||||||
allowBitmaps = true;
|
allowBitmaps = true;
|
||||||
useEmbeddedBitmaps = true;
|
useEmbeddedBitmaps = true;
|
||||||
defaultFonts = {
|
defaultFonts = {
|
||||||
monospace = ["JetBrainsMono"];
|
monospace = [ "JetBrainsMono" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -306,6 +320,14 @@
|
|||||||
users.users.akill = {
|
users.users.akill = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = ["wireshark" "kvm" "tty" "audio" "sound" "adbusers" "dialout"];
|
extraGroups = [
|
||||||
|
"wireshark"
|
||||||
|
"kvm"
|
||||||
|
"tty"
|
||||||
|
"audio"
|
||||||
|
"sound"
|
||||||
|
"adbusers"
|
||||||
|
"dialout"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,47 +6,77 @@
|
|||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod"];
|
boot.initrd.availableKernelModules = [
|
||||||
boot.initrd.kernelModules = [];
|
"xhci_pci"
|
||||||
boot.kernelModules = ["kvm-intel"];
|
"ahci"
|
||||||
boot.extraModulePackages = [];
|
"nvme"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"sr_mod"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=root" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=root"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."enc_root".device = "/dev/disk/by-uuid/8eb8ac22-d89d-4406-bfbd-ce43e283649f";
|
boot.initrd.luks.devices."enc_root".device =
|
||||||
|
"/dev/disk/by-uuid/8eb8ac22-d89d-4406-bfbd-ce43e283649f";
|
||||||
|
|
||||||
fileSystems."/home" = {
|
fileSystems."/home" = {
|
||||||
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=home" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=home"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" = {
|
fileSystems."/nix" = {
|
||||||
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=nix" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=nix"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var/log" = {
|
fileSystems."/var/log" = {
|
||||||
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=log" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=log"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/persist" = {
|
fileSystems."/persist" = {
|
||||||
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=persist" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=persist"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
@@ -54,7 +84,7 @@
|
|||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [];
|
swapDevices = [ ];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|||||||
@@ -3,34 +3,48 @@
|
|||||||
nix-xilinx,
|
nix-xilinx,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
environment.systemPackages = with pkgs;
|
{
|
||||||
|
environment.systemPackages =
|
||||||
|
with pkgs;
|
||||||
[
|
[
|
||||||
acpi
|
acpi
|
||||||
|
aria2
|
||||||
binutils
|
binutils
|
||||||
|
binwalk
|
||||||
bluez
|
bluez
|
||||||
bluez-tools
|
bluez-tools
|
||||||
btop
|
btop
|
||||||
|
busybox
|
||||||
curlHTTP3
|
curlHTTP3
|
||||||
dfu-util
|
dfu-util
|
||||||
dhcpcd
|
dhcpcd
|
||||||
direnv
|
direnv
|
||||||
dmidecode
|
dmidecode
|
||||||
dnsmasq
|
dnsmasq
|
||||||
|
dnsutils
|
||||||
dtach
|
dtach
|
||||||
|
ethtool
|
||||||
|
f2fs-tools
|
||||||
fd
|
fd
|
||||||
file
|
file
|
||||||
|
fio
|
||||||
fzf
|
fzf
|
||||||
fzy
|
fzy
|
||||||
git
|
git
|
||||||
|
adwaita-icon-theme
|
||||||
|
gnomeExtensions.appindicator
|
||||||
gnupg
|
gnupg
|
||||||
gptfdisk
|
gptfdisk
|
||||||
hcxdumptool
|
hcxdumptool
|
||||||
hdparm
|
hdparm
|
||||||
htop-vim
|
htop-vim
|
||||||
interception-tools
|
interception-tools
|
||||||
|
iw
|
||||||
jq
|
jq
|
||||||
lm_sensors
|
lm_sensors
|
||||||
|
man-pages
|
||||||
|
man-pages-posix
|
||||||
meson
|
meson
|
||||||
mosh
|
mosh
|
||||||
msmtp
|
msmtp
|
||||||
@@ -43,6 +57,7 @@
|
|||||||
ntfs3g
|
ntfs3g
|
||||||
ntfsprogs
|
ntfsprogs
|
||||||
nvim
|
nvim
|
||||||
|
nvme-cli
|
||||||
openhantek6022
|
openhantek6022
|
||||||
optipng
|
optipng
|
||||||
pax-utils
|
pax-utils
|
||||||
@@ -76,8 +91,15 @@
|
|||||||
wirelesstools
|
wirelesstools
|
||||||
wol
|
wol
|
||||||
xdg-utils
|
xdg-utils
|
||||||
|
xfsprogs
|
||||||
zip
|
zip
|
||||||
z-lua
|
z-lua
|
||||||
]
|
]
|
||||||
++ (with nix-xilinx.packages.${system}; [vivado vitis vitis_hls model_composer xilinx-shell]);
|
++ (with nix-xilinx.packages.${system}; [
|
||||||
|
vivado
|
||||||
|
vitis
|
||||||
|
vitis_hls
|
||||||
|
model_composer
|
||||||
|
xilinx-shell
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
wg_preshared:
|
wg_preshared:
|
||||||
nixy: ENC[AES256_GCM,data:kP+Vt48NMpdBSGjpWzzxt+nqxPNXrofV4kLwgU4o62riB9rxU1CZ4Ddr17k=,iv:xCqR/rbGrJYBkxOpsAg1qxxEGXRD+577JGTNDqshcOQ=,tag:9rAdg6Zw6kVzLxwF1U+pNg==,type:str]
|
nixy: ENC[AES256_GCM,data:kP+Vt48NMpdBSGjpWzzxt+nqxPNXrofV4kLwgU4o62riB9rxU1CZ4Ddr17k=,iv:xCqR/rbGrJYBkxOpsAg1qxxEGXRD+577JGTNDqshcOQ=,tag:9rAdg6Zw6kVzLxwF1U+pNg==,type:str]
|
||||||
mediabox: ENC[AES256_GCM,data:BL9vCUE6wWtmTNPMCvJNZjiAMUWRmLLHOk73v1Z8EOJWcsZ5G3U+08TxBBg=,iv:XTZnF2kMVurTD+TPL0T7uDDu1gGjOdO7AWHXsZS5yO8=,tag:6RIAsbe0Ue4MX28VxzbPCg==,type:str]
|
mediabox: ENC[AES256_GCM,data:BL9vCUE6wWtmTNPMCvJNZjiAMUWRmLLHOk73v1Z8EOJWcsZ5G3U+08TxBBg=,iv:XTZnF2kMVurTD+TPL0T7uDDu1gGjOdO7AWHXsZS5yO8=,tag:6RIAsbe0Ue4MX28VxzbPCg==,type:str]
|
||||||
|
workstation: ENC[AES256_GCM,data:x60PMdgihMjtvQagphdO0uft7LLU2grdgeTrO5oSRiqOtb23P5S5SxDQ3Js=,iv:CB8QldIZ8/FjbcAkLxekygUo5luHig7FnH7wyrgZEuk=,tag:E3XWxPH5/fHyFmGimQ4tLg==,type:str]
|
||||||
sops:
|
sops:
|
||||||
kms: []
|
kms: []
|
||||||
gcp_kms: []
|
gcp_kms: []
|
||||||
@@ -34,8 +35,8 @@ sops:
|
|||||||
eDhXVWo2UHVCaFUrak9aVEU5N0FxRVEKDKBpbHWwTkW3BFAXQ213/glZyTz88OjZ
|
eDhXVWo2UHVCaFUrak9aVEU5N0FxRVEKDKBpbHWwTkW3BFAXQ213/glZyTz88OjZ
|
||||||
JHh0phDzFZG0+nzBz3TAi0ZyYnlbOYAuEvQh1uUg9MI1XUCr8GC9Qw==
|
JHh0phDzFZG0+nzBz3TAi0ZyYnlbOYAuEvQh1uUg9MI1XUCr8GC9Qw==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2024-04-20T18:39:51Z"
|
lastmodified: "2024-04-22T16:06:34Z"
|
||||||
mac: ENC[AES256_GCM,data:VyhkViFZAHM22OxlqzFPRvgJvK/54GhcVS9U3B8HYrZnShxLO5VC2HOVDIvheDflewOv8Wt5wA+kloDv9y/L45Wa/lUPvOser0ruvEYcJBmNiPpxKNoR+/MOIHeUuSMpzBoiCob1LY4qkM8nU4xDU6N1GkPGxbg67UkHcpAfV/U=,iv:P2Xup7rQZibEaGGLpaVsyRPTp4WiJxwO6SuJ7H7eaTc=,tag:y1iTx4PMuTAVvZU72RipIg==,type:str]
|
mac: ENC[AES256_GCM,data:BRgF+L22FuN/v+Vi57JLaTxtAe4Gr8UtY4QIYRUeigpHCkxza+pUd5qyGTIsHeaRFWNy726u9+PlX3uy0MlOt9lzQ1Zlmc+hDthUIHRWX9mqO+j5+klmDvVug5yqr2f7HMtBD+tnEwDr65FuPNKqJjmg1Tbk0RD12yt/gkEAy7w=,iv:aTWVlHEQGNgnIIoJ2IpnppU6lo7g0kI7gxtPM1ZqXvM=,tag:PhZypRZAlmxnKz1Kxtppzg==,type:str]
|
||||||
pgp: []
|
pgp: []
|
||||||
unencrypted_suffix: _unencrypted
|
unencrypted_suffix: _unencrypted
|
||||||
version: 3.8.1
|
version: 3.8.1
|
||||||
|
|||||||
@@ -4,9 +4,11 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib;
|
||||||
|
let
|
||||||
cfg = config.services.batteryNotifier;
|
cfg = config.services.batteryNotifier;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
services.batteryNotifier = {
|
services.batteryNotifier = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
@@ -42,7 +44,7 @@ in {
|
|||||||
timerConfig.OnBootSec = "1m";
|
timerConfig.OnBootSec = "1m";
|
||||||
timerConfig.OnUnitInactiveSec = "1m";
|
timerConfig.OnUnitInactiveSec = "1m";
|
||||||
timerConfig.Unit = "lowbatt.service";
|
timerConfig.Unit = "lowbatt.service";
|
||||||
wantedBy = ["timers.target"];
|
wantedBy = [ "timers.target" ];
|
||||||
};
|
};
|
||||||
systemd.user.services."lowbatt" = {
|
systemd.user.services."lowbatt" = {
|
||||||
description = "battery level notifier";
|
description = "battery level notifier";
|
||||||
|
|||||||
1
common/wg_pubkey_proton
Normal file
1
common/wg_pubkey_proton
Normal file
@@ -0,0 +1 @@
|
|||||||
|
g6DkXWKI/68RsLjROIwCEcyB/ZhyK5Q7OWcz1TtqER0=
|
||||||
1
common/wg_pubkey_workstation
Normal file
1
common/wg_pubkey_workstation
Normal file
@@ -0,0 +1 @@
|
|||||||
|
kbmzzQc3bBpkjE7K/ohycZtx+ml+dzVYOQ2xM0/bzzQ=
|
||||||
247
flake.lock
generated
247
flake.lock
generated
@@ -19,11 +19,11 @@
|
|||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1732722421,
|
||||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
"narHash": "sha256-HRJ/18p+WoXpWJkcdsk9St5ZiukCqSDgbOGFa8Okehg=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
"rev": "9ed2ac151eada2306ca8c418ebd97807bb08f6ac",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -33,22 +33,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_2": {
|
"flake-compat_2": {
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696426674,
|
|
||||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat_3": {
|
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673956053,
|
"lastModified": 1673956053,
|
||||||
@@ -64,7 +48,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_4": {
|
"flake-compat_3": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1696426674,
|
||||||
@@ -80,39 +64,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1701473968,
|
|
||||||
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-root": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1692742795,
|
|
||||||
"narHash": "sha256-f+Y0YhVCIJ06LemO+3Xx00lIcqQxSKJHXT/yk1RTKxw=",
|
|
||||||
"owner": "srid",
|
|
||||||
"repo": "flake-root",
|
|
||||||
"rev": "d9a70d9c7a5fd7f3258ccf48da9335e9b47c3937",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "srid",
|
|
||||||
"repo": "flake-root",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
@@ -131,30 +82,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"goatcounter": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": "flake-compat",
|
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"flake-root": "flake-root",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"treefmt-nix": "treefmt-nix"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1705880453,
|
|
||||||
"narHash": "sha256-Y1O6tia2Pc1MA5ZoFH3B2y7FwjZuIDiNT4C9+bBawrY=",
|
|
||||||
"owner": "asmir-abdulahovic",
|
|
||||||
"repo": "goatcounter-flake",
|
|
||||||
"rev": "f912ab7024cbc47d5fa80a416b643707a9b50b06",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "asmir-abdulahovic",
|
|
||||||
"repo": "goatcounter-flake",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -162,32 +89,33 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711868868,
|
"lastModified": 1736373539,
|
||||||
"narHash": "sha256-QpZanlbVu6Gb2K96u3vgu0F2BvZD74+fOsIFWcYEXoY=",
|
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "30f2ec39519f4f5a8a96af808c439e730c15aeab",
|
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
|
"ref": "release-24.11",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-xilinx": {
|
"nix-xilinx": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1699035130,
|
"lastModified": 1732892167,
|
||||||
"narHash": "sha256-emK4aJCC2gW94b2P3N2LjkQ6PEMLUcDduVWwYQ7aq+o=",
|
"narHash": "sha256-AZ0rgM9xj+Bf2C8RfGMUvuVdcqkvQU5/Wm8u6A5xYJg=",
|
||||||
"owner": "asmir.abdulahovic",
|
"owner": "asmir.abdulahovic",
|
||||||
"repo": "nix-xilinx",
|
"repo": "nix-xilinx",
|
||||||
"rev": "0323990db46c32e361e4fd70600d859eb90862af",
|
"rev": "3071f40914fe2db3837a40a72a97af6f0a442f16",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -198,52 +126,33 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711703276,
|
"lastModified": 1738574474,
|
||||||
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
|
"narHash": "sha256-rvyfF49e/k6vkrRTV4ILrWd92W+nmBDfRYZgctOyolQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
|
"rev": "fecfeb86328381268e29e998ddd3ebc70bbd7f7c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-24.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-24_11": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "lib",
|
"lastModified": 1734083684,
|
||||||
"lastModified": 1701253981,
|
"narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=",
|
||||||
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
|
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
|
"rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"dir": "lib",
|
"id": "nixpkgs",
|
||||||
"owner": "NixOS",
|
"ref": "nixos-24.11",
|
||||||
"ref": "nixos-unstable",
|
"type": "indirect"
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1711819797,
|
|
||||||
"narHash": "sha256-tNeB6emxj74Y6ctwmsjtMlzUMn458sBmwnD35U5KIM4=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "2b4e3ca0091049c6fbb4908c66b05b77eaef9f0c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "release-23.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nvim": {
|
"nvim": {
|
||||||
@@ -253,11 +162,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712935714,
|
"lastModified": 1736528609,
|
||||||
"narHash": "sha256-zGo9wiDH+qn4Mky70CJEvST1gGgMM/VMajAjsgNdOqk=",
|
"narHash": "sha256-p0tYmTVnnFghamXEXD4w/lldCi604zIWDV4Ol9ubQ5g=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "ba6b926cc4f6d65015271ebe7edd22269af77840",
|
"rev": "8245a48cc75cc74dea1b3ca89cb58f24f8e14f85",
|
||||||
"revCount": 31,
|
"revCount": 42,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.project-cloud.net/asmir/nvim_flake"
|
"url": "https://git.project-cloud.net/asmir/nvim_flake"
|
||||||
},
|
},
|
||||||
@@ -268,7 +177,7 @@
|
|||||||
},
|
},
|
||||||
"peerix": {
|
"peerix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_3",
|
"flake-compat": "flake-compat_2",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
@@ -297,11 +206,11 @@
|
|||||||
"theme_deepthought": "theme_deepthought"
|
"theme_deepthought": "theme_deepthought"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705870326,
|
"lastModified": 1729077289,
|
||||||
"narHash": "sha256-ojdGSeqztnnGMyLKjnSCGq0muGh3U+Zb9iwzaaDsaF4=",
|
"narHash": "sha256-z5LEPxOJq2LjhPhY4QE1IOt0lBD39cipR6Lw8vRTNlI=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "ad6af66a6142279789db8967b285eb04c6d18c02",
|
"rev": "eab712e42139d33911ba767c2ff1bfbdf05c254d",
|
||||||
"revCount": 26,
|
"revCount": 27,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.project-cloud.net/asmir/project-cloud"
|
"url": "https://git.project-cloud.net/asmir/project-cloud"
|
||||||
},
|
},
|
||||||
@@ -312,7 +221,6 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"goatcounter": "goatcounter",
|
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nix-xilinx": "nix-xilinx",
|
"nix-xilinx": "nix-xilinx",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
@@ -328,18 +236,18 @@
|
|||||||
"simple-nixos-mailserver": {
|
"simple-nixos-mailserver": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"blobs": "blobs",
|
"blobs": "blobs",
|
||||||
"flake-compat": "flake-compat_4",
|
"flake-compat": "flake-compat_3",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"utils": "utils"
|
"nixpkgs-24_11": "nixpkgs-24_11"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710449465,
|
"lastModified": 1737736848,
|
||||||
"narHash": "sha256-2orO8nfplp6uQJBFqKkj1iyNMC6TysmwbWwbb4osTag=",
|
"narHash": "sha256-VrUfCXBXYV+YmQ2OvVTeML9EnmaPRtH+POrNIcJp6yo=",
|
||||||
"owner": "simple-nixos-mailserver",
|
"owner": "simple-nixos-mailserver",
|
||||||
"repo": "nixos-mailserver",
|
"repo": "nixos-mailserver",
|
||||||
"rev": "79c8cfcd5873a85559da6201b116fb38b490d030",
|
"rev": "6b425d13f5a9d73cb63973d3609acacef4d1e261",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -352,15 +260,14 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
]
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711855048,
|
"lastModified": 1738291974,
|
||||||
"narHash": "sha256-HxegAPnQJSC4cbEbF4Iq3YTlFHZKLiNTk8147EbLdGg=",
|
"narHash": "sha256-wkwYJc8cKmmQWUloyS9KwttBnja2ONRuJQDEsmef320=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "99b1e37f9fc0960d064a7862eb7adfb92e64fa10",
|
"rev": "4c1251904d8a08c86ac6bc0d72cc09975e89aef7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -404,21 +311,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"theme_anemone": {
|
"theme_anemone": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -451,45 +343,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"treefmt-nix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"goatcounter",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1702461037,
|
|
||||||
"narHash": "sha256-ssyGxfGHRuuLHuMex+vV6RMOt7nAo07nwufg9L5GkLg=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "treefmt-nix",
|
|
||||||
"rev": "d06b70e5163a903f19009c3f97770014787a080f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "treefmt-nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1709126324,
|
|
||||||
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"zremap": {
|
"zremap": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -497,17 +350,17 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696448728,
|
"lastModified": 1737802495,
|
||||||
"narHash": "sha256-kUc6983IX9n0eQxTFZRK7LYCLHoxoGZ5rOV7nu8hGRI=",
|
"narHash": "sha256-Q+bZnH7uQM5T/G+xCGSRU3bTJqD70NeE4vLXLXLCm7k=",
|
||||||
"owner": "asmir.abdulahovic",
|
"ref": "refs/heads/master",
|
||||||
"repo": "zremap",
|
"rev": "4962f12867b0b6c4c4d39b98e6016e7f925a802c",
|
||||||
"rev": "9043844893cfc333ed04d04c1d3b67d9904c0afc",
|
"revCount": 23,
|
||||||
"type": "gitlab"
|
"type": "git",
|
||||||
|
"url": "https://git.project-cloud.net/asmir/zremap"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "asmir.abdulahovic",
|
"type": "git",
|
||||||
"repo": "zremap",
|
"url": "https://git.project-cloud.net/asmir/zremap"
|
||||||
"type": "gitlab"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
260
flake.nix
260
flake.nix
@@ -2,7 +2,7 @@
|
|||||||
description = "NixOS configuration";
|
description = "NixOS configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||||
|
|
||||||
nix-xilinx = {
|
nix-xilinx = {
|
||||||
url = "gitlab:asmir.abdulahovic/nix-xilinx";
|
url = "gitlab:asmir.abdulahovic/nix-xilinx";
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
zremap = {
|
zremap = {
|
||||||
url = "gitlab:asmir.abdulahovic/zremap";
|
url = "git+https://git.project-cloud.net/asmir/zremap";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -34,13 +34,8 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
goatcounter = {
|
|
||||||
url = "github:asmir-abdulahovic/goatcounter-flake";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager/release-24.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -55,131 +50,138 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {
|
outputs =
|
||||||
goatcounter,
|
inputs@{
|
||||||
home-manager,
|
home-manager,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nix-xilinx,
|
nix-xilinx,
|
||||||
nvim,
|
nvim,
|
||||||
peerix,
|
peerix,
|
||||||
project-cloud,
|
project-cloud,
|
||||||
simple-nixos-mailserver,
|
simple-nixos-mailserver,
|
||||||
sops-nix,
|
sops-nix,
|
||||||
swaysw,
|
swaysw,
|
||||||
zremap,
|
zremap,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
|
let
|
||||||
in {
|
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
|
||||||
nixosConfigurations = rec {
|
in
|
||||||
nixy = nixpkgs.lib.nixosSystem rec {
|
{
|
||||||
system = "x86_64-linux";
|
nixosConfigurations = rec {
|
||||||
modules = [
|
nixy = nixpkgs.lib.nixosSystem rec {
|
||||||
{_module.args = inputs;}
|
system = "x86_64-linux";
|
||||||
{_module.args.system = system;}
|
modules = [
|
||||||
{nix.registry.nixpkgs.flake = nixpkgs;}
|
{ _module.args = inputs; }
|
||||||
./common/packages.nix
|
{ _module.args.system = system; }
|
||||||
./common/suspend.nix
|
{ nix.registry.nixpkgs.flake = nixpkgs; }
|
||||||
./nixy/configuration.nix
|
./common/packages.nix
|
||||||
./nixy/hardware-configuration.nix
|
./common/suspend.nix
|
||||||
sops-nix.nixosModules.sops
|
./nixy/configuration.nix
|
||||||
home-manager.nixosModules.home-manager
|
./nixy/hardware-configuration.nix
|
||||||
{
|
sops-nix.nixosModules.sops
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.nixosModules.home-manager
|
||||||
home-manager.useUserPackages = true;
|
{
|
||||||
home-manager.users.akill = import ./home/home.nix;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.extraSpecialArgs = {inherit inputs system;};
|
home-manager.useUserPackages = true;
|
||||||
}
|
home-manager.users.akill = import ./home/home.nix;
|
||||||
peerix.nixosModules.peerix
|
home-manager.extraSpecialArgs = { inherit inputs system; };
|
||||||
{
|
home-manager.backupFileExtension = "home_backup";
|
||||||
services.peerix = {
|
}
|
||||||
enable = true;
|
peerix.nixosModules.peerix
|
||||||
globalCacheTTL = 10;
|
{
|
||||||
package = peerix.packages.x86_64-linux.peerix;
|
services.peerix = {
|
||||||
openFirewall = true; # UDP/12304
|
enable = true;
|
||||||
privateKeyFile = nixy.config.sops.secrets."peerix/private".path;
|
globalCacheTTL = 10;
|
||||||
publicKeyFile = ./nixy/peerix-public;
|
package = peerix.packages.x86_64-linux.peerix;
|
||||||
publicKey = "peerix-mediabox:UDgG3xdQYv7bmx2l4ZPNRPJtp2zMmY++H/fnGeJ9BQw=";
|
openFirewall = true; # UDP/12304
|
||||||
};
|
privateKeyFile = nixy.config.sops.secrets."peerix/private".path;
|
||||||
}
|
publicKeyFile = ./nixy/peerix-public;
|
||||||
];
|
publicKey = "peerix-mediabox:UDgG3xdQYv7bmx2l4ZPNRPJtp2zMmY++H/fnGeJ9BQw=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
mediabox = nixpkgs.lib.nixosSystem rec {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
{ _module.args = inputs; }
|
||||||
|
{ _module.args.system = system; }
|
||||||
|
{ nix.registry.nixpkgs.flake = nixpkgs; }
|
||||||
|
./common/packages.nix
|
||||||
|
./common/suspend.nix
|
||||||
|
./mediabox/configuration.nix
|
||||||
|
./mediabox/hardware-configuration.nix
|
||||||
|
./modules/qbittorrent.nix
|
||||||
|
sops-nix.nixosModules.sops
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.akill = import ./home/home.nix;
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs system; };
|
||||||
|
}
|
||||||
|
peerix.nixosModules.peerix
|
||||||
|
{
|
||||||
|
services.peerix = {
|
||||||
|
enable = true;
|
||||||
|
globalCacheTTL = 10;
|
||||||
|
package = peerix.packages.x86_64-linux.peerix;
|
||||||
|
openFirewall = true; # UDP/12304
|
||||||
|
privateKeyFile = mediabox.config.sops.secrets."peerix/private".path;
|
||||||
|
publicKeyFile = ./mediabox/peerix-public;
|
||||||
|
publicKey = "peerix-nixy:8THqS0R2zWF/47ai0RFmqJnieYTZ1jaWOD9tnzpvA6s=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
blue = nixpkgs.lib.nixosSystem rec {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
{ _module.args = inputs; }
|
||||||
|
{ _module.args.system = system; }
|
||||||
|
{ nix.registry.nixpkgs.flake = nixpkgs; }
|
||||||
|
./blue/configuration.nix
|
||||||
|
./blue/hardware-configuration.nix
|
||||||
|
./common/packages.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.akill = import ./home/home.nix;
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs system; };
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
magpie = nixpkgs.lib.nixosSystem rec {
|
||||||
|
system = "aarch64-linux";
|
||||||
|
modules = [
|
||||||
|
{ _module.args = inputs; }
|
||||||
|
{ _module.args.system = system; }
|
||||||
|
{ nix.registry.nixpkgs.flake = nixpkgs; }
|
||||||
|
./magpie/configuration.nix
|
||||||
|
./magpie/hardware-configuration.nix
|
||||||
|
simple-nixos-mailserver.nixosModule
|
||||||
|
sops-nix.nixosModules.sops
|
||||||
|
(builtins.toPath "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
mediabox = nixpkgs.lib.nixosSystem rec {
|
devShell.x86_64-linux = pkgs.mkShell {
|
||||||
system = "x86_64-linux";
|
buildInputs = with pkgs; [
|
||||||
modules = [
|
sops
|
||||||
{_module.args = inputs;}
|
ssh-to-age
|
||||||
{_module.args.system = system;}
|
age
|
||||||
{nix.registry.nixpkgs.flake = nixpkgs;}
|
|
||||||
./common/packages.nix
|
|
||||||
./common/suspend.nix
|
|
||||||
./mediabox/configuration.nix
|
|
||||||
./mediabox/hardware-configuration.nix
|
|
||||||
./modules/qbittorrent.nix
|
|
||||||
sops-nix.nixosModules.sops
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.akill = import ./home/home.nix;
|
|
||||||
home-manager.extraSpecialArgs = {inherit inputs system;};
|
|
||||||
}
|
|
||||||
peerix.nixosModules.peerix
|
|
||||||
{
|
|
||||||
services.peerix = {
|
|
||||||
enable = true;
|
|
||||||
globalCacheTTL = 10;
|
|
||||||
package = peerix.packages.x86_64-linux.peerix;
|
|
||||||
openFirewall = true; # UDP/12304
|
|
||||||
privateKeyFile = mediabox.config.sops.secrets."peerix/private".path;
|
|
||||||
publicKeyFile = ./mediabox/peerix-public;
|
|
||||||
publicKey = "peerix-nixy:8THqS0R2zWF/47ai0RFmqJnieYTZ1jaWOD9tnzpvA6s=";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
shellHook = ''
|
||||||
|
echo "Configuring NixOS!"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
blue = nixpkgs.lib.nixosSystem rec {
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [
|
|
||||||
{_module.args = inputs;}
|
|
||||||
{_module.args.system = system;}
|
|
||||||
{nix.registry.nixpkgs.flake = nixpkgs;}
|
|
||||||
./blue/configuration.nix
|
|
||||||
./blue/hardware-configuration.nix
|
|
||||||
./common/packages.nix
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.akill = import ./home/home.nix;
|
|
||||||
home-manager.extraSpecialArgs = {inherit inputs system;};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
magpie = nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "aarch64-linux";
|
|
||||||
modules = [
|
|
||||||
{_module.args = inputs;}
|
|
||||||
{_module.args.system = system;}
|
|
||||||
{nix.registry.nixpkgs.flake = nixpkgs;}
|
|
||||||
./magpie/configuration.nix
|
|
||||||
./magpie/hardware-configuration.nix
|
|
||||||
goatcounter.nixosModules.goatcounter
|
|
||||||
simple-nixos-mailserver.nixosModule
|
|
||||||
sops-nix.nixosModules.sops
|
|
||||||
(builtins.toPath "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix")
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
devShell.x86_64-linux = pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [sops ssh-to-age age];
|
|
||||||
shellHook = ''
|
|
||||||
echo "Configuring NixOS!"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
160
home/home.nix
160
home/home.nix
@@ -1,13 +1,22 @@
|
|||||||
{
|
{
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" ''
|
qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" ''
|
||||||
firejail -- ${pkgs.qutebrowser}/bin/qutebrowser "$@"
|
firejail -- ${lib.getExe pkgs.qutebrowser} "$@"
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
imports = [./zsh.nix ./i3status-rust.nix ./sway.nix ./i3.nix ./home_packages.nix ./whatsapp-for-linux.nix];
|
{
|
||||||
|
imports = [
|
||||||
|
./zsh.nix
|
||||||
|
./i3status-rust.nix
|
||||||
|
./sway.nix
|
||||||
|
./i3.nix
|
||||||
|
./home_packages.nix
|
||||||
|
./whatsapp-for-linux.nix
|
||||||
|
];
|
||||||
|
|
||||||
home.stateVersion = "22.11";
|
home.stateVersion = "22.11";
|
||||||
home.username = "akill";
|
home.username = "akill";
|
||||||
@@ -18,6 +27,7 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
"application/pdf" = "sioyek.desktop";
|
"application/pdf" = "sioyek.desktop";
|
||||||
|
"default-web-browser" = "org.qutebrowser.qutebrowser.desktop";
|
||||||
"text/html" = "org.qutebrowser.qutebrowser.desktop";
|
"text/html" = "org.qutebrowser.qutebrowser.desktop";
|
||||||
"x-scheme-handler/about" = "org.qutebrowser.qutebrowser.desktop";
|
"x-scheme-handler/about" = "org.qutebrowser.qutebrowser.desktop";
|
||||||
"x-scheme-handler/http" = "org.qutebrowser.qutebrowser.desktop";
|
"x-scheme-handler/http" = "org.qutebrowser.qutebrowser.desktop";
|
||||||
@@ -29,17 +39,20 @@ in {
|
|||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
home.sessionVariables = rec {
|
home.sessionVariables = rec {
|
||||||
BROWSER = "${qutebrowser_firejail}/bin/qutebrowser";
|
BROWSER = lib.getExe qutebrowser_firejail;
|
||||||
DEFAULT_BROWSER = "${BROWSER}";
|
DEFAULT_BROWSER = "${BROWSER}";
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||||
MOZ_ENABLE_WAYLAND = "1";
|
MOZ_ENABLE_WAYLAND = "1";
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||||
SUDO_EDITOR = "nvim";
|
SUDO_EDITOR = "nvim";
|
||||||
WLR_RENDERER = "vulkan";
|
WLR_RENDERER = "vulkan";
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.sway = {enable = true;};
|
wayland.windowManager.sway = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
@@ -58,7 +71,11 @@ in {
|
|||||||
clock24 = true;
|
clock24 = true;
|
||||||
keyMode = "vi";
|
keyMode = "vi";
|
||||||
terminal = "screen-256color";
|
terminal = "screen-256color";
|
||||||
plugins = with pkgs.tmuxPlugins; [sysstat net-speed gruvbox];
|
plugins = with pkgs.tmuxPlugins; [
|
||||||
|
sysstat
|
||||||
|
net-speed
|
||||||
|
gruvbox
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mpv = {
|
mpv = {
|
||||||
@@ -135,7 +152,9 @@ in {
|
|||||||
font = "JetBrainsMono:size=10";
|
font = "JetBrainsMono:size=10";
|
||||||
dpi-aware = "yes";
|
dpi-aware = "yes";
|
||||||
};
|
};
|
||||||
mouse = {hide-when-typing = "yes";};
|
mouse = {
|
||||||
|
hide-when-typing = "yes";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -180,8 +199,13 @@ in {
|
|||||||
userName = "Asmir A";
|
userName = "Asmir A";
|
||||||
userEmail = "asmir.abdulahovic@gmail.com";
|
userEmail = "asmir.abdulahovic@gmail.com";
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
pull = {rebase = true;};
|
init.defaultBranch = "master";
|
||||||
credential = {helper = "store";};
|
pull = {
|
||||||
|
rebase = true;
|
||||||
|
};
|
||||||
|
credential = {
|
||||||
|
helper = "store";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
signing.key = "020C42B7A9ABA3E2";
|
signing.key = "020C42B7A9ABA3E2";
|
||||||
signing.signByDefault = true;
|
signing.signByDefault = true;
|
||||||
@@ -189,7 +213,14 @@ in {
|
|||||||
|
|
||||||
obs-studio = {
|
obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = with pkgs.obs-studio-plugins; [obs-vkcapture input-overlay obs-multi-rtmp obs-pipewire-audio-capture wlrobs obs-vaapi];
|
plugins = with pkgs.obs-studio-plugins; [
|
||||||
|
obs-vkcapture
|
||||||
|
input-overlay
|
||||||
|
obs-multi-rtmp
|
||||||
|
obs-pipewire-audio-capture
|
||||||
|
wlrobs
|
||||||
|
obs-vaapi
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
i3status-rust.enable = true;
|
i3status-rust.enable = true;
|
||||||
@@ -217,33 +248,70 @@ in {
|
|||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
swayidle = let
|
swayidle =
|
||||||
locker = pkgs.writeShellScriptBin "swaylock_fancy" ''
|
let
|
||||||
TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg)
|
locker = pkgs.writeShellScriptBin "swaylock_fancy" ''
|
||||||
${pkgs.grim}/bin/grim -t ppm - | ${pkgs.imagemagick}/bin/convert - -blur 0x12 "$TMP_FILE"
|
TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg)
|
||||||
${pkgs.swaylock}/bin/swaylock -f -i "$TMP_FILE"
|
${lib.getExe pkgs.grim} -t ppm - | ${pkgs.imagemagick}/bin/convert - -blur 0x12 "$TMP_FILE"
|
||||||
${pkgs.coreutils}/bin/rm "$TMP_FILE"
|
${lib.getExe pkgs.swaylock} -f -i "$TMP_FILE"
|
||||||
'';
|
${pkgs.coreutils}/bin/shred "$TMP_FILE"
|
||||||
in {
|
${pkgs.coreutils}/bin/rm "$TMP_FILE"
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
events = [
|
||||||
|
{
|
||||||
|
event = "before-sleep";
|
||||||
|
command = "${locker}/bin/swaylock_fancy";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
event = "lock";
|
||||||
|
command = "${locker}/bin/swaylock_fancy";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
event = "after-resume";
|
||||||
|
command = "${pkgs.procps}/bin/pkill -USR1 i3status-rs";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
timeouts = [
|
||||||
|
{
|
||||||
|
timeout = 15 * 60;
|
||||||
|
command = "${locker}/bin/swaylock_fancy";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
kanshi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
events = [
|
settings = [
|
||||||
{
|
{
|
||||||
event = "before-sleep";
|
profile.name = "undocked";
|
||||||
command = "${locker}/bin/swaylock_fancy";
|
profile.outputs = [
|
||||||
|
{
|
||||||
|
criteria = "eDP-1";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
event = "lock";
|
profile.name = "docked";
|
||||||
command = "${locker}/bin/swaylock_fancy";
|
profile.outputs = [
|
||||||
}
|
{
|
||||||
{
|
criteria = "eDP-1";
|
||||||
event = "after-resume";
|
position = "3840,0";
|
||||||
command = "${pkgs.procps}/bin/pkill -USR1 i3status-rs";
|
}
|
||||||
}
|
{
|
||||||
];
|
criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026536";
|
||||||
timeouts = [
|
mode = "1920x1080@74.973Hz";
|
||||||
{
|
position = "5760,0";
|
||||||
timeout = 15 * 60;
|
}
|
||||||
command = "${locker}/bin/swaylock_fancy";
|
{
|
||||||
|
criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026535";
|
||||||
|
mode = "1920x1080@74.973Hz";
|
||||||
|
position = "7680,0";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -251,19 +319,17 @@ in {
|
|||||||
|
|
||||||
systemd.user = {
|
systemd.user = {
|
||||||
services = {
|
services = {
|
||||||
/*
|
wayland-pipewire-idle-inhibit = {
|
||||||
himalaya = {
|
Unit.Description = "inhibit sleep while audio output is active";
|
||||||
Unit.Description = "Himalaya new messages notifier";
|
Service = {
|
||||||
Service = {
|
ExecStart = "${lib.getExe pkgs.wayland-pipewire-idle-inhibit}";
|
||||||
ExecStart = "himalaya notify";
|
Restart = "always";
|
||||||
Restart = "always";
|
RestartSec = 10;
|
||||||
RestartSec = 10;
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
Install = {
|
|
||||||
WantedBy = [ "multi-user.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,22 @@
|
|||||||
{
|
{
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
chromium_teams = pkgs.writeShellScriptBin "chromium_teams" ''
|
chromium_teams = pkgs.writeShellScriptBin "chromium_teams" ''
|
||||||
${pkgs.chromium}/bin/chromium --socket=wayland org.chromium.Chromium --app=https://teams.microsoft.com/
|
${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://teams.microsoft.com/
|
||||||
'';
|
'';
|
||||||
chromium_discord = pkgs.writeShellScriptBin "chromium_discord" ''
|
chromium_discord = pkgs.writeShellScriptBin "chromium_discord" ''
|
||||||
${pkgs.chromium}/bin/chromium --socket=wayland org.chromium.Chromium --app=https://discordapp.com/channels/@me
|
${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://discordapp.com/channels/@me
|
||||||
|
'';
|
||||||
|
chromium_stackfield = pkgs.writeShellScriptBin "chromium_stackfield" ''
|
||||||
|
${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://stackfield.com/
|
||||||
|
'';
|
||||||
|
qcad = pkgs.writeShellScriptBin "qcad" ''
|
||||||
|
QT_QPA_PLATFORM=xcb ${lib.getExe pkgs.qcad} $@
|
||||||
'';
|
'';
|
||||||
ssh_proxy = pkgs.writeShellScriptBin "ssh_proxy" ''
|
ssh_proxy = pkgs.writeShellScriptBin "ssh_proxy" ''
|
||||||
if ${pkgs.coreutils}/bin/test $# -ne 1; then
|
if ${pkgs.coreutils}/bin/test $# -ne 1; then
|
||||||
@@ -16,11 +24,12 @@
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
PROXY_PORT="1337"
|
PROXY_PORT="1337"
|
||||||
${pkgs.openssh}/bin/ssh -D "$PROXY_PORT" -q -N "$@"
|
${lib.getExe pkgs.openssh} -D "$PROXY_PORT" -q -N "$@"
|
||||||
'';
|
'';
|
||||||
wrap_sh = let
|
wrap_sh =
|
||||||
bubblewrap = pkgs.callPackage ../packages/bubblewrap/default.nix {};
|
let
|
||||||
in
|
bubblewrap = pkgs.callPackage ../packages/bubblewrap/default.nix { };
|
||||||
|
in
|
||||||
pkgs.writeShellScriptBin "wrap.sh" ''
|
pkgs.writeShellScriptBin "wrap.sh" ''
|
||||||
if ${pkgs.coreutils-full}/bin/test $# -ne 1; then
|
if ${pkgs.coreutils-full}/bin/test $# -ne 1; then
|
||||||
echo "Usage: $0 <directory>"
|
echo "Usage: $0 <directory>"
|
||||||
@@ -34,8 +43,10 @@
|
|||||||
--tmp-overlay "$FULL_PATH" \
|
--tmp-overlay "$FULL_PATH" \
|
||||||
"$SHELL"
|
"$SHELL"
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
home.packages = with pkgs;
|
{
|
||||||
|
home.packages =
|
||||||
|
with pkgs;
|
||||||
[
|
[
|
||||||
anydesk
|
anydesk
|
||||||
appimage-run
|
appimage-run
|
||||||
@@ -47,13 +58,16 @@ in {
|
|||||||
cached-nix-shell
|
cached-nix-shell
|
||||||
caddy
|
caddy
|
||||||
cargo
|
cargo
|
||||||
chromium
|
ungoogled-chromium
|
||||||
cmake
|
cmake
|
||||||
compsize
|
compsize
|
||||||
cura
|
# cura
|
||||||
deluge
|
deluge
|
||||||
|
dfu-util
|
||||||
discord
|
discord
|
||||||
dmenu-wayland
|
dmenu-wayland
|
||||||
|
drawio
|
||||||
|
dualsensectl
|
||||||
ffmpeg-full
|
ffmpeg-full
|
||||||
firefox
|
firefox
|
||||||
freecad
|
freecad
|
||||||
@@ -65,7 +79,9 @@ in {
|
|||||||
gnumake
|
gnumake
|
||||||
go
|
go
|
||||||
grim
|
grim
|
||||||
|
heimdall
|
||||||
hyperfine
|
hyperfine
|
||||||
|
icestorm
|
||||||
imagemagick
|
imagemagick
|
||||||
imv
|
imv
|
||||||
inkscape
|
inkscape
|
||||||
@@ -75,44 +91,61 @@ in {
|
|||||||
kodi-wayland
|
kodi-wayland
|
||||||
krita
|
krita
|
||||||
libnotify
|
libnotify
|
||||||
libreoffice
|
libreoffice-qt6-fresh
|
||||||
libva-utils
|
libva-utils
|
||||||
|
linuxPackages_latest.perf
|
||||||
|
lsix
|
||||||
|
lsix
|
||||||
mediainfo
|
mediainfo
|
||||||
ncdu
|
ncdu
|
||||||
neovide
|
neovide
|
||||||
|
nextpnr
|
||||||
ngspice
|
ngspice
|
||||||
nix-init
|
nix-init
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
nix-prefetch-git
|
nix-prefetch-git
|
||||||
nodePackages.peerflix
|
nodePackages.peerflix
|
||||||
|
nom
|
||||||
|
openems
|
||||||
openocd
|
openocd
|
||||||
openscad
|
openscad
|
||||||
pandoc
|
pandoc
|
||||||
|
paraview
|
||||||
pass-wayland
|
pass-wayland
|
||||||
patchelf
|
patchelf
|
||||||
pavucontrol
|
pavucontrol
|
||||||
|
pay-respects
|
||||||
pirate-get
|
pirate-get
|
||||||
poppler_utils
|
poppler_utils
|
||||||
powertop
|
powertop
|
||||||
pulsemixer
|
pulsemixer
|
||||||
|
pwvucontrol
|
||||||
python3
|
python3
|
||||||
python3Packages.west
|
python3Packages.west
|
||||||
remmina
|
remmina
|
||||||
river
|
river
|
||||||
|
rizin
|
||||||
rtorrent
|
rtorrent
|
||||||
|
sbcl
|
||||||
screen
|
screen
|
||||||
seer
|
seer
|
||||||
sioyek
|
sioyek
|
||||||
skypeforlinux
|
skypeforlinux
|
||||||
slurp
|
slurp
|
||||||
|
steam-run
|
||||||
stm32cubemx
|
stm32cubemx
|
||||||
|
swayimg
|
||||||
tea
|
tea
|
||||||
teams-for-linux
|
teams-for-linux
|
||||||
|
tectonic
|
||||||
|
tessen
|
||||||
texlive.combined.scheme-full
|
texlive.combined.scheme-full
|
||||||
thunderbird
|
thunderbird
|
||||||
|
typst
|
||||||
upx
|
upx
|
||||||
waybar
|
waybar
|
||||||
wdisplays
|
wdisplays
|
||||||
|
weechat
|
||||||
whatsapp-for-linux
|
whatsapp-for-linux
|
||||||
wine
|
wine
|
||||||
wireshark
|
wireshark
|
||||||
@@ -121,21 +154,24 @@ in {
|
|||||||
wofi
|
wofi
|
||||||
x2goclient
|
x2goclient
|
||||||
yewtube
|
yewtube
|
||||||
|
yosys
|
||||||
yt-dlp
|
yt-dlp
|
||||||
zapzap
|
zapzap
|
||||||
zathura
|
zathura
|
||||||
zeal-qt6
|
# zeal-qt6
|
||||||
zig
|
zig
|
||||||
]
|
]
|
||||||
++ [
|
++ [
|
||||||
chromium_discord
|
chromium_discord
|
||||||
|
chromium_stackfield
|
||||||
chromium_teams
|
chromium_teams
|
||||||
ssh_proxy
|
ssh_proxy
|
||||||
wrap_sh
|
wrap_sh
|
||||||
|
qcad
|
||||||
]
|
]
|
||||||
++ [
|
++ [
|
||||||
inputs.swaysw.packages.${system}.swaysw
|
inputs.swaysw.packages.${system}.swaysw
|
||||||
(pkgs.callPackage ../packages/viber/default.nix {})
|
(pkgs.callPackage ../packages/viber/default.nix { })
|
||||||
(pkgs.callPackage ../packages/bubblewrap/default.nix {})
|
(pkgs.callPackage ../packages/bubblewrap/default.nix { })
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
34
home/i3.nix
34
home/i3.nix
@@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
scratchpad_cmd = "floating enable, resize set 1502 845, move position center, move scratchpad, scratchpad show";
|
scratchpad_cmd = "floating enable, resize set 1502 845, move position center, move scratchpad, scratchpad show";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
xsession.windowManager.i3 = {
|
xsession.windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.i3;
|
package = pkgs.i3;
|
||||||
@@ -54,24 +55,28 @@ in {
|
|||||||
"${modifier}+Escape" = "workspace back_and_forth";
|
"${modifier}+Escape" = "workspace back_and_forth";
|
||||||
"${modifier}+p" = "exec ${pkgs.dmenu}/bin/dmenu_run";
|
"${modifier}+p" = "exec ${pkgs.dmenu}/bin/dmenu_run";
|
||||||
|
|
||||||
"Mod4+l" = "exec i3-msg [instance=\"python3_scr\"] scratchpad show || exec alacritty --class python3_scr -e python3";
|
"Mod4+l" =
|
||||||
|
"exec i3-msg [instance=\"python3_scr\"] scratchpad show || exec alacritty --class python3_scr -e python3";
|
||||||
"Mod4+j" = "exec i3-msg [class=\"ViberPC\"] scratchpad show || exec viber";
|
"Mod4+j" = "exec i3-msg [class=\"ViberPC\"] scratchpad show || exec viber";
|
||||||
"Mod4+m" = "exec i3-msg [class=\"Thunderbird\"] scratchpad show || exec thunderbird";
|
"Mod4+m" = "exec i3-msg [class=\"Thunderbird\"] scratchpad show || exec thunderbird";
|
||||||
"Mod4+y" = "exec i3-msg [instance=\"pulsemixer_scr\"] scratchpad show || exec alacritty --class pulsemixer_scr -e pulsemixer";
|
"Mod4+y" =
|
||||||
|
"exec i3-msg [instance=\"pulsemixer_scr\"] scratchpad show || exec alacritty --class pulsemixer_scr -e pulsemixer";
|
||||||
};
|
};
|
||||||
|
|
||||||
window = {
|
window = {
|
||||||
/*
|
# border = 4;
|
||||||
border = 4;
|
|
||||||
*/
|
|
||||||
commands = [
|
commands = [
|
||||||
{
|
{
|
||||||
command = scratchpad_cmd;
|
command = scratchpad_cmd;
|
||||||
criteria = {instance = "pulsemixer_scr|python3_scr";};
|
criteria = {
|
||||||
|
instance = "pulsemixer_scr|python3_scr";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = scratchpad_cmd;
|
command = scratchpad_cmd;
|
||||||
criteria = {class = "Thunderbird";};
|
criteria = {
|
||||||
|
class = "Thunderbird";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = scratchpad_cmd;
|
command = scratchpad_cmd;
|
||||||
@@ -82,7 +87,9 @@ in {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = "focus child, layout tabbed, focus";
|
command = "focus child, layout tabbed, focus";
|
||||||
criteria = {class = "qutebrowser";};
|
criteria = {
|
||||||
|
class = "qutebrowser";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -91,7 +98,10 @@ in {
|
|||||||
{
|
{
|
||||||
position = "top";
|
position = "top";
|
||||||
fonts = {
|
fonts = {
|
||||||
names = ["DejaVu Sans Mono" "FontAwesome5Free"];
|
names = [
|
||||||
|
"DejaVu Sans Mono"
|
||||||
|
"FontAwesome5Free"
|
||||||
|
];
|
||||||
style = "Fixed Bold SemiCondensed";
|
style = "Fixed Bold SemiCondensed";
|
||||||
size = 7.0;
|
size = 7.0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.i3status-rust = {
|
programs.i3status-rust = {
|
||||||
bars.top = {
|
bars.top = {
|
||||||
icons = "awesome5";
|
icons = "awesome5";
|
||||||
@@ -18,7 +19,15 @@
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
block = "disk_space";
|
block = "disk_space";
|
||||||
path = "/";
|
path = "/nix";
|
||||||
|
info_type = "available";
|
||||||
|
interval = 20;
|
||||||
|
warning = 20.0;
|
||||||
|
alert = 10.0;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "disk_space";
|
||||||
|
path = "/home";
|
||||||
info_type = "available";
|
info_type = "available";
|
||||||
interval = 20;
|
interval = 20;
|
||||||
warning = 20.0;
|
warning = 20.0;
|
||||||
@@ -34,6 +43,11 @@
|
|||||||
device = "enp5s0";
|
device = "enp5s0";
|
||||||
interval = 2;
|
interval = 2;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
block = "net";
|
||||||
|
device = "enp7s0f3u1u1";
|
||||||
|
interval = 2;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
block = "net";
|
block = "net";
|
||||||
device = "eno1";
|
device = "eno1";
|
||||||
|
|||||||
@@ -1,31 +1,34 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
system,
|
system,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" ''
|
cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" ''
|
||||||
${pkgs.cliphist}/bin/cliphist list | \
|
${lib.getExe pkgs.cliphist} list | \
|
||||||
${pkgs.wofi}/bin/wofi --dmenu --insensitive | \
|
${lib.getExe pkgs.wofi} --dmenu --insensitive | \
|
||||||
${pkgs.cliphist}/bin/cliphist decode | \
|
${lib.getExe pkgs.cliphist} decode | \
|
||||||
${pkgs.wl-clipboard}/bin/wl-copy
|
${pkgs.wl-clipboard}/bin/wl-copy
|
||||||
'';
|
'';
|
||||||
screenshot_clip = pkgs.writeShellScriptBin "screenshot_clip" ''
|
screenshot_clip = pkgs.writeShellScriptBin "screenshot_clip" ''
|
||||||
GEOM="$(${pkgs.slurp}/bin/slurp -d)"
|
GEOM="$(${lib.getExe pkgs.slurp} -d)"
|
||||||
${pkgs.grim}/bin/grim -g "$GEOM" - | ${pkgs.wl-clipboard}/bin/wl-copy
|
${lib.getExe pkgs.grim} -g "$GEOM" - | ${pkgs.wl-clipboard}/bin/wl-copy
|
||||||
'';
|
'';
|
||||||
swaysw = inputs.swaysw.packages.${system}.swaysw;
|
swaysw = inputs.swaysw.packages.${system}.swaysw;
|
||||||
viber = pkgs.callPackage ../packages/viber/default.nix {};
|
viber = pkgs.callPackage ../packages/viber/default.nix { };
|
||||||
term = "${pkgs.foot}/bin/footclient";
|
term = "${pkgs.foot}/bin/footclient";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraSessionCommands = "";
|
extraSessionCommands = "";
|
||||||
|
extraConfigEarly = '''';
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
fonts = {
|
fonts = {
|
||||||
names = ["JetBrainsMono"];
|
names = [ "JetBrainsMono" ];
|
||||||
style = "Bold Semi-Condensed";
|
style = "Bold Semi-Condensed";
|
||||||
size = 11.0;
|
size = 11.0;
|
||||||
};
|
};
|
||||||
@@ -33,24 +36,30 @@ in {
|
|||||||
window.commands = [
|
window.commands = [
|
||||||
{
|
{
|
||||||
command = "move scratchpad, resize set 1152 648";
|
command = "move scratchpad, resize set 1152 648";
|
||||||
criteria = {app_id = "pulsemixer|python3|com.rtosta.zapzap|whatsapp-for-linux|com.viber";};
|
criteria = {
|
||||||
|
app_id = "pulsemixer|python3|com.rtosta.zapzap|whatsapp-for-linux|com.viber";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = "move scratchpad, resize set 1502 845";
|
command = "move scratchpad, resize set 1502 845";
|
||||||
criteria = {app_id = "com.viber";};
|
criteria = {
|
||||||
|
app_id = "com.viber";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = "floating enable";
|
command = "floating enable";
|
||||||
criteria = {app_id = "sws_cli";};
|
criteria = {
|
||||||
|
app_id = "sws_cli";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
output = {
|
output = {
|
||||||
eDP-1 = {
|
eDP-1 = {
|
||||||
bg = "~/pic/wallpaper stretch";
|
|
||||||
/*
|
/*
|
||||||
scale = "1.4";
|
bg = "~/pic/wallpaper stretch";
|
||||||
|
scale = "1.4";
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -60,27 +69,36 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
"type:keyboard" = {repeat_delay = "150";};
|
"type:keyboard" = {
|
||||||
"type:keyboard" = {repeat_rate = "70";};
|
repeat_delay = "150";
|
||||||
"type:touchpad" = {tap = "enabled";};
|
};
|
||||||
|
"type:keyboard" = {
|
||||||
|
repeat_rate = "70";
|
||||||
|
};
|
||||||
|
"type:touchpad" = {
|
||||||
|
tap = "enabled";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
bars = [
|
bars = [
|
||||||
{
|
{
|
||||||
position = "top";
|
position = "top";
|
||||||
fonts = {
|
fonts = {
|
||||||
names = ["Iosevka" "FontAwesome"];
|
names = [
|
||||||
|
"Iosevka"
|
||||||
|
"FontAwesome"
|
||||||
|
];
|
||||||
style = "Bold Semi-Condensed";
|
style = "Bold Semi-Condensed";
|
||||||
size = 12.0;
|
size = 12.0;
|
||||||
};
|
};
|
||||||
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-top.toml";
|
statusCommand = "${lib.getExe pkgs.i3status-rust} ~/.config/i3status-rust/config-top.toml";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
keybindings = {
|
keybindings = {
|
||||||
"Alt+Shift+q" = "kill";
|
"Alt+Shift+q" = "kill";
|
||||||
"Alt+Shift+Return" = "exec ${term}";
|
"Alt+Shift+Return" = "exec ${term}";
|
||||||
"Alt+p" = "exec ${pkgs.dmenu-wayland}/bin/dmenu-wl_run -fn \"mono 14\"";
|
"Alt+p" = "exec ${pkgs.bemenu}/bin/bemenu-run";
|
||||||
"Alt+c" = "exec ${pkgs.moreutils}/bin/lckdo cliphist_sway ${cliphist_sway}/bin/cliphist_sway";
|
"Alt+c" = "exec ${pkgs.moreutils}/bin/lckdo cliphist_sway ${cliphist_sway}/bin/cliphist_sway";
|
||||||
"Print" = "exec ${pkgs.moreutils}/bin/lckdo screenshot_clip ${screenshot_clip}/bin/screenshot_clip";
|
"Print" = "exec ${pkgs.moreutils}/bin/lckdo screenshot_clip ${screenshot_clip}/bin/screenshot_clip";
|
||||||
|
|
||||||
@@ -120,13 +138,18 @@ in {
|
|||||||
"Alt+slash" = "exec ${pkgs.moreutils}/bin/lckdo swaysw ${swaysw}/bin/swaysw";
|
"Alt+slash" = "exec ${pkgs.moreutils}/bin/lckdo swaysw ${swaysw}/bin/swaysw";
|
||||||
"Alt+Escape" = "workspace back_and_forth";
|
"Alt+Escape" = "workspace back_and_forth";
|
||||||
"Alt+f" = "fullscreen enable";
|
"Alt+f" = "fullscreen enable";
|
||||||
|
"Alt+bracketright" = "focus output right";
|
||||||
|
"Alt+bracketleft" = "focus output left";
|
||||||
|
|
||||||
"Mod4+l" = ''
|
"Mod4+l" =
|
||||||
exec ${pkgs.sway}/bin/swaymsg [app_id="python3"] scratchpad show || exec ${term} -a python3 ${pkgs.python3}/bin/python3'';
|
''exec ${pkgs.sway}/bin/swaymsg [app_id="python3"] scratchpad show || exec ${term} -a python3 ${lib.getExe pkgs.python3}'';
|
||||||
"Mod4+h" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec ${pkgs.zapzap}/bin/zapzap";
|
"Mod4+j" =
|
||||||
"Mod4+j" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.viber] scratchpad show || exec ${viber}/bin/viber";
|
"exec ${pkgs.sway}/bin/swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec ${lib.getExe pkgs.zapzap}";
|
||||||
"Mod4+y" = ''
|
"Mod4+h" =
|
||||||
exec ${pkgs.sway}/bin/swaymsg [app_id="pulsemixer"] scratchpad show || exec ${term} -a pulsemixer ${pkgs.pulsemixer}/bin/pulsemixer'';
|
"exec ${pkgs.sway}/bin/swaymsg [app_id=com.viber] scratchpad show || exec ${viber}/bin/viber";
|
||||||
|
"Mod4+y" =
|
||||||
|
''exec ${pkgs.sway}/bin/swaymsg [app_id="pulsemixer"] scratchpad show || exec ${term} -a pulsemixer ${lib.getExe pkgs.pulsemixer}'';
|
||||||
|
"Mod4+p" = "exec ${lib.getExe pkgs.tessen} -a copy";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{lib, ...}:
|
{ lib, ... }:
|
||||||
with lib; {
|
with lib;
|
||||||
|
{
|
||||||
xdg.configFile."whatsapp-for-linux/settings.conf".source = builtins.toFile "settings.conf" (
|
xdg.configFile."whatsapp-for-linux/settings.conf".source = builtins.toFile "settings.conf" (
|
||||||
generators.toINI {} {
|
generators.toINI { } {
|
||||||
General = {
|
General = {
|
||||||
zoom_level = 1;
|
zoom_level = 1;
|
||||||
close_to_tray = false;
|
close_to_tray = false;
|
||||||
|
|||||||
81
home/zsh.nix
81
home/zsh.nix
@@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, lib, ... }:
|
||||||
|
{
|
||||||
programs.z-lua = {
|
programs.z-lua = {
|
||||||
enableAliases = true;
|
enableAliases = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
@@ -7,16 +8,16 @@
|
|||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
autocd = true;
|
autocd = true;
|
||||||
enableCompletion = false;
|
enableCompletion = false;
|
||||||
syntaxHighlighting.enable = true;
|
|
||||||
defaultKeymap = "viins";
|
defaultKeymap = "viins";
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
cfind = "cscope -C -R -L1";
|
cfind = "${pkgs.cscope}/bin/cscope -C -R -L1";
|
||||||
chmod = "chmod -v";
|
chmod = "chmod -v";
|
||||||
chown = "chown -v";
|
chown = "chown -v";
|
||||||
cp = "cp -v";
|
cp = "cp -v";
|
||||||
rm = "rm -v";
|
rm = "rm -v";
|
||||||
ip = "ip --color=auto";
|
ip = "ip --color=auto";
|
||||||
|
f = "''$(${lib.getExe pkgs.pay-respects} zsh)";
|
||||||
};
|
};
|
||||||
|
|
||||||
history = {
|
history = {
|
||||||
@@ -37,18 +38,13 @@
|
|||||||
src = pkgs.nix-zsh-completions;
|
src = pkgs.nix-zsh-completions;
|
||||||
file = "share/zsh/plugins/nix/nix-zsh-completions.plugin.zsh";
|
file = "share/zsh/plugins/nix/nix-zsh-completions.plugin.zsh";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
name = "fast_syntax_highlight";
|
|
||||||
src = pkgs.zsh-fast-syntax-highlighting;
|
|
||||||
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
name = "pure_prompt";
|
name = "pure_prompt";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "sindresorhus";
|
owner = "sindresorhus";
|
||||||
repo = "pure";
|
repo = "pure";
|
||||||
rev = "a02209d36c8509c0e62f44324127632999c9c0cf";
|
rev = "92b8e9057988566b37ff695e70e2e9bbeb7196c8";
|
||||||
hash = "sha256-BmQO4xqd/3QnpLUitD2obVxL0UulpboT8jGNEh4ri8k=";
|
hash = "sha256-TbOrnhLHgOvcfsgmL0l3bWY33yLIhG1KSi4ITIPq1+A=";
|
||||||
};
|
};
|
||||||
file = "pure.plugin.zsh";
|
file = "pure.plugin.zsh";
|
||||||
}
|
}
|
||||||
@@ -67,41 +63,58 @@
|
|||||||
};
|
};
|
||||||
file = "sudo.plugin.zsh";
|
file = "sudo.plugin.zsh";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "zsh-fast-syntax-highlighting";
|
||||||
|
src = pkgs.zsh-fast-syntax-highlighting;
|
||||||
|
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
envExtra = '''';
|
envExtra = '''';
|
||||||
|
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
# binds
|
# binds
|
||||||
bindkey '^K' fzf-file-widget
|
bindkey '^K' fzf-file-widget
|
||||||
|
|
||||||
# options
|
# options
|
||||||
setopt nobeep
|
setopt nobeep
|
||||||
setopt nopromptcr
|
setopt nopromptcr
|
||||||
setopt c_bases
|
setopt c_bases
|
||||||
setopt completeinword
|
setopt completeinword
|
||||||
setopt completealiases
|
setopt completealiases
|
||||||
setopt notify
|
setopt notify
|
||||||
|
|
||||||
#
|
#
|
||||||
RPS1=""
|
RPS1=""
|
||||||
|
|
||||||
#
|
#
|
||||||
function chpwd() {
|
function chpwd() {
|
||||||
ls;
|
ls;
|
||||||
}
|
}
|
||||||
|
|
||||||
eval "$(direnv hook zsh)"
|
function osc7-pwd() {
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
emulate -L zsh # also sets localoptions for us
|
||||||
|
setopt extendedglob
|
||||||
|
local LC_ALL=C
|
||||||
|
printf '\e]7;file://%s%s\e\' $HOST ''${PWD//(#m)([^@-Za-z&-;_~])/%''${(l:2::0:)''$(([##16]#MATCH))}}
|
||||||
|
}
|
||||||
|
|
||||||
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
|
function chpwd-osc7-pwd() {
|
||||||
TMUX_EXE="${pkgs.tmux}/bin/tmux"
|
(( ZSH_SUBSHELL )) || osc7-pwd
|
||||||
systemd-run --scope --user $TMUX_EXE attach-session -t $USER || systemd-run --scope --user $TMUX_EXE new-session -s $USER
|
}
|
||||||
fi
|
add-zsh-hook -Uz chpwd chpwd-osc7-pwd
|
||||||
|
|
||||||
if [[ -n "$BUBBLEWRAP_DIR" ]]; then
|
eval "$(direnv hook zsh)"
|
||||||
RPS1="{{$BUBBLEWRAP_DIR}}"
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||||
fi
|
|
||||||
|
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
|
||||||
|
TMUX_EXE="${lib.getExe pkgs.tmux}"
|
||||||
|
systemd-run --scope --user $TMUX_EXE attach-session -t $USER || systemd-run --scope --user $TMUX_EXE new-session -s $USER
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "$BUBBLEWRAP_DIR" ]]; then
|
||||||
|
RPS1="{{$BUBBLEWRAP_DIR}}"
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,26 +3,54 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
project-cloud,
|
project-cloud,
|
||||||
goatcounter,
|
|
||||||
nvim,
|
nvim,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
imports = [];
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
nix.optimise.automatic = true;
|
nix.optimise.automatic = true;
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
system.switch = {
|
||||||
|
enable = false;
|
||||||
|
enableNg = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.systemd-boot.configurationLimit = 2;
|
boot.loader.systemd-boot.configurationLimit = 2;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
boot.kernelParams = [
|
||||||
|
"ip=dhcp"
|
||||||
|
"console=tty"
|
||||||
|
];
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
"net.core.default_qdisc" = "fq";
|
"net.core.default_qdisc" = "fq";
|
||||||
"net.ipv4.tcp_congestion_control" = "bbr";
|
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
boot.initrd = {
|
||||||
|
compressor = "zstd";
|
||||||
|
availableKernelModules = [
|
||||||
|
"virtio-pci"
|
||||||
|
"virtio-gpu"
|
||||||
|
];
|
||||||
|
systemd.enable = true;
|
||||||
|
network = {
|
||||||
|
enable = true;
|
||||||
|
ssh = {
|
||||||
|
enable = true;
|
||||||
|
hostKeys = [ /etc/ssh_dummy_ed25519_key ];
|
||||||
|
authorizedKeyFiles = [ ../nixy/ssh_pubkey ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
@@ -38,7 +66,6 @@
|
|||||||
fzf
|
fzf
|
||||||
fzy
|
fzy
|
||||||
git
|
git
|
||||||
goatcounter.packages.${system}.goatcounter
|
|
||||||
nvim.packages.${system}.nvim
|
nvim.packages.${system}.nvim
|
||||||
htop-vim
|
htop-vim
|
||||||
nvim
|
nvim
|
||||||
@@ -57,7 +84,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
debug = false;
|
debug = false;
|
||||||
fqdn = "mail.project-cloud.net";
|
fqdn = "mail.project-cloud.net";
|
||||||
domains = ["project-cloud.net"];
|
domains = [ "project-cloud.net" ];
|
||||||
enableSubmissionSsl = true;
|
enableSubmissionSsl = true;
|
||||||
enableImap = false;
|
enableImap = false;
|
||||||
enableImapSsl = true;
|
enableImapSsl = true;
|
||||||
@@ -67,11 +94,11 @@
|
|||||||
loginAccounts = {
|
loginAccounts = {
|
||||||
"gitea@project-cloud.net" = {
|
"gitea@project-cloud.net" = {
|
||||||
hashedPasswordFile = config.sops.secrets."gitea_mail_pw_hash".path;
|
hashedPasswordFile = config.sops.secrets."gitea_mail_pw_hash".path;
|
||||||
aliases = ["git@project-cloud.net"];
|
aliases = [ "git@project-cloud.net" ];
|
||||||
};
|
};
|
||||||
"asmir@project-cloud.net" = {
|
"asmir@project-cloud.net" = {
|
||||||
hashedPasswordFile = config.sops.secrets."asmir_mail_pw_hash".path;
|
hashedPasswordFile = config.sops.secrets."asmir_mail_pw_hash".path;
|
||||||
aliases = ["asmir.abdulahovic@project-cloud.net"];
|
aliases = [ "asmir.abdulahovic@project-cloud.net" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
certificateScheme = "acme-nginx";
|
certificateScheme = "acme-nginx";
|
||||||
@@ -100,18 +127,13 @@
|
|||||||
|
|
||||||
services.goatcounter = {
|
services.goatcounter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
environmentFile = "/var/lib/goatcounter.env";
|
port = 8002;
|
||||||
extraArgs = ["-listen='*:8002'" "-tls=proxy"];
|
proxy = true;
|
||||||
database = {
|
address = "127.0.0.1";
|
||||||
backend = "sqlite";
|
|
||||||
name = "goatcounter";
|
|
||||||
user = "goatcounter";
|
|
||||||
automigrate = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = false;
|
||||||
package = pkgs.nextcloud28;
|
package = pkgs.nextcloud28;
|
||||||
config.adminpassFile = config.sops.secrets."nextcloud_admin".path;
|
config.adminpassFile = config.sops.secrets."nextcloud_admin".path;
|
||||||
configureRedis = true;
|
configureRedis = true;
|
||||||
@@ -157,12 +179,14 @@
|
|||||||
root = "${project-cloud.packages.${system}.default}/public";
|
root = "${project-cloud.packages.${system}.default}/public";
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHosts.${config.services.nextcloud.hostName} = {
|
/*
|
||||||
quic = true;
|
virtualHosts.${config.services.nextcloud.hostName} = {
|
||||||
http3 = true;
|
quic = true;
|
||||||
forceSSL = true;
|
http3 = true;
|
||||||
enableACME = true;
|
forceSSL = true;
|
||||||
};
|
enableACME = true;
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
virtualHosts."miniflux.project-cloud.net" = {
|
virtualHosts."miniflux.project-cloud.net" = {
|
||||||
quic = true;
|
quic = true;
|
||||||
@@ -180,7 +204,7 @@
|
|||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}";
|
proxyPass = "http://unix:${toString config.services.gitea.settings.server.HTTP_ADDR}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -208,6 +232,7 @@
|
|||||||
DISABLE_SSH = true;
|
DISABLE_SSH = true;
|
||||||
HTTP_PORT = 3001;
|
HTTP_PORT = 3001;
|
||||||
LANDING_PAGE = "explore";
|
LANDING_PAGE = "explore";
|
||||||
|
PROTOCOL = "http+unix";
|
||||||
};
|
};
|
||||||
settings.mailer = {
|
settings.mailer = {
|
||||||
ENABLED = true;
|
ENABLED = true;
|
||||||
@@ -221,15 +246,21 @@
|
|||||||
REGISTER_EMAIL_CONFIRM = true;
|
REGISTER_EMAIL_CONFIRM = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
settings."markup.restructuredtext" = let
|
settings."markup.restructuredtext" =
|
||||||
docutils =
|
let
|
||||||
pkgs.python3.withPackages (ps: with ps; [docutils pygments]);
|
docutils = pkgs.python3.withPackages (
|
||||||
in {
|
ps: with ps; [
|
||||||
ENABLED = true;
|
docutils
|
||||||
FILE_EXTENSIONS = ".rst";
|
pygments
|
||||||
RENDER_COMMAND = "${docutils}/bin/rst2html.py";
|
]
|
||||||
IS_INPUT_FILE = false;
|
);
|
||||||
};
|
in
|
||||||
|
{
|
||||||
|
ENABLED = true;
|
||||||
|
FILE_EXTENSIONS = ".rst";
|
||||||
|
RENDER_COMMAND = "${docutils}/bin/rst2html.py";
|
||||||
|
IS_INPUT_FILE = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nfs.server.enable = false;
|
services.nfs.server.enable = false;
|
||||||
@@ -247,7 +278,7 @@
|
|||||||
paths = [
|
paths = [
|
||||||
"/var/lib/gitea"
|
"/var/lib/gitea"
|
||||||
];
|
];
|
||||||
exclude = [];
|
exclude = [ ];
|
||||||
repo = "ssh://na9fqv67@na9fqv67.repo.borgbase.com/./repo";
|
repo = "ssh://na9fqv67@na9fqv67.repo.borgbase.com/./repo";
|
||||||
encryption = {
|
encryption = {
|
||||||
mode = "repokey-blake2";
|
mode = "repokey-blake2";
|
||||||
@@ -258,12 +289,16 @@
|
|||||||
startAt = "daily";
|
startAt = "daily";
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
services.seafile = {
|
||||||
needed for sendmail mail functionality
|
enable = false;
|
||||||
*/
|
initialAdminPassword = "admin";
|
||||||
users.users.gitea.extraGroups = ["postdrop"];
|
adminEmail = "asmir.abdulahovic" + "@" + "gmail.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
# needed for sendmail mail functionality
|
||||||
|
users.users.gitea.extraGroups = [ "postdrop" ];
|
||||||
systemd.services.gitea.serviceConfig = {
|
systemd.services.gitea.serviceConfig = {
|
||||||
RestrictAddressFamilies = ["AF_NETLINK"];
|
RestrictAddressFamilies = [ "AF_NETLINK" ];
|
||||||
ProtectSystem = lib.mkForce false;
|
ProtectSystem = lib.mkForce false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -272,78 +307,71 @@
|
|||||||
defaults.email = "asmir.abdulahovic@gmail.com";
|
defaults.email = "asmir.abdulahovic@gmail.com";
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
sops = {
|
||||||
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
sops.secrets."miniflux_env" = {
|
secrets = {
|
||||||
sopsFile = ./secrets/miniflux.yaml;
|
"asmir_mail_pw_hash".sopsFile = ./secrets/asmir_mail_pw_hash.yaml;
|
||||||
};
|
"borgbase_enc_key".sopsFile = ./secrets/borgbase_enc_key.yaml;
|
||||||
|
"borgbase_ssh_key".sopsFile = ./secrets/borgbase_ssh_key.yaml;
|
||||||
sops.secrets."gitea_mail_pw_hash" = {
|
"gitea_mail_pw_hash".sopsFile = ./secrets/gitea_mail_pw_hash.yaml;
|
||||||
sopsFile = ./secrets/gitea_mail_pw_hash.yaml;
|
"miniflux_env".sopsFile = ./secrets/miniflux.yaml;
|
||||||
};
|
"wg_preshared/mediabox".sopsFile = ../common/secrets/wg_preshared.yaml;
|
||||||
|
"wg_preshared/nixy".sopsFile = ../common/secrets/wg_preshared.yaml;
|
||||||
sops.secrets."asmir_mail_pw_hash" = {
|
"wg_preshared/workstation".sopsFile = ../common/secrets/wg_preshared.yaml;
|
||||||
sopsFile = ./secrets/asmir_mail_pw_hash.yaml;
|
"wg_privkey".sopsFile = ./secrets/wg_privkey.yaml;
|
||||||
};
|
"gitea_db" = {
|
||||||
|
sopsFile = ./secrets/gitea_db.yaml;
|
||||||
sops.secrets."gitea_db" = {
|
owner = config.users.users.gitea.name;
|
||||||
sopsFile = ./secrets/gitea_db.yaml;
|
};
|
||||||
owner = config.users.users.gitea.name;
|
/*
|
||||||
};
|
"nextcloud_admin" = {
|
||||||
|
sopsFile = ./secrets/nextcloud_admin.yaml;
|
||||||
sops.secrets."nextcloud_admin" = {
|
owner = config.users.users.nextcloud.name;
|
||||||
sopsFile = ./secrets/nextcloud_admin.yaml;
|
};
|
||||||
owner = config.users.users.nextcloud.name;
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets."wg_privkey" = {
|
|
||||||
sopsFile = ./secrets/wg_privkey.yaml;
|
|
||||||
};
|
|
||||||
|
|
||||||
sops.secrets."wg_preshared/nixy" = {
|
|
||||||
sopsFile = ../common/secrets/wg_preshared.yaml;
|
|
||||||
};
|
|
||||||
|
|
||||||
sops.secrets."wg_preshared/mediabox" = {
|
|
||||||
sopsFile = ../common/secrets/wg_preshared.yaml;
|
|
||||||
};
|
|
||||||
|
|
||||||
sops.secrets."borgbase_enc_key" = {
|
|
||||||
sopsFile = ./secrets/borgbase_enc_key.yaml;
|
|
||||||
};
|
|
||||||
|
|
||||||
sops.secrets."borgbase_ssh_key" = {
|
|
||||||
sopsFile = ./secrets/borgbase_ssh_key.yaml;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.hostName = "magpie";
|
networking.hostName = "magpie";
|
||||||
|
networking.firewall = {
|
||||||
|
nftables.enable = true;
|
||||||
|
enable = true;
|
||||||
|
allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
587
|
||||||
|
2049
|
||||||
|
]; # http, mail, mail, nfs
|
||||||
|
allowedUDPPorts = [
|
||||||
|
443
|
||||||
|
51820
|
||||||
|
]; # mail, wireguard
|
||||||
|
allowPing = true;
|
||||||
|
logRefusedConnections = lib.mkDefault false;
|
||||||
|
};
|
||||||
|
|
||||||
networking.firewall.enable = true;
|
networking.nat = {
|
||||||
networking.firewall.allowedTCPPorts = [80 443 587 2049]; # http, mail, mail, nfs
|
enable = true;
|
||||||
networking.firewall.allowedUDPPorts = [443 51820]; #mail, wireguard
|
externalInterface = "enp1s0";
|
||||||
networking.firewall.allowPing = true;
|
internalInterfaces = [ "wg0" ];
|
||||||
networking.firewall.logRefusedConnections = lib.mkDefault false;
|
};
|
||||||
|
|
||||||
networking.nat.enable = true;
|
|
||||||
networking.nat.externalInterface = "enp1s0";
|
|
||||||
networking.nat.internalInterfaces = ["wg0"];
|
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
networking.wireless.enable = false;
|
networking.wireless.enable = false;
|
||||||
|
|
||||||
networking.wireguard.interfaces = {
|
networking.wireguard.interfaces = {
|
||||||
wg0 = {
|
wg0 = {
|
||||||
ips = ["10.100.0.1/24"];
|
ips = [ "10.100.0.1/24" ];
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
|
|
||||||
# This allows the wireguard server to route your traffic to the internet and hence be like a VPN
|
# This allows the wireguard server to route your traffic to the internet and hence be like a VPN
|
||||||
# For this to work you have to set the dnsserver IP of your router (or dnsserver of choice) in your clients
|
# For this to work you have to set the dnsserver IP of your router (or dnsserver of choice) in your clients
|
||||||
postSetup = ''
|
postSetup = ''
|
||||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE
|
${pkgs.nftables}/bin/nft add rule ip nat POSTROUTING oifname "eth0" ip saddr 10.100.0.0/24 counter masquerade
|
||||||
'';
|
'';
|
||||||
# This undoes the above command
|
# This undoes the above command, TODO fix command below to be more specific
|
||||||
postShutdown = ''
|
postShutdown = ''
|
||||||
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE
|
${pkgs.nftables}/bin/nft flush table ip nat
|
||||||
'';
|
'';
|
||||||
privateKeyFile = config.sops.secrets."wg_privkey".path;
|
privateKeyFile = config.sops.secrets."wg_privkey".path;
|
||||||
|
|
||||||
@@ -351,12 +379,17 @@
|
|||||||
{
|
{
|
||||||
publicKey = builtins.readFile ../nixy/wg_pubkey;
|
publicKey = builtins.readFile ../nixy/wg_pubkey;
|
||||||
presharedKeyFile = config.sops.secrets."wg_preshared/nixy".path;
|
presharedKeyFile = config.sops.secrets."wg_preshared/nixy".path;
|
||||||
allowedIPs = ["10.100.0.6/32"];
|
allowedIPs = [ "10.100.0.6/32" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
publicKey = builtins.readFile ../mediabox/wg_pubkey;
|
publicKey = builtins.readFile ../mediabox/wg_pubkey;
|
||||||
presharedKeyFile = config.sops.secrets."wg_preshared/mediabox".path;
|
presharedKeyFile = config.sops.secrets."wg_preshared/mediabox".path;
|
||||||
allowedIPs = ["10.100.0.5/32"];
|
allowedIPs = [ "10.100.0.5/32" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
publicKey = builtins.readFile ../common/wg_pubkey_workstation;
|
||||||
|
presharedKeyFile = config.sops.secrets."wg_preshared/workstation".path;
|
||||||
|
allowedIPs = [ "10.100.0.4/32" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,15 +5,21 @@
|
|||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "virtio_pci" "usbhid" "sr_mod"];
|
boot.initrd.availableKernelModules = [
|
||||||
boot.initrd.kernelModules = [];
|
"xhci_pci"
|
||||||
boot.kernelModules = [];
|
"virtio_pci"
|
||||||
boot.extraModulePackages = [];
|
"usbhid"
|
||||||
|
"sr_mod"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/118de1e5-f23e-4af3-a10a-054eded78152";
|
device = "/dev/disk/by-uuid/118de1e5-f23e-4af3-a10a-054eded78152";
|
||||||
@@ -25,7 +31,7 @@
|
|||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [];
|
swapDevices = [ ];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|||||||
@@ -8,13 +8,14 @@
|
|||||||
system,
|
system,
|
||||||
nvim,
|
nvim,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
imports = [];
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
system.autoUpgrade.enable = false;
|
system.autoUpgrade.enable = false;
|
||||||
|
|
||||||
sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
sops.secrets."peerix/private" = {
|
sops.secrets."peerix/private" = {
|
||||||
sopsFile = ./secrets/peerix.yaml;
|
sopsFile = ./secrets/peerix.yaml;
|
||||||
mode = "0400";
|
mode = "0400";
|
||||||
@@ -27,24 +28,40 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets."wg_preshared/mediabox" = {
|
sops.secrets."wg_preshared/mediabox" = {
|
||||||
sopsFile = ../common/secrets/wg_privkey.yaml;
|
sopsFile = ../common/secrets/wg_preshared.yaml;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
gc.options = "--delete-older-than 7d";
|
gc.options = "--delete-older-than 7d";
|
||||||
package = pkgs.nixUnstable;
|
package = pkgs.nixVersions.latest;
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.compressor = "zstd";
|
initrd = {
|
||||||
kernelModules = ["acpi_call"];
|
compressor = "zstd";
|
||||||
|
availableKernelModules = [ "e1000e" ];
|
||||||
|
network = {
|
||||||
|
enable = true;
|
||||||
|
udhcpc.enable = true;
|
||||||
|
ssh = {
|
||||||
|
enable = true;
|
||||||
|
hostKeys = [ /etc/ssh_dummy_ed25519_key ];
|
||||||
|
authorizedKeys = [ (builtins.readFile ../nixy/ssh_pubkey) ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
kernelModules = [ "acpi_call" ];
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
kernelParams = ["msr.allow_writes=on"];
|
kernelParams = [ "msr.allow_writes=on" ];
|
||||||
kernel.sysctl = {
|
kernel.sysctl = {
|
||||||
"net.core.default_qdisc" = "fq";
|
"net.core.default_qdisc" = "fq";
|
||||||
"net.ipv4.tcp_congestion_control" = "bbr";
|
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||||
@@ -55,7 +72,7 @@
|
|||||||
memtest86.enable = true;
|
memtest86.enable = true;
|
||||||
};
|
};
|
||||||
readOnlyNixStore = true;
|
readOnlyNixStore = true;
|
||||||
supportedFilesystems = ["btrfs"];
|
supportedFilesystems = [ "btrfs" ];
|
||||||
tmp.useTmpfs = true;
|
tmp.useTmpfs = true;
|
||||||
tmp.tmpfsSize = "80%";
|
tmp.tmpfsSize = "80%";
|
||||||
};
|
};
|
||||||
@@ -76,7 +93,11 @@
|
|||||||
networking = {
|
networking = {
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [80 443 51820];
|
allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
51820
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
hostName = "mediabox";
|
hostName = "mediabox";
|
||||||
@@ -84,8 +105,11 @@
|
|||||||
interfaces.wlp3s0.useDHCP = false;
|
interfaces.wlp3s0.useDHCP = false;
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
wireless.enable = false;
|
wireless.enable = false;
|
||||||
wireless.interfaces = ["wlp3s0"];
|
wireless.interfaces = [ "wlp3s0" ];
|
||||||
nameservers = ["127.0.0.1" "::1"];
|
nameservers = [
|
||||||
|
"127.0.0.1"
|
||||||
|
"::1"
|
||||||
|
];
|
||||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||||
networkmanager.dns = "none";
|
networkmanager.dns = "none";
|
||||||
extraHosts = ''
|
extraHosts = ''
|
||||||
@@ -99,14 +123,13 @@
|
|||||||
|
|
||||||
wireguard.interfaces = {
|
wireguard.interfaces = {
|
||||||
wg0 = {
|
wg0 = {
|
||||||
ips = ["10.100.0.5/24"];
|
ips = [ "10.100.0.5/24" ];
|
||||||
listenPort = 51820;
|
|
||||||
privateKeyFile = config.sops.secrets."wg_privkey".path;
|
privateKeyFile = config.sops.secrets."wg_privkey".path;
|
||||||
peers = [
|
peers = [
|
||||||
{
|
{
|
||||||
publicKey = builtins.readFile ../magpie/wg_pubkey;
|
publicKey = builtins.readFile ../magpie/wg_pubkey;
|
||||||
presharedKeyFile = config.sops.secrets."wg_preshared/mediabox".path;
|
presharedKeyFile = config.sops.secrets."wg_preshared/mediabox".path;
|
||||||
allowedIPs = ["10.100.0.0/24"];
|
allowedIPs = [ "10.100.0.0/24" ];
|
||||||
endpoint = "5.75.229.224:51820";
|
endpoint = "5.75.229.224:51820";
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
}
|
}
|
||||||
@@ -118,7 +141,7 @@
|
|||||||
time.timeZone = "Europe/Sarajevo";
|
time.timeZone = "Europe/Sarajevo";
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nixpkgs.overlays = [nvim.overlays.${system}.overlay];
|
nixpkgs.overlays = [ nvim.overlays.${system}.overlay ];
|
||||||
environment = {
|
environment = {
|
||||||
homeBinInPath = true;
|
homeBinInPath = true;
|
||||||
variables = {
|
variables = {
|
||||||
@@ -141,13 +164,13 @@
|
|||||||
systemd = {
|
systemd = {
|
||||||
services = {
|
services = {
|
||||||
"macchanger-wireless" = {
|
"macchanger-wireless" = {
|
||||||
after = ["sys-subsystem-net-devices-wlp3s0.device"];
|
after = [ "sys-subsystem-net-devices-wlp3s0.device" ];
|
||||||
before = ["network-pre.target"];
|
before = [ "network-pre.target" ];
|
||||||
bindsTo = ["sys-subsystem-net-devices-wlp3s0.device"];
|
bindsTo = [ "sys-subsystem-net-devices-wlp3s0.device" ];
|
||||||
description = "Changes MAC of my wireless interface for privacy reasons";
|
description = "Changes MAC of my wireless interface for privacy reasons";
|
||||||
stopIfChanged = false;
|
stopIfChanged = false;
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = [ "multi-user.target" ];
|
||||||
wants = ["network-pre.target"];
|
wants = [ "network-pre.target" ];
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.macchanger}/bin/macchanger -e wlp3s0 || true
|
${pkgs.macchanger}/bin/macchanger -e wlp3s0 || true
|
||||||
'';
|
'';
|
||||||
@@ -156,8 +179,8 @@
|
|||||||
|
|
||||||
"zremap" = {
|
"zremap" = {
|
||||||
description = "Intercepts keyboard udev events";
|
description = "Intercepts keyboard udev events";
|
||||||
wants = ["systemd-udevd.service"];
|
wants = [ "systemd-udevd.service" ];
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig.Nice = -20;
|
serviceConfig.Nice = -20;
|
||||||
script = ''
|
script = ''
|
||||||
sleep 1
|
sleep 1
|
||||||
@@ -168,26 +191,30 @@
|
|||||||
|
|
||||||
"wakeonlan" = {
|
"wakeonlan" = {
|
||||||
description = "Reenable wake on lan every boot";
|
description = "Reenable wake on lan every boot";
|
||||||
after = ["network.target"];
|
after = [ "network.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${pkgs.ethtool}/sbin/ethtool -s enp0s25 wol m";
|
ExecStart = "${pkgs.ethtool}/sbin/ethtool -s enp0s25 wol m";
|
||||||
};
|
};
|
||||||
wantedBy = ["default.target" "suspend.target" "shutdown.target"];
|
wantedBy = [
|
||||||
|
"default.target"
|
||||||
|
"suspend.target"
|
||||||
|
"shutdown.target"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
"cpu_setting" = {
|
"cpu_setting" = {
|
||||||
description = "Enable turboot boost and undervolt cpu after suspend";
|
description = "Enable turboot boost and undervolt cpu after suspend";
|
||||||
wantedBy = ["post-resume.target" "multi-user.target"];
|
wantedBy = ["post-resume.target" "multi-user.target"];
|
||||||
after = ["post-resume.target"];
|
after = ["post-resume.target"];
|
||||||
script = ''
|
script = ''
|
||||||
echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
|
echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
|
||||||
echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo
|
echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo
|
||||||
${pkgs.undervolt}/bin/undervolt --core -105 --cache -105 --uncore -105 --gpu -15 -p1 47 28 -p2 57 0.0025
|
${pkgs.undervolt}/bin/undervolt --core -105 --cache -105 --uncore -105 --gpu -15 -p1 47 28 -p2 57 0.0025
|
||||||
'';
|
'';
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -301,39 +328,45 @@
|
|||||||
windowManager.icewm.enable = true;
|
windowManager.icewm.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
udev.packages = [];
|
udev.packages = [ ];
|
||||||
|
|
||||||
tlp = {
|
tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {};
|
settings = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
actkbd = {
|
actkbd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
bindings = [
|
bindings = [
|
||||||
{
|
{
|
||||||
keys = [121];
|
keys = [ 121 ];
|
||||||
events = ["key"];
|
events = [ "key" ];
|
||||||
command = "${pkgs.alsaUtils}/bin/amixer -q set Master toggle";
|
command = "${pkgs.alsaUtils}/bin/amixer -q set Master toggle";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
keys = [122];
|
keys = [ 122 ];
|
||||||
events = ["key" "rep"];
|
events = [
|
||||||
|
"key"
|
||||||
|
"rep"
|
||||||
|
];
|
||||||
command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}- unmute";
|
command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}- unmute";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
keys = [123];
|
keys = [ 123 ];
|
||||||
events = ["key" "rep"];
|
events = [
|
||||||
|
"key"
|
||||||
|
"rep"
|
||||||
|
];
|
||||||
command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}+ unmute";
|
command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}+ unmute";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
keys = [224];
|
keys = [ 224 ];
|
||||||
events = ["key"];
|
events = [ "key" ];
|
||||||
command = "/run/current-system/sw/bin/light -U 5";
|
command = "/run/current-system/sw/bin/light -U 5";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
keys = [225];
|
keys = [ 225 ];
|
||||||
events = ["key"];
|
events = [ "key" ];
|
||||||
command = "/run/current-system/sw/bin/light -A 5";
|
command = "/run/current-system/sw/bin/light -A 5";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -426,7 +459,16 @@
|
|||||||
users.users.akill = {
|
users.users.akill = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = ["wireshark" "wheel" "kvm" "tty" "audio" "sound" "adbusers" "transmission"];
|
extraGroups = [
|
||||||
|
"wireshark"
|
||||||
|
"wheel"
|
||||||
|
"kvm"
|
||||||
|
"tty"
|
||||||
|
"audio"
|
||||||
|
"sound"
|
||||||
|
"adbusers"
|
||||||
|
"transmission"
|
||||||
|
];
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
(builtins.readFile ../nixy/ssh_pubkey)
|
(builtins.readFile ../nixy/ssh_pubkey)
|
||||||
];
|
];
|
||||||
@@ -435,12 +477,21 @@
|
|||||||
users.users.ado = {
|
users.users.ado = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = ["wireshark" "wheel" "kvm" "tty" "audio" "sound" "adbusers" "transmission"];
|
extraGroups = [
|
||||||
|
"wireshark"
|
||||||
|
"wheel"
|
||||||
|
"kvm"
|
||||||
|
"tty"
|
||||||
|
"audio"
|
||||||
|
"sound"
|
||||||
|
"adbusers"
|
||||||
|
"transmission"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.mediauser = {
|
users.users.mediauser = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.bash;
|
shell = pkgs.bash;
|
||||||
extraGroups = [];
|
extraGroups = [ ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,20 +5,32 @@
|
|||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
boot.initrd.availableKernelModules = [
|
||||||
boot.initrd.kernelModules = [];
|
"xhci_pci"
|
||||||
boot.kernelModules = ["kvm-intel"];
|
"ehci_pci"
|
||||||
boot.extraModulePackages = [];
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"rtsx_pci_sdmmc"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=root" "compress=lzo" "noatime"];
|
options = [
|
||||||
|
"subvol=root"
|
||||||
|
"compress=lzo"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/60aa7671-bfee-451b-b871-ac7c5a4a9f3a";
|
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/60aa7671-bfee-451b-b871-ac7c5a4a9f3a";
|
||||||
@@ -26,25 +38,41 @@
|
|||||||
fileSystems."/home" = {
|
fileSystems."/home" = {
|
||||||
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=home" "compress=lzo" "noatime"];
|
options = [
|
||||||
|
"subvol=home"
|
||||||
|
"compress=lzo"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" = {
|
fileSystems."/nix" = {
|
||||||
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=nix" "compress=lzo" "noatime"];
|
options = [
|
||||||
|
"subvol=nix"
|
||||||
|
"compress=lzo"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/persist" = {
|
fileSystems."/persist" = {
|
||||||
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=persist" "compress=lzo" "noatime"];
|
options = [
|
||||||
|
"subvol=persist"
|
||||||
|
"compress=lzo"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var/log" = {
|
fileSystems."/var/log" = {
|
||||||
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=log" "compress=lzo" "noatime"];
|
options = [
|
||||||
|
"subvol=log"
|
||||||
|
"compress=lzo"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -54,7 +82,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{device = "/dev/disk/by-uuid/7b44ab02-84ff-4ffd-be26-58247cf5a982";}
|
{ device = "/dev/disk/by-uuid/7b44ab02-84ff-4ffd-be26-58247cf5a982"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.cpu.intel.updateMicrocode = true;
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
# Enable Nginx
|
# Enable Nginx
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -61,7 +62,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Ensure the database, user, and permissions always exist
|
# Ensure the database, user, and permissions always exist
|
||||||
ensureDatabases = ["nextcloud"];
|
ensureDatabases = [ "nextcloud" ];
|
||||||
ensureUsers = [
|
ensureUsers = [
|
||||||
{
|
{
|
||||||
name = "nextcloud";
|
name = "nextcloud";
|
||||||
@@ -72,7 +73,7 @@
|
|||||||
|
|
||||||
# Ensure that postgres is running before running the setup
|
# Ensure that postgres is running before running the setup
|
||||||
systemd.services."nextcloud-setup" = {
|
systemd.services."nextcloud-setup" = {
|
||||||
requires = ["postgresql.service"];
|
requires = [ "postgresql.service" ];
|
||||||
after = ["postgresql.service"];
|
after = [ "postgresql.service" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,13 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib;
|
||||||
|
let
|
||||||
cfg = config.services.qbittorrent;
|
cfg = config.services.qbittorrent;
|
||||||
configDir = "${cfg.dataDir}/.config";
|
configDir = "${cfg.dataDir}/.config";
|
||||||
openFilesLimit = 4096;
|
openFilesLimit = 4096;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.services.qbittorrent = {
|
options.services.qbittorrent = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
@@ -67,24 +69,24 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = [pkgs.qbittorrent];
|
environment.systemPackages = [ pkgs.qbittorrent ];
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
qbittorrent = prev.qbittorrent.override {guiSupport = false;};
|
qbittorrent = prev.qbittorrent.override { guiSupport = false; };
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.firewall = mkIf cfg.openFirewall {
|
networking.firewall = mkIf cfg.openFirewall {
|
||||||
allowedTCPPorts = [cfg.port];
|
allowedTCPPorts = [ cfg.port ];
|
||||||
allowedUDPPorts = [cfg.port];
|
allowedUDPPorts = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.qbittorrent = {
|
systemd.services.qbittorrent = {
|
||||||
after = ["network.target"];
|
after = [ "network.target" ];
|
||||||
description = "qBittorrent Daemon";
|
description = "qBittorrent Daemon";
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = [ "multi-user.target" ];
|
||||||
path = [pkgs.qbittorrent];
|
path = [ pkgs.qbittorrent ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.qbittorrent}/bin/qbittorrent-nox \
|
${pkgs.qbittorrent}/bin/qbittorrent-nox \
|
||||||
@@ -110,7 +112,10 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.groups =
|
users.groups = mkIf (cfg.group == "qbittorrent") {
|
||||||
mkIf (cfg.group == "qbittorrent") {qbittorrent = {gid = null;};};
|
qbittorrent = {
|
||||||
|
gid = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,61 +1,94 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
|
||||||
nix-xilinx,
|
nix-xilinx,
|
||||||
system,
|
|
||||||
nvim,
|
nvim,
|
||||||
|
pkgs,
|
||||||
|
system,
|
||||||
zremap,
|
zremap,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
imports = [];
|
let
|
||||||
|
USER = "akill";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
system.autoUpgrade.enable = false;
|
system.autoUpgrade.enable = false;
|
||||||
|
system.switch = {
|
||||||
sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
enable = false;
|
||||||
sops.secrets."peerix/private" = {
|
enableNg = true;
|
||||||
sopsFile = ./secrets/peerix.yaml;
|
|
||||||
mode = "0400";
|
|
||||||
owner = config.users.users.nobody.name;
|
|
||||||
group = config.users.users.nobody.group;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets."wg_privkey" = {
|
sops = {
|
||||||
sopsFile = ./secrets/wg_privkey.yaml;
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
};
|
secrets = {
|
||||||
|
"peerix/private" = {
|
||||||
|
sopsFile = ./secrets/peerix.yaml;
|
||||||
|
mode = "0400";
|
||||||
|
owner = config.users.users.nobody.name;
|
||||||
|
group = config.users.users.nobody.group;
|
||||||
|
};
|
||||||
|
|
||||||
sops.secrets."wg_preshared/nixy" = {
|
"wg_privkey" = {
|
||||||
sopsFile = ../common/secrets/wg_preshared.yaml;
|
sopsFile = ./secrets/wg_privkey.yaml;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets."borgbase_enc_key" = {
|
"wg_preshared/nixy" = {
|
||||||
sopsFile = ./secrets/borgbase_enc_key.yaml;
|
sopsFile = ../common/secrets/wg_preshared.yaml;
|
||||||
owner = config.users.users.akill.name;
|
};
|
||||||
};
|
|
||||||
|
|
||||||
sops.secrets."borgbase_ssh_key" = {
|
"wg_privkey_proton" = {
|
||||||
sopsFile = ./secrets/borgbase_ssh_key.yaml;
|
sopsFile = ./secrets/wg_privkey_proton.yaml;
|
||||||
owner = config.users.users.akill.name;
|
};
|
||||||
|
|
||||||
|
"wg_endpoint_proton" = {
|
||||||
|
sopsFile = ./secrets/wg_privkey_proton.yaml;
|
||||||
|
};
|
||||||
|
|
||||||
|
"borgbase_enc_key" = {
|
||||||
|
sopsFile = ./secrets/borgbase_enc_key.yaml;
|
||||||
|
owner = config.users.users.${USER}.name;
|
||||||
|
};
|
||||||
|
|
||||||
|
"borgbase_ssh_key" = {
|
||||||
|
sopsFile = ./secrets/borgbase_ssh_key.yaml;
|
||||||
|
owner = config.users.users.${USER}.name;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
gc.options = "--delete-older-than 7d";
|
gc.options = "--delete-older-than 7d";
|
||||||
package = pkgs.nixUnstable;
|
package = pkgs.nixVersions.latest;
|
||||||
settings = {
|
settings = {
|
||||||
sandbox = true;
|
sandbox = true;
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
extraModulePackages = with config.boot.kernelPackages; [usbip v4l2loopback];
|
extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
usbip
|
||||||
|
v4l2loopback
|
||||||
|
];
|
||||||
initrd.compressor = "zstd";
|
initrd.compressor = "zstd";
|
||||||
initrd.kernelModules = ["amdgpu"];
|
initrd.kernelModules = [ ];
|
||||||
binfmt.emulatedSystems = ["wasm32-wasi" "x86_64-windows"];
|
initrd.systemd.enable = true;
|
||||||
|
binfmt.emulatedSystems = [
|
||||||
|
"wasm32-wasi"
|
||||||
|
"x86_64-windows"
|
||||||
|
];
|
||||||
|
kernelParams = [
|
||||||
|
"psmouse.synaptics_intertouch=0"
|
||||||
|
"mem_sleep_default=deep"
|
||||||
|
];
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
kernelParams = ["psmouse.synaptics_intertouch=0" "mem_sleep_default=deep"];
|
|
||||||
kernel.sysctl = {
|
kernel.sysctl = {
|
||||||
"net.core.default_qdisc" = "fq";
|
"net.core.default_qdisc" = "fq";
|
||||||
"net.ipv4.tcp_congestion_control" = "bbr";
|
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||||
@@ -67,7 +100,9 @@
|
|||||||
memtest86.enable = true;
|
memtest86.enable = true;
|
||||||
};
|
};
|
||||||
readOnlyNixStore = true;
|
readOnlyNixStore = true;
|
||||||
supportedFilesystems = ["btrfs" "nfs"];
|
supportedFilesystems = [
|
||||||
|
"xfs"
|
||||||
|
];
|
||||||
tmp.useTmpfs = true;
|
tmp.useTmpfs = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -78,7 +113,7 @@
|
|||||||
doas.enable = true;
|
doas.enable = true;
|
||||||
doas.extraRules = [
|
doas.extraRules = [
|
||||||
{
|
{
|
||||||
users = ["akill"];
|
users = [ USER ];
|
||||||
keepEnv = true;
|
keepEnv = true;
|
||||||
persist = true;
|
persist = true;
|
||||||
}
|
}
|
||||||
@@ -90,13 +125,22 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
nftables.enable = true;
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [80 443 51820];
|
allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
51820
|
||||||
|
8020
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
hostName = "nixy";
|
hostName = "nixy";
|
||||||
nameservers = ["127.0.0.1" "::1"];
|
nameservers = [
|
||||||
|
"127.0.0.1"
|
||||||
|
"::1"
|
||||||
|
];
|
||||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||||
|
|
||||||
extraHosts = ''
|
extraHosts = ''
|
||||||
@@ -127,27 +171,47 @@
|
|||||||
|
|
||||||
wireguard.interfaces = {
|
wireguard.interfaces = {
|
||||||
wg0 = {
|
wg0 = {
|
||||||
ips = ["10.100.0.6/24"];
|
ips = [ "10.100.0.6/24" ];
|
||||||
listenPort = 51820;
|
|
||||||
privateKeyFile = config.sops.secrets."wg_privkey".path;
|
privateKeyFile = config.sops.secrets."wg_privkey".path;
|
||||||
peers = [
|
peers = [
|
||||||
{
|
{
|
||||||
publicKey = builtins.readFile ../magpie/wg_pubkey;
|
publicKey = builtins.readFile ../magpie/wg_pubkey;
|
||||||
presharedKeyFile = config.sops.secrets."wg_preshared/nixy".path;
|
presharedKeyFile = config.sops.secrets."wg_preshared/nixy".path;
|
||||||
allowedIPs = ["10.100.0.0/24"];
|
allowedIPs = [ "10.100.0.0/24" ];
|
||||||
endpoint = "5.75.229.224:51820";
|
endpoint = "5.75.229.224:51820";
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
neox_wg = {
|
||||||
|
ips = [ "192.168.51.2/32" ];
|
||||||
|
privateKeyFile = config.sops.secrets."wg_privkey".path;
|
||||||
|
peers = [
|
||||||
|
{
|
||||||
|
publicKey = builtins.readFile ../nixy/wg_pubkey_nx;
|
||||||
|
allowedIPs = [ "192.168.2.0/24" ];
|
||||||
|
endpoint = "185.194.64.26:51820";
|
||||||
|
persistentKeepalive = 25;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
time.timeZone = "Europe/Sarajevo";
|
time.timeZone = "Europe/Sarajevo";
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nixpkgs.overlays = [nix-xilinx.overlay nvim.overlays.${system}.overlay];
|
nixpkgs.overlays = [
|
||||||
|
nix-xilinx.overlay
|
||||||
|
nvim.overlays.${system}.overlay
|
||||||
|
];
|
||||||
environment = {
|
environment = {
|
||||||
|
etc = {
|
||||||
|
"firejail/qutebrowser.local".text = ''
|
||||||
|
whitelist ''${RUNUSER}/qutebrowser
|
||||||
|
'';
|
||||||
|
};
|
||||||
extraInit = ''
|
extraInit = ''
|
||||||
unset -v SSH_ASKPASS
|
unset -v SSH_ASKPASS
|
||||||
'';
|
'';
|
||||||
@@ -158,10 +222,20 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
dedicatedServer.openFirewall = false;
|
||||||
|
localNetworkGameTransfers.openFirewall = true;
|
||||||
|
};
|
||||||
gnupg.agent = {
|
gnupg.agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSSHSupport = true;
|
enableSSHSupport = true;
|
||||||
};
|
};
|
||||||
|
appimage = {
|
||||||
|
enable = true;
|
||||||
|
binfmt = true;
|
||||||
|
};
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
firejail.enable = true;
|
firejail.enable = true;
|
||||||
adb.enable = true;
|
adb.enable = true;
|
||||||
@@ -169,22 +243,125 @@
|
|||||||
sway.enable = true;
|
sway.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
documentation.dev.enable = true;
|
||||||
|
|
||||||
# List services that you want to enable:
|
# List services that you want to enable:
|
||||||
systemd = {
|
systemd = {
|
||||||
services = {
|
services = {
|
||||||
"zremap" = {
|
"zremap@" = {
|
||||||
description = "Intercepts keyboard udev events";
|
enable = true;
|
||||||
wants = ["systemd-udevd.service"];
|
restartIfChanged = true;
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
serviceConfig.Nice = -20;
|
serviceConfig.Nice = -20;
|
||||||
script = ''
|
unitConfig = {
|
||||||
sleep 1
|
Description = "zremap on %I";
|
||||||
${zremap.defaultPackage.${system}}/bin/zremap \
|
ConditionPathExists = "%I";
|
||||||
/dev/input/by-path/platform-i8042-serio-0-event-kbd
|
};
|
||||||
'';
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${zremap.defaultPackage.${system}}/bin/zremap %I";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"netns@" = {
|
||||||
|
description = "%I network namespace";
|
||||||
|
before = [ "network.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
ExecStart = "${pkgs.iproute2}/bin/ip netns add %I";
|
||||||
|
ExecStop = "${pkgs.iproute2}/bin/ip netns del %I";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"wg_proton" = {
|
||||||
|
description = "wg network interface";
|
||||||
|
bindsTo = [ "netns@wg.service" ];
|
||||||
|
requires = [ "network-online.target" ];
|
||||||
|
wants = [ "dnscrypt-proxy2_proton.service" ];
|
||||||
|
after = [ "netns@wg.service" ];
|
||||||
|
before = [ "dnscrypt-proxy2_proton.service" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
ExecStart = pkgs.writers.writeBash "wg-up" ''
|
||||||
|
set -e
|
||||||
|
ENDPOINT_IP=$(${pkgs.coreutils-full}/bin/cat "${config.sops.secrets."wg_endpoint_proton".path}")
|
||||||
|
${pkgs.iproute2}/bin/ip link add proton_wg type wireguard
|
||||||
|
${pkgs.iproute2}/bin/ip link set proton_wg netns wg
|
||||||
|
${pkgs.iproute2}/bin/ip -n wg address add 10.2.0.2/32 dev proton_wg
|
||||||
|
${pkgs.iproute2}/bin/ip netns exec wg \
|
||||||
|
${pkgs.wireguard-tools}/bin/wg set "proton_wg" private-key "${
|
||||||
|
config.sops.secrets."wg_privkey_proton".path
|
||||||
|
}"
|
||||||
|
${pkgs.iproute2}/bin/ip netns exec wg \
|
||||||
|
${pkgs.wireguard-tools}/bin/wg set "proton_wg" peer "g6DkXWKI/68RsLjROIwCEcyB/ZhyK5Q7OWcz1TtqER0=" \
|
||||||
|
endpoint "$ENDPOINT_IP:51820" \
|
||||||
|
persistent-keepalive "25" \
|
||||||
|
allowed-ips "0.0.0.0/0"
|
||||||
|
${pkgs.iproute2}/bin/ip -n wg link set lo up
|
||||||
|
${pkgs.iproute2}/bin/ip -n wg link set proton_wg up
|
||||||
|
${pkgs.iproute2}/bin/ip -n wg route add default dev proton_wg
|
||||||
|
'';
|
||||||
|
ExecStop = pkgs.writers.writeBash "wg-down" ''
|
||||||
|
${pkgs.iproute2}/bin/ip -n wg route del default dev proton_wg
|
||||||
|
${pkgs.iproute2}/bin/ip -n wg link del proton_wg
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"dnscrypt-proxy2_proton" = {
|
||||||
|
description = "DNSCrypt-proxy client proton";
|
||||||
|
wants = [
|
||||||
|
"network-online.target"
|
||||||
|
"nss-lookup.target"
|
||||||
|
];
|
||||||
|
before = [ "nss-lookup.target" ];
|
||||||
|
after = [ "wg_proton.service" ];
|
||||||
|
partOf = [ "wg_proton.service" ];
|
||||||
|
serviceConfig = {
|
||||||
|
AmbientCapabilities = "CAP_NET_BIND_SERVICE";
|
||||||
|
CacheDirectory = "dnscrypt-proxy";
|
||||||
|
DynamicUser = true;
|
||||||
|
ExecStart = "${pkgs.dnscrypt-proxy}/bin/dnscrypt-proxy -config ${config.services.dnscrypt-proxy2.configFile}";
|
||||||
|
LockPersonality = true;
|
||||||
|
LogsDirectory = "dnscrypt-proxy";
|
||||||
|
MemoryDenyWriteExecute = true;
|
||||||
|
NetworkNamespacePath = "/var/run/netns/wg";
|
||||||
|
NonBlocking = true;
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
PrivateDevices = true;
|
||||||
|
ProtectClock = true;
|
||||||
|
ProtectControlGroups = true;
|
||||||
|
ProtectHome = true;
|
||||||
|
ProtectHostname = true;
|
||||||
|
ProtectKernelLogs = true;
|
||||||
|
ProtectKernelModules = true;
|
||||||
|
ProtectKernelTunables = true;
|
||||||
|
ProtectSystem = "strict";
|
||||||
|
Restart = "always";
|
||||||
|
RestrictAddressFamilies = [
|
||||||
|
"AF_INET"
|
||||||
|
"AF_INET6"
|
||||||
|
];
|
||||||
|
RestrictNamespaces = true;
|
||||||
|
RestrictRealtime = true;
|
||||||
|
RuntimeDirectory = "dnscrypt-proxy";
|
||||||
|
StateDirectory = "dnscrypt-proxy";
|
||||||
|
SystemCallArchitectures = "native";
|
||||||
|
SystemCallFilter = [
|
||||||
|
"@system-service"
|
||||||
|
"@chown"
|
||||||
|
"~@aio"
|
||||||
|
"~@keyring"
|
||||||
|
"~@memlock"
|
||||||
|
"~@setuid"
|
||||||
|
"~@timer"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
coredump.enable = false;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
DefaultTimeoutStartSec=30s
|
DefaultTimeoutStartSec=30s
|
||||||
DefaultTimeoutStopSec=30s
|
DefaultTimeoutStopSec=30s
|
||||||
@@ -193,14 +370,13 @@
|
|||||||
|
|
||||||
services = {
|
services = {
|
||||||
acpid.enable = true;
|
acpid.enable = true;
|
||||||
btrfs.autoScrub.enable = true;
|
|
||||||
dbus.enable = true;
|
dbus.enable = true;
|
||||||
|
dbus.implementation = "broker";
|
||||||
fstrim.enable = true;
|
fstrim.enable = true;
|
||||||
fwupd.enable = true;
|
fwupd.enable = true;
|
||||||
ntp.enable = true;
|
ntp.enable = true;
|
||||||
openssh.enable = true;
|
openssh.enable = true;
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
rpcbind.enable = true;
|
|
||||||
|
|
||||||
pipewire = {
|
pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -209,21 +385,29 @@
|
|||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
libinput.enable = true;
|
||||||
xserver = {
|
xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dpi = 144;
|
dpi = 144;
|
||||||
libinput.enable = true;
|
|
||||||
desktopManager.xterm.enable = false;
|
desktopManager.xterm.enable = false;
|
||||||
displayManager = {
|
displayManager = {
|
||||||
lightdm.enable = false;
|
lightdm.enable = false;
|
||||||
startx.enable = true;
|
startx.enable = true;
|
||||||
defaultSession = "none+i3";
|
|
||||||
};
|
};
|
||||||
windowManager.i3.enable = false;
|
windowManager.i3.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
udev = {
|
udev = {
|
||||||
packages = [pkgs.rtl-sdr pkgs.openhantek6022 pkgs.openocd];
|
packages = [
|
||||||
|
pkgs.openhantek6022
|
||||||
|
pkgs.openocd
|
||||||
|
];
|
||||||
extraRules = ''
|
extraRules = ''
|
||||||
#Xilinx FTDI
|
#Xilinx FTDI
|
||||||
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Xilinx", MODE:="666"
|
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Xilinx", MODE:="666"
|
||||||
@@ -234,6 +418,9 @@
|
|||||||
|
|
||||||
#Arduino UNO r4
|
#Arduino UNO r4
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666"
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666"
|
||||||
|
|
||||||
|
#zremap on new keyboard
|
||||||
|
ACTION=="add", SUBSYSTEM=="input", ATTRS{phys}!="", KERNEL=="event[0-9]*", ENV{ID_INPUT_KEY}=="1", ENV{ID_INPUT_KEYBOARD}=="1", TAG+="systemd", ENV{SYSTEMD_WANTS}+="zremap@$env{DEVNAME}.service"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -251,32 +438,38 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
bindings = [
|
bindings = [
|
||||||
{
|
{
|
||||||
keys = [113];
|
keys = [ 113 ];
|
||||||
events = ["key"];
|
events = [ "key" ];
|
||||||
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master toggle'";
|
command = "/run/current-system/sw/bin/runuser -l ${USER} -c 'amixer -q set Master toggle'";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
keys = [114];
|
keys = [ 114 ];
|
||||||
events = ["key" "rep"];
|
events = [
|
||||||
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%- unmute'";
|
"key"
|
||||||
|
"rep"
|
||||||
|
];
|
||||||
|
command = "/run/current-system/sw/bin/runuser -l ${USER} -c 'amixer -q set Master 5%- unmute'";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
keys = [115];
|
keys = [ 115 ];
|
||||||
events = ["key" "rep"];
|
events = [
|
||||||
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%+ unmute'";
|
"key"
|
||||||
|
"rep"
|
||||||
|
];
|
||||||
|
command = "/run/current-system/sw/bin/runuser -l ${USER} -c 'amixer -q set Master 5%+ unmute'";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
keys = [224];
|
keys = [ 224 ];
|
||||||
events = ["key"];
|
events = [ "key" ];
|
||||||
command = "${pkgs.light}/bin/light -U 5";
|
command = "${pkgs.light}/bin/light -U 5";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
keys = [225];
|
keys = [ 225 ];
|
||||||
events = ["key"];
|
events = [ "key" ];
|
||||||
command = "${pkgs.light}/bin/light -A 5";
|
command = "${pkgs.light}/bin/light -A 5";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -287,45 +480,50 @@
|
|||||||
settings = {
|
settings = {
|
||||||
ipv6_servers = true;
|
ipv6_servers = true;
|
||||||
require_dnssec = true;
|
require_dnssec = true;
|
||||||
|
require_nolog = true;
|
||||||
|
require_nofilter = true;
|
||||||
|
http3 = true;
|
||||||
|
|
||||||
sources.public-resolvers = {
|
sources.public-resolvers = {
|
||||||
urls = [
|
urls = [
|
||||||
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
||||||
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
||||||
];
|
];
|
||||||
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
cache_file = "/var/lib/dnscrypt-proxy/public-resolvers.md";
|
||||||
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
borgbackup.jobs."borgbase" = let
|
borgbackup.jobs."borgbase" =
|
||||||
user = config.users.users.akill;
|
let
|
||||||
home = user.home;
|
user = config.users.users.${USER};
|
||||||
in {
|
home = user.home;
|
||||||
user = user.name;
|
in
|
||||||
paths = [
|
{
|
||||||
(home + "/pic/priv")
|
user = user.name;
|
||||||
(home + "/pproj")
|
paths = [
|
||||||
(home + "/videos/priv")
|
(home + "/pic/priv")
|
||||||
];
|
(home + "/pproj")
|
||||||
exclude = [
|
(home + "/videos/priv")
|
||||||
"**/.ccls_cache"
|
];
|
||||||
"**/*.d"
|
exclude = [
|
||||||
"**/*.map"
|
"**/.ccls_cache"
|
||||||
"**/*.o"
|
"**/*.d"
|
||||||
"**/zig-cache"
|
"**/*.map"
|
||||||
"**/zig-out"
|
"**/*.o"
|
||||||
];
|
"**/zig-cache"
|
||||||
repo = "ssh://oda929rv@oda929rv.repo.borgbase.com/./repo";
|
"**/zig-out"
|
||||||
encryption = {
|
];
|
||||||
mode = "repokey-blake2";
|
repo = "ssh://oda929rv@oda929rv.repo.borgbase.com/./repo";
|
||||||
passCommand = "${pkgs.coreutils-full}/bin/cat ${config.sops.secrets."borgbase_enc_key".path}";
|
encryption = {
|
||||||
|
mode = "repokey-blake2";
|
||||||
|
passCommand = "${pkgs.coreutils-full}/bin/cat ${config.sops.secrets."borgbase_enc_key".path}";
|
||||||
|
};
|
||||||
|
environment.BORG_RSH = "${pkgs.openssh}/bin/ssh -i ${config.sops.secrets."borgbase_ssh_key".path}";
|
||||||
|
compression = "auto,zstd";
|
||||||
|
startAt = "daily";
|
||||||
};
|
};
|
||||||
environment.BORG_RSH = "${pkgs.openssh}/bin/ssh -i ${config.sops.secrets."borgbase_ssh_key".path}";
|
|
||||||
compression = "auto,zstd";
|
|
||||||
startAt = "daily";
|
|
||||||
};
|
|
||||||
|
|
||||||
nix-serve = {
|
nix-serve = {
|
||||||
enable = false;
|
enable = false;
|
||||||
@@ -339,6 +537,23 @@
|
|||||||
logind.extraConfig = ''
|
logind.extraConfig = ''
|
||||||
KillUserProcesses=yes
|
KillUserProcesses=yes
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
seafile = {
|
||||||
|
enable = false;
|
||||||
|
initialAdminPassword = "admin";
|
||||||
|
adminEmail = "asmir.abdulahovic@gmail.com";
|
||||||
|
ccnetSettings = {
|
||||||
|
General = {
|
||||||
|
SERVICE_URL = "http://127.0.0.1:8020";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
seafileSettings = {
|
||||||
|
fileserver = {
|
||||||
|
host = "0.0.0.0";
|
||||||
|
port = 8082;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
@@ -347,7 +562,7 @@
|
|||||||
allowBitmaps = true;
|
allowBitmaps = true;
|
||||||
useEmbeddedBitmaps = true;
|
useEmbeddedBitmaps = true;
|
||||||
defaultFonts = {
|
defaultFonts = {
|
||||||
monospace = ["JetBrainsMono"];
|
monospace = [ "JetBrainsMono" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -356,27 +571,36 @@
|
|||||||
dina-font
|
dina-font
|
||||||
fira-code
|
fira-code
|
||||||
fira-code-symbols
|
fira-code-symbols
|
||||||
font-awesome
|
font-awesome_6
|
||||||
font-awesome_4
|
|
||||||
inconsolata
|
inconsolata
|
||||||
iosevka
|
iosevka
|
||||||
jetbrains-mono
|
jetbrains-mono
|
||||||
liberation_ttf
|
liberation_ttf
|
||||||
|
libertine
|
||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-cjk
|
noto-fonts-cjk-sans
|
||||||
|
noto-fonts-color-emoji
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
proggyfonts
|
proggyfonts
|
||||||
siji
|
siji
|
||||||
terminus_font
|
terminus_font
|
||||||
terminus_font_ttf
|
terminus_font_ttf
|
||||||
ubuntu_font_family
|
ubuntu_font_family
|
||||||
|
vistafonts
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
|
libvirtd = {
|
||||||
|
enable = true;
|
||||||
|
allowedBridges = [
|
||||||
|
"virbr0"
|
||||||
|
"br0"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
spiceUSBRedirection.enable = true;
|
||||||
containers.storage.settings = {
|
containers.storage.settings = {
|
||||||
storage = {
|
storage = {
|
||||||
driver = "btrfs";
|
|
||||||
graphroot = "/var/lib/containers/storage";
|
graphroot = "/var/lib/containers/storage";
|
||||||
runroot = "/run/containers/storage";
|
runroot = "/run/containers/storage";
|
||||||
};
|
};
|
||||||
@@ -388,8 +612,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sound.enable = true;
|
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
bluetooth = {
|
bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -400,12 +622,11 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
opengl = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
extraPackages = [ ];
|
||||||
driSupport32Bit = true;
|
|
||||||
extraPackages = with pkgs; [];
|
|
||||||
};
|
};
|
||||||
|
rtl-sdr.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
zramSwap = {
|
zramSwap = {
|
||||||
@@ -413,9 +634,18 @@
|
|||||||
algorithm = "zstd";
|
algorithm = "zstd";
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.akill = {
|
users.users.${USER} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = ["wireshark" "kvm" "tty" "audio" "sound" "adbusers" "dialout" "wheel"];
|
extraGroups = [
|
||||||
|
"wireshark"
|
||||||
|
"kvm"
|
||||||
|
"tty"
|
||||||
|
"audio"
|
||||||
|
"sound"
|
||||||
|
"adbusers"
|
||||||
|
"dialout"
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,74 +4,62 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
boot.initrd.luks.devices."crypt_dev".device =
|
||||||
boot.initrd.kernelModules = [];
|
"/dev/disk/by-uuid/e10821b9-5426-4f03-b716-1645a64fcd6a";
|
||||||
boot.kernelModules = ["kvm-amd" "amdgpu"];
|
boot.initrd.luks.devices."crypt_dev".allowDiscards = true;
|
||||||
boot.extraModulePackages = [];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"ehci_pci"
|
||||||
|
"xhci_pci"
|
||||||
|
"uas"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"rtsx_pci_sdmmc"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
|
boot.kernelModules = [
|
||||||
|
"kvm-amd"
|
||||||
|
"amd-gpu"
|
||||||
|
];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/f06ac545-07c1-4b2b-8c0b-eeac43892933";
|
device = "/dev/disk/by-uuid/c461c971-54ca-4fb7-91e8-6ac70de53ef2";
|
||||||
fsType = "btrfs";
|
fsType = "xfs";
|
||||||
options = ["subvol=root" "compress=lzo" "noatime"];
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.initrd.luks.devices."sys_enc".device = "/dev/disk/by-uuid/682d030d-189e-4b47-a60a-62cf1f3729d3";
|
|
||||||
|
|
||||||
fileSystems."/home" = {
|
|
||||||
device = "/dev/disk/by-uuid/f06ac545-07c1-4b2b-8c0b-eeac43892933";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = ["subvol=home" "compress=lzo" "noatime"];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" = {
|
fileSystems."/nix" = {
|
||||||
device = "/dev/disk/by-uuid/f06ac545-07c1-4b2b-8c0b-eeac43892933";
|
device = "/dev/disk/by-uuid/eeaa6fab-d67d-400f-b6d4-b1f44c2e0047";
|
||||||
fsType = "btrfs";
|
fsType = "xfs";
|
||||||
options = ["subvol=nix" "compress=lzo" "noatime"];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/persist" = {
|
fileSystems."/home" = {
|
||||||
device = "/dev/disk/by-uuid/f06ac545-07c1-4b2b-8c0b-eeac43892933";
|
device = "/dev/disk/by-uuid/aeaa71ca-a439-4ef3-9ab8-db7ae8f59376";
|
||||||
fsType = "btrfs";
|
fsType = "xfs";
|
||||||
options = ["subvol=persist" "compress=lzo" "noatime"];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/var/log" = {
|
|
||||||
device = "/dev/disk/by-uuid/f06ac545-07c1-4b2b-8c0b-eeac43892933";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = ["subvol=log" "compress=lzo" "noatime"];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/3F3E-9833";
|
device = "/dev/disk/by-uuid/828E-F3C3";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/opt/xilinx" = {
|
swapDevices = [ ];
|
||||||
device = "/dev/disk/by-uuid/f5c27ef2-8053-4d96-9f8f-c6a50d6193b9";
|
|
||||||
fsType = "erofs";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
/*
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
{
|
hardware.enableRedistributableFirmware = true;
|
||||||
device = "/dev/disk/by-uuid/ee1792c9-098b-40c1-b760-20def16ba67f";
|
|
||||||
encrypted = {
|
|
||||||
enable = true;
|
|
||||||
keyFile = "/mnt-root/swap.key";
|
|
||||||
label = "swap_encr";
|
|
||||||
blkDev = "/dev/disk/by-uuid/aee12e27-b45a-4291-be78-db0a903071b3";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
];
|
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
nix.settings.max-jobs = lib.mkDefault 8;
|
|
||||||
}
|
}
|
||||||
|
|||||||
22
nixy/secrets/wg_privkey_proton.yaml
Normal file
22
nixy/secrets/wg_privkey_proton.yaml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
wg_privkey_proton: ENC[AES256_GCM,data:qVVd+1s2T3sKDi03V+eMvgqW8LAVl/yEKwtG2EMn8NhBCN7RvlttC5SeIDM=,iv:/QcrtmMjCzZRulumIz5u9oxyaRt+HUq96ZiP8ecpvAo=,tag:1DCaJqVGfg3sfvKTQnmzZA==,type:str]
|
||||||
|
wg_endpoint_proton: ENC[AES256_GCM,data:ggoWnB6nGjGc/kSOaCo=,iv:1r5J6SO5JYH7+bMhE2lGwfFETVFeS61eCXtej0Pl07M=,tag:p+0hhQ/vqZzZML24YReA0g==,type:str]
|
||||||
|
sops:
|
||||||
|
kms: []
|
||||||
|
gcp_kms: []
|
||||||
|
azure_kv: []
|
||||||
|
hc_vault: []
|
||||||
|
age:
|
||||||
|
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
|
||||||
|
enc: |
|
||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxdXZpL1lrOEYyYVdFTzNJ
|
||||||
|
SHhXRVc5Y0o4ZzN2THRjM215UWczVjZOTXg4CjBJZ2VxN0t0ZFgzTmJMeXo5SWZk
|
||||||
|
UjRlNmdRTVVPbHVEeXM3TWhoS0pSUTQKLS0tIEtkTURBc1A3d2lTalhmeEoxUkZj
|
||||||
|
K3BHZnUzN3ZrL1dFQk8rWFpZR05pbFUKObrnIpY3NR1o3/lKhTfVpQU+eQRTi7wF
|
||||||
|
SAjGZ5BRdCi5x1VWRxiT1Fvjqkm7kBEQFvdSvbqW2UK6lVHtWgt2Vg==
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
||||||
|
lastmodified: "2024-05-12T13:30:18Z"
|
||||||
|
mac: ENC[AES256_GCM,data:3UqJGcNGPZDlLA3a0uNHUI0ykDC0ByxAR2ZsrsbWQMv3BS6zyBuc+zpTHQZoIPGsAMUetuB3OuA0IQNll3abg6u2AadEQBUf1PYMWlo58txLYlAs/q0g+575F+LhDSgmDMKOFXz4HqbFP0RYTHkPnmjWPMWWY3G9o6B3Iaw5+Kc=,iv:massJRpGcH4pDZxJrpQYy80XVViyw+qFsZ8Sk9Xze08=,tag:eDvuNadKGKBS/3jauvnuFQ==,type:str]
|
||||||
|
pgp: []
|
||||||
|
unencrypted_suffix: _unencrypted
|
||||||
|
version: 3.8.1
|
||||||
1
nixy/wg_pubkey_nx
Normal file
1
nixy/wg_pubkey_nx
Normal file
@@ -0,0 +1 @@
|
|||||||
|
eoYSDh27qQFpvOcDmuVFzSTuPnrHQYXDMqatKmDAth0=
|
||||||
@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
|
|||||||
description = "Unprivileged sandboxing tool";
|
description = "Unprivileged sandboxing tool";
|
||||||
homepage = "https://github.com/containers/bubblewrap";
|
homepage = "https://github.com/containers/bubblewrap";
|
||||||
license = licenses.lgpl2Plus;
|
license = licenses.lgpl2Plus;
|
||||||
maintainers = with maintainers; [dotlambda];
|
maintainers = with maintainers; [ dotlambda ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
mainProgram = "bwrap";
|
mainProgram = "bwrap";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,16 +44,16 @@
|
|||||||
}:
|
}:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "viber";
|
pname = "viber";
|
||||||
version = "21.8.0.11";
|
version = "23.2.0.3";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
# Official link: https://download.cdn.viber.com/cdn/desktop/Linux/viber.deb
|
# Official link: https://download.cdn.viber.com/cdn/desktop/Linux/viber.deb
|
||||||
url = "https://download.cdn.viber.com/cdn/desktop/Linux/viber.deb";
|
url = "https://download.cdn.viber.com/cdn/desktop/Linux/viber.deb";
|
||||||
hash = "sha256-RrObmN21QOm5nk0R2avgCH0ulrfiUIo2PnyYWvQaGVw=";
|
hash = "sha256-9WHiI2WlsgEhCPkrQoAunmF6lSb2n5RgQJ2+sdnSShM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [makeWrapper];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
buildInputs = [dpkg];
|
buildInputs = [ dpkg ];
|
||||||
|
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
|
|
||||||
@@ -115,55 +115,57 @@ stdenv.mkDerivation {
|
|||||||
xorg.libxkbfile
|
xorg.libxkbfile
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = let
|
installPhase =
|
||||||
viberWrap = writeShellScriptBin "viberWrap" ''
|
let
|
||||||
${bubblewrap}/bin/bwrap --bind / / \
|
viberWrap = writeShellScriptBin "viberWrap" ''
|
||||||
--dev /dev \
|
${bubblewrap}/bin/bwrap --bind / / \
|
||||||
--tmpfs $HOME \
|
--dev /dev \
|
||||||
--bind $HOME/.ViberPC/ $HOME/.ViberPC \
|
--tmpfs $HOME \
|
||||||
--bind $HOME/Downloads/ $HOME/Downloads \
|
--bind $HOME/.ViberPC/ $HOME/.ViberPC \
|
||||||
$@
|
--bind $HOME/Downloads/ $HOME/Downloads \
|
||||||
|
$@
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
''
|
||||||
|
dpkg-deb -x $src $out
|
||||||
|
mkdir -p $out/bin
|
||||||
|
|
||||||
|
# Soothe nix-build "suspicions"
|
||||||
|
chmod -R g-w $out
|
||||||
|
|
||||||
|
for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
|
||||||
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
|
||||||
|
patchelf --set-rpath $libPath:$out/opt/viber/lib $file || true
|
||||||
|
done
|
||||||
|
|
||||||
|
# qt.conf is not working, so override everything using environment variables
|
||||||
|
wrapProgram $out/opt/viber/Viber \
|
||||||
|
--set QT_PLUGIN_PATH "$out/opt/viber/plugins" \
|
||||||
|
--set QT_XKB_CONFIG_ROOT "${xorg.xkeyboardconfig}/share/X11/xkb" \
|
||||||
|
--set QTCOMPOSE "${xorg.libX11.out}/share/X11/locale" \
|
||||||
|
--set QML2_IMPORT_PATH "$out/opt/viber/qml"
|
||||||
|
|
||||||
|
echo "#!${bash}/bin/bash" > $out/bin/viber
|
||||||
|
echo "${viberWrap}/bin/viberWrap $out/opt/viber/Viber" >> $out/bin/viber
|
||||||
|
chmod +x $out/bin/viber
|
||||||
|
|
||||||
|
mv $out/usr/share $out/share
|
||||||
|
rm -rf $out/usr
|
||||||
|
|
||||||
|
# Fix the desktop link
|
||||||
|
substituteInPlace $out/share/applications/viber.desktop \
|
||||||
|
--replace /opt/viber/Viber $out/opt/viber/Viber \
|
||||||
|
--replace /usr/share/ $out/share/
|
||||||
'';
|
'';
|
||||||
in ''
|
|
||||||
dpkg-deb -x $src $out
|
|
||||||
mkdir -p $out/bin
|
|
||||||
|
|
||||||
# Soothe nix-build "suspicions"
|
|
||||||
chmod -R g-w $out
|
|
||||||
|
|
||||||
for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
|
|
||||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
|
|
||||||
patchelf --set-rpath $libPath:$out/opt/viber/lib $file || true
|
|
||||||
done
|
|
||||||
|
|
||||||
# qt.conf is not working, so override everything using environment variables
|
|
||||||
wrapProgram $out/opt/viber/Viber \
|
|
||||||
--set QT_PLUGIN_PATH "$out/opt/viber/plugins" \
|
|
||||||
--set QT_XKB_CONFIG_ROOT "${xorg.xkeyboardconfig}/share/X11/xkb" \
|
|
||||||
--set QTCOMPOSE "${xorg.libX11.out}/share/X11/locale" \
|
|
||||||
--set QML2_IMPORT_PATH "$out/opt/viber/qml"
|
|
||||||
|
|
||||||
echo "#!${bash}/bin/bash" > $out/bin/viber
|
|
||||||
echo "${viberWrap}/bin/viberWrap $out/opt/viber/Viber" >> $out/bin/viber
|
|
||||||
chmod +x $out/bin/viber
|
|
||||||
|
|
||||||
mv $out/usr/share $out/share
|
|
||||||
rm -rf $out/usr
|
|
||||||
|
|
||||||
# Fix the desktop link
|
|
||||||
substituteInPlace $out/share/applications/viber.desktop \
|
|
||||||
--replace /opt/viber/Viber $out/opt/viber/Viber \
|
|
||||||
--replace /usr/share/ $out/share/
|
|
||||||
'';
|
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
dontPatchELF = true;
|
dontPatchELF = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://www.viber.com";
|
homepage = "https://www.viber.com";
|
||||||
description = "An instant messaging and Voice over IP (VoIP) app";
|
description = "An instant messaging and Voice over IP (VoIP) app";
|
||||||
sourceProvenance = with lib.sourceTypes; [binaryNativeCode];
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
platforms = ["x86_64-linux"];
|
platforms = [ "x86_64-linux" ];
|
||||||
maintainers = with lib.maintainers; [jagajaga];
|
maintainers = with lib.maintainers; [ jagajaga ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user