Compare commits

..

10 Commits

9 changed files with 158 additions and 79 deletions

115
flake.lock generated
View File

@@ -37,13 +37,13 @@
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "edolstra",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "edolstra",
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
@@ -61,11 +61,11 @@
]
},
"locked": {
"lastModified": 1772893680,
"narHash": "sha256-JDqZMgxUTCq85ObSaFw0HhE+lvdOre1lx9iI6vYyOEs=",
"lastModified": 1778507602,
"narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "8baab586afc9c9b57645a734c820e4ac0a604af9",
"rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a",
"type": "github"
},
"original": {
@@ -103,16 +103,16 @@
]
},
"locked": {
"lastModified": 1777851538,
"narHash": "sha256-Gp8qwTEYNoy2yvmErVGlvLOQvrtEECCAKbonW7VJef8=",
"lastModified": 1779726825,
"narHash": "sha256-RUkMrREjKDQrA+dA9+xZviGAxM5W1aVdyOr/bSYpHrE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "cc09c0f9b7eaa95c2d9827338a5eb03d32505ca5",
"rev": "b179bde238977f7d4454fc770b1a727eaf55111c",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.11",
"ref": "release-26.05",
"repo": "home-manager",
"type": "github"
}
@@ -140,32 +140,48 @@
},
"nixos": {
"locked": {
"lastModified": 1778003029,
"narHash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=",
"lastModified": 1779971959,
"narHash": "sha256-R5nauXyqyfRUFiZycFFZdkF7wl6eaUpPLst35+2nJQY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5",
"rev": "ec942ba042dad5ef097e2ef3a3effc034241f011",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"ref": "nixos-26.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1778003029,
"narHash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=",
"lastModified": 1779971959,
"narHash": "sha256-R5nauXyqyfRUFiZycFFZdkF7wl6eaUpPLst35+2nJQY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5",
"rev": "ec942ba042dad5ef097e2ef3a3effc034241f011",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"ref": "nixos-26.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1779560665,
"narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@@ -177,11 +193,11 @@
]
},
"locked": {
"lastModified": 1769036658,
"narHash": "sha256-bia1yOQtC8A7XZRCTdLvY0Bdv4i/V6hMqb0NM/9h/jc=",
"lastModified": 1780213167,
"narHash": "sha256-50MzkuYn590Tk89/YivGZ8Z8ZtKRXcP+iHqpLv6TYXA=",
"ref": "refs/heads/master",
"rev": "9c1eb1b999522b965ce129043c7112fc9e38c75a",
"revCount": 52,
"rev": "a5224c23744b0a89e32992442bba4cfaa8464d59",
"revCount": 54,
"type": "git",
"url": "https://git.project-cloud.net/asmir/nvim_flake"
},
@@ -212,6 +228,46 @@
"url": "https://git.project-cloud.net/asmir/project-cloud"
}
},
"quickshell": {
"inputs": {
"nixpkgs": [
"quickshell_bar",
"nixpkgs"
]
},
"locked": {
"lastModified": 1779430452,
"narHash": "sha256-zTslhsxLqUlRTML506iougTGzyR38Fzhzn7t4KDEuuE=",
"ref": "refs/heads/master",
"rev": "4b4fca3224ab977dc515ac0bb78d00b3dfa71e00",
"revCount": 819,
"type": "git",
"url": "https://git.outfoxxed.me/quickshell/quickshell"
},
"original": {
"type": "git",
"url": "https://git.outfoxxed.me/quickshell/quickshell"
}
},
"quickshell_bar": {
"inputs": {
"nixpkgs": "nixpkgs_2",
"quickshell": "quickshell"
},
"locked": {
"lastModified": 1780212524,
"narHash": "sha256-r+zAR7SijYiQlanbuOKLEItYXfIOnkyQBPl3QoMWLIg=",
"ref": "refs/heads/master",
"rev": "f8a4536a02e9ce2d78eabf8df0b7ccc59b8ebb15",
"revCount": 1,
"type": "git",
"url": "https://git.project-cloud.net/asmir/quickshell_bar"
},
"original": {
"type": "git",
"url": "https://git.project-cloud.net/asmir/quickshell_bar"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
@@ -220,6 +276,7 @@
"nixpkgs": "nixpkgs",
"nvim": "nvim",
"project-cloud": "project-cloud",
"quickshell_bar": "quickshell_bar",
"simple-nixos-mailserver": "simple-nixos-mailserver",
"sops-nix": "sops-nix",
"swaysw": "swaysw",
@@ -236,14 +293,14 @@
]
},
"locked": {
"lastModified": 1773912645,
"narHash": "sha256-QHzRqq6gh+t3F/QU9DkP7X63dDDcuIQmaDz12p7ANTg=",
"lastModified": 1779651513,
"narHash": "sha256-lUmq8sXQzihreq9UMqAkSBy9z9ueZbRnFyltzYVfQ2I=",
"type": "tarball",
"url": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-25.11/nixos-mailserver-nixos-25.11.tar.gz"
"url": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-26.05/nixos-mailserver-nixos-26.05.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-25.11/nixos-mailserver-nixos-25.11.tar.gz"
"url": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-26.05/nixos-mailserver-nixos-26.05.tar.gz"
}
},
"sops-nix": {
@@ -325,11 +382,11 @@
]
},
"locked": {
"lastModified": 1764579633,
"narHash": "sha256-gOD5RMHOB9Fw4T3nk2a95YdU0J24QU3uWUiZVIQza64=",
"lastModified": 1780166195,
"narHash": "sha256-kqViUrWwIJP7xVCpcZbRk7IygAw/Tll/UmbcAW9zRPk=",
"ref": "refs/heads/master",
"rev": "b0707744e2b4a077e759145cdbfa8d8d1017e732",
"revCount": 25,
"rev": "e1aecedf30f3b3cedd89d84364bd7e548a011bcd",
"revCount": 26,
"type": "git",
"url": "https://git.project-cloud.net/asmir/zremap"
},

View File

@@ -2,8 +2,8 @@
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixos.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
nixos.url = "github:nixos/nixpkgs/nixos-26.05";
nix-xilinx = {
url = "gitlab:asmir.abdulahovic/nix-xilinx";
@@ -20,6 +20,10 @@
inputs.nixpkgs.follows = "nixpkgs";
};
quickshell_bar = {
url = "git+https://git.project-cloud.net/asmir/quickshell_bar";
};
nvim = {
url = "git+https://git.project-cloud.net/asmir/nvim_flake";
inputs.nixpkgs.follows = "nixpkgs";
@@ -31,12 +35,12 @@
};
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
simple-nixos-mailserver = {
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-25.11/nixos-mailserver-nixos-25.11.tar.gz";
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-26.05/nixos-mailserver-nixos-26.05.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};

View File

@@ -219,7 +219,7 @@ in
];
environment = {
#memoryAllocator.provider = "mimalloc";
systemPackages = with pkgs; [ maliit-keyboard ];
systemPackages = with pkgs; [ maliit-keyboard android-tools ];
sessionVariables = {
LIBVA_DRIVER_NAME = "iHD";
@@ -273,7 +273,6 @@ in
setOptions = [ ];
};
firejail.enable = true;
adb.enable = true;
wireshark.enable = true;
sway.enable = true;
};
@@ -556,13 +555,13 @@ in
{
keys = [ 224 ];
events = [ "key" ];
command = "${pkgs.light}/bin/light -U 5";
command = "${pkgs.brightnessctl}/bin/brightnessctl set 5%-";
}
{
keys = [ 225 ];
events = [ "key" ];
command = "${pkgs.light}/bin/light -A 5";
command = "${pkgs.brightnessctl}/bin/brightnessctl set 5%+";
}
];
};
@@ -715,7 +714,6 @@ in
initialHashedPassword = "$y$j9T$FZnEcCEMIC0Fjj4dZi5t8.$D8ygvO19dR5nyTZxWwDgjEimHutD.sKnD1DLAyhU8.B";
shell = pkgs.zsh;
extraGroups = [
"adbusers"
"audio"
"dialout"
"input"

View File

@@ -25,6 +25,7 @@ let
--hooks ''\'systemctl --user restart lisgd.service''\'
'';
swaysw = inputs.swaysw.packages.${system}.swaysw;
quickshell_bar = inputs.quickshell_bar.packages.${system}.default;
term = "${pkgs.foot}/bin/footclient";
in
{
@@ -92,19 +93,9 @@ in
};
};
bars = [
{
position = "top";
fonts = {
names = [
"Iosevka"
"FontAwesome"
];
style = "Bold Semi-Condensed";
size = 12.0;
};
statusCommand = "${lib.getExe pkgs.i3status-rust} ~/.config/i3status-rust/config-top.toml";
}
bars = [ ];
startup = [
{ command = "exec ${quickshell_bar}/bin/quickshell-bar"; }
];
keybindings = {

View File

@@ -10,6 +10,11 @@
enableZshIntegration = true;
};
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
programs.zsh = {
autocd = true;
enableCompletion = true;
@@ -63,11 +68,6 @@
};
file = "pure.plugin.zsh";
}
{
name = "fzf";
src = pkgs.fzf-zsh;
file = "share/zsh/plugins/fzf-zsh/fzf-zsh.plugin.zsh";
}
{
name = "zsh-sudo";
src = pkgs.oh-my-zsh;
@@ -104,7 +104,7 @@
}
add-zsh-hook -Uz chpwd chpwd-osc7-pwd
eval "$(direnv hook zsh)"
#eval "$(direnv hook zsh)"
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then

View File

@@ -181,6 +181,11 @@ in
};
settings = {
# Workaround for QtWebEngine screen flicker/flash on Wayland+Intel
qt.args = [
"disable-gpu-compositing"
"enable-features=VaapiVideoDecoder,VaapiVideoEncoder"
];
colors.webpage.preferred_color_scheme = "dark";
content.notifications.enabled = false;
content.pdfjs = true;
@@ -286,22 +291,13 @@ in
*/
{
enable = true;
events = [
{
event = "before-sleep";
command = "${locker}/bin/swaylock_fancy";
}
{
event = "lock";
command = "${locker}/bin/swaylock_fancy";
}
events = {
before-sleep = "${locker}/bin/swaylock_fancy";
lock = "${locker}/bin/swaylock_fancy";
/*
{
event = "after-resume";
command = "${refresh_i3status}/bin/refresh_i3status";
}
after-resume = "${refresh_i3status}/bin/refresh_i3status";
*/
];
};
timeouts = [
{
timeout = 15 * 60;

View File

@@ -160,7 +160,7 @@ in
ungoogled-chromium
upx
viber
wasistlos
karere
waybar
wdisplays
weechat

View File

@@ -27,6 +27,19 @@
boot.kernel.sysctl = {
"net.core.default_qdisc" = "fq";
"net.ipv4.tcp_congestion_control" = "bbr";
"kernel.kptr_restrict" = 2;
"kernel.dmesg_restrict" = 1;
"kernel.kexec_load_disabled" = 1;
"kernel.yama.ptrace_scope" = 1;
"net.ipv4.conf.all.rp_filter" = 1;
"net.ipv4.conf.default.rp_filter" = 1;
"net.ipv4.conf.all.log_martians" = 1;
"net.ipv4.conf.all.accept_redirects" = 0;
"net.ipv4.conf.default.accept_redirects" = 0;
"net.ipv4.conf.all.send_redirects" = 0;
"net.ipv4.conf.default.send_redirects" = 0;
"net.ipv6.conf.all.accept_redirects" = 0;
"net.ipv6.conf.default.accept_redirects" = 0;
};
boot.initrd = {
@@ -49,7 +62,7 @@
# Set your time zone.
time.timeZone = "Europe/Berlin";
users.users.root.initialHashedPassword = "";
users.users.root.hashedPassword = "!";
users.users.root.openssh.authorizedKeys.keys = [
(builtins.readFile ../nixy/ssh_pubkey)
];
@@ -108,10 +121,14 @@
certificateScheme = "acme-nginx";
};
services.journald.extraConfig = ''SystemMaxUse=50M '';
services.journald.extraConfig = ''SystemMaxUse=500M '';
services.logind.settings.Login = { KillUserProcesses = true; };
services.openssh.settings.PermitRootLogin = "prohibit-password";
services.openssh.enable = true;
services.openssh.settings = {
PermitRootLogin = "prohibit-password";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
services.openssh.listenAddresses = [
{
addr = "10.100.0.1"; # wireguard
@@ -119,6 +136,13 @@
}
];
services.fail2ban = {
enable = true;
maxretry = 5;
bantime = "1h";
ignoreIP = [ "10.100.0.0/24" ];
};
services.opendkim = {
enable = true;
selector = "mail";
@@ -308,6 +332,12 @@
defaults.email = "asmir.abdulahovic@gmail.com";
};
security.sudo.execWheelOnly = true;
environment.memoryAllocator.provider = "jemalloc";
systemd.coredump.enable = false;
sops = {
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets = {
@@ -341,14 +371,13 @@
80
443
587
2049
]; # http, mail, mail, nfs
]; # http, https, submission
allowedUDPPorts = [
443
51820
]; # mail, wireguard
]; # http3, wireguard
allowPing = true;
logRefusedConnections = lib.mkDefault false;
logRefusedConnections = lib.mkDefault true;
};
networking.nat = {

View File

@@ -27,6 +27,10 @@ stdenv.mkDerivation rec {
--replace "/var/tmp" "$TMPDIR"
'';
# GCC 15 (nixpkgs 26.05) defaults to -std=gnu23, where `bool`/`true`/`false`
# are keywords; this old bubblewrap fork still does `typedef int bool;`.
env.NIX_CFLAGS_COMPILE = "-std=gnu17";
nativeBuildInputs = [
docbook_xsl
libxslt