47 Commits

Author SHA1 Message Date
64fba754f1 magpie/inventree: add module and configuration 2026-03-23 20:14:14 +01:00
baf1f61196 flake: update 2026-03-23 19:46:32 +01:00
04a4e07a6d fuji/home/zsh: recompile .zcompdump after update 2026-03-23 14:13:34 +01:00
cf565b8949 fuji/home/zsh: recompile .zwc files when updating zsh 2026-03-23 10:48:04 +01:00
166aaaeef4 fuji: disable batteryNotifier daemon 2026-03-21 15:09:24 +01:00
b43732f371 fuji: enable CPU freq above 2GHz on battery power 2026-03-21 15:09:02 +01:00
49f970a0b1 fuji: disable upower daemon for kde 2026-03-21 15:07:23 +01:00
d65210c81b fuji/home_packages: add --nologo to libreoffice bins 2026-03-21 15:06:08 +01:00
1d5c5212c4 home/packages: add distrobox 2026-02-21 13:57:58 +01:00
e2fb00f88d fuji/home/mpv: add webtorrent hook 2026-01-30 20:55:14 +01:00
10f38511bd common/packages: add dmidecode, edid-decode, age, iotop 2026-01-24 09:22:23 +01:00
ed4044abd5 home/fuji/packages: add libcamera-qcam 2026-01-24 09:21:43 +01:00
4ec06a5204 flake/lock: add nixos repo 2026-01-24 09:08:33 +01:00
8255880c6c home/nixy: format 2026-01-24 09:07:40 +01:00
f48ad24919 flake/nixos: add iso image and new host (fuji) 2026-01-24 09:06:27 +01:00
392bce6add home/sway: fix path for lckdo lock files to not appear in ~/ 2026-01-24 09:04:18 +01:00
4356a2c4e4 home/sway: add automatic laptop ad tablet mode for 2in1 devices 2026-01-24 09:03:30 +01:00
aef788b5f1 home/sway: cleanup config 2026-01-24 09:02:22 +01:00
f42159a905 home/i3status-rust: add max frequency to cpu chart 2026-01-24 09:00:39 +01:00
00e8abf3d9 fuji: set max and min frequencies for tlp power modes 2026-01-24 09:00:07 +01:00
38293cf845 fuji: disable xorg 2026-01-24 08:59:47 +01:00
78264922cc fuji: enable plasma 2026-01-24 08:59:35 +01:00
be095c486a fuji: cleanup config 2026-01-24 08:59:05 +01:00
ab1b9d2d12 packages: add alsa-ucm-conf 2026-01-24 08:57:32 +01:00
bf8128dbce home/fuji: add home configuration and pkg list 2026-01-24 08:56:47 +01:00
48b82135ea fuji: add nixos configuration 2026-01-03 21:13:09 +01:00
80b587e7fd nixy: enable etc overlay and nixos-init; set initial user pass 2025-12-02 16:38:31 +01:00
c28eac7e5e magpie: update config for 25.11 2025-12-01 17:44:05 +01:00
94ed73d865 nixy: temp disable nixos-init 2025-12-01 17:28:26 +01:00
5a8b310ac7 home/packages: update pkg names, temp disable jellyfin-media-player 2025-12-01 17:27:23 +01:00
5604d83743 packages: remove nix-xilinx, update package names 2025-12-01 17:26:32 +01:00
e27772c045 nixy/home: update git syntax, update pkg names 2025-12-01 17:24:56 +01:00
59d66d327d nixos: 25.05 -> 25.11 2025-12-01 17:24:06 +01:00
b829904e5d home/zsh: change source to pkgs.oh-my-zsh 2025-12-01 17:19:35 +01:00
2e89da4e3b home/zsh: update pure prompt 2025-12-01 16:47:04 +01:00
86642401b0 home/zsh: fix fast-syntax-higlighting path 2025-12-01 16:22:11 +01:00
9b91a96a73 home/zsh: use new options for zshopt 2025-12-01 16:05:58 +01:00
63597639c9 nixy: update syntax for 25.11, add userborn service 2025-12-01 14:13:13 +01:00
262afbacee meta: format 2025-10-25 19:22:04 +02:00
881080ffd2 nixy/home/mpv: add scripts uosc and autosubsync with keybinds 2025-10-25 19:21:50 +02:00
bc3c1f4a2c home/nixy: add adwaita cursor theme 2025-10-25 19:21:06 +02:00
ce7808f193 mediabox/home_packages: remove peerflix 2025-10-15 17:02:41 +02:00
426203082a blue/home_packages: remove peerflix 2025-10-15 17:02:14 +02:00
b1746a6756 nixy: enable zram swap, switch to linux latest, add user to plugdev group 2025-10-15 17:01:21 +02:00
5796eef05a nixy/home_packages: remove peerflix 2025-10-15 17:00:16 +02:00
a5cf31c5b4 flake: update 2025-09-03 20:40:00 +02:00
a9cf86654f nixy/batteryNotifier: change notification tresholds 2025-09-03 20:39:27 +02:00
26 changed files with 1793 additions and 187 deletions

View File

@@ -1,18 +1,14 @@
{ { pkgs
pkgs, , ...
nix-xilinx,
system,
...
}: }:
{ {
environment.systemPackages = environment.systemPackages =
with pkgs; with pkgs;
[ [
onboard
maliit-keyboard
maliit-framework
wvkbd
acpi acpi
adwaita-icon-theme
age
alsa-ucm-conf
aria2 aria2
binutils binutils
binwalk binwalk
@@ -20,14 +16,16 @@
bluez-tools bluez-tools
btop btop
busybox busybox
curlHTTP3 curl
dfu-util dfu-util
dhcpcd dhcpcd
direnv direnv
dmidecode dmidecode
dmidecode
dnsmasq dnsmasq
dnsutils dnsutils
dtach dtach
edid-decode
ethtool ethtool
f2fs-tools f2fs-tools
fd fd
@@ -36,7 +34,6 @@
fzf fzf
fzy fzy
git git
adwaita-icon-theme
gnomeExtensions.appindicator gnomeExtensions.appindicator
gnupg gnupg
gptfdisk gptfdisk
@@ -44,9 +41,12 @@
hdparm hdparm
htop-vim htop-vim
interception-tools interception-tools
iotop
iw iw
jq jq
lm_sensors lm_sensors
maliit-framework
maliit-keyboard
man-pages man-pages
man-pages-posix man-pages-posix
meson meson
@@ -62,6 +62,7 @@
ntfsprogs ntfsprogs
nvim nvim
nvme-cli nvme-cli
onboard
openhantek6022 openhantek6022
optipng optipng
pax-utils pax-utils
@@ -91,19 +92,14 @@
vulkan-tools vulkan-tools
vulkan-tools-lunarg vulkan-tools-lunarg
vulkan-validation-layers vulkan-validation-layers
wayland-utils
wget wget
wirelesstools wirelesstools
wol wol
wvkbd
xdg-utils xdg-utils
xfsprogs xfsprogs
zip zip
z-lua z-lua
] ];
++ (with nix-xilinx.packages.${system}; [
vivado
vitis
vitis_hls
model_composer
xilinx-shell
]);
} }

80
flake.lock generated
View File

@@ -35,15 +35,15 @@
"flake-compat_2": { "flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1747046372, "lastModified": 1767039857,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "edolstra", "owner": "NixOS",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "edolstra", "owner": "NixOS",
"repo": "flake-compat", "repo": "flake-compat",
"type": "github" "type": "github"
} }
@@ -61,11 +61,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1750779888, "lastModified": 1772665116,
"narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", "narHash": "sha256-XmjUDG/J8Z8lY5DVNVUf5aoZGc400FxcjsNCqHKiKtc=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", "rev": "39f53203a8458c330f61cc0759fe243f0ac0d198",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -103,16 +103,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1753288231, "lastModified": 1772633058,
"narHash": "sha256-WcMW9yUDfER8kz4NdCaaI/ep0Ef91L+Nf7MetNzHZc4=", "narHash": "sha256-SO7JapRy2HPhgmqiLbfnW1kMx5rakPMKZ9z3wtRLQjI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "7b5a978e00273b8676c530c03d315f5b75fae564", "rev": "080657a04188aca25f8a6c70a0fb2ea7e37f1865",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-25.05", "ref": "release-25.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@@ -138,34 +138,34 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"nixpkgs": { "nixos": {
"locked": { "locked": {
"lastModified": 1753345091, "lastModified": 1772598333,
"narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=", "narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9", "rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-25.05", "ref": "nixos-25.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-25_05": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1751741127, "lastModified": 1772598333,
"narHash": "sha256-t75Shs76NgxjZSgvvZZ9qOmz5zuBE8buUaYD28BMTxg=", "narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "29e290002bfff26af1db6f64d070698019460302", "rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"ref": "nixos-25.05", "ref": "nixos-25.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -177,11 +177,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1748077877, "lastModified": 1769036658,
"narHash": "sha256-sxWrjcRygvs7Fz9gxjSm54ul8+NtU29V+PLAPR6ZfY0=", "narHash": "sha256-bia1yOQtC8A7XZRCTdLvY0Bdv4i/V6hMqb0NM/9h/jc=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "b23265403c87af272c74cda484a840b0f22306f5", "rev": "9c1eb1b999522b965ce129043c7112fc9e38c75a",
"revCount": 43, "revCount": 52,
"type": "git", "type": "git",
"url": "https://git.project-cloud.net/asmir/nvim_flake" "url": "https://git.project-cloud.net/asmir/nvim_flake"
}, },
@@ -216,6 +216,7 @@
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-xilinx": "nix-xilinx", "nix-xilinx": "nix-xilinx",
"nixos": "nixos",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nvim": "nvim", "nvim": "nvim",
"project-cloud": "project-cloud", "project-cloud": "project-cloud",
@@ -232,15 +233,14 @@
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"nixpkgs-25_05": "nixpkgs-25_05"
}, },
"locked": { "locked": {
"lastModified": 1753285640, "lastModified": 1772763116,
"narHash": "sha256-ofa021NeHDXAxg5J8mSnn8rHa393PAlD85ZCetP4Qa0=", "narHash": "sha256-5NUtdVWnEflm829QI0BIj2rDhI+pfagt+cxIARJEhi8=",
"owner": "simple-nixos-mailserver", "owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver", "repo": "nixos-mailserver",
"rev": "ce87c8a9771d1a20c3fa3b60113b9b0821627dcb", "rev": "c04152fa90ba5079f4517aa24383245937e43ab8",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -256,11 +256,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1752544651, "lastModified": 1772495394,
"narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=", "narHash": "sha256-hmIvE/slLKEFKNEJz27IZ8BKlAaZDcjIHmkZ7GCEjfw=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "2c8def626f54708a9c38a5861866660395bb3461", "rev": "1d9b98a29a45abe9c4d3174bd36de9f28755e3ff",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -328,11 +328,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737802495, "lastModified": 1764579633,
"narHash": "sha256-Q+bZnH7uQM5T/G+xCGSRU3bTJqD70NeE4vLXLXLCm7k=", "narHash": "sha256-gOD5RMHOB9Fw4T3nk2a95YdU0J24QU3uWUiZVIQza64=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "4962f12867b0b6c4c4d39b98e6016e7f925a802c", "rev": "b0707744e2b4a077e759145cdbfa8d8d1017e732",
"revCount": 23, "revCount": 25,
"type": "git", "type": "git",
"url": "https://git.project-cloud.net/asmir/zremap" "url": "https://git.project-cloud.net/asmir/zremap"
}, },

View File

@@ -2,7 +2,9 @@
description = "NixOS configuration"; description = "NixOS configuration";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixos.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs_unstable.url = "nixpkgs/nixos-unstable";
nix-xilinx = { nix-xilinx = {
url = "gitlab:asmir.abdulahovic/nix-xilinx"; url = "gitlab:asmir.abdulahovic/nix-xilinx";
@@ -30,7 +32,7 @@
}; };
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-25.05"; url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -43,26 +45,32 @@
url = "git+https://git.project-cloud.net/asmir/project-cloud"; url = "git+https://git.project-cloud.net/asmir/project-cloud";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixos-inventree = {
url = "github:Gigahawk/nixos-inventree";
inputs.nixpkgs.follows = "nixpkgs_unstable";
};
}; };
outputs = outputs =
inputs@{ inputs@{ home-manager
home-manager, , nixpkgs
nixpkgs, , nix-xilinx
nix-xilinx, , nvim
nvim, , project-cloud
project-cloud, , simple-nixos-mailserver
simple-nixos-mailserver, , sops-nix
sops-nix, , swaysw
swaysw, , zremap
zremap, , nixos
... , nixos-inventree
, ...
}: }:
let let
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs; pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
in in
{ {
nixosConfigurations = rec { nixosConfigurations = {
nixy = nixpkgs.lib.nixosSystem rec { nixy = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
@@ -85,6 +93,51 @@
]; ];
}; };
fuji = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
{ _module.args = inputs; }
{ _module.args.system = system; }
{ nix.registry.nixpkgs.flake = nixpkgs; }
./common/packages.nix
./common/suspend.nix
./fuji/configuration.nix
./fuji/hardware-configuration.nix
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.akill = import ./home/fuji/home.nix;
home-manager.extraSpecialArgs = { inherit inputs system; };
home-manager.backupFileExtension = "home_backup";
}
];
};
nixy_iso = nixos.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
{ _module.args = inputs; }
{ _module.args.system = system; }
{ nix.registry.nixpkgs.flake = nixpkgs; }
{ isoImage.squashfsCompression = "gzip -Xcompression-level 1"; }
./common/packages.nix
./common/suspend.nix
./nixy/configuration.nix
"${nixos}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix"
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.akill = import ./home/nixy/home.nix;
home-manager.extraSpecialArgs = { inherit inputs system; };
home-manager.backupFileExtension = "home_backup";
}
];
};
mediabox = nixpkgs.lib.nixosSystem rec { mediabox = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
@@ -132,6 +185,7 @@
{ _module.args = inputs; } { _module.args = inputs; }
{ _module.args.system = system; } { _module.args.system = system; }
{ nix.registry.nixpkgs.flake = nixpkgs; } { nix.registry.nixpkgs.flake = nixpkgs; }
nixos-inventree.nixosModules.default
./magpie/configuration.nix ./magpie/configuration.nix
./magpie/hardware-configuration.nix ./magpie/hardware-configuration.nix
simple-nixos-mailserver.nixosModule simple-nixos-mailserver.nixosModule

706
fuji/configuration.nix Normal file
View File

@@ -0,0 +1,706 @@
{ config
, nvim
, pkgs
, system
, zremap
, lib
, ...
}:
let
USER = "akill";
in
{
imports = [ ];
system = {
stateVersion = "23.05";
autoUpgrade.enable = false;
etc.overlay.enable = true;
nixos-init.enable = true;
};
sops = {
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets = {
"peerix/private" = {
sopsFile = ./secrets/peerix.yaml;
mode = "0400";
owner = config.users.users.nobody.name;
group = config.users.users.nobody.group;
};
"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 = {
optimise.automatic = true;
gc.automatic = true;
gc.options = "--delete-older-than 7d";
package = pkgs.nixVersions.latest;
settings = {
sandbox = true;
experimental-features = [
"nix-command"
"flakes"
];
};
};
boot = {
extraModulePackages = with config.boot.kernelPackages; [
usbip
v4l2loopback
];
extraModprobeConfig = ''
options snd_sof ipc_type=1 tplg_path=intel/sof-ipc4-tplg tplg_filename=sof-hda-generic-cavs25-2ch.tplg
'';
blacklistedKernelModules = [ ];
initrd.compressor = "zstd";
initrd.kernelModules = [ ];
initrd.systemd.enable = true;
binfmt.emulatedSystems = [
"wasm32-wasi"
"x86_64-windows"
];
kernelParams = [
"xe.force_probe=a7a0"
"i915.force_probe=!a7a0"
];
kernelPackages = pkgs.linuxPackages_latest;
kernel.sysctl = {
"net.core.default_qdisc" = "fq";
"net.ipv4.tcp_congestion_control" = "bbr";
"kernel.unprivileged_userns_clone" = "1"; /* Needed with harderned kernel */
};
loader.efi.canTouchEfiVariables = true;
loader.systemd-boot = {
editor = false;
enable = true;
memtest86.enable = true;
};
nixStoreMountOpts = [ "ro" ];
supportedFilesystems = [
"xfs"
];
tmp.useTmpfs = true;
};
security = {
rtkit.enable = true;
allowSimultaneousMultithreading = true;
sudo.enable = true;
doas.enable = true;
doas.extraRules = [
{
users = [ USER ];
keepEnv = true;
persist = true;
}
];
};
powerManagement = {
enable = true;
};
networking = {
nftables.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [
80
443
51820
8020
];
};
hostName = "fuji";
nameservers = [
"127.0.0.1"
"::1"
];
dhcpcd.extraConfig = "nohook resolv.conf";
extraHosts = ''
192.168.88.171 jellyfin.mediabox.lan
192.168.88.171 jellyseerr.mediabox.lan
192.168.88.171 mediabox.lan
192.168.88.171 qbittorrent.mediabox.lan
192.168.88.1 router.lan
192.168.88.231 workstation.lan
192.168.88.121 ender.lan
'';
networkmanager = {
enable = true;
dns = "none";
wifi.backend = "iwd";
};
wireless.iwd = {
enable = true;
settings = {
General = {
AddressRandomization = "network";
#EnableNetworkConfiguration = true;
};
};
};
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;
}
];
};
};
};
time.timeZone = "Europe/Sarajevo";
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [
nvim.overlays.${system}.overlay
];
environment = {
systemPackages = with pkgs; [ alsa-ucm-conf maliit-keyboard ];
variables.ALSA_CONFIG_UCM2 = "${pkgs.alsa-ucm-conf}/share/alsa/ucm2";
sessionVariables = {
LIBVA_DRIVER_NAME = "iHD";
KWIN_COMPOSE = "O2ES";
};
etc = {
"firejail/qutebrowser.local".text = ''
whitelist ''${RUNUSER}/qutebrowser
'';
"xdg/autostart/powerdevil.desktop".text = ''
[Desktop Entry]
Hidden=true
'';
};
extraInit = ''
unset -v SSH_ASKPASS
'';
homeBinInPath = true;
variables = {
PATH = "$HOME/.cargo/bin";
};
};
programs = {
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = false;
localNetworkGameTransfers.openFirewall = true;
};
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
appimage = {
enable = true;
binfmt = true;
};
nix-ld = {
enable = false;
libraries = with pkgs; [
stdenv.cc.cc.lib
zlib
];
};
zsh.enable = true;
firejail.enable = true;
adb.enable = true;
wireshark.enable = true;
sway.enable = true;
};
documentation.dev.enable = true;
systemd = {
#sysusers.enable = true;
services = {
# Fix issue where systemd-vconsole-setup failes to find keymap
systemd-vconsole-setup = {
unitConfig = {
After = "local-fs.target";
};
};
"zremap@" = {
enable = true;
restartIfChanged = true;
serviceConfig.Nice = -20;
unitConfig = {
Description = "zremap on %I";
ConditionPathExists = "%I";
};
serviceConfig = {
Type = "simple";
ExecStart = "${zremap.defaultPackage.${system}}/bin/zremap %I";
};
};
"netns@" = {
description = "%I network namespace";
before = [ "network.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.iproute2}/bin/ip netns add %I";
ExecStop = "${pkgs.iproute2}/bin/ip netns del %I";
};
};
"wg_proton" = {
description = "wg network interface";
bindsTo = [ "netns@wg.service" ];
requires = [ "network-online.target" ];
wants = [ "dnscrypt-proxy_proton.service" ];
after = [ "netns@wg.service" ];
before = [ "dnscrypt-proxy_proton.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = pkgs.writers.writeBash "wg-up" ''
set -e
ENDPOINT_IP=$(${pkgs.coreutils-full}/bin/cat "${config.sops.secrets."wg_endpoint_proton".path}")
${pkgs.iproute2}/bin/ip link add proton_wg type wireguard
${pkgs.iproute2}/bin/ip link set proton_wg netns wg
${pkgs.iproute2}/bin/ip -n wg address add 10.2.0.2/32 dev proton_wg
${pkgs.iproute2}/bin/ip netns exec wg \
${pkgs.wireguard-tools}/bin/wg set "proton_wg" private-key "${
config.sops.secrets."wg_privkey_proton".path
}"
${pkgs.iproute2}/bin/ip netns exec wg \
${pkgs.wireguard-tools}/bin/wg set "proton_wg" peer "g6DkXWKI/68RsLjROIwCEcyB/ZhyK5Q7OWcz1TtqER0=" \
endpoint "$ENDPOINT_IP:51820" \
persistent-keepalive "25" \
allowed-ips "0.0.0.0/0"
${pkgs.iproute2}/bin/ip -n wg link set lo up
${pkgs.iproute2}/bin/ip -n wg link set proton_wg up
${pkgs.iproute2}/bin/ip -n wg route add default dev proton_wg
'';
ExecStop = pkgs.writers.writeBash "wg-down" ''
${pkgs.iproute2}/bin/ip -n wg route del default dev proton_wg
${pkgs.iproute2}/bin/ip -n wg link del proton_wg
'';
};
};
"dnscrypt-proxy_proton" = {
description = "DNSCrypt-proxy client proton";
wants = [
"network-online.target"
"nss-lookup.target"
];
before = [ "nss-lookup.target" ];
after = [ "wg_proton.service" ];
partOf = [ "wg_proton.service" ];
serviceConfig = {
AmbientCapabilities = "CAP_NET_BIND_SERVICE";
CacheDirectory = "dnscrypt-proxy";
DynamicUser = true;
ExecStart = "${pkgs.dnscrypt-proxy}/bin/dnscrypt-proxy -config ${config.services.dnscrypt-proxy.configFile}";
LockPersonality = true;
LogsDirectory = "dnscrypt-proxy";
MemoryDenyWriteExecute = true;
NetworkNamespacePath = "/var/run/netns/wg";
NonBlocking = true;
NoNewPrivileges = true;
PrivateDevices = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectSystem = "strict";
Restart = "always";
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
];
RestrictNamespaces = true;
RestrictRealtime = true;
RuntimeDirectory = "dnscrypt-proxy";
StateDirectory = "dnscrypt-proxy";
SystemCallArchitectures = "native";
SystemCallFilter = [
"@system-service"
"@chown"
"~@aio"
"~@keyring"
"~@memlock"
"~@setuid"
"~@timer"
];
};
};
};
coredump.enable = false;
settings.Manager = {
DefaultTimeoutStartSec = "30s";
DefaultTimeoutStopSec = "30s";
};
};
services = {
acpid.enable = true;
dbus.enable = true;
dbus.implementation = "broker";
envfs.enable = true;
fstrim.enable = true;
fwupd.enable = true;
ntp.enable = true;
openssh.enable = true;
power-profiles-daemon.enable = false;
printing.enable = true;
userborn.enable = true;
upower.enable = lib.mkForce false;
greetd = {
enable = true;
settings = {
default_session = {
command = ''
${pkgs.tuigreet}/bin/tuigreet \
--time \
--remember \
--remember-session \
--greeting 'Welcome to NixOS' \
--cmd sway
'';
user = "greeter";
};
};
};
logind = {
powerKey = "suspend";
};
desktopManager = {
plasma6.enable = true;
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
libinput.enable = true;
xserver = {
enable = false;
dpi = 144;
desktopManager.xterm.enable = false;
displayManager = {
lightdm.enable = false;
startx.enable = true;
};
windowManager.i3.enable = false;
};
udev = {
packages = [
pkgs.openhantek6022
pkgs.openocd
];
extraRules = ''
#Xilinx FTDI
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Xilinx", MODE:="666"
#Xilinx Digilent
ATTR{idVendor}=="1443", MODE:="666"
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Digilent", MODE:="666"
#Arduino UNO r4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666"
#zremap on new keyboard
ACTION=="add", SUBSYSTEM=="input", ATTRS{phys}!="", KERNEL=="event[0-9]*", ENV{ID_INPUT_KEY}=="1", ENV{ID_INPUT_KEYBOARD}=="1", TAG+="systemd", ENV{SYSTEMD_WANTS}+="zremap@$env{DEVNAME}.service"
'';
};
tlp = {
enable = true;
settings = {
START_CHARGE_THRESH_BAT0 = 70;
STOP_CHARGE_THRESH_BAT0 = 94;
#CPU_SCALING_GOVERNOR_ON_AC = "performance";
#CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
# For your Fujitsu U9313X - Intel 13th gen
#CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_performance";
CPU_SCALING_MAX_FREQ_ON_AC = 4700000;
CPU_SCALING_MIN_FREQ_ON_AC = 400000;
CPU_SCALING_MIN_FREQ_ON_BAT = 400000;
CPU_SCALING_MAX_FREQ_ON_BAT = 3200000;
CPU_BOOST_ON_BAT = 1;
CPU_BOOST_ON_AC = 1;
};
};
batteryNotifier = {
enable = false;
notifyCapacity = 12;
suspendCapacity = 5;
};
actkbd = {
enable = true;
bindings = [
{
keys = [ 115 ];
events = [ "key" ];
command = "XDG_RUNTIME_DIR=/run/user/$(id -u ${USER}) ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
}
{
keys = [ 114 ];
events = [
"key"
"rep"
];
command = "XDG_RUNTIME_DIR=/run/user/$(id -u ${USER}) ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
}
{
keys = [ 113 ];
events = [
"key"
"rep"
];
command = "XDG_RUNTIME_DIR=/run/user/$(id -u ${USER}) ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
}
{
keys = [ 224 ];
events = [ "key" ];
command = "${pkgs.light}/bin/light -U 5";
}
{
keys = [ 225 ];
events = [ "key" ];
command = "${pkgs.light}/bin/light -A 5";
}
];
};
dnscrypt-proxy = {
enable = true;
settings = {
ipv6_servers = true;
require_dnssec = true;
require_nolog = true;
require_nofilter = true;
http3 = true;
sources.public-resolvers = {
urls = [
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
];
cache_file = "/var/lib/dnscrypt-proxy/public-resolvers.md";
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
};
};
};
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 = {
enable = false;
secretKeyFile = "/var/cache-priv-key.pem";
};
journald.extraConfig = ''
SystemMaxUse=50M
'';
logind.settings.Login = {
KillUserProcesses = true;
};
};
fonts = {
fontconfig = {
cache32Bit = true;
allowBitmaps = true;
useEmbeddedBitmaps = true;
defaultFonts = {
monospace = [ "JetBrainsMono" ];
};
};
packages = with pkgs; [
dejavu_fonts
dina-font
fira-code
fira-code-symbols
font-awesome_6
inconsolata
iosevka
jetbrains-mono
liberation_ttf
libertine
noto-fonts
noto-fonts-cjk-sans
noto-fonts-color-emoji
proggyfonts
siji
terminus_font
terminus_font_ttf
ubuntu-classic
vista-fonts
];
};
virtualisation = {
waydroid.enable = false;
libvirtd = {
enable = true;
allowedBridges = [
"virbr0"
"br0"
];
};
spiceUSBRedirection.enable = true;
containers.storage.settings = {
storage = {
graphroot = "/var/lib/containers/storage";
runroot = "/run/containers/storage";
};
};
podman = {
enable = true;
autoPrune.enable = true;
dockerCompat = true;
};
};
hardware = {
bluetooth = {
enable = true;
settings = {
General = {
Experimental = true;
Enable = "Source,Sink,Media,Socket";
};
};
};
graphics = {
enable = true;
extraPackages = with pkgs; [ intel-media-driver ];
};
rtl-sdr.enable = true;
firmware = [ pkgs.sof-firmware ];
sensor.iio.enable = true;
};
zramSwap = {
enable = true;
algorithm = "zstd";
};
users.users.${USER} = {
isNormalUser = true;
initialHashedPassword = "$y$j9T$FZnEcCEMIC0Fjj4dZi5t8.$D8ygvO19dR5nyTZxWwDgjEimHutD.sKnD1DLAyhU8.B";
shell = pkgs.zsh;
extraGroups = [
"adbusers"
"audio"
"dialout"
"input"
"kvm"
"plugdev"
"sound"
"tty"
"wheel"
"wireshark"
];
};
}

View File

@@ -0,0 +1,45 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "thunderbolt" "nvme" "uas" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/8a06d0e9-d765-49e8-a729-4d84c2638d56";
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" "fujitsu_laptop" "xe" "snd_soc_sof_sdw" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/mapper/fuji_lvm_root-root";
fsType = "xfs";
};
fileSystems."/home" =
{
device = "/dev/mapper/fuji_lvm_root-home";
fsType = "xfs";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/83F9-733B";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.sensor.iio.enable = lib.mkDefault true;
hardware.enableRedistributableFirmware = true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

1
fuji/peerix-public Normal file
View File

@@ -0,0 +1 @@
peerix-nixy:8THqS0R2zWF/47ai0RFmqJnieYTZ1jaWOD9tnzpvA6s=

View File

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

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

22
fuji/secrets/peerix.yaml Normal file
View File

@@ -0,0 +1,22 @@
peerix:
private: ENC[AES256_GCM,data:Oi8H5nqJ0Bf45wQepCjdZNHBOv4AlPxNN7L5Th3gcRQlW1FS77nusIWGSUvlmL2a5LTN0FV36o2GFPrrhiwmvnkQwuSZKc9VeDTf7SX0RRL1NLmRR/zy4WsRNJFxlqtjahieqg==,iv:6hJwqcdPayZaYZhJ0OfYLAtmeVndLEfeYZjUq5/3qJE=,tag:MiAfg8aZAHNYbB0JwcdStg==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBSMEIyck1xbVJ4Zm56Z3dM
OGsxa1p0TGIvRE5DYXZzTDM3YUZFVTAxbUUwCllPd0FOUlRiZW5wT2QvLzZXYjRr
S1A5WjZxLzNYQ1ZWVFFQTzRwMFQweFEKLS0tIHNoZUpHS2dDNmFKc3ZVNFZuUFU4
L0M0MitMeDg1ZWYxcDNCQlVGUjRKeFkKvD2SKnuh517o2knPr2SOWq3kubMyI7UV
j6HgXVbHUDjmKl2dY+YVTnmxrK54E+Q6iiu7mQnvLdzxYBK/EiNt9w==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-21T08:17:51Z"
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]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

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

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

@@ -0,0 +1,22 @@
wg_privkey_proton: ENC[AES256_GCM,data:qVVd+1s2T3sKDi03V+eMvgqW8LAVl/yEKwtG2EMn8NhBCN7RvlttC5SeIDM=,iv:/QcrtmMjCzZRulumIz5u9oxyaRt+HUq96ZiP8ecpvAo=,tag:1DCaJqVGfg3sfvKTQnmzZA==,type:str]
wg_endpoint_proton: ENC[AES256_GCM,data:ggoWnB6nGjGc/kSOaCo=,iv:1r5J6SO5JYH7+bMhE2lGwfFETVFeS61eCXtej0Pl07M=,tag:p+0hhQ/vqZzZML24YReA0g==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxdXZpL1lrOEYyYVdFTzNJ
SHhXRVc5Y0o4ZzN2THRjM215UWczVjZOTXg4CjBJZ2VxN0t0ZFgzTmJMeXo5SWZk
UjRlNmdRTVVPbHVEeXM3TWhoS0pSUTQKLS0tIEtkTURBc1A3d2lTalhmeEoxUkZj
K3BHZnUzN3ZrL1dFQk8rWFpZR05pbFUKObrnIpY3NR1o3/lKhTfVpQU+eQRTi7wF
SAjGZ5BRdCi5x1VWRxiT1Fvjqkm7kBEQFvdSvbqW2UK6lVHtWgt2Vg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-05-12T13:30:18Z"
mac: ENC[AES256_GCM,data:3UqJGcNGPZDlLA3a0uNHUI0ykDC0ByxAR2ZsrsbWQMv3BS6zyBuc+zpTHQZoIPGsAMUetuB3OuA0IQNll3abg6u2AadEQBUf1PYMWlo58txLYlAs/q0g+575F+LhDSgmDMKOFXz4HqbFP0RYTHkPnmjWPMWWY3G9o6B3Iaw5+Kc=,iv:massJRpGcH4pDZxJrpQYy80XVViyw+qFsZ8Sk9Xze08=,tag:eDvuNadKGKBS/3jauvnuFQ==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

1
fuji/ssh_pubkey Normal file
View File

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

1
fuji/wg_pubkey Normal file
View File

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

1
fuji/wg_pubkey_nx Normal file
View File

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

View File

@@ -110,7 +110,6 @@ in
nix-init nix-init
nixpkgs-fmt nixpkgs-fmt
nix-prefetch-git nix-prefetch-git
nodePackages.peerflix
nom nom
openems openems
openocd openocd

View File

@@ -89,7 +89,7 @@ in
{ {
block = "cpu"; block = "cpu";
interval = 1; interval = 1;
format = "$utilization $barchart $frequency"; format = "$utilization $barchart $frequency $max_frequency";
} }
{ {
block = "temperature"; block = "temperature";

View File

@@ -1,9 +1,8 @@
{ { pkgs
pkgs, , inputs
inputs, , system
system, , lib
lib, , ...
...
}: }:
let let
cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" '' cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" ''
@@ -16,6 +15,15 @@ let
GEOM="$(${lib.getExe pkgs.slurp} -d)" GEOM="$(${lib.getExe pkgs.slurp} -d)"
${lib.getExe pkgs.grim} -g "$GEOM" - | ${pkgs.wl-clipboard}/bin/wl-copy ${lib.getExe pkgs.grim} -g "$GEOM" - | ${pkgs.wl-clipboard}/bin/wl-copy
''; '';
switch_laptop_mode = pkgs.writeShellScriptBin "switch_laptop_mode" ''
${pkgs.procps}/bin/pkill rot8 && \
${pkgs.sway}/bin/swaymsg output eDP-1 transform 0
'';
switch_tablet_mode = pkgs.writeShellScriptBin "switch_tablet_mode" ''
${lib.getExe pkgs.rot8} \
--invert-y \
--hooks ''\'systemctl --user restart lisgd.service''\'
'';
swaysw = inputs.swaysw.packages.${system}.swaysw; swaysw = inputs.swaysw.packages.${system}.swaysw;
term = "${pkgs.foot}/bin/footclient"; term = "${pkgs.foot}/bin/footclient";
in in
@@ -25,6 +33,11 @@ in
extraSessionCommands = ""; extraSessionCommands = "";
extraConfigEarly = ''''; extraConfigEarly = '''';
extraConfig = ''
bindswitch tablet:on exec ${switch_tablet_mode}/bin/switch_tablet_mode
bindswitch tablet:off exec ${switch_laptop_mode}/bin/switch_laptop_mode
'';
config = { config = {
fonts = { fonts = {
names = [ "JetBrainsMono" ]; names = [ "JetBrainsMono" ];
@@ -98,8 +111,8 @@ in
"Alt+Shift+q" = "kill"; "Alt+Shift+q" = "kill";
"Alt+Shift+Return" = "exec ${term}"; "Alt+Shift+Return" = "exec ${term}";
"Alt+p" = "exec ${pkgs.bemenu}/bin/bemenu-run"; "Alt+p" = "exec ${pkgs.bemenu}/bin/bemenu-run";
"Alt+c" = "exec ${pkgs.moreutils}/bin/lckdo cliphist_sway ${cliphist_sway}/bin/cliphist_sway"; "Alt+c" = "exec ${pkgs.moreutils}/bin/lckdo /tmp/.cliphist_sway.lck ${cliphist_sway}/bin/cliphist_sway";
"Print" = "exec ${pkgs.moreutils}/bin/lckdo screenshot_clip ${screenshot_clip}/bin/screenshot_clip"; "Print" = "exec ${pkgs.moreutils}/bin/lckdo /tmp/.screenshot_clip.lck ${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";
@@ -134,7 +147,7 @@ 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 ${pkgs.moreutils}/bin/lckdo /tmp/.swaysw.lck ${swaysw}/bin/swaysw";
"Alt+Escape" = "workspace back_and_forth"; "Alt+Escape" = "workspace back_and_forth";
"Alt+f" = "fullscreen enable"; "Alt+f" = "fullscreen enable";
"Alt+bracketright" = "focus output right"; "Alt+bracketright" = "focus output right";

View File

@@ -1,5 +1,10 @@
{ pkgs, lib, ... }: { pkgs, lib, config, ... }:
{ {
home.sessionVariables = {
/*ZDOTDIR = "\"$HOME/\".config/zsh";*/
/*HISTFILE = "\"$XDG_STATE_HOME\"/zsh/history";*/
};
programs.z-lua = { programs.z-lua = {
enableAliases = true; enableAliases = true;
enableZshIntegration = true; enableZshIntegration = true;
@@ -9,6 +14,16 @@
autocd = true; autocd = true;
enableCompletion = false; enableCompletion = false;
defaultKeymap = "viins"; defaultKeymap = "viins";
/* dotDir = "\"$XDG_CONFIG_HOME\"/zsh"; */
setOptions = [
"c_bases"
"completealiases"
"completeinword"
"nobeep"
"nopromptcr"
"notify"
];
shellAliases = { shellAliases = {
cfind = "${pkgs.cscope}/bin/cscope -C -R -L1"; cfind = "${pkgs.cscope}/bin/cscope -C -R -L1";
@@ -43,8 +58,8 @@
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "sindresorhus"; owner = "sindresorhus";
repo = "pure"; repo = "pure";
rev = "92b8e9057988566b37ff695e70e2e9bbeb7196c8"; rev = "54bd501c802283dee0940457da6eb3e642bd1453";
hash = "sha256-TbOrnhLHgOvcfsgmL0l3bWY33yLIhG1KSi4ITIPq1+A="; hash = "sha256-AZSxP2g6BWoxyiSQH7yzbbbfGcwD8jgnXPPfcYwJUL0=";
}; };
file = "pure.plugin.zsh"; file = "pure.plugin.zsh";
} }
@@ -55,18 +70,13 @@
} }
{ {
name = "zsh-sudo"; name = "zsh-sudo";
src = pkgs.fetchFromGitHub { src = pkgs.oh-my-zsh;
owner = "hcgraf"; file = "share/oh-my-zsh/plugins/sudo/sudo.plugin.zsh";
repo = "zsh-sudo";
rev = "d8084def6bb1bde2482e7aa636743f40c69d9b32";
sha256 = "1dpm51w3wjxil8sxqw4qxim5kmf6afmkwz1yfhldpdlqm7rfwpi3";
};
file = "sudo.plugin.zsh";
} }
{ {
name = "zsh-fast-syntax-highlighting"; name = "zsh-fast-syntax-highlighting";
src = pkgs.zsh-fast-syntax-highlighting; src = pkgs.zsh-fast-syntax-highlighting;
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh"; file = "share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh";
} }
]; ];
@@ -76,18 +86,8 @@
# binds # binds
bindkey '^K' fzf-file-widget bindkey '^K' fzf-file-widget
# options
setopt nobeep
setopt nopromptcr
setopt c_bases
setopt completeinword
setopt completealiases
setopt notify
#
RPS1="" RPS1=""
#
function chpwd() { function chpwd() {
ls; ls;
} }
@@ -115,6 +115,21 @@
if [[ -n "$BUBBLEWRAP_DIR" ]]; then if [[ -n "$BUBBLEWRAP_DIR" ]]; then
RPS1="{{$BUBBLEWRAP_DIR}}" RPS1="{{$BUBBLEWRAP_DIR}}"
fi fi
# Recompile .zcompdump if stale
if [[ -f ~/.zcompdump && ( ! -f ~/.zcompdump.zwc || ~/.zcompdump -nt ~/.zcompdump.zwc ) ]]; then
zcompile ~/.zcompdump
fi
''; '';
}; };
home.activation.zshRecompile = lib.mkIf config.programs.zsh.enable (
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
for f in "$HOME/.zshrc" "$HOME/.zshenv" "$HOME/.zprofile" "$HOME/.zlogin"; do
if [[ -f "$f" ]]; then
${pkgs.zsh}/bin/zsh -c "zcompile $f" 2>/dev/null || true
fi
done
''
);
} }

377
home/fuji/home.nix Normal file
View File

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

206
home/fuji/home_packages.nix Normal file
View File

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

View File

@@ -26,7 +26,6 @@ in
libva-utils libva-utils
nixpkgs-fmt nixpkgs-fmt
nix-prefetch-git nix-prefetch-git
nodePackages.peerflix
pandoc pandoc
paraview paraview
pass-wayland pass-wayland

View File

@@ -1,7 +1,6 @@
{ { lib
lib, , pkgs
pkgs, , ...
...
}: }:
let let
qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" '' qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" ''
@@ -50,6 +49,12 @@ in
WLR_RENDERER = "vulkan"; WLR_RENDERER = "vulkan";
}; };
home.pointerCursor = {
package = pkgs.adwaita-icon-theme;
name = "Adwaita";
size = 38;
};
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
}; };
@@ -59,7 +64,6 @@ in
librewolf = { librewolf = {
enable = true; enable = true;
package = pkgs.librewolf-wayland;
settings = { settings = {
"webgl.disable" = true; "webgl.disable" = true;
"middlemouse.paste" = false; "middlemouse.paste" = false;
@@ -80,19 +84,25 @@ in
mpv = { mpv = {
enable = true; enable = true;
scripts = [
pkgs.mpvScripts.uosc
pkgs.mpvScripts.autosubsync-mpv
];
config = { config = {
osc = "no";
osd-bar = "no";
border = "no";
slang = "eng,en"; slang = "eng,en";
alang = "eng,en"; alang = "eng,en";
hwdec = "auto"; hwdec = "auto";
vo = "gpu-next"; vo = "gpu-next";
ao = "pipewire"; ao = "pipewire";
osd-bar = "no";
border = "no";
script-opts-set = "";
ytdl-format = "bestvideo[height<=?1080]+bestaudio/best"; ytdl-format = "bestvideo[height<=?1080]+bestaudio/best";
}; };
bindings = { bindings = {
"s" = "script-binding uosc/subtitles";
"a" = "script-binding uosc/audio";
WHEEL_UP = "ignore"; WHEEL_UP = "ignore";
WHEEL_DOWN = "ignore"; WHEEL_DOWN = "ignore";
WHEEL_LEFT = "ignore"; WHEEL_LEFT = "ignore";
@@ -197,9 +207,11 @@ in
git = { git = {
enable = true; enable = true;
userName = "Asmir A"; settings = {
userEmail = "asmir.abdulahovic@gmail.com"; user = {
extraConfig = { name = "Asmir A";
email = "asmir.abdulahovic@gmail.com";
};
init.defaultBranch = "master"; init.defaultBranch = "master";
pull = { pull = {
rebase = true; rebase = true;

View File

@@ -67,7 +67,7 @@ in
compsize compsize
kdePackages.ark kdePackages.ark
ungoogled-chromium ungoogled-chromium
# cura cura-appimage
deluge deluge
dfu-util dfu-util
discord discord
@@ -91,7 +91,7 @@ in
imagemagick imagemagick
imv imv
inkscape inkscape
jellyfin-media-player #jellyfin-media-player
kdePackages.kdenlive kdePackages.kdenlive
kicad kicad
kodi-wayland kodi-wayland
@@ -99,7 +99,7 @@ in
libnotify libnotify
libreoffice-qt6-fresh libreoffice-qt6-fresh
libva-utils libva-utils
linuxPackages_latest.perf perf
lsix lsix
lsix lsix
mediainfo mediainfo
@@ -110,19 +110,18 @@ in
nix-init nix-init
nixpkgs-fmt nixpkgs-fmt
nix-prefetch-git nix-prefetch-git
nodePackages.peerflix
nom nom
openems openems
openocd openocd
openscad openscad
pandoc pandoc
paraview #paraview
pass-wayland pass-wayland
patchelf patchelf
pavucontrol pavucontrol
pay-respects pay-respects
pirate-get pirate-get
poppler_utils poppler-utils
powertop powertop
pulsemixer pulsemixer
pwvucontrol pwvucontrol
@@ -131,7 +130,7 @@ in
qucs-s qucs-s
radeontop radeontop
remmina remmina
river river-classic
rizin rizin
rtorrent rtorrent
sbcl sbcl
@@ -154,7 +153,7 @@ in
waybar waybar
wdisplays wdisplays
weechat weechat
whatsapp-for-linux wasistlos
wine wine
wireshark wireshark
wl-clipboard wl-clipboard

View File

@@ -14,10 +14,6 @@
"nix-command" "nix-command"
"flakes" "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;
@@ -113,7 +109,7 @@
}; };
services.journald.extraConfig = ''SystemMaxUse=50M ''; services.journald.extraConfig = ''SystemMaxUse=50M '';
services.logind.extraConfig = ''KillUserProcesses=yes ''; services.logind.settings.Login = { KillUserProcesses = true; };
services.openssh.settings.PermitRootLogin = "prohibit-password"; services.openssh.settings.PermitRootLogin = "prohibit-password";
services.openssh.enable = true; services.openssh.enable = true;
services.openssh.listenAddresses = [ services.openssh.listenAddresses = [
@@ -177,7 +173,6 @@
services.nginx = { services.nginx = {
enable = true; enable = true;
package = pkgs.nginxQuic;
recommendedGzipSettings = true; recommendedGzipSettings = true;
recommendedOptimisation = true; recommendedOptimisation = true;
recommendedProxySettings = true; recommendedProxySettings = true;
@@ -229,6 +224,23 @@
proxyPass = "http://localhost:8002/"; proxyPass = "http://localhost:8002/";
}; };
}; };
virtualHosts."inventree.project-cloud.net" = {
quic = true;
http3 = true;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:8004";
proxyWebsockets = true;
};
locations."/static/" = {
alias = "/var/lib/inventree/static/";
};
locations."/media/" = {
alias = "/var/lib/inventree/media/";
};
};
}; };
services.gitea = { services.gitea = {
@@ -301,10 +313,66 @@
startAt = "daily"; startAt = "daily";
}; };
services.seafile = { services.inventree = {
enable = false; enable = true;
initialAdminPassword = "admin";
adminEmail = "asmir.abdulahovic" + "@" + "gmail.com"; # IP and port for gunicorn to bind to
bindIp = "127.0.0.1";
bindPort = 8004;
# Or override the full bind string for e.g. unix sockets:
# serverBind = "unix:/run/inventree/inventree.sock";
# Where InvenTree stores its data (default: /var/lib/inventree)
dataDir = "/var/lib/inventree";
# Systemd timeout for migrations (can be slow on upgrades)
serverStartTimeout = "10min";
serverStopTimeout = "5min";
# config.yaml options — freeform, so any key from
# https://docs.inventree.org/en/stable/start/config/ works here
config = {
site_url = "https://inventree.project-cloud.net";
allowed_hosts = [ "*" ];
# Database — defaults to SQLite if not specified
database = {
ENGINE = "django.db.backends.postgresql";
NAME = "inventree";
USER = "inventree";
HOST = "/run/postgresql"; # peer auth via unix socket
PORT = "";
};
# Static/media/backup paths
static_root = "/var/lib/inventree/static";
media_root = "/var/lib/inventree/media";
backup_dir = "/var/lib/inventree/backup";
};
plugins = {
inventree-kicad-plugin = [];
};
# Declarative user management
users = {
admin = {
email = "asmir@project-cloud.net";
is_superuser = true;
password_file = "/tmp/inventree-admin-password";
};
};
};
# If using PostgreSQL:
services.postgresql = {
enable = true;
ensureDatabases = [ "inventree" ];
ensureUsers = [{
name = "inventree";
ensureDBOwnership = true;
}];
}; };
# needed for sendmail mail functionality # needed for sendmail mail functionality

View File

@@ -1,5 +1,4 @@
{ config { config
, nix-xilinx
, nvim , nvim
, pkgs , pkgs
, system , system
@@ -12,11 +11,11 @@ in
{ {
imports = [ ]; imports = [ ];
system.stateVersion = "23.05"; system = {
system.autoUpgrade.enable = false; stateVersion = "23.05";
system.switch = { autoUpgrade.enable = false;
enable = true; etc.overlay.enable = true;
enableNg = true; nixos-init.enable = true;
}; };
sops = { sops = {
@@ -89,7 +88,7 @@ in
"amdgpu.sg_display=0" "amdgpu.sg_display=0"
"amdgpu.gttsize=2048" "amdgpu.gttsize=2048"
]; ];
kernelPackages = pkgs.linuxPackages_hardened; kernelPackages = pkgs.linuxPackages_latest;
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";
@@ -101,7 +100,7 @@ in
enable = true; enable = true;
memtest86.enable = true; memtest86.enable = true;
}; };
readOnlyNixStore = true; nixStoreMountOpts = [ "ro" ];
supportedFilesystems = [ supportedFilesystems = [
"xfs" "xfs"
]; ];
@@ -205,7 +204,6 @@ in
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ nixpkgs.overlays = [
nix-xilinx.overlay
nvim.overlays.${system}.overlay nvim.overlays.${system}.overlay
]; ];
environment = { environment = {
@@ -256,8 +254,8 @@ in
# List services that you want to enable: # List services that you want to enable:
systemd = { systemd = {
#sysusers.enable = true;
services = { services = {
# Fix issue where systemd-vconsole-setup failes to find keymap # Fix issue where systemd-vconsole-setup failes to find keymap
systemd-vconsole-setup = { systemd-vconsole-setup = {
unitConfig = { unitConfig = {
@@ -294,9 +292,9 @@ in
description = "wg network interface"; description = "wg network interface";
bindsTo = [ "netns@wg.service" ]; bindsTo = [ "netns@wg.service" ];
requires = [ "network-online.target" ]; requires = [ "network-online.target" ];
wants = [ "dnscrypt-proxy2_proton.service" ]; wants = [ "dnscrypt-proxy_proton.service" ];
after = [ "netns@wg.service" ]; after = [ "netns@wg.service" ];
before = [ "dnscrypt-proxy2_proton.service" ]; before = [ "dnscrypt-proxy_proton.service" ];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
RemainAfterExit = true; RemainAfterExit = true;
@@ -326,7 +324,7 @@ in
}; };
}; };
"dnscrypt-proxy2_proton" = { "dnscrypt-proxy_proton" = {
description = "DNSCrypt-proxy client proton"; description = "DNSCrypt-proxy client proton";
wants = [ wants = [
"network-online.target" "network-online.target"
@@ -339,7 +337,7 @@ in
AmbientCapabilities = "CAP_NET_BIND_SERVICE"; AmbientCapabilities = "CAP_NET_BIND_SERVICE";
CacheDirectory = "dnscrypt-proxy"; CacheDirectory = "dnscrypt-proxy";
DynamicUser = true; DynamicUser = true;
ExecStart = "${pkgs.dnscrypt-proxy}/bin/dnscrypt-proxy -config ${config.services.dnscrypt-proxy2.configFile}"; ExecStart = "${pkgs.dnscrypt-proxy}/bin/dnscrypt-proxy -config ${config.services.dnscrypt-proxy.configFile}";
LockPersonality = true; LockPersonality = true;
LogsDirectory = "dnscrypt-proxy"; LogsDirectory = "dnscrypt-proxy";
MemoryDenyWriteExecute = true; MemoryDenyWriteExecute = true;
@@ -379,10 +377,10 @@ in
}; };
coredump.enable = false; coredump.enable = false;
extraConfig = '' settings.Manager = {
DefaultTimeoutStartSec=30s DefaultTimeoutStartSec = "30s";
DefaultTimeoutStopSec=30s DefaultTimeoutStopSec = "30s";
''; };
}; };
services = { services = {
@@ -395,6 +393,7 @@ in
ntp.enable = true; ntp.enable = true;
openssh.enable = true; openssh.enable = true;
printing.enable = true; printing.enable = true;
userborn.enable = true;
pipewire = { pipewire = {
enable = true; enable = true;
@@ -452,8 +451,8 @@ in
batteryNotifier = { batteryNotifier = {
enable = true; enable = true;
notifyCapacity = 20; notifyCapacity = 12;
suspendCapacity = 10; suspendCapacity = 5;
}; };
actkbd = { actkbd = {
@@ -497,7 +496,7 @@ in
]; ];
}; };
dnscrypt-proxy2 = { dnscrypt-proxy = {
enable = true; enable = true;
settings = { settings = {
ipv6_servers = true; ipv6_servers = true;
@@ -556,26 +555,10 @@ in
SystemMaxUse=50M SystemMaxUse=50M
''; '';
logind.extraConfig = '' logind.settings.Login = {
KillUserProcesses=yes KillUserProcesses = true;
''; };
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 = {
@@ -602,13 +585,12 @@ in
noto-fonts noto-fonts
noto-fonts-cjk-sans noto-fonts-cjk-sans
noto-fonts-color-emoji noto-fonts-color-emoji
noto-fonts-emoji
proggyfonts proggyfonts
siji siji
terminus_font terminus_font
terminus_font_ttf terminus_font_ttf
ubuntu_font_family ubuntu-classic
vistafonts vista-fonts
]; ];
}; };
@@ -640,6 +622,7 @@ in
enable = true; enable = true;
settings = { settings = {
General = { General = {
Experimental = true;
Enable = "Source,Sink,Media,Socket"; Enable = "Source,Sink,Media,Socket";
}; };
}; };
@@ -653,22 +636,24 @@ in
}; };
zramSwap = { zramSwap = {
enable = false; enable = true;
algorithm = "zstd"; algorithm = "zstd";
}; };
users.users.${USER} = { users.users.${USER} = {
isNormalUser = true; isNormalUser = true;
initialHashedPassword = "$y$j9T$XGffGsmN/u.wO5wZ.cBml/$9iCw3eWY0GSUH/aA8ESCAxKeTCAMqY21XQF7b5ujxD6";
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = [ extraGroups = [
"wireshark"
"kvm"
"tty"
"audio"
"sound"
"adbusers" "adbusers"
"audio"
"dialout" "dialout"
"kvm"
"plugdev"
"sound"
"tty"
"wheel" "wheel"
"wireshark"
]; ];
}; };
} }