1 Commits

Author SHA1 Message Date
eef00a167f packages/zapzap: cleanup 2024-01-14 21:08:36 +01:00
58 changed files with 1486 additions and 3349 deletions

View File

@@ -1,30 +0,0 @@
keys:
- &magpie age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
- &mediabox age19yrl6pr73cv067ksfz0txp3zm2au25jfyjeerw23ml55ps5cyyfqtm3kmt
- &nixy age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
creation_rules:
- path_regex: common/secrets/[^/]+\.yaml$
key_groups:
- age:
- *magpie
- *mediabox
- *nixy
- path_regex: magpie/secrets/[^/]+\.yaml$
key_groups:
- age:
- *magpie
- *nixy
- path_regex: mediabox/secrets/[^/]+\.yaml$
key_groups:
- age:
- *mediabox
- *nixy
- path_regex: nixy/secrets/[^/]+\.yaml$
key_groups:
- age:
- *nixy

View File

@@ -1,9 +1,9 @@
{ {
config, config,
pkgs, pkgs,
lib,
... ...
}: }: {
{
imports = [ imports = [
]; ];
@@ -14,17 +14,14 @@
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.nixVersions.latest; package = pkgs.nixUnstable;
settings.experimental-features = [ settings.experimental-features = ["nix-command" "flakes"];
"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 = {
@@ -43,7 +40,7 @@
doas.enable = true; doas.enable = true;
doas.extraRules = [ doas.extraRules = [
{ {
users = [ "akill" ]; users = ["akill"];
keepEnv = true; keepEnv = true;
persist = true; persist = true;
} }
@@ -57,16 +54,15 @@
networking = { networking = {
firewall.enable = true; firewall.enable = true;
hostName = "blue"; hostName = "blue";
nameservers = [ nameservers = ["127.0.0.1" "::1"];
"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";
*/
}; };
}; };
@@ -97,8 +93,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 \
@@ -157,10 +153,7 @@
windowManager.i3.enable = true; windowManager.i3.enable = true;
}; };
udev.packages = [ udev.packages = [pkgs.rtl-sdr pkgs.openhantek6022];
pkgs.rtl-sdr
pkgs.openhantek6022
];
tlp = { tlp = {
enable = true; enable = true;
@@ -170,38 +163,32 @@
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 = [ events = ["key" "rep"];
"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 = [ events = ["key" "rep"];
"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";
} }
]; ];
@@ -251,7 +238,7 @@
allowBitmaps = true; allowBitmaps = true;
useEmbeddedBitmaps = true; useEmbeddedBitmaps = true;
defaultFonts = { defaultFonts = {
monospace = [ "JetBrainsMono" ]; monospace = ["JetBrainsMono"];
}; };
}; };
@@ -320,14 +307,6 @@
users.users.akill = { users.users.akill = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = [ extraGroups = ["wireshark" "kvm" "tty" "audio" "sound" "adbusers" "dialout"];
"wireshark"
"kvm"
"tty"
"audio"
"sound"
"adbusers"
"dialout"
];
}; };
} }

View File

@@ -4,79 +4,50 @@
{ {
config, config,
lib, lib,
pkgs,
modulesPath, modulesPath,
... ...
}: }: {
{
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod"];
"xhci_pci" boot.initrd.kernelModules = [];
"ahci" boot.kernelModules = ["kvm-intel"];
"nvme" boot.extraModulePackages = [];
"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 = [ options = ["subvol=root" "compress=zstd" "noatime"];
"subvol=root"
"compress=zstd"
"noatime"
];
}; };
boot.initrd.luks.devices."enc_root".device = boot.initrd.luks.devices."enc_root".device = "/dev/disk/by-uuid/8eb8ac22-d89d-4406-bfbd-ce43e283649f";
"/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 = [ options = ["subvol=home" "compress=zstd" "noatime"];
"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 = [ options = ["subvol=nix" "compress=zstd" "noatime"];
"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 = [ options = ["subvol=log" "compress=zstd" "noatime"];
"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 = [ options = ["subvol=persist" "compress=zstd" "noatime"];
"subvol=persist"
"compress=zstd"
"noatime"
];
}; };
fileSystems."/boot" = { fileSystems."/boot" = {
@@ -84,7 +55,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

View File

@@ -1,52 +1,36 @@
{ pkgs
, system
, ...
}:
{ {
environment.systemPackages = config,
with pkgs; pkgs,
nix-xilinx,
...
}: {
environment.systemPackages = with pkgs;
[ [
onboard
maliit-keyboard
maliit-framework
wvkbd
acpi acpi
aria2
binutils binutils
binwalk
bluez bluez
bluez-tools bluez-tools
btop btop
busybox curlHTTP3
curl
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
@@ -58,13 +42,10 @@
nmap nmap
ntfs3g ntfs3g
ntfsprogs ntfsprogs
nvim
nvme-cli
openhantek6022 openhantek6022
optipng optipng
pax-utils pax-utils
pciutils pciutils
proxychains-ng
pstree pstree
psutils psutils
qemu_kvm qemu_kvm
@@ -72,7 +53,6 @@
rsync rsync
silver-searcher silver-searcher
socat socat
sops
sshfs sshfs
strace strace
swaylock swaylock
@@ -90,11 +70,9 @@
vulkan-tools-lunarg vulkan-tools-lunarg
vulkan-validation-layers vulkan-validation-layers
wget wget
wirelesstools
wol
xdg-utils xdg-utils
xfsprogs
zip zip
z-lua z-lua
]; ]
++ (with nix-xilinx.packages.x86_64-linux; [vivado vitis vitis_hls model_composer xilinx-shell]);
} }

View File

@@ -1,42 +0,0 @@
wg_preshared:
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]
workstation: ENC[AES256_GCM,data:x60PMdgihMjtvQagphdO0uft7LLU2grdgeTrO5oSRiqOtb23P5S5SxDQ3Js=,iv:CB8QldIZ8/FjbcAkLxekygUo5luHig7FnH7wyrgZEuk=,tag:E3XWxPH5/fHyFmGimQ4tLg==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAzQ3JGNWRMeGhwM1dIOU5T
ZEt4WVhFa2lSaklpM3hmR04wY213TGd6K1FvCnltWFpqNHdrQ2V1V2ZDdTVOYlhP
M0x2TVRJbUtZK2xaOGE5Ri93YmV6R1UKLS0tIDQ3VkNrYjFNTjNrRTNFRmhYaENt
ZkRpMnZ3ZldOdWJ3VGw1T1RnRG15WDQKeZ9VBkcu2j83Hjofy1AAtBBqM9Tk3uFi
F/wgzV7mBXiBB/4w17iJsU5mB6s/JXXnGq11pu9QXC5tu072huCNYQ==
-----END AGE ENCRYPTED FILE-----
- recipient: age19yrl6pr73cv067ksfz0txp3zm2au25jfyjeerw23ml55ps5cyyfqtm3kmt
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBheWtsbnArT3BwSVJ4QTJB
ZENTK2ZpS0lLUmJ1d1VaUVVGNnNXMEZ4RFJvCmFueFNiQjk5MkdnTVkvVVk1TkVV
M2Izamo0M1lGaVRPaGFOQUhkNGpmSmsKLS0tIGxtSXVackdsTTN1cTIvSEo4bGg3
a0dVL2FmL05TRllrZjBuOStPNTBHcU0KOaJFNhr0emSiAJFOFsaJ4sdUwjzg5TOW
Mh3JvRJINefiBUsFnFx8d3gn0+jHn+kXw22WMGRcbGgZTxJbFylmeA==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB5UVJiMENSeFdGWHRVVkt0
UEI4ek9jRFdYYkN5Nlc5Qi85MDhPRTA2bGt3CnZJcThNU1huczJGaEF6WWpzcHdV
dWhIczMzWSt0ZEVXeXdVQlBOZTZsN3cKLS0tIHRBQlhPT1FDcEZWU3JyNEZ0UWxC
eDhXVWo2UHVCaFUrak9aVEU5N0FxRVEKDKBpbHWwTkW3BFAXQ213/glZyTz88OjZ
JHh0phDzFZG0+nzBz3TAi0ZyYnlbOYAuEvQh1uUg9MI1XUCr8GC9Qw==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-22T16:06:34Z"
mac: ENC[AES256_GCM,data:BRgF+L22FuN/v+Vi57JLaTxtAe4Gr8UtY4QIYRUeigpHCkxza+pUd5qyGTIsHeaRFWNy726u9+PlX3uy0MlOt9lzQ1Zlmc+hDthUIHRWX9mqO+j5+klmDvVug5yqr2f7HMtBD+tnEwDr65FuPNKqJjmg1Tbk0RD12yt/gkEAy7w=,iv:aTWVlHEQGNgnIIoJ2IpnppU6lo7g0kI7gxtPM1ZqXvM=,tag:PhZypRZAlmxnKz1Kxtppzg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@@ -4,11 +4,9 @@
pkgs, pkgs,
... ...
}: }:
with lib; with lib; let
let
cfg = config.services.batteryNotifier; cfg = config.services.batteryNotifier;
in in {
{
options = { options = {
services.batteryNotifier = { services.batteryNotifier = {
enable = mkOption { enable = mkOption {
@@ -44,7 +42,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";

View File

@@ -1 +0,0 @@
g6DkXWKI/68RsLjROIwCEcyB/ZhyK5Q7OWcz1TtqER0=

View File

@@ -1 +0,0 @@
kbmzzQc3bBpkjE7K/ohycZtx+ml+dzVYOQ2xM0/bzzQ=

247
flake.lock generated
View File

@@ -19,11 +19,11 @@
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1732722421, "lastModified": 1696426674,
"narHash": "sha256-HRJ/18p+WoXpWJkcdsk9St5ZiukCqSDgbOGFa8Okehg=", "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "9ed2ac151eada2306ca8c418ebd97807bb08f6ac", "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -35,11 +35,11 @@
"flake-compat_2": { "flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1761588595, "lastModified": 1673956053,
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -48,51 +48,37 @@
"type": "github" "type": "github"
} }
}, },
"git-hooks": { "flake-compat_3": {
"inputs": { "flake": false,
"flake-compat": [
"simple-nixos-mailserver",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"simple-nixos-mailserver",
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1763988335, "lastModified": 1668681692,
"narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=", "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "cachix", "owner": "edolstra",
"repo": "git-hooks.nix", "repo": "flake-compat",
"rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", "rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "cachix", "owner": "edolstra",
"repo": "git-hooks.nix", "repo": "flake-compat",
"type": "github" "type": "github"
} }
}, },
"gitignore": { "flake-utils": {
"inputs": { "inputs": {
"nixpkgs": [ "systems": "systems"
"simple-nixos-mailserver",
"git-hooks",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1709087332, "lastModified": 1681202837,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "hercules-ci", "owner": "numtide",
"repo": "gitignore.nix", "repo": "flake-utils",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "hercules-ci", "owner": "numtide",
"repo": "gitignore.nix", "repo": "flake-utils",
"type": "github" "type": "github"
} }
}, },
@@ -103,16 +89,15 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764536451, "lastModified": 1699368917,
"narHash": "sha256-BgtcUkBfItu9/yU14IgUaj4rYOanTOUZjUfBP20/ZB4=", "narHash": "sha256-nUtGIWf86BOkUbtksWtfglvCZ/otP0FTZlQH8Rzc7PA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "3fdd076e08049a9c7a83149b270440d9787d2df5", "rev": "6a8444467c83c961e2f5ff64fb4f422e303c98d3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-25.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@@ -125,11 +110,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1732892167, "lastModified": 1699035130,
"narHash": "sha256-AZ0rgM9xj+Bf2C8RfGMUvuVdcqkvQU5/Wm8u6A5xYJg=", "narHash": "sha256-emK4aJCC2gW94b2P3N2LjkQ6PEMLUcDduVWwYQ7aq+o=",
"owner": "asmir.abdulahovic", "owner": "asmir.abdulahovic",
"repo": "nix-xilinx", "repo": "nix-xilinx",
"rev": "3071f40914fe2db3837a40a72a97af6f0a442f16", "rev": "0323990db46c32e361e4fd70600d859eb90862af",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -140,16 +125,62 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1764522689, "lastModified": 1699099776,
"narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=", "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f", "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-25.11", "ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-22_11": {
"locked": {
"lastModified": 1669558522,
"narHash": "sha256-yqxn+wOiPqe6cxzOo4leeJOp1bXE/fjPEi/3F/bBHv8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ce5fe99df1f15a09a91a86be9738d68fadfbad82",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-22.11",
"type": "indirect"
}
},
"nixpkgs-23_05": {
"locked": {
"lastModified": 1684782344,
"narHash": "sha256-SHN8hPYYSX0thDrMLMWPWYulK3YFgASOrCsIL3AJ78g=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8966c43feba2c701ed624302b6a935f97bcbdf88",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.05",
"type": "indirect"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1699110214,
"narHash": "sha256-L2TU4RgtiqF69W8Gacg2jEkEYJrW+Kp0Mp4plwQh5b8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "78f3a4ae19f0e99d5323dd2e3853916b8ee4afee",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -161,11 +192,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764594740, "lastModified": 1698783626,
"narHash": "sha256-YLyM7w1j7BcOK9F+L7x7iY9wfOzPfcIBWW9LeU9Wzoo=", "narHash": "sha256-esHANPDZbeIiBlXdFjBXpalHzSgtn+2TOmUa76dE6us=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "878c87430f5e3c109f183a1822988b1c32413131", "rev": "b660608fb3ff05e1ba88222d2e8d16a8ca5e580e",
"revCount": 51, "revCount": 20,
"type": "git", "type": "git",
"url": "https://git.project-cloud.net/asmir/nvim_flake" "url": "https://git.project-cloud.net/asmir/nvim_flake"
}, },
@@ -174,6 +205,28 @@
"url": "https://git.project-cloud.net/asmir/nvim_flake" "url": "https://git.project-cloud.net/asmir/nvim_flake"
} }
}, },
"peerix": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1684706914,
"narHash": "sha256-pBlTtsC28e/5MUTe4NWeNNOc/4Kf6EzGQGppQEQ/ioo=",
"owner": "asmir.abdulahovic",
"repo": "peerix",
"rev": "8fdbbd0039240e05b4f93bbd5b454d5643e8a8d1",
"type": "gitlab"
},
"original": {
"owner": "asmir.abdulahovic",
"repo": "peerix",
"type": "gitlab"
}
},
"project-cloud": { "project-cloud": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -183,11 +236,11 @@
"theme_deepthought": "theme_deepthought" "theme_deepthought": "theme_deepthought"
}, },
"locked": { "locked": {
"lastModified": 1729077289, "lastModified": 1700078801,
"narHash": "sha256-z5LEPxOJq2LjhPhY4QE1IOt0lBD39cipR6Lw8vRTNlI=", "narHash": "sha256-Zpfr8dJvhv3rMcrz1KYYepdVLmzQYKUN+coOzGSLOE4=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "eab712e42139d33911ba767c2ff1bfbdf05c254d", "rev": "6873fb66dd84c051a30b857d2286eab4e1a4db86",
"revCount": 27, "revCount": 16,
"type": "git", "type": "git",
"url": "https://git.project-cloud.net/asmir/project-cloud" "url": "https://git.project-cloud.net/asmir/project-cloud"
}, },
@@ -202,6 +255,7 @@
"nix-xilinx": "nix-xilinx", "nix-xilinx": "nix-xilinx",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nvim": "nvim", "nvim": "nvim",
"peerix": "peerix",
"project-cloud": "project-cloud", "project-cloud": "project-cloud",
"simple-nixos-mailserver": "simple-nixos-mailserver", "simple-nixos-mailserver": "simple-nixos-mailserver",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
@@ -212,18 +266,20 @@
"simple-nixos-mailserver": { "simple-nixos-mailserver": {
"inputs": { "inputs": {
"blobs": "blobs", "blobs": "blobs",
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_3",
"git-hooks": "git-hooks",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ],
"nixpkgs-22_11": "nixpkgs-22_11",
"nixpkgs-23_05": "nixpkgs-23_05",
"utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1764381008, "lastModified": 1695910380,
"narHash": "sha256-s+/BuhPPSJHpPRcylqfW+3UFyYsHjAhKdtPSxusYn0U=", "narHash": "sha256-CyzeiXQGm8ceEOSK1dffBCfO7JNp8XhQeNkUiJ5HxgY=",
"owner": "simple-nixos-mailserver", "owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver", "repo": "nixos-mailserver",
"rev": "76bd7a85e78a9b8295782a9cf719ec3489d8eb55", "rev": "84783b661ecf33927c534b6476beb74ea3308968",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -236,14 +292,15 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ],
"nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1764483358, "lastModified": 1699311858,
"narHash": "sha256-EyyvCzXoHrbL467YSsQBTWWg4sR96MH1sPpKoSOelB4=", "narHash": "sha256-W/sQrghPAn5J9d+9kMnHqi4NPVWVpy0V/qzQeZfS/dM=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "5aca6ff67264321d47856a2ed183729271107c9c", "rev": "664187539871f63857bda2d498f452792457b998",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -259,11 +316,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1711800706, "lastModified": 1698401726,
"narHash": "sha256-VuClUfWEmuv6Ysf6g42rfIm4cRZ/DWYZJxlNd9f1IL4=", "narHash": "sha256-kGMqxaNaNSbKJS/55KqqMvLj1xOBc8zCizs6I3xiCo0=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "7422c005ffdd282c389d21c5f8a4ea835bc1a0f0", "rev": "1e49032fbfec10b51c9f627aab286290ac15977c",
"revCount": 4, "revCount": 3,
"type": "git", "type": "git",
"url": "https://git.project-cloud.net/asmir/swaysw" "url": "https://git.project-cloud.net/asmir/swaysw"
}, },
@@ -272,6 +329,21 @@
"url": "https://git.project-cloud.net/asmir/swaysw" "url": "https://git.project-cloud.net/asmir/swaysw"
} }
}, },
"systems": {
"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": {
@@ -304,6 +376,21 @@
"type": "github" "type": "github"
} }
}, },
"utils": {
"locked": {
"lastModified": 1605370193,
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5021eac20303a61fafe17224c087f5519baed54d",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"zremap": { "zremap": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -311,17 +398,17 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764579633, "lastModified": 1696448728,
"narHash": "sha256-gOD5RMHOB9Fw4T3nk2a95YdU0J24QU3uWUiZVIQza64=", "narHash": "sha256-kUc6983IX9n0eQxTFZRK7LYCLHoxoGZ5rOV7nu8hGRI=",
"ref": "refs/heads/master", "owner": "asmir.abdulahovic",
"rev": "b0707744e2b4a077e759145cdbfa8d8d1017e732", "repo": "zremap",
"revCount": 25, "rev": "9043844893cfc333ed04d04c1d3b67d9904c0afc",
"type": "git", "type": "gitlab"
"url": "https://git.project-cloud.net/asmir/zremap"
}, },
"original": { "original": {
"type": "git", "owner": "asmir.abdulahovic",
"url": "https://git.project-cloud.net/asmir/zremap" "repo": "zremap",
"type": "gitlab"
} }
} }
}, },

231
flake.nix
View File

@@ -2,15 +2,20 @@
description = "NixOS configuration"; description = "NixOS configuration";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nix-xilinx = { nix-xilinx = {
url = "gitlab:asmir.abdulahovic/nix-xilinx"; url = "gitlab:asmir.abdulahovic/nix-xilinx";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
peerix = {
url = "gitlab:asmir.abdulahovic/peerix";
inputs.nixpkgs.follows = "nixpkgs";
};
zremap = { zremap = {
url = "git+https://git.project-cloud.net/asmir/zremap"; url = "gitlab:asmir.abdulahovic/zremap";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -30,7 +35,7 @@
}; };
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-25.11"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -45,112 +50,124 @@
}; };
}; };
outputs = outputs = inputs @ {
inputs@{ home-manager home-manager,
, nixpkgs nixpkgs,
, nix-xilinx nix-xilinx,
, nvim nvim,
, project-cloud peerix,
, simple-nixos-mailserver simple-nixos-mailserver,
, sops-nix sops-nix,
, swaysw swaysw,
, zremap zremap,
, ... project-cloud,
}: ...
let }: let
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs; pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
in in {
{ nixosConfigurations = rec {
nixosConfigurations = { nixy = nixpkgs.lib.nixosSystem {
nixy = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux";
system = "x86_64-linux"; modules = [
modules = [ {_module.args = inputs;}
{ _module.args = inputs; } {nix.registry.nixpkgs.flake = nixpkgs;}
{ _module.args.system = system; } ./common/packages.nix
{ nix.registry.nixpkgs.flake = nixpkgs; } ./common/suspend.nix
./common/packages.nix ./nixy/configuration.nix
./common/suspend.nix ./nixy/hardware-configuration.nix
./nixy/configuration.nix sops-nix.nixosModules.sops
./nixy/hardware-configuration.nix home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops {
home-manager.nixosModules.home-manager home-manager.useGlobalPkgs = true;
{ home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true; home-manager.users.akill = import ./home/home.nix;
home-manager.useUserPackages = true; home-manager.extraSpecialArgs = {inherit inputs;};
home-manager.users.akill = import ./home/nixy/home.nix; }
home-manager.extraSpecialArgs = { inherit inputs system; }; peerix.nixosModules.peerix
home-manager.backupFileExtension = "home_backup"; {
} services.peerix = {
]; enable = true;
}; globalCacheTTL = 10;
package = peerix.packages.x86_64-linux.peerix;
mediabox = nixpkgs.lib.nixosSystem rec { openFirewall = true; # UDP/12304
system = "x86_64-linux"; privateKeyFile = nixy.config.sops.secrets."peerix/private".path;
modules = [ publicKeyFile = ./nixy/peerix-public;
{ _module.args = inputs; } publicKey = "peerix-mediabox:UDgG3xdQYv7bmx2l4ZPNRPJtp2zMmY++H/fnGeJ9BQw=";
{ _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/mediabox/home.nix;
home-manager.extraSpecialArgs = { inherit inputs system; };
}
];
};
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/blue/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")
];
};
};
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; mediabox = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{_module.args = inputs;}
{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;};
}
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 {
system = "x86_64-linux";
modules = [
{_module.args = inputs;}
{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;
}
];
};
magpie = nixpkgs.lib.nixosSystem {
system = "arm64-linux";
modules = [
{_module.args = inputs;}
{nix.registry.nixpkgs.flake = nixpkgs;}
./magpie/configuration.nix
./magpie/hardware-configuration.nix
sops-nix.nixosModules.sops
simple-nixos-mailserver.nixosModule
(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;
};
} }

View File

@@ -1,182 +0,0 @@
{
lib,
pkgs,
inputs,
system,
...
}:
let
chromium_teams = pkgs.writeShellScriptBin "chromium_teams" ''
${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://teams.microsoft.com/
'';
chromium_discord = pkgs.writeShellScriptBin "chromium_discord" ''
${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/
'';
nixy_switch = pkgs.writeShellScriptBin "nixy_switch" ''
${pkgs.util-linux}/bin/ionice -c 3 -- \
${pkgs.coreutils}/bin/nice -n 20 -- \
${lib.getExe pkgs.nixos-rebuild} --flake ./#nixy switch
'';
qcad = pkgs.writeShellScriptBin "qcad" ''
QT_QPA_PLATFORM=xcb ${lib.getExe pkgs.qcad} $@
'';
ssh_proxy = pkgs.writeShellScriptBin "ssh_proxy" ''
if ${pkgs.coreutils}/bin/test $# -ne 1; then
echo "Usage: $0 <user>@<ssh_host>"
exit
fi
PROXY_PORT="1337"
${lib.getExe pkgs.openssh} -D "$PROXY_PORT" -q -N "$@"
'';
wrap_sh =
let
bubblewrap = pkgs.callPackage ../../packages/bubblewrap/default.nix { };
in
pkgs.writeShellScriptBin "wrap.sh" ''
if ${pkgs.coreutils-full}/bin/test $# -ne 1; then
echo "Usage: $0 <directory>"
exit
fi
FULL_PATH=$(${pkgs.coreutils-full}/bin/realpath "$1")
BUBBLEWRAP_DIR="$1" ${bubblewrap}/bin/bwrap \
--bind / / \
--dev /dev \
--overlay-src "$FULL_PATH" \
--tmp-overlay "$FULL_PATH" \
"$SHELL"
'';
in
{
home.packages =
with pkgs;
[
anydesk
appimage-run
arp-scan
birdtray
blackmagic
blender
btop
cached-nix-shell
caddy
cargo
cmake
compsize
kdePackages.ark
ungoogled-chromium
# cura
deluge
dfu-util
discord
dmenu-wayland
drawio
dualsensectl
ffmpeg-full
firefox
freecad
gcc
gdb
ghostscript
glab
glaxnimate
gnumake
go
grim
heimdall
hyperfine
icestorm
imagemagick
imv
inkscape
jellyfin-media-player
kdePackages.kdenlive
kicad
kodi-wayland
krita
libnotify
libreoffice-qt6-fresh
libva-utils
linuxPackages_latest.perf
lsix
lsix
mediainfo
ncdu
neovide
nextpnr
ngspice
nix-init
nixpkgs-fmt
nix-prefetch-git
nom
openems
openocd
openscad
pandoc
paraview
pass-wayland
patchelf
pavucontrol
pay-respects
pirate-get
poppler_utils
powertop
pulsemixer
pwvucontrol
python3
python3Packages.west
remmina
river
rizin
rtorrent
sbcl
screen
seer
sioyek
slurp
steam-run
stm32cubemx
swayimg
tea
teams-for-linux
tectonic
tessen
texlive.combined.scheme-full
thunderbird
typst
upx
viber
waybar
wdisplays
weechat
whatsapp-for-linux
wine
wireshark
wl-clipboard
wlr-randr
wofi
x2goclient
yewtube
yosys
yt-dlp
zapzap
zathura
# zeal-qt6
zig
]
++ [
chromium_discord
chromium_stackfield
chromium_teams
nixy_switch
qcad
ssh_proxy
wrap_sh
]
++ [
inputs.swaysw.packages.${system}.swaysw
(pkgs.callPackage ../../packages/bubblewrap/default.nix { })
];
}

View File

@@ -1,108 +0,0 @@
{ pkgs, ... }:
let
kbd_switch = pkgs.writeShellScriptBin "kbd_switch" ''
declare -A -r KBD_CYCLE_MAP=(
["English (US)"]="de"
["German"]="ba"
)
LAYOUT="$(${pkgs.sway}/bin/swaymsg -t get_inputs -r | ${pkgs.jq}/bin/jq -r 'map(select(.type == "keyboard")).[0].xkb_layout_names.[]')"
swaymsg input "*" xkb_layout ''${KBD_CYCLE_MAP["$LAYOUT"]:-"us"}
'';
in
{
programs.i3status-rust = {
bars.top = {
icons = "awesome5";
theme = "gruvbox-dark";
settings.theme = {
theme = "plain";
overrides = {
separator_fg = "#3287a8";
};
};
blocks = [
{
block = "keyboard_layout";
driver = "sway";
click = [
{
cmd = "${kbd_switch}/bin/kbd_switch";
button = "left";
}
];
}
{
block = "battery";
interval = 10;
format = "$icon $percentage $time";
}
{
block = "disk_space";
path = "/nix";
info_type = "available";
interval = 20;
warning = 20.0;
alert = 10.0;
}
{
block = "disk_space";
path = "/home";
info_type = "available";
interval = 20;
warning = 20.0;
alert = 10.0;
}
{
block = "net";
device = "wlan0";
if_command = "ip link show wlan0";
interval = 2;
}
{
block = "net";
device = "enp5s0";
if_command = "ip link show enp5s0";
interval = 2;
}
{
block = "net";
device = "enp7s0f3u1u1";
if_command = "ip link show enp7s0f3u1u1";
interval = 2;
}
{
block = "net";
device = "enp7s0f4u1u1";
if_command = "ip link show enp7s0f4u1u1";
interval = 2;
}
{
block = "net";
if_command = "ip link show eno1";
device = "eno1";
interval = 2;
}
{
block = "memory";
}
{
block = "cpu";
interval = 1;
format = "$utilization $barchart $frequency";
}
{
block = "temperature";
interval = 3;
}
{
block = "sound";
}
{
block = "time";
interval = 60;
}
];
};
};
}

View File

@@ -1,155 +0,0 @@
{
pkgs,
inputs,
system,
lib,
...
}:
let
cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" ''
${lib.getExe pkgs.cliphist} list | \
${lib.getExe pkgs.wofi} --dmenu --insensitive | \
${lib.getExe pkgs.cliphist} decode | \
${pkgs.wl-clipboard}/bin/wl-copy
'';
screenshot_clip = pkgs.writeShellScriptBin "screenshot_clip" ''
GEOM="$(${lib.getExe pkgs.slurp} -d)"
${lib.getExe pkgs.grim} -g "$GEOM" - | ${pkgs.wl-clipboard}/bin/wl-copy
'';
swaysw = inputs.swaysw.packages.${system}.swaysw;
term = "${pkgs.foot}/bin/footclient";
in
{
wayland.windowManager.sway = {
enable = true;
extraSessionCommands = "";
extraConfigEarly = '''';
config = {
fonts = {
names = [ "JetBrainsMono" ];
style = "Bold Semi-Condensed";
size = 11.0;
};
window.commands = [
{
command = "move scratchpad, resize set 1152 648";
criteria = {
app_id = "pulsemixer|python3|com.rtosta.zapzap|whatsapp-for-linux|com.viber";
};
}
{
command = "move scratchpad, resize set 1502 845";
criteria = {
app_id = "com.viber";
};
}
{
command = "floating enable";
criteria = {
app_id = "sws_cli";
};
}
];
modifier = "Mod4";
output = {
eDP-1 = {
/*
bg = "~/pic/wallpaper stretch";
scale = "1.4";
*/
};
HDMI-A-4 = {
res = "1920x1080";
};
};
input = {
"type:keyboard" = {
repeat_delay = "150";
};
"type:keyboard" = {
repeat_rate = "70";
};
"type:touchpad" = {
tap = "enabled";
};
};
bars = [
{
position = "top";
fonts = {
names = [
"Iosevka"
"FontAwesome"
];
style = "Bold Semi-Condensed";
size = 12.0;
};
statusCommand = "${lib.getExe pkgs.i3status-rust} ~/.config/i3status-rust/config-top.toml";
}
];
keybindings = {
"Alt+Shift+q" = "kill";
"Alt+Shift+Return" = "exec ${term}";
"Alt+p" = "exec ${pkgs.bemenu}/bin/bemenu-run";
"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";
"Alt+Shift+space" = "floating toggle";
"Alt+space" = "focus mode_toggle";
"Alt+m" = "layout toggle splith tabbed";
"Alt+t" = "split toggle";
"Alt+s" = "layout toggle split";
"Alt+1" = "workspace 1";
"Alt+2" = "workspace 2";
"Alt+3" = "workspace 3";
"Alt+4" = "workspace 4";
"Alt+5" = "workspace 5";
"Alt+6" = "workspace 6";
"Alt+7" = "workspace 7";
"Alt+8" = "workspace 8";
"Alt+9" = "workspace 9";
"Alt+0" = "workspace 10";
"Alt+Shift+1" = "move container to workspace 1";
"Alt+Shift+2" = "move container to workspace 2";
"Alt+Shift+3" = "move container to workspace 3";
"Alt+Shift+4" = "move container to workspace 4";
"Alt+Shift+5" = "move container to workspace 5";
"Alt+Shift+6" = "move container to workspace 6";
"Alt+Shift+7" = "move container to workspace 7";
"Alt+Shift+8" = "move container to workspace 8";
"Alt+Shift+9" = "move container to workspace 9";
"Alt+Shift+0" = "move container to workspace 10";
"Alt+h" = "focus left";
"Alt+j" = "focus down";
"Alt+k" = "focus up";
"Alt+l" = "focus right";
"Alt+slash" = "exec ${pkgs.moreutils}/bin/lckdo swaysw ${swaysw}/bin/swaysw";
"Alt+Escape" = "workspace back_and_forth";
"Alt+f" = "fullscreen enable";
"Alt+bracketright" = "focus output right";
"Alt+bracketleft" = "focus output left";
"Mod4+l" =
''exec ${pkgs.sway}/bin/swaymsg [app_id="python3"] scratchpad show || exec ${term} -a python3 ${lib.getExe pkgs.python3}'';
"Mod4+j" =
"exec ${pkgs.sway}/bin/swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec ${lib.getExe pkgs.zapzap}";
"Mod4+h" =
"exec ${pkgs.sway}/bin/swaymsg [app_id=com.viber] scratchpad show || exec ${pkgs.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";
};
};
};
}

View File

@@ -1,22 +1,12 @@
{ {
lib,
pkgs, pkgs,
config,
lib,
inputs,
... ...
}: }:
let with lib; {
qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" '' imports = [./zsh.nix ./i3status-rust.nix ./sway.nix ./i3.nix ./home_packages.nix ./whatsapp-for-linux.nix];
firejail -- ${lib.getExe pkgs.qutebrowser} "$@"
'';
in
{
imports = [
../common/zsh.nix
../common/i3status-rust.nix
../common/sway.nix
../common/i3.nix
./home_packages.nix
../common/whatsapp-for-linux.nix
];
home.stateVersion = "22.11"; home.stateVersion = "22.11";
home.username = "akill"; home.username = "akill";
@@ -27,7 +17,6 @@ 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";
@@ -39,20 +28,17 @@ in
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
home.sessionVariables = rec { home.sessionVariables = rec {
BROWSER = lib.getExe qutebrowser_firejail; BROWSER = "${pkgs.qutebrowser}/bin/qutebrowser";
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 = { wayland.windowManager.sway = {enable = true;};
enable = true;
};
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;
@@ -71,11 +57,7 @@ in
clock24 = true; clock24 = true;
keyMode = "vi"; keyMode = "vi";
terminal = "screen-256color"; terminal = "screen-256color";
plugins = with pkgs.tmuxPlugins; [ plugins = with pkgs.tmuxPlugins; [ sysstat net-speed gruvbox ];
sysstat
net-speed
gruvbox
];
}; };
mpv = { mpv = {
@@ -86,9 +68,7 @@ in
hwdec = "auto"; hwdec = "auto";
vo = "gpu-next"; vo = "gpu-next";
ao = "pipewire"; ao = "pipewire";
osd-bar = "no"; script-opts-set = "ytdl_hook-ytdl_path=yt-dlp,sponsorblock-local_database=no,sponsorblock-skip_categories=[sponsor,intro,selfpromo]";
border = "no";
script-opts-set = "";
ytdl-format = "bestvideo[height<=?1080]+bestaudio/best"; ytdl-format = "bestvideo[height<=?1080]+bestaudio/best";
}; };
@@ -154,14 +134,13 @@ in
font = "JetBrainsMono:size=10"; font = "JetBrainsMono:size=10";
dpi-aware = "yes"; dpi-aware = "yes";
}; };
mouse = { mouse = {hide-when-typing = "yes";};
hide-when-typing = "yes";
};
}; };
}; };
qutebrowser = { qutebrowser = {
enable = true; enable = true;
package = pkgs.qutebrowser.override {enableVulkan = false;};
keyBindings = { keyBindings = {
normal = { normal = {
"j" = "scroll-px 0 25"; "j" = "scroll-px 0 25";
@@ -200,13 +179,8 @@ in
userName = "Asmir A"; userName = "Asmir A";
userEmail = "asmir.abdulahovic@gmail.com"; userEmail = "asmir.abdulahovic@gmail.com";
extraConfig = { extraConfig = {
init.defaultBranch = "master"; pull = {rebase = true;};
pull = { credential = {helper = "store";};
rebase = true;
};
credential = {
helper = "store";
};
}; };
signing.key = "020C42B7A9ABA3E2"; signing.key = "020C42B7A9ABA3E2";
signing.signByDefault = true; signing.signByDefault = true;
@@ -214,14 +188,7 @@ in
obs-studio = { obs-studio = {
enable = true; enable = true;
plugins = with pkgs.obs-studio-plugins; [ plugins = with pkgs.obs-studio-plugins; [obs-vkcapture input-overlay obs-multi-rtmp obs-pipewire-audio-capture wlrobs obs-vaapi];
obs-vkcapture
input-overlay
obs-multi-rtmp
obs-pipewire-audio-capture
wlrobs
obs-vaapi
];
}; };
i3status-rust.enable = true; i3status-rust.enable = true;
@@ -232,7 +199,6 @@ in
services = { services = {
lorri.enable = false; lorri.enable = false;
mako.enable = true; mako.enable = true;
cliphist.enable = true;
gammastep = { gammastep = {
enable = true; enable = true;
latitude = "44.53"; latitude = "44.53";
@@ -247,87 +213,36 @@ in
enable = true; enable = true;
defaultCacheTtl = 1800; defaultCacheTtl = 1800;
enableSshSupport = true; enableSshSupport = true;
pinentryFlavor = "curses";
}; };
swayidle = swayidle = let
let locker = pkgs.writeShellScriptBin "swaylock_fancy" ''
locker = pkgs.writeShellScriptBin "swaylock_fancy" '' TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg)
ALL_IMGS="" ${pkgs.grim}/bin/grim -t ppm - | ${pkgs.imagemagick}/bin/convert - -blur 0x12 "$TMP_FILE"
LOCK_ARGS="" ${pkgs.swaylock}/bin/swaylock -f -i "$TMP_FILE"
for OUTPUT in $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[].name') ${pkgs.coreutils}/bin/rm "$TMP_FILE"
do '';
TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg) in {
${lib.getExe pkgs.grim} -t ppm -o $OUTPUT - | \
${lib.getExe pkgs.ffmpeg} -y -loglevel 0 -i - -vframes 1 -vf "boxblur=10" "$TMP_FILE"
LOCK_ARGS="$LOCK_ARGS --image $OUTPUT:$TMP_FILE"
ALL_IMGS="$ALL_IMGS $TMP_FILE"
done
${lib.getExe pkgs.swaylock} -f $LOCK_ARGS
${pkgs.coreutils}/bin/shred $ALL_IMGS
${pkgs.coreutils}/bin/rm $ALL_IMGS
'';
in
/*
refresh_i3status = pkgs.writeShellScriptBin "refresh_i3status" ''
${pkgs.coreutils}/bin/sleep 1 && ${pkgs.procps}/bin/pkill -USR1 i3status-rs
'';
*/
{
enable = true;
events = [
{
event = "before-sleep";
command = "${locker}/bin/swaylock_fancy";
}
{
event = "lock";
command = "${locker}/bin/swaylock_fancy";
}
/*
{
event = "after-resume";
command = "${refresh_i3status}/bin/refresh_i3status";
}
*/
];
timeouts = [
{
timeout = 15 * 60;
command = "${locker}/bin/swaylock_fancy";
}
];
};
kanshi = {
enable = true; enable = true;
settings = [ events = [
{ {
profile.name = "undocked"; event = "before-sleep";
profile.outputs = [ command = "${locker}/bin/swaylock_fancy";
{
criteria = "eDP-1";
}
];
} }
{ {
profile.name = "docked"; event = "lock";
profile.outputs = [ command = "${locker}/bin/swaylock_fancy";
{ }
criteria = "eDP-1"; {
position = "0,0"; event = "after-resume";
} command = "${pkgs.procps}/bin/pkill -USR1 i3status-rs";
{ }
criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026536"; ];
mode = "1920x1080@74.973Hz"; timeouts = [
position = "1920,0"; {
} timeout = 15 * 60;
{ command = "${locker}/bin/swaylock_fancy";
criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026535";
mode = "1920x1080@74.973Hz";
position = "3840,0";
}
];
} }
]; ];
}; };
@@ -335,17 +250,19 @@ in
systemd.user = { systemd.user = {
services = { services = {
wayland-pipewire-idle-inhibit = { /*
Unit.Description = "inhibit sleep while audio output is active"; himalaya = {
Service = { Unit.Description = "Himalaya new messages notifier";
ExecStart = "${lib.getExe pkgs.wayland-pipewire-idle-inhibit}"; Service = {
Restart = "always"; ExecStart = "himalaya notify";
RestartSec = 10; Restart = "always";
}; RestartSec = 10;
Install = {
WantedBy = [ "graphical-session.target" ];
};
}; };
Install = {
WantedBy = [ "multi-user.target" ];
};
};
*/
}; };
}; };
} }

119
home/home_packages.nix Normal file
View File

@@ -0,0 +1,119 @@
{
config,
pkgs,
inputs,
...
}: {
home.packages = with pkgs;
[
alejandra
appimage-run
arp-scan
birdtray
blackmagic
blender
btop
cached-nix-shell
caddy
cargo
ccls
cemu
cmake
compsize
cura
deluge
ffmpeg-full
firefox
freecad
gcc
gdb
ghostscript
glab
/*glaxnimate*/
gnumake
go
grim
hyperfine
imagemagick
imv
inkscape
jellyfin-media-player
kdenlive
kicad
kodi-wayland
krita
libnotify
libreoffice
libva-utils
mediainfo
ncdu
neovide
ngspice
nix-init
nodePackages.peerflix
openocd
openscad
pandoc
pass
patchelf
pavucontrol
pirate-get
poppler_utils
powertop
pulsemixer
python3
python3Packages.west
remmina
river
rtorrent
rustc
screen
seer
sioyek
skypeforlinux
slurp
tea
texlive.combined.scheme-full
thunderbird
upx
waybar
wdisplays
whatsapp-for-linux
wireshark
wl-clipboard
wlr-randr
wofi
x2goclient
yewtube
yt-dlp
zathura
zeal-qt6
zig
zls
/*
install here until nvim flake is fixed
*/
alejandra
ccls
gopls
luaformatter
nixd
pyright
rust-analyzer
sumneko-lua-language-server
svls
texlab
tree-sitter
verible
zls
]
++ [
inputs.swaysw.packages.x86_64-linux.swaysw
inputs.nvim.packages.x86_64-linux.nvim
(import ../packages/zapzap/default.nix {inherit pkgs;})
(pkgs.callPackage ../packages/viber/default.nix {})
(pkgs.callPackage ../packages/bubblewrap/default.nix {})
(pkgs.callPackage ../packages/stm32cubemx/default.nix {})
];
}

View File

@@ -1,12 +1,11 @@
{ {
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;
@@ -55,28 +54,24 @@ 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" = "Mod4+l" = "exec i3-msg [instance=\"python3_scr\"] scratchpad show || exec alacritty --class python3_scr -e python3";
"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" = "Mod4+y" = "exec i3-msg [instance=\"pulsemixer_scr\"] scratchpad show || exec alacritty --class pulsemixer_scr -e pulsemixer";
"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 = { criteria = {instance = "pulsemixer_scr|python3_scr";};
instance = "pulsemixer_scr|python3_scr";
};
} }
{ {
command = scratchpad_cmd; command = scratchpad_cmd;
criteria = { criteria = {class = "Thunderbird";};
class = "Thunderbird";
};
} }
{ {
command = scratchpad_cmd; command = scratchpad_cmd;
@@ -87,9 +82,7 @@ in
} }
{ {
command = "focus child, layout tabbed, focus"; command = "focus child, layout tabbed, focus";
criteria = { criteria = {class = "qutebrowser";};
class = "qutebrowser";
};
} }
]; ];
}; };
@@ -98,10 +91,7 @@ in
{ {
position = "top"; position = "top";
fonts = { fonts = {
names = [ names = ["DejaVu Sans Mono" "FontAwesome5Free"];
"DejaVu Sans Mono"
"FontAwesome5Free"
];
style = "Fixed Bold SemiCondensed"; style = "Fixed Bold SemiCondensed";
size = 7.0; size = 7.0;
}; };

69
home/i3status-rust.nix Normal file
View File

@@ -0,0 +1,69 @@
{
config,
lib,
pkgs,
...
}: {
programs.i3status-rust = {
bars.top = {
icons = "awesome5";
theme = "gruvbox-dark";
settings.theme = {
theme = "plain";
overrides = {
separator_fg = "#3287a8";
};
};
blocks = [
{
block = "battery";
interval = 10;
format = "$icon $percentage $time";
}
{
block = "disk_space";
path = "/";
info_type = "available";
interval = 20;
warning = 20.0;
alert = 10.0;
}
{
block = "net";
device = "wlan0";
interval = 2;
}
{
block = "net";
device = "enp5s0";
interval = 2;
}
{
block = "net";
device = "eno1";
interval = 2;
}
{
block = "memory";
}
{
block = "cpu";
interval = 1;
format = "$utilization $barchart $frequency";
}
{
block = "temperature";
interval = 3;
}
{
block = "sound";
}
{
block = "time";
interval = 60;
}
];
};
};
}

View File

@@ -1,348 +0,0 @@
{
lib,
pkgs,
...
}:
let
qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" ''
firejail -- ${lib.getExe pkgs.qutebrowser} "$@"
'';
in
{
imports = [
../common/zsh.nix
./home_packages.nix
../common/whatsapp-for-linux.nix
];
home.stateVersion = "22.11";
home.username = "akill";
home.homeDirectory = "/home/akill";
xdg.enable = true;
xdg.mimeApps = {
enable = true;
defaultApplications = {
"application/pdf" = "sioyek.desktop";
"default-web-browser" = "org.qutebrowser.qutebrowser.desktop";
"text/html" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/about" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/http" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/https" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/unknown" = "org.qutebrowser.qutebrowser.desktop";
};
};
fonts.fontconfig.enable = true;
home.sessionVariables = rec {
BROWSER = lib.getExe qutebrowser_firejail;
DEFAULT_BROWSER = "${BROWSER}";
EDITOR = "nvim";
_JAVA_AWT_WM_NONREPARENTING = "1";
MOZ_ENABLE_WAYLAND = "1";
NIXOS_OZONE_WL = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SUDO_EDITOR = "nvim";
WLR_RENDERER = "vulkan";
};
wayland.windowManager.sway = {
enable = false;
};
programs = {
home-manager.enable = true;
librewolf = {
enable = true;
package = pkgs.librewolf-wayland;
settings = {
"webgl.disable" = true;
"middlemouse.paste" = false;
};
};
tmux = {
enable = true;
clock24 = true;
keyMode = "vi";
terminal = "screen-256color";
plugins = with pkgs.tmuxPlugins; [
sysstat
net-speed
gruvbox
];
};
mpv = {
enable = true;
config = {
slang = "eng,en";
alang = "eng,en";
hwdec = "auto";
vo = "gpu-next";
ao = "pipewire";
osd-bar = "no";
border = "no";
script-opts-set = "";
ytdl-format = "bestvideo[height<=?1080]+bestaudio/best";
};
bindings = {
WHEEL_UP = "ignore";
WHEEL_DOWN = "ignore";
WHEEL_LEFT = "ignore";
WHEEL_RIGHT = "ignore";
};
};
alacritty = {
enable = true;
settings = {
font = {
normal.family = "JetBrainsMono";
italic.family = "JetBrainsMono";
bold.family = "JetBrainsMono";
bold_italic.family = "JetBrainsMono";
size = 14.0;
};
selection = {
text = "0xcfcfc2";
background = "0x232629";
normal = {
black = "0x1c1b19";
red = "0xef2f27";
green = "0x519f50";
yellow = "0xfbb829";
blue = "0x2c78bf";
magenta = "0xe02c6d";
cyan = "0x0aaeb3";
white = "0x918175";
};
bright = {
black = "0x2D2C29";
red = "0xf75341";
green = "0x98bc37";
yellow = "0xfed06e";
blue = "0x68A8E4";
magenta = "0xff5c8f";
cyan = "0x53fde9";
white = "0xfce8c3";
};
};
};
};
rofi = {
enable = true;
theme = "gruvbox-dark";
};
foot = {
enable = true;
server.enable = true;
settings = {
main = {
font = "JetBrainsMono:size=10";
dpi-aware = "yes";
};
mouse = {
hide-when-typing = "yes";
};
};
};
qutebrowser = {
enable = true;
keyBindings = {
normal = {
"j" = "scroll-px 0 25";
"k" = "scroll-px 0 -25";
"u" = "undo --window";
";v" = "hint links spawn mpv {hint-url}";
};
};
settings = {
content.notifications.enabled = false;
content.pdfjs = true;
content.webgl = false;
fonts.completion.category = "14pt monospace";
fonts.completion.entry = "14pt monospace";
fonts.contextmenu = "14pt monospace";
fonts.debug_console = "14pt monospace";
fonts.downloads = "14pt monospace";
fonts.hints = "14pt monospace";
fonts.keyhint = "14pt monospace";
fonts.messages.info = "14pt monospace";
fonts.prompts = "14pt monospace";
fonts.statusbar = "14pt monospace";
hints.chars = "1qaz2wsx3edc4rfv5tgb6yhn7ujm8ik9ol0p";
tabs.last_close = "close";
tabs.position = "left";
tabs.show = "multiple";
tabs.tabs_are_windows = true;
tabs.width = "12%";
zoom.default = "125%";
};
};
git = {
enable = true;
userName = "Asmir A";
userEmail = "asmir.abdulahovic@gmail.com";
extraConfig = {
init.defaultBranch = "master";
pull = {
rebase = true;
};
credential = {
helper = "store";
};
};
signing.key = "020C42B7A9ABA3E2";
signing.signByDefault = true;
};
obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
obs-vkcapture
input-overlay
obs-multi-rtmp
obs-pipewire-audio-capture
wlrobs
obs-vaapi
];
};
i3status-rust.enable = false;
z-lua.enable = true;
zsh.enable = true;
};
services = {
lorri.enable = false;
mako.enable = true;
cliphist.enable = true;
gammastep = {
enable = true;
latitude = "44.53";
longitude = "18.67";
temperature.day = 5500;
temperature.night = 2900;
};
gnome-keyring.enable = true;
gpg-agent = {
enable = true;
defaultCacheTtl = 1800;
enableSshSupport = true;
};
swayidle =
let
locker = pkgs.writeShellScriptBin "swaylock_fancy" ''
ALL_IMGS=""
LOCK_ARGS=""
for OUTPUT in $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[].name')
do
TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg)
${lib.getExe pkgs.grim} -t ppm -o $OUTPUT - | \
${lib.getExe pkgs.ffmpeg} -y -loglevel 0 -i - -vframes 1 -vf "boxblur=10" "$TMP_FILE"
LOCK_ARGS="$LOCK_ARGS --image $OUTPUT:$TMP_FILE"
ALL_IMGS="$ALL_IMGS $TMP_FILE"
done
${lib.getExe pkgs.swaylock} -f $LOCK_ARGS
${pkgs.coreutils}/bin/shred $ALL_IMGS
${pkgs.coreutils}/bin/rm $ALL_IMGS
'';
in
/*
refresh_i3status = pkgs.writeShellScriptBin "refresh_i3status" ''
${pkgs.coreutils}/bin/sleep 1 && ${pkgs.procps}/bin/pkill -USR1 i3status-rs
'';
*/
{
enable = false;
events = [
{
event = "before-sleep";
command = "${locker}/bin/swaylock_fancy";
}
{
event = "lock";
command = "${locker}/bin/swaylock_fancy";
}
/*
{
event = "after-resume";
command = "${refresh_i3status}/bin/refresh_i3status";
}
*/
];
timeouts = [
{
timeout = 15 * 60;
command = "${locker}/bin/swaylock_fancy";
}
];
};
kanshi = {
enable = false;
settings = [
{
profile.name = "undocked";
profile.outputs = [
{
criteria = "eDP-1";
}
];
}
{
profile.name = "docked";
profile.outputs = [
{
criteria = "eDP-1";
position = "0,0";
}
{
criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026536";
mode = "1920x1080@74.973Hz";
position = "1920,0";
}
{
criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026535";
mode = "1920x1080@74.973Hz";
position = "3840,0";
}
];
}
];
};
};
systemd.user = {
services = {
wayland-pipewire-idle-inhibit = {
Unit.Description = "inhibit sleep while audio output is active";
Service = {
ExecStart = "${lib.getExe pkgs.wayland-pipewire-idle-inhibit}";
Restart = "always";
RestartSec = 10;
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
};
};
}

View File

@@ -1,58 +0,0 @@
{ lib
, pkgs
, ...
}:
let
chromium_discord = pkgs.writeShellScriptBin "chromium_discord" ''
${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://discordapp.com/channels/@me
'';
in
{
home.packages =
with pkgs;
[
cached-nix-shell
deluge
dualsensectl
ffmpeg-full
firefox
freetube
imv
inkscape
jellyfin-media-player
kodi-wayland
libnotify
libreoffice-qt6-fresh
libva-utils
nixpkgs-fmt
nix-prefetch-git
pandoc
paraview
pass-wayland
pavucontrol
pay-respects
pirate-get
poppler_utils
pulsemixer
pwvucontrol
python3
remmina
rtorrent
sioyek
steam-run
stremio
swayimg
tessen
ungoogled-chromium
wdisplays
wine
wl-clipboard
wlr-randr
wofi
yt-dlp
zathura
]
++ [
chromium_discord
];
}

View File

@@ -1,363 +0,0 @@
{ lib
, pkgs
, ...
}:
let
qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" ''
firejail -- ${lib.getExe pkgs.qutebrowser} "$@"
'';
in
{
imports = [
../common/zsh.nix
../common/i3status-rust.nix
../common/sway.nix
../common/i3.nix
./home_packages.nix
../common/whatsapp-for-linux.nix
];
home.stateVersion = "22.11";
home.username = "akill";
home.homeDirectory = "/home/akill";
xdg.enable = true;
xdg.mimeApps = {
enable = true;
defaultApplications = {
"application/pdf" = "sioyek.desktop";
"default-web-browser" = "org.qutebrowser.qutebrowser.desktop";
"text/html" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/about" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/http" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/https" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/unknown" = "org.qutebrowser.qutebrowser.desktop";
};
};
fonts.fontconfig.enable = true;
home.sessionVariables = rec {
BROWSER = lib.getExe qutebrowser_firejail;
DEFAULT_BROWSER = "${BROWSER}";
EDITOR = "nvim";
_JAVA_AWT_WM_NONREPARENTING = "1";
MOZ_ENABLE_WAYLAND = "1";
NIXOS_OZONE_WL = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SUDO_EDITOR = "nvim";
WLR_RENDERER = "vulkan";
};
home.pointerCursor = {
package = pkgs.adwaita-icon-theme;
name = "Adwaita";
size = 38;
};
wayland.windowManager.sway = {
enable = true;
};
programs = {
home-manager.enable = true;
librewolf = {
enable = true;
settings = {
"webgl.disable" = true;
"middlemouse.paste" = false;
};
};
tmux = {
enable = true;
clock24 = true;
keyMode = "vi";
terminal = "screen-256color";
plugins = with pkgs.tmuxPlugins; [
sysstat
net-speed
gruvbox
];
};
mpv = {
enable = true;
scripts = [
pkgs.mpvScripts.uosc
pkgs.mpvScripts.autosubsync-mpv
];
config = {
osc = "no";
osd-bar = "no";
border = "no";
slang = "eng,en";
alang = "eng,en";
hwdec = "auto";
vo = "gpu-next";
ao = "pipewire";
ytdl-format = "bestvideo[height<=?1080]+bestaudio/best";
};
bindings = {
"s" = "script-binding uosc/subtitles";
"a" = "script-binding uosc/audio";
WHEEL_UP = "ignore";
WHEEL_DOWN = "ignore";
WHEEL_LEFT = "ignore";
WHEEL_RIGHT = "ignore";
};
};
alacritty = {
enable = true;
settings = {
font = {
normal.family = "JetBrainsMono";
italic.family = "JetBrainsMono";
bold.family = "JetBrainsMono";
bold_italic.family = "JetBrainsMono";
size = 14.0;
};
selection = {
text = "0xcfcfc2";
background = "0x232629";
normal = {
black = "0x1c1b19";
red = "0xef2f27";
green = "0x519f50";
yellow = "0xfbb829";
blue = "0x2c78bf";
magenta = "0xe02c6d";
cyan = "0x0aaeb3";
white = "0x918175";
};
bright = {
black = "0x2D2C29";
red = "0xf75341";
green = "0x98bc37";
yellow = "0xfed06e";
blue = "0x68A8E4";
magenta = "0xff5c8f";
cyan = "0x53fde9";
white = "0xfce8c3";
};
};
};
};
rofi = {
enable = true;
theme = "gruvbox-dark";
};
foot = {
enable = true;
server.enable = true;
settings = {
main = {
font = "JetBrainsMono:size=10";
dpi-aware = "yes";
};
mouse = {
hide-when-typing = "yes";
};
};
};
qutebrowser = {
enable = true;
keyBindings = {
normal = {
"j" = "scroll-px 0 25";
"k" = "scroll-px 0 -25";
"u" = "undo --window";
";v" = "hint links spawn mpv {hint-url}";
};
};
settings = {
content.notifications.enabled = false;
content.pdfjs = true;
content.webgl = false;
fonts.completion.category = "14pt monospace";
fonts.completion.entry = "14pt monospace";
fonts.contextmenu = "14pt monospace";
fonts.debug_console = "14pt monospace";
fonts.downloads = "14pt monospace";
fonts.hints = "14pt monospace";
fonts.keyhint = "14pt monospace";
fonts.messages.info = "14pt monospace";
fonts.prompts = "14pt monospace";
fonts.statusbar = "14pt monospace";
hints.chars = "1qaz2wsx3edc4rfv5tgb6yhn7ujm8ik9ol0p";
tabs.last_close = "close";
tabs.position = "left";
tabs.show = "multiple";
tabs.tabs_are_windows = true;
tabs.width = "12%";
zoom.default = "125%";
};
};
git = {
enable = true;
settings = {
user = {
name = "Asmir A";
email = "asmir.abdulahovic@gmail.com";
};
init.defaultBranch = "master";
pull = {
rebase = true;
};
credential = {
helper = "store";
};
};
signing.key = "020C42B7A9ABA3E2";
signing.signByDefault = true;
};
obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
obs-vkcapture
input-overlay
obs-multi-rtmp
obs-pipewire-audio-capture
wlrobs
obs-vaapi
];
};
i3status-rust.enable = true;
z-lua.enable = true;
zsh.enable = true;
};
services = {
lorri.enable = false;
mako.enable = true;
cliphist.enable = true;
gammastep = {
enable = true;
latitude = "44.53";
longitude = "18.67";
temperature.day = 5500;
temperature.night = 2900;
};
gnome-keyring.enable = true;
gpg-agent = {
enable = true;
defaultCacheTtl = 1800;
enableSshSupport = true;
};
swayidle =
let
locker = pkgs.writeShellScriptBin "swaylock_fancy" ''
ALL_IMGS=""
LOCK_ARGS=""
for OUTPUT in $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[].name')
do
TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg)
${lib.getExe pkgs.grim} -t ppm -o $OUTPUT - | \
${lib.getExe pkgs.ffmpeg} -y -loglevel 0 -i - -vframes 1 -vf "boxblur=10" "$TMP_FILE"
LOCK_ARGS="$LOCK_ARGS --image $OUTPUT:$TMP_FILE"
ALL_IMGS="$ALL_IMGS $TMP_FILE"
done
${lib.getExe pkgs.swaylock} -f $LOCK_ARGS
${pkgs.coreutils}/bin/shred $ALL_IMGS
${pkgs.coreutils}/bin/rm $ALL_IMGS
'';
in
/*
refresh_i3status = pkgs.writeShellScriptBin "refresh_i3status" ''
${pkgs.coreutils}/bin/sleep 1 && ${pkgs.procps}/bin/pkill -USR1 i3status-rs
'';
*/
{
enable = true;
events = [
{
event = "before-sleep";
command = "${locker}/bin/swaylock_fancy";
}
{
event = "lock";
command = "${locker}/bin/swaylock_fancy";
}
/*
{
event = "after-resume";
command = "${refresh_i3status}/bin/refresh_i3status";
}
*/
];
timeouts = [
{
timeout = 15 * 60;
command = "${locker}/bin/swaylock_fancy";
}
];
};
kanshi = {
enable = true;
settings = [
{
profile.name = "undocked";
profile.outputs = [
{
criteria = "eDP-1";
}
];
}
{
profile.name = "docked";
profile.outputs = [
{
criteria = "eDP-1";
position = "0,0";
}
{
criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026536";
mode = "1920x1080@74.973Hz";
position = "1920,0";
}
{
criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026535";
mode = "1920x1080@74.973Hz";
position = "3840,0";
}
];
}
];
};
};
systemd.user = {
services = {
wayland-pipewire-idle-inhibit = {
Unit.Description = "inhibit sleep while audio output is active";
Service = {
ExecStart = "${lib.getExe pkgs.wayland-pipewire-idle-inhibit}";
Restart = "always";
RestartSec = 10;
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
};
};
}

View File

@@ -1,183 +0,0 @@
{
lib,
pkgs,
inputs,
system,
...
}:
let
chromium_teams = pkgs.writeShellScriptBin "chromium_teams" ''
${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://teams.microsoft.com/
'';
chromium_discord = pkgs.writeShellScriptBin "chromium_discord" ''
${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/
'';
nixy_switch = pkgs.writeShellScriptBin "nixy_switch" ''
${pkgs.util-linux}/bin/ionice -c 3 -- \
${pkgs.coreutils}/bin/nice -n 20 -- \
${lib.getExe pkgs.nixos-rebuild} --flake ./#nixy switch
'';
qcad = pkgs.writeShellScriptBin "qcad" ''
QT_QPA_PLATFORM=xcb ${lib.getExe pkgs.qcad} $@
'';
ssh_proxy = pkgs.writeShellScriptBin "ssh_proxy" ''
if ${pkgs.coreutils}/bin/test $# -ne 1; then
echo "Usage: $0 <user>@<ssh_host>"
exit
fi
PROXY_PORT="1337"
${lib.getExe pkgs.openssh} -D "$PROXY_PORT" -q -N "$@"
'';
wrap_sh =
let
bubblewrap = pkgs.callPackage ../../packages/bubblewrap/default.nix { };
in
pkgs.writeShellScriptBin "wrap.sh" ''
if ${pkgs.coreutils-full}/bin/test $# -ne 1; then
echo "Usage: $0 <directory>"
exit
fi
FULL_PATH=$(${pkgs.coreutils-full}/bin/realpath "$1")
BUBBLEWRAP_DIR="$1" ${bubblewrap}/bin/bwrap \
--bind / / \
--dev /dev \
--overlay-src "$FULL_PATH" \
--tmp-overlay "$FULL_PATH" \
"$SHELL"
'';
in
{
home.packages =
with pkgs;
[
anydesk
appimage-run
arp-scan
birdtray
blackmagic
blender
btop
cached-nix-shell
caddy
cargo
cmake
compsize
kdePackages.ark
ungoogled-chromium
cura-appimage
deluge
dfu-util
discord
dmenu-wayland
drawio
dualsensectl
ffmpeg-full
firefox
freecad
gcc
gdb
ghostscript
glab
glaxnimate
gnumake
go
grim
heimdall
hyperfine
icestorm
imagemagick
imv
inkscape
#jellyfin-media-player
kdePackages.kdenlive
kicad
kodi-wayland
krita
libnotify
libreoffice-qt6-fresh
libva-utils
perf
lsix
lsix
mediainfo
ncdu
neovide
nextpnr
ngspice
nix-init
nixpkgs-fmt
nix-prefetch-git
nom
openems
openocd
openscad
pandoc
#paraview
pass-wayland
patchelf
pavucontrol
pay-respects
pirate-get
poppler-utils
powertop
pulsemixer
pwvucontrol
python3
python3Packages.west
qucs-s
radeontop
remmina
river-classic
rizin
rtorrent
sbcl
screen
seer
sioyek
slurp
steam-run
stm32cubemx
swayimg
tea
teams-for-linux
tectonic
tessen
texlive.combined.scheme-full
thunderbird
typst
upx
viber
waybar
wdisplays
weechat
wasistlos
wine
wireshark
wl-clipboard
wlr-randr
wofi
x2goclient
yewtube
yosys
yt-dlp
zapzap
zathura
zig
]
++ [
chromium_discord
chromium_stackfield
chromium_teams
nixy_switch
qcad
ssh_proxy
wrap_sh
]
++ [
inputs.swaysw.packages.${system}.swaysw
(pkgs.callPackage ../../packages/bubblewrap/default.nix { })
];
}

121
home/sway.nix Normal file
View File

@@ -0,0 +1,121 @@
{
config,
lib,
pkgs,
...
}: {
wayland.windowManager.sway = {
enable = true;
extraSessionCommands = "";
config = {
fonts = {
names = ["JetBrainsMono"];
style = "Bold Semi-Condensed";
size = 11.0;
};
window.commands = [
{
command = "move scratchpad, resize set 1152 648";
criteria = {app_id = "pulsemixer|python3|com.rtosta.zapzap|whatsapp-for-linux|com.viber";};
}
{
command = "move scratchpad, resize set 1502 845";
criteria = {app_id = "com.viber";};
}
{
command = "floating enable";
criteria = {app_id = "sws_cli";};
}
];
modifier = "Mod4";
output = {
eDP-1 = {
bg = "~/pic/wallpaper stretch";
/*
scale = "1.4";
*/
};
HDMI-A-4 = {
res = "1920x1080";
};
};
input = {
"type:keyboard" = {repeat_delay = "150";};
"type:keyboard" = {repeat_rate = "70";};
"type:touchpad" = {tap = "enabled";};
};
bars = [
{
position = "top";
fonts = {
names = ["Iosevka" "FontAwesome"];
style = "Bold Semi-Condensed";
size = 12.0;
};
statusCommand = "i3status-rs ~/.config/i3status-rust/config-top.toml";
}
];
keybindings = {
"Alt+Shift+q" = "kill";
"Alt+Shift+Return" = "exec ${pkgs.foot}/bin/footclient";
"Alt+p" = "exec ${pkgs.dmenu-wayland}/bin/dmenu-wl_run -fn \"mono 14\"";
"Alt+Shift+space" = "floating toggle";
"Alt+space" = "focus mode_toggle";
"Alt+m" = "layout toggle splith tabbed";
"Alt+t" = "split toggle";
"Alt+s" = "layout toggle split";
"Alt+1" = "workspace 1";
"Alt+2" = "workspace 2";
"Alt+3" = "workspace 3";
"Alt+4" = "workspace 4";
"Alt+5" = "workspace 5";
"Alt+6" = "workspace 6";
"Alt+7" = "workspace 7";
"Alt+8" = "workspace 8";
"Alt+9" = "workspace 9";
"Alt+0" = "workspace 10";
"Alt+Shift+1" = "move container to workspace 1";
"Alt+Shift+2" = "move container to workspace 2";
"Alt+Shift+3" = "move container to workspace 3";
"Alt+Shift+4" = "move container to workspace 4";
"Alt+Shift+5" = "move container to workspace 5";
"Alt+Shift+6" = "move container to workspace 6";
"Alt+Shift+7" = "move container to workspace 7";
"Alt+Shift+8" = "move container to workspace 8";
"Alt+Shift+9" = "move container to workspace 9";
"Alt+Shift+0" = "move container to workspace 10";
"Alt+h" = "focus left";
"Alt+j" = "focus down";
"Alt+k" = "focus up";
"Alt+l" = "focus right";
"Alt+slash" = "exec swaysw";
"Alt+Escape" = "workspace back_and_forth";
"Alt+f" = "fullscreen enable";
"Mod4+l" = ''
exec swaymsg [app_id="python3"] scratchpad show || exec foot -a python3 python3'';
"Mod4+h" = "exec swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec zapzap";
"Mod4+j" = "exec swaymsg [app_id=com.viber] scratchpad show || exec viber";
"Mod4+y" = ''
exec swaymsg [app_id="pulsemixer"] scratchpad show || exec foot -a pulsemixer pulsemixer'';
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%";
"XF86AudioLowerVolume" = "exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%";
"XF86AudioMute" = "exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle";
"XF86AudioMicMute" = "exec pactl set-source-mute $(pacmd list-sources |awk '/* index:/{print $3}') toggle";
};
};
};
}

View File

@@ -1,8 +1,12 @@
{ lib, ... }:
with lib;
{ {
config,
pkgs,
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;

View File

@@ -1,10 +1,9 @@
{ pkgs, lib, ... }:
{ {
home.sessionVariables = { config,
/*ZDOTDIR = "\"$HOME/\".config/zsh";*/ lib,
/*HISTFILE = "\"$XDG_STATE_HOME\"/zsh/history";*/ pkgs,
}; ...
}: {
programs.z-lua = { programs.z-lua = {
enableAliases = true; enableAliases = true;
enableZshIntegration = true; enableZshIntegration = true;
@@ -13,26 +12,16 @@
programs.zsh = { programs.zsh = {
autocd = true; autocd = true;
enableCompletion = false; enableCompletion = false;
syntaxHighlighting.enable = true;
defaultKeymap = "viins"; defaultKeymap = "viins";
/* dotDir = "\"$XDG_CONFIG_HOME\"/zsh"; */
setOptions = [
"c_bases"
"completealiases"
"completeinword"
"nobeep"
"nopromptcr"
"notify"
];
shellAliases = { shellAliases = {
cfind = "${pkgs.cscope}/bin/cscope -C -R -L1"; cfind = "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 = {
@@ -53,13 +42,18 @@
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 = "54bd501c802283dee0940457da6eb3e642bd1453"; rev = "87e6f5dd4c793f6d980532205aaefe196780606f";
hash = "sha256-AZSxP2g6BWoxyiSQH7yzbbbfGcwD8jgnXPPfcYwJUL0="; hash = "sha256-TR4CyBZ+KoZRs9XDmWE5lJuUXXU1J8E2Z63nt+FS+5w=";
}; };
file = "pure.plugin.zsh"; file = "pure.plugin.zsh";
} }
@@ -70,50 +64,44 @@
} }
{ {
name = "zsh-sudo"; name = "zsh-sudo";
src = pkgs.oh-my-zsh; src = pkgs.fetchFromGitHub {
file = "share/oh-my-zsh/plugins/sudo/sudo.plugin.zsh"; owner = "hcgraf";
} repo = "zsh-sudo";
{ rev = "d8084def6bb1bde2482e7aa636743f40c69d9b32";
name = "zsh-fast-syntax-highlighting"; sha256 = "1dpm51w3wjxil8sxqw4qxim5kmf6afmkwz1yfhldpdlqm7rfwpi3";
src = pkgs.zsh-fast-syntax-highlighting; };
file = "share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh"; file = "sudo.plugin.zsh";
} }
]; ];
envExtra = ''''; envExtra = '''';
initContent = '' initExtra = ''
# binds # binds
bindkey '^K' fzf-file-widget bindkey '^K' fzf-file-widget
# options
setopt nobeep
setopt nopromptcr
setopt c_bases
setopt completeinword
setopt completealiases
setopt notify
#
RPS1="" RPS1=""
#
function chpwd() { function chpwd() {
ls; ls;
} }
function osc7-pwd() {
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))}}
}
function chpwd-osc7-pwd() {
(( ZSH_SUBSHELL )) || osc7-pwd
}
add-zsh-hook -Uz chpwd chpwd-osc7-pwd
eval "$(direnv hook zsh)" eval "$(direnv hook zsh)"
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
TMUX_EXE="${lib.getExe pkgs.tmux}" TMUX_EXE="${pkgs.tmux}/bin/tmux"
systemd-run --scope --user $TMUX_EXE attach-session -t $USER || systemd-run --scope --user $TMUX_EXE new-session -s $USER $TMUX_EXE attach-session -t $USER || $TMUX_EXE new-session -s $USER
fi
if [[ -n "$BUBBLEWRAP_DIR" ]]; then
RPS1="{{$BUBBLEWRAP_DIR}}"
fi fi
''; '';
}; };

View File

@@ -1,69 +1,42 @@
{ config
, pkgs
, lib
, project-cloud
, nvim
, system
, ...
}:
{ {
imports = [ ]; config,
pkgs,
lib,
project-cloud,
...
}: {
imports = [];
nix.optimise.automatic = true; nix.optimise.automatic = true;
nix.settings.experimental-features = [ nix.settings.experimental-features = ["nix-command" "flakes"];
"nix-command"
"flakes"
];
# 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";
users.users.root.initialHashedPassword = ""; users.users.root.initialHashedPassword = "";
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
(builtins.readFile ../nixy/ssh_pubkey) "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC0gyN7DzF7+sinneq7++fT93dNWe9ttKnLZJEb0LVs7UxPtz/ovlxnktAgEtSh7NUUGKPILGG6+YG/Jz3pb4cLuQHtavIQ2mIzIbiNl+c80gLNPulfOrC3KyCacYnlcEpoV+4yvMPLDf+5ySilYoF30CSIo8B7B4PSwO3/I20oXXY0zeVmYKs65BY8OrR8PDdtPpuqGcTdPpVSrooZQoykriFeejBb0Jn7qWO7vmsTyUZZIP4nKKUyqE6iFZ2zv+J3mYfuoglQKO1+kqcCYCef0sheLZGD4/QIIL8HJ9yNWb6OQhu7MEv1NowuHkviImwVO3actZ1/x4lrWt4mY+bGglVwA90u1KZUQ10qKQ2xCG2ZHE9DSxWxpI/Yq2P4pLA/XSkYFPpzmoD9c6cpv0WLAvmQrEVkqK0xXo+KszUlyGy5sVJl7/h1fZ8YhWsWUnU1XJFmKLaomUZflL3h7X6xJNVPzZmso8l1INdCvIBDu+G84kAp1/aFalSJMyjTgvCc1hxhAVYhmrc3msGH0Jk8CcPBwYa0BH4EryacdupOS/c5VxAbdyuizEgitP1ylRmydVVDEItPNXFvpWdyEehf/VmsUXqL48mBzfvi6feD5AzKjPaQNaATpxLs9Sl9CMxSy27ahHwEK6dek1wm7nkoSIDSRWfGhYKr3lUg0emAYQ=="
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
alejandra
curl curl
fd fd
file file
fzf fzf
fzy fzy
git git
nvim.packages.${system}.nvim
htop-vim htop-vim
nvim
pciutils pciutils
tig tig
tmux tmux
@@ -74,55 +47,41 @@
]; ];
programs.mosh.enable = true; programs.mosh.enable = true;
programs.neovim = {
/* Srv settings found on SrvOS */ enable = true;
fonts.fontconfig.enable = lib.mkDefault false; vimAlias = true;
xdg.autostart.enable = lib.mkDefault false; viAlias = true;
xdg.icons.enable = lib.mkDefault false; };
xdg.menus.enable = lib.mkDefault false;
xdg.mime.enable = lib.mkDefault false;
xdg.sounds.enable = lib.mkDefault false;
mailserver = { mailserver = {
enable = true; enable = true;
debug.all = 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;
stateVersion = 3;
# A list of all login accounts. To create the password hashes, use # A list of all login accounts. To create the password hashes, use
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
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";
}; };
services.journald.extraConfig = ''SystemMaxUse=50M ''; services.journald.extraConfig = ''SystemMaxUse=50M '';
services.logind.settings.Login = { KillUserProcesses = true; }; services.logind.extraConfig = ''KillUserProcesses=yes '';
services.openssh.settings.PermitRootLogin = "prohibit-password"; services.openssh.settings.PermitRootLogin = "prohibit-password";
services.openssh.enable = true; services.openssh.enable = true;
services.openssh.listenAddresses = [ services.opendkim.enable = true;
{
addr = "10.100.0.1"; # wireguard
port = 22;
}
];
services.opendkim = {
enable = true;
selector = "mail";
};
services.miniflux = { services.miniflux = {
enable = false; enable = false;
@@ -133,21 +92,21 @@
}; };
}; };
services.goatcounter = { services.restya-board = {
enable = true; enable = true;
port = 8002; virtualHost.serverName = "board.project-cloud.net";
proxy = true; virtualHost.listenHost = "localhost";
address = "127.0.0.1"; virtualHost.listenPort = 4001;
}; };
services.nextcloud = { services.nextcloud = {
enable = false; enable = true;
package = pkgs.nextcloud28; package = pkgs.nextcloud27;
config.adminpassFile = config.sops.secrets."nextcloud_admin".path; config.adminpassFile = config.sops.secrets."nextcloud_admin".path;
configureRedis = true; configureRedis = true;
hostName = "cloud.project-cloud.net"; hostName = "cloud.project-cloud.net";
https = true; https = true;
settings = { extraOptions = {
mail_smtpmode = "sendmail"; mail_smtpmode = "sendmail";
mail_sendmailmode = "pipe"; mail_sendmailmode = "pipe";
enabledPreviewProviders = [ enabledPreviewProviders = [
@@ -173,6 +132,7 @@
services.nginx = { services.nginx = {
enable = true; enable = true;
package = pkgs.nginxQuic;
recommendedGzipSettings = true; recommendedGzipSettings = true;
recommendedOptimisation = true; recommendedOptimisation = true;
recommendedProxySettings = true; recommendedProxySettings = true;
@@ -180,24 +140,19 @@
virtualHosts."project-cloud.net" = { virtualHosts."project-cloud.net" = {
quic = true; quic = true;
http3 = true;
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
root = "${project-cloud.packages.${system}.default}/public"; root = "${project-cloud.packages.aarch64-linux.default}/public";
}; };
/* virtualHosts.${config.services.nextcloud.hostName} = {
virtualHosts.${config.services.nextcloud.hostName} = { quic = 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;
http3 = true;
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
@@ -207,21 +162,19 @@
virtualHosts.${config.services.gitea.settings.server.DOMAIN} = { virtualHosts.${config.services.gitea.settings.server.DOMAIN} = {
quic = true; quic = true;
http3 = true;
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
proxyPass = "http://unix:${toString config.services.gitea.settings.server.HTTP_ADDR}"; proxyPass = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}";
}; };
}; };
virtualHosts."stats.project-cloud.net" = { virtualHosts."board.project-cloud.net" = {
quic = true; quic = true;
http3 = true;
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
proxyPass = "http://localhost:8002/"; proxyPass = "http://localhost:${toString config.services.restya-board.virtualHost.listenPort}";
}; };
}; };
}; };
@@ -239,7 +192,6 @@
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;
@@ -253,53 +205,23 @@
REGISTER_EMAIL_CONFIRM = true; REGISTER_EMAIL_CONFIRM = true;
}; };
settings."markup.restructuredtext" = settings."markup.restructuredtext" = let
let docutils =
docutils = pkgs.python3.withPackages ( pkgs.python3.withPackages (ps: with ps; [docutils pygments]);
ps: with ps; [ in {
docutils ENABLED = true;
pygments FILE_EXTENSIONS = ".rst";
] 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.extraNfsdConfig = ''
rdma = true
vers3 = false
vers4.0 = false
vers4.1 = false
'';
services.nfs.server.exports = ''
/export/nixy 10.100.0.1/24(rw,nohide,insecure,no_subtree_check,all_squash,anonuid=1000,anongid=100)
'';
services.borgbackup.jobs."borgbase" = {
paths = [
"/var/lib/gitea"
];
exclude = [ ];
repo = "ssh://na9fqv67@na9fqv67.repo.borgbase.com/./repo";
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";
}; };
# needed for sendmail mail functionality /*
users.users.gitea.extraGroups = [ "postdrop" ]; 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;
}; };
@@ -308,94 +230,39 @@
defaults.email = "asmir.abdulahovic@gmail.com"; defaults.email = "asmir.abdulahovic@gmail.com";
}; };
sops = { sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets = { sops.secrets."miniflux_env" = {
"asmir_mail_pw_hash".sopsFile = ./secrets/asmir_mail_pw_hash.yaml; sopsFile = ./secrets/miniflux.yaml;
"borgbase_enc_key".sopsFile = ./secrets/borgbase_enc_key.yaml;
"borgbase_ssh_key".sopsFile = ./secrets/borgbase_ssh_key.yaml;
"gitea_mail_pw_hash".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;
"wg_preshared/workstation".sopsFile = ../common/secrets/wg_preshared.yaml;
"wg_privkey".sopsFile = ./secrets/wg_privkey.yaml;
"gitea_db" = {
sopsFile = ./secrets/gitea_db.yaml;
owner = config.users.users.gitea.name;
};
/*
"nextcloud_admin" = {
sopsFile = ./secrets/nextcloud_admin.yaml;
owner = config.users.users.nextcloud.name;
};
*/
};
}; };
sops.secrets."gitea_mail_pw_hash" = {
sopsFile = ./secrets/gitea_mail_pw_hash.yaml;
};
sops.secrets."asmir_mail_pw_hash" = {
sopsFile = ./secrets/asmir_mail_pw_hash.yaml;
};
sops.secrets."gitea_db" = {
sopsFile = ./secrets/gitea_db.yaml;
owner = config.users.users.gitea.name;
};
sops.secrets."nextcloud_admin" = {
sopsFile = ./secrets/nextcloud_admin.yaml;
owner = config.users.users.nextcloud.name;
};
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [80 443 587];
networking.firewall.allowedUDPPorts = [];
networking.firewall.allowPing = true;
networking.firewall.logRefusedConnections = lib.mkDefault false;
networking.hostName = "magpie"; networking.hostName = "magpie";
networking.nftables.enable = true;
networking.firewall = {
enable = true;
allowedTCPPorts = [
80
443
587
2049
]; # http, mail, mail, nfs
allowedUDPPorts = [
443
51820
]; # mail, wireguard
allowPing = true;
logRefusedConnections = lib.mkDefault false;
};
networking.nat = {
enable = true;
externalInterface = "enp1s0";
internalInterfaces = [ "wg0" ];
};
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.wireless.enable = false; networking.wireless.enable = false;
networking.wireguard.interfaces = {
wg0 = {
ips = [ "10.100.0.1/24" ];
listenPort = 51820;
# 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
#postSetup = ''
# ${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, TODO fix command below to be more specific
#postShutdown = ''
# ${pkgs.nftables}/bin/nft flush table ip nat
#'';
privateKeyFile = config.sops.secrets."wg_privkey".path;
peers = [
{
publicKey = builtins.readFile ../nixy/wg_pubkey;
presharedKeyFile = config.sops.secrets."wg_preshared/nixy".path;
allowedIPs = [ "10.100.0.6/32" ];
}
{
publicKey = builtins.readFile ../mediabox/wg_pubkey;
presharedKeyFile = config.sops.secrets."wg_preshared/mediabox".path;
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" ];
}
];
};
};
systemd = { systemd = {
enableEmergencyMode = false; enableEmergencyMode = false;

View File

@@ -2,24 +2,20 @@
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ {
config,
lib, lib,
pkgs,
modulesPath, modulesPath,
... ...
}: }: {
{
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = ["xhci_pci" "virtio_pci" "usbhid" "sr_mod"];
"xhci_pci" boot.initrd.kernelModules = [];
"virtio_pci" boot.kernelModules = [];
"usbhid" boot.extraModulePackages = [];
"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";
@@ -31,7 +27,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

View File

@@ -8,20 +8,11 @@ sops:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j - recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBOS3RoalBRQTB5Mkp4THpa YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKbTM0ZzVHZ1hlNzJ6d25a
aG9jS0UraEJlWHlVRFBWNWNJNGVOd0hxdUZBCm10OWwramN3UGdLUFpwbkduaU16 eFpZMHdBZjBFSjU4L0dkK1Noby9HK29CMldNCkJWb2NmcC9jNVFBMWJOZjVBalRw
S1FWcHIrK0dKRTAvSlN4SlI3eHJJL3cKLS0tIFljS3oxWXZyRlFEVUdUYXRsc2x4 VVZsN3B1WGJseDFiRTA1R3cvU3c2NEEKLS0tIFI4WHFDRHBCN29IQ0tPVC9zbHZS
N1h6SFYrcTZQK1JSRWZsV2MvTGFwb0kKxRohlU6vR3CR2SGqDT9P8AxQXMSbpQuO OFdsQUpvRzNKc2x1WW13b2d4R3lxdXMKJeMJ1IdxS+WUTzUlFdc4WfnUozWU4/80
g1t6gj3c+YBugUsCMuNpYEE+8OvfSQmsZV0VHojS8dMHSD9x75237w== 9GBPz3VCppunrXrh1zFkfIL+Lz48HFyf7HNI4na6TkyqipR6wsW4gw==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA2bnFpZzB2b21YVEZtenBj
TlkxdVlSWmM3dDNnQmxqQm5FWlQ0ZHhySGg0Cll1andBcE0yZ04zaFZlajBDSDUx
VHRWbFVOeE1CZmlveTB0UEpjZUpzMEEKLS0tIE5tcVFuaWt6K2RKR3FodGYra25n
bHNWWmh1dFdJVGtETWYvZDY1TGpvUVkKu4sO+/OXdV4xsLmOMlbV5nIidX+iREgF
q0IavI9nzOZ0tkWSV/9mFua8Mp1vPW8wCBOqnW3nhPvYDoTbGQEovQ==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2023-10-20T19:31:29Z" lastmodified: "2023-10-20T19:31:29Z"
mac: ENC[AES256_GCM,data:xXiCems/1em6JdK3V5GcD811yc8t6iHHFmz0OOrWM3muR807Ux80TrD3uoMN8GxIMyr0AloH41k8+vxaSlMmHsGGl6o1P13aR03E+A9ZLp1W2Nb3nCy5rH4pF8WSeNMxZ1SoT2iEAtTsh29xusocQTMUvr7Ou8TDLyVvrKhBPZw=,iv:SSPpVTbVQTvhPg1qm9akrg2ji1fRcukkwX5P2FzWMb4=,tag:a6GiGWfwnKLtteVoi9DJtQ==,type:str] mac: ENC[AES256_GCM,data:xXiCems/1em6JdK3V5GcD811yc8t6iHHFmz0OOrWM3muR807Ux80TrD3uoMN8GxIMyr0AloH41k8+vxaSlMmHsGGl6o1P13aR03E+A9ZLp1W2Nb3nCy5rH4pF8WSeNMxZ1SoT2iEAtTsh29xusocQTMUvr7Ou8TDLyVvrKhBPZw=,iv:SSPpVTbVQTvhPg1qm9akrg2ji1fRcukkwX5P2FzWMb4=,tag:a6GiGWfwnKLtteVoi9DJtQ==,type:str]

View File

@@ -1,30 +0,0 @@
borgbase_enc_key: ENC[AES256_GCM,data:bnSjKRY6HlmOyhjyuJLH8Xqzzpm7NgZI5g==,iv:RYlg83PqV2DIQHa5FoD6ls/utVjuSwmrv56N6Lrtn8s=,tag:hC6e9d5/EH9V7kG23XblEQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCdm1lejdSTm1PN1dsWHNJ
Nzc5aERNUlk5U0VoNWRzcVlMSXpqSEFmYkVNCkhqeHZrMng4WjEzcnBxdmtVUWlz
NXhiNFB6Ukc2eGRiNW96YVloQyt0ZW8KLS0tIFhjUVlITVVTcktCTzEzdUJzTmsy
UVhGc2VKeFJmS3RUY2YrR2FVVlVOcDAKsl+Fo16/3PpQ35aF4EBq5kjpyNxnZfip
1sfq1ppUfg6QRRICWtxUyXLS898BVusW8cMft6k9JbgZfQnc9YUSBg==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBhMTZhdm1mVXhWdlNJVytR
Z3ROLzNnZHUvMXRUcCtPeFFBRWJxY3lyRWljCkErdXAxc3ZETFMxd3ZCRHJPY2JU
N1YxL0VJZ1M0eUdEblhrTDd2VWNNRVUKLS0tIFRBTGNKUDUxaDdGK2x4aWIxMm9i
Zit1QTdRTjVNdjhFYklEUVlsQjZCM2cKtutM+au5vNF0x9ZP9Cg4pMUGsScIMRFU
KYrBHGW+VfEDpr534X8FXe1Uox70U+HPoT/mEm4RF575ssbTSoW0Hg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-05T19:01:07Z"
mac: ENC[AES256_GCM,data:Fz1ZwYR7cg+bcgNe/JZ2oEqhYihQWnCoy3J76VIPb089PNCXXp0xJ/eYjOoKlGK42z1wEO8hJ8FoaLvzuqhO0aatKpHDx0bBos8YqZYuGAuW115AdK5m6ecby7yi5lBIBpXOv1sU8uOtdBR32UPFAQ9oQf0KleWju47phF43v9o=,iv:Lbu5eLKfEnrehSY1+r0z75pZnNDNEVSmrEaJRDpDTU4=,tag:TLdtQTNbo0dxlpV9ZPm+uQ==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@@ -1,30 +0,0 @@
borgbase_ssh_key: ENC[AES256_GCM,data:W/aAQPSaPxGPeY50arJr50OWZjN+RJt9Y4MlpPNtw3KT2y+fUuMpNAjMuGd+3mzA2bs9YpE2WlgJ7KO5XPH7M36tSI+K2pcnjX1NMl8giJ952iCsqW4siij64JguK/gUi3GAe3LXHTjr3VgubSdqVd25k0bys+GiMfsHXXGD6tinKmEheis6XgfcChrvyYgQ4DKPW4HOHC4/V6roXaK+GTe+qY0BdzM27cDHc3a85cuHAAeDnYdNfdRAItI3KmDCx8edeBwt4vonR/v9AaDRH2PjZWq583Rlqoa8TQvQi0+yWf6O6MikHQlP1GoYCe5iI+rOF6KTseDjS2aoLZ+mXNxVmmOVdZrq1vx0UpsbJWRZE+1UluQwdrEm1mLMrI4Z2wFNfzjg9rOiJ36AL1YdcXtI0RHLYp8r92Qt3IFVwcC1NT/AWJkFOGr5z0PX0w+mi4J+f1wDvVguXp2KaguB2XAJbnpgQQ2ZqYv0gTkBLZ/RAOyQgaMaESCfJBWXE3DESMOspj4AYUsjQiaxmF13,iv:ph++5hCX3DzqwCoObz73/Xn0qy/+Za5+DI/EVsc67yY=,tag:0VkALd0j3D6yA7jCE7vogg==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAydXE0RXhGU0tsbnRTU0pw
THZBNngvUEwwMGVTQ3dscCtKMnVCb1pSSzN3CkVzNS9UY3dqYWRDOENTaFhadFcz
MGlibCt5Q3ppelVQU1AyM0wvTm1zMXMKLS0tIHNGM291dE5lb2pwTDFWbWtiUFNp
Y1ZoSG43TFd0WktKY3lUM3Y0RHJHZVkK0/sD5M54XiQzkSMlDHPkSVMypoxdhU/f
0nUWA20s6IU63Oqn0j7rGwV6S5j+fZCBzF4kSi8JLJb0619G2++M5g==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBiem5ZRE1oRU1hWENzc2sv
dkg4czhVeVNJQllnWG9vYnptL1FhZy9zc0hBClhLRzQxNlhQUEVUcnZDYlZqTWYx
eDQzV2ozbkd6ZWVZNWkxOXhBV0JNR00KLS0tIFQ4d29OQzhoWTl0Z3BrOURTSktU
SHZNdFhmS3ZQMnhzMDJWMTl4cXNudFEKhgbRW+6xqGhkTtr4h4JzPxZnGKqr4jcX
BABLTgzqvM+JvBzmUcYjuagVcLpWsQcNWBaYFBJBMhP8oOgF2dVBcQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-05T20:03:21Z"
mac: ENC[AES256_GCM,data:YpXUK6UNKpdudVZ+YManWreHufFzw9XbF1cBYutdAaTdqhlzPErpuOmEKLuMA7nr7SQkLK4pu1Eg0P5CA3QXsh0VUHMTiFWxNz7KZeoYAkacK9WzutEldsMG4iVlKmGHhQApSNW4kfPBKs1TgYyZdndBHEdILcoLDxke8kfkoVU=,iv:rpNeNTfXoMpScSfyrY7uK9ZkKasJGVAhgiMoe0XyJFo=,tag:Rl4Ya+iq0BvMSM/J0wySnQ==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@@ -8,20 +8,11 @@ sops:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j - recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUUXAraFhvN0NLeHhKWGJt YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKZ3l1UTRDMFVlM01TR1dW
c2ttRGljUzZiN2ZJeWpTdVRzNCtzL0pqdHhnCmJvek9YNkF4UTd1ZEFSaDBJR1Jz VzNnRXpuc0R0d3BpVzZveHRrdHRTTVRXNWpnCjVqNittd3BiZ0d3YXVQUXBpWExU
ZkUwTFNEYkhmbS9DVUJ0cTNrTVR5TlkKLS0tIFdscFJCaTJjYXFPcVZXUXBPS2ph cGdkSmVtOHJBN3FEdDVCeTVjUllHc0EKLS0tIG5TQlpIQXhNNmJiR0Y3L1p3SVpG
bERTT1dsaStRQnRvb1VnV2lTdGNQd0UK3dXTtGkfxq7oLzDrxFomE0oAjgZo+7H7 ZnlvRDRUam5MaFdZcGgyZlJSZzMvVWcKxiwENpP7qlF0Uy7DJM0WwLFQ0h+ost5T
SVVxKy/caewOXbI3R/CHxuaYb0fDDlyIX/zqxqkSaXUIh4rsIT46xw== BCsZtGP61Z2WcQq0EWYLqJItR2Tk3AXox014CJAm+G/G8PMTAKv0xw==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCOFFtQUptR2xIcW5FS3JR
aUdLbGRJeU4rbFFVcU9HVVdYL293WXY0L3hvCmpPN1BnRDlZNDhOT25zVFRjaGE1
TThWQUVDOG5YOGtlRmU1T1pZZ1dxTHcKLS0tIHZSUTBDbFN5eXZPMHZvZ2UwMFJu
cjhmWGJIUEhZQjNXN3J6ZTk1aE1jZHMKjiwLd6gHiLJx63AIzM17C3RaEBbCFIyI
ppLWEw8cm53hvjCuxsY8jJ/5kHD+25Pw2NMAD5PKt8SjrJzrJcOtMA==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2023-10-17T21:16:10Z" lastmodified: "2023-10-17T21:16:10Z"
mac: ENC[AES256_GCM,data:EPiLv8IzVXqRan9UlBuA3TmxtB3f4Qj4owed+1Pat9Tih1yOe4Z9RT28JIYJQ70R/IK+Yi0NQem9Ec6HU+8kaxLE3fff/4PM+B9QQbB6fjgLFod/nFk+OuWgR7FTcJ2j16OnlxE5ikCP+qdfvAM0eEv+BoDrWv98gSyCXtMCe48=,iv:th0E7zioz7gtgMlns8kvnf5hmlRH0KX65wPxBi3YP6Y=,tag:JhoGvF8LJmrAQpUOEopohA==,type:str] mac: ENC[AES256_GCM,data:EPiLv8IzVXqRan9UlBuA3TmxtB3f4Qj4owed+1Pat9Tih1yOe4Z9RT28JIYJQ70R/IK+Yi0NQem9Ec6HU+8kaxLE3fff/4PM+B9QQbB6fjgLFod/nFk+OuWgR7FTcJ2j16OnlxE5ikCP+qdfvAM0eEv+BoDrWv98gSyCXtMCe48=,iv:th0E7zioz7gtgMlns8kvnf5hmlRH0KX65wPxBi3YP6Y=,tag:JhoGvF8LJmrAQpUOEopohA==,type:str]

View File

@@ -8,20 +8,11 @@ sops:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j - recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBrL2YxU2VhNTArQ0QwYzlU YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCT2VyNWxUeUZ5aDdHcXJR
Z0NSRm5KRU8xRmZCT1E1N09KY2Vob0lsQ2k0CktqTlZnaUVNaEhpT3BkOGNmN2cv WGJVOGgyeC83MEV4REpGZkRUcVJKZDBqYmtjCllQdFhyRWNiTURYQmpucndFWDlr
Z0JoaFFTTzBwNzVmcHNOeXdwVzdQOTQKLS0tIDluazF6RXA0MVYvY2dRRGkxMGRk WUFybGtmckNBdXYzMVZxT3lQM1k3aTgKLS0tIEpNZjU1RkpSOVo3Y1ovR0lmbHJu
UEltOVNQdElpRGJVVlpoTVV2bU5rSncKoSGq75dVH7j/hSnqdjgWJyDgg0doEr6K bENVWmpCcTVqMDh2Wjhob2I2VzRRblkKPGCV1gRyihDCStM4tmvp89d996v1UzdJ
anD9sghKSX0afZmVJFOCXZ+lRYi7kmRbqFNBkkuuFndERtbN/5foXw== /NyK49//+uJJqwCEWuvHWWCB+EbkkOE6gPPKXZyXZSTbb/TDDcVF/Q==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSByNW9UcERVditoUE1DVUsw
WmxtbVNHeVpQS0g2WENJWTVJeHNUMU4yZEVNCnNrSnFnU2hUckxlYjJMYk5CTW9j
eU9mU1F4WlY1NWdLU0VxaDVtZWduaXcKLS0tIExtRHJkbFBKTWRjSGZOWGc1U0FF
ZjJkY0FpQnhCazVVVG1DOUZsQ2lXYzgK3UWDBu/Aq7n6CQiRF4NOQdSD4nfU2Gm2
Tlzyou5rj/rSAv5J7ENsDAzKtK6e5+Xe7acUDY+4Rye82vDxyoblaQ==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2023-10-14T21:21:12Z" lastmodified: "2023-10-14T21:21:12Z"
mac: ENC[AES256_GCM,data:NE9btXZKE3KJmxtWc0Ytb0atfBJKRs5T+Xk9RDFX6veSGBoB+M2+YMCONQdr8T2w6lLJqlrMBHqlfuvD3YnDj041xZmfSsi9NACliWj6GWVWcFWWc6W9OVH8/5CfwjYBdgTJ2o7wdnF9fYHvwMRcaHThDmoUkaExVtVsyu912og=,iv:kyekfEq32GSKVNKy8MJYfT5ZMKNSRQUk1viB2W6k29U=,tag:7ie/2P/F3bPQXpkWGKqTfA==,type:str] mac: ENC[AES256_GCM,data:NE9btXZKE3KJmxtWc0Ytb0atfBJKRs5T+Xk9RDFX6veSGBoB+M2+YMCONQdr8T2w6lLJqlrMBHqlfuvD3YnDj041xZmfSsi9NACliWj6GWVWcFWWc6W9OVH8/5CfwjYBdgTJ2o7wdnF9fYHvwMRcaHThDmoUkaExVtVsyu912og=,iv:kyekfEq32GSKVNKy8MJYfT5ZMKNSRQUk1viB2W6k29U=,tag:7ie/2P/F3bPQXpkWGKqTfA==,type:str]

View File

@@ -8,20 +8,11 @@ sops:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j - recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA0K0ZNSWEweUNTbm5KZE5y YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBpZ1d3aGhud0UyOVV6Vzcw
M3ZlbTdBc1RheHFNbGpxZllRdi9tMXVJaEFJCmdQdWh6cks5L3JFclJYWmlkYmVv Q3Q2OVRQOEpXUk1TK2dOOEZtKzNlUkJGZHh3CmJwYnRpWFhJWHZXQ2I1TnhKWDRx
WDA2YXhiN3ovL1V0ZlJjbmluSm5tbGMKLS0tIG1QRnoxMHBQeGtLekRSRVVMNWdP MGlrbXJoQTVPcUFBa0gvME95OVlxWkEKLS0tIHNZWWRwWUJPV3o3REpENzdMYkVk
R1BuNDZVNzNaTmVvZm9EMy9ld0V4U1UKFjPcFiuhjwCChJKGQbIPFsHwl9oE7S+g Y1V5SXhCUllDWGhjK3JzWDRKQU9hMmMKuVmn6OAy2q/mpBKqUhl1qfpnPvFOd72c
Utne4LrODAa3wj8TX3vgfRTBrljJmt+OwQJxRfTtq2ocyzR9rNUI+w== /jMqnxClGSVXjJ5qdvcXCfLeYwT8vnhViNZmjE1ebRosE5YupvrjUg==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBVNFAvaUlyeHA3Mnluam1G
dmtIWHU2R2pRV2E3NTVKV1NOTHRSYjVhQVRVCnR4OENHZGYzVE9UdlJBTjdxblIz
Q0MxN3gyeTJhNTdORFk0SDdycVFrWjAKLS0tIEc5c0RMNjdLSTNKWExsVmlQUGx5
RFp0dWJXOVVvSGlhZ1pPbGRBWmt2S0UKTwkFwYaTr5jNuQTlqR/1ud8ITKGIbNiM
myAf39EHCP6cQQ0fjtx2ihy56m9xoK35Aj7h3w0fadONWtCNnhuH2A==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2023-10-13T11:17:33Z" lastmodified: "2023-10-13T11:17:33Z"
mac: ENC[AES256_GCM,data:CpzC0H2Rfvl7F9tXCJ0WwkhE4Ba7eOIl1QMh1DHP8YQ9rChzAE8S5SXXuJA0jcmVY6NPfZ7zl8VEBepE+LHCq2UdSkAefawLeM6HwNfedP8N+zheqlyCZ8Os48628aHYN0PVI+/dMvpWWcfl+CFaH1mm4c+KYedCIsS9ZEYi9N8=,iv:EbF58pxbtHxPTAgs4dbZ31qyRT3QJ1kQoUShbLE11FY=,tag:FNF/OzS2SL3FweFw0RcRLQ==,type:str] mac: ENC[AES256_GCM,data:CpzC0H2Rfvl7F9tXCJ0WwkhE4Ba7eOIl1QMh1DHP8YQ9rChzAE8S5SXXuJA0jcmVY6NPfZ7zl8VEBepE+LHCq2UdSkAefawLeM6HwNfedP8N+zheqlyCZ8Os48628aHYN0PVI+/dMvpWWcfl+CFaH1mm4c+KYedCIsS9ZEYi9N8=,iv:EbF58pxbtHxPTAgs4dbZ31qyRT3QJ1kQoUShbLE11FY=,tag:FNF/OzS2SL3FweFw0RcRLQ==,type:str]

View File

@@ -8,20 +8,11 @@ sops:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j - recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBHYVVnM0xOVzJ5OFZsYlZL YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBrUnQ3SDAyRTUxUDF0dDhY
SThvVkNBdzJoVkZ3ZFBMYVlTNjQwNUxuaVFjCjBhUFRSaGZ6TEh4ellSdS9Uc3FP K3JmQWlYRVJtdEFac0J4U0RGKzZGNXJmUEg4CmtBSW9yNGZScXhKdnhZWkxIamFW
cGJaanNUci9JMDZISXljM1lSREZaZGcKLS0tIFhJOGVIM3Bub3J0WWVMNDlqY3da YXEzbGhwR2F3dDJGdzljZUZBeERhU1kKLS0tIGlXZUhsdnI4ell5R3ZZbjZ0NCtO
RmVCdEpoUjJGTDYzczNnOWRRTTE3WmcKnRV787F3yBJgSDEhHW1+sAFcyvH+OMQf TUpkZmxBNzZ1UUY1dGRud2hycGUyZW8KFUGikaFQjFfmn068qex2tpGbRHIbmS3l
N7er4Wd9Tqi3IJ/lR2Z7Gwn1Dfm5kMHk+hxzPlmdpaGr42ZJNPmNVw== 27lqo8+eRFnq0nw8H/1yRMi8IghR0+XK68T49hlt0VLS9LZJG1aPag==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCZmFFRXU5NnlGRit6K1ov
TmR0K05uY2hva3liaDdGNmhST3dWTGdZb1EwCkpsQ3o1ZWloaUdFR3NpbS9uKzE5
S0ZRRmkxbkJnMFN6SzhzUFo1M3NnTnMKLS0tIE84aFdJS3E4eWw3SG1JeXJwRWd2
RWp5ZUtUNzJ4OWswWmhXWjRkZkpzWEUKj23XymHvh+nh3HiPD+erv2GZNNpUZKp6
s0KJSkGuIuILf3kfgp23jXNSFLMEtWwlSh5EP02g2EIHzUg2kLKNpQ==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2023-10-17T23:08:24Z" lastmodified: "2023-10-17T23:08:24Z"
mac: ENC[AES256_GCM,data:fb9cOL4Q+q5uarmXtXNlpRmWgv/Ao1MqwwH2V2CQxEiP8zFyFBZs2435vdcLzrQrnBXz0JLVu4g10SH2T4dpYFP42teIkrgmneecjjcM+UOsBsGsrxlpHMha1t/ERRhBA7uJze5/kwHqry6eruWehRTu65QF1qBTql3m6ipjCeY=,iv:a7aFuTCcRCIDERlrj/9dFCF7VgCDDakfPteQimHV3lc=,tag:4mwrDHaQWA4EU0AgtgZaMg==,type:str] mac: ENC[AES256_GCM,data:fb9cOL4Q+q5uarmXtXNlpRmWgv/Ao1MqwwH2V2CQxEiP8zFyFBZs2435vdcLzrQrnBXz0JLVu4g10SH2T4dpYFP42teIkrgmneecjjcM+UOsBsGsrxlpHMha1t/ERRhBA7uJze5/kwHqry6eruWehRTu65QF1qBTql3m6ipjCeY=,iv:a7aFuTCcRCIDERlrj/9dFCF7VgCDDakfPteQimHV3lc=,tag:4mwrDHaQWA4EU0AgtgZaMg==,type:str]

View File

@@ -1,30 +0,0 @@
wg_privkey: ENC[AES256_GCM,data:TnUTZheznQqnyK59qdLmAcuVr9JICWlNVtPF1qRMDPbBblD0ALn10qbEC7M=,iv:83fum5iYUrw08XJ0s7RE+/WDGeVjVswPlptzQjWOjeQ=,tag:YhQlmilbnrpRxcUb6rzfHg==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBJUFplcGZMWGhrS2NsRUZF
WnltcCsvS0VaV29RbTdDK1UveDJwdlBXbTBJCkVaekVUWFVSVkZ5UjUwaWMxU3h0
eEtOQUR2VkF6RUtLYVBNalJPV3YzWWsKLS0tIDNGek4veStoa011VUV2Z3ZSUVpq
ZWlYQ2x6a3ROdlYzc3E1WjRhN3F1QUUKwaJruHMCoWtgvep0fI00helDZh8WVrsh
MV5IaEH5xapid5HHw9bLkjeeVKcT1fo7LCovouv+G5NTjvVzsMyLhw==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlRWdQeWxUUlJaRndzcVln
ck5USkpzdDJpSWJTNDZJWVBMQnl0QnVvTDF3Clg2SEY3eDdqS0Y5ei8vUlk0dTli
bTYycFYyMjcxdmtpc1IybXBxN2RORm8KLS0tIHlHaEJLMnRTQ20yN2RrRnNqMzk0
ZVlSb1FHVVJhb0IyaHJiQlpHRjNyMDAKNQ8VzdC3s43YcZk6UQjyA1GX69x/znhE
ZaFkMfNX6CgxfjKRW2rhXrJi+txdhmQ0CfpfWDr3zp3XVuMq942M1Q==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-04T19:04:00Z"
mac: ENC[AES256_GCM,data:qYNlokRd1lQnOwNNVbV4PwdYeybIRNrxDKX4RPfHJxvQGHBmISzd52JCnCe7zJ14FP/bSNhQqfuxyjdxid/DVPUvkHP+HlaKUR0SLv6c91ORDoaMRC93hrPXypRGplFSbSjnd3dME43ll3oH8fLe4lP9z9KhGS2lRMdduptfWvg=,iv:/j6OOT1dK94vrPOk1Lbcca8KeWvoD+ZaHoH6nMMo0y8=,tag:syHuBVkhOCJ8JCONKkqFkg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@@ -1 +0,0 @@
xhjJdIXtTBNhtSoehsi6p+znIgOfMRetl5/wtnMxJGk=

View File

@@ -1,24 +1,20 @@
{ config # Edit this configuration file to define what should be installed on
, nvim # your system. Help is available in the configuration.nix(5) man page
, pkgs # and in the NixOS manual (accessible by running nixos-help).
, system
, zremap
, ...
}:
let
USER = "akill";
in
{ {
imports = [ ]; config,
pkgs,
lib,
sops-nix,
zremap,
...
}: {
imports = [];
system.stateVersion = "23.05"; system.stateVersion = "23.05";
system.autoUpgrade.enable = false; system.autoUpgrade.enable = false;
system.switch = {
enable = true;
enableNg = true;
};
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";
@@ -26,46 +22,21 @@ in
group = config.users.users.nobody.group; group = config.users.users.nobody.group;
}; };
sops.secrets."wg_privkey" = {
sopsFile = ./secrets/wg_privkey.yaml;
};
sops.secrets."wg_preshared/mediabox" = {
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.nixVersions.latest; package = pkgs.nixUnstable;
settings = { settings = {
experimental-features = [ experimental-features = ["nix-command" "flakes"];
"nix-command"
"flakes"
];
trusted-users = [ "akill" "root" ];
}; };
}; };
boot = { boot = {
initrd = { initrd.compressor = "zstd";
compressor = "zstd"; kernelModules = ["acpi_call"];
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";
@@ -76,38 +47,27 @@ in
memtest86.enable = true; memtest86.enable = true;
}; };
readOnlyNixStore = true; readOnlyNixStore = true;
supportedFilesystems = [ "btrfs" ]; supportedFilesystems = ["btrfs"];
tmp.useTmpfs = true; tmp.useTmpfs = true;
}; };
security = { security = {
rtkit.enable = true; rtkit.enable = true;
allowSimultaneousMultithreading = true; acme = {
sudo.enable = true; acceptTerms = true;
doas.enable = true; defaults.email = "aasmir@gmx.com";
doas.extraRules = [ };
{
users = [ USER ];
keepEnv = true;
persist = true;
}
];
}; };
powerManagement = { powerManagement = {
enable = true; enable = true;
cpuFreqGovernor = "ondemand";
}; };
networking = { networking = {
nftables.enable = true;
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ allowedTCPPorts = [80 443];
80
443
51820
8020
];
}; };
hostName = "mediabox"; hostName = "mediabox";
@@ -115,45 +75,23 @@ in
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 = [ nameservers = ["127.0.0.1" "::1"];
"127.0.0.1"
"::1"
];
dhcpcd.extraConfig = "nohook resolv.conf"; dhcpcd.extraConfig = "nohook resolv.conf";
networkmanager.dns = "none";
extraHosts = '' extraHosts = ''
192.168.1.173 nixy.lan 192.168.1.173 nixy.lan
192.168.88.171 jellyfin.mediabox.lan 192.168.88.171 jellyfin.mediabox.lan
192.168.88.171 jellyseerr.mediabox.lan
192.168.88.171 mediabox.lan 192.168.88.171 mediabox.lan
192.168.88.171 qbittorrent.mediabox.lan 192.168.88.171 qbittorrent.mediabox.lan
192.168.88.1 router.lan 192.168.88.1 router.lan
192.168.88.231 workstation.lan 192.168.88.231 workstation.lan
192.168.88.121 ender.lan
''; '';
wireguard.interfaces = {
wg0 = {
ips = [ "10.100.0.5/24" ];
privateKeyFile = config.sops.secrets."wg_privkey".path;
peers = [
{
publicKey = builtins.readFile ../magpie/wg_pubkey;
presharedKeyFile = config.sops.secrets."wg_preshared/mediabox".path;
allowedIPs = [ "10.100.0.0/24" ];
endpoint = "5.75.229.224:51820";
persistentKeepalive = 25;
}
];
};
};
}; };
time.timeZone = "Europe/Sarajevo"; time.timeZone = "Europe/Sarajevo";
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ nvim.overlays.${system}.overlay ];
environment = { environment = {
homeBinInPath = true; homeBinInPath = true;
variables = { variables = {
@@ -161,82 +99,81 @@ in
}; };
}; };
programs = { programs.gnupg.agent = {
steam = { enable = true;
enable = true; enableSSHSupport = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = false;
localNetworkGameTransfers.openFirewall = true;
};
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
appimage = {
enable = true;
binfmt = true;
};
nix-ld = {
enable = false;
libraries = with pkgs; [
stdenv.cc.cc.lib
zlib
];
};
zsh.enable = true;
firejail.enable = true;
}; };
programs.zsh.enable = true;
programs.light.enable = true;
programs.firejail.enable = true;
programs.adb.enable = false;
programs.wireshark.enable = true;
programs.sway.enable = true;
# List services that you want to enable: # List services that you want to enable:
systemd = { systemd = {
services = { services = {
"zremap@" = { "macchanger-wireless" = {
enable = true; after = ["sys-subsystem-net-devices-wlp3s0.device"];
restartIfChanged = true; before = ["network-pre.target"];
bindsTo = ["sys-subsystem-net-devices-wlp3s0.device"];
description = "Changes MAC of my wireless interface for privacy reasons";
stopIfChanged = false;
wantedBy = ["multi-user.target"];
wants = ["network-pre.target"];
script = ''
${pkgs.macchanger}/bin/macchanger -e wlp3s0 || true
'';
serviceConfig.Type = "oneshot";
};
"zremap" = {
description = "Intercepts keyboard udev events";
wants = ["systemd-udevd.service"];
wantedBy = ["multi-user.target"];
serviceConfig.Nice = -20; serviceConfig.Nice = -20;
unitConfig = { script = ''
Description = "zremap on %I"; sleep 1
ConditionPathExists = "%I"; ${zremap.defaultPackage.x86_64-linux}/bin/zremap \
}; /dev/input/by-path/platform-i8042-serio-0-event-kbd
serviceConfig = { '';
Type = "simple";
ExecStart = "${zremap.defaultPackage.${system}}/bin/zremap %I";
};
}; };
"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 = [ wantedBy = ["default.target" "suspend.target" "shutdown.target"];
"default.target"
"suspend.target"
"shutdown.target"
];
}; };
};
coredump.enable = false; /*
extraConfig = '' "cpu_setting" = {
DefaultTimeoutStartSec=30s description = "Enable turboot boost and undervolt cpu after suspend";
DefaultTimeoutStopSec=30s wantedBy = ["post-resume.target" "multi-user.target"];
''; after = ["post-resume.target"];
script = ''
echo 1 > /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
'';
serviceConfig.Type = "oneshot";
};
*/
};
}; };
services = { services = {
acpid.enable = true; acpid.enable = true;
btrfs.autoScrub.enable = true; btrfs.autoScrub.enable = true;
dbus.enable = true; dbus.enable = true;
dbus.implementation = "broker";
envfs.enable = true;
fstrim.enable = true; fstrim.enable = true;
fwupd.enable = true; fwupd.enable = true;
ntp.enable = true; ntp.enable = true;
openssh.enable = true; openssh.enable = true;
openssh.settings.PermitRootLogin = "yes"; restya-board.enable = false;
thinkfan.enable = false; thinkfan.enable = false;
xrdp = { xrdp = {
@@ -250,13 +187,13 @@ in
}; };
jellyfin = { jellyfin = {
enable = false; enable = true;
user = "akill"; user = "akill";
openFirewall = true; openFirewall = true;
}; };
jellyseerr = { jellyseerr = {
enable = false; enable = true;
openFirewall = true; openFirewall = true;
}; };
@@ -267,104 +204,57 @@ in
pulse.enable = true; pulse.enable = true;
}; };
avahi = { deluge = {
enable = false; enable = false;
nssmdns4 = false; user = "akill";
openFirewall = true; openFirewall = true;
}; dataDir = "/home/akill/.config/deluge";
web = {
libinput.enable = true; enable = true;
xserver = { openFirewall = false;
enable = true; };
dpi = 144; config = {
desktopManager.xterm.enable = false; download_location = "/media";
desktopManager.plasma5.bigscreen.enable = true; allow_remote = true;
#desktopManager.plasma6.enable = true; daemon_port = 58846;
displayManager = {
lightdm.enable = false;
startx.enable = true;
sddm.enable = true;
sddm.wayland.enable = true;
}; };
windowManager.i3.enable = false;
}; };
udev = { transmission = {
packages = [ ];
extraRules = ''
#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"
'';
};
tlp = {
enable = false; enable = false;
}; openFirewall = true;
batteryNotifier = {
enable = false;
notifyCapacity = 20;
suspendCapacity = 10;
};
actkbd = {
enable = true;
bindings = [
{
keys = [ 115 ];
events = [ "key" ];
command = "XDG_RUNTIME_DIR=/run/user/$(id -u ${USER}) ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
}
{
keys = [ 114 ];
events = [
"key"
"rep"
];
command = "XDG_RUNTIME_DIR=/run/user/$(id -u ${USER}) ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
}
{
keys = [ 113 ];
events = [
"key"
"rep"
];
command = "XDG_RUNTIME_DIR=/run/user/$(id -u ${USER}) ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
}
{
keys = [ 224 ];
events = [ "key" ];
command = "${pkgs.light}/bin/light -U 5";
}
{
keys = [ 225 ];
events = [ "key" ];
command = "${pkgs.light}/bin/light -A 5";
}
];
};
dnscrypt-proxy2 = {
enable = true;
settings = { settings = {
ipv6_servers = true; rpc-whitelist = "192.168.88.*";
require_dnssec = true; download-dir = "/media";
require_nolog = true; };
require_nofilter = true; };
http3 = true;
sources.public-resolvers = { qbittorrent = {
urls = [ enable = true;
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md" user = "akill";
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md" openFirewall = true;
]; dataDir = "/home/akill/.config/qbittorrent";
cache_file = "/var/lib/dnscrypt-proxy/public-resolvers.md"; port = 8081;
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; };
};
nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts."deluge.mediabox.lan" = {
locations."/".proxyPass = "http://localhost:8112/";
};
virtualHosts."qbittorrent.mediabox.lan" = {
locations."/".proxyPass = "http://localhost:8081/";
};
virtualHosts."jellyfin.mediabox.lan" = {
locations."/".proxyPass = "http://localhost:8096/";
};
virtualHosts."jellyseerr.mediabox.lan" = {
locations."/".proxyPass = "http://localhost:5055/";
}; };
}; };
@@ -376,53 +266,114 @@ in
KillUserProcesses=yes KillUserProcesses=yes
''; '';
}; xserver = {
enable = true;
fonts = { libinput.enable = true;
fontconfig = { desktopManager.xterm.enable = false;
cache32Bit = true; displayManager.lightdm.enable = false;
allowBitmaps = true; displayManager.defaultSession = "none+icewm";
useEmbeddedBitmaps = true; windowManager.icewm.enable = true;
defaultFonts = {
monospace = [ "JetBrainsMono" ];
};
}; };
packages = with pkgs; [ udev.packages = [];
dejavu_fonts
dina-font tlp = {
fira-code enable = true;
fira-code-symbols settings = {};
font-awesome_6 };
inconsolata
iosevka actkbd = {
jetbrains-mono enable = true;
liberation_ttf bindings = [
libertine {
noto-fonts keys = [121];
noto-fonts-cjk-sans events = ["key"];
noto-fonts-color-emoji command = "${pkgs.alsaUtils}/bin/amixer -q set Master toggle";
noto-fonts-emoji }
proggyfonts {
siji keys = [122];
terminus_font events = ["key" "rep"];
terminus_font_ttf command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}- unmute";
ubuntu_font_family }
vistafonts {
]; keys = [123];
events = ["key" "rep"];
command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}+ unmute";
}
{
keys = [224];
events = ["key"];
command = "/run/current-system/sw/bin/light -U 5";
}
{
keys = [225];
events = ["key"];
command = "/run/current-system/sw/bin/light -A 5";
}
];
};
mpd = {
musicDirectory = "/home/mpd/music";
enable = false;
extraConfig = ''
audio_output {
type "pulse"
name "pulsee srv"
server "127.0.0.1"
}
'';
};
batteryNotifier = {
enable = true;
notifyCapacity = 20;
suspendCapacity = 10;
};
dnscrypt-proxy2 = {
enable = true;
settings = {
ipv6_servers = true;
require_dnssec = true;
sources.public-resolvers = {
urls = [
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
];
cache_file = "/var/lib/dnscrypt-proxy/public-resolvers.md";
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
};
};
};
}; };
fonts.packages = with pkgs; [
dina-font
fira-code
fira-code-symbols
font-awesome
font-awesome_4
iosevka
jetbrains-mono
liberation_ttf
proggyfonts
siji
];
virtualisation = { virtualisation = {
podman = { podman = {
enable = false; enable = true;
autoPrune.enable = true;
dockerCompat = true; dockerCompat = true;
}; };
}; };
sound.enable = true;
hardware = { hardware = {
bluetooth = { bluetooth = {
enable = true; enable = false;
settings = { settings = {
General = { General = {
Enable = "Source,Sink,Media,Socket"; Enable = "Source,Sink,Media,Socket";
@@ -430,9 +381,14 @@ in
}; };
}; };
graphics = { opengl = {
enable = true; enable = true;
extraPackages = [ ]; driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
];
}; };
}; };
@@ -441,34 +397,21 @@ in
algorithm = "zstd"; algorithm = "zstd";
}; };
users.users.${USER} = { users.users.akill = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = [ extraGroups = ["wireshark" "wheel" "kvm" "tty" "audio" "sound" "adbusers" "transmission"];
"wheel"
"tty"
"audio"
"sound"
];
openssh.authorizedKeys.keys = [
(builtins.readFile ../nixy/ssh_pubkey)
];
}; };
users.users.ado = { users.users.ado = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = [ extraGroups = ["wireshark" "wheel" "kvm" "tty" "audio" "sound" "adbusers" "transmission"];
"wheel"
"tty"
"audio"
"sound"
];
}; };
users.users.mediauser = { users.users.mediauser = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.bash; shell = pkgs.bash;
extraGroups = [ ]; extraGroups = [];
}; };
} }

View File

@@ -2,35 +2,25 @@
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ {
config,
lib, lib,
pkgs,
modulesPath, modulesPath,
... ...
}: }: {
{
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
"xhci_pci" boot.initrd.kernelModules = [];
"ehci_pci" boot.kernelModules = ["kvm-intel"];
"ahci" boot.extraModulePackages = [];
"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 = [ options = ["subvol=root" "compress=lzo" "noatime"];
"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";
@@ -38,41 +28,25 @@
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 = [ options = ["subvol=home" "compress=lzo" "noatime"];
"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 = [ options = ["subvol=nix" "compress=lzo" "noatime"];
"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 = [ options = ["subvol=persist" "compress=lzo" "noatime"];
"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 = [ options = ["subvol=log" "compress=lzo" "noatime"];
"subvol=log"
"compress=lzo"
"noatime"
];
neededForBoot = true; neededForBoot = true;
}; };
@@ -82,7 +56,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;

View File

@@ -6,23 +6,32 @@ sops:
azure_kv: [] azure_kv: []
hc_vault: [] hc_vault: []
age: age:
- recipient: age19yrl6pr73cv067ksfz0txp3zm2au25jfyjeerw23ml55ps5cyyfqtm3kmt - recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2Zmc0c1AxMVEzdi94L0Nh YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwMkdLVEFQMVk1allhK2hL
dHJFSHVSbG1vay9NUDBEVkM4ZWNoT3h4Q1c0CkhWdWVzTEJxZENZYXVFT2RhV3pT NXFXc254SmhxK0lFWTd1SUorUGQ0VEJPcXo4ClNYSkhJbnVjUjdFOGtoWFV2VWZC
aDZIUUdWVUVRUDc4ZEFDTkdnaDJxdVkKLS0tIDd6TE56REdjRVdtSXB1dkJrVVNj NmpaRDVhWnRQUmVDWS9WU2pTVlBEQ1EKLS0tIFAydU9aYXJnd1NnRzU2YXpXM1Vq
dUxhRnB4dVFRam9xNlFiY2VOSXpNamcKNzRghHeyPtltKH4GkJQ0ef4apr5gziq9 VWhhbkZTT1kwTEl5VEVWR1A2aW5OUDgKiYcj5Yo42RjQeo1UeUTBV8YBNYL8ccLW
dhXy6Qil48QJd4hnyr7GW1n7eRIq24OWO3WglLbVAUSQr/gzM2TWiA== bQ1655MU/q3LQh14lqwbsOfmGjPc9H0ECltm+V+kNPTRi76qFhcodg==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s - recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBSMjVQZkVVQmZFbCt3Z2ZI YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA1eGJCRlhHbk1JQWl2RllZ
Q3NVZUJ0VkZjK0E5SFpqWE50c2dOeFNsUm1jCmdDZGxZYk13emhhanRzWjhvZFM1 R3hkVGtIamJzZlVLazUrVEJnNmU3Z0tLMG5RClp2Z01Fc1p5QzFhUWNzU2NpU0Zo
UWNpNm5malkrU1Rkak9PNWk2bW5nRDQKLS0tIE9UdXg4L0hMRzJuUERIMytvc2pr aTRPMFhPYlA4VmZNUWFsWHZRMUxyaTQKLS0tIG51TW9JRW12RzVmdWpZY3FaVnBR
Y1BBZFJseUNIeTVtTjBGazk5WE1ZcUUKs9pEtDbCYRfSP0Rh9ENo9A6nUFkYHr4D UTZ2YWdQVjRTTUxPUWVwbHI4aklITmMKZQnfJs01D4FX+MF6oU0FmWYQ4reB/X/k
3DvOKSyLL33FBoEddDBd7Si1mpjY2bunueBAe+diDgOrol6tWIMoUw== Lat8FrqerqaCYqYmAKe3HWBR6HEVm0U7I7jkVuoROMqz3uci+5HWbQ==
-----END AGE ENCRYPTED FILE-----
- recipient: age19yrl6pr73cv067ksfz0txp3zm2au25jfyjeerw23ml55ps5cyyfqtm3kmt
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBrNTNhaFVzaWFoTU9GdEZD
Z0JWQlFXc3N3SnAwR09YUmIxZlpvNllmU2tnCkFtVlRXMGV2d1V4S0ZxNlRiVzlC
N3dHSFM2eG02UVQrdGR0SnhUMitvelkKLS0tIFpvQUlIZ05HK3F0a2FkKy9EOURY
YzUwa2s0eTliSmxtajdjYmFsOSs2T1kKg08c1uB0swRSo0R6s6hup5JBfkrCKoxf
SjwBAZtjNhr3hrLy1eoo/dpYG6oAkEs3GvaaZ02ldT872dxZvg6r+g==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2023-09-30T14:18:57Z" lastmodified: "2023-09-30T14:18:57Z"
mac: ENC[AES256_GCM,data:R0TJ/7uihpsCHwPLXFYKi+ZaEUtbZVz02utDF7vO7gYDN1MFa0c5nZ/mAnJJtTJI41GdAu9ezTUiU6H1HTHLxYMeUoNAAvNlSCkvGc/oMQofXidL34hq1X2vG05N3UQlkbAXTlCBkYc20oVVOVmT/lq7USEx29oB/ytxZzKYFvM=,iv:qpz0g+O4kwChct1ddiT3D8rZBg08YUr4Ba5pJ4WQyzo=,tag:pWLFiQWl1QSzveBxnq4uXw==,type:str] mac: ENC[AES256_GCM,data:R0TJ/7uihpsCHwPLXFYKi+ZaEUtbZVz02utDF7vO7gYDN1MFa0c5nZ/mAnJJtTJI41GdAu9ezTUiU6H1HTHLxYMeUoNAAvNlSCkvGc/oMQofXidL34hq1X2vG05N3UQlkbAXTlCBkYc20oVVOVmT/lq7USEx29oB/ytxZzKYFvM=,iv:qpz0g+O4kwChct1ddiT3D8rZBg08YUr4Ba5pJ4WQyzo=,tag:pWLFiQWl1QSzveBxnq4uXw==,type:str]

View File

@@ -1,30 +0,0 @@
wg_privkey: ENC[AES256_GCM,data:ovAxwZEcmRzt/zb42ortPwPyREC16E5YNfDBguZK7uByR4BgJi8kNeoG+GY=,iv:Cv50+JB5S+44U3L9od4zwrEKHi/LM38LnA94DkvCer4=,tag:ehKQrqWwA6daxc2yASDWNQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age19yrl6pr73cv067ksfz0txp3zm2au25jfyjeerw23ml55ps5cyyfqtm3kmt
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKSGxudng1enhDa281S0pm
Q0kwQmc1T2hUK0dHd3B4cUh3RzZPZ1dGaXo4CkdPMzNnQWMyYjJiUWk4WEYyODFp
b2FTbnZwMHh6SHhIcjVNbnBKSVk3TWMKLS0tIFBZOW56K2Y5Q3I4dmh5dXBieEF2
SWQwcmkzQU5aeEliS29QN3Y0V04zNU0KF0WmF8BDvZ2DyJFztKJv8YmDuqVsAoO4
QEVLwrJDurRxcNIVGLs5W+60Osa5XMpNc74e23rU7mucB5wPA/84dg==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWMUtUYyswV3czWDdXWG1x
cnh5QTZpdlBZYlZ2b2oweXJ5SkZSQldhQmpZCmFrQVlyYnNqZ01kVTVNQTlBRFNR
WDlITEJOUFZGa0U2NG8xMGpkSnNOQTAKLS0tIDNlK0dxWnB3a3dkTnRmTm5oTlFD
eGV1VE1tL1c0a3hUdXM2bExmV1l3RnMK8aOugY3XHTCfeBDJVOyGljuuu6hQGJ7W
ZGoxOz+hhYIHj/04J9DIIOUyt81m8LNCbxcacFKyW7Sqosfj+7N7Gg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-14T19:25:26Z"
mac: ENC[AES256_GCM,data:vcyglyYG93K3KBISpIESGlNCs5ojWZAL0gyDUzBNCxG5H8RKEz1Y7yOtr5EXnnP66qcBHlKhb81Iyrc071pmJL9dIttiqmvjSWf0zZ9RuV0uYcO/42cqk3J4tBJ6iYCi64y58jifDObbRni6jiGVEGEkSk8cXFqR8UXoSTeXWtU=,iv:avpWr8SeHK1VHz9XhkO7Nd7VOfMP7JXcQaXJA8Xiuhs=,tag:ixJsw/snZEWXGhdPLU1cGg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@@ -1 +0,0 @@
S+tL/pTm4D7bsWj/dhpPXHYxcye/DuNMguLD5l1ACEU=

View File

@@ -2,8 +2,7 @@
config, config,
pkgs, pkgs,
... ...
}: }: {
{
# Enable Nginx # Enable Nginx
services.nginx = { services.nginx = {
enable = true; enable = true;
@@ -62,7 +61,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";
@@ -73,7 +72,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"];
}; };
} }

View File

@@ -4,13 +4,11 @@
pkgs, pkgs,
... ...
}: }:
with lib; with lib; let
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;
@@ -69,24 +67,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 \
@@ -112,10 +110,7 @@ in
}; };
}; };
users.groups = mkIf (cfg.group == "qbittorrent") { users.groups =
qbittorrent = { mkIf (cfg.group == "qbittorrent") {qbittorrent = {gid = null;};};
gid = null;
};
};
}; };
} }

View File

@@ -1,98 +1,46 @@
{ config
, nvim
, pkgs
, system
, zremap
, ...
}:
let
USER = "akill";
in
{ {
imports = [ ]; config,
pkgs,
lib,
nix-xilinx,
sops-nix,
zremap,
...
}: {
imports = [];
system = { system.stateVersion = "23.05";
stateVersion = "23.05"; system.autoUpgrade.enable = false;
autoUpgrade.enable = false;
etc.overlay.enable = true;
nixos-init.enable = true;
};
sops = { sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; sops.secrets."peerix/private" = {
secrets = { sopsFile = ./secrets/peerix.yaml;
"peerix/private" = { mode = "0400";
sopsFile = ./secrets/peerix.yaml; owner = config.users.users.nobody.name;
mode = "0400"; group = config.users.users.nobody.group;
owner = config.users.users.nobody.name;
group = config.users.users.nobody.group;
};
"wg_privkey" = {
sopsFile = ./secrets/wg_privkey.yaml;
};
"wg_preshared/nixy" = {
sopsFile = ../common/secrets/wg_preshared.yaml;
};
"wg_privkey_proton" = {
sopsFile = ./secrets/wg_privkey_proton.yaml;
};
"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.nixVersions.latest; package = pkgs.nixUnstable;
settings = { settings = {
sandbox = true; sandbox = true;
experimental-features = [ experimental-features = ["nix-command" "flakes"];
"nix-command"
"flakes"
];
}; };
}; };
boot = { boot = {
extraModulePackages = with config.boot.kernelPackages; [ extraModulePackages = with config.boot.kernelPackages; [usbip];
usbip
v4l2loopback
];
initrd.compressor = "zstd"; initrd.compressor = "zstd";
initrd.kernelModules = [ ]; initrd.kernelModules = ["amdgpu"];
initrd.systemd.enable = true; binfmt.emulatedSystems = ["wasm32-wasi" "x86_64-windows"];
binfmt.emulatedSystems = [
"wasm32-wasi"
"x86_64-windows"
];
kernelParams = [
"psmouse.synaptics_intertouch=0"
"mem_sleep_default=deep"
"amdgpu.sg_display=0"
"amdgpu.gttsize=2048"
];
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";
"kernel.unprivileged_userns_clone" = "1"; /* Needed with harderned kernel */
}; };
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
loader.systemd-boot = { loader.systemd-boot = {
@@ -100,10 +48,8 @@ in
enable = true; enable = true;
memtest86.enable = true; memtest86.enable = true;
}; };
nixStoreMountOpts = [ "ro" ]; readOnlyNixStore = true;
supportedFilesystems = [ supportedFilesystems = ["btrfs"];
"xfs"
];
tmp.useTmpfs = true; tmp.useTmpfs = true;
}; };
@@ -114,7 +60,7 @@ in
doas.enable = true; doas.enable = true;
doas.extraRules = [ doas.extraRules = [
{ {
users = [ USER ]; users = ["akill"];
keepEnv = true; keepEnv = true;
persist = true; persist = true;
} }
@@ -126,22 +72,13 @@ in
}; };
networking = { networking = {
nftables.enable = true;
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ allowedTCPPorts = [80 443];
80
443
51820
8020
];
}; };
hostName = "nixy"; hostName = "nixy";
nameservers = [ nameservers = ["127.0.0.1" "::1"];
"127.0.0.1"
"::1"
];
dhcpcd.extraConfig = "nohook resolv.conf"; dhcpcd.extraConfig = "nohook resolv.conf";
extraHosts = '' extraHosts = ''
@@ -151,7 +88,6 @@ in
192.168.88.171 qbittorrent.mediabox.lan 192.168.88.171 qbittorrent.mediabox.lan
192.168.88.1 router.lan 192.168.88.1 router.lan
192.168.88.231 workstation.lan 192.168.88.231 workstation.lan
192.168.88.121 ender.lan
''; '';
networkmanager = { networkmanager = {
@@ -169,49 +105,13 @@ in
}; };
}; };
}; };
wireguard.interfaces = {
wg0 = {
ips = [ "10.100.0.6/24" ];
privateKeyFile = config.sops.secrets."wg_privkey".path;
peers = [
{
publicKey = builtins.readFile ../magpie/wg_pubkey;
presharedKeyFile = config.sops.secrets."wg_preshared/nixy".path;
allowedIPs = [ "10.100.0.0/24" ];
endpoint = "5.75.229.224:51820";
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 = [ 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
''; '';
@@ -222,27 +122,10 @@ in
}; };
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;
};
nix-ld = {
enable = false;
libraries = with pkgs; [
stdenv.cc.cc.lib
zlib
];
};
zsh.enable = true; zsh.enable = true;
firejail.enable = true; firejail.enable = true;
adb.enable = true; adb.enable = true;
@@ -250,150 +133,37 @@ in
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 = {
#sysusers.enable = true;
services = { services = {
# Fix issue where systemd-vconsole-setup failes to find keymap "zremap" = {
systemd-vconsole-setup = { description = "Intercepts keyboard udev events";
unitConfig = { wants = ["systemd-udevd.service"];
After = "local-fs.target"; wantedBy = ["multi-user.target"];
};
};
"zremap@" = {
enable = true;
restartIfChanged = true;
serviceConfig.Nice = -20; serviceConfig.Nice = -20;
unitConfig = { script = ''
Description = "zremap on %I"; sleep 1
ConditionPathExists = "%I"; ${zremap.defaultPackage.x86_64-linux}/bin/zremap \
}; /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-proxy_proton.service" ];
after = [ "netns@wg.service" ];
before = [ "dnscrypt-proxy_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-proxy_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-proxy.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 = ''
settings.Manager = { DefaultTimeoutStartSec=30s
DefaultTimeoutStartSec = "30s"; DefaultTimeoutStopSec=30s
DefaultTimeoutStopSec = "30s"; '';
};
}; };
services = { services = {
acpid.enable = true; acpid.enable = true;
btrfs.autoScrub.enable = true;
dbus.enable = true; dbus.enable = true;
dbus.implementation = "broker";
envfs.enable = true;
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;
userborn.enable = true;
pipewire = { pipewire = {
enable = true; enable = true;
@@ -402,29 +172,21 @@ in
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 = [ packages = [pkgs.rtl-sdr pkgs.openhantek6022 pkgs.openocd];
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"
@@ -433,119 +195,76 @@ in
ATTR{idVendor}=="1443", MODE:="666" ATTR{idVendor}=="1443", MODE:="666"
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Digilent", MODE:="666" ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Digilent", MODE:="666"
#Arduino UNO r4 #Arduino UNO r4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666" SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666"
#ST-Link
#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"
''; '';
}; };
tlp = { tlp = {
enable = true; enable = true;
settings = {
START_CHARGE_THRESH_BAT0 = 70;
STOP_CHARGE_THRESH_BAT0 = 86;
};
}; };
batteryNotifier = { batteryNotifier = {
enable = true; enable = true;
notifyCapacity = 12; notifyCapacity = 20;
suspendCapacity = 5; suspendCapacity = 10;
}; };
actkbd = { actkbd = {
enable = true; enable = true;
bindings = [ bindings = [
{ {
keys = [ 115 ]; keys = [113];
events = [ "key" ]; events = ["key"];
command = "XDG_RUNTIME_DIR=/run/user/$(id -u ${USER}) ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"; command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master toggle'";
} }
{ {
keys = [ 114 ]; keys = [114];
events = [ events = ["key" "rep"];
"key" command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%- unmute'";
"rep"
];
command = "XDG_RUNTIME_DIR=/run/user/$(id -u ${USER}) ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
} }
{ {
keys = [ 113 ]; keys = [115];
events = [ events = ["key" "rep"];
"key" command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%+ unmute'";
"rep"
];
command = "XDG_RUNTIME_DIR=/run/user/$(id -u ${USER}) ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
} }
{ {
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";
} }
]; ];
}; };
dnscrypt-proxy = { dnscrypt-proxy2 = {
enable = true; enable = true;
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-proxy/public-resolvers.md"; cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
}; };
}; };
}; };
borgbackup.jobs."borgbase" =
let
user = config.users.users.${USER};
home = user.home;
in
{
user = user.name;
paths = [
(home + "/pic/priv")
(home + "/pproj")
(home + "/videos/priv")
];
exclude = [
"**/.ccls_cache"
"**/*.d"
"**/*.map"
"**/*.o"
"**/zig-cache"
"**/zig-out"
];
repo = "ssh://oda929rv@oda929rv.repo.borgbase.com/./repo";
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";
};
nix-serve = { nix-serve = {
enable = false; enable = false;
secretKeyFile = "/var/cache-priv-key.pem"; secretKeyFile = "/var/cache-priv-key.pem";
@@ -555,10 +274,9 @@ in
SystemMaxUse=50M SystemMaxUse=50M
''; '';
logind.settings.Login = { logind.extraConfig = ''
KillUserProcesses = true; KillUserProcesses=yes
}; '';
}; };
fonts = { fonts = {
@@ -567,7 +285,7 @@ in
allowBitmaps = true; allowBitmaps = true;
useEmbeddedBitmaps = true; useEmbeddedBitmaps = true;
defaultFonts = { defaultFonts = {
monospace = [ "JetBrainsMono" ]; monospace = ["JetBrainsMono"];
}; };
}; };
@@ -576,36 +294,27 @@ in
dina-font dina-font
fira-code fira-code
fira-code-symbols fira-code-symbols
font-awesome_6 font-awesome
font-awesome_4
inconsolata inconsolata
iosevka iosevka
jetbrains-mono jetbrains-mono
liberation_ttf liberation_ttf
libertine
noto-fonts noto-fonts
noto-fonts-cjk-sans noto-fonts-cjk
noto-fonts-color-emoji noto-fonts-emoji
proggyfonts proggyfonts
siji siji
terminus_font terminus_font
terminus_font_ttf terminus_font_ttf
ubuntu-classic ubuntu_font_family
vista-fonts
]; ];
}; };
virtualisation = { virtualisation = {
waydroid.enable = false;
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";
}; };
@@ -617,43 +326,34 @@ in
}; };
}; };
sound.enable = true;
hardware = { hardware = {
bluetooth = { bluetooth = {
enable = true; enable = true;
settings = { settings = {
General = { General = {
Experimental = true;
Enable = "Source,Sink,Media,Socket"; Enable = "Source,Sink,Media,Socket";
}; };
}; };
}; };
graphics = { opengl = {
enable = true; enable = true;
extraPackages = [ ]; driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [];
}; };
rtl-sdr.enable = true;
}; };
zramSwap = { zramSwap = {
enable = true; enable = false;
algorithm = "zstd"; algorithm = "zstd";
}; };
users.users.${USER} = { users.users.akill = {
isNormalUser = true; isNormalUser = true;
initialHashedPassword = "$y$j9T$XGffGsmN/u.wO5wZ.cBml/$9iCw3eWY0GSUH/aA8ESCAxKeTCAMqY21XQF7b5ujxD6";
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = [ extraGroups = ["wireshark" "kvm" "tty" "audio" "sound" "adbusers" "dialout" "wheel"];
"adbusers"
"audio"
"dialout"
"kvm"
"plugdev"
"sound"
"tty"
"wheel"
"wireshark"
];
}; };
} }

View File

@@ -7,59 +7,72 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: }: {
{
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.luks.devices."crypt_dev".device = boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
"/dev/disk/by-uuid/e10821b9-5426-4f03-b716-1645a64fcd6a"; boot.initrd.kernelModules = [];
boot.initrd.luks.devices."crypt_dev".allowDiscards = true; boot.kernelModules = ["kvm-amd" "amdgpu"];
boot.initrd.availableKernelModules = [ boot.extraModulePackages = [];
"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/c461c971-54ca-4fb7-91e8-6ac70de53ef2"; device = "/dev/disk/by-uuid/f06ac545-07c1-4b2b-8c0b-eeac43892933";
fsType = "xfs"; fsType = "btrfs";
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/eeaa6fab-d67d-400f-b6d4-b1f44c2e0047"; device = "/dev/disk/by-uuid/f06ac545-07c1-4b2b-8c0b-eeac43892933";
fsType = "xfs"; fsType = "btrfs";
options = ["subvol=nix" "compress=lzo" "noatime"];
}; };
fileSystems."/home" = { fileSystems."/persist" = {
device = "/dev/disk/by-uuid/aeaa71ca-a439-4ef3-9ab8-db7ae8f59376"; device = "/dev/disk/by-uuid/f06ac545-07c1-4b2b-8c0b-eeac43892933";
fsType = "xfs"; fsType = "btrfs";
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/828E-F3C3"; device = "/dev/disk/by-uuid/3F3E-9833";
fsType = "vfat"; fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
}; };
swapDevices = [ ]; fileSystems."/opt/xilinx" = {
device = "/dev/disk/by-uuid/f5c27ef2-8053-4d96-9f8f-c6a50d6193b9";
fsType = "erofs";
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; swapDevices = [
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;
} }

View File

@@ -1,21 +0,0 @@
borgbase_enc_key: ENC[AES256_GCM,data:AD+JghEOX25tBGYhoU1ge1fqrA+5AK8N4yg=,iv:u05GVeWbL3xdZQgGkXSPkxlATd2M9MX4uSZiLOHMMRE=,tag:pmTQIJWmz+ePmSNzO/EO4Q==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBEaDhSZVVibVl1NU84NG9U
aEVQbThIcC9CajNHS25SVW1SMFFwMUsvMmxJCkpTVThpZ0JZdEpLTnJlQWFqM244
LzFaUFVvWWxIcU4wRlhXalF5TkNpVHMKLS0tIExXMUx5cDBBbDloQ0sxbEY0eGdj
bE5vNHVHekI2RzY5M3JNcTdCa3pNeUUK8C04wF1te6epA97sNrhoz0VUn+MC7SML
6N1CZK3MuRARBqcj4c/W1aXuTysvuV1o/Fl5xOk/gbumcfwnDYj28A==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-21T08:14:25Z"
mac: ENC[AES256_GCM,data:7M+akGH09E2JYyKLmwpjx0VCEBmXqO6bNHFNRCO+9LdSIqsEw8MD4WGO0zwHOD9ls7+1OPFeoU+MVbtfMhmvN4g6rg+tFkXbxPSXCPkTA4tL90ZLXoBIpUBxKKhFMxtdOnjXxES3rTzjXGAvxocFOiNv/7pKbzeqMJUnH9FgAcM=,iv:h0+OpLmutMyPN3YFhyuHFgWSqxVK5WmBAE0k5ezEo9A=,tag:UKOXnTOjWaLDEOYk5YK4Aw==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@@ -1,21 +0,0 @@
borgbase_ssh_key: ENC[AES256_GCM,data:lLHIBmw/03An3SRJUjYS2pn0g7XEW0kTXtSObhIGwjBwlRypU7uQDz4JseOA2GbSm+GqsGK8U3Ifgirb7t8AsGy6DPxO+2sm+ByJ1S46G6cwkO2GateJw4Zg0mmhUBBuB/eXQMLuBLKZM2WGta5+6O0SWxDtsrTsBhlo5qbwwYILu0gg2zsBWFSn1OBGgvjYYRTd7N85WX8+S7oNYVAL2HjCmhHHtYrLnua4ajBY9dQEzrKdZaQW4v39HV9MyoilEz17fFLU8S2KbJ1iw8HgoAc9W81hpQNNd8fWKY+e0iWxD9X5H7UTs8YP/bsKeWyG4OAwr99zIZ1Lqzi0EuZI+PYkIz4Q4WBmv1wD6Py274iug3kr1OqvaIOmIT/9j2C3mOZTqxuFaF5T4NMkcIeViCBmRwUMTl/8a36X+n/MYxRoznHCQmg8zKubDuykVJfBmFwxbUc9tx8PeodnWeiASOV7FvBie47yq+NyBGItJXAK14SxLE9T2sxRchJWcrQBcekZdZ5Mej20lfUlcAGkwfUc0e54xsv1K3oY,iv:5157BQmbfuF5EYbDHCy/TmnTYErIwmgXO8RaX6f18xs=,tag:T2eZN46Qd6RgLWk4kbYgPQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB5b2YzSDdaU3R5TUdqS3Nv
eUYraFBiZlZ1TXBqYzlWNUNYOFlyMzJvWEE4ClJ6R25CRXRUZ2FDTFY2ZmJIRkRX
WVJCSy83N2JUNzRuT3VuSUF1OTV2TUkKLS0tIEZ5cVg1V2o0MkdmWEx1emJVdjZ0
RkZFL2tRNW9RdnAwalE2ZzVQcnljRFUKRyN8ahv9ZI63m8ycl74GZ59lyAXUsKmi
tfPqQvL1oTtJr3hzwy2bkctXQLYjGvsMyZt2tiWpy5vLc1MrxlqVDQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-21T08:16:40Z"
mac: ENC[AES256_GCM,data:VkXpCPQB4RypDrK31pYWXeOcl8ulis6fMF1q/SLCg2wXnL0jFrmAFp78C+ers9xFhbnUnMbVc/ZJIVKfa0g94WV3jJbn4+HB0GPWQCz7LwhmG5XEY5O5sFLuDCcHb/epZvDbCsEQeiq+TGDHp6TtdL8qDF+hE2k8qfsy570wocU=,iv:HQleJtHWQ5uk4+Witn2aaqh0SvXqomfiSO/ExgPzVag=,tag:hlBmboddR8GDAmBpETi0Ow==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@@ -1,22 +1,31 @@
peerix: peerix:
private: ENC[AES256_GCM,data:Oi8H5nqJ0Bf45wQepCjdZNHBOv4AlPxNN7L5Th3gcRQlW1FS77nusIWGSUvlmL2a5LTN0FV36o2GFPrrhiwmvnkQwuSZKc9VeDTf7SX0RRL1NLmRR/zy4WsRNJFxlqtjahieqg==,iv:6hJwqcdPayZaYZhJ0OfYLAtmeVndLEfeYZjUq5/3qJE=,tag:MiAfg8aZAHNYbB0JwcdStg==,type:str] private: ENC[AES256_GCM,data:767u5KKjk2lMr70vtBvX06t8n/1r5xpCrRNKc9QvypJmbPS+vS8vij8JYJZDKKFBh5xUazSLQC1ga2mpb+hEO2rgD0Aa70p22wwfOP+qCJQNYwlEf0MLWhlblTCE9Cr/eQSX7g==,iv:tPEB4NWbLMvzrUIvosj9PfinMhdWNBu5btjElvbDzxg=,tag:wzxaBzW0R6HKCyP5zlMPRw==,type:str]
sops: sops:
kms: [] kms: []
gcp_kms: [] gcp_kms: []
azure_kv: [] azure_kv: []
hc_vault: [] hc_vault: []
age: age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBRbi9uTGVPYlhYYWdFb25u
SGhSUm9rNmEzSkNVUEVIOGNLb1Z3VFdjNERFCjVEYXlXTlRCV2dLMW1VMWgzcXBR
OWxSOUZjZ2VCTzRycDhZRGRXWS9KRTAKLS0tIG8yMkZNeFRtdHVPTTJOM2tRSk5F
OXp3Wmh0b1lYQnJBWlMxeGZaZXdnY2MKftJPaUc9sDM8YmvUo1eVDNXWX4scr1rH
SMAod/Oq0BvQfyGIpvVBfL5T7RxlF1DwOedg/p3PSfMPjok7QLyv+A==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s - recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBSMEIyck1xbVJ4Zm56Z3dM YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxdU9WSjZkWUd6NXFpdXNp
OGsxa1p0TGIvRE5DYXZzTDM3YUZFVTAxbUUwCllPd0FOUlRiZW5wT2QvLzZXYjRr R2huUXZQOGZzb0Z0ekN2WkdRdEFJYk54RmhnCmo0ampNK01VR3lQM0RGYWlNQ3cx
S1A5WjZxLzNYQ1ZWVFFQTzRwMFQweFEKLS0tIHNoZUpHS2dDNmFKc3ZVNFZuUFU4 Rk1BK1lIUHJPZ2R5YVd6RTlYbXJDVWcKLS0tIGV0Yy8ySnFMQ25PQUNBL3dPdmc3
L0M0MitMeDg1ZWYxcDNCQlVGUjRKeFkKvD2SKnuh517o2knPr2SOWq3kubMyI7UV WjhldWNVL0h6T1lUSEdXeHFQemRBVEEKJzh1HExRoy/iyTtBNaVdNgolWyFHaaLV
j6HgXVbHUDjmKl2dY+YVTnmxrK54E+Q6iiu7mQnvLdzxYBK/EiNt9w== VTDZYEHq+eEIrVAG5xefG/nPpj2K6FRItA6+4PcKtyARG+gKYwp2tw==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-21T08:17:51Z" lastmodified: "2023-07-28T11:55:00Z"
mac: ENC[AES256_GCM,data:v4KQq3Y5ZxsyMxR+FS1BZkH/bPTIIHfQu800U44odaNycIbWnuwCnLWGyJK6Por76bWALycGppDbHPKKW/N1I1XLy/EAXo02+nhHNvKVi2cXSXciuEPc/Cl+6TbP39lx4+EOM8CZoNZ8HAiS3QPy2bwZdMjEw/OHl8TqlN07q9s=,iv:PIcv/b6t+54/yCTZj+12Yep15ors/wXNUnaXjLjpVbM=,tag:JxO5M3OYaWzqgf4gUhCzzg==,type:str] mac: ENC[AES256_GCM,data:ieNyjQlo1tQ8qxFMyIN5XGgUiclYIfJe6WUyWiR3qJKKOTnx5MBWNUuHfUMkpm2ToNpaxiDUih2Hhqv5S0Bq1zoExMLjqE36GgaOivha6DeoQn5+WH8bMdMAoc1PlCQkj6Fxw2sdZlrIKcswADk4MfDzdaY/vKoQ5AtK5Bdkgok=,iv:JaOfWEwbLhOTquQVIG6Ll38jkGOCzbtD8h5c7SOAzik=,tag:m4Fmor24Q9GDoe7nu2VnEA==,type:str]
pgp: [] pgp: []
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.8.1 version: 3.7.3

View File

@@ -1,21 +0,0 @@
wg_preshared: ENC[AES256_GCM,data:k+aFYDNMojf5kktn6KJ4F5mH5oGdqxdF0MO88NcYpai9USnH394XRL9ASvs=,iv:L5LIXbADhrivKjK/V0E5QpRT7BDsktwIuKHgY+2qr84=,tag:pCW1naU/ygxAIDYWV2hHPQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBZSHZvYy9TTmVEb2ZSTncy
ckJ1bXZGWVdJSkVHMGx2Vk5ZNlZ3Q2wzVFQ0Cmg1M3hKNFhnZk5nTE54RTdyR0Vs
NVRiTEltSnkxdmhhdGlycHNPWjFLbncKLS0tIE02NVJRZTd0VmowT1c4cjhKNlZk
Q01BQWNSVWtIMnFXRWpxR3JDMU8zYTAKIbfpM8uUb09cUlA8YWtgEOL5zvWf5omv
baZINiAu0/f1avYmW6Qb+aLa2ALrSZaotj46Uwd9Lb5mtjJ/8v9IOg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-20T18:12:20Z"
mac: ENC[AES256_GCM,data:4PWjwxOO0UuNsevCbzCLaiW7C+So4mEGivd9GzyLKx2JlkNFVB8wqPrY1Rl1ANMrT+7LKc8tVOA4zbweNc9idFG4y5DcvnDSieqKu9v1MeEMHqNpz5TTLbCP81g7qegjI/WKul2kaWIdPaioI/f5x2E6rEYnzFv+Di2mc3W+Qcc=,iv:iE9sali0O3sQIhOw30RGR/4ZQsAPcSxq1qxosfasojU=,tag:+9AOwph5A4oDXsK6Z3YeZA==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@@ -1,21 +0,0 @@
wg_privkey: ENC[AES256_GCM,data:XL9FU1kZXvBJfwyt3HpQe8k8zg9HT6Xm0BdjNMduSu9uAgcHbglpLc/qTB0=,iv:QgX1VsmLUsDozFXmzDVPukjPNTa4Lnh806AQ4qdgpa8=,tag:RNVlDbtx8vAAbG0rinLVOw==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBSnkyM1ZrcnEvM3VHL0Nk
THhUUDdGU2s5UFgrVGZ3WXhkYTRIVTlaeGs4CjR4eVpmRy9qUkZSWkpFZDZHRDZI
ZWRXSmMzL2RWZkVrSlFPcC9ueGpDVFkKLS0tIDZWbENyS2hrSCtlNlBHaE56QTha
eFJmWXk1SVJEbDJOc1Q1VFlzVS8yODgKFXRAtR+67x0dkQTqZPtMT0Hd+aW+5K17
S/lhuHRhITt3woQnecVPMYklgJJlsyQ6blKhJw8dvhbVWWThZ853rQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-21T08:18:59Z"
mac: ENC[AES256_GCM,data:xPKsGZD5RKT/WMRupe4YTgoiUQRFq77KQyGaazeY1GEPI117gWxRHEpiyCLnfhZWcaekPWoXosm32wRLwDAXM/Femk567i5uKKG2wAqApWbc+FXTQ71w/CFr9uEWFApBjpEHpuBBaFV23qJfylsqeMp9r52d9Sp5eDQC4RJead0=,iv:oiNoZ/bqQUe+luqeuldw1M0KB2d4C5T7kXy+mLFZNZQ=,tag:5pK22TYGwbBNyWlfd/Ufxw==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@@ -1,22 +0,0 @@
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

View File

@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMPNCxE/8z02lVOC1unJbPMH+Ma+KRJfmz33oUfz3hKc root@nixy

View File

@@ -1 +0,0 @@
oHVmhw80daHjDjo7nwt/Y9eKBaH5FoTiVeukwDObijM=

View File

@@ -1 +0,0 @@
eoYSDh27qQFpvOcDmuVFzSTuPnrHQYXDMqatKmDAth0=

View File

@@ -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";
}; };

View File

@@ -0,0 +1,115 @@
{ fdupes
, buildFHSEnv
, fetchzip
, icoutils
, imagemagick
, jdk17
, lib
, makeDesktopItem
, stdenvNoCC
}:
let
iconame = "STM32CubeMX";
package = stdenvNoCC.mkDerivation rec {
pname = "stm32cubemx";
version = "6.10.0";
src = fetchzip {
url = "https://sw-center.st.com/packs/resource/library/stm32cube_mx_v${builtins.replaceStrings ["."] [""] version}-lin.zip";
sha256 = "sha256-B5Sf+zM7h9BiFqDYrLS0JdqZi3dGy6H9gAaJIN3izeM=";
stripRoot = false;
};
nativeBuildInputs = [ fdupes icoutils imagemagick ];
desktopItem = makeDesktopItem {
name = "STM32CubeMX";
exec = "stm32cubemx";
desktopName = "STM32CubeMX";
categories = [ "Development" ];
icon = "stm32cubemx";
comment = meta.description;
terminal = false;
startupNotify = false;
mimeTypes = [
"x-scheme-handler/sgnl"
"x-scheme-handler/signalcaptcha"
];
};
buildCommand = ''
mkdir -p $out/{bin,opt/STM32CubeMX,share/applications}
cp -r $src/MX/. $out/opt/STM32CubeMX/
chmod +rx $out/opt/STM32CubeMX/STM32CubeMX
cat << EOF > $out/bin/${pname}
#!${stdenvNoCC.shell}
${jdk17}/bin/java -jar $out/opt/STM32CubeMX/STM32CubeMX
EOF
chmod +x $out/bin/${pname}
icotool --extract $out/opt/STM32CubeMX/help/${iconame}.ico
fdupes -dN . > /dev/null
ls
for size in 16 24 32 48 64 128 256; do
mkdir -pv $out/share/icons/hicolor/"$size"x"$size"/apps
if [ $size -eq 256 ]; then
mv ${iconame}_*_"$size"x"$size"x32.png \
$out/share/icons/hicolor/"$size"x"$size"/apps/${pname}.png
else
convert -resize "$size"x"$size" ${iconame}_*_256x256x32.png \
$out/share/icons/hicolor/"$size"x"$size"/apps/${pname}.png
fi
done;
cp ${desktopItem}/share/applications/*.desktop $out/share/applications
'';
meta = with lib; {
description = "A graphical tool for configuring STM32 microcontrollers and microprocessors";
longDescription = ''
A graphical tool that allows a very easy configuration of STM32
microcontrollers and microprocessors, as well as the generation of the
corresponding initialization C code for the Arm® Cortex®-M core or a
partial Linux® Device Tree for Arm® Cortex®-A core), through a
step-by-step process.
'';
homepage = "https://www.st.com/en/development-tools/stm32cubemx.html";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.unfree;
maintainers = with maintainers; [ angaz wucke13 ];
platforms = platforms.all;
};
};
in
buildFHSEnv {
inherit (package) pname meta;
runScript = "${package.outPath}/bin/stm32cubemx";
targetPkgs = pkgs:
with pkgs; [
alsa-lib
at-spi2-atk
cairo
cups
dbus
expat
glib
gtk3
libdrm
libGL
libudev0-shim
libxkbcommon
mesa
nspr
nss
pango
xorg.libX11
xorg.libxcb
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
];
}

View File

@@ -44,16 +44,16 @@
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "viber"; pname = "viber";
version = "23.2.0.3"; version = "21.0.0.1";
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-9WHiI2WlsgEhCPkrQoAunmF6lSb2n5RgQJ2+sdnSShM="; sha256 = "0q34mwbk0i2vj2f16hk7pyshl8fqwym3lyr7iss22qw8cxx3mcg3";
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [makeWrapper];
buildInputs = [ dpkg ]; buildInputs = [dpkg];
dontUnpack = true; dontUnpack = true;
@@ -115,57 +115,55 @@ stdenv.mkDerivation {
xorg.libxkbfile xorg.libxkbfile
]; ];
installPhase = installPhase = let
let viberWrap = writeShellScriptBin "viberWrap" ''
viberWrap = writeShellScriptBin "viberWrap" '' ${bubblewrap}/bin/bwrap --bind / / \
${bubblewrap}/bin/bwrap --bind / / \ --dev /dev \
--dev /dev \ --tmpfs $HOME \
--tmpfs $HOME \ --bind $HOME/.ViberPC/ $HOME/.ViberPC \
--bind $HOME/.ViberPC/ $HOME/.ViberPC \ --bind $HOME/Downloads/ $HOME/Downloads \
--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];
}; };
} }

1
packages/zapzap/.nixd.json Symbolic link
View File

@@ -0,0 +1 @@
../../.nixd.json

View File

@@ -0,0 +1,27 @@
{ fetchurl
, makeWrapper
, python3Packages
, qt6
}:
python3Packages.buildPythonPackage rec {
name = "zapzap";
version = "5.1-2";
src = fetchurl {
url = "https://github.com/zapzap-linux/zapzap/archive/refs/tags/${version}.tar.gz";
hash = "sha256-r5NhdXQ4Tl/wFrD1+sxFS10Z3lAcHcax5bi43Qa3ZI0=";
};
dontWrapQtApps = true;
propagatedBuildInputs = with python3Packages; [ pyqt6-webengine qt6.qtwayland qt6.qtsvg ];
nativeBuildInputs = [ qt6.wrapQtAppsHook makeWrapper ];
env = {
HOME = "/tmp";
};
preFixup = ''
makeWrapperArgs+=(
# Force the app to use QT_PLUGIN_PATH values from wrapper
--unset QT_PLUGIN_PATH
"''${qtWrapperArgs[@]}"
)
'';
}