all: format .nix filex with nixfmt-rfc
This commit is contained in:
parent
e571ae07c0
commit
77e24e385a
@ -2,7 +2,8 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -14,7 +15,10 @@
|
|||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
gc.options = "--delete-older-than 7d";
|
gc.options = "--delete-older-than 7d";
|
||||||
package = pkgs.nixVersions.latest;
|
package = pkgs.nixVersions.latest;
|
||||||
settings.experimental-features = ["nix-command" "flakes"];
|
settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
@ -53,15 +57,16 @@
|
|||||||
networking = {
|
networking = {
|
||||||
firewall.enable = true;
|
firewall.enable = true;
|
||||||
hostName = "blue";
|
hostName = "blue";
|
||||||
nameservers = ["127.0.0.1" "::1"];
|
nameservers = [
|
||||||
|
"127.0.0.1"
|
||||||
|
"::1"
|
||||||
|
];
|
||||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||||
|
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dns = "none";
|
dns = "none";
|
||||||
/*
|
# wifi.backend = "iwd";
|
||||||
wifi.backend = "iwd";
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -152,7 +157,10 @@
|
|||||||
windowManager.i3.enable = true;
|
windowManager.i3.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
udev.packages = [pkgs.rtl-sdr pkgs.openhantek6022];
|
udev.packages = [
|
||||||
|
pkgs.rtl-sdr
|
||||||
|
pkgs.openhantek6022
|
||||||
|
];
|
||||||
|
|
||||||
tlp = {
|
tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -169,13 +177,19 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
keys = [ 114 ];
|
keys = [ 114 ];
|
||||||
events = ["key" "rep"];
|
events = [
|
||||||
|
"key"
|
||||||
|
"rep"
|
||||||
|
];
|
||||||
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%- unmute'";
|
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%- unmute'";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
keys = [ 115 ];
|
keys = [ 115 ];
|
||||||
events = ["key" "rep"];
|
events = [
|
||||||
|
"key"
|
||||||
|
"rep"
|
||||||
|
];
|
||||||
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%+ unmute'";
|
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%+ unmute'";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,6 +320,14 @@
|
|||||||
users.users.akill = {
|
users.users.akill = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = ["wireshark" "kvm" "tty" "audio" "sound" "adbusers" "dialout"];
|
extraGroups = [
|
||||||
|
"wireshark"
|
||||||
|
"kvm"
|
||||||
|
"tty"
|
||||||
|
"audio"
|
||||||
|
"sound"
|
||||||
|
"adbusers"
|
||||||
|
"dialout"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -6,12 +6,21 @@
|
|||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod"];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"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 = [ ];
|
||||||
@ -19,34 +28,55 @@
|
|||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=root" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=root"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."enc_root".device = "/dev/disk/by-uuid/8eb8ac22-d89d-4406-bfbd-ce43e283649f";
|
boot.initrd.luks.devices."enc_root".device =
|
||||||
|
"/dev/disk/by-uuid/8eb8ac22-d89d-4406-bfbd-ce43e283649f";
|
||||||
|
|
||||||
fileSystems."/home" = {
|
fileSystems."/home" = {
|
||||||
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=home" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=home"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" = {
|
fileSystems."/nix" = {
|
||||||
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=nix" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=nix"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var/log" = {
|
fileSystems."/var/log" = {
|
||||||
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=log" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=log"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/persist" = {
|
fileSystems."/persist" = {
|
||||||
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=persist" "compress=zstd" "noatime"];
|
options = [
|
||||||
|
"subvol=persist"
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
|
@ -3,8 +3,10 @@
|
|||||||
nix-xilinx,
|
nix-xilinx,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
environment.systemPackages = with pkgs;
|
{
|
||||||
|
environment.systemPackages =
|
||||||
|
with pkgs;
|
||||||
[
|
[
|
||||||
acpi
|
acpi
|
||||||
binutils
|
binutils
|
||||||
@ -92,5 +94,11 @@
|
|||||||
zip
|
zip
|
||||||
z-lua
|
z-lua
|
||||||
]
|
]
|
||||||
++ (with nix-xilinx.packages.${system}; [vivado vitis vitis_hls model_composer xilinx-shell]);
|
++ (with nix-xilinx.packages.${system}; [
|
||||||
|
vivado
|
||||||
|
vitis
|
||||||
|
vitis_hls
|
||||||
|
model_composer
|
||||||
|
xilinx-shell
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,11 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib;
|
||||||
|
let
|
||||||
cfg = config.services.batteryNotifier;
|
cfg = config.services.batteryNotifier;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
services.batteryNotifier = {
|
services.batteryNotifier = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
15
flake.nix
15
flake.nix
@ -50,7 +50,8 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {
|
outputs =
|
||||||
|
inputs@{
|
||||||
home-manager,
|
home-manager,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nix-xilinx,
|
nix-xilinx,
|
||||||
@ -62,9 +63,11 @@
|
|||||||
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 rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
@ -168,7 +171,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
devShell.x86_64-linux = pkgs.mkShell {
|
devShell.x86_64-linux = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [sops ssh-to-age age];
|
buildInputs = with pkgs; [
|
||||||
|
sops
|
||||||
|
ssh-to-age
|
||||||
|
age
|
||||||
|
];
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
echo "Configuring NixOS!"
|
echo "Configuring NixOS!"
|
||||||
'';
|
'';
|
||||||
|
@ -2,12 +2,21 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" ''
|
qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" ''
|
||||||
firejail -- ${lib.getExe pkgs.qutebrowser} "$@"
|
firejail -- ${lib.getExe pkgs.qutebrowser} "$@"
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
imports = [./zsh.nix ./i3status-rust.nix ./sway.nix ./i3.nix ./home_packages.nix ./whatsapp-for-linux.nix];
|
{
|
||||||
|
imports = [
|
||||||
|
./zsh.nix
|
||||||
|
./i3status-rust.nix
|
||||||
|
./sway.nix
|
||||||
|
./i3.nix
|
||||||
|
./home_packages.nix
|
||||||
|
./whatsapp-for-linux.nix
|
||||||
|
];
|
||||||
|
|
||||||
home.stateVersion = "22.11";
|
home.stateVersion = "22.11";
|
||||||
home.username = "akill";
|
home.username = "akill";
|
||||||
@ -41,7 +50,9 @@ in {
|
|||||||
WLR_RENDERER = "vulkan";
|
WLR_RENDERER = "vulkan";
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.sway = {enable = true;};
|
wayland.windowManager.sway = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
@ -60,7 +71,11 @@ in {
|
|||||||
clock24 = true;
|
clock24 = true;
|
||||||
keyMode = "vi";
|
keyMode = "vi";
|
||||||
terminal = "screen-256color";
|
terminal = "screen-256color";
|
||||||
plugins = with pkgs.tmuxPlugins; [sysstat net-speed gruvbox];
|
plugins = with pkgs.tmuxPlugins; [
|
||||||
|
sysstat
|
||||||
|
net-speed
|
||||||
|
gruvbox
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mpv = {
|
mpv = {
|
||||||
@ -137,7 +152,9 @@ in {
|
|||||||
font = "JetBrainsMono:size=10";
|
font = "JetBrainsMono:size=10";
|
||||||
dpi-aware = "yes";
|
dpi-aware = "yes";
|
||||||
};
|
};
|
||||||
mouse = {hide-when-typing = "yes";};
|
mouse = {
|
||||||
|
hide-when-typing = "yes";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -183,8 +200,12 @@ in {
|
|||||||
userEmail = "asmir.abdulahovic@gmail.com";
|
userEmail = "asmir.abdulahovic@gmail.com";
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
init.defaultBranch = "master";
|
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;
|
||||||
@ -192,7 +213,14 @@ in {
|
|||||||
|
|
||||||
obs-studio = {
|
obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = with pkgs.obs-studio-plugins; [obs-vkcapture input-overlay obs-multi-rtmp obs-pipewire-audio-capture wlrobs obs-vaapi];
|
plugins = with pkgs.obs-studio-plugins; [
|
||||||
|
obs-vkcapture
|
||||||
|
input-overlay
|
||||||
|
obs-multi-rtmp
|
||||||
|
obs-pipewire-audio-capture
|
||||||
|
wlrobs
|
||||||
|
obs-vaapi
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
i3status-rust.enable = true;
|
i3status-rust.enable = true;
|
||||||
@ -220,14 +248,16 @@ in {
|
|||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
swayidle = let
|
swayidle =
|
||||||
|
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"
|
${lib.getExe pkgs.grim} -t ppm - | ${pkgs.imagemagick}/bin/convert - -blur 0x12 "$TMP_FILE"
|
||||||
${lib.getExe pkgs.swaylock} -f -i "$TMP_FILE"
|
${lib.getExe pkgs.swaylock} -f -i "$TMP_FILE"
|
||||||
${pkgs.coreutils}/bin/rm "$TMP_FILE"
|
${pkgs.coreutils}/bin/rm "$TMP_FILE"
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
events = [
|
events = [
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
inputs,
|
inputs,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
chromium_teams = pkgs.writeShellScriptBin "chromium_teams" ''
|
chromium_teams = pkgs.writeShellScriptBin "chromium_teams" ''
|
||||||
${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://teams.microsoft.com/
|
${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://teams.microsoft.com/
|
||||||
'';
|
'';
|
||||||
@ -25,7 +26,8 @@
|
|||||||
PROXY_PORT="1337"
|
PROXY_PORT="1337"
|
||||||
${lib.getExe pkgs.openssh} -D "$PROXY_PORT" -q -N "$@"
|
${lib.getExe pkgs.openssh} -D "$PROXY_PORT" -q -N "$@"
|
||||||
'';
|
'';
|
||||||
wrap_sh = let
|
wrap_sh =
|
||||||
|
let
|
||||||
bubblewrap = pkgs.callPackage ../packages/bubblewrap/default.nix { };
|
bubblewrap = pkgs.callPackage ../packages/bubblewrap/default.nix { };
|
||||||
in
|
in
|
||||||
pkgs.writeShellScriptBin "wrap.sh" ''
|
pkgs.writeShellScriptBin "wrap.sh" ''
|
||||||
@ -41,8 +43,10 @@
|
|||||||
--tmp-overlay "$FULL_PATH" \
|
--tmp-overlay "$FULL_PATH" \
|
||||||
"$SHELL"
|
"$SHELL"
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
home.packages = with pkgs;
|
{
|
||||||
|
home.packages =
|
||||||
|
with pkgs;
|
||||||
[
|
[
|
||||||
anydesk
|
anydesk
|
||||||
appimage-run
|
appimage-run
|
||||||
@ -57,7 +61,7 @@ in {
|
|||||||
ungoogled-chromium
|
ungoogled-chromium
|
||||||
cmake
|
cmake
|
||||||
compsize
|
compsize
|
||||||
/*cura*/
|
# cura
|
||||||
deluge
|
deluge
|
||||||
dfu-util
|
dfu-util
|
||||||
discord
|
discord
|
||||||
@ -153,7 +157,7 @@ in {
|
|||||||
yt-dlp
|
yt-dlp
|
||||||
zapzap
|
zapzap
|
||||||
zathura
|
zathura
|
||||||
/*zeal-qt6*/
|
# zeal-qt6
|
||||||
zig
|
zig
|
||||||
]
|
]
|
||||||
++ [
|
++ [
|
||||||
|
33
home/i3.nix
33
home/i3.nix
@ -2,9 +2,11 @@
|
|||||||
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;
|
||||||
@ -53,24 +55,28 @@ in {
|
|||||||
"${modifier}+Escape" = "workspace back_and_forth";
|
"${modifier}+Escape" = "workspace back_and_forth";
|
||||||
"${modifier}+p" = "exec ${pkgs.dmenu}/bin/dmenu_run";
|
"${modifier}+p" = "exec ${pkgs.dmenu}/bin/dmenu_run";
|
||||||
|
|
||||||
"Mod4+l" = "exec i3-msg [instance=\"python3_scr\"] scratchpad show || exec alacritty --class python3_scr -e python3";
|
"Mod4+l" =
|
||||||
|
"exec i3-msg [instance=\"python3_scr\"] scratchpad show || exec alacritty --class python3_scr -e python3";
|
||||||
"Mod4+j" = "exec i3-msg [class=\"ViberPC\"] scratchpad show || exec viber";
|
"Mod4+j" = "exec i3-msg [class=\"ViberPC\"] scratchpad show || exec viber";
|
||||||
"Mod4+m" = "exec i3-msg [class=\"Thunderbird\"] scratchpad show || exec thunderbird";
|
"Mod4+m" = "exec i3-msg [class=\"Thunderbird\"] scratchpad show || exec thunderbird";
|
||||||
"Mod4+y" = "exec i3-msg [instance=\"pulsemixer_scr\"] scratchpad show || exec alacritty --class pulsemixer_scr -e pulsemixer";
|
"Mod4+y" =
|
||||||
|
"exec i3-msg [instance=\"pulsemixer_scr\"] scratchpad show || exec alacritty --class pulsemixer_scr -e pulsemixer";
|
||||||
};
|
};
|
||||||
|
|
||||||
window = {
|
window = {
|
||||||
/*
|
# border = 4;
|
||||||
border = 4;
|
|
||||||
*/
|
|
||||||
commands = [
|
commands = [
|
||||||
{
|
{
|
||||||
command = scratchpad_cmd;
|
command = scratchpad_cmd;
|
||||||
criteria = {instance = "pulsemixer_scr|python3_scr";};
|
criteria = {
|
||||||
|
instance = "pulsemixer_scr|python3_scr";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = scratchpad_cmd;
|
command = scratchpad_cmd;
|
||||||
criteria = {class = "Thunderbird";};
|
criteria = {
|
||||||
|
class = "Thunderbird";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = scratchpad_cmd;
|
command = scratchpad_cmd;
|
||||||
@ -81,7 +87,9 @@ in {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = "focus child, layout tabbed, focus";
|
command = "focus child, layout tabbed, focus";
|
||||||
criteria = {class = "qutebrowser";};
|
criteria = {
|
||||||
|
class = "qutebrowser";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@ -90,7 +98,10 @@ in {
|
|||||||
{
|
{
|
||||||
position = "top";
|
position = "top";
|
||||||
fonts = {
|
fonts = {
|
||||||
names = ["DejaVu Sans Mono" "FontAwesome5Free"];
|
names = [
|
||||||
|
"DejaVu Sans Mono"
|
||||||
|
"FontAwesome5Free"
|
||||||
|
];
|
||||||
style = "Fixed Bold SemiCondensed";
|
style = "Fixed Bold SemiCondensed";
|
||||||
size = 7.0;
|
size = 7.0;
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.i3status-rust = {
|
programs.i3status-rust = {
|
||||||
bars.top = {
|
bars.top = {
|
||||||
icons = "awesome5";
|
icons = "awesome5";
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
system,
|
system,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" ''
|
cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" ''
|
||||||
${lib.getExe pkgs.cliphist} list | \
|
${lib.getExe pkgs.cliphist} list | \
|
||||||
${lib.getExe pkgs.wofi} --dmenu --insensitive | \
|
${lib.getExe pkgs.wofi} --dmenu --insensitive | \
|
||||||
@ -18,7 +19,8 @@
|
|||||||
swaysw = inputs.swaysw.packages.${system}.swaysw;
|
swaysw = inputs.swaysw.packages.${system}.swaysw;
|
||||||
viber = pkgs.callPackage ../packages/viber/default.nix { };
|
viber = pkgs.callPackage ../packages/viber/default.nix { };
|
||||||
term = "${pkgs.foot}/bin/footclient";
|
term = "${pkgs.foot}/bin/footclient";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraSessionCommands = "";
|
extraSessionCommands = "";
|
||||||
@ -34,15 +36,21 @@ in {
|
|||||||
window.commands = [
|
window.commands = [
|
||||||
{
|
{
|
||||||
command = "move scratchpad, resize set 1152 648";
|
command = "move scratchpad, resize set 1152 648";
|
||||||
criteria = {app_id = "pulsemixer|python3|com.rtosta.zapzap|whatsapp-for-linux|com.viber";};
|
criteria = {
|
||||||
|
app_id = "pulsemixer|python3|com.rtosta.zapzap|whatsapp-for-linux|com.viber";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = "move scratchpad, resize set 1502 845";
|
command = "move scratchpad, resize set 1502 845";
|
||||||
criteria = {app_id = "com.viber";};
|
criteria = {
|
||||||
|
app_id = "com.viber";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = "floating enable";
|
command = "floating enable";
|
||||||
criteria = {app_id = "sws_cli";};
|
criteria = {
|
||||||
|
app_id = "sws_cli";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -61,16 +69,25 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
"type:keyboard" = {repeat_delay = "150";};
|
"type:keyboard" = {
|
||||||
"type:keyboard" = {repeat_rate = "70";};
|
repeat_delay = "150";
|
||||||
"type:touchpad" = {tap = "enabled";};
|
};
|
||||||
|
"type:keyboard" = {
|
||||||
|
repeat_rate = "70";
|
||||||
|
};
|
||||||
|
"type:touchpad" = {
|
||||||
|
tap = "enabled";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
bars = [
|
bars = [
|
||||||
{
|
{
|
||||||
position = "top";
|
position = "top";
|
||||||
fonts = {
|
fonts = {
|
||||||
names = ["Iosevka" "FontAwesome"];
|
names = [
|
||||||
|
"Iosevka"
|
||||||
|
"FontAwesome"
|
||||||
|
];
|
||||||
style = "Bold Semi-Condensed";
|
style = "Bold Semi-Condensed";
|
||||||
size = 12.0;
|
size = 12.0;
|
||||||
};
|
};
|
||||||
@ -124,12 +141,14 @@ in {
|
|||||||
"Alt+bracketright" = "focus output right";
|
"Alt+bracketright" = "focus output right";
|
||||||
"Alt+bracketleft" = "focus output left";
|
"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 ${pkgs.sway}/bin/swaymsg [app_id="python3"] scratchpad show || exec ${term} -a python3 ${lib.getExe pkgs.python3}'';
|
||||||
"Mod4+j" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec ${lib.getExe pkgs.zapzap}";
|
"Mod4+j" =
|
||||||
"Mod4+h" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.viber] scratchpad show || exec ${viber}/bin/viber";
|
"exec ${pkgs.sway}/bin/swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec ${lib.getExe pkgs.zapzap}";
|
||||||
"Mod4+y" = ''
|
"Mod4+h" =
|
||||||
exec ${pkgs.sway}/bin/swaymsg [app_id="pulsemixer"] scratchpad show || exec ${term} -a pulsemixer ${lib.getExe pkgs.pulsemixer}'';
|
"exec ${pkgs.sway}/bin/swaymsg [app_id=com.viber] scratchpad show || exec ${viber}/bin/viber";
|
||||||
|
"Mod4+y" =
|
||||||
|
''exec ${pkgs.sway}/bin/swaymsg [app_id="pulsemixer"] scratchpad show || exec ${term} -a pulsemixer ${lib.getExe pkgs.pulsemixer}'';
|
||||||
"Mod4+p" = "exec ${lib.getExe pkgs.tessen} -a copy";
|
"Mod4+p" = "exec ${lib.getExe pkgs.tessen} -a copy";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
with lib; {
|
with lib;
|
||||||
|
{
|
||||||
xdg.configFile."whatsapp-for-linux/settings.conf".source = builtins.toFile "settings.conf" (
|
xdg.configFile."whatsapp-for-linux/settings.conf".source = builtins.toFile "settings.conf" (
|
||||||
generators.toINI { } {
|
generators.toINI { } {
|
||||||
General = {
|
General = {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.z-lua = {
|
programs.z-lua = {
|
||||||
enableAliases = true;
|
enableAliases = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
|
@ -6,11 +6,15 @@
|
|||||||
nvim,
|
nvim,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
nix.optimise.automatic = true;
|
nix.optimise.automatic = true;
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
system.switch = {
|
system.switch = {
|
||||||
enable = false;
|
enable = false;
|
||||||
enableNg = true;
|
enableNg = true;
|
||||||
@ -21,7 +25,10 @@
|
|||||||
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.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";
|
||||||
@ -29,7 +36,10 @@
|
|||||||
|
|
||||||
boot.initrd = {
|
boot.initrd = {
|
||||||
compressor = "zstd";
|
compressor = "zstd";
|
||||||
availableKernelModules = ["virtio-pci" "virtio-gpu"];
|
availableKernelModules = [
|
||||||
|
"virtio-pci"
|
||||||
|
"virtio-gpu"
|
||||||
|
];
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
network = {
|
network = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -236,10 +246,16 @@
|
|||||||
REGISTER_EMAIL_CONFIRM = true;
|
REGISTER_EMAIL_CONFIRM = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
settings."markup.restructuredtext" = let
|
settings."markup.restructuredtext" =
|
||||||
docutils =
|
let
|
||||||
pkgs.python3.withPackages (ps: with ps; [docutils pygments]);
|
docutils = pkgs.python3.withPackages (
|
||||||
in {
|
ps: with ps; [
|
||||||
|
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";
|
||||||
@ -279,9 +295,7 @@
|
|||||||
adminEmail = "asmir.abdulahovic" + "@" + "gmail.com";
|
adminEmail = "asmir.abdulahovic" + "@" + "gmail.com";
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
# needed for sendmail mail functionality
|
||||||
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" ];
|
||||||
@ -321,8 +335,16 @@
|
|||||||
networking.hostName = "magpie";
|
networking.hostName = "magpie";
|
||||||
|
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
networking.firewall.allowedTCPPorts = [80 443 587 2049]; # http, mail, mail, nfs
|
networking.firewall.allowedTCPPorts = [
|
||||||
networking.firewall.allowedUDPPorts = [443 51820]; #mail, wireguard
|
80
|
||||||
|
443
|
||||||
|
587
|
||||||
|
2049
|
||||||
|
]; # http, mail, mail, nfs
|
||||||
|
networking.firewall.allowedUDPPorts = [
|
||||||
|
443
|
||||||
|
51820
|
||||||
|
]; # mail, wireguard
|
||||||
networking.firewall.allowPing = true;
|
networking.firewall.allowPing = true;
|
||||||
networking.firewall.logRefusedConnections = lib.mkDefault false;
|
networking.firewall.logRefusedConnections = lib.mkDefault false;
|
||||||
|
|
||||||
|
@ -5,12 +5,18 @@
|
|||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "virtio_pci" "usbhid" "sr_mod"];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"virtio_pci"
|
||||||
|
"usbhid"
|
||||||
|
"sr_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
system,
|
system,
|
||||||
nvim,
|
nvim,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
@ -36,7 +37,10 @@
|
|||||||
gc.options = "--delete-older-than 7d";
|
gc.options = "--delete-older-than 7d";
|
||||||
package = pkgs.nixVersions.latest;
|
package = pkgs.nixVersions.latest;
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -89,7 +93,11 @@
|
|||||||
networking = {
|
networking = {
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [80 443 51820];
|
allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
51820
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
hostName = "mediabox";
|
hostName = "mediabox";
|
||||||
@ -98,7 +106,10 @@
|
|||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
wireless.enable = false;
|
wireless.enable = false;
|
||||||
wireless.interfaces = [ "wlp3s0" ];
|
wireless.interfaces = [ "wlp3s0" ];
|
||||||
nameservers = ["127.0.0.1" "::1"];
|
nameservers = [
|
||||||
|
"127.0.0.1"
|
||||||
|
"::1"
|
||||||
|
];
|
||||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||||
networkmanager.dns = "none";
|
networkmanager.dns = "none";
|
||||||
extraHosts = ''
|
extraHosts = ''
|
||||||
@ -185,7 +196,11 @@
|
|||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${pkgs.ethtool}/sbin/ethtool -s enp0s25 wol m";
|
ExecStart = "${pkgs.ethtool}/sbin/ethtool -s enp0s25 wol m";
|
||||||
};
|
};
|
||||||
wantedBy = ["default.target" "suspend.target" "shutdown.target"];
|
wantedBy = [
|
||||||
|
"default.target"
|
||||||
|
"suspend.target"
|
||||||
|
"shutdown.target"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -330,12 +345,18 @@
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
keys = [ 122 ];
|
keys = [ 122 ];
|
||||||
events = ["key" "rep"];
|
events = [
|
||||||
|
"key"
|
||||||
|
"rep"
|
||||||
|
];
|
||||||
command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}- unmute";
|
command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}- unmute";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
keys = [ 123 ];
|
keys = [ 123 ];
|
||||||
events = ["key" "rep"];
|
events = [
|
||||||
|
"key"
|
||||||
|
"rep"
|
||||||
|
];
|
||||||
command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}+ unmute";
|
command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}+ unmute";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -438,7 +459,16 @@
|
|||||||
users.users.akill = {
|
users.users.akill = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = ["wireshark" "wheel" "kvm" "tty" "audio" "sound" "adbusers" "transmission"];
|
extraGroups = [
|
||||||
|
"wireshark"
|
||||||
|
"wheel"
|
||||||
|
"kvm"
|
||||||
|
"tty"
|
||||||
|
"audio"
|
||||||
|
"sound"
|
||||||
|
"adbusers"
|
||||||
|
"transmission"
|
||||||
|
];
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
(builtins.readFile ../nixy/ssh_pubkey)
|
(builtins.readFile ../nixy/ssh_pubkey)
|
||||||
];
|
];
|
||||||
@ -447,7 +477,16 @@
|
|||||||
users.users.ado = {
|
users.users.ado = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = ["wireshark" "wheel" "kvm" "tty" "audio" "sound" "adbusers" "transmission"];
|
extraGroups = [
|
||||||
|
"wireshark"
|
||||||
|
"wheel"
|
||||||
|
"kvm"
|
||||||
|
"tty"
|
||||||
|
"audio"
|
||||||
|
"sound"
|
||||||
|
"adbusers"
|
||||||
|
"transmission"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.mediauser = {
|
users.users.mediauser = {
|
||||||
|
@ -5,12 +5,20 @@
|
|||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"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 = [ ];
|
||||||
@ -18,7 +26,11 @@
|
|||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=root" "compress=lzo" "noatime"];
|
options = [
|
||||||
|
"subvol=root"
|
||||||
|
"compress=lzo"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/60aa7671-bfee-451b-b871-ac7c5a4a9f3a";
|
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/60aa7671-bfee-451b-b871-ac7c5a4a9f3a";
|
||||||
@ -26,25 +38,41 @@
|
|||||||
fileSystems."/home" = {
|
fileSystems."/home" = {
|
||||||
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=home" "compress=lzo" "noatime"];
|
options = [
|
||||||
|
"subvol=home"
|
||||||
|
"compress=lzo"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" = {
|
fileSystems."/nix" = {
|
||||||
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=nix" "compress=lzo" "noatime"];
|
options = [
|
||||||
|
"subvol=nix"
|
||||||
|
"compress=lzo"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/persist" = {
|
fileSystems."/persist" = {
|
||||||
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=persist" "compress=lzo" "noatime"];
|
options = [
|
||||||
|
"subvol=persist"
|
||||||
|
"compress=lzo"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var/log" = {
|
fileSystems."/var/log" = {
|
||||||
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=log" "compress=lzo" "noatime"];
|
options = [
|
||||||
|
"subvol=log"
|
||||||
|
"compress=lzo"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
# Enable Nginx
|
# Enable Nginx
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -4,11 +4,13 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib;
|
||||||
|
let
|
||||||
cfg = config.services.qbittorrent;
|
cfg = config.services.qbittorrent;
|
||||||
configDir = "${cfg.dataDir}/.config";
|
configDir = "${cfg.dataDir}/.config";
|
||||||
openFilesLimit = 4096;
|
openFilesLimit = 4096;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.services.qbittorrent = {
|
options.services.qbittorrent = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
@ -110,7 +112,10 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.groups =
|
users.groups = mkIf (cfg.group == "qbittorrent") {
|
||||||
mkIf (cfg.group == "qbittorrent") {qbittorrent = {gid = null;};};
|
qbittorrent = {
|
||||||
|
gid = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
system,
|
system,
|
||||||
zremap,
|
zremap,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
@ -61,17 +62,29 @@
|
|||||||
package = pkgs.nixVersions.latest;
|
package = pkgs.nixVersions.latest;
|
||||||
settings = {
|
settings = {
|
||||||
sandbox = true;
|
sandbox = true;
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
extraModulePackages = with config.boot.kernelPackages; [usbip v4l2loopback];
|
extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
usbip
|
||||||
|
v4l2loopback
|
||||||
|
];
|
||||||
initrd.compressor = "zstd";
|
initrd.compressor = "zstd";
|
||||||
initrd.kernelModules = [ ];
|
initrd.kernelModules = [ ];
|
||||||
initrd.systemd.enable = true;
|
initrd.systemd.enable = true;
|
||||||
binfmt.emulatedSystems = ["wasm32-wasi" "x86_64-windows"];
|
binfmt.emulatedSystems = [
|
||||||
kernelParams = ["psmouse.synaptics_intertouch=0" "mem_sleep_default=deep"];
|
"wasm32-wasi"
|
||||||
|
"x86_64-windows"
|
||||||
|
];
|
||||||
|
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";
|
||||||
@ -83,7 +96,10 @@
|
|||||||
memtest86.enable = true;
|
memtest86.enable = true;
|
||||||
};
|
};
|
||||||
readOnlyNixStore = true;
|
readOnlyNixStore = true;
|
||||||
supportedFilesystems = ["f2fs" "xfs"];
|
supportedFilesystems = [
|
||||||
|
"f2fs"
|
||||||
|
"xfs"
|
||||||
|
];
|
||||||
tmp.useTmpfs = true;
|
tmp.useTmpfs = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -109,11 +125,19 @@
|
|||||||
nftables.enable = true;
|
nftables.enable = true;
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [80 443 51820 8020];
|
allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
51820
|
||||||
|
8020
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
hostName = "nixy";
|
hostName = "nixy";
|
||||||
nameservers = ["127.0.0.1" "::1"];
|
nameservers = [
|
||||||
|
"127.0.0.1"
|
||||||
|
"::1"
|
||||||
|
];
|
||||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||||
|
|
||||||
extraHosts = ''
|
extraHosts = ''
|
||||||
@ -175,7 +199,10 @@
|
|||||||
time.timeZone = "Europe/Sarajevo";
|
time.timeZone = "Europe/Sarajevo";
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nixpkgs.overlays = [nix-xilinx.overlay nvim.overlays.${system}.overlay];
|
nixpkgs.overlays = [
|
||||||
|
nix-xilinx.overlay
|
||||||
|
nvim.overlays.${system}.overlay
|
||||||
|
];
|
||||||
environment = {
|
environment = {
|
||||||
etc = {
|
etc = {
|
||||||
"firejail/qutebrowser.local".text = ''
|
"firejail/qutebrowser.local".text = ''
|
||||||
@ -260,7 +287,9 @@
|
|||||||
${pkgs.iproute2}/bin/ip link set proton_wg netns wg
|
${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 -n wg address add 10.2.0.2/32 dev proton_wg
|
||||||
${pkgs.iproute2}/bin/ip netns exec 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.wireguard-tools}/bin/wg set "proton_wg" private-key "${
|
||||||
|
config.sops.secrets."wg_privkey_proton".path
|
||||||
|
}"
|
||||||
${pkgs.iproute2}/bin/ip netns exec wg \
|
${pkgs.iproute2}/bin/ip netns exec wg \
|
||||||
${pkgs.wireguard-tools}/bin/wg set "proton_wg" peer "g6DkXWKI/68RsLjROIwCEcyB/ZhyK5Q7OWcz1TtqER0=" \
|
${pkgs.wireguard-tools}/bin/wg set "proton_wg" peer "g6DkXWKI/68RsLjROIwCEcyB/ZhyK5Q7OWcz1TtqER0=" \
|
||||||
endpoint "$ENDPOINT_IP:51820" \
|
endpoint "$ENDPOINT_IP:51820" \
|
||||||
@ -372,7 +401,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
udev = {
|
udev = {
|
||||||
packages = [pkgs.openhantek6022 pkgs.openocd];
|
packages = [
|
||||||
|
pkgs.openhantek6022
|
||||||
|
pkgs.openocd
|
||||||
|
];
|
||||||
extraRules = ''
|
extraRules = ''
|
||||||
#Xilinx FTDI
|
#Xilinx FTDI
|
||||||
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Xilinx", MODE:="666"
|
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Xilinx", MODE:="666"
|
||||||
@ -410,13 +442,19 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
keys = [ 114 ];
|
keys = [ 114 ];
|
||||||
events = ["key" "rep"];
|
events = [
|
||||||
|
"key"
|
||||||
|
"rep"
|
||||||
|
];
|
||||||
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%- unmute'";
|
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%- unmute'";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
keys = [ 115 ];
|
keys = [ 115 ];
|
||||||
events = ["key" "rep"];
|
events = [
|
||||||
|
"key"
|
||||||
|
"rep"
|
||||||
|
];
|
||||||
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%+ unmute'";
|
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%+ unmute'";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -454,10 +492,12 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
borgbackup.jobs."borgbase" = let
|
borgbackup.jobs."borgbase" =
|
||||||
|
let
|
||||||
user = config.users.users.akill;
|
user = config.users.users.akill;
|
||||||
home = user.home;
|
home = user.home;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
user = user.name;
|
user = user.name;
|
||||||
paths = [
|
paths = [
|
||||||
(home + "/pic/priv")
|
(home + "/pic/priv")
|
||||||
@ -548,6 +588,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
|
libvirtd = {
|
||||||
|
enable = true;
|
||||||
|
allowedBridges = [
|
||||||
|
"virbr0"
|
||||||
|
"br0"
|
||||||
|
];
|
||||||
|
};
|
||||||
spiceUSBRedirection.enable = true;
|
spiceUSBRedirection.enable = true;
|
||||||
containers.storage.settings = {
|
containers.storage.settings = {
|
||||||
storage = {
|
storage = {
|
||||||
@ -587,6 +634,15 @@
|
|||||||
users.users.akill = {
|
users.users.akill = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = ["wireshark" "kvm" "tty" "audio" "sound" "adbusers" "dialout" "wheel"];
|
extraGroups = [
|
||||||
|
"wireshark"
|
||||||
|
"kvm"
|
||||||
|
"tty"
|
||||||
|
"audio"
|
||||||
|
"sound"
|
||||||
|
"adbusers"
|
||||||
|
"dialout"
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,39 +1,60 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# 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, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.luks.devices."crypt_dev".device = "/dev/disk/by-uuid/e10821b9-5426-4f03-b716-1645a64fcd6a";
|
boot.initrd.luks.devices."crypt_dev".device =
|
||||||
|
"/dev/disk/by-uuid/e10821b9-5426-4f03-b716-1645a64fcd6a";
|
||||||
boot.initrd.luks.devices."crypt_dev".allowDiscards = true;
|
boot.initrd.luks.devices."crypt_dev".allowDiscards = true;
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "ehci_pci" "xhci_pci" "uas" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"ehci_pci"
|
||||||
|
"xhci_pci"
|
||||||
|
"uas"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"rtsx_pci_sdmmc"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
boot.kernelModules = [ "kvm-amd" "amd-gpu" ];
|
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/c461c971-54ca-4fb7-91e8-6ac70de53ef2";
|
||||||
fsType = "xfs";
|
fsType = "xfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{ device = "/dev/disk/by-uuid/eeaa6fab-d67d-400f-b6d4-b1f44c2e0047";
|
device = "/dev/disk/by-uuid/eeaa6fab-d67d-400f-b6d4-b1f44c2e0047";
|
||||||
fsType = "xfs";
|
fsType = "xfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/disk/by-uuid/aeaa71ca-a439-4ef3-9ab8-db7ae8f59376";
|
device = "/dev/disk/by-uuid/aeaa71ca-a439-4ef3-9ab8-db7ae8f59376";
|
||||||
fsType = "xfs";
|
fsType = "xfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/828E-F3C3";
|
device = "/dev/disk/by-uuid/828E-F3C3";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [
|
||||||
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
@ -115,7 +115,8 @@ stdenv.mkDerivation {
|
|||||||
xorg.libxkbfile
|
xorg.libxkbfile
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = let
|
installPhase =
|
||||||
|
let
|
||||||
viberWrap = writeShellScriptBin "viberWrap" ''
|
viberWrap = writeShellScriptBin "viberWrap" ''
|
||||||
${bubblewrap}/bin/bwrap --bind / / \
|
${bubblewrap}/bin/bwrap --bind / / \
|
||||||
--dev /dev \
|
--dev /dev \
|
||||||
@ -124,7 +125,8 @@ 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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user