diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 89b3a77..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -secrets.nix diff --git a/flake.lock b/flake.lock index 63b07e6..40790eb 100644 --- a/flake.lock +++ b/flake.lock @@ -1,26 +1,25 @@ { "nodes": { - "agenix": { + "VSTSpeek": { "inputs": { - "darwin": "darwin", - "home-manager": "home-manager", + "flake-parts": "flake-parts", "nixpkgs": [ "nixpkgs" ], - "systems": "systems" + "nixpkgs-qt4": "nixpkgs-qt4" }, "locked": { - "lastModified": 1770165109, - "narHash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=", - "owner": "ryantm", - "repo": "agenix", - "rev": "b027ee29d959fda4b60b57566d64c98a202e0feb", - "type": "github" + "lastModified": 1779820772, + "narHash": "sha256-KM48WAYinqjL/dCYSpJ5KobQgLavFN4T4d5J0bw518g=", + "ref": "refs/heads/main", + "rev": "9a0b486ff8325ce18dedc1cc485bc82dec050b26", + "revCount": 2, + "type": "git", + "url": "https://dario48.site/git/Dario48/VSTSpeek_flake.git" }, "original": { - "owner": "ryantm", - "repo": "agenix", - "type": "github" + "type": "git", + "url": "https://dario48.site/git/Dario48/VSTSpeek_flake.git" } }, "assets": { @@ -39,41 +38,54 @@ "url": "https://dario48.site/git/Dario48/NixOs.git" } }, - "darwin": { + "flake-parts": { "inputs": { - "nixpkgs": [ - "agenix", - "nixpkgs" - ] + "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1744478979, - "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "43975d782b418ebf4969e9ccba82466728c2851b", + "lastModified": 1778716662, + "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", "type": "github" }, "original": { - "owner": "lnl7", - "ref": "master", - "repo": "nix-darwin", + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1778716662, + "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, "home-manager": { "inputs": { "nixpkgs": [ - "agenix", "nixpkgs" ] }, "locked": { - "lastModified": 1745494811, - "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", + "lastModified": 1780408569, + "narHash": "sha256-s7Tv6FUQThRAvW8En8XVC6HMb0uiikzVccCcCo9u/Bg=", "owner": "nix-community", "repo": "home-manager", - "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", + "rev": "f384af1bec6423a0d4ba1855917ab948f64e5808", "type": "github" }, "original": { @@ -82,34 +94,53 @@ "type": "github" } }, - "home-manager_2": { + "hypr-kdeconnect-fix": { "inputs": { + "flake-parts": "flake-parts_2", + "hypr-kdeconnect-src": "hypr-kdeconnect-src", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1776046499, - "narHash": "sha256-Wzc4nn07/0RL21ypPHRzNDQZcjhIC8LaYo7QJQjM5T4=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "287f84846c1eb3b72c986f5f6bebcff0bd67440d", + "lastModified": 1779759680, + "narHash": "sha256-V+8WW3/lbTtZa3GL+rSjKp8kJB3IxMshI1MVkxkfOSA=", + "owner": "niversesu", + "repo": "hypr-kdeconnect-nix", + "rev": "2d20425231c8855d08aabf15cf3390a75ebb3ccf", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "home-manager", + "owner": "niversesu", + "repo": "hypr-kdeconnect-nix", + "type": "github" + } + }, + "hypr-kdeconnect-src": { + "flake": false, + "locked": { + "lastModified": 1778039172, + "narHash": "sha256-OW18+pO92XvlTLrHo+S9/EVUophr5Dl1GdGJcmVAq/o=", + "owner": "gfhdhytghd", + "repo": "hypr-kdeconnect-fix", + "rev": "ea55f66c8238235983d60d381bf2abe1fed50043", + "type": "github" + }, + "original": { + "owner": "gfhdhytghd", + "repo": "hypr-kdeconnect-fix", + "rev": "ea55f66c8238235983d60d381bf2abe1fed50043", "type": "github" } }, "neovim-dotfiles": { "flake": false, "locked": { - "lastModified": 1776173490, - "narHash": "sha256-fMWrBOttar0TfXOoC2wKEYhy6IFfNQJ407eBlwPx/9A=", + "lastModified": 1776506355, + "narHash": "sha256-I5q6LgrG+UzVv0mETCuxjY6hRCYbMr50VILTMXVgvXA=", "ref": "main", - "rev": "9ea7b0dafccd5be1036cfc533e811755d20b59f8", - "revCount": 47, + "rev": "0024c6cb2ec01b419c0782621351091a579cb2e7", + "revCount": 48, "type": "git", "url": "https://dario48.site/git/Dario48/neovim-dotfiles.git" }, @@ -121,11 +152,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1775710090, - "narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=", + "lastModified": 1780243769, + "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4c1018dae018162ec878d42fec712642d214fdfa", + "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", "type": "github" }, "original": { @@ -135,64 +166,165 @@ "type": "github" } }, - "plasma-manager": { - "inputs": { - "home-manager": [ - "home-manager" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, + "nixpkgs-lib": { "locked": { - "lastModified": 1775856943, - "narHash": "sha256-b7Mp7P+q2Md5AGt4rjHfMcBykzMumFTen10ST++AuTU=", + "lastModified": 1777168982, + "narHash": "sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ=", "owner": "nix-community", - "repo": "plasma-manager", - "rev": "a524a6160e6df89f7673ba293cf7d78b559eb1a5", + "repo": "nixpkgs.lib", + "rev": "f5901329dade4a6ea039af1433fb087bd9c1fe14", "type": "github" }, "original": { "owner": "nix-community", - "repo": "plasma-manager", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-lib_2": { + "locked": { + "lastModified": 1777168982, + "narHash": "sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "f5901329dade4a6ea039af1433fb087bd9c1fe14", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-qt4": { + "locked": { + "lastModified": 1688392541, + "narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "noctalia": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "noctalia-qs": "noctalia-qs" + }, + "locked": { + "lastModified": 1780371321, + "narHash": "sha256-WCaU6npdMdjZSZHe3XATNDFijmzRnsV8V+iR80e5deg=", + "owner": "noctalia-dev", + "repo": "noctalia-shell", + "rev": "3aab45a2f34fd47666b05892b95054952e788de1", + "type": "github" + }, + "original": { + "owner": "noctalia-dev", + "repo": "noctalia-shell", + "type": "github" + } + }, + "noctalia-qs": { + "inputs": { + "nixpkgs": [ + "noctalia", + "nixpkgs" + ], + "systems": "systems", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1780194487, + "narHash": "sha256-M+YtjKCTkHrkplNaKVyaxfa8hAWjRF6wFOUBAZvxQ4U=", + "owner": "noctalia-dev", + "repo": "noctalia-qs", + "rev": "07398e12b54f194e3a2d47c87e3fd10b8eeaa27d", + "type": "github" + }, + "original": { + "owner": "noctalia-dev", + "repo": "noctalia-qs", "type": "github" } }, "root": { "inputs": { - "agenix": "agenix", + "VSTSpeek": "VSTSpeek", "assets": "assets", - "home-manager": "home-manager_2", + "home-manager": "home-manager", + "hypr-kdeconnect-fix": "hypr-kdeconnect-fix", "neovim-dotfiles": "neovim-dotfiles", "nixpkgs": "nixpkgs", - "plasma-manager": "plasma-manager", - "secrets": "secrets", - "zen-browser": "zen-browser" + "noctalia": "noctalia", + "sops-nix": "sops-nix", + "zen-browser": "zen-browser", + "zig": "zig", + "zls": "zls" } }, - "secrets": { + "sops-nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, "locked": { - "path": "./secrets", - "type": "path" + "lastModified": 1780547341, + "narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=", + "owner": "Mic92", + "repo": "sops-nix", + "rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a", + "type": "github" }, "original": { - "path": "./secrets", - "type": "path" - }, - "parent": [] + "owner": "Mic92", + "repo": "sops-nix", + "type": "github" + } }, "systems": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "noctalia", + "noctalia-qs", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1775636079, + "narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", "type": "github" } }, @@ -203,11 +335,11 @@ ] }, "locked": { - "lastModified": 1775710180, - "narHash": "sha256-sCokvdNvl8zIzsnjgG0TN5h3RUI7GJyWW9ErfmEj0rM=", + "lastModified": 1779946062, + "narHash": "sha256-M/2bCPYjiBTkDNV29J/00z10RM3yYnL9X74RqAHDme0=", "owner": "youwen5", "repo": "zen-browser-flake", - "rev": "2c138beb648d1cbbfae76695a8230ee04e4db25a", + "rev": "2e2c38ba20a3d614d0196e0aa44851547306e861", "type": "github" }, "original": { @@ -215,6 +347,50 @@ "repo": "zen-browser-flake", "type": "github" } + }, + "zig": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1780375031, + "narHash": "sha256-G+sBa11p+uPoF7RtwcG/sELMOPB6707cBaMrV99elIQ=", + "owner": "silversquirl", + "repo": "zig-flake", + "rev": "411c18b87d490b5da2a3c8641ff103ffe605447e", + "type": "github" + }, + "original": { + "owner": "silversquirl", + "repo": "zig-flake", + "type": "github" + } + }, + "zls": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "zig-flake": [ + "zig" + ] + }, + "locked": { + "lastModified": 1776368637, + "narHash": "sha256-k0xWObsw9K12BKfK+UB5TieWDFEFfBQhN1X1NO35fWk=", + "owner": "zigtools", + "repo": "zls", + "rev": "494486203c3a48927f2383aa3d5ce5fca112186d", + "type": "github" + }, + "original": { + "owner": "zigtools", + "ref": "0.16.0", + "repo": "zls", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 6dcc657..1c4d734 100644 --- a/flake.nix +++ b/flake.nix @@ -11,8 +11,17 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - agenix = { - url = "github:ryantm/agenix"; + sops-nix = { + url = "github:Mic92/sops-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + hypr-kdeconnect-fix = { + url = "github:niversesu/hypr-kdeconnect-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + noctalia = { + url = "github:noctalia-dev/noctalia-shell"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -21,681 +30,1375 @@ flake = false; }; - plasma-manager = { - url = "github:nix-community/plasma-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.home-manager.follows = "home-manager"; - }; + #plasma-manager = { + # url = "github:nix-community/plasma-manager"; + # inputs.nixpkgs.follows = "nixpkgs"; + # inputs.home-manager.follows = "home-manager"; + #}; + # in inputs assets.url = "git+https://dario48.site/git/Dario48/NixOs.git?ref=assets"; - secrets.url = "./secrets"; + + zig = { + url = "github:silversquirl/zig-flake"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; + zls = { + url = "github:zigtools/zls/0.16.0"; + inputs = { + nixpkgs.follows = "nixpkgs"; + zig-flake.follows = "zig"; + }; + }; + VSTSpeek = { + url = "git+https://dario48.site/git/Dario48/VSTSpeek_flake.git"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; }; - outputs = - { - self, - nixpkgs, - home-manager, - agenix, - ... - }@inputs: - { - nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - modules = [ - agenix.nixosModules.default - # configure.nix {{{ - ( - { - config, - pkgs, - inputs, - lib, - ... - }: - let - # Zen conf {{{ - extension = shortId: guid: { - name = guid; - value = { - install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi"; - installation_mode = "normal_installed"; - }; - }; - prefs = { - # Check these out at about:config - "zen.theme.content-element-separation" = 0; - # ... + outputs = { + self, + nixpkgs, + home-manager, + ... + } @ inputs: { + nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + modules = [ + inputs.hypr-kdeconnect-fix.nixosModules.default + inputs.sops-nix.nixosModules.sops + # configure.nix {{{ + ( + { + config, + pkgs, + inputs, + lib, + ... + }: let + # Zen conf {{{ + system = pkgs.stdenv.hostPlatform.system; + extension = shortId: guid: { + name = guid; + value = { + install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi"; + installation_mode = "normal_installed"; }; + }; + prefs = { + # Check these out at about:config + "zen.theme.content-element-separation" = 0; + # ... + }; - extensions = [ - # To add additional extensions, find it on addons.mozilla.org, find - # the short ID in the url (like https://addons.mozilla.org/en-US/firefox/addon/!SHORT_ID!/) - # Then go to https://addons.mozilla.org/api/v5/addons/addon/!SHORT_ID!/ to get the guid - (extension "ublock-origin" "uBlock0@raymondhill.net") - (extension "bitwarden-password-manager" "{446900e4-71c2-419f-a6a7-df9c091e268b}") - # ... - ]; + extensions = [ + # To add additional extensions, find it on addons.mozilla.org, find + # the short ID in the url (like https://addons.mozilla.org/en-US/firefox/addon/!SHORT_ID!/) + # Then go to https://addons.mozilla.org/api/v5/addons/addon/!SHORT_ID!/ to get the guid + (extension "ublock-origin" "uBlock0@raymondhill.net") + (extension "bitwarden-password-manager" "{446900e4-71c2-419f-a6a7-df9c091e268b}") + # ... + ]; - zen = ( - pkgs.wrapFirefox - inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser-unwrapped - { - extraPrefs = lib.concatLines ( - lib.mapAttrsToList ( - name: value: "lockPref(${lib.strings.toJSON name}, ${lib.strings.toJSON value});" - ) prefs - ); - extraPolicies = { - DisableTelemetry = true; - ExtensionSettings = builtins.listToAttrs extensions; + zen = ( + pkgs.wrapFirefox inputs.zen-browser.packages.${system}.zen-browser-unwrapped { + extraPrefs = lib.concatLines ( + lib.mapAttrsToList ( + name: value: "lockPref(${lib.strings.toJSON name}, ${lib.strings.toJSON value});" + ) + prefs + ); + extraPolicies = { + DisableTelemetry = true; + ExtensionSettings = builtins.listToAttrs extensions; - SearchEngines = { - Default = "Kagi"; - Add = [ - { - Name = "Kagi"; - URLTemplate = "https://kagi.com/search?q={searchTerms}"; - IconURL = "https://kagi.com/favicon.ico"; - Alias = "@k"; - } - { - Name = "MDN"; - URLTemplate = "https://developer.mozilla.org/en-US/search?q={searchTerms}"; - IconURL = "https://developer.mozilla.org/static/img/opengraph-logo.72382e605ce3.png"; - Alias = "mdn"; - } - { - Name = "nixpkgs packages"; - URLTemplate = "https://search.nixos.org/packages?query={searchTerms}"; - IconURL = "https://wiki.nixos.org/favicon.ico"; - Alias = "@np"; - } - { - Name = "NixOS options"; - URLTemplate = "https://search.nixos.org/options?query={searchTerms}"; - IconURL = "https://wiki.nixos.org/favicon.ico"; - Alias = "@no"; - } - { - Name = "NixOS Wiki"; - URLTemplate = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; - IconURL = "https://wiki.nixos.org/favicon.ico"; - Alias = "@nw"; - } - { - Name = "noogle"; - URLTemplate = "https://noogle.dev/q?term={searchTerms}"; - IconURL = "https://noogle.dev/favicon.ico"; - Alias = "@ng"; - } - ]; - }; - }; - } - ); - # }}} - in - { - imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - environment.sessionVariables = { - KWIN_DRM_NO_AMS = 1; - KWIN_FORCE_SW_CURSOR = "1"; # decouple cursor from DRM pipeline - __GL_VRR_ALLOWED = "0"; - #KWIN_DRM_DISABLE_TRIPLE_BUFFERING = "1"; - }; - hardware = { - bluetooth.enable = true; - - graphics.enable = true; - nvidia = { - # see the note below - open = false; # see the note above - modesetting.enable = true; - powerManagement.enable = true; - prime = { - offload = { - enable = true; - enableOffloadCmd = true; - }; - - nvidiaBusId = "PCI:1@0:0:0"; - amdgpuBusId = "PCI:5@0:0:0"; + SearchEngines = { + Default = "Kagi"; + Add = [ + { + Name = "Kagi"; + URLTemplate = "https://kagi.com/search?q={searchTerms}"; + IconURL = "https://kagi.com/favicon.ico"; + Alias = "@k"; + } + { + Name = "MDN"; + URLTemplate = "https://developer.mozilla.org/en-US/search?q={searchTerms}"; + IconURL = "https://developer.mozilla.org/static/img/opengraph-logo.72382e605ce3.png"; + Alias = "mdn"; + } + { + Name = "nixpkgs packages"; + URLTemplate = "https://search.nixos.org/packages?query={searchTerms}"; + IconURL = "https://wiki.nixos.org/favicon.ico"; + Alias = "@np"; + } + { + Name = "NixOS options"; + URLTemplate = "https://search.nixos.org/options?query={searchTerms}"; + IconURL = "https://wiki.nixos.org/favicon.ico"; + Alias = "@no"; + } + { + Name = "NixOS Wiki"; + URLTemplate = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; + IconURL = "https://wiki.nixos.org/favicon.ico"; + Alias = "@nw"; + } + { + Name = "noogle"; + URLTemplate = "https://noogle.dev/q?term={searchTerms}"; + IconURL = "https://noogle.dev/favicon.ico"; + Alias = "@ng"; + } + ]; }; }; - }; - services.xserver.videoDrivers = [ - "nvidia" - "amdgpu" - ]; - boot.kernelParams = [ "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ]; + } + ); + # }}} + in { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + services.hypr-kdeconnect-fix.enable = true; - # Use latest kernel. - boot.kernelPackages = pkgs.linuxPackages_latest; + environment.sessionVariables = { + MANPAGER = "nvim +Man!"; + KWIN_DRM_NO_SLEEP_DETECTION = "1"; + KWIN_DRM_NO_AMS = 1; + KWIN_DRM_DONT_FORCE_AMD_GPU = "1"; # try this too + # KWIN_FORCE_SW_CURSOR = "1"; # decouple cursor from DRM pipeline + # __GL_VRR_ALLOWED = "0"; + #KWIN_DRM_DISABLE_TRIPLE_BUFFERING = "1"; + }; + services.power-profiles-daemon.enable = true; + services.upower.enable = true; + hardware = { + keyboard.qmk.enable = true; + bluetooth.enable = true; - networking.hostName = "nixos"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - networking.hosts = { - }; - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Enable networking - networking.networkmanager = { - enable = true; - ensureProfiles.profiles = { - eduroam = { - connection = { - id = "eduroam"; - type = "wifi"; - interface-name = "wlo1"; # # replace with your interface-name as displayed by "ip a" - }; - wifi = { - mode = "infrastructure"; - ssid = "eduroam"; - }; - wifi-security = { - group = "ccmp"; - pairwise = "ccmp"; - proto = "rsn"; - key-mgmt = "wpa-eap"; - }; - "802-1x" = { - altsubject_match = "DNS:eduroam.unimi.it"; - # # not all or even some additional values may be needed here according to your institution - eap = "peap"; # # adapt according to your universities setup - anonimous-identity = inputs.secrets.eduroam.username; - identity = inputs.secrets.eduroam.username; - password = inputs.secrets.eduroam.password; - phase2-auth = "mschapv2"; - ca-cert = "/etc/ssl/certs/eduroam/cert.pem"; - ca-path = "/etc/ssl/certs/eduroam/"; - }; - ipv4 = { - method = "auto"; - }; - ipv6 = { - method = "auto"; - }; + graphics.enable = true; + nvidia = { + # see the note below + open = false; # see the note above + modesetting.enable = true; + powerManagement.enable = true; + prime = { + offload = { + enable = true; + enableOffloadCmd = true; }; + + nvidiaBusId = "PCI:1@0:0:0"; + amdgpuBusId = "PCI:5@0:0:0"; }; }; + }; + services.xserver.videoDrivers = [ + "nvidia" + "amdgpu" + ]; + boot.kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"]; + boot.kernel.sysctl."fs.inotify.max_user_watches" = 524288; - # Set your time zone. - time.timeZone = "Europe/Rome"; + services.sunshine = { + enable = true; + autoStart = true; + capSysAdmin = true; # only needed for Wayland -- omit this when using with Xorg + openFirewall = true; + }; - # Select internationalisation properties. - i18n.defaultLocale = "en_GB.UTF-8"; + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; - i18n.extraLocaleSettings = { - LC_ADDRESS = "it_IT.UTF-8"; - LC_IDENTIFICATION = "it_IT.UTF-8"; - LC_MEASUREMENT = "it_IT.UTF-8"; - LC_MONETARY = "it_IT.UTF-8"; - LC_NAME = "it_IT.UTF-8"; - LC_NUMERIC = "it_IT.UTF-8"; - LC_PAPER = "it_IT.UTF-8"; - LC_TELEPHONE = "it_IT.UTF-8"; - LC_TIME = "it_IT.UTF-8"; - }; + # Use latest kernel. + boot.kernelPackages = pkgs.linuxPackages_latest; - # Enable the X11 windowing system. - # You can disable this if you're only using the Wayland session. - services.xserver.enable = true; + networking.hostName = "nixos"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - # Enable the KDE Plasma Desktop Environment. - services.displayManager.plasma-login-manager = { + networking.hosts = { + }; + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + security.pam.services.regreet.kwallet.enable = true; + programs.regreet = { + enable = true; + }; + sops = { + defaultSopsFile = ./secrets/sops.yaml; + age.keyFile = "/var/lib/sops-nix/key.txt"; + secrets."eduroam/password" = {}; + secrets."eduroam/username" = {}; + }; + system.activationScripts.eduroamNM = { + deps = ["sops"]; + text = '' + install -Dm600 /dev/stdin /etc/NetworkManager/system-connections/eduroam.nmconnection << EOF + [connection] + id=eduroam + type=wifi + interface-name=wlo1 + + [wifi] + ssid=eduroam + mode=infrastructure + + [wifi-security] + key-mgmt=wpa-eap + group=ccmp + pairwise=ccmp + proto=rsn + + [802-1x] + eap=peap + anonymous-identity=$(cat ${config.sops.secrets."eduroam/username".path}) + identity=$(cat ${config.sops.secrets."eduroam/username".path}) + password=$(cat ${config.sops.secrets."eduroam/password".path}) + phase2-auth=mschapv2 + ca-cert=/etc/ssl/certs/eduroam/cert.pem + ca-path=/etc/ssl/certs/eduroam/ + altsubject-match=DNS:eduroam.unimi.it + + [ipv4] + method=auto + + [ipv6] + method=auto + EOF + ''; + }; + networking.networkmanager = { + enable = true; + }; + + # Set your time zone. + time.timeZone = "Europe/Rome"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_GB.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "it_IT.UTF-8"; + LC_IDENTIFICATION = "it_IT.UTF-8"; + LC_MEASUREMENT = "it_IT.UTF-8"; + LC_MONETARY = "it_IT.UTF-8"; + LC_NAME = "it_IT.UTF-8"; + LC_NUMERIC = "it_IT.UTF-8"; + LC_PAPER = "it_IT.UTF-8"; + LC_TELEPHONE = "it_IT.UTF-8"; + LC_TIME = "it_IT.UTF-8"; + }; + + # Enable the X11 windowing system. + # You can disable this if you're only using the Wayland session. + services.xserver.enable = true; + + # Enable the KDE Plasma Desktop Environment. + #services.displayManager.plasma-login-manager = { + # enable = true; + #}; + #services.desktopManager.plasma6.enable = true; + + programs.hyprland = { + enable = true; + withUWSM = true; # recommended for most users + xwayland.enable = true; # Xwayland can be disabled. + }; + xdg.portal = { + enable = true; + extraPortals = with pkgs; [xdg-desktop-portal-hyprland]; + }; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "eu"; + variant = ""; + }; + + # Enable CUPS to print documents. + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + services.printing = { + enable = true; + drivers = with pkgs; [ + cups-filters + cups-browsed + ]; + }; + services.system-config-printer.enable = true; + + services.privoxy = { + enable = true; + enableTor = true; + }; + services.tor = { + enable = true; + openFirewall = true; + torsocks.enable = true; + client = { enable = true; }; - services.desktopManager.plasma6.enable = true; + }; - # Configure keymap in X11 - services.xserver.xkb = { - layout = "eu"; - variant = ""; - }; + # Enable sound with pipewire. + services.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; - # Enable CUPS to print documents. - services.printing.enable = true; + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; - # Enable sound with pipewire. - services.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; - }; + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.dario48 = { + isNormalUser = true; + description = "Dario48"; + extraGroups = [ + "libvirtd" + "networkmanager" + "wheel" + "uinput" + ]; + packages = with pkgs; [ + hyprshutdown + grim - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; + kdePackages.kate + vesktop + ghidra-bin + pwntools - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.dario48 = { - isNormalUser = true; - description = "Dario48"; - extraGroups = [ - "networkmanager" - "wheel" - ]; - packages = with pkgs; [ - kdePackages.kate - vesktop - ghidra-bin - pwntools + mpvScripts.mpris + jellyfin-mpv-shim + mpv - pkgs.agenix-cli + dino - gimp + gimp - unzip + unzip - wireguard-tools - # patch elf files to work - binutils - stdenv - nix-index - patchelf - # thunderbird - ]; - }; + wireguard-tools + # patch elf files to work + binutils + stdenv + nix-index + patchelf + # thunderbird - programs.nix-ld = { - enable = true; - libraries = with pkgs; [ - gcc - ]; - }; + jellyfin-desktop + jellyfin-rpc - fonts.packages = - with pkgs; - [ ] - ++ (with nerd-fonts; [ - iosevka-term - ]); + tor-browser + element-desktop - # Install firefox. - programs.firefox.enable = true; + (wrapOBS { + plugins = with pkgs.obs-studio-plugins; [ + obs-pipewire-audio-capture + obs-gstreamer + obs-gstreamer + ]; + }) + ]; + }; + programs.obs-studio.enableVirtualCamera = true; - # Allow unfree packages - nixpkgs.config.allowUnfree = true; + virtualisation.libvirtd.enable = true; + virtualisation.libvirtd.qemu = { + swtpm.enable = true; + }; - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget - git - sweet-nova - zen - tree-sitter + programs.virt-manager.enable = true; + networking.firewall.trustedInterfaces = ["virbr0"]; + networking.firewall.allowedTCPPorts = [5900]; + + programs.direnv.enable = true; + + programs.steam = { + enable = true; + gamescopeSession.enable = true; + extraCompatPackages = with pkgs; [ + proton-ge-bin + ]; + }; + programs.gamemode.enable = true; + programs.gamescope = { + enable = true; + capSysNice = false; + }; + services.ananicy = { + enable = true; + package = pkgs.ananicy-cpp; + rulesProvider = pkgs.ananicy-cpp; + extraRules = [ + { + "name" = "gamescope"; + "nice" = -20; + } + ]; + }; + programs.steam.protontricks.enable = true; + + programs.dconf.enable = true; + programs.nix-ld = { + enable = true; + libraries = with pkgs; [ gcc - man-pages - man-pages-posix - python3 - - ripgrep - - blesh - - sshfs - - wl-clipboard - - cargo - rustc - - luajit ]; + }; - programs.bash.blesh.enable = true; + fonts.packages = with pkgs; + [] + ++ (with nerd-fonts; [ + iosevka-term + ]); - documentation.dev.enable = true; + # Install firefox. + programs.firefox.enable = true; - programs.neovim = { - enable = true; - vimAlias = true; - viAlias = true; - defaultEditor = true; + # Allow unfree packages + nixpkgs.config = { + allowUnfree = true; + cudaSupport = true; + }; + nixpkgs.overlays = [ + inputs.VSTSpeek.overlays.default + (self: super: { + zig = inputs.zig.packages.${system}.zig_0_16_0; + zls = inputs.zls.packages.${system}.zls; + zen = zen; + wayvnc = pkgs.symlinkJoin { + name = "wayvnc-wrapped"; + paths = [super.wayvnc]; + buildInputs = [super.makeWrapper]; + postBuild = '' + wrapProgram $out/bin/wayvnc --add-flags "--output=eDP-1" + ''; + }; + element-desktop = super.symlinkJoin { + name = "element-desktop"; + paths = [super.element-desktop]; + buildInputs = [pkgs.makeWrapper]; + postBuild = '' + wrapProgram $out/bin/element-desktop --set HTTPS_PROXY 127.0.0.1:8118 --set HTTP_PROXY 127.0.0.1:8118 + ''; + }; + dino = super.symlinkJoin { + name = "dino"; + paths = [ + ( + pkgs.writeShellScriptBin "dino" '' + exec ${pkgs.torsocks}/bin/torsocks ${super.dino}/bin/dino "$@" + '' + ) + super.dino + ]; + }; + jellyfin-desktop = super.symlinkJoin { + name = "jellyfin-desktop"; + paths = [ + ( + pkgs.writeShellScriptBin "jellyfin-desktop" '' + exec nvidia-offload ${super.jellyfin-desktop}/bin/jellyfin-desktop "$@" + '' + ) + super.jellyfin-desktop + ]; + }; + inherit + (super.lixPackageSets.stable) + nixpkgs-review + nix-eval-jobs + nix-fast-build + colmena + ; + }) + ]; - configure.customLuaRC = '' - vim.opt.runtimepath:prepend("${inputs.neovim-dotfiles}") - vim.opt.runtimepath:append("${inputs.neovim-dotfiles}/after") - package.path = "${inputs.neovim-dotfiles}/?.lua;" .. - "${inputs.neovim-dotfiles}/?/init.lua;" .. - package.path + nix.package = pkgs.lixPackageSets.stable.lix; - dofile("${inputs.neovim-dotfiles}/init.lua") - ''; - # configure = { - # customLuaRC = '' - # -- Add your config directory to package.path - # package.path = package.path .. ";${inputs.neovim-dotfiles}/?.lua;${nvim-config}/?/init.lua" + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = + with pkgs; + [ + kdePackages.kwallet + kdePackages.kwalletmanager + kdePackages.kwallet-pam + libsecret - # -- Source the main init.lua - # dofile("${inputs.neovim-dotfiles}/init.lua") - # ''; + swtpm + dnsmasq # libvirt - # }; - }; + zen + zig + zls + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + git + sweet-nova + tree-sitter + gcc + man-pages + man-pages-posix + python3 - nix.settings.experimental-features = [ + ripgrep + + blesh + + sshfs + + wl-clipboard + + cargo + rustc + + luajit + + via + openrgb-with-all-plugins + ] + ++ [ + reaper + reaper-sws-extension + reaper-reapack-extension + VSTSpeek + ] + # music making + ; + services.udev = { + enable = true; + packages = with pkgs; [via]; + extraRules = '' + #------------------------# + #Glorious GMMK3 100% ANSI# + #------------------------# + SUBSYSTEMS=="usb|hidraw", ATTRS{idVendor}=="504b", ATTRS{idProduct}=="320f", TAG+="uaccess", TAG+="Glorious_GMMK_100_ANSI" + + ''; + }; + services.hardware.openrgb.enable = true; + + programs.bash.blesh.enable = true; + + documentation.dev.enable = true; + + programs.neovim = { + enable = true; + vimAlias = true; + viAlias = true; + defaultEditor = true; + + configure.customLuaRC = '' + vim.opt.runtimepath:prepend("${inputs.neovim-dotfiles}") + vim.opt.runtimepath:append("${inputs.neovim-dotfiles}/after") + package.path = "${inputs.neovim-dotfiles}/?.lua;" .. + "${inputs.neovim-dotfiles}/?/init.lua;" .. + package.path + + dofile("${inputs.neovim-dotfiles}/init.lua") + ''; + # configure = { + # customLuaRC = '' + # -- Add your config directory to package.path + # package.path = package.path .. ";${inputs.neovim-dotfiles}/?.lua;${nvim-config}/?/init.lua" + + # -- Source the main init.lua + # dofile("${inputs.neovim-dotfiles}/init.lua") + # ''; + + # }; + }; + + nix.settings = { + substituters = [ + "https://cache.nixos-cuda.org" + ]; + trusted-public-keys = [ + "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" + ]; + trusted-users = ["dario48"]; + experimental-features = [ "nix-command" "flakes" ]; + }; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; - # List services that you want to enable: + # List services that you want to enable: - # Enable the OpenSSH daemon. - services.openssh.enable = true; + # Enable the OpenSSH daemon. + services.openssh.enable = true; - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "25.11"; # Did you read the comment? - } - ) - # }}} - # home.nix {{{ - home-manager.nixosModules.default - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - sharedModules = [ - inputs.plasma-manager.homeModules.plasma-manager + # Open ports in the firewall. + networking.firewall = { + allowedTCPPortRanges = [ + { + from = 1714; + to = 1764; + } ]; - users.dario48 = ( + allowedUDPPortRanges = [ { - config, - pkgs, - ... - }: - { - services = { - mpris-proxy.enable = true; - arrpc.enable = true; - }; + from = 1714; + to = 1764; + } + ]; + }; - programs = { - # plasma {{{ - plasma = { - enable = true; - fonts.fixedWidth = { - family = "IosevkaTerm Nerd Font Mono"; - pointSize = 11; - }; - hotkeys.commands = { - "kitty" = { - name = "launch kitty"; - key = "Alt+Return"; - command = "kitty"; + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "25.11"; # Did you read the comment? + } + ) + # }}} + # home.nix {{{ + home-manager.nixosModules.default + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + sharedModules = [ + #inputs.plasma-manager.homeModules.plasma-manager + ]; + users.dario48 = ( + { + config, + pkgs, + ... + }: { + imports = [ + inputs.hypr-kdeconnect-fix.homeManagerModules.default + inputs.noctalia.homeModules.default + ]; + services = { + mpris-proxy.enable = true; + arrpc.enable = true; + kdeconnect.enable = true; + # eeasyeffects {{{ + easyeffects = { + enable = true; + extraPresets = { + default-input = { + # input {{{ + input = { + blocklist = []; + plugins_order = [ + "rnnoise#0" + ]; + "rnnoise#0" = { + bypass = false; + enable-vad = true; + input-gain = 0.0; + model-name = ""; + output-gain = 0.0; + release = 20.0; + use-standard-model = true; + vad-thres = 50.0; + wet = 1.0; + }; }; + # }}} + }; + default-output = { + # output {{{ + output = { + "bass_enhancer#0" = { + amount = 1.0; + blend = -10.0; + bypass = false; + floor = 20.0; + floor-active = false; + harmonics = 8.5; + input-gain = 0.0; + output-gain = 0.0; + scope = 100.0; + }; + blocklist = []; + "crystalizer#0" = { + adaptive-intensity = true; + band0 = { + bypass = false; + intensity = 0.0; + mute = false; + }; + band1 = { + bypass = false; + intensity = 0.0; + mute = false; + }; + band10 = { + bypass = false; + intensity = 0.0; + mute = false; + }; + band11 = { + bypass = false; + intensity = 0.0; + mute = false; + }; + band12 = { + bypass = false; + intensity = 0.0; + mute = false; + }; + band2 = { + bypass = false; + intensity = -2.0; + mute = false; + }; + band3 = { + bypass = false; + intensity = 0.0; + mute = false; + }; + band4 = { + bypass = false; + intensity = 0.0; + mute = false; + }; + band5 = { + bypass = false; + intensity = 0.0; + mute = false; + }; + band6 = { + bypass = false; + intensity = 0.0; + mute = false; + }; + band7 = { + bypass = false; + intensity = 0.0; + mute = false; + }; + band8 = { + bypass = false; + intensity = 0.0; + mute = false; + }; + band9 = { + bypass = false; + intensity = 0.0; + mute = false; + }; + bypass = false; + fixed-quantum = false; + input-gain = 0.0; + output-gain = 0.0; + oversampling = true; + oversampling-quality = 5.0; + transition-band = 120.0; + }; + plugins_order = [ + "crystalizer#0" + "bass_enhancer#0" + ]; + }; + # }}} + }; + }; + }; + # }}} + }; + # hyprland {{{ + services.hypr-kdeconnect-fix = { + enable = true; + compositor = "hyprland"; + }; + services.hyprpolkitagent.enable = true; + programs.noctalia-shell = { + enable = true; + }; + programs.satty.enable = true; + services.cliphist.enable = true; + services.wayvnc = { + enable = true; + autoStart = true; + settings = { + address = "0.0.0.0"; + port = 5900; + }; + }; + wayland.windowManager.hyprland = let + lua = pkgs.lib.generators.mkLuaInline; + toLua = pkgs.lib.generators.toLua {}; + exec = prg: lua "hl.dsp.exec_cmd(\"${prg}\")"; + function = prg: lua "function() \n${prg}\nend"; + ipc = opt: exec "noctalia-shell ipc call ${opt}"; + mod = key: lua "mod .. \" + ${key}\""; + lmb = "mouse:272"; + rmb = "mouse:273"; + mmb = "mouse:274"; + in { + enable = true; + package = null; + portalPackage = null; + configType = "lua"; + systemd.enable = false; + settings = { + mod = { + _var = "SUPER"; + }; + + config = { + general = { + gaps_in = 0; + gaps_out = 0; + border_size = 0; + }; + + dwindle = { + preserve_split = true; + precise_mouse_move = true; + }; + + decoration = { + rounding = 1; }; input = { - keyboard = { - layouts = [ { layout = "eu"; } ]; - options = [ "caps:esc" ]; - }; - mice = [ + kb_layout = "eu"; + touchpad.natural_scroll = true; + }; + }; + + gesture = [ + { + _args = [ { - name = "Logitech USB Optical Mouse"; - vendorId = "046d"; - productId = "c077"; - naturalScroll = true; + fingers = 3; + direction = "horizontal"; + action = "workspace"; } ]; - touchpads = [ + } + ]; + + monitor = [ + { + _args = [ { - vendorId = "04f3"; - productId = "3298"; - name = "ELAN07C9:00 04F3:3298 Touchpad"; - disableWhileTyping = false; - naturalScroll = true; + output = "desc:AOC Q24G2 ZQVPAHA000946"; + mode = "2560x1440@144"; + position = "1920x0"; + scale = "1"; } ]; - }; - krunner = { - position = "top"; - shortcuts.launch = "Meta"; - }; - kscreenlocker = { - appearance.wallpaper = "${inputs.assets.wallpaper}"; - lockOnResume = true; - passwordRequired = true; - }; - kwin = { - borderlessMaximizedWindows = true; - cornerBarrier = false; - effects = { - dimAdminMode.enable = true; - dimInactive.enable = true; - hideCursor = { - enable = true; - hideOnTyping = true; - hideOnInactivity = 5; - }; - #magnifier = { - # enable = true; - # height = 200; - # width = 355; - #}; - shakeCursor.enable = true; - snapHelper.enable = true; - zoom = { - enable = true; - mousePointer = "keep"; - mouseTracking = "centered"; - scrollGestureModKeys = "Meta+Ctrl"; - }; - }; - nightLight = { - enable = true; - mode = "constant"; - temperature = { - day = 5400; - night = 5400; - }; - }; - }; - shortcuts.kwin = { - "Window Close" = "Alt+Q"; - "Switch Window Down" = "Alt+J"; - "Switch Window Left" = "Alt+H"; - "Switch Window Right" = "Alt+L"; - "Switch Window Up" = "Alt+K"; - }; - panels = [ - { - alignment = "center"; - floating = false; - hiding = "none"; - lengthMode = "fill"; - location = "top"; - offset = 0; - opacity = "translucent"; - screen = "all"; - widgets = [ - "org.kde.plasma.kickoff" - "org.kde.plasma.pager" - "org.kde.plasma.icontasks" - "org.kde.plasma.marginsseparator" + } + { + _args = [ + { + output = "eDP-1"; + mode = "1920x1080@144"; + position = "0x0"; + scale = "1"; + } + ]; + } + { + _args = [ + { + output = "HDMI-A-1"; + mode = "1920x1080@60"; + position = "4480x0"; + scale = "1"; + transform = 1; + } + ]; + } + ]; + + on = let + exec = prg: function "hl.exec_cmd(\"${prg}\")"; + in [ + { + _args = [ + "hyprland.start" + (exec "noctalia-shell") + ]; + } + ]; + + bind = + (map (key: { + _args = [ + (mod key) + (lua "hl.dsp.window.move(${ + toLua { + direction = builtins.substring 0 1 key; + } + })") + ]; + }) ["up" "down" "left" "right"]) + ++ (map (num: { + _args = [ + (mod (toString num)) + (lua "hl.dsp.focus(${ + toLua { + workspace = num; + } + })") + ]; + }) (pkgs.lib.lists.range 1 9)) + ++ [ + { + _args = [ + (mod "Q") + (lua "hl.dsp.window.close()") + {locked = true;} + ]; + } + { + _args = [ + (mod "SUPER_L") + (ipc "launcher toggle") + ]; + } + { + _args = [ + (mod "F") + (function "hl.dispatch(hl.dsp.window.float({ action = \"toggle\" }))") + ]; + } + { + _args = [ + (mod "SHIFT + F") + (lua "hl.dsp.window.fullscreen()") + ]; + } + { + _args = [ + "SUPER + RETURN" + (exec "ghostty") + ]; + } + { + _args = [ + (mod lmb) + (lua "hl.dsp.window.drag()") + {mouse = true;} + ]; + } + { + _args = [ + (mod rmb) + (lua "hl.dsp.window.resize()") + {mouse = true;} + ]; + } + { + _args = [ + (mod "CTRL") + (lua "hl.dsp.window.drag()") + {mouse = true;} + ]; + } + { + _args = [ + (mod "ALT") + (lua "hl.dsp.window.resize()") + {mouse = true;} + ]; + } + { + _args = [ + "Print" + (exec "grim - | satty -f - --copy-command wl-copy -o '~/Pictures/Screenshots/%Y%m%d_%H%M%S.png'") + ]; + } + { + _args = [ + (mod "V") + (ipc "launcher clipboard") + ]; + } + { + _args = [ + (mod "C") + (ipc "launcher command") + ]; + } + { + _args = [ + "XF86AudioRaiseVolume" + (ipc "volume increase") + { + repeating = true; + locked = true; + } + ]; + } + { + _args = [ + "XF86AudioLowerVolume" + (ipc "volume decrease") + { + repeating = true; + locked = true; + } + ]; + } + { + _args = [ + "XF86AudioMute" + (ipc "volume muteOutput") + { + locked = true; + } + ]; + } + { + _args = [ + "XF86MonBrightnessUp" + (ipc "brightness increase") + { + repeating = true; + locked = true; + } + ]; + } + { + _args = [ + "XF86MonBrightnessDown" + (ipc "brightness decrese") { - systemTray.items = { - shown = [ - "org.kde.plasma.notifications" - "org.kde.plasma.clipboard" - "org.kde.plasma.mediacontroller" - "org.kde.plasma.networkmanagement" - "org.kde.plasma.volume" - "org.kde.plasma.battery" - "org.kde.plasma.brightness" - "org.kde.plasma.bluetooth" - ]; - hidden = [ - "org.kde.plasma.manage-inputmethod" - "org.kde.plasma.cameraindicator" - "org.kde.plasma.keyboardlayout" - "org.kde.plasma.devicenotifier" - "org.kde.kscreen" - "org.kde.plasma.keyboardindicator" - "org.kde.plasma.printmanager" - "org.kde.plasma.weather" - ]; - }; + repeating = true; + locked = true; } - "org.kde.plasma.digitalclock" - "org.kde.plasma.showdesktop" - "org.kde.plasma.systemmonitor.cpucore" ]; } ]; - powerdevil.AC.whenLaptopLidClosed = "hibernate"; - session.sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout"; - windows.allowWindowsToRememberPositions = true; - workspace = { - colorScheme = "SweetAmbarBlue"; - cursor = { - theme = "breeze_cursors"; - size = 24; - }; - iconTheme = "Breeze"; - soundTheme = "ocean"; - theme = "Sweet-Ambar-Blue"; - wallpaper = "${inputs.assets.wallpaper}"; - windowDecorations = { - library = "org.kde.kwin.aurorae.v2"; - theme = "__aurorae__svg__Sweet-ambar-blue"; - }; - }; - }; - # }}} - #ssh {{{ - ssh = { - enable = true; - enableDefaultConfig = false; - matchBlocks = - let - server = { - ip = "93.94.24.17"; - port = 22; - username = "dario48"; - }; - in - { - "*" = { - forwardAgent = false; - addKeysToAgent = "no"; - compression = false; - serverAliveInterval = 0; - serverAliveCountMax = 3; - hashKnownHosts = false; - userKnownHostsFile = "~/.ssh/known_hosts"; - controlMaster = "no"; - controlPath = "~/.ssh/master-%r@%n:%p"; - controlPersist = "no"; - }; - "git.dario48.site" = { - hostname = server.ip; - identityFile = "~/.ssh/id_ed25519"; - port = server.port; - }; - home_server = { - hostname = server.ip; - identityFile = "~/.ssh/home_server"; - user = server.username; - port = server.port; - }; - }; - }; - # }}} - # hyfetch {{{ - fastfetch.enable = true; - hyfetch = { - enable = true; - settings = { - preset = "agender"; - mode = "rgb"; - auto_detect_light_dark = true; - light_dark = "dark"; - lightness = 0.5; - color_align = { - mode = "horizontal"; - }; - backend = "fastfetch"; - args = null; - distro = null; - pride_month_disable = false; - custom_ascii_path = null; - }; - }; - # }}} - # kitty {{{ - kitty = { - enable = true; - themeFile = "Carbonfox"; - shellIntegration.enableBashIntegration = true; - - font.name = "IosevkaTerm Nerd Font Mono"; - font.size = 11; - settings = { - bold_font = "auto"; - italic_font = "auto"; - bold_italic_font = "auto"; - - confirm_os_window_close = 0; - dynamic_background_opacity = true; - window_padding_width = 0; - background = "#000000"; - background_opacity = "0.5"; - background_blur = 64; - }; - }; - # }}} }; - home = { - stateVersion = "24.11"; - shell.enableShellIntegration = true; + }; + services.hyprpaper = { + enable = true; + settings = { + preload = [ + "${inputs.assets.wallpaper}" + ]; + wallpaper = [ + # By display + #"DP-2,~/wallpapers/wallpaper2.jpg" + # By default/fallback + { + monitor = ""; + path = "${inputs.assets.wallpaper}"; + } + ]; }; - } - ); - }; - } - # }}} - ]; - }; + }; + # }}} + programs = { + # ghostty {{{ + ghostty = { + enable = true; + + settings = { + theme = "Carbonfox"; + font-family = "IosevkaTerm Nerd Font Mono"; + + background-opacity = 0.5; + background-blur = true; + + notify-on-command-finish = "unfocused"; + notify-on-command-finish-action = "bell,notify"; + window-padding-x = 0; + window-padding-y = 0; + + window-theme = "ghostty"; + + shell-integration-features = true; + cursor-style = "block"; + cursor-style-blink = true; + cursor-click-to-move = true; + }; + enableBashIntegration = true; + installBatSyntax = true; + installVimSyntax = true; + systemd.enable = true; + }; + # }}} + # plasma {{{ + #plasma = { + # enable = true; + # fonts.fixedWidth = { + # family = "IosevkaTerm Nerd Font Mono"; + # pointSize = 11; + # }; + # hotkeys.commands = { + # "kitty" = { + # name = "launch kitty"; + # key = "Alt+Return"; + # command = "kitty"; + # }; + # }; + # input = { + # keyboard = { + # layouts = [{layout = "eu";}]; + # options = ["caps:esc"]; + # }; + # mice = [ + # { + # name = "Logitech USB Optical Mouse"; + # vendorId = "046d"; + # productId = "c077"; + # } + # ]; + # touchpads = [ + # { + # vendorId = "04f3"; + # productId = "3298"; + # name = "ELAN07C9:00 04F3:3298 Touchpad"; + # disableWhileTyping = false; + # naturalScroll = true; + # } + # ]; + # }; + # krunner = { + # position = "top"; + # shortcuts.launch = "Meta"; + # }; + # kscreenlocker = { + # appearance.wallpaper = "${inputs.assets.wallpaper}"; + # lockOnResume = true; + # passwordRequired = true; + # }; + # kwin = { + # borderlessMaximizedWindows = true; + # cornerBarrier = false; + # effects = { + # dimAdminMode.enable = true; + # dimInactive.enable = true; + # hideCursor = { + # enable = true; + # hideOnTyping = true; + # hideOnInactivity = 5; + # }; + # magnifier = { + # enable = true; + # height = 200; + # width = 355; + # }; + # zoom.scrollGestureModKeys = "Meta+Ctrl"; + # shakeCursor.enable = true; + # snapHelper.enable = true; + # }; + # }; + # shortcuts.kwin = { + # "Window Close" = "Alt+Q"; + # "Switch Window Down" = "Alt+J"; + # "Switch Window Left" = "Alt+H"; + # "Switch Window Right" = "Alt+L"; + # "Switch Window Up" = "Alt+K"; + # }; + # panels = [ + # { + # alignment = "center"; + # floating = false; + # hiding = "none"; + # lengthMode = "fill"; + # location = "top"; + # offset = 0; + # opacity = "translucent"; + # screen = "all"; + # widgets = [ + # "org.kde.plasma.kickoff" + # "org.kde.plasma.pager" + # "org.kde.plasma.icontasks" + # "org.kde.plasma.marginsseparator" + # { + # systemTray.items = { + # shown = [ + # "org.kde.plasma.notifications" + # "org.kde.plasma.clipboard" + # "org.kde.plasma.mediacontroller" + # "org.kde.plasma.networkmanagement" + # "org.kde.plasma.volume" + # "org.kde.plasma.battery" + # "org.kde.plasma.brightness" + # "org.kde.plasma.bluetooth" + # ]; + # hidden = [ + # "org.kde.plasma.manage-inputmethod" + # "org.kde.plasma.cameraindicator" + # "org.kde.plasma.keyboardlayout" + # "org.kde.plasma.devicenotifier" + # "org.kde.kscreen" + # "org.kde.plasma.keyboardindicator" + # "org.kde.plasma.printmanager" + # "org.kde.plasma.weather" + # ]; + # }; + # } + # "org.kde.plasma.digitalclock" + # "org.kde.plasma.showdesktop" + # "org.kde.plasma.systemmonitor.cpucore" + # ]; + # } + # ]; + # powerdevil.AC.whenLaptopLidClosed = "hibernate"; + # session.sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout"; + # windows.allowWindowsToRememberPositions = true; + # workspace = { + # colorScheme = "SweetAmbarBlue"; + # cursor = { + # theme = "breeze_cursors"; + # size = 24; + # }; + # iconTheme = "breeze"; + # soundTheme = "ocean"; + # theme = "Sweet-Ambar-Blue"; + # wallpaper = "${inputs.assets.wallpaper}"; + # windowDecorations = { + # library = "org.kde.kwin.aurorae.v2"; + # theme = "__aurorae__svg__Sweet-ambar-blue"; + # }; + # }; + #}; + # }}} + #ssh {{{ + ssh = { + enable = true; + enableDefaultConfig = false; + matchBlocks = let + server = { + ip = "93.94.24.17"; + port = 22; + username = "dario48"; + }; + in { + "*" = { + forwardAgent = false; + addKeysToAgent = "no"; + compression = false; + serverAliveInterval = 0; + serverAliveCountMax = 3; + hashKnownHosts = false; + userKnownHostsFile = "~/.ssh/known_hosts"; + controlMaster = "no"; + controlPath = "~/.ssh/master-%r@%n:%p"; + controlPersist = "no"; + }; + "git.dario48.site" = { + hostname = server.ip; + identityFile = "~/.ssh/id_ed25519"; + port = server.port; + }; + home_server = { + hostname = server.ip; + identityFile = "~/.ssh/home_server"; + user = server.username; + port = server.port; + }; + }; + }; + # }}} + # hyfetch {{{ + fastfetch.enable = true; + hyfetch = { + enable = true; + settings = { + preset = "agender"; + mode = "rgb"; + auto_detect_light_dark = true; + light_dark = "dark"; + lightness = 0.5; + color_align = { + mode = "horizontal"; + }; + backend = "fastfetch"; + args = null; + distro = null; + pride_month_disable = false; + custom_ascii_path = null; + }; + }; + # }}} + # kitty {{{ + kitty = { + enable = true; + themeFile = "Carbonfox"; + shellIntegration.enableBashIntegration = true; + + font.name = "IosevkaTerm Nerd Font Mono"; + font.size = 11; + settings = { + bold_font = "auto"; + italic_font = "auto"; + bold_italic_font = "auto"; + watch_config = "no"; + + confirm_os_window_close = 0; + dynamic_background_opacity = true; + window_padding_width = 0; + background = "#000000"; + background_opacity = "0.5"; + background_blur = 64; + }; + }; + # }}} + }; + home = { + stateVersion = "24.11"; + shell.enableShellIntegration = true; + pointerCursor = { + gtk.enable = true; + package = pkgs.kdePackages.breeze; + name = "breeze_cursors"; + }; + file.".config/REAPER/UserPlugins/reaper_reapack-x86_64.so".source = "${pkgs.reaper-reapack-extension}/UserPlugins/reaper_reapack-x86_64.so"; + file.".config/REAPER/Scripts/sws_python64.py".source = "${pkgs.reaper-sws-extension}/Scripts/sws_python64.py"; + file.".config/REAPER/Scripts/sws_python.py".source = "${pkgs.reaper-sws-extension}/Scripts/sws_python.py"; + file.".config/REAPER/UserPlugins/reaper_sws-x86_64.so".source = "${pkgs.reaper-sws-extension}/UserPlugins/reaper_sws-x86_64.so"; + }; + } + ); + }; + } + # }}} + ]; }; + }; } diff --git a/secrets/sops.yaml b/secrets/sops.yaml new file mode 100644 index 0000000..4c9e07b --- /dev/null +++ b/secrets/sops.yaml @@ -0,0 +1,18 @@ +eduroam: + username: ENC[AES256_GCM,data:KR3brkIlj485PCyztUg0OAc4ceVnpjNPoPs+47CKfhM=,iv:EKsSWEJ0x7zmrJBF5dzABGkPvK49X9x44U3IPH2Rdp0=,tag:Tnt2qeUIwr1V5SP056zH7g==,type:str] + password: ENC[AES256_GCM,data:u15AC1bN+PM=,iv:73JvJpN6/z1rOGuyrUXvfD2I4Rz3pVfAvvp0LWvJlBE=,tag:t69DRFPmfw3tfWlqkwOmwQ==,type:str] +sops: + age: + - enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBFYmpIRDlRd1E1S3NtMEJy + Y2VtY01UNXpmRmoySXZWZG5QQkxXU0pvVmkwCi9wUlBwVGo5ajgzMHhsRHo4RXVo + TDJOS3BxVTJhZTFEUVVTb3h0bmo2UlEKLS0tIGhxMVJ0UjBNZVQzUEVudVBTOVFz + ZWQwcmV4ZDh2MDcreFlxMVN1Y29DaVUKJwU+vUH8Th3qybFX81oCWMZuMEw42yVt + h3AK8szHC0yjI+2aDEAdi+fj5d2D1HUzen+MsTjgn2uykk7TIgQFFQ== + -----END AGE ENCRYPTED FILE----- + recipient: age1m2vemmfndfgg0v0tnzpmsyyglyf2cz75tq4hgqplfjm5jgdds4jqtjjsek + lastmodified: "2026-06-15T16:15:18Z" + mac: ENC[AES256_GCM,data:4V4GaKH8xeFaVK3+swZPYUQBi28XkN3XNvTNTWFYnlgMWwnes2iTcPHJ8s2l2vuElMmIWlPjEHQiKgfPXVDRoD6Zr2VcQkPvwtjJHiDIP//yqnkwHhpUCIw7WRu+CDnkyA2FdlDUZ9CfYiq1Is+MWsvsVkzT+ecFSAPeSNjdu/A=,iv:y3/z8AhR4GMc3Q7/mxF8M0QKe0x/llVJwjmgAwZ8N3E=,tag:ZOHuSyihp1KcWdAKacEzlw==,type:str] + unencrypted_suffix: _unencrypted + version: 3.13.1