diff --git a/_sources/generated.json b/_sources/generated.json index 3a15034..82ab29b 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -1,7 +1,7 @@ { "agenix": { "cargoLocks": null, - "date": "2025-10-18", + "date": "2025-10-28", "extract": null, "name": "agenix", "passthru": null, @@ -13,12 +13,12 @@ "name": null, "owner": "ryantm", "repo": "agenix", - "rev": "2f0f812f69f3eb4140157fe15e12739adf82e32a", - "sha256": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=", + "rev": "9ba0d85de3eaa7afeab493fed622008b6e4924f5", + "sha256": "sha256-lsNWuj4Z+pE7s0bd2OKicOFq9bK86JE0ZGeKJbNqb94=", "sparseCheckout": [], "type": "github" }, - "version": "2f0f812f69f3eb4140157fe15e12739adf82e32a" + "version": "9ba0d85de3eaa7afeab493fed622008b6e4924f5" }, "blog": { "cargoLocks": null, @@ -104,7 +104,7 @@ }, "home": { "cargoLocks": null, - "date": "2025-10-21", + "date": "2025-10-28", "extract": null, "name": "home", "passthru": null, @@ -116,12 +116,12 @@ "name": null, "owner": "nix-community", "repo": "home-manager", - "rev": "9b4a2a7c4fbd75b422f00794af02d6edb4d9d315", - "sha256": "sha256-IwpfaKg5c/WWQiy8b5QGaVPMvoEQ2J6kpwRFdpVpBNQ=", + "rev": "ca2ab1d877a24d5a437dad62f56b8b2c02e964e9", + "sha256": "sha256-fHr+tIYBJccNF8QWqgowfRmEAtAMSt1deZIRNKL8A7c=", "sparseCheckout": [], "type": "github" }, - "version": "9b4a2a7c4fbd75b422f00794af02d6edb4d9d315" + "version": "ca2ab1d877a24d5a437dad62f56b8b2c02e964e9" }, "limbusart": { "cargoLocks": null, @@ -143,19 +143,26 @@ }, "version": "7f29ab57b73eb8a4db7163fc7d19a71cf89c3d8b" }, - "lix-module": { + "moonlight": { "cargoLocks": null, - "date": null, + "date": "2025-10-23", "extract": null, - "name": "lix-module", + "name": "moonlight", "passthru": null, "pinned": false, "src": { - "sha256": "sha256-KYMUrTV7H/RR5/HRnjV5R3rRIuBXMemyJzTLi50NFTs=", - "type": "tarball", - "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.3-1.tar.gz" + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "moonlight-mod", + "repo": "moonlight", + "rev": "0b927a86a447a145f20bb5ee43fac79a724640f2", + "sha256": "sha256-lQpl6ecQfQ7KzEIytH3k4hLtvq+KkTL+3IR2ZukdZWM=", + "sparseCheckout": [], + "type": "github" }, - "version": "2.93.3-1" + "version": "0b927a86a447a145f20bb5ee43fac79a724640f2" }, "ncr": { "cargoLocks": null, @@ -177,11 +184,11 @@ }, "version": "4660aa9cd9b24bef569696eee46dbe7e8df3e237" }, - "nixos-wsl": { + "nixos-hardware": { "cargoLocks": null, - "date": "2025-10-15", + "date": "2025-10-20", "extract": null, - "name": "nixos-wsl", + "name": "nixos-hardware", "passthru": null, "pinned": false, "src": { @@ -189,14 +196,14 @@ "fetchSubmodules": false, "leaveDotGit": false, "name": null, - "owner": "nix-community", - "repo": "NixOS-WSL", - "rev": "f98ee1de1fa36eca63c67b600f5d617e184e82ea", - "sha256": "sha256-wfWqt+igns/VazjPLkyb4Z/wpn4v+XIjUeI3xY/1ENg=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "d6645c340ef7d821602fd2cd199e8d1eed10afbc", + "sha256": "sha256-2m1S4jl+GEDtlt2QqeHil8Ny456dcGSKJAM7q3j/BFU=", "sparseCheckout": [], "type": "github" }, - "version": "f98ee1de1fa36eca63c67b600f5d617e184e82ea" + "version": "d6645c340ef7d821602fd2cd199e8d1eed10afbc" }, "nsid-tracker": { "cargoLocks": null, @@ -218,9 +225,30 @@ }, "version": "2683e619932808b8aa78ec7100de6324c8216daf" }, + "stylix": { + "cargoLocks": null, + "date": "2025-10-28", + "extract": null, + "name": "stylix", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "nix-community", + "repo": "stylix", + "rev": "f8f4e3c3658ee962f8f332a56720c8dfc2836f7a", + "sha256": "sha256-nKOOPeblDcebtYfBjHo+PHXHKNSNKuifn1EGcBEgKWs=", + "sparseCheckout": [], + "type": "github" + }, + "version": "f8f4e3c3658ee962f8f332a56720c8dfc2836f7a" + }, "tangled": { "cargoLocks": null, - "date": "2025-10-22", + "date": "2025-10-28", "extract": null, "name": "tangled", "passthru": null, @@ -230,13 +258,13 @@ "fetchSubmodules": false, "leaveDotGit": false, "name": null, - "rev": "0a2ae70c248e8b880b6c109e3af8eddc0d69212b", - "sha256": "sha256-CEIJqCphXGAt1zzc/Q316G+sfYmpCtJ9ZVWNoXa1mk4=", + "rev": "7949848c82215f1fffa948bf5e61f7e8eff94a71", + "sha256": "sha256-yng1Usbmcwrcz3H214CF9Xp/zr58qr2578yw26YrTGk=", "sparseCheckout": [], "type": "git", "url": "https://tangled.org/@tangled.org/core" }, - "version": "0a2ae70c248e8b880b6c109e3af8eddc0d69212b" + "version": "7949848c82215f1fffa948bf5e61f7e8eff94a71" }, "tangled-sqlite-lib": { "cargoLocks": null, @@ -251,5 +279,26 @@ "url": "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip" }, "version": "3450100" + }, + "zen-browser": { + "cargoLocks": null, + "date": "2025-10-27", + "extract": null, + "name": "zen-browser", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "0xc000022070", + "repo": "zen-browser-flake", + "rev": "79a94872a3e6993a051c4e22a2dcb02c1d088acf", + "sha256": "sha256-E1PobJMiFmVUX2YdqYk/MpKb0LXavOYvlg8DCBBzlHc=", + "sparseCheckout": [], + "type": "github" + }, + "version": "79a94872a3e6993a051c4e22a2dcb02c1d088acf" } } \ No newline at end of file diff --git a/_sources/generated.nix b/_sources/generated.nix index 9e3333a..5680214 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -3,15 +3,15 @@ { agenix = { pname = "agenix"; - version = "2f0f812f69f3eb4140157fe15e12739adf82e32a"; + version = "9ba0d85de3eaa7afeab493fed622008b6e4924f5"; src = fetchFromGitHub { owner = "ryantm"; repo = "agenix"; - rev = "2f0f812f69f3eb4140157fe15e12739adf82e32a"; + rev = "9ba0d85de3eaa7afeab493fed622008b6e4924f5"; fetchSubmodules = false; - sha256 = "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ="; + sha256 = "sha256-lsNWuj4Z+pE7s0bd2OKicOFq9bK86JE0ZGeKJbNqb94="; }; - date = "2025-10-18"; + date = "2025-10-28"; }; blog = { pname = "blog"; @@ -67,15 +67,15 @@ }; home = { pname = "home"; - version = "9b4a2a7c4fbd75b422f00794af02d6edb4d9d315"; + version = "ca2ab1d877a24d5a437dad62f56b8b2c02e964e9"; src = fetchFromGitHub { owner = "nix-community"; repo = "home-manager"; - rev = "9b4a2a7c4fbd75b422f00794af02d6edb4d9d315"; + rev = "ca2ab1d877a24d5a437dad62f56b8b2c02e964e9"; fetchSubmodules = false; - sha256 = "sha256-IwpfaKg5c/WWQiy8b5QGaVPMvoEQ2J6kpwRFdpVpBNQ="; + sha256 = "sha256-fHr+tIYBJccNF8QWqgowfRmEAtAMSt1deZIRNKL8A7c="; }; - date = "2025-10-21"; + date = "2025-10-28"; }; limbusart = { pname = "limbusart"; @@ -91,13 +91,17 @@ }; date = "2025-07-22"; }; - lix-module = { - pname = "lix-module"; - version = "2.93.3-1"; - src = fetchTarball { - url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.3-1.tar.gz"; - sha256 = "sha256-KYMUrTV7H/RR5/HRnjV5R3rRIuBXMemyJzTLi50NFTs="; + moonlight = { + pname = "moonlight"; + version = "0b927a86a447a145f20bb5ee43fac79a724640f2"; + src = fetchFromGitHub { + owner = "moonlight-mod"; + repo = "moonlight"; + rev = "0b927a86a447a145f20bb5ee43fac79a724640f2"; + fetchSubmodules = false; + sha256 = "sha256-lQpl6ecQfQ7KzEIytH3k4hLtvq+KkTL+3IR2ZukdZWM="; }; + date = "2025-10-23"; }; ncr = { pname = "ncr"; @@ -113,17 +117,17 @@ }; date = "2025-07-18"; }; - nixos-wsl = { - pname = "nixos-wsl"; - version = "f98ee1de1fa36eca63c67b600f5d617e184e82ea"; + nixos-hardware = { + pname = "nixos-hardware"; + version = "d6645c340ef7d821602fd2cd199e8d1eed10afbc"; src = fetchFromGitHub { - owner = "nix-community"; - repo = "NixOS-WSL"; - rev = "f98ee1de1fa36eca63c67b600f5d617e184e82ea"; + owner = "NixOS"; + repo = "nixos-hardware"; + rev = "d6645c340ef7d821602fd2cd199e8d1eed10afbc"; fetchSubmodules = false; - sha256 = "sha256-wfWqt+igns/VazjPLkyb4Z/wpn4v+XIjUeI3xY/1ENg="; + sha256 = "sha256-2m1S4jl+GEDtlt2QqeHil8Ny456dcGSKJAM7q3j/BFU="; }; - date = "2025-10-15"; + date = "2025-10-20"; }; nsid-tracker = { pname = "nsid-tracker"; @@ -139,19 +143,31 @@ }; date = "2025-09-11"; }; + stylix = { + pname = "stylix"; + version = "f8f4e3c3658ee962f8f332a56720c8dfc2836f7a"; + src = fetchFromGitHub { + owner = "nix-community"; + repo = "stylix"; + rev = "f8f4e3c3658ee962f8f332a56720c8dfc2836f7a"; + fetchSubmodules = false; + sha256 = "sha256-nKOOPeblDcebtYfBjHo+PHXHKNSNKuifn1EGcBEgKWs="; + }; + date = "2025-10-28"; + }; tangled = { pname = "tangled"; - version = "0a2ae70c248e8b880b6c109e3af8eddc0d69212b"; + version = "7949848c82215f1fffa948bf5e61f7e8eff94a71"; src = fetchgit { url = "https://tangled.org/@tangled.org/core"; - rev = "0a2ae70c248e8b880b6c109e3af8eddc0d69212b"; + rev = "7949848c82215f1fffa948bf5e61f7e8eff94a71"; fetchSubmodules = false; deepClone = false; leaveDotGit = false; sparseCheckout = [ ]; - sha256 = "sha256-CEIJqCphXGAt1zzc/Q316G+sfYmpCtJ9ZVWNoXa1mk4="; + sha256 = "sha256-yng1Usbmcwrcz3H214CF9Xp/zr58qr2578yw26YrTGk="; }; - date = "2025-10-22"; + date = "2025-10-28"; }; tangled-sqlite-lib = { pname = "tangled-sqlite-lib"; @@ -161,4 +177,16 @@ sha256 = "sha256-bJoMjirsBjm2Qk9KPiy3yV3+8b/POlYe76/FQbciHro="; }; }; + zen-browser = { + pname = "zen-browser"; + version = "79a94872a3e6993a051c4e22a2dcb02c1d088acf"; + src = fetchFromGitHub { + owner = "0xc000022070"; + repo = "zen-browser-flake"; + rev = "79a94872a3e6993a051c4e22a2dcb02c1d088acf"; + fetchSubmodules = false; + sha256 = "sha256-E1PobJMiFmVUX2YdqYk/MpKb0LXavOYvlg8DCBBzlHc="; + }; + date = "2025-10-27"; + }; } diff --git a/flake.lock b/flake.lock index 92b950a..429fc4f 100644 --- a/flake.lock +++ b/flake.lock @@ -3,17 +3,17 @@ "nixpkgs": { "flake": false, "locked": { - "lastModified": 1761164809, - "narHash": "sha256-3uM91Lx9WZomE6MMEBorJyEyBNiHWRIxza/GganDxew=", + "lastModified": 1761512058, + "narHash": "sha256-FYDC/VM/Tu7bJ9uwxmZqIhkz7QblCcp65+LMb4StGTY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3d2db9755e7815937fb7b8f089fad9b44bc416d8", + "rev": "42060c40fd43c114af7010980168f8dcba734d3b", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable-small", "repo": "nixpkgs", + "rev": "42060c40fd43c114af7010980168f8dcba734d3b", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 45346cb..13f3467 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { description = "config!!!"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/42060c40fd43c114af7010980168f8dcba734d3b"; inputs.nixpkgs.flake = false; outputs = diff --git a/hosts/chernobog/default.nix b/hosts/chernobog/default.nix new file mode 100644 index 0000000..b61ec15 --- /dev/null +++ b/hosts/chernobog/default.nix @@ -0,0 +1,63 @@ +{ + config, + lib, + tlib, + pkgs, + inputs, + ... +}: +{ + imports = + with inputs; + [ + "${inputs.disko}/module.nix" + "${inputs.home}/nixos" + "${inputs.nixos-hardware}/common/pc" + "${inputs.nixos-hardware}/common/pc/ssd" + "${inputs.nixos-hardware}/common/cpu/amd" + "${inputs.nixos-hardware}/common/cpu/amd/pstate.nix" + "${inputs.nixos-hardware}/common/cpu/amd/zenpower.nix" + "${inputs.nixos-hardware}/common/gpu/amd" + ../../users/root + ../../users/mayer + ../../modules/base + ] + ++ (tlib.importFolder (toString ./modules)); + + security = { + pam.loginLimits = [ + { + domain = "*"; + type = "soft"; + item = "nofile"; + value = "16777216"; + } + { + domain = "*"; + type = "hard"; + item = "nofile"; + value = "16777216"; + } + ]; + }; + + services.pipewire = { + enable = true; + audio.enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + + fonts = { + enableDefaultPackages = true; + packages = [ pkgs.dejavu_fonts ]; + }; + + services.earlyoom.enable = true; + + hardware.enableRedistributableFirmware = true; + + system.stateVersion = "25.05"; +} diff --git a/hosts/chernobog/modules/boot.nix b/hosts/chernobog/modules/boot.nix new file mode 100644 index 0000000..83acb41 --- /dev/null +++ b/hosts/chernobog/modules/boot.nix @@ -0,0 +1,8 @@ +{ + boot.loader.systemd-boot = { + enable = true; + editor = false; + configurationLimit = 20; + }; + boot.loader.efi.canTouchEfiVariables = true; +} diff --git a/hosts/chernobog/modules/cosmic.disabled b/hosts/chernobog/modules/cosmic.disabled new file mode 100644 index 0000000..41ab992 --- /dev/null +++ b/hosts/chernobog/modules/cosmic.disabled @@ -0,0 +1,3 @@ +{ + imports = [ ../../../modules/de/cosmic.nix ]; +} diff --git a/hosts/chernobog/modules/disk-config.nix b/hosts/chernobog/modules/disk-config.nix new file mode 100644 index 0000000..26eb7fe --- /dev/null +++ b/hosts/chernobog/modules/disk-config.nix @@ -0,0 +1,47 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + priority = 1; + size = "500M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + priority = 2; + end = "-14G"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + mountpoint = "/"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; + }; + }; + plainSwap = { + priority = 3; + size = "100%"; + content = { + type = "swap"; + discardPolicy = "both"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/chernobog/modules/fix-wake.nix b/hosts/chernobog/modules/fix-wake.nix new file mode 100644 index 0000000..e8442b0 --- /dev/null +++ b/hosts/chernobog/modules/fix-wake.nix @@ -0,0 +1,5 @@ +{ + services.udev.extraRules = '' + ACTION=="add", KERNELS=="0000:00:01.1", ATTR{power/wakeup}="disabled" + ''; +} diff --git a/hosts/chernobog/modules/greetd.nix b/hosts/chernobog/modules/greetd.nix new file mode 100644 index 0000000..f047fe6 --- /dev/null +++ b/hosts/chernobog/modules/greetd.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: +{ + services.greetd = { + enable = true; + settings = { + terminal.vt = 1; + default_session = { + command = "${pkgs.tuigreet}/bin/tuigreet --issue --time --cmd sway"; + user = "greeter"; + }; + }; + }; + systemd.services = { + "getty@tty1".enable = false; + "autovt@tty1".enable = false; + }; +} diff --git a/hosts/chernobog/modules/keychron-v4.nix b/hosts/chernobog/modules/keychron-v4.nix new file mode 120000 index 0000000..600bff5 --- /dev/null +++ b/hosts/chernobog/modules/keychron-v4.nix @@ -0,0 +1 @@ +../../../modules/keyboards/keychron-v4/default.nix \ No newline at end of file diff --git a/hosts/chernobog/modules/lact.nix/config.yaml b/hosts/chernobog/modules/lact.nix/config.yaml new file mode 100644 index 0000000..9f72876 --- /dev/null +++ b/hosts/chernobog/modules/lact.nix/config.yaml @@ -0,0 +1,46 @@ +version: 5 +daemon: + log_level: info + admin_group: wheel + disable_clocks_cleanup: false +apply_settings_timer: 5 +gpus: + 1002:7480-1DA2:E482-0000:07:00.0: + fan_control_enabled: false + pmfw_options: + minimum_pwm: 30 + zero_rpm: true + zero_rpm_threshold: 43 + power_cap: 198.0 + performance_level: auto + max_core_clock: 3200 + max_memory_clock: 1250 + voltage_offset: -50 +profiles: + oc: + gpus: + 1002:7480-1DA2:E482-0000:07:00.0: + fan_control_enabled: false + fan_control_settings: + mode: static + static_speed: 1.0 + temperature_key: edge + interval_ms: 500 + curve: + 40: 0.3 + 50: 0.35 + 60: 0.5 + 70: 0.75 + 80: 1.0 + pmfw_options: + minimum_pwm: 15 + target_temperature: 88 + zero_rpm: false + zero_rpm_threshold: 40 + power_cap: 198.0 + performance_level: auto + max_core_clock: 3200 + max_memory_clock: 1250 + voltage_offset: -50 +current_profile: oc +auto_switch_profiles: false diff --git a/hosts/chernobog/modules/lact.nix/default.nix b/hosts/chernobog/modules/lact.nix/default.nix new file mode 100644 index 0000000..d0f1958 --- /dev/null +++ b/hosts/chernobog/modules/lact.nix/default.nix @@ -0,0 +1,4 @@ +{ + services.lact.enable = true; + environment.etc."lact/config.yaml".source = ./config.yaml; +} diff --git a/hosts/chernobog/modules/network.nix b/hosts/chernobog/modules/network.nix new file mode 100644 index 0000000..ac56c4b --- /dev/null +++ b/hosts/chernobog/modules/network.nix @@ -0,0 +1,5 @@ +{ + imports = [ ../../../modules/network/dns ]; + + networking.useDHCP = true; +} diff --git a/hosts/chernobog/modules/tailscale.nix b/hosts/chernobog/modules/tailscale.nix new file mode 100644 index 0000000..7687ed1 --- /dev/null +++ b/hosts/chernobog/modules/tailscale.nix @@ -0,0 +1,5 @@ +{ config, ... }: +{ + imports = [ ../../../modules/network/tailscale.nix ]; + networking.firewall.checkReversePath = "loose"; +} diff --git a/hosts/chernobog/modules/vr.nix b/hosts/chernobog/modules/vr.nix new file mode 100644 index 0000000..a53ea62 --- /dev/null +++ b/hosts/chernobog/modules/vr.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: +{ + services.monado = { + enable = true; + defaultRuntime = false; + }; + + services.wivrn = { + enable = true; + openFirewall = true; + defaultRuntime = true; + autoStart = true; + }; + + # programs.envision.enable = true; + + environment.systemPackages = [ pkgs.wlx-overlay-s ]; +} diff --git a/hosts/chernobog/modules/zswap.nix b/hosts/chernobog/modules/zswap.nix new file mode 100644 index 0000000..9cdb671 --- /dev/null +++ b/hosts/chernobog/modules/zswap.nix @@ -0,0 +1,9 @@ +{ + boot.initrd.systemd.enable = true; + boot.kernelParams = [ + "zswap.enabled=1" # enables zswap + "zswap.compressor=lz4" # compression algorithm + "zswap.max_pool_percent=13" # maximum percentage of RAM that zswap is allowed to use + "zswap.shrinker_enabled=1" # whether to shrink the pool proactively on high memory pressure + ]; +} diff --git a/hosts/default.nix b/hosts/default.nix index 99a99f7..e84b185 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -28,6 +28,7 @@ let # wsl = allPkgsSets.x86_64-linux; dzwonek = allPkgsSets.x86_64-linux; volsinii = allPkgsSets.x86_64-linux; + chernobog = allPkgsSets.x86_64-linux; }; in lib.mapAttrs mkSystem systems diff --git a/modules/base/default.nix b/modules/base/default.nix index 6c608ea..bde5ec1 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -23,63 +23,34 @@ in systemPackages = with pkgs; [ binutils coreutils + dnsutils + moreutils + iputils curl direnv - dnsutils - dosfstools fd - bottom - gptfdisk - iputils - jq - manix - moreutils - nix-index nmap ripgrep - skim tealdeer usbutils util-linux - whois - bat - fzf - eza - lm_sensors - mkpasswd bottom - amber unzip unrar - hydra-check - du-dust - mosh git - git-crypt ]; shellAliases = let ifSudo = string: mkIf config.security.sudo.enable string; inherit (pkgs) - git - bat - eza du-dust ; in { - g = pkgBin git; - git-optimize = "${pkgBin git} gc --aggressive --prune=now"; - cat = "${pkgBin bat} -pp --theme=base16"; - c = "cat"; + g = pkgBin config.programs.git.package; du = "${pkgBin du-dust}"; df = "${coreBin "df"} -h"; free = "${pkgs.procps}/bin/free -h"; - ls = pkgBin eza; - l = "${pkgBin eza} -lhg"; - la = "${pkgBin eza} -lhg -a"; - t = "${pkgBin eza} -lhg -T"; - ta = "${pkgBin eza} -lhg -a -T"; n = nixBin; nb = "${nixBin} build"; nf = "${nixBin} flake"; @@ -87,19 +58,8 @@ in nfui = "${nixBin} flake update"; nfs = "${nixBin} flake show"; nsh = "${nixBin} shell"; - nix-store-refs = "nix-store -qR"; - nosrs = ifSudo "sudo nixos-rebuild --fast switch"; - nosrb = ifSudo "sudo nixos-rebuild --fast boot"; - nosrt = ifSudo "sudo nixos-rebuild --fast test"; - ngc = ifSudo "sudo nix-collect-garbage"; - ngcdo = ifSudo "sudo nix-collect-garbage --delete-old"; top = "${pkgs.bottom}/bin/btm"; myip = "${pkgs.dnsutils}/bin/dig +short myip.opendns.com @208.67.222.222 2>&1"; - mn = - let - manix_preview = "manix '{}' | sed 's/type: /> type: /g' | bat -l Markdown --color=always --plain"; - in - ''manix "" | rg '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="${manix_preview}" | xargs manix''; # systemd ctl = "systemctl"; stl = ifSudo "s systemctl"; @@ -114,14 +74,12 @@ in diff-closures /run/current-system "$systemConfig" fi ''; + users.mutableUsers = false; - programs = { - command-not-found.enable = true; - git = { - enable = true; - config = { - safe.directory = [ "/etc/nixos" ]; - }; - }; + + programs.mosh = { + enable = true; + openFirewall = false; }; + programs.git.enable = true; } diff --git a/modules/base/hm-system-defaults.nix b/modules/base/hm-system-defaults.nix index 0474de6..d154a05 100644 --- a/modules/base/hm-system-defaults.nix +++ b/modules/base/hm-system-defaults.nix @@ -2,6 +2,7 @@ config, inputs, tlib, + terra, ... }: { @@ -44,7 +45,7 @@ ) ]; home-manager.extraSpecialArgs = { - inherit inputs tlib; + inherit terra inputs tlib; nixosConfig = config; }; } diff --git a/modules/de/cosmic.nix b/modules/de/cosmic.nix new file mode 100644 index 0000000..8f6f2fd --- /dev/null +++ b/modules/de/cosmic.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: +{ + services.displayManager.cosmic-greeter.enable = true; + services.desktopManager.cosmic.enable = true; + environment.cosmic.excludePackages = with pkgs; [ + cosmic-edit + cosmic-term + ]; +} diff --git a/modules/network/dns/cloudflare.nix b/modules/network/dns/cloudflare.nix index e3bd7a6..751e675 100644 --- a/modules/network/dns/cloudflare.nix +++ b/modules/network/dns/cloudflare.nix @@ -2,7 +2,7 @@ { networking.resolvconf.useLocalResolver = true; networking.networkmanager.dns = lib.mkForce "none"; - services.dnscrypt-proxy2 = { + services.dnscrypt-proxy = { enable = true; settings = { server_names = [ diff --git a/modules/nushell/prompt.nu b/modules/nushell/prompt.nu index a6cd0cb..8a7409e 100644 --- a/modules/nushell/prompt.nu +++ b/modules/nushell/prompt.nu @@ -10,6 +10,8 @@ let user_colors = { kirara: {start: "0xFF407D", end: "0xEE99C2"}, root: {start: "0xC5172E", end: "0xBF3131"}, dusk: {start: "0x640D5F", end: "0xD91656"}, + dawn: {start: "0x640D5F", end: "0xD91656"}, + mayer: {start: "0x640D5F", end: "0xD91656"}, } def create_left_prompt [] { diff --git a/nvfetcher.toml b/nvfetcher.toml index b8bacaf..5e80827 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -1,12 +1,8 @@ # nvfetcher configuration for Nix flake inputs -[lix-module] -src.manual = "2.93.3-1" -fetch.tarball = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.3-1.tar.gz" - -[nixos-wsl] -src.git = "https://github.com/nix-community/NixOS-WSL" -fetch.github = "nix-community/NixOS-WSL" +[nixos-hardware] +src.git = "https://github.com/NixOS/nixos-hardware" +fetch.github = "NixOS/nixos-hardware" [disko] src.git = "https://github.com/nix-community/disko" @@ -40,6 +36,8 @@ fetch.git = "https://tangled.org/@ptr.pet/clickee-proxy" src.git = "https://tangled.org/@ptr.pet/nsid-tracker" fetch.git = "https://tangled.org/@ptr.pet/nsid-tracker" +## TANGLED ## + [tangled] src.git = "https://tangled.org/@tangled.org/core" fetch.git = "https://tangled.org/@tangled.org/core" @@ -51,3 +49,17 @@ fetch.tarball = "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip" [gomod2nix] src.git = "https://github.com/nix-community/gomod2nix" fetch.github = "nix-community/gomod2nix" + +## TANGLED ## + +[moonlight] +src.git = "https://github.com/moonlight-mod/moonlight" +fetch.github = "moonlight-mod/moonlight" + +[zen-browser] +src.git = "https://github.com/0xc000022070/zen-browser-flake" +fetch.github = "0xc000022070/zen-browser-flake" + +[stylix] +src.git = "https://github.com/nix-community/stylix" +fetch.github = "nix-community/stylix" diff --git a/pkgs-set/pkgs/moonlight.nix b/pkgs-set/pkgs/moonlight.nix new file mode 100644 index 0000000..3d87b0f --- /dev/null +++ b/pkgs-set/pkgs/moonlight.nix @@ -0,0 +1 @@ +{ callPackage, inputs, ... }: callPackage "${inputs.moonlight}/nix" { } diff --git a/pkgs-set/pkgs/zen-browser.nix b/pkgs-set/pkgs/zen-browser.nix new file mode 100644 index 0000000..5202d05 --- /dev/null +++ b/pkgs-set/pkgs/zen-browser.nix @@ -0,0 +1 @@ +{ pkgs, inputs, ... }: (import inputs.zen-browser {inherit pkgs;}).twilight \ No newline at end of file diff --git a/users/mayer/default.nix b/users/mayer/default.nix new file mode 100644 index 0000000..ca043d9 --- /dev/null +++ b/users/mayer/default.nix @@ -0,0 +1,144 @@ +{ + pkgs, + lib, + tlib, + config, + ... +}@globalAttrs: +let + l = lib // builtins; + + nixosConfig = globalAttrs.config; +in +{ + users.users.mayer = { + isNormalUser = true; + createHome = true; + home = "/home/mayer"; + extraGroups = l.flatten [ + "wheel" + "adbusers" + "dialout" + "video" + ]; + shell = pkgs.nushell; + hashedPassword = "$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/"; + }; + + environment.shells = with pkgs; [ + bashInteractive + nushell + ]; + programs = { + steam.enable = true; + gamescope.enable = true; + gamemode.enable = true; + appimage = { + enable = true; + binfmt = true; + }; + sway.enable = true; + }; + systemd = { + targets.network-online.enable = false; + services = { + systemd-networkd-wait-online.enable = false; + NetworkManager-wait-online.enable = false; + }; + }; + + home-manager.users.mayer = + { + config, + pkgs, + inputs, + secrets, + ... + }: + let + personal = import ../../personal.nix; + name = personal.name; + email = personal.emails.primary; + in + { + imports = + let + modulesToEnable = l.flatten [ + [ + "wayland" + "foot" + ] + # cli stuff + [ + "zoxide" + "direnv" + "nushell" + ] + # dev stuff + [ + "helix" + "git" + "ssh" + ] + [ + "zen" + ] + ]; + in + l.flatten [ + (tlib.prefixStrings "${inputs.self}/users/modules/" modulesToEnable) + ./stylix.nix + ]; + + home = { + homeDirectory = nixosConfig.users.users.mayer.home; + packages = with pkgs; [ + # Font stuff + noto-fonts-cjk-sans + font-awesome + dejavu_fonts + # Programs + imv + mpv + ffmpeg + mupdf + xdg-utils + transmission_4-gtk + prismlauncher + gearlever + signal-desktop + ]; + }; + + fonts.fontconfig.enable = l.mkForce true; + + settings.iconTheme = { + name = "Yaru-dark"; + package = pkgs.yaru-theme; + }; + + home.pointerCursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 24; + gtk.enable = true; + x11.enable = true; + }; + gtk.enable = true; + gtk.theme.package = pkgs.yaru-theme; + gtk.theme.name = "Yaru-dark"; + + programs.git.includes = [ + { + contents = { + gpg.format = "ssh"; + commit.gpgsign = true; + user = { + inherit name email; + signingkey = builtins.readFile ../../secrets/yusdacra.key.pub; + }; + }; + } + ]; + }; +} diff --git a/users/mayer/stylix.nix b/users/mayer/stylix.nix new file mode 100644 index 0000000..26d5feb --- /dev/null +++ b/users/mayer/stylix.nix @@ -0,0 +1,63 @@ +{ + inputs, + config, + pkgs, + terra, + lib, + ... +}: +{ + imports = [(import inputs.stylix).homeModules.stylix]; + + stylix.image = ./wallpaper.png; + stylix.polarity = "dark"; + stylix.base16Scheme = + let + night = "#2b292d"; + ash = "#383539"; + umber = "#4d424b"; + bark = "#6F5D63"; + mist = "#D1D1E0"; + sage = "#B1B695"; + blush = "#fecdb2"; + coral = "#ffa07a"; + rose = "#F6B6C9"; + ember = "#e06b75"; + honey = "#F5D76E"; + in + { + base00 = night; + base01 = ash; + base02 = umber; + base03 = bark; + base04 = blush; + base05 = mist; + base06 = mist; + base07 = bark; + base08 = ember; + base09 = honey; + base0A = rose; + base0B = sage; + base0C = bark; + base0D = coral; + base0E = blush; + base0F = umber; + }; + + stylix.fonts = { + serif = { + name = "Comic Relief"; + package = pkgs.comic-relief; + }; + sansSerif = config.stylix.fonts.serif; + monospace = { + name = "Comic Mono"; + package = terra.comic-mono; + }; + }; + + stylix.fonts.sizes = { + popups = 13; + terminal = 13; + }; +} diff --git a/users/modules/discord/default.nix b/users/modules/discord/default.nix index a3e45bc..9c18924 100644 --- a/users/modules/discord/default.nix +++ b/users/modules/discord/default.nix @@ -1,39 +1,17 @@ { - config, - inputs, pkgs, - lib, + terra, + inputs, ... }: { - home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [ - ".config/ArmCord" + # imports = ["${inputs.moonlight}/nix/home-manager.nix"]; + + home.packages = [ + (pkgs.discord.override { + withMoonlight = true; + inherit (terra) moonlight; + withOpenASAR = true; + }) ]; - home.packages = - let - flags = [ - # "--flag-switches-begin" - # "--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer" - # "--flag-switches-end" - # "--ozone-platform=wayland" - # "--enable-webrtc-pipewire-capturer" - # "--disable-gpu-memory-buffer-video-frames" - # "--enable-accelerated-mjpeg-decode" - # "--enable-accelerated-video" - # "--enable-gpu-rasterization" - # "--enable-native-gpu-memory-buffers" - # "--enable-zero-copy" - # "--ignore-gpu-blocklist" - ]; - pkg = - (pkgs.armcord.override { - nss = pkgs.nss_latest; - }).overrideAttrs - (old: { - # preInstall = '' - # gappsWrapperArgs+=("--add-flags" "${lib.concatStringsSep " " flags}") - # ''; - }); - in - [ pkg ]; } diff --git a/users/modules/discord/moonlight.json b/users/modules/discord/moonlight.json new file mode 100644 index 0000000..2f3b07f --- /dev/null +++ b/users/modules/discord/moonlight.json @@ -0,0 +1,262 @@ +{ + "extensions": { + "moonbase": true, + "disableSentry": true, + "noTrack": true, + "noHideToken": true, + "alwaysShowForwardTime": { + "enabled": true + }, + "betterCodeblocks": { + "enabled": true + }, + "ownerCrown": { + "enabled": true + }, + "betterEmbedsYT": { + "enabled": true + }, + "callTimer": { + "enabled": true + }, + "clearUrls": { + "enabled": true + }, + "cloneExpressions": { + "enabled": true + }, + "copyAvatarUrl": { + "enabled": true + }, + "copyWebp": { + "enabled": true + }, + "dmFavorites": { + "enabled": true + }, + "domOptimizer": { + "enabled": true + }, + "experiments": { + "enabled": true, + "config": { + "devtools": true + } + }, + "inAppNotifications": { + "enabled": true + }, + "nativeFixes": { + "enabled": true, + "config": { + "vulkan": false + } + }, + "noJoinMessageWave": { + "enabled": true + }, + "noReplyPing": { + "enabled": true + }, + "noSmoothScrolling": { + "enabled": true + }, + "oneko": { + "enabled": true + }, + "osuTyping": { + "enabled": false + }, + "platformIcons": { + "enabled": false + }, + "pronouns": { + "enabled": true + }, + "quietLoggers": { + "enabled": true + }, + "remind-me": { + "enabled": true + }, + "reverseImageSearch": { + "enabled": true + }, + "sendTimestamps": { + "enabled": true + }, + "showReplySelf": { + "enabled": true + }, + "showVoiceMemberCount": { + "enabled": true + }, + "translateText": { + "enabled": true + }, + "unindent": { + "enabled": true + }, + "moonlight-css": { + "enabled": true, + "config": { + "paths": [ + "https://gist.githubusercontent.com/90-008/67ee4f4090a6892b760bb242dee7d34d/raw/5ae2efc2ab08e42f1966d2f5b0e0a4163b1e7433/dickcord.css", + "https://gist.githubusercontent.com/90-008/d47b927184ae485456956840692edca0/raw/90d40509c67fd4068d133662b7320842fd1e4772/gistfile1.txt", + "https://gist.githubusercontent.com/90-008/b031ebeb852bda832c1ba6258b4bdfa1/raw/ae1a3077a7edc8db2511b868eb8ac44f66f98905/hide.css", + "https://gist.githubusercontent.com/90-008/b5e835890e263bf1eec4a9d83b4a8dbe/raw/3780220391742455c2e9fd0230af45e3c6091829/gistfile1.css", + "https://ukriu.github.io/cssCord/Other/noDistractions.css", + "https://raw.githubusercontent.com/Bonkeyzz/Discord-Remove-useless-chat-buttons/main/RemoveChatButtons.theme.css" + ], + "themeAttributes": true + } + }, + "selectivelyReduceMotion": { + "enabled": true, + "config": { + "avatarDecorations": false, + "profileEffects": false, + "scrolling": true + } + }, + "mediaTweaks": { + "enabled": true, + "config": { + "noThumbnailSize": false, + "noWebp": false, + "noGifAutosend": false, + "imageUrls": false + } + }, + "allActivities": { + "enabled": true + }, + "betterTags": { + "enabled": true + }, + "noHelp": { + "enabled": true + }, + "noReplyChainNag": { + "enabled": true + }, + "onePingPerDM": { + "enabled": true, + "config": { + "allowMentionsBypass": true + } + }, + "silenceTyping": { + "enabled": true + }, + "betterUploadButton": { + "enabled": true + }, + "customSearchEngine": { + "enabled": true + }, + "dmDates": { + "enabled": true + }, + "doubleClickActions": { + "enabled": false + }, + "imgTitle": { + "enabled": true, + "config": { + "showFullUrl": true + } + }, + "imageViewer": { + "enabled": true + }, + "inviteToNowhere": { + "enabled": true + }, + "markdown": { + "enabled": true + }, + "mentionAvatars": { + "enabled": true + }, + "noInlineLinks": { + "enabled": true + }, + "noMaskedLinkPaste": { + "enabled": true + }, + "openExternally": { + "enabled": true + }, + "resolver": { + "enabled": true + }, + "alwaysFocus": false, + "callIdling": true, + "colorConsistency": true, + "freeScreenShare": true, + "highlight": { + "enabled": false, + "config": { + "ignoreFocusMode": true, + "keywords": [] + } + }, + "spacepack": { + "config": { + "addToGlobalScope": true + } + }, + "muteGuildOnJoin": true, + "antiDelete": { + "enabled": true, + "config": { + "ignoreBots": false, + "ignoreSelf": true, + "ignorePluralKit": false, + "ignoredUsers": [ + "647368715742216193", + "798918994987188276" + ] + } + }, + "nameColor": { + "enabled": true, + "config": { + "colorize": "All" + } + }, + "freeMoji": true, + "freeStickers": true, + "meow": { + "enabled": true, + "config": { + "woof": true + } + }, + "doubleClickToJoin": true, + "linkRedirect": false, + "manuallyJoinVoice": true, + "popoutDates": true, + "removeTopBar": true, + "streamQualityWorkaround": true, + "whosWatching": false, + "cleanChatBar": { + "enabled": true, + "config": { + "removedButtons": [ + "gift", + "activity", + "sticker" + ] + } + }, + "favouriteGifSearch": true, + "noOnboardingDelay": true + }, + "repositories": [ + "https://moonlight-mod.github.io/extensions-dist/repo.json", + "https://cynosphere.github.io/schirra/repo.json", + "https://lare354.github.io/moonlight-plugins/repo.json" + ] +} \ No newline at end of file diff --git a/users/modules/foot/default.nix b/users/modules/foot/default.nix index 2e9de41..822c88d 100644 --- a/users/modules/foot/default.nix +++ b/users/modules/foot/default.nix @@ -10,6 +10,19 @@ enable = true; package = pkgs.foot; server.enable = false; - settings.main.dpi-aware = lib.mkForce "yes"; + settings = { + main = { + login-shell = "yes"; + dpi-aware = lib.mkForce "yes"; + font = "Comic Mono:size=12"; + }; + csd = { + preferred = "client"; + size = 0; + }; + mouse.hide-when-typing = "yes"; + scrollback.lines = 100000; + bell.system = "no"; + }; }; } diff --git a/users/modules/git/default.nix b/users/modules/git/default.nix index c6ef7fd..8f96c1d 100644 --- a/users/modules/git/default.nix +++ b/users/modules/git/default.nix @@ -2,46 +2,49 @@ { programs.git = { enable = true; - extraConfig = { - pull.rebase = true; - safe.directory = "/etc/nixos"; - diff.external = "${pkgs.difftastic}/bin/difft"; - }; - lfs.enable = true; - aliases = { - a = "add -p"; - co = "checkout"; - cob = "checkout -b"; - f = "fetch -p"; - c = "commit"; - ps = "push"; - pl = "pull"; - rb = "rebase"; - ba = "branch -a"; - bd = "branch -d"; - bD = "branch -D"; - d = "diff"; - dc = "diff --cached"; - ds = "diff --staged"; - rs = "restore"; - rss = "restore --staged"; - s = "status -sb"; - ss = "stash"; - ssp = "stash pop"; - ssl = "stash list"; - ssd = "stash drop"; - # reset - rsoft = "reset --soft"; - rhard = "reset --hard"; - rs1ft = "soft HEAD~1"; - rh1rd = "hard HEAD~1"; - # logging - l = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"; - plog = "log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s'"; - tlog = "log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative"; - rank = "shortlog -sn --no-merges"; - # delete merged branches - bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d"; - }; + includes = [ + { + contents = { + + pull.rebase = true; + diff.external = "${pkgs.difftastic}/bin/difft"; + alias = { + a = "add -p"; + co = "checkout"; + cob = "checkout -b"; + f = "fetch -p"; + c = "commit"; + ps = "push"; + pl = "pull"; + rb = "rebase"; + ba = "branch -a"; + bd = "branch -d"; + bD = "branch -D"; + d = "diff"; + dc = "diff --cached"; + ds = "diff --staged"; + rs = "restore"; + rss = "restore --staged"; + s = "status -sb"; + ss = "stash"; + ssp = "stash pop"; + ssl = "stash list"; + ssd = "stash drop"; + # reset + rsoft = "reset --soft"; + rhard = "reset --hard"; + rs1ft = "soft HEAD~1"; + rh1rd = "hard HEAD~1"; + # logging + l = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"; + plog = "log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s'"; + tlog = "log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative"; + rank = "shortlog -sn --no-merges"; + # delete merged branches + bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d"; + }; + }; + } + ]; }; } diff --git a/users/modules/nushell/default.nix b/users/modules/nushell/default.nix index 4b6d66f..e2baa37 100644 --- a/users/modules/nushell/default.nix +++ b/users/modules/nushell/default.nix @@ -1,75 +1,14 @@ { pkgs, lib, ... }: { + home.shell.enableNushellIntegration = true; + programs.carapace.enable = true; - programs.carapace.enableNushellIntegration = true; programs.nushell = { enable = true; - shellAliases = { - myip = lib.mkForce "echo"; - }; extraEnv = '' source-env ${./prompt.nu} ''; extraConfig = '' - let carapace_completer = {|spans: list| - carapace $spans.0 nushell ...$spans - | from json - | if ($in | default [] | where value == $"($spans | last)ERR" | is-empty) { $in } else { null } - } - $env.CARAPACE_BRIDGES = 'zsh,fish,bash,inshellisense' - - let fish_completer = {|spans| - ${lib.getExe pkgs.fish} --command $'complete "--do-complete=($spans | str join " ")"' - | $"value(char tab)description(char newline)" + $in - | from tsv --flexible --no-infer - } - - let zoxide_completer = {|spans| - $spans | skip 1 | zoxide query -l ...$in | lines | where {|x| $x != $env.PWD} - } - - let multiple_completers = {|spans| - ## alias fixer start https://www.nushell.sh/cookbook/external_completers.html#alias-completions - let expanded_alias = scope aliases - | where name == $spans.0 - | get -i 0.expansion - - let spans = if $expanded_alias != null { - $spans - | skip 1 - | prepend ($expanded_alias | split row ' ' | take 1) - } else { - $spans - } - ## alias fixer end - - match $spans.0 { - __zoxide_z | __zoxide_zi => $zoxide_completer - _ => $carapace_completer - } | do $in $spans - } - - $env.config = { - show_banner: false, - completions: { - case_sensitive: false # case-sensitive completions - quick: true # set to false to prevent auto-selecting completions - partial: true # set to false to prevent partial filling of the prompt - algorithm: "fuzzy" # prefix or fuzzy - external: { - # set to false to prevent nushell looking into $env.PATH to find more suggestions - enable: true - # set to lower can improve completion performance at the cost of omitting some options - max_results: 100 - completer: $multiple_completers - } - } - } - $env.PATH = ($env.PATH | - split row (char esep) | - append /usr/bin/env - ) - source ${./aliases.nu} ''; }; diff --git a/users/modules/sway/default.nix b/users/modules/sway/default.nix index 0c43c53..83b2fdc 100644 --- a/users/modules/sway/default.nix +++ b/users/modules/sway/default.nix @@ -15,6 +15,7 @@ ../rofi # ./swayidle.nix ]; + wayland.windowManager = { sway = let @@ -25,23 +26,16 @@ in { enable = true; - extraSessionCommands = '' - export QT_QPA_PLATFORM=wayland - ''; wrapperFeatures.gtk = true; - extraConfig = '' - exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway - exec xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2 - ''; config = { bars = [ ]; gaps.smartBorders = "on"; - menu = mkRofiCmd [ - "-show" - "drun" - ]; + menu = mkRofiCmd ["-show" "drun"]; modifier = "Mod4"; terminal = config.settings.terminal.binary; + startup = [ + {command = "mkdir -p ${config.home.homeDirectory}/shots";} + ]; keybindings = let mod = config.wayland.windowManager.sway.config.modifier; @@ -64,20 +58,20 @@ "${mod}+q" = "kill"; "${mod}+Shift+e" = "exit"; "${mod}+Shift+r" = "reload"; - # Screenshot and copy it to clipboard + # screenshot and copy it to clipboard "Mod1+s" = '' exec export SFILE="${shotFile}.png" && mkdir -p ${shotDir} && ${grim} "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png ''; - # Save selected area as a picture and copy it to clipboard + # save selected area as a picture and copy it to clipboard "Mod1+Shift+s" = '' exec export SFILE="${shotFile}.png" && mkdir -p ${shotDir} && ${grim} -g "$(${slurp})" "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png ''; - # Record screen + # record screen "Mod1+r" = ''exec mkdir -p ${shotDir} && ${wf-recorder} -x yuv420p -f "${shotFile}.mp4"''; - # Record an area + # record an area "Mod1+Shift+r" = ''exec mkdir -p ${shotDir} && ${wf-recorder} -x yuv420p -g "$(${slurp})" -f "${shotFile}.mp4"''; - # Stop recording + # stop recording "Mod1+c" = "exec pkill -INT wf-recorder"; "XF86AudioRaiseVolume" = "exec ${pactl} set-sink-volume 0 +5%"; "XF86AudioLowerVolume" = "exec ${pactl} set-sink-volume 0 -5%"; @@ -115,6 +109,9 @@ scale = "2"; adaptive_sync = "on"; }; + "DP-1" = { + mode = "1920x1080@165Hz"; + }; "HDMI-A-1" = { mode = "1920x1080@74.973Hz"; }; diff --git a/users/modules/zen/default.nix b/users/modules/zen/default.nix new file mode 100644 index 0000000..a883ec2 --- /dev/null +++ b/users/modules/zen/default.nix @@ -0,0 +1,3 @@ +{terra, ...}: { + home.packages = [terra.zen-browser]; +} diff --git a/users/modules/zoxide/default.nix b/users/modules/zoxide/default.nix index 0250695..c4b4530 100644 --- a/users/modules/zoxide/default.nix +++ b/users/modules/zoxide/default.nix @@ -1,14 +1,3 @@ { - pkgs, - config, - lib, - ... -}: -{ - home.packages = [ pkgs.zoxide ]; - home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = - lib.singleton ".local/share/zoxide"; - programs.zsh.initExtra = '' - eval "$(zoxide init zsh)" - ''; + programs.zoxide.enable = true; }