2 Commits

Author SHA1 Message Date
eeeac073c7 magpie: add goatcounter 2024-01-21 14:05:17 +01:00
ea4390d0d5 goatcounter: add flake input 2024-01-21 13:47:06 +01:00
50 changed files with 852 additions and 1886 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,11 +14,8 @@
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 = {
@@ -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";
*/
}; };
}; };
@@ -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;
@@ -177,19 +170,13 @@
{ {
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'";
} }
@@ -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,23 +4,15 @@
{ {
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"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
@@ -28,55 +20,34 @@
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" = {

View File

@@ -1,50 +1,36 @@
{ {
config,
pkgs, pkgs,
nix-xilinx, nix-xilinx,
system,
... ...
}: }: {
{ environment.systemPackages = with pkgs;
environment.systemPackages =
with pkgs;
[ [
acpi acpi
aria2
binutils binutils
binwalk
bluez bluez
bluez-tools bluez-tools
btop btop
busybox
curlHTTP3 curlHTTP3
dfu-util dfu-util
dhcpcd dhcpcd
direnv direnv
dmidecode dmidecode
dnsmasq dnsmasq
dnsutils
dtach dtach
ethtool
f2fs-tools
fd fd
file file
fio
fzf fzf
fzy fzy
git git
adwaita-icon-theme
gnomeExtensions.appindicator
gnupg gnupg
gptfdisk gptfdisk
hcxdumptool hcxdumptool
hdparm hdparm
htop-vim htop-vim
interception-tools interception-tools
iw
jq jq
lm_sensors lm_sensors
man-pages
man-pages-posix
meson meson
mosh mosh
msmtp msmtp
@@ -56,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
@@ -70,7 +53,6 @@
rsync rsync
silver-searcher silver-searcher
socat socat
sops
sshfs sshfs
strace strace
swaylock swaylock
@@ -88,18 +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.${system}; [ ++ (with nix-xilinx.packages.x86_64-linux; [vivado vitis vitis_hls model_composer xilinx-shell]);
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 {

View File

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

View File

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

150
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": {
@@ -51,11 +51,11 @@
"flake-compat_3": { "flake-compat_3": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1668681692,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -89,16 +89,15 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1736373539, "lastModified": 1705823474,
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=", "narHash": "sha256-2C4uRe9/U3QwSPC4dYKM1/njgCQk0Mltezy4VcjAqa4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56", "rev": "928f2528f9ee952ba0a47bbb1ece8d93ed66e784",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@@ -111,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": {
@@ -126,35 +125,66 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1738574474, "lastModified": 1705677747,
"narHash": "sha256-rvyfF49e/k6vkrRTV4ILrWd92W+nmBDfRYZgctOyolQ=", "narHash": "sha256-eyM3okYtMgYDgmYukoUzrmuoY4xl4FUujnsv/P6I/zI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fecfeb86328381268e29e998ddd3ebc70bbd7f7c", "rev": "bbe7d8f876fbbe7c959c90ba2ae2852220573261",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-24.11", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-24_11": { "nixpkgs-22_11": {
"locked": { "locked": {
"lastModified": 1734083684, "lastModified": 1669558522,
"narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=", "narHash": "sha256-yqxn+wOiPqe6cxzOo4leeJOp1bXE/fjPEi/3F/bBHv8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84", "rev": "ce5fe99df1f15a09a91a86be9738d68fadfbad82",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
"ref": "nixos-24.11", "ref": "nixos-22.11",
"type": "indirect" "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": 1705033721,
"narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nvim": { "nvim": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -162,11 +192,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1736528609, "lastModified": 1703195136,
"narHash": "sha256-p0tYmTVnnFghamXEXD4w/lldCi604zIWDV4Ol9ubQ5g=", "narHash": "sha256-43mqeJz4zT6rc8zOsY+ycyyKR9P+itTGx5+QinNm1aM=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "8245a48cc75cc74dea1b3ca89cb58f24f8e14f85", "rev": "dce3a89665746f3c16a484ccf156fb7b2eac6b3b",
"revCount": 42, "revCount": 21,
"type": "git", "type": "git",
"url": "https://git.project-cloud.net/asmir/nvim_flake" "url": "https://git.project-cloud.net/asmir/nvim_flake"
}, },
@@ -206,11 +236,11 @@
"theme_deepthought": "theme_deepthought" "theme_deepthought": "theme_deepthought"
}, },
"locked": { "locked": {
"lastModified": 1729077289, "lastModified": 1700248599,
"narHash": "sha256-z5LEPxOJq2LjhPhY4QE1IOt0lBD39cipR6Lw8vRTNlI=", "narHash": "sha256-oYY+LGxSiuRRxNOkjWWWDyKSxDGV3cvk+leN2K1nml0=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "eab712e42139d33911ba767c2ff1bfbdf05c254d", "rev": "88ce25f6b4b1817741e9a7c15716da50b6c67c0a",
"revCount": 27, "revCount": 25,
"type": "git", "type": "git",
"url": "https://git.project-cloud.net/asmir/project-cloud" "url": "https://git.project-cloud.net/asmir/project-cloud"
}, },
@@ -240,14 +270,16 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-24_11": "nixpkgs-24_11" "nixpkgs-22_11": "nixpkgs-22_11",
"nixpkgs-23_05": "nixpkgs-23_05",
"utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1737736848, "lastModified": 1703666786,
"narHash": "sha256-VrUfCXBXYV+YmQ2OvVTeML9EnmaPRtH+POrNIcJp6yo=", "narHash": "sha256-SLPNpM/rI8XPyVJAxMYAe+n6NiYSpuXvdwPILHP4yZI=",
"owner": "simple-nixos-mailserver", "owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver", "repo": "nixos-mailserver",
"rev": "6b425d13f5a9d73cb63973d3609acacef4d1e261", "rev": "b5023b36a1f6628865cb42b4353bd2ddde0ea9f4",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -260,14 +292,15 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ],
"nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1738291974, "lastModified": 1705805983,
"narHash": "sha256-wkwYJc8cKmmQWUloyS9KwttBnja2ONRuJQDEsmef320=", "narHash": "sha256-HluB9w7l75I4kK25uO4y6baY4fcDm2Rho0WI1DN2Hmc=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "4c1251904d8a08c86ac6bc0d72cc09975e89aef7", "rev": "ae171b54e76ced88d506245249609f8c87305752",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -283,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"
}, },
@@ -343,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": [
@@ -350,17 +398,17 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737802495, "lastModified": 1696448728,
"narHash": "sha256-Q+bZnH7uQM5T/G+xCGSRU3bTJqD70NeE4vLXLXLCm7k=", "narHash": "sha256-kUc6983IX9n0eQxTFZRK7LYCLHoxoGZ5rOV7nu8hGRI=",
"ref": "refs/heads/master", "owner": "asmir.abdulahovic",
"rev": "4962f12867b0b6c4c4d39b98e6016e7f925a802c", "repo": "zremap",
"revCount": 23, "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"
} }
} }
}, },

View File

@@ -2,7 +2,7 @@
description = "NixOS configuration"; description = "NixOS configuration";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nix-xilinx = { nix-xilinx = {
url = "gitlab:asmir.abdulahovic/nix-xilinx"; url = "gitlab:asmir.abdulahovic/nix-xilinx";
@@ -15,7 +15,7 @@
}; };
zremap = { zremap = {
url = "git+https://git.project-cloud.net/asmir/zremap"; url = "gitlab:asmir.abdulahovic/zremap";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -34,8 +34,13 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
goatcounter = {
url = "github:connorfeeley/goatcounter-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-24.11"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -50,8 +55,8 @@
}; };
}; };
outputs = outputs = inputs @ {
inputs@{ goatcounter,
home-manager, home-manager,
nixpkgs, nixpkgs,
nix-xilinx, nix-xilinx,
@@ -63,17 +68,14 @@
swaysw, swaysw,
zremap, zremap,
... ...
}: }: let
let
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs; pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
in in {
{
nixosConfigurations = rec { nixosConfigurations = rec {
nixy = nixpkgs.lib.nixosSystem rec { nixy = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
{_module.args = inputs;} {_module.args = inputs;}
{ _module.args.system = system; }
{nix.registry.nixpkgs.flake = nixpkgs;} {nix.registry.nixpkgs.flake = nixpkgs;}
./common/packages.nix ./common/packages.nix
./common/suspend.nix ./common/suspend.nix
@@ -85,8 +87,7 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.akill = import ./home/home.nix; home-manager.users.akill = import ./home/home.nix;
home-manager.extraSpecialArgs = { inherit inputs system; }; home-manager.extraSpecialArgs = {inherit inputs;};
home-manager.backupFileExtension = "home_backup";
} }
peerix.nixosModules.peerix peerix.nixosModules.peerix
{ {
@@ -103,11 +104,10 @@
]; ];
}; };
mediabox = nixpkgs.lib.nixosSystem rec { mediabox = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
{_module.args = inputs;} {_module.args = inputs;}
{ _module.args.system = system; }
{nix.registry.nixpkgs.flake = nixpkgs;} {nix.registry.nixpkgs.flake = nixpkgs;}
./common/packages.nix ./common/packages.nix
./common/suspend.nix ./common/suspend.nix
@@ -120,7 +120,7 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.akill = import ./home/home.nix; home-manager.users.akill = import ./home/home.nix;
home-manager.extraSpecialArgs = { inherit inputs system; }; home-manager.extraSpecialArgs = {inherit inputs;};
} }
peerix.nixosModules.peerix peerix.nixosModules.peerix
{ {
@@ -137,11 +137,10 @@
]; ];
}; };
blue = nixpkgs.lib.nixosSystem rec { blue = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
{_module.args = inputs;} {_module.args = inputs;}
{ _module.args.system = system; }
{nix.registry.nixpkgs.flake = nixpkgs;} {nix.registry.nixpkgs.flake = nixpkgs;}
./blue/configuration.nix ./blue/configuration.nix
./blue/hardware-configuration.nix ./blue/hardware-configuration.nix
@@ -151,32 +150,25 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.akill = import ./home/home.nix; home-manager.users.akill = import ./home/home.nix;
home-manager.extraSpecialArgs = { inherit inputs system; };
} }
]; ];
}; };
magpie = nixpkgs.lib.nixosSystem {
magpie = nixpkgs.lib.nixosSystem rec { system = "arm64-linux";
system = "aarch64-linux";
modules = [ modules = [
{_module.args = inputs;} {_module.args = inputs;}
{ _module.args.system = system; }
{nix.registry.nixpkgs.flake = nixpkgs;} {nix.registry.nixpkgs.flake = nixpkgs;}
./magpie/configuration.nix ./magpie/configuration.nix
./magpie/hardware-configuration.nix ./magpie/hardware-configuration.nix
simple-nixos-mailserver.nixosModule
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
simple-nixos-mailserver.nixosModule
(builtins.toPath "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix") (builtins.toPath "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix")
]; ];
}; };
}; };
devShell.x86_64-linux = pkgs.mkShell { devShell.x86_64-linux = pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [sops ssh-to-age age];
sops
ssh-to-age
age
];
shellHook = '' shellHook = ''
echo "Configuring NixOS!" echo "Configuring NixOS!"
''; '';

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 = [
./zsh.nix
./i3status-rust.nix
./sway.nix
./i3.nix
./home_packages.nix
./whatsapp-for-linux.nix
];
home.stateVersion = "22.11"; home.stateVersion = "22.11";
home.username = "akill"; home.username = "akill";
@@ -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 = {
@@ -152,15 +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 = qutebrowser_firejail; package = pkgs.qutebrowser.override {enableVulkan = false;};
keyBindings = { keyBindings = {
normal = { normal = {
"j" = "scroll-px 0 25"; "j" = "scroll-px 0 25";
@@ -199,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;
@@ -213,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;
@@ -231,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";
@@ -246,19 +213,17 @@ 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) TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg)
${lib.getExe pkgs.grim} -t ppm - | ${pkgs.imagemagick}/bin/convert - -blur 0x12 "$TMP_FILE" ${pkgs.grim}/bin/grim -t ppm - | ${pkgs.imagemagick}/bin/convert - -blur 0x12 "$TMP_FILE"
${lib.getExe pkgs.swaylock} -f -i "$TMP_FILE" ${pkgs.swaylock}/bin/swaylock -f -i "$TMP_FILE"
${pkgs.coreutils}/bin/shred "$TMP_FILE"
${pkgs.coreutils}/bin/rm "$TMP_FILE" ${pkgs.coreutils}/bin/rm "$TMP_FILE"
''; '';
in in {
{
enable = true; enable = true;
events = [ events = [
{ {
@@ -281,55 +246,23 @@ in
} }
]; ];
}; };
kanshi = {
enable = true;
settings = [
{
profile.name = "undocked";
profile.outputs = [
{
criteria = "eDP-1";
}
];
}
{
profile.name = "docked";
profile.outputs = [
{
criteria = "eDP-1";
position = "3840,0";
}
{
criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026536";
mode = "1920x1080@74.973Hz";
position = "5760,0";
}
{
criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026535";
mode = "1920x1080@74.973Hz";
position = "7680,0";
}
];
}
];
};
}; };
systemd.user = { systemd.user = {
services = { services = {
wayland-pipewire-idle-inhibit = { /*
Unit.Description = "inhibit sleep while audio output is active"; himalaya = {
Unit.Description = "Himalaya new messages notifier";
Service = { Service = {
ExecStart = "${lib.getExe pkgs.wayland-pipewire-idle-inhibit}"; ExecStart = "himalaya notify";
Restart = "always"; Restart = "always";
RestartSec = 10; RestartSec = 10;
}; };
Install = { Install = {
WantedBy = [ "graphical-session.target" ]; WantedBy = [ "multi-user.target" ];
}; };
}; };
*/
}; };
}; };
} }

View File

@@ -1,54 +1,12 @@
{ {
lib, config,
pkgs, pkgs,
inputs, inputs,
system,
... ...
}: }: {
let home.packages = with pkgs;
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/
'';
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 alejandra
appimage-run appimage-run
arp-scan arp-scan
birdtray birdtray
@@ -58,16 +16,12 @@ in
cached-nix-shell cached-nix-shell
caddy caddy
cargo cargo
ungoogled-chromium ccls
cemu
cmake cmake
compsize compsize
# cura cura
deluge deluge
dfu-util
discord
dmenu-wayland
drawio
dualsensectl
ffmpeg-full ffmpeg-full
firefox firefox
freecad freecad
@@ -79,9 +33,7 @@ in
gnumake gnumake
go go
grim grim
heimdall
hyperfine hyperfine
icestorm
imagemagick imagemagick
imv imv
inkscape inkscape
@@ -91,86 +43,77 @@ in
kodi-wayland kodi-wayland
krita krita
libnotify libnotify
libreoffice-qt6-fresh libreoffice
libva-utils libva-utils
linuxPackages_latest.perf
lsix
lsix
mediainfo mediainfo
ncdu ncdu
neovide neovide
nextpnr
ngspice ngspice
nix-init nix-init
nixpkgs-fmt nixpkgs-fmt
nix-prefetch-git
nodePackages.peerflix nodePackages.peerflix
nom
openems
openocd openocd
openscad openscad
pandoc pandoc
paraview pass
pass-wayland
patchelf patchelf
pavucontrol pavucontrol
pay-respects
pirate-get pirate-get
poppler_utils poppler_utils
powertop powertop
pulsemixer pulsemixer
pwvucontrol
python3 python3
python3Packages.west python3Packages.west
remmina remmina
river river
rizin
rtorrent rtorrent
sbcl rustc
screen screen
seer seer
sioyek sioyek
skypeforlinux skypeforlinux
slurp slurp
steam-run
stm32cubemx stm32cubemx
swayimg
tea tea
teams-for-linux
tectonic
tessen
texlive.combined.scheme-full texlive.combined.scheme-full
thunderbird thunderbird
typst
upx upx
waybar waybar
wdisplays wdisplays
weechat
whatsapp-for-linux whatsapp-for-linux
wine
wireshark wireshark
wl-clipboard wl-clipboard
wlr-randr wlr-randr
wofi wofi
x2goclient x2goclient
yewtube yewtube
yosys
yt-dlp yt-dlp
zapzap
zathura zathura
# zeal-qt6 zeal-qt6
zig 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
] ]
++ [ ++ [
chromium_discord inputs.swaysw.packages.x86_64-linux.swaysw
chromium_stackfield inputs.nvim.packages.x86_64-linux.nvim
chromium_teams (pkgs.callPackage ../packages/zapzap/default.nix {})
ssh_proxy
wrap_sh
qcad
]
++ [
inputs.swaysw.packages.${system}.swaysw
(pkgs.callPackage ../packages/viber/default.nix {}) (pkgs.callPackage ../packages/viber/default.nix {})
(pkgs.callPackage ../packages/bubblewrap/default.nix {}) (pkgs.callPackage ../packages/bubblewrap/default.nix {})
]; ];

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

View File

@@ -1,5 +1,9 @@
{ ... }:
{ {
config,
lib,
pkgs,
...
}: {
programs.i3status-rust = { programs.i3status-rust = {
bars.top = { bars.top = {
icons = "awesome5"; icons = "awesome5";
@@ -19,15 +23,7 @@
} }
{ {
block = "disk_space"; block = "disk_space";
path = "/nix"; path = "/";
info_type = "available";
interval = 20;
warning = 20.0;
alert = 10.0;
}
{
block = "disk_space";
path = "/home";
info_type = "available"; info_type = "available";
interval = 20; interval = 20;
warning = 20.0; warning = 20.0;
@@ -43,11 +39,6 @@
device = "enp5s0"; device = "enp5s0";
interval = 2; interval = 2;
} }
{
block = "net";
device = "enp7s0f3u1u1";
interval = 2;
}
{ {
block = "net"; block = "net";
device = "eno1"; device = "eno1";

View File

@@ -1,30 +1,12 @@
{ {
pkgs, config,
inputs,
system,
lib, lib,
pkgs,
... ...
}: }: {
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;
viber = pkgs.callPackage ../packages/viber/default.nix { };
term = "${pkgs.foot}/bin/footclient";
in
{
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
extraSessionCommands = ""; extraSessionCommands = "";
extraConfigEarly = '''';
config = { config = {
fonts = { fonts = {
@@ -36,29 +18,23 @@ in
window.commands = [ window.commands = [
{ {
command = "move scratchpad, resize set 1152 648"; command = "move scratchpad, resize set 1152 648";
criteria = { criteria = {app_id = "pulsemixer|python3|com.rtosta.zapzap|whatsapp-for-linux|com.viber";};
app_id = "pulsemixer|python3|com.rtosta.zapzap|whatsapp-for-linux|com.viber";
};
} }
{ {
command = "move scratchpad, resize set 1502 845"; command = "move scratchpad, resize set 1502 845";
criteria = { criteria = {app_id = "com.viber";};
app_id = "com.viber";
};
} }
{ {
command = "floating enable"; command = "floating enable";
criteria = { criteria = {app_id = "sws_cli";};
app_id = "sws_cli";
};
} }
]; ];
modifier = "Mod4"; modifier = "Mod4";
output = { output = {
eDP-1 = { eDP-1 = {
/*
bg = "~/pic/wallpaper stretch"; bg = "~/pic/wallpaper stretch";
/*
scale = "1.4"; scale = "1.4";
*/ */
}; };
@@ -69,38 +45,27 @@ in
}; };
input = { input = {
"type:keyboard" = { "type:keyboard" = {repeat_delay = "150";};
repeat_delay = "150"; "type:keyboard" = {repeat_rate = "70";};
}; "type:touchpad" = {tap = "enabled";};
"type:keyboard" = {
repeat_rate = "70";
};
"type:touchpad" = {
tap = "enabled";
};
}; };
bars = [ bars = [
{ {
position = "top"; position = "top";
fonts = { fonts = {
names = [ names = ["Iosevka" "FontAwesome"];
"Iosevka"
"FontAwesome"
];
style = "Bold Semi-Condensed"; style = "Bold Semi-Condensed";
size = 12.0; size = 12.0;
}; };
statusCommand = "${lib.getExe pkgs.i3status-rust} ~/.config/i3status-rust/config-top.toml"; statusCommand = "i3status-rs ~/.config/i3status-rust/config-top.toml";
} }
]; ];
keybindings = { keybindings = {
"Alt+Shift+q" = "kill"; "Alt+Shift+q" = "kill";
"Alt+Shift+Return" = "exec ${term}"; "Alt+Shift+Return" = "exec ${pkgs.foot}/bin/footclient";
"Alt+p" = "exec ${pkgs.bemenu}/bin/bemenu-run"; "Alt+p" = "exec ${pkgs.dmenu-wayland}/bin/dmenu-wl_run -fn \"mono 14\"";
"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+Shift+space" = "floating toggle";
"Alt+space" = "focus mode_toggle"; "Alt+space" = "focus mode_toggle";
@@ -135,21 +100,21 @@ in
"Alt+j" = "focus down"; "Alt+j" = "focus down";
"Alt+k" = "focus up"; "Alt+k" = "focus up";
"Alt+l" = "focus right"; "Alt+l" = "focus right";
"Alt+slash" = "exec ${pkgs.moreutils}/bin/lckdo swaysw ${swaysw}/bin/swaysw"; "Alt+slash" = "exec swaysw";
"Alt+Escape" = "workspace back_and_forth"; "Alt+Escape" = "workspace back_and_forth";
"Alt+f" = "fullscreen enable"; "Alt+f" = "fullscreen enable";
"Alt+bracketright" = "focus output right";
"Alt+bracketleft" = "focus output left";
"Mod4+l" = "Mod4+l" = ''
''exec ${pkgs.sway}/bin/swaymsg [app_id="python3"] scratchpad show || exec ${term} -a python3 ${lib.getExe pkgs.python3}''; exec swaymsg [app_id="python3"] scratchpad show || exec foot -a python3 python3'';
"Mod4+j" = "Mod4+h" = "exec swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec zapzap";
"exec ${pkgs.sway}/bin/swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec ${lib.getExe pkgs.zapzap}"; "Mod4+j" = "exec swaymsg [app_id=com.viber] scratchpad show || exec viber";
"Mod4+h" = "Mod4+y" = ''
"exec ${pkgs.sway}/bin/swaymsg [app_id=com.viber] scratchpad show || exec ${viber}/bin/viber"; exec swaymsg [app_id="pulsemixer"] scratchpad show || exec foot -a pulsemixer pulsemixer'';
"Mod4+y" =
''exec ${pkgs.sway}/bin/swaymsg [app_id="pulsemixer"] scratchpad show || exec ${term} -a pulsemixer ${lib.getExe pkgs.pulsemixer}''; "XF86AudioRaiseVolume" = "exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%";
"Mod4+p" = "exec ${lib.getExe pkgs.tessen} -a copy"; "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,6 +1,10 @@
{ 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 = {

View File

@@ -1,5 +1,9 @@
{ pkgs, lib, ... }:
{ {
config,
lib,
pkgs,
...
}: {
programs.z-lua = { programs.z-lua = {
enableAliases = true; enableAliases = true;
enableZshIntegration = true; enableZshIntegration = true;
@@ -8,16 +12,16 @@
programs.zsh = { programs.zsh = {
autocd = true; autocd = true;
enableCompletion = false; enableCompletion = false;
syntaxHighlighting.enable = true;
defaultKeymap = "viins"; defaultKeymap = "viins";
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 = {
@@ -38,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 = "92b8e9057988566b37ff695e70e2e9bbeb7196c8"; rev = "87e6f5dd4c793f6d980532205aaefe196780606f";
hash = "sha256-TbOrnhLHgOvcfsgmL0l3bWY33yLIhG1KSi4ITIPq1+A="; hash = "sha256-TR4CyBZ+KoZRs9XDmWE5lJuUXXU1J8E2Z63nt+FS+5w=";
}; };
file = "pure.plugin.zsh"; file = "pure.plugin.zsh";
} }
@@ -63,11 +72,6 @@
}; };
file = "sudo.plugin.zsh"; file = "sudo.plugin.zsh";
} }
{
name = "zsh-fast-syntax-highlighting";
src = pkgs.zsh-fast-syntax-highlighting;
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
}
]; ];
envExtra = ''''; envExtra = '''';
@@ -92,29 +96,13 @@
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 systemd-run --scope --user $TMUX_EXE attach-session -t $USER || systemd-run --scope --user $TMUX_EXE new-session -s $USER
fi fi
if [[ -n "$BUBBLEWRAP_DIR" ]]; then
RPS1="{{$BUBBLEWRAP_DIR}}"
fi
''; '';
}; };
} }

View File

@@ -3,72 +3,41 @@
pkgs, pkgs,
lib, lib,
project-cloud, project-cloud,
nvim, goatcounter,
system,
... ...
}: }: {
{
imports = []; imports = [];
nix.optimise.automatic = true; nix.optimise.automatic = true;
nix.settings.experimental-features = [ nix.settings.experimental-features = ["nix-command" "flakes"];
"nix-command"
"flakes"
];
system.switch = {
enable = false;
enableNg = true;
};
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 2; boot.loader.systemd-boot.configurationLimit = 2;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [
"ip=dhcp"
"console=tty"
];
boot.kernel.sysctl = { boot.kernel.sysctl = {
"net.core.default_qdisc" = "fq"; "net.core.default_qdisc" = "fq";
"net.ipv4.tcp_congestion_control" = "bbr"; "net.ipv4.tcp_congestion_control" = "bbr";
}; };
boot.initrd = {
compressor = "zstd";
availableKernelModules = [
"virtio-pci"
"virtio-gpu"
];
systemd.enable = true;
network = {
enable = true;
ssh = {
enable = true;
hostKeys = [ /etc/ssh_dummy_ed25519_key ];
authorizedKeyFiles = [ ../nixy/ssh_pubkey ];
};
};
};
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
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
@@ -79,6 +48,11 @@
]; ];
programs.mosh.enable = true; programs.mosh.enable = true;
programs.neovim = {
enable = true;
vimAlias = true;
viAlias = true;
};
mailserver = { mailserver = {
enable = true; enable = true;
@@ -108,12 +82,6 @@
services.logind.extraConfig = ''KillUserProcesses=yes ''; 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 = [
{
addr = "10.100.0.1"; # wireguard
port = 22;
}
];
services.opendkim.enable = true; services.opendkim.enable = true;
services.miniflux = { services.miniflux = {
@@ -125,21 +93,34 @@
}; };
}; };
services.restya-board = {
enable = true;
virtualHost.serverName = "board.project-cloud.net";
virtualHost.listenHost = "localhost";
virtualHost.listenPort = 4001;
};
services.goatcounter = { services.goatcounter = {
enable = true; enable = true;
port = 8002; environmentFile = "/var/lib/goatcounter.env";
proxy = true; extraArgs = ["-listen='*:8002'" "-tls=none" "-debug=all"];
address = "127.0.0.1"; database = {
automigrate = true;
backend = "postgresql";
name = "goatcounter";
user = "goatcounter";
passwordFile = "/var/lib/goatcounter.passwd";
};
}; };
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,24 +154,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;
http3 = true;
forceSSL = true; forceSSL = true;
enableACME = 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."/" = {
@@ -200,17 +176,24 @@
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."board.project-cloud.net" = {
quic = true;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString config.services.restya-board.virtualHost.listenPort}";
}; };
}; };
virtualHosts."stats.project-cloud.net" = { virtualHosts."stats.project-cloud.net" = {
quic = true; quic = true;
http3 = true;
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
@@ -232,7 +215,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;
@@ -246,16 +228,10 @@
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
pygments
]
);
in
{
ENABLED = true; ENABLED = true;
FILE_EXTENSIONS = ".rst"; FILE_EXTENSIONS = ".rst";
RENDER_COMMAND = "${docutils}/bin/rst2html.py"; RENDER_COMMAND = "${docutils}/bin/rst2html.py";
@@ -263,39 +239,9 @@
}; };
}; };
services.nfs.server.enable = false; /*
services.nfs.server.extraNfsdConfig = '' needed for sendmail mail functionality
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";
};
services.seafile = {
enable = false;
initialAdminPassword = "admin";
adminEmail = "asmir.abdulahovic" + "@" + "gmail.com";
};
# needed for sendmail mail functionality
users.users.gitea.extraGroups = ["postdrop"]; users.users.gitea.extraGroups = ["postdrop"];
systemd.services.gitea.serviceConfig = { systemd.services.gitea.serviceConfig = {
RestrictAddressFamilies = ["AF_NETLINK"]; RestrictAddressFamilies = ["AF_NETLINK"];
@@ -307,94 +253,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; sops.secrets."gitea_mail_pw_hash" = {
"miniflux_env".sopsFile = ./secrets/miniflux.yaml; sopsFile = ./secrets/gitea_mail_pw_hash.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; sops.secrets."asmir_mail_pw_hash" = {
"wg_privkey".sopsFile = ./secrets/wg_privkey.yaml; sopsFile = ./secrets/asmir_mail_pw_hash.yaml;
"gitea_db" = { };
sops.secrets."gitea_db" = {
sopsFile = ./secrets/gitea_db.yaml; sopsFile = ./secrets/gitea_db.yaml;
owner = config.users.users.gitea.name; owner = config.users.users.gitea.name;
}; };
/*
"nextcloud_admin" = { sops.secrets."nextcloud_admin" = {
sopsFile = ./secrets/nextcloud_admin.yaml; sopsFile = ./secrets/nextcloud_admin.yaml;
owner = config.users.users.nextcloud.name; 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.firewall = {
nftables.enable = true;
enable = true;
allowedTCPPorts = [
80
443
587
2049
]; # http, mail, mail, nfs
allowedUDPPorts = [
443
51820
]; # mail, wireguard
allowPing = true;
logRefusedConnections = lib.mkDefault false;
};
networking.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,21 +2,17 @@
# 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"
"virtio_pci"
"usbhid"
"sr_mod"
];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [];
boot.kernelModules = []; boot.kernelModules = [];
boot.extraModulePackages = []; boot.extraModulePackages = [];

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

@@ -4,12 +4,11 @@
{ {
config, config,
pkgs, pkgs,
lib,
sops-nix,
zremap, zremap,
system,
nvim,
... ...
}: }: {
{
imports = []; imports = [];
system.stateVersion = "23.05"; system.stateVersion = "23.05";
@@ -23,42 +22,18 @@
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"
];
}; };
}; };
boot = { boot = {
initrd = { initrd.compressor = "zstd";
compressor = "zstd";
availableKernelModules = [ "e1000e" ];
network = {
enable = true;
udhcpc.enable = true;
ssh = {
enable = true;
hostKeys = [ /etc/ssh_dummy_ed25519_key ];
authorizedKeys = [ (builtins.readFile ../nixy/ssh_pubkey) ];
};
};
};
kernelModules = ["acpi_call"]; kernelModules = ["acpi_call"];
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
kernelParams = ["msr.allow_writes=on"]; kernelParams = ["msr.allow_writes=on"];
@@ -74,7 +49,6 @@
readOnlyNixStore = true; readOnlyNixStore = true;
supportedFilesystems = ["btrfs"]; supportedFilesystems = ["btrfs"];
tmp.useTmpfs = true; tmp.useTmpfs = true;
tmp.tmpfsSize = "80%";
}; };
security = { security = {
@@ -93,11 +67,7 @@
networking = { networking = {
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ allowedTCPPorts = [80 443];
80
443
51820
];
}; };
hostName = "mediabox"; hostName = "mediabox";
@@ -106,10 +76,7 @@
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"; networkmanager.dns = "none";
extraHosts = '' extraHosts = ''
@@ -120,28 +87,11 @@
192.168.88.1 router.lan 192.168.88.1 router.lan
192.168.88.231 workstation.lan 192.168.88.231 workstation.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 = {
@@ -184,7 +134,7 @@
serviceConfig.Nice = -20; serviceConfig.Nice = -20;
script = '' script = ''
sleep 1 sleep 1
${zremap.defaultPackage.${system}}/bin/zremap \ ${zremap.defaultPackage.x86_64-linux}/bin/zremap \
/dev/input/by-path/platform-i8042-serio-0-event-kbd /dev/input/by-path/platform-i8042-serio-0-event-kbd
''; '';
}; };
@@ -196,11 +146,7 @@
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"
];
}; };
/* /*
@@ -227,6 +173,7 @@
fwupd.enable = true; fwupd.enable = true;
ntp.enable = true; ntp.enable = true;
openssh.enable = true; openssh.enable = true;
restya-board.enable = false;
thinkfan.enable = false; thinkfan.enable = false;
xrdp = { xrdp = {
@@ -345,18 +292,12 @@
} }
{ {
keys = [122]; keys = [122];
events = [ events = ["key" "rep"];
"key"
"rep"
];
command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}- unmute"; command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}- unmute";
} }
{ {
keys = [123]; keys = [123];
events = [ events = ["key" "rep"];
"key"
"rep"
];
command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}+ unmute"; command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}+ unmute";
} }
{ {
@@ -459,34 +400,13 @@
users.users.akill = { users.users.akill = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = [ extraGroups = ["wireshark" "wheel" "kvm" "tty" "audio" "sound" "adbusers" "transmission"];
"wireshark"
"wheel"
"kvm"
"tty"
"audio"
"sound"
"adbusers"
"transmission"
];
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"];
"wireshark"
"wheel"
"kvm"
"tty"
"audio"
"sound"
"adbusers"
"transmission"
];
}; };
users.users.mediauser = { users.users.mediauser = {

View File

@@ -2,23 +2,17 @@
# 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"
"ehci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
@@ -26,11 +20,7 @@
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;
}; };

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;

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;
@@ -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,94 +1,43 @@
{ {
config, config,
nix-xilinx,
nvim,
pkgs, pkgs,
system, lib,
nix-xilinx,
sops-nix,
zremap, zremap,
... ...
}: }: {
let
USER = "akill";
in
{
imports = []; imports = [];
system.stateVersion = "23.05"; system.stateVersion = "23.05";
system.autoUpgrade.enable = false; system.autoUpgrade.enable = false;
system.switch = {
enable = false;
enableNg = true;
};
sops = { sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; sops.secrets."peerix/private" = {
secrets = {
"peerix/private" = {
sopsFile = ./secrets/peerix.yaml; sopsFile = ./secrets/peerix.yaml;
mode = "0400"; mode = "0400";
owner = config.users.users.nobody.name; owner = config.users.users.nobody.name;
group = config.users.users.nobody.group; 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"
];
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";
@@ -100,9 +49,7 @@ in
memtest86.enable = true; memtest86.enable = true;
}; };
readOnlyNixStore = true; readOnlyNixStore = true;
supportedFilesystems = [ supportedFilesystems = ["btrfs"];
"xfs"
];
tmp.useTmpfs = true; tmp.useTmpfs = true;
}; };
@@ -113,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;
} }
@@ -125,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 = ''
@@ -168,50 +106,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];
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,20 +123,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;
};
zsh.enable = true; zsh.enable = true;
firejail.enable = true; firejail.enable = true;
adb.enable = true; adb.enable = true;
@@ -243,125 +134,22 @@ 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 = {
services = { services = {
"zremap@" = { "zremap" = {
enable = true; description = "Intercepts keyboard udev events";
restartIfChanged = true; 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";
};
};
"netns@" = {
description = "%I network namespace";
before = [ "network.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.iproute2}/bin/ip netns add %I";
ExecStop = "${pkgs.iproute2}/bin/ip netns del %I";
};
};
"wg_proton" = {
description = "wg network interface";
bindsTo = [ "netns@wg.service" ];
requires = [ "network-online.target" ];
wants = [ "dnscrypt-proxy2_proton.service" ];
after = [ "netns@wg.service" ];
before = [ "dnscrypt-proxy2_proton.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = pkgs.writers.writeBash "wg-up" ''
set -e
ENDPOINT_IP=$(${pkgs.coreutils-full}/bin/cat "${config.sops.secrets."wg_endpoint_proton".path}")
${pkgs.iproute2}/bin/ip link add proton_wg type wireguard
${pkgs.iproute2}/bin/ip link set proton_wg netns wg
${pkgs.iproute2}/bin/ip -n wg address add 10.2.0.2/32 dev proton_wg
${pkgs.iproute2}/bin/ip netns exec wg \
${pkgs.wireguard-tools}/bin/wg set "proton_wg" private-key "${
config.sops.secrets."wg_privkey_proton".path
}"
${pkgs.iproute2}/bin/ip netns exec wg \
${pkgs.wireguard-tools}/bin/wg set "proton_wg" peer "g6DkXWKI/68RsLjROIwCEcyB/ZhyK5Q7OWcz1TtqER0=" \
endpoint "$ENDPOINT_IP:51820" \
persistent-keepalive "25" \
allowed-ips "0.0.0.0/0"
${pkgs.iproute2}/bin/ip -n wg link set lo up
${pkgs.iproute2}/bin/ip -n wg link set proton_wg up
${pkgs.iproute2}/bin/ip -n wg route add default dev proton_wg
'';
ExecStop = pkgs.writers.writeBash "wg-down" ''
${pkgs.iproute2}/bin/ip -n wg route del default dev proton_wg
${pkgs.iproute2}/bin/ip -n wg link del proton_wg
''; '';
}; };
}; };
"dnscrypt-proxy2_proton" = {
description = "DNSCrypt-proxy client proton";
wants = [
"network-online.target"
"nss-lookup.target"
];
before = [ "nss-lookup.target" ];
after = [ "wg_proton.service" ];
partOf = [ "wg_proton.service" ];
serviceConfig = {
AmbientCapabilities = "CAP_NET_BIND_SERVICE";
CacheDirectory = "dnscrypt-proxy";
DynamicUser = true;
ExecStart = "${pkgs.dnscrypt-proxy}/bin/dnscrypt-proxy -config ${config.services.dnscrypt-proxy2.configFile}";
LockPersonality = true;
LogsDirectory = "dnscrypt-proxy";
MemoryDenyWriteExecute = true;
NetworkNamespacePath = "/var/run/netns/wg";
NonBlocking = true;
NoNewPrivileges = true;
PrivateDevices = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectSystem = "strict";
Restart = "always";
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
];
RestrictNamespaces = true;
RestrictRealtime = true;
RuntimeDirectory = "dnscrypt-proxy";
StateDirectory = "dnscrypt-proxy";
SystemCallArchitectures = "native";
SystemCallFilter = [
"@system-service"
"@chown"
"~@aio"
"~@keyring"
"~@memlock"
"~@setuid"
"~@timer"
];
};
};
};
coredump.enable = false;
extraConfig = '' extraConfig = ''
DefaultTimeoutStartSec=30s DefaultTimeoutStartSec=30s
DefaultTimeoutStopSec=30s DefaultTimeoutStopSec=30s
@@ -370,8 +158,8 @@ in
services = { services = {
acpid.enable = true; acpid.enable = true;
btrfs.autoScrub.enable = true;
dbus.enable = true; dbus.enable = true;
dbus.implementation = "broker";
fstrim.enable = true; fstrim.enable = true;
fwupd.enable = true; fwupd.enable = true;
ntp.enable = true; ntp.enable = true;
@@ -385,29 +173,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"
@@ -419,8 +199,8 @@ in
#Arduino UNO r4 #Arduino UNO r4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666" SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666"
#zremap on new keyboard #ST-Link
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"
''; '';
}; };
@@ -440,25 +220,19 @@ in
{ {
keys = [113]; keys = [113];
events = ["key"]; events = ["key"];
command = "/run/current-system/sw/bin/runuser -l ${USER} -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" command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%- unmute'";
"rep"
];
command = "/run/current-system/sw/bin/runuser -l ${USER} -c 'amixer -q set Master 5%- unmute'";
} }
{ {
keys = [115]; 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 = "/run/current-system/sw/bin/runuser -l ${USER} -c 'amixer -q set Master 5%+ unmute'";
} }
{ {
@@ -480,51 +254,18 @@ in
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";
@@ -537,23 +278,6 @@ in
logind.extraConfig = '' logind.extraConfig = ''
KillUserProcesses=yes KillUserProcesses=yes
''; '';
seafile = {
enable = false;
initialAdminPassword = "admin";
adminEmail = "asmir.abdulahovic@gmail.com";
ccnetSettings = {
General = {
SERVICE_URL = "http://127.0.0.1:8020";
};
};
seafileSettings = {
fileserver = {
host = "0.0.0.0";
port = 8082;
};
};
};
}; };
fonts = { fonts = {
@@ -571,36 +295,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 noto-fonts-emoji
proggyfonts proggyfonts
siji siji
terminus_font terminus_font
terminus_font_ttf terminus_font_ttf
ubuntu_font_family ubuntu_font_family
vistafonts
]; ];
}; };
virtualisation = { virtualisation = {
libvirtd = {
enable = true;
allowedBridges = [
"virbr0"
"br0"
];
};
spiceUSBRedirection.enable = true;
containers.storage.settings = { containers.storage.settings = {
storage = { storage = {
driver = "btrfs";
graphroot = "/var/lib/containers/storage"; graphroot = "/var/lib/containers/storage";
runroot = "/run/containers/storage"; runroot = "/run/containers/storage";
}; };
@@ -612,6 +327,8 @@ in
}; };
}; };
sound.enable = true;
hardware = { hardware = {
bluetooth = { bluetooth = {
enable = true; enable = true;
@@ -622,11 +339,12 @@ in
}; };
}; };
graphics = { opengl = {
enable = true; enable = true;
extraPackages = [ ]; driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [];
}; };
rtl-sdr.enable = true;
}; };
zramSwap = { zramSwap = {
@@ -634,18 +352,9 @@ in
algorithm = "zstd"; algorithm = "zstd";
}; };
users.users.${USER} = { users.users.akill = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = [ extraGroups = ["wireshark" "kvm" "tty" "audio" "sound" "adbusers" "dialout" "wheel"];
"wireshark"
"kvm"
"tty"
"audio"
"sound"
"adbusers"
"dialout"
"wheel"
];
}; };
} }

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 = [
"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 = []; 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

@@ -44,12 +44,12 @@
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "viber"; pname = "viber";
version = "23.2.0.3"; version = "21.8.0.11";
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="; hash = "sha256-RrObmN21QOm5nk0R2avgCH0ulrfiUIo2PnyYWvQaGVw=";
}; };
nativeBuildInputs = [makeWrapper]; nativeBuildInputs = [makeWrapper];
@@ -115,8 +115,7 @@ 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 \
@@ -125,8 +124,7 @@ stdenv.mkDerivation {
--bind $HOME/Downloads/ $HOME/Downloads \ --bind $HOME/Downloads/ $HOME/Downloads \
$@ $@
''; '';
in in ''
''
dpkg-deb -x $src $out dpkg-deb -x $src $out
mkdir -p $out/bin mkdir -p $out/bin

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[@]}"
)
'';
}