summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2026-03-01 19:57:16 +0100
committeradikro <adikro@disroot.org>2026-03-01 19:57:16 +0100
commit1be09af058424219de2aad4b9cc27ccf760d23f6 (patch)
treebdc1177b166e1eef36763984b6862d7755a7bde8
parent4b41ce640c5eddcb50904331e03aac5460caa144 (diff)
...
-rw-r--r--.sops.yaml16
-rw-r--r--flake.lock139
-rw-r--r--flake.nix19
-rw-r--r--hm/conf/git.nix18
-rw-r--r--hm/conf/xdg-mime.nix58
-rw-r--r--hm/editors/nixvim/nixvim.nix2
-rw-r--r--hm/env/niri/binds.nix168
-rw-r--r--hm/env/niri/niri.nix51
-rw-r--r--hm/shell/cli.nix146
-rw-r--r--hm/shell/fish.nix39
-rw-r--r--hm/shell/foot.nix20
-rw-r--r--hm/soft/czkawka-v11.nix97
-rw-r--r--hm/soft/mangohud.nix16
-rw-r--r--hm/soft/media.nix3
-rw-r--r--hm/soft/mpv.nix7
-rw-r--r--hm/soft/nixcord.nix5
-rw-r--r--hm/soft/obs.nix6
-rw-r--r--hm/soft/yt-dlp.nix2
-rw-r--r--hosts/desktop/configuration.nix39
-rw-r--r--hosts/desktop/disko.nix4
-rw-r--r--hosts/desktop/home.nix26
-rw-r--r--hosts/oci/configuration.nix85
-rw-r--r--hosts/oci/disko.nix77
-rw-r--r--hosts/oci/home.nix21
-rw-r--r--hosts/thinkpad/boot.keybin0 -> 4734 bytes
-rw-r--r--hosts/thinkpad/configuration.nix25
-rw-r--r--hosts/thinkpad/disko.nix115
-rw-r--r--os/core/audio.nix49
-rw-r--r--os/core/bootloader.nix44
-rw-r--r--os/core/networking.nix1
-rw-r--r--os/core/ssh.nix19
-rw-r--r--os/srv/docker.nix14
-rw-r--r--os/srv/files.nix17
-rw-r--r--os/srv/gaming.nix1
-rw-r--r--os/srv/nix-helper.nix6
-rw-r--r--os/srv/sops.nix21
-rw-r--r--os/srv/srv.nix1
-rw-r--r--os/srv/virtualization.nix47
-rw-r--r--os/wm/niri.nix2
-rw-r--r--secrets/common.yaml (renamed from secrets/secrets.yaml)11
-rw-r--r--secrets/oci.yaml57
41 files changed, 1058 insertions, 436 deletions
diff --git a/.sops.yaml b/.sops.yaml
index 00d8491..fcce3e5 100644
--- a/.sops.yaml
+++ b/.sops.yaml
@@ -1,15 +1,29 @@
keys:
- &admin_gpg EF69F2FB25C8B5A66918EA91A38ACEAB9656CD94
- &host_szpont age1s39d4mdrjhkf8cy8eea02p836r7s875fj8f7w3z4ld2stmaac49qd075ww
+ - &host_thinkpad
- &host_pendrive age1sx8ut0arwlrp7n7qvlaele8mq93pyvzc0ddetlk47cnyx935gcusdceq9q
- &host_laptop age1m4u7n6mt5d3jv39lf4aedr9gqu3khl4sahuqx5n5h7v48gkyc9zqkp9qs8
+ - &host_oci
creation_rules:
- - path_regex: secrets/.*\.yaml$
+ - path_regex: .*secrets/common\.yaml$
key_groups:
- age:
- *host_szpont
+ - *host_thinkpad
- *host_pendrive
- *host_laptop
pgp:
- *admin_gpg
+
+ - path_regex: .*secrets/oci\.yaml$
+ key_groups:
+ - age:
+ - *host_szpont
+ - *host_thinkpad
+ - *host_pendrive
+ - *host_laptop
+ - *host_oci
+ pgp:
+ - *admin_gpg
diff --git a/flake.lock b/flake.lock
index 664cb1f..dd7651c 100644
--- a/flake.lock
+++ b/flake.lock
@@ -111,6 +111,27 @@
"type": "github"
}
},
+ "flake-parts_4": {
+ "inputs": {
+ "nixpkgs-lib": [
+ "nur",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1733312601,
+ "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "type": "github"
+ }
+ },
"flake-utils": {
"inputs": {
"systems": "systems_3"
@@ -136,11 +157,11 @@
]
},
"locked": {
- "lastModified": 1770995331,
- "narHash": "sha256-MZOF7PVKDOMAOp6bJpzuKOb1DVcyUT84568r8y3iVGg=",
+ "lastModified": 1772380461,
+ "narHash": "sha256-O3ukj3Bb3V0Tiy/4LUfLlBpWypJ9P0JeUgsKl2nmZZY=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "5e90b62996d56da9acb21e502c078e7c4e6ab40f",
+ "rev": "f140aa04d7d14f8a50ab27f3691b5766b17ae961",
"type": "github"
},
"original": {
@@ -175,11 +196,11 @@
]
},
"locked": {
- "lastModified": 1770941087,
- "narHash": "sha256-LERqMOoFmStaguCYZSV1kSRvHWZihJRttYkqzEh1WX4=",
+ "lastModified": 1772323514,
+ "narHash": "sha256-aWy20stlI6cl+UM1Ds8j4NSEfWTCp/VWW+SqQy+DOM8=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
- "rev": "6afe464c62eee957282721751d60f9d44651bf97",
+ "rev": "744c005b53bd588a82b3662f82c791eecf4710ad",
"type": "github"
},
"original": {
@@ -191,11 +212,11 @@
"neovim-src": {
"flake": false,
"locked": {
- "lastModified": 1770935891,
- "narHash": "sha256-XFde0vvpTf0JBTCfPj7SzLyPOerfeKZV4FVSBoPqkjo=",
+ "lastModified": 1772319592,
+ "narHash": "sha256-Bp+pAkfjSdUWV/giJFT9Gbp0wecQ+H4Kbh4+XfyOj5s=",
"owner": "neovim",
"repo": "neovim",
- "rev": "fa24df32641c850283ec7f8a35e8ad505d3866e1",
+ "rev": "8a79e3398a347248f067abe0c09097416fbf9cae",
"type": "github"
},
"original": {
@@ -216,11 +237,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
- "lastModified": 1770969869,
- "narHash": "sha256-a5ZgirQt+wfRTcwsWar8IwdsR+YZxEj6bF4LRYiB/Ow=",
+ "lastModified": 1772320432,
+ "narHash": "sha256-d6Wm7/+6iNtgdcp6mxayEBhjWisi1aj84Ob7VyEAW9Y=",
"owner": "sodiboo",
"repo": "niri-flake",
- "rev": "e39489a418aebcc4841b95600952610f95ddac49",
+ "rev": "557374f9cd3649ab27b2621ae8117bec59969645",
"type": "github"
},
"original": {
@@ -249,11 +270,11 @@
"niri-unstable": {
"flake": false,
"locked": {
- "lastModified": 1770966998,
- "narHash": "sha256-UDJwlNU7lP6lfHNzYtNM5jgvGrKmZ+R3Tr6lM+8hNLQ=",
+ "lastModified": 1772207631,
+ "narHash": "sha256-Jkkg+KqshFO3CbTszVVpkKN2AOObYz+wMsM3ONo1z5g=",
"owner": "YaLTeR",
"repo": "niri",
- "rev": "c1146c0befd31358910c78672ee987ee336b889a",
+ "rev": "e708f546153f74acf33eb183b3b2992587a701e5",
"type": "github"
},
"original": {
@@ -271,11 +292,11 @@
]
},
"locked": {
- "lastModified": 1770971055,
- "narHash": "sha256-XYFbDiNsfUKduV0DgV8UYSRey9t9vz/A4ppmzwBW+vQ=",
+ "lastModified": 1772266502,
+ "narHash": "sha256-HBO3W1ooO9UwmxwwwFflnbCrAVHhaxpB8YnxFGPvOsY=",
"owner": "KaylorBen",
"repo": "nixcord",
- "rev": "77e0320dd37093da79e4f146659c66bb7ae692cc",
+ "rev": "e805e50f0cc8b9f2d950dc81cd9ee1c986899eaf",
"type": "github"
},
"original": {
@@ -286,11 +307,11 @@
},
"nixos-hardware": {
"locked": {
- "lastModified": 1770882871,
- "narHash": "sha256-nw5g+xl3veea+maxJ2/81tMEA/rPq9aF1H5XF35X+OE=",
+ "lastModified": 1771969195,
+ "narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=",
"owner": "NixOS",
"repo": "nixos-hardware",
- "rev": "af04cb78aa85b2a4d1c15fc7270347e0d0eda97b",
+ "rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e",
"type": "github"
},
"original": {
@@ -302,11 +323,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1770841267,
- "narHash": "sha256-9xejG0KoqsoKEGp2kVbXRlEYtFFcDTHjidiuX8hGO44=",
+ "lastModified": 1772198003,
+ "narHash": "sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "ec7c70d12ce2fc37cb92aff673dcdca89d187bae",
+ "rev": "dd9b079222d43e1943b6ebd802f04fd959dc8e61",
"type": "github"
},
"original": {
@@ -333,11 +354,11 @@
},
"nixpkgs-stable": {
"locked": {
- "lastModified": 1770770419,
- "narHash": "sha256-iKZMkr6Cm9JzWlRYW/VPoL0A9jVKtZYiU4zSrVeetIs=",
+ "lastModified": 1772047000,
+ "narHash": "sha256-7DaQVv4R97cii/Qdfy4tmDZMB2xxtyIvNGSwXBBhSmo=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "6c5e707c6b5339359a9a9e215c5e66d6d802fd7a",
+ "rev": "1267bb4920d0fc06ea916734c11b0bf004bbe17e",
"type": "github"
},
"original": {
@@ -372,11 +393,11 @@
"systems": "systems"
},
"locked": {
- "lastModified": 1770954048,
- "narHash": "sha256-TEXS8Z7K+GsOOtL0QD1hrMxL0lVJjKDl3qZq/mJHu2k=",
+ "lastModified": 1771135771,
+ "narHash": "sha256-wyvBIhDuyCRyjB3yPg77qoyxrlgQtBR1rVW3c9knV3E=",
"owner": "nix-community",
"repo": "nixvim",
- "rev": "e49b8deda7b1732f5a2ea2a90446e45adb2a121d",
+ "rev": "ed0424f0b08d303a7348f52f7850ad1b2704f9ba",
"type": "github"
},
"original": {
@@ -385,6 +406,27 @@
"type": "github"
}
},
+ "nur": {
+ "inputs": {
+ "flake-parts": "flake-parts_4",
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1772382471,
+ "narHash": "sha256-n+4KTzFpt66Qaw+N1qtL9/tTlvcW4X3jdREBMKK2mfM=",
+ "owner": "nix-community",
+ "repo": "NUR",
+ "rev": "9c70f0aceae49f327988e432d1c5111be102f69c",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "NUR",
+ "type": "github"
+ }
+ },
"root": {
"inputs": {
"disko": "disko",
@@ -396,6 +438,7 @@
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim",
+ "nur": "nur",
"satty": "satty",
"sops-nix": "sops-nix",
"spicetify-nix": "spicetify-nix",
@@ -450,11 +493,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
- "lastModified": 1770383675,
- "narHash": "sha256-pR3Mc5Eue4YcIMcrzkyDhZPpovRFa8TW1PjL/ysH/7s=",
+ "lastModified": 1771828319,
+ "narHash": "sha256-ZWayNzcfhCEzc4XFPKwutazN/+ZIt9s3tQ7RSbK7X1M=",
"owner": "gabm",
"repo": "Satty",
- "rev": "7ae73dfb2c0f96e6820287390c1b8196c11cc0e0",
+ "rev": "2833499810b391c1e64a85b38455b86acb173458",
"type": "github"
},
"original": {
@@ -470,11 +513,11 @@
]
},
"locked": {
- "lastModified": 1770683991,
- "narHash": "sha256-xVfPvXDf9QN3Eh9dV+Lw6IkWG42KSuQ1u2260HKvpnc=",
+ "lastModified": 1772340640,
+ "narHash": "sha256-1nq7+Kt5IUBD8Hu3nptVPbMf+22rNJoHT0t9L1X+GKA=",
"owner": "Mic92",
"repo": "sops-nix",
- "rev": "8b89f44c2cc4581e402111d928869fe7ba9f7033",
+ "rev": "dec4d8eac700dcd2fe3c020857d3ee220ec147f1",
"type": "github"
},
"original": {
@@ -491,11 +534,11 @@
"systems": "systems_2"
},
"locked": {
- "lastModified": 1770846656,
- "narHash": "sha256-wdYpo8++TqKp3GdRgLFykjuIVW1m9GlUnxID2FG74cE=",
+ "lastModified": 1771737804,
+ "narHash": "sha256-7wn9qbzIQQgH8tnq4VwzuWEqEWpekuymlLyhY3vM/j8=",
"owner": "Gerg-L",
"repo": "spicetify-nix",
- "rev": "40e65cfc4608402674e1efaac3fccce20d2a72d3",
+ "rev": "6dd43010ac2458cc56a6ac5250349b9217a7a2ae",
"type": "github"
},
"original": {
@@ -557,11 +600,11 @@
]
},
"locked": {
- "lastModified": 1770841346,
- "narHash": "sha256-rGgJCBXpdl4IsEPvW9AzehNAFWQ90VmMHjM/iDD0oY8=",
+ "lastModified": 1772288942,
+ "narHash": "sha256-tWpp3YCvPZB5a2yffLQ0YUwSunXULDk0yUD1lOAUXBM=",
"owner": "Alexays",
"repo": "Waybar",
- "rev": "03a77c592b2a3855e293708cd0ca8205484d591d",
+ "rev": "31b373b9849091ab95aa8cf31c606e87da95e608",
"type": "github"
},
"original": {
@@ -590,11 +633,11 @@
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
- "lastModified": 1770583271,
- "narHash": "sha256-Q75S8cEqJoZ92s1y4zArvk2U1ayAy2E4SaF7gbNXkYQ=",
+ "lastModified": 1771787042,
+ "narHash": "sha256-7bM6Y4KldhKnfopSALF8XALxcX7ehkomXH9sPl4MXp0=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
- "rev": "86f5bd5d867ad6e120935dfe825f6b903ebbeddd",
+ "rev": "33c344fee50504089a447a8fef5878cf4f6215fc",
"type": "github"
},
"original": {
@@ -612,11 +655,11 @@
"rust-overlay": "rust-overlay_2"
},
"locked": {
- "lastModified": 1770959024,
- "narHash": "sha256-r2fZFW+xZxEdyORsAipCrnuxQblGGldtZcx0iSQI1ZQ=",
+ "lastModified": 1772254863,
+ "narHash": "sha256-w6RJF9uCx5Wt/ASC9sMiuod7nqYhJB0Z+t2pT/iSrzg=",
"owner": "sxyazi",
"repo": "yazi",
- "rev": "13bdb164a473091b46e857d37599e7e1ae22665e",
+ "rev": "3cdc3ecb70c13da9325b8333dca8514a53bcbdc3",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 9a10528..8f4e2fb 100644
--- a/flake.nix
+++ b/flake.nix
@@ -9,6 +9,11 @@
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
+ nur = {
+ url = "github:nix-community/NUR";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
@@ -66,11 +71,19 @@
};
outputs =
- { self, nixpkgs, ... }@inputs:
+ {
+ self,
+ nixpkgs,
+ nur,
+ ...
+ }@inputs:
let
system = "x86_64-linux";
- pkgs = import nixpkgs { inherit system; };
- scripts = import ./scripts { inherit pkgs; };
+ pkgs = import nixpkgs {
+ inherit system;
+ overlays = [ nur.overlays.default ];
+ };
+ scripts = import ./scripts;
mkHost =
{
hostname,
diff --git a/hm/conf/git.nix b/hm/conf/git.nix
index 67fcaa4..0e4b805 100644
--- a/hm/conf/git.nix
+++ b/hm/conf/git.nix
@@ -2,10 +2,12 @@
config,
lib,
pkgs,
+ osConfig,
...
}:
let
cfg = config.hm.conf.git;
+ isOCI = osConfig.networking.hostName == "oci";
in
{
options.hm.conf.git.enable = lib.mkEnableOption "enables git vcs";
@@ -14,14 +16,15 @@ in
enable = true;
lfs.enable = true;
signing = {
- key = "EF69F2FB25C8B5A66918EA91A38ACEAB9656CD94";
signByDefault = true;
+ key = if isOCI then "~/.ssh/id_ed25519.pub" else "EF69F2FB25C8B5A66918EA91A38ACEAB9656CD94";
};
settings = {
user = {
name = "adikro";
email = "adikro@disroot.org";
};
+ gpg.format = if isOCI then "ssh" else "openpgp";
init.defaultBranch = "main";
push.autoSetupRemote = true;
pull.rebase = true;
@@ -33,19 +36,6 @@ in
".direnv/"
"secrets/*.tmp"
];
- hooks.pre-commit = pkgs.writeShellScript "sops-pre-commit" ''
- for file in secrets/*.yaml; do
- if [[ -f "$file" ]]; then
- if ! ${pkgs.ripgrep}/bin/rg -q "sops" "$file"; then
- echo "--------------------------------------------------------"
- echo "ABORTING COMMIT: Unencrypted file detected: $file"
- echo "Please run 'sops -e -i $file' before committing."
- echo "--------------------------------------------------------"
- exit 1
- fi
- fi
- done
- '';
};
};
}
diff --git a/hm/conf/xdg-mime.nix b/hm/conf/xdg-mime.nix
index e024a89..cbf353d 100644
--- a/hm/conf/xdg-mime.nix
+++ b/hm/conf/xdg-mime.nix
@@ -7,35 +7,43 @@ in
enable = lib.mkEnableOption "sets the default applications";
};
config = lib.mkIf cfg.enable {
- xdg.mimeApps = {
- enable = true;
- defaultApplications = {
- "application/pdf" = [ "org.pwmt.zathura.desktop" ];
- "application/x-bzpdf" = [ "org.pwmt.zathura.desktop" ];
- "application/x-gzpdf" = [ "org.pwmt.zathura.desktop" ];
- "application/epub+zip" = [ "org.pwmt.zathura.desktop" ];
+ xdg = {
+ mimeApps = {
+ enable = true;
+ defaultApplications = {
+ "application/pdf" = [ "org.pwmt.zathura.desktop" ];
+ "application/x-bzpdf" = [ "org.pwmt.zathura.desktop" ];
+ "application/x-gzpdf" = [ "org.pwmt.zathura.desktop" ];
+ "application/epub+zip" = [ "org.pwmt.zathura.desktop" ];
- "image/png" = [ "nsxiv.desktop" ];
- "image/jpeg" = [ "nsxiv.desktop" ];
- "image/gif" = [ "nsxiv.desktop" ];
- "image/webp" = [ "nsxiv.desktop" ];
- "image/bmp" = [ "nsxiv.desktop" ];
+ "image/png" = [ "nsxiv.desktop" ];
+ "image/jpeg" = [ "nsxiv.desktop" ];
+ "image/gif" = [ "nsxiv.desktop" ];
+ "image/webp" = [ "nsxiv.desktop" ];
+ "image/bmp" = [ "nsxiv.desktop" ];
- "video/mp4" = [ "mpv.desktop" ];
- "video/x-matroska" = [ "mpv.desktop" ];
- "video/webm" = [ "mpv.desktop" ];
- "video/quicktime" = [ "mpv.desktop" ];
+ "video/mp4" = [ "mpv.desktop" ];
+ "video/x-matroska" = [ "mpv.desktop" ];
+ "video/webm" = [ "mpv.desktop" ];
+ "video/quicktime" = [ "mpv.desktop" ];
- "audio/mpeg" = [ "mpv.desktop" ];
- "audio/flac" = [ "mpv.desktop" ];
- "audio/wav" = [ "mpv.desktop" ];
- "audio/ogg" = [ "mpv.desktop" ];
+ "audio/mpeg" = [ "mpv.desktop" ];
+ "audio/flac" = [ "mpv.desktop" ];
+ "audio/wav" = [ "mpv.desktop" ];
+ "audio/ogg" = [ "mpv.desktop" ];
- "text/html" = [ "firefox.desktop" ];
- "x-scheme-handler/terminal" = [ "foot.desktop" ];
- "x-scheme-handler/http" = [ "firefox.desktop" ];
- "x-scheme-handler/https" = [ "firefox.desktop" ];
- "inode/directory" = [ "thunar.desktop" ];
+ "text/html" = [ "firefox.desktop" ];
+ "x-scheme-handler/terminal" = [ "foot.desktop" ];
+ "x-scheme-handler/http" = [ "firefox.desktop" ];
+ "x-scheme-handler/https" = [ "firefox.desktop" ];
+ "inode/directory" = [ "thunar.desktop" ];
+ };
+ };
+ terminal-exec = {
+ enable = true;
+ settings = {
+ default = [ "foot.desktop" ];
+ };
};
};
home.sessionVariables = {
diff --git a/hm/editors/nixvim/nixvim.nix b/hm/editors/nixvim/nixvim.nix
index 579c9e2..068012f 100644
--- a/hm/editors/nixvim/nixvim.nix
+++ b/hm/editors/nixvim/nixvim.nix
@@ -229,7 +229,7 @@ in
};
};
- gitsigns.enable = true;
+ # gitsigns.enable = true;
which-key.enable = true;
harpoon = {
enable = true;
diff --git a/hm/env/niri/binds.nix b/hm/env/niri/binds.nix
index e85b867..0dc4ea5 100644
--- a/hm/env/niri/binds.nix
+++ b/hm/env/niri/binds.nix
@@ -2,92 +2,111 @@
config,
lib,
pkgs,
+ osConfig,
...
}:
with config.lib.niri.actions;
let
playerctl = spawn "${pkgs.playerctl}/bin/playerctl";
- ss = "${toString config.hm.conf.xdg-dirs.storagePath}/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)";
+ ssPath = "${toString config.hm.conf.xdg-dirs.storagePath}/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)";
+ obsPass = osConfig.sops.secrets."obs/websocket_password".path;
in
{
+ # --- System & Media ---
+ "Mod+Shift+E".action = quit;
+ "Mod+Slash".action = show-hotkey-overlay;
+
+ # Audio (System-wide via wireplumber)
+ XF86AudioRaiseVolume.action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "3%+";
+ XF86AudioLowerVolume.action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "3%-";
+ XF86AudioMute.action =
+ spawn "sh" "-c"
+ "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
+ XF86Tools.action =
+ spawn "sh" "-c"
+ "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
+
+ # Media Control
+ XF86AudioPlay.action = playerctl "play-pause";
+ XF86AudioPrev.action = playerctl "previous";
+ XF86AudioNext.action = playerctl "next";
+
+ # Brightness
+ XF86MonBrightnessUp.action = spawn "light" "-A" "10";
+ XF86MonBrightnessDown.action = spawn "light" "-U" "10";
+
+ # --- Applications ---
+ "Mod+Return".action = spawn "foot";
+ "Mod+D".action = spawn "fuzzel";
+ "Mod+C".action = spawn "qalculate-gtk";
+ "Mod+Shift+D".action = spawn "sh" "-c" "cliphist list | fuzzel --dmenu | cliphist decode | wl-copy";
+ "Super+Return".action = spawn "sh" "-c" "OBS_WEBSOCKET_URL=$(cat ${obsPass}) obs-cmd replay save";
+
+ # --- Navigation: Columns & Workspaces ---
+ "Mod+H".action = focus-column-left;
+ "Mod+L".action = focus-column-right;
+ "Mod+J".action = focus-workspace-down;
+ "Mod+K".action = focus-workspace-up;
+
+ "Mod+WheelScrollDown".action = focus-column-right;
+ "Mod+WheelScrollUp".action = focus-column-left;
+ "Super+WheelScrollDown".action = focus-workspace-down;
+ "Super+WheelScrollUp".action = focus-workspace-up;
+
+ # --- Navigation: Monitors ---
+ "Super+H".action = focus-monitor-left;
+ "Super+L".action = focus-monitor-right;
+
+ # --- Window Management ---
+ "Mod+Shift+Q".action = close-window;
+ "Mod+Shift+V".action = toggle-window-floating;
"Mod+O" = {
action = toggle-overview;
repeat = false;
};
- "Mod+Slash".action = show-hotkey-overlay;
- XF86AudioRaiseVolume.action = playerctl "volume" "0.03+";
- XF86AudioLowerVolume.action = playerctl "volume" "0.03-";
- XF86AudioMute.action = spawn "sh" "-c" ''
- wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && \
- wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
- '';
- XF86Tools.action = spawn "sh" "-c" ''
- wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && \
- wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
- '';
+ # Moving Windows/Columns
+ "Mod+Shift+H".action = move-column-left;
+ "Mod+Shift+L".action = move-column-right;
+ "Mod+Shift+J".action = move-window-down-or-to-workspace-down;
+ "Mod+Shift+K".action = move-window-up-or-to-workspace-up;
+ "Super+Shift+H".action = move-column-to-monitor-left;
+ "Super+Shift+L".action = move-column-to-monitor-right;
- "Mod+WheelScrollDown".action = focus-column-right;
- "Mod+WheelScrollUp".action = focus-column-left;
"Mod+Shift+WheelScrollDown".action = move-column-right;
"Mod+Shift+WheelScrollUp".action = move-column-left;
-
- "Super+WheelScrollDown".action = focus-workspace-down;
- "Super+WheelScrollUp".action = focus-workspace-up;
"Super+Shift+WheelScrollDown".action = move-window-down-or-to-workspace-down;
"Super+Shift+WheelScrollUp".action = move-window-up-or-to-workspace-up;
+ # Container Management (Consume/Expel)
+ "Mod+BracketLeft".action = consume-or-expel-window-left;
+ "Mod+BracketRight".action = consume-or-expel-window-right;
+ "Mod+Comma".action = consume-window-into-column;
+ "Mod+Period".action = expel-window-from-column;
+
XF86Launch5.action = consume-or-expel-window-right;
XF86Launch6.action = consume-or-expel-window-left;
- XF86Launch7.action = switch-preset-column-width;
- "Super+Shift+L".action = spawn "swaylock" "-f";
- XF86AudioPlay.action = playerctl "play-pause";
- XF86AudioPrev.action = playerctl "previous";
- XF86AudioNext.action = playerctl "next";
+ # --- Layout & Sizing ---
+ "Mod+F".action = maximize-column;
+ "Mod+Shift+F".action = fullscreen-window;
+ "Mod+W".action = toggle-column-tabbed-display;
+ "Mod+R".action = switch-preset-column-width;
+ XF86Launch7.action = switch-preset-column-width;
+ "Mod+Shift+R".action = reset-window-height;
"Mod+Minus".action = set-column-width "-10%";
"Mod+Equal".action = set-column-width "+10%";
-
"Mod+Shift+Minus".action = set-window-height "-10%";
"Mod+Shift+Equal".action = set-window-height "+10%";
- "Mod+Shift+V".action = toggle-window-floating;
- "Mod+W".action = toggle-column-tabbed-display;
-
- "Mod+XF86Launch7" = {
- action = spawn "sh" "-c" ''
- wayfreeze &
- sleep 0.1
- GEOM=$(slurp)
- if [ -n "$GEOM" ]; then
- grim -g "$GEOM" - | tee ${ss}.png | wl-copy
- fi
- pkill -n wayfreeze
- '';
- repeat = false;
- };
-
- "Mod+Shift+XF86Launch7" = {
- action = spawn "sh" "-c" ''
- wayfreeze &
- sleep 0.1
- GEOM=$(slurp)
- if [ -n "$GEOM" ]; then
- grim -g "$GEOM" -t ppm - | satty --filename - --output-filename "${ss}-edited.png"
- fi
- pkill -n wayfreeze
- '';
- repeat = false;
- };
-
+ # --- Screenshots ---
"Mod+S" = {
action = spawn "sh" "-c" ''
- wayfreeze &
- sleep 0.1
+ wayfreeze & sleep 0.1
GEOM=$(slurp)
if [ -n "$GEOM" ]; then
- grim -g "$GEOM" - | tee ${ss}.png | wl-copy
+ grim -g "$GEOM" - | tee ${ssPath}.png | wl-copy
fi
pkill -n wayfreeze
'';
@@ -96,50 +115,15 @@ in
"Mod+Shift+S" = {
action = spawn "sh" "-c" ''
- wayfreeze &
- sleep 0.1
+ wayfreeze & sleep 0.1
GEOM=$(slurp)
if [ -n "$GEOM" ]; then
- grim -g "$GEOM" -t ppm - | satty --filename - --output-filename "${ss}-edited.png"
+ grim -g "$GEOM" -t ppm - | satty --filename - --output-filename "${ssPath}-edited.png"
fi
pkill -n wayfreeze
'';
repeat = false;
};
-
- "Mod+Shift+D".action = spawn "sh" "-c" ''
- cliphist list | fuzzel --dmenu | cliphist decode | wl-copy
- '';
-
- "Mod+Return".action = spawn "foot";
- "Mod+D".action = spawn "fuzzel";
- "Mod+C".action = spawn "qalculate-gtk";
- "Mod+BracketLeft".action = consume-or-expel-window-left;
- "Mod+BracketRight".action = consume-or-expel-window-right;
-
- "Mod+R".action = switch-preset-column-width;
- "Mod+Shift+R".action = reset-window-height;
- "Mod+F".action = maximize-column;
- "Mod+Shift+F".action = fullscreen-window;
-
- "Mod+Comma".action = consume-window-into-column;
- "Mod+Period".action = expel-window-from-column;
-
- "Mod+Shift+E".action = quit;
-
- "Mod+H".action = focus-column-left;
- "Mod+L".action = focus-column-right;
- "Mod+J".action = focus-workspace-down;
- "Mod+K".action = focus-workspace-up;
-
- "Mod+Shift+H".action = move-column-left;
- "Mod+Shift+L".action = move-column-right;
- "Mod+Shift+J".action = move-window-down-or-to-workspace-down;
- "Mod+Shift+K".action = move-window-up-or-to-workspace-up;
-
- "Mod+Shift+Q".action = close-window;
-
- "Super+Return".action = spawn "obs-cmd" "replay" "save";
}
// (builtins.listToAttrs (
builtins.concatMap (
diff --git a/hm/env/niri/niri.nix b/hm/env/niri/niri.nix
index 3f66f6e..f8e1542 100644
--- a/hm/env/niri/niri.nix
+++ b/hm/env/niri/niri.nix
@@ -2,10 +2,13 @@
config,
lib,
pkgs,
+ osConfig,
...
-}: let
+}:
+let
cfg = config.hm.env.niri;
-in {
+in
+{
options.hm.env.niri.enable = lib.mkEnableOption "niri hm";
config = lib.mkIf cfg.enable {
hm.env = {
@@ -17,8 +20,15 @@ in {
};
programs.niri.settings = {
- debug.disable-cursor-plane = [];
- binds = import ./binds.nix {inherit config lib pkgs;};
+ debug.disable-cursor-plane = [ ];
+ binds = import ./binds.nix {
+ inherit
+ config
+ osConfig
+ lib
+ pkgs
+ ;
+ };
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
@@ -41,17 +51,6 @@ in {
};
power-key-handling.enable = false;
};
- outputs = {
- "DP-1" = {
- focus-at-startup = true;
- # backdrop-color = "";
- variable-refresh-rate = "on-demand";
- mode = {
- width = 2560;
- height = 1440;
- };
- };
- };
cursor = {
hide-when-typing = true;
size = 48;
@@ -67,14 +66,14 @@ in {
# active = <decoration>;
};
preset-column-widths = [
- {proportion = 1. / 3.;}
- {proportion = 1. / 2.;}
- {proportion = 2. / 3.;}
+ { proportion = 1. / 3.; }
+ { proportion = 1. / 2.; }
+ { proportion = 2. / 3.; }
];
preset-window-heights = [
- {proportion = 1. / 3.;}
- {proportion = 1. / 2.;}
- {proportion = 2. / 3.;}
+ { proportion = 1. / 3.; }
+ { proportion = 1. / 2.; }
+ { proportion = 2. / 3.; }
];
default-column-width.proportion = 0.5;
tab-indicator = {
@@ -85,14 +84,20 @@ in {
window-rules = [
{
matches = [
- {app-id = "Bitwarden";}
+ { app-id = "Bitwarden"; }
];
block-out-from = "screen-capture";
}
];
gestures.hot-corners.enable = false;
spawn-at-startup = [
- {command = ["obs" "--disable-missing-files-check" "--startreplaybuffer"];}
+ {
+ command = [
+ "obs"
+ "--disable-missing-files-check"
+ "--startreplaybuffer"
+ ];
+ }
];
};
home.packages = with pkgs; [
diff --git a/hm/shell/cli.nix b/hm/shell/cli.nix
index da9c64e..a9e8397 100644
--- a/hm/shell/cli.nix
+++ b/hm/shell/cli.nix
@@ -10,33 +10,75 @@ in
{
options.hm.shell.cli.enable = lib.mkEnableOption "modern cli tools";
config = lib.mkIf cfg.enable {
+ programs.yazi = {
+ # TODO
+ enable = true;
+ shellWrapperName = "y";
+ };
+ # TODO
+ programs.fzf = {
+ enable = true;
+ enableFishIntegration = true;
+ };
programs.zoxide = {
enable = true;
+ enableFishIntegration = true;
options = [ "--cmd cd" ];
};
programs.bat = {
enable = true;
- config.theme = "gruvbox-dark";
+ config = {
+ theme = "gruvbox-dark";
+ style = "numbers";
+ pager = "less -RSFK";
+ wrap = "never";
+ tabs = "2";
+ };
+ extraPackages = [ pkgs.bat-extras.core ];
+ };
+ programs.fd = {
+ enable = true;
+ hidden = true;
+ ignores = [
+ ".git/"
+ "*.bak"
+ ];
};
+ programs.ripgrep-all.enable = true;
+ programs.btop = {
+ enable = true;
+ package = pkgs.btop.override { rocmSupport = true; };
+ settings = {
+ presets = "cpu:1:default,proc:0:default cpu:0:default,gpu0:0:default,mem:0:default";
+ vim_keys = true;
+ update_ms = 1000;
+ proc_gradient = false;
+ proc_filter_kernel = true;
+ show_uptime = false;
+ freq_mode = "average";
+ mem_graphs = false;
+ show_disks = false;
- programs.fzf.enable = true;
- programs.fd.enable = true;
- programs.ripgrep.enable = true;
- programs.yazi.enable = true;
- programs.btop.enable = true;
+ proc_gpu_summary = true;
+ };
+ };
programs.fastfetch = {
enable = true;
settings = {
display = {
- size = {
- binaryPrefix = "iec";
- };
separator = "  ";
+ color = {
+ keys = "blue";
+ title = "cyan";
+ };
};
multithreading = true;
modules = [
"title"
- "separator"
+ {
+ type = "separator";
+ string = "━";
+ }
"os"
{
type = "command";
@@ -61,10 +103,23 @@ in
];
};
};
- # programs.direnv = {
- # enable = true;
- # nix-direnv.enable = true;
- # };
+ programs.direnv = {
+ enable = true;
+ enableFishIntegration = true;
+ nix-direnv.enable = true;
+ config = {
+ global = {
+ load_dotenv = true;
+ strict_env = true;
+ hide_env_diff = true;
+ };
+ whitelist = {
+ prefix = [
+ "~/proj"
+ ];
+ };
+ };
+ };
programs.nix-your-shell = {
enable = true;
enableFishIntegration = true;
@@ -72,18 +127,65 @@ in
};
programs.bottom = {
enable = true;
+ settings = {
+ flags = {
+ basic = true;
+
+ current_usage = true;
+ unnormalized_cpu = false;
+ hide_k_threads = true;
+
+ process_memory_as_value = true;
+ enable_cache_memory = true;
+ network_use_bytes = true;
+ network_use_binary_prefix = true;
+
+ battery = true;
+ show_table_scroll_position = true;
+ hide_table_gap = true;
+
+ theme = "gruvbox";
+ };
+ processes.columns = [
+ "PID"
+ "Name"
+ "CPU%"
+ "Mem%"
+ "GPU%"
+ "GMem%"
+ "User"
+ ];
+ disk.columns = [
+ "Disk"
+ "Mount"
+ "Free"
+ "Total"
+ "R/s"
+ "W/s"
+ ];
+ };
};
programs.tealdeer = {
enable = true;
- enableAutoUpdates = true;
+ settings = {
+ updates.auto_update = true;
+ style = {
+ description.foreground = "white";
+ example_text.foreground = "cyan";
+ command_name.foreground = "yellow";
+ example_variable.foreground = "green";
+ example_code.foreground = "blue";
+ };
+ };
+ };
+ programs.pls = {
+ enable = true;
+ enableFishIntegration = true;
+ };
+ programs.nix-index = {
+ enable = true;
+ enableFishIntegration = true;
};
- # programs.lazygit = {
- # enable = true;
- # enableFishIntegration = true;
- # };
- programs.riff.enable = true;
- programs.pls.enable = true;
- programs.nix-index.enable = true;
home.packages = with pkgs; [
sd
diff --git a/hm/shell/fish.nix b/hm/shell/fish.nix
index d7f7248..20b9a95 100644
--- a/hm/shell/fish.nix
+++ b/hm/shell/fish.nix
@@ -13,14 +13,33 @@ in
programs.fish = {
enable = true;
+ functions = {
+ rga-fzf = {
+ body = ''
+ set -l RG_PREFIX "rga --files-with-matches --smart-case"
+ set -l file (
+ FZF_DEFAULT_COMMAND="$RG_PREFIX '$argv[1]'" \
+ fzf --sort \
+ --preview='test -n {}; and rga --pretty --context 5 {q} {}' \
+ --phony -q "$argv[1]" \
+ --bind "change:reload:$RG_PREFIX {q}" \
+ --preview-window="70%:wrap"
+ )
+
+ if test -n "$file"
+ echo "Opening $file..."
+ xdg-open "$file"
+ end
+ '';
+ };
+ };
+
interactiveShellInit = ''
set fish_greeting
fastfetch
'';
shellAliases = {
- update = "git add . && git commit -m \"$1\" && nix flake update && nh os switch .";
-
ns = "nix-search -p";
nd = "nix develop .";
nos = "nh os switch .";
@@ -60,10 +79,10 @@ in
name = "pisces";
src = pkgs.fishPlugins.pisces.src;
}
- {
- name = "fzf-fish";
- src = pkgs.fishPlugins.fzf-fish.src;
- }
+ # {
+ # name = "fzf-fish";
+ # src = pkgs.fishPlugins.fzf-fish.src;
+ # }
{
name = "fish-you-should-use";
src = pkgs.fishPlugins.fish-you-should-use.src;
@@ -72,10 +91,10 @@ in
name = "colored-man-pages";
src = pkgs.fishPlugins.colored-man-pages.src;
}
- {
- name = "fifc";
- src = pkgs.fishPlugins.fifc.src;
- }
+ # {
+ # name = "fifc";
+ # src = pkgs.fishPlugins.fifc.src;
+ # }
];
};
};
diff --git a/hm/shell/foot.nix b/hm/shell/foot.nix
index 3143d12..91dbfa0 100644
--- a/hm/shell/foot.nix
+++ b/hm/shell/foot.nix
@@ -9,7 +9,7 @@ let
cfg = config.hm.shell.foot;
footTheme = pkgs.runCommand "gruvbox-dark" { } ''
- sed 's/\[colors-dark\]/\[colors\]/g' ${
+ sed -e 's/\[colors-dark\]/\[colors\]/g' ${
pkgs.fetchurl {
url = "https://codeberg.org/dnkl/foot/raw/branch/master/themes/gruvbox-dark";
sha256 = "sha256-hlmLklG/vAEDy8I+k13+o4ZR6Cq6lTxOconjf9M75eo=";
@@ -22,7 +22,7 @@ in
enable = lib.mkEnableOption "foot terminal emulator";
fontSize = lib.mkOption {
type = lib.types.int;
- default = 14;
+ default = 13;
description = "Font size for the foot terminal";
};
};
@@ -34,12 +34,26 @@ in
settings = {
main = {
font = "JetBrainsMonoNFM-Regular:size=${toString cfg.fontSize}";
- box-drawings-uses-font-glyphs = true;
include = "${footTheme}";
+ word-delimiters = ",│`|:\"'()[]{}<>./";
+ selection-target = "both";
+ dpi-aware = "yes";
};
+
+ search-bindings = {
+ find-prev = "Control+p";
+ find-next = "Control+n";
+ commit = "Return";
+ };
+
scrollback = {
lines = 10000;
+ multiplier = 3.0;
+ indicator-position = "none";
};
+
+ security.osc52 = "enabled";
+ url.osc8-underline = "always";
};
};
};
diff --git a/hm/soft/czkawka-v11.nix b/hm/soft/czkawka-v11.nix
new file mode 100644
index 0000000..781da99
--- /dev/null
+++ b/hm/soft/czkawka-v11.nix
@@ -0,0 +1,97 @@
+{
+ lib,
+ atk,
+ cairo,
+ callPackage,
+ fetchFromGitHub,
+ gdk-pixbuf,
+ glib,
+ gobject-introspection,
+ gtk4,
+ pango,
+ pkg-config,
+ rustPlatform,
+ stdenv,
+ testers,
+ wrapGAppsHook4,
+ xvfb-run,
+ versionCheckHook,
+}:
+
+let
+ self = rustPlatform.buildRustPackage {
+ pname = "czkawka";
+ version = "11.0.1";
+
+ src = fetchFromGitHub {
+ owner = "qarmin";
+ repo = "czkawka";
+ tag = self.version;
+ hash = "sha256-ke6N3vuKPGolfh6XpAg3/9dtwd09eX53fN2klUwwNwQ=";
+ };
+
+ cargoHash = "sha256-fx2ZH4I2WYCdMgNoKQuBBEJrPjmgTRPeVM2L+TWYn54=";
+
+ nativeBuildInputs = [
+ gobject-introspection
+ pkg-config
+ wrapGAppsHook4
+ ];
+
+ buildInputs = [
+ atk
+ cairo
+ gdk-pixbuf
+ glib
+ gtk4
+ pango
+ ];
+
+ nativeCheckInputs = [ xvfb-run ];
+
+ strictDeps = true;
+
+ doCheck = stdenv.hostPlatform.isLinux && (stdenv.hostPlatform == stdenv.buildPlatform);
+
+ checkPhase = ''
+ runHook preCheck
+ xvfb-run cargo test
+ runHook postCheck
+ '';
+
+ postInstall = ''
+ install -Dm444 -t $out/share/applications data/com.github.qarmin.czkawka.desktop
+ install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/com.github.qarmin.czkawka.svg
+ install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/com.github.qarmin.czkawka-symbolic.svg
+ install -Dm444 -t $out/share/metainfo data/com.github.qarmin.czkawka.metainfo.xml
+ '';
+
+ nativeInstallCheckInputs = [ versionCheckHook ];
+ versionCheckProgram = "${placeholder "out"}/bin/czkawka_cli";
+ doInstallCheck = true;
+
+ passthru = {
+ tests.version = testers.testVersion {
+ package = self;
+ command = "czkawka_cli --version";
+ };
+ # Ensure you have a wrapper.nix in the same folder if using this
+ wrapper = callPackage ./wrapper.nix {
+ czkawka = self;
+ };
+ };
+
+ meta = {
+ homepage = "https://github.com/qarmin/czkawka";
+ description = "Simple, fast and easy to use app to remove unnecessary files from your computer";
+ changelog = "https://github.com/qarmin/czkawka/raw/${self.version}/Changelog.md";
+ license = with lib.licenses; [ mit ];
+ mainProgram = "czkawka_gui";
+ maintainers = with lib.maintainers; [
+ yanganto
+ _0x4A6F
+ ];
+ };
+ };
+in
+self
diff --git a/hm/soft/mangohud.nix b/hm/soft/mangohud.nix
index eae15d5..335014c 100644
--- a/hm/soft/mangohud.nix
+++ b/hm/soft/mangohud.nix
@@ -7,6 +7,22 @@ in
config = lib.mkIf cfg.enable {
programs.mangohud = {
enable = true;
+ settings = {
+ table_columns = 4;
+ font_scale = 1.3;
+ cellpadding_y = 0.1;
+ round_corners = 10;
+ fps_limit = 240;
+
+ gpu_temp = true;
+ gpu_core_clock = true;
+
+ cpu_temp = true;
+ cpu_mhz = true;
+
+ fps_metrics = "0.01";
+ wine = true;
+ };
};
};
}
diff --git a/hm/soft/media.nix b/hm/soft/media.nix
index 89cbe13..72ddc64 100644
--- a/hm/soft/media.nix
+++ b/hm/soft/media.nix
@@ -51,7 +51,8 @@ in
};
};
home.packages = with pkgs; [
- czkawka
+ (callPackage ./czkawka-v11.nix { })
+
nsxiv
pinta
ffmpeg
diff --git a/hm/soft/mpv.nix b/hm/soft/mpv.nix
index 380d0d5..7967611 100644
--- a/hm/soft/mpv.nix
+++ b/hm/soft/mpv.nix
@@ -173,7 +173,7 @@ in
reload
mpv-subtitle-lines
mpv-notify-send
- mpv-cheatsheet
+ # mpv-cheatsheet
modernx
memo
autosubsync-mpv
@@ -182,9 +182,6 @@ in
];
};
- hm.soft = {
- media.enable = true;
- yt-dlp.enable = true;
- };
+ hm.soft.yt-dlp.enable = true;
};
}
diff --git a/hm/soft/nixcord.nix b/hm/soft/nixcord.nix
index 52f6cd3..112a82b 100644
--- a/hm/soft/nixcord.nix
+++ b/hm/soft/nixcord.nix
@@ -1,6 +1,7 @@
{
inputs,
config,
+ pkgs,
lib,
...
}:
@@ -12,6 +13,10 @@ in
options.hm.soft.nixcord.enable = lib.mkEnableOption "nixcord configuration";
config = lib.mkIf cfg.enable {
+ home.packages = with pkgs; [
+ stoat-desktop
+ element-desktop
+ ];
programs.nixcord = {
enable = true;
discord = {
diff --git a/hm/soft/obs.nix b/hm/soft/obs.nix
index 235187c..f28d8ec 100644
--- a/hm/soft/obs.nix
+++ b/hm/soft/obs.nix
@@ -9,6 +9,7 @@ let
in
{
options.hm.soft.obs.enable = lib.mkEnableOption "enables obs video recording and clipping";
+
config = lib.mkIf cfg.enable {
programs.obs-studio = {
enable = true;
@@ -16,11 +17,6 @@ in
obs-pipewire-audio-capture
];
};
-
home.packages = [ pkgs.obs-cmd ];
-
- home.sessionVariables = {
- OBS_WEBSOCKET_URL = "/run/secrets/obs/password";
- };
};
}
diff --git a/hm/soft/yt-dlp.nix b/hm/soft/yt-dlp.nix
index e50f313..19eeeb4 100644
--- a/hm/soft/yt-dlp.nix
+++ b/hm/soft/yt-dlp.nix
@@ -9,7 +9,7 @@ in
enable = true;
settings = {
format = "bestvideo+bestaudio/best";
- merge-output-format = "webm";
+ # merge-output-format = "webm";
prefer-free-formats = true;
paths = "~/dl/yt";
diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix
index 4382320..fc1c334 100644
--- a/hosts/desktop/configuration.nix
+++ b/hosts/desktop/configuration.nix
@@ -62,15 +62,21 @@
users.enable = true;
};
srv = {
- files.enable = true;
+ files = {
+ enable = true;
+ localsend.enable = true;
+ };
gaming = {
enable = true;
steam.enable = true;
};
- virtualization.enable = true;
+ virtualization = {
+ kvm.enable = true;
+ waydroid.enable = true;
+ };
kdeconnect.enable = true;
nix-helper.enable = true;
- ollama.enable = true;
+ # ollama.enable = true;
monero.enable = true;
sops.enable = true;
syncthing.enable = true;
@@ -81,8 +87,33 @@
};
};
+ systemd.services.oci-arm-claimer = {
+ description = "OCI ARM Instance Claimer Script";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+
+ serviceConfig = {
+ WorkingDirectory = "/home/${username}/docs/oci-arm-host-capacity";
+
+ ExecStart = "${pkgs.php}/bin/php -d error_reporting='E_ALL & ~E_DEPRECATED' /home/${username}/docs/oci-arm-host-capacity/index.php";
+
+ Restart = "always";
+ RestartSec = "60";
+ User = "${username}";
+ };
+ path = [
+ pkgs.php
+ pkgs.php82Packages.composer
+ ];
+ };
+
boot = {
- kernelModules = [ "nct6687" ];
+ kernelModules = [
+ "nct6687"
+ "binder_linux"
+ "ashem_linux"
+ ];
+ # kernelParams = [ "video=DP-1:2560x1440@240" ];
extraModulePackages = [
config.boot.kernelPackages.nct6687d
];
diff --git a/hosts/desktop/disko.nix b/hosts/desktop/disko.nix
index 93941e9..d9be765 100644
--- a/hosts/desktop/disko.nix
+++ b/hosts/desktop/disko.nix
@@ -3,7 +3,7 @@
disk = {
main = {
type = "disk";
- device = "/dev/nvme0n1";
+ device = "/dev/disk/by-id/nvme-Lexar_SSD_NM790_2TB_PM5679R0036090P270";
content = {
type = "gpt";
partitions = {
@@ -114,7 +114,7 @@
};
storage = {
type = "disk";
- device = "/dev/sda";
+ device = "/dev/disk/by-id/ata-WDC_WD20EZBX-00AYRA0_WD-WXA2D63K8CLK";
content = {
type = "gpt";
partitions = {
diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix
index 8211143..196617b 100644
--- a/hosts/desktop/home.nix
+++ b/hosts/desktop/home.nix
@@ -59,4 +59,30 @@
yt-dlp.enable = true;
};
};
+
+ programs.niri.settings.outputs = {
+ "DP-1" = {
+ focus-at-startup = true;
+ variable-refresh-rate = "on-demand";
+ position = {
+ x = 0;
+ y = 0;
+ };
+ mode = {
+ width = 2560;
+ height = 1440;
+ };
+ };
+ "DP-2" = {
+ variable-refresh-rate = "on-demand";
+ position = {
+ x = 2560;
+ y = 360;
+ };
+ mode = {
+ width = 1920;
+ height = 1080;
+ };
+ };
+ };
}
diff --git a/hosts/oci/configuration.nix b/hosts/oci/configuration.nix
new file mode 100644
index 0000000..e3e4840
--- /dev/null
+++ b/hosts/oci/configuration.nix
@@ -0,0 +1,85 @@
+{
+ inputs,
+ username,
+ ...
+}:
+{
+ system.stateVersion = "25.05";
+
+ imports = [
+ inputs.disko.nixosModules.disko
+ # ./disko.nix
+
+ ../../os/default.nix
+ ];
+ # hardware.facter.reportPath = /etc/nixos/hosts/oci/facter.json;
+
+ # networking = {
+ # hostName = "oci";
+ # defaultGateway = "10.0.0.1";
+ # nameservers = [ "9.9.9.9" ];
+ # interfaces.eth0 = {
+ # ipv4.addresses = [
+ # {
+ # address = "10.0.0.90";
+ # prefixLength = 24;
+ # }
+ # ];
+ # useDHCP = true;
+ # };
+ # firewall = {
+ # logRefusedConnections = false;
+ # rejectPackets = true;
+ # };
+ # };
+
+ boot.loader = {
+ # efi.canTouchEfiVariables = true;
+ systemd-boot.enable = true;
+ };
+
+ services.cloud-init = {
+ enable = true;
+ network.enable = true;
+ };
+
+ os = {
+ core = {
+ # allowUnfree.enable = true;
+
+ bootloader.type = "none";
+ bootloader.efi = false;
+ drivers = {
+ enable = true;
+ kernel = "stable";
+ };
+ fonts.enable = true;
+ home-manager = {
+ enable = true;
+ users.${username}.path = ./home.nix;
+ };
+ locale.enable = true;
+ memory = {
+ zram.enable = true;
+ swapfile = {
+ enable = true;
+ size = 16;
+ };
+ };
+ network.enable = true;
+ security.enable = true;
+ ssh.enable = true;
+ storage.enable = true;
+ users.enable = true;
+ };
+ srv = {
+ sops.enable = true;
+ files.enable = true;
+ nix-helper.enable = true;
+ };
+ };
+ boot.kernelParams = [
+ "console=ttyS0"
+ "net.ifnames=0"
+ ];
+}
diff --git a/hosts/oci/disko.nix b/hosts/oci/disko.nix
new file mode 100644
index 0000000..fb01384
--- /dev/null
+++ b/hosts/oci/disko.nix
@@ -0,0 +1,77 @@
+{ lib, ... }:
+{
+ disko.devices.disk.main = {
+ device = "/dev/sda";
+ type = "disk";
+ content = {
+ type = "gpt";
+ partitions = {
+ ESP = {
+ size = "1G";
+ type = "EF00";
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ mountOptions = [ "umask=0077" ];
+ };
+ };
+ root = {
+ size = "100%";
+ content = {
+ type = lib.mkForce "btrfs";
+ extraArgs = [ "-f" ];
+ subvolumes = {
+ "root" = {
+ mountpoint = lib.mkForce "/";
+ mountOptions = [
+ "compress=zstd:1"
+ "discard=async"
+ "noatime"
+ ];
+ };
+ "nix" = {
+ mountpoint = "/nix";
+ mountOptions = [
+ "compress=zstd:1"
+ "discard=async"
+ "nodev"
+ "noatime"
+ ];
+ };
+ "home" = {
+ mountpoint = "/home";
+ mountOptions = [
+ "compress=zstd:1"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+ ];
+ };
+ "log" = {
+ mountpoint = "/var/log";
+ mountOptions = [
+ "compress=zstd:1"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+ ];
+ };
+ "swap" = {
+ mountpoint = "/.swapvol";
+ mountOptions = [
+ "compress=none"
+ "discard=async"
+ "nodatacow"
+ "noatime"
+ ];
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+}
diff --git a/hosts/oci/home.nix b/hosts/oci/home.nix
new file mode 100644
index 0000000..3ffc2ee
--- /dev/null
+++ b/hosts/oci/home.nix
@@ -0,0 +1,21 @@
+{ username, ... }:
+{
+ imports = [ ../../hm/default.nix ];
+
+ home = {
+ username = "${username}";
+ homeDirectory = "/home/${username}";
+ stateVersion = "25.05";
+ };
+
+ hm = {
+ conf.git.enable = true;
+ editors.nixvim.enable = true;
+ shell = {
+ cli.enable = true;
+ fish.enable = true;
+ foot.enable = true;
+ starship.enable = true;
+ };
+ };
+}
diff --git a/hosts/thinkpad/boot.key b/hosts/thinkpad/boot.key
new file mode 100644
index 0000000..6675c92
--- /dev/null
+++ b/hosts/thinkpad/boot.key
Binary files differ
diff --git a/hosts/thinkpad/configuration.nix b/hosts/thinkpad/configuration.nix
index ecc1c52..56a21b3 100644
--- a/hosts/thinkpad/configuration.nix
+++ b/hosts/thinkpad/configuration.nix
@@ -23,10 +23,15 @@
audio.enable = true;
bootloader = {
type = "grub";
- efi = false;
timeout = 0;
- grub.device = "/dev/nvme0n1";
luks.enable = true;
+ grub = {
+ device = "/dev/nvme0n1";
+ signing = {
+ enable = true;
+ keyId = "3D95543550A5A23A";
+ };
+ };
};
drivers = {
enable = true;
@@ -57,9 +62,18 @@
};
srv = {
bluetooth.enable = true;
- files.enable = true;
- gaming.enable = true;
- virtualization.enable = true;
+ files = {
+ enable = true;
+ localsend.enable = true;
+ };
+ gaming = {
+ enable = true;
+ steam.enable = true;
+ };
+ virtualization = {
+ kvm.enable = true;
+ waydroid.enable = true;
+ };
kdeconnect.enable = true;
nix-helper.enable = true;
monero.enable = true;
@@ -71,4 +85,5 @@
};
};
services.thinkfan.enable = true;
+ boot.kernelParams = [ "iomem=relaxed" ];
}
diff --git a/hosts/thinkpad/disko.nix b/hosts/thinkpad/disko.nix
index b5ccdc1..9816f7f 100644
--- a/hosts/thinkpad/disko.nix
+++ b/hosts/thinkpad/disko.nix
@@ -11,20 +11,16 @@
size = "1M";
type = "EF02";
};
- boot = {
- size = "2G";
- content = {
- type = "filesystem";
- format = "vfat";
- mountpoint = "/boot";
- mountOptions = [ "umask=0077" ];
- };
- };
luks = {
size = "100%";
content = {
type = "luks";
- name = "crypted_main";
+ name = "crypted";
+ keyFile = "/boot/root.key";
+ extraFormatArgs = [
+ "--type luks2"
+ "--pbkdf argon2id"
+ ];
settings.allowDiscards = true;
content = {
type = "btrfs";
@@ -38,6 +34,16 @@
"noatime"
];
};
+ "boot" = {
+ mountpoint = "/boot";
+ mountOptions = [
+ "compress=none"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+ ];
+ };
"nix" = {
mountpoint = "/nix";
mountOptions = [
@@ -104,95 +110,6 @@
};
};
};
- storage = {
- type = "disk";
- device = "/dev/sda";
- content = {
- type = "gpt";
- partitions = {
- luks = {
- size = "100%";
- content = {
- type = "luks";
- name = "crypted_storage";
- keyFile = "/tmp/crypt.key";
- settings.allowDiscards = true;
- content = {
- type = "btrfs";
- extraArgs = [ "-f" ];
- subvolumes = {
- "archive" = {
- mountpoint = "/storage/archive";
- mountOptions = [
- "compress=zstd:1"
- "discard=async"
- "nosuid"
- "nodev"
- "noatime"
-
- "nofail"
- "x-systemd.device-timeout=5s"
- ];
- };
- "movies" = {
- mountpoint = "/storage/movies";
- mountOptions = [
- "compress=none"
- "discard=async"
- "nosuid"
- "nodev"
- "noatime"
-
- "nofail"
- "x-systemd.device-timeout=5s"
- ];
- };
- "anime" = {
- mountpoint = "/storage/anime";
- mountOptions = [
- "compress=none"
- "discard=async"
- "nosuid"
- "nodev"
- "noatime"
-
- "nofail"
- "x-systemd.device-timeout=5s"
- ];
- };
- "pictures" = {
- mountpoint = "/storage/pics";
- mountOptions = [
- "compress=none"
- "discard=async"
- "nosuid"
- "nodev"
- "noatime"
-
- "nofail"
- "x-systemd.device-timeout=5s"
- ];
- };
- "videos" = {
- mountpoint = "/storage/vids";
- mountOptions = [
- "compress=none"
- "discard=async"
- "nosuid"
- "nodev"
- "noatime"
-
- "nofail"
- "x-systemd.device-timeout=5s"
- ];
- };
- };
- };
- };
- };
- };
- };
- };
};
};
}
diff --git a/os/core/audio.nix b/os/core/audio.nix
index 2454a89..5b9607c 100644
--- a/os/core/audio.nix
+++ b/os/core/audio.nix
@@ -2,14 +2,18 @@
config,
lib,
pkgs,
+ username,
...
-}: let
+}:
+let
cfg = config.os.core.audio;
-in {
+in
+{
options.os.core.audio = {
enable = lib.mkEnableOption "audio support";
disable-devices.enable = lib.mkEnableOption "disables some random devices cluttering up";
};
+
config = lib.mkMerge [
(lib.mkIf cfg.enable {
services = {
@@ -21,10 +25,27 @@ in {
alsa.support32Bit = true;
jack.enable = true;
wireplumber.enable = true;
+
+ # wireplumber.extraConfig."10-force-input-awake" = {
+ # "monitor.alsa.rules" = [
+ # {
+ # matches = [
+ # { "node.name" = "~alsa_input.*HyperX.*"; }
+ # { "node.name" = "~alsa_output.*HyperX.*"; }
+ # ];
+ # actions.update-props = {
+ # "session.suspend-on-idle" = false;
+ # };
+ # }
+ # ];
+ # };
};
playerctld.enable = true;
spotifyd.enable = true;
};
+
+ users.users.${username}.linger = true;
+
security.rtkit.enable = true;
hardware.enableAllFirmware = true;
@@ -32,30 +53,26 @@ in {
helvum
alsa-utils
];
+
+ # boot.kernelParams = [ "usbcore.autosuspend=-1" ];
+ # boot.extraModprobeConfig = ''
+ # options snd-usb-audio power_save=0
+ # '';
})
+
(lib.mkIf cfg.disable-devices.enable {
services.pipewire.wireplumber.extraConfig = {
- "10-keep-hyperx-alive"."monitor.alsa.rules" = [
+ "99-disable-useless-devices"."monitor.alsa.rules" = [
{
matches = [
- {"device.description" = "~HyperX*";}
+ { "device.name" = "~alsa_card.pci-0000_03_00.1*"; }
+ { "device.description" = "~USB Audio*"; }
];
actions.update-props = {
- "device.disabled" = false;
- "session.suspend-on-idle" = false;
+ "device.disabled" = true;
};
}
];
-
- "99-disable-useless-devices"."monitor.alsa.rules" = [
- {
- matches = [
- {"device.name" = "~alsa_card.pci-0000_03_00.1*";}
- {"device.description" = "~USB Audio*";}
- ];
- actions.update-props = {"device.disabled" = true;};
- }
- ];
};
})
];
diff --git a/os/core/bootloader.nix b/os/core/bootloader.nix
index dfd9101..aae167e 100644
--- a/os/core/bootloader.nix
+++ b/os/core/bootloader.nix
@@ -1,10 +1,12 @@
{
config,
lib,
+ pkgs,
...
}:
let
cfg = config.os.core.bootloader;
+ gpgHome = "/root/.gnupg";
in
{
options.os.core.bootloader = {
@@ -12,6 +14,7 @@ in
type = lib.types.enum [
"systemd-boot"
"grub"
+ "none"
];
default = "systemd-boot";
description = "Which bootloader to use";
@@ -19,7 +22,7 @@ in
efi = lib.mkOption {
type = lib.types.bool;
- default = true;
+ default = if cfg.grub.device == "nodev" then true else false;
description = "Whether the system uses UEFI or Legacy BIOS";
};
@@ -45,6 +48,13 @@ in
default = 0;
description = "Index of the default boot entry";
};
+ signing = {
+ enable = lib.mkEnableOption "GPG signing for Libreboot/GRUB";
+ keyId = lib.mkOption {
+ type = lib.types.str;
+ description = "The GPG Key ID used to sign the boot files";
+ };
+ };
};
luks.enable = lib.mkEnableOption "LUKS encryption support";
@@ -56,7 +66,7 @@ in
boot = {
loader = {
timeout = cfg.timeout;
- efi.canTouchEfiVariables = cfg.efi;
+ efi.canTouchEfiVariables = lib.mkDefault cfg.efi;
};
supportedFilesystems = [
"ntfs"
@@ -92,10 +102,38 @@ in
efiSupport = cfg.efi;
useOSProber = cfg.grub.useOSProber;
default = cfg.grub.defaultEntry;
-
enableCryptodisk = cfg.luks.enable;
copyKernels = true;
+
+ extraConfig = lib.mkIf cfg.grub.signing.enable ''
+ set check_signatures=enforce
+ terminal_input console
+ terminal_output console
+ '';
+
+ extraInstallCommands = lib.mkIf cfg.grub.signing.enable ''
+ echo "Signing with keys from ${gpgHome}"
+
+ SIGN_CMD="${pkgs.gnupg}/bin/gpg --homedir ${gpgHome} --detach-sign --batch --yes --default-key ${cfg.grub.signing.keyId}"
+
+ $SIGN_CMD /boot/grub/grub.cfg
+
+ for f in /boot/nixos/*; do
+ if [[ "$f" != *.sig ]]; then
+ $SIGN_CMD "$f"
+ fi
+ done
+ '';
};
+ environment.systemPackages = lib.optional cfg.grub.signing.enable pkgs.gnupg;
})
+ {
+ assertions = [
+ {
+ assertion = cfg.grub.signing.enable -> cfg.grub.signing.keyId != "";
+ message = "Bootloader signing is enabled but os.core.bootloader.grub.signing.keyId is not set.";
+ }
+ ];
+ }
];
}
diff --git a/os/core/networking.nix b/os/core/networking.nix
index 830f475..4835cb8 100644
--- a/os/core/networking.nix
+++ b/os/core/networking.nix
@@ -6,6 +6,7 @@ in
options.os.core.network.enable = lib.mkEnableOption "system-wide networking setup";
config = lib.mkIf cfg.enable {
networking = {
+ useDHCP = lib.mkDefault true;
networkmanager = {
enable = true;
wifi.macAddress = "stable-ssid";
diff --git a/os/core/ssh.nix b/os/core/ssh.nix
index 4069d31..d41c116 100644
--- a/os/core/ssh.nix
+++ b/os/core/ssh.nix
@@ -10,21 +10,32 @@ let
in
{
options.os.core.ssh.enable = lib.mkEnableOption "enables ssh server setup";
+
config = lib.mkIf cfg.enable {
+ environment.systemPackages = [ pkgs.rclone ];
services.tailscale = {
enable = true;
openFirewall = true;
};
- services.openssh.enable = true;
+ services.openssh = {
+ enable = true;
+ settings = {
+ PasswordAuthentication = false;
+ KbdInteractiveAuthentication = false;
+ };
+ };
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-curses;
};
- users.users.${username}.openssh.authorizedKeys.keys = [
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID5/Mr4PLMDflZ+SoaYP9N3kRbkkh1qL5NLSgW6C7sAu adikro@disroot.org"
- ];
+
+ users.users = {
+ ${username}.openssh.authorizedKeys.keys = [
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID5/Mr4PLMDflZ+SoaYP9N3kRbkkh1qL5NLSgW6C7sAu adikro@disroot.org"
+ ];
+ };
};
}
diff --git a/os/srv/docker.nix b/os/srv/docker.nix
deleted file mode 100644
index a87ea5d..0000000
--- a/os/srv/docker.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ config, lib, pkgs, username, ... }:
-let
- cfg = config.os.srv.docker;
-in
-{
- options.os.srv.docker.enable = lib.mkEnableOption "enables the docker container engine";
- config = lib.mkIf cfg.enable {
- virtualisation.docker.enable = true;
-
- environment.systemPackages = [ pkgs.docker-compose ];
-
- users.users.${username}.extraGroups = [ "docker" ];
- };
-}
diff --git a/os/srv/files.nix b/os/srv/files.nix
index 875a825..719642c 100644
--- a/os/srv/files.nix
+++ b/os/srv/files.nix
@@ -10,13 +10,19 @@ in
{
options.os.srv.files = {
enable = lib.mkEnableOption "enables general file management stuff";
+ localsend.enable = lib.mkEnableOption "enables localsend for sharing files locally";
krusader.enable = lib.mkEnableOption "enables krusader for easier file moving using ssh";
};
config = lib.mkMerge [
- {
+ (lib.mkIf cfg.enable {
programs.thunar = {
enable = true;
plugins = with pkgs; [
+ ffmpegthumbnailer
+ libgsf
+ poppler
+ freetype
+ webp-pixbuf-loader
thunar-volman
thunar-archive-plugin
];
@@ -31,8 +37,13 @@ in
pxz
pigz
];
- }
-
+ })
+ (lib.mkIf cfg.localsend.enable {
+ programs.localsend = {
+ enable = true;
+ openFirewall = true;
+ };
+ })
(lib.mkIf cfg.krusader.enable {
environment.systemPackages = with pkgs; [
krusader
diff --git a/os/srv/gaming.nix b/os/srv/gaming.nix
index 912a252..3e2eea4 100644
--- a/os/srv/gaming.nix
+++ b/os/srv/gaming.nix
@@ -77,6 +77,7 @@ in
proton-ge-bin
];
};
+ environment.systemPackages = with pkgs; [ steamtinkerlaunch ];
})
# --- VR SUPPORT ---
diff --git a/os/srv/nix-helper.nix b/os/srv/nix-helper.nix
index 0bb819a..5e5e133 100644
--- a/os/srv/nix-helper.nix
+++ b/os/srv/nix-helper.nix
@@ -28,9 +28,9 @@ in
clean.extraArgs = "--keep 5";
};
- # environment.sessionVariables = {
- # NH_OS_FLAKE = "/etc/nixos";
- # };
+ environment.sessionVariables = {
+ NH_OS_FLAKE = "/etc/nixos";
+ };
environment.systemPackages = with pkgs; [
nix-output-monitor
diff --git a/os/srv/sops.nix b/os/srv/sops.nix
index 3c9f0a9..40f9c74 100644
--- a/os/srv/sops.nix
+++ b/os/srv/sops.nix
@@ -12,26 +12,31 @@ in
{
imports = [ inputs.sops-nix.nixosModules.sops ];
- options.os.srv.sops.enable = lib.mkEnableOption "enables sops-nix secret storing";
+ options.os.srv.sops = {
+ enable = lib.mkEnableOption "enables sops-nix";
+ diskEncryption = lib.mkEnableOption "enables initrd decryption key (LUKS)";
+ };
config = lib.mkIf cfg.enable {
sops = {
- defaultSopsFile = ../../secrets/secrets.yaml;
+ defaultSopsFile = ../../secrets/common.yaml;
defaultSopsFormat = "yaml";
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets = {
- "syncthing/gui_password".owner = username;
+ "syncthing/gui_password" = {
+ owner = username;
+ sopsFile = ../../secrets/oci.yaml;
+ };
"obs/websocket_password".owner = username;
root_password.neededForUsers = true;
user_password.neededForUsers = true;
-# crypt_key = { };
+ oracler_password = {
+ neededForUsers = true;
+ sopsFile = ../../secrets/oci.yaml;
+ };
};
};
-# boot.initrd.secrets = {
-# "/tmp/crypt.key" = config.sops.secrets.crypt_key.path;
-# };
-
environment.systemPackages = with pkgs; [
sops
age
diff --git a/os/srv/srv.nix b/os/srv/srv.nix
index 0e2a4f7..8ee895b 100644
--- a/os/srv/srv.nix
+++ b/os/srv/srv.nix
@@ -5,7 +5,6 @@
./sops.nix
./bluetooth.nix
./compat.nix
- ./docker.nix
./files.nix
./gaming.nix
./virtualization.nix
diff --git a/os/srv/virtualization.nix b/os/srv/virtualization.nix
index f32737b..143e9da 100644
--- a/os/srv/virtualization.nix
+++ b/os/srv/virtualization.nix
@@ -2,23 +2,46 @@
config,
lib,
pkgs,
+ username,
...
}:
let
cfg = config.os.srv.virtualization;
in
{
- options.os.srv.virtualization.enable =
- lib.mkEnableOption "KVM/QEMU virtualization with Virt-Manager";
- config = lib.mkIf cfg.enable {
- virtualisation.libvirtd = {
- enable = true;
- qemu.package = pkgs.qemu_kvm;
- qemu.swtpm.enable = true;
- };
- systemd.services.libvirt-guests.enable = false;
- programs.virt-manager.enable = true;
-
- boot.initrd.kernelModules = lib.optional (config.os.core.drivers.amd.enable or false) "kvm-amd";
+ options.os.srv.virtualization = {
+ kvm.enable = lib.mkEnableOption "KVM/QEMU virtualization with Virt-Manager";
+ docker.enable = lib.mkEnableOption "Docker Container Virtualization";
+ waydroid.enable = lib.mkEnableOption "Waydroid Container Virtualization";
};
+ config = lib.mkMerge [
+ (lib.mkIf cfg.kvm.enable {
+ virtualisation.libvirtd = {
+ enable = true;
+ qemu.package = pkgs.qemu_kvm;
+ qemu.swtpm.enable = true;
+ };
+ systemd.services.libvirt-guests.enable = false;
+ programs.virt-manager.enable = true;
+
+ boot.initrd.kernelModules =
+ (lib.optional (config.os.core.drivers.cpu == "amd") "kvm-amd")
+ ++ (lib.optional (config.os.core.drivers.cpu == "intel") "kvm-intel");
+ })
+ (lib.mkIf cfg.docker.enable {
+ virtualisation.docker.enable = true;
+ environment.systemPackages = [ pkgs.docker-compose ];
+ users.users.${username}.extraGroups = [ "docker" ];
+ })
+ (lib.mkIf cfg.waydroid.enable {
+ virtualisation.waydroid = {
+ enable = true;
+ package = pkgs.waydroid-nftables;
+ };
+
+ environment.systemPackages = with pkgs; [
+ waydroid-helper
+ ];
+ })
+ ];
}
diff --git a/os/wm/niri.nix b/os/wm/niri.nix
index 58d27af..587f543 100644
--- a/os/wm/niri.nix
+++ b/os/wm/niri.nix
@@ -19,7 +19,7 @@ in
programs.niri = {
enable = true;
- package = pkgs.niri-unstable;
+ # package = pkgs.niri-unstable;
};
os.srv.compat.enable = true;
diff --git a/secrets/secrets.yaml b/secrets/common.yaml
index e149d19..90da196 100644
--- a/secrets/secrets.yaml
+++ b/secrets/common.yaml
@@ -1,10 +1,7 @@
user_password: ENC[AES256_GCM,data:lPSKNpHWQYQZvLFmK1NIqvcDTsXWe8lMnBuqATtkyQjjswFrBjreM5hp1l360VByGOupzG5c2Fz9W1ZCC/eYRrmbldJcSiMdYw==,iv:A6If6CSWoRNGR/CV/QBt8UH1N9BKp9xEnOOMcrSAET4=,tag:Ommq47gaEm86/ByCV1dlBA==,type:str]
root_password: ENC[AES256_GCM,data:F2M3P5JTpP9bnO494jnLA/Hs2ndQRYhgN9Z9LiEgTYYQPvMdi0DGI5dN6rh+5Dhm0a9eqGSOpU+4rWYX6cXOp+Um2exKr0O8YQ==,iv:WZtTsAMhg+qzE66/v2DUsG50Voc3vJF+1X19LNNsG3Q=,tag:cpQu7W/SMfilYxnbsgi/RQ==,type:str]
-crypt_key: ENC[AES256_GCM,data:tVX0vYrrzGiiGc1oxnxMosksDpYBZM8qJyrYpSyKXBFhgOEjgGRssQCiQRXjQA633Gi3QV9P1ldLprhpIn6tI7AtBdiklI2DbJkkpkzWw22IEu/5k6nk8HfcxM0QAbXAxAbVC3mIx48guQjFJrxWBvxgKXjDR0c8i2PW6mvstz8okSn+XXPJq+FMsAIxx00ZWiP48nYct/8/uZ223w0LPtjQySS/x+n+ycDfjRIKAkgKEgMgP+ouHZGL3Foy6LyNaFtYQr4QrgQAnKoXX7dkxPuwfQQeJNgg5O5Eav1eof5+s+KwQzflwFW/SBX8ScTH9PQ9SAsJl061JOqlzs34To1sWwoIkFj348kSreGXmCdqwIv4m72nZemRiDjS/NVT4zBjsVgX1pAbPDmBRym/619d7Q3FoKPS2jjdn6dO9fUgZZsGylb1gUjIBSY5HkVl0rbtaniXZh57edwGyDLES66pSVEUWnewnBn+ZODV/Z/EmQBF8i2KkZyWBfAixz9zQpDTgDHGsSiyJrbtZonqvWTEjAA3kp2GlXM7oGo0HcINrtUNPoL5MMErkbwIky8OUBmwnSyFl7XAD3dbk+3cijOQhkLWx6pW8bd10p7AZsfEFfxhUPoY6J9rBdpr/VCny9ARolChIGKcFDBKQehbdGOquxCiUPoKgRpSE0RTC1+Z7KeXWdB5tTEXW3I1boqo20AI3hYOlyOtegceASmE/vi7ohSIUdfpQ6nF9qMZPncAW+0IBqt+v+4yOXwzhwrPVocWF71BLk32wHDTvTS0Dy4xTPNL0lukJiVNvZ4bMSgPX+OUp12QnZ+MNSpiQ2G+kLV4LtHby72S8+ZIShWLlZB6/T6QywdMJMkTLe/nKqvvx133FGxgVqD+59VRNkkdTMz5dSyAgTbco/dy,iv:QgIlhNNyUTVnrV5YDEcNbf73NAHD7ZI9eu3IpuC3oSA=,tag:3uULpLYqcoi6SF6fq345Eg==,type:str]
-syncthing:
- gui_password: ENC[AES256_GCM,data:9sivtxELQRCD+q1OFMmL9OwMnem22VxFRN9twVdnMlTMmtxplO/KmezuLt+SUpfhDne0i9cTliiqCm16bQb3fFQWplJIyQDRgIGr1Y7r4boGtvJ95oSIW3bmwJW+IkYyYysKbcNrTGfdWVS6lJWYfenhonNfWESxqo1CW81BxBY=,iv:tYxoE/pxBBFrbiuc3ZVJe9rZfnVo9QSJOtl1NlPHyNg=,tag:eUwgow5ZkkuMoXrUAZughg==,type:str]
obs:
- websocket_password: ENC[AES256_GCM,data:eska/qJsOAiQpq3uHNIIHKobsdN2rnkfLznOMkVHWEmOiynBM5tl,iv:y6cwkZUPiBU671QFq/xEKQATWI9BYAvNRbgiGTF/550=,tag:b5G4PNFl1bmVmHjC7cwvHw==,type:str]
+ websocket_password: ENC[AES256_GCM,data:JkKC2b6Hs2orWJ3MN9hk6W2V2vH2A/FCdxuI13fwwOrcA1E8HaMH,iv:IvMrKDxWMxkCBAHEy9mLDd3JS1Pie3XuESXr7gp6D/E=,tag:6yfqG7Dv2ElPFCMKZX2dvg==,type:str]
sops:
age:
- recipient: age1s39d4mdrjhkf8cy8eea02p836r7s875fj8f7w3z4ld2stmaac49qd075ww
@@ -34,8 +31,8 @@ sops:
VTZMMDhCcUtCaFRDcWtBbTRvaXF4amsK7mbW8KsfTrHZkdGbORVgIfCfgTZfgOcQ
Q4ejje7WzbEhPVUKeYkbe5cmrA2AhxcLGURPZhZfNihBuKzj/TX+/Q==
-----END AGE ENCRYPTED FILE-----
- lastmodified: "2026-02-12T18:12:27Z"
- mac: ENC[AES256_GCM,data:X4w7bP1yh8fv9T1g0foqmLGy8d0BJBR82FYUplBbmvoxLELz56cTKs4+SKZ0p9u3OGd2IBtb8HlJCtv2bvllXbFm3dCrQBA6GYJ0yktIgijLuEA4m1iInc3EHh2il4I7/QXcrN/0ogCaNKqLUFsuqJSFQeDy06EZsazkm1xQp04=,iv:abXrgqa9UoTd5ENtOsm6b95ADdBcfrZwUrBaxWq+U3s=,tag:o6ug+kehSzHK2FXCQB1tiw==,type:str]
+ lastmodified: "2026-03-01T13:38:59Z"
+ mac: ENC[AES256_GCM,data:KOrDWFJM60kwUVPhC1GrnsI4UN5rpKfpRMRzXYNCtWIa8SsY5JhktMNcldVN5WvaXO1x3Q2N2nF1i3S45ByFUcAahnWwVEFKIfgVt6BfgKLlcXSGvYOxhqA4wWC7zYI8PlPvLmTKET/1fqFa2KrFTiZsPwFNPmASdIy94//Mluc=,iv:8qkTr9mg/4E8qfAhSLgGtCXahLyoy71lyVmNc65QvKg=,tag:tFoJkmC+igSX/NfObYIQig==,type:str]
pgp:
- created_at: "2026-02-13T17:46:13Z"
enc: |-
@@ -58,4 +55,4 @@ sops:
-----END PGP MESSAGE-----
fp: EF69F2FB25C8B5A66918EA91A38ACEAB9656CD94
unencrypted_suffix: _unencrypted
- version: 3.11.0
+ version: 3.12.0
diff --git a/secrets/oci.yaml b/secrets/oci.yaml
new file mode 100644
index 0000000..2cb83cf
--- /dev/null
+++ b/secrets/oci.yaml
@@ -0,0 +1,57 @@
+oracler_password: ENC[AES256_GCM,data:rzf38LcMsRcklYBC2lcKvEt4Zj1oqiRFkuAR+iOPo376bH0kmu+fQIZFrSRG3Nsc4BGLTmoCGizL7CMGqIbE/xuC9HFitQ9CUg==,iv:9zHJbNv/O9dB25XAMptzkUowQWvrnmzs08ipjjfrKmE=,tag:QFYDFLiT2eth1Qu/qLO4ww==,type:str]
+syncthing:
+ gui_password: ENC[AES256_GCM,data:7Gn8HXDA4EcQMXSza7fWPkW7kmhAKs053dXJ0+GSyCryH+iL2BtzMBuGyzCWC19wuce8UC6mKFNGvN/UXJVQM2G+N2iNTTveA7l5BidB9et8K5y9mOiiJnKFh14FSdyTgF/JSJXiwB5hpmmNMALRRftmc6LFYl7NzuBoCuYPAMw=,iv:VaxfT1W6nKAVsg9FOwZXrAsDDFjpp+TkYtA+cmSV4Hc=,tag:AstVeaue+MxAB77ixDXAFQ==,type:str]
+sops:
+ age:
+ - recipient: age1s39d4mdrjhkf8cy8eea02p836r7s875fj8f7w3z4ld2stmaac49qd075ww
+ enc: |
+ -----BEGIN AGE ENCRYPTED FILE-----
+ YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBwMTZYc1grOVZsd1ZCT0Rs
+ ZkgrTUFPWG83aEJTY3I2UWV6NjkzV1dLOUM0CnhuYUNNb3FiNCtmVy9SSGtxNkhs
+ NW56eU5pYXdUWDFTOVNSUHpYYTY3K0UKLS0tIHU1bHpjc094WWw0SXo2SjRJZGZm
+ bm1DdmdBR0Nja3Fvcmx1b21UaW5sNXcKZyT0t3vnWfrnc/Qwn7RyICWHEM/91uKu
+ wLD0Jdj8+cwSV5YMUyH5vGWAryDUUYnm3vMgvI8/Beq0w1PqRvYnng==
+ -----END AGE ENCRYPTED FILE-----
+ - recipient: age1sx8ut0arwlrp7n7qvlaele8mq93pyvzc0ddetlk47cnyx935gcusdceq9q
+ enc: |
+ -----BEGIN AGE ENCRYPTED FILE-----
+ YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKcVFpK0FCeVFDb0RYbVN4
+ K0puNUNPTTkrc1hBRDFnM3JqRlhWUk4yMmlRClBtTjBuNHFHWFNob1dwZWkvOU45
+ d0ljVXpJSWs2OTdTRit4eUNzQ0F5ekUKLS0tIEFVVVdwMWE2ZEg3QmpMVzJUZUlT
+ WW85cWdxZ1ROVWhCNzNaMGVjV0k0blEKP9Ux8+moowwbMDbbo69ZzahoDjKVQor8
+ i2Qkh4h2vNHxTKbR7XUBdlbdCgQpKxYsrA7lKeMb9+wfh25ey3k90g==
+ -----END AGE ENCRYPTED FILE-----
+ - recipient: age1m4u7n6mt5d3jv39lf4aedr9gqu3khl4sahuqx5n5h7v48gkyc9zqkp9qs8
+ enc: |
+ -----BEGIN AGE ENCRYPTED FILE-----
+ YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA3NUtMUDBlb3UzOXBKZktu
+ U2FWczNiWGpKTERkOWNzeThMdmgrVmIyaGtnCnNtUHhaNEJIekVOaHgzeDZ5bTFO
+ T0JXVHJrVi9leFNaZEZnVW1YVEVsNkUKLS0tIEZDV01GTUVHR1BLSUo2aXZUQTZa
+ YlcvSzc5aU8rZjBHVUwvb3gwS29ocXMKTusHPeGGMigfgDoDGL54lmHl/GSSjc3n
+ VCx4h1bOCHmx4drkjEnOJBHd1FBYtnaUhAnojfFTQsTViErvamRLKw==
+ -----END AGE ENCRYPTED FILE-----
+ lastmodified: "2026-02-15T19:28:43Z"
+ mac: ENC[AES256_GCM,data:aMEACyF/DATSBd9e1MhnGbYaeI33HD48b+ylnNPfmhjpv5BUYj587hO8T7AJgVi36QpDP6kLAn95dFTfKiAaUBnJf4LB9A9RGmeYtMPbutwhJIFzeYn+OUISvLGZujTLg+pFMgvGyhe3pQh+jopbhlf4xorrkv+7OxUYuP0HhU4=,iv:gIqC0zqceJdcXkEQffHf5gupl/oTtfHQzEO7EGusWAo=,tag:8pwTrSmVQJ2oliF/i+7T7Q==,type:str]
+ pgp:
+ - created_at: "2026-02-15T19:28:19Z"
+ enc: |-
+ -----BEGIN PGP MESSAGE-----
+
+ hQIMA/mKtLqB941HAQ/9Hqgbj6ZgQv2LMApnJMuR1ssHLxu7qBWXkM05JjDS0lMs
+ uBRmA40dln/rtiXujLAw9c4ChD14vcUOR/DLxkKb5QZmMVff3XdVDnNqVYh9tOqT
+ Rf223PVhvZBaUDYj8rB2jCI8Nx9HJMl8A1bknUg4CuBmukveDluOvSxSlKeqAx1g
+ vOh2f8i9zgv4cwEcjgWVK7zdD74OSfszOdGUOK/F0wCpqLF45N5TXPaxU7+GPYUX
+ QT3MudGzYVuiAsSDFbz5uJf4TJ3Hc6SH0isbGFtn9pdgKNTbKLV4/b+9stfb2wzK
+ Kbv6uWlnhygrjrGExysmfiROhamBeyXS71FXxgT5Rg9BzscjSenlBrEi+SigOj8P
+ nFwqAfQ8cKPfQe3WZBUP6AN9KsNUFYUXBtvQB7TexW2TBJ+j8I5JE5H8v6gDrOHs
+ gUSNN+Ly1uyLynnDi10rJf5PhzOCVt6Rs2w2ZUGpIgM8zztxb+FDnlELz+I1R7ei
+ sOmdYYotyIzPJVfKghoBf6aZckoYNsLpu3puau7I+r3RzTRmv8w+XiTM/eiJXDy4
+ HjJdjSUa3VNnuIy2JNYi7wS22h+WgPAfOx+K2YlHiGGukCknMu9IM9ybwGONskDa
+ Lyo7FB+gHg8aucKlQANPIM02AgLRztkUkXN5alaHD5KWeht6J7V4CLf5S/zBC5bS
+ XgEgv3JyvyAdHmrN+xeLGcwCjngrpiPXJAp3ZkcWlUhRkEAFZeovCsbwlQcELo7s
+ JdxMIUKUSZah8JFN90oyt4rmtdehJeurm+7a6g6c2JCGJaHT/lNHf7YED7v2q5s=
+ =GCLy
+ -----END PGP MESSAGE-----
+ fp: EF69F2FB25C8B5A66918EA91A38ACEAB9656CD94
+ unencrypted_suffix: _unencrypted
+ version: 3.11.0