diff --git a/.editorconfig b/.editorconfig index c1e2c64..5d47c21 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,7 +5,7 @@ root = true [*] indent_style = space -indent_size = 4 +indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 92af707..0000000 --- a/flake.lock +++ /dev/null @@ -1,1266 +0,0 @@ -{ - "nodes": { - "alejandra": { - "inputs": { - "fenix": "fenix_2", - "flakeCompat": "flakeCompat", - "nixpkgs": [ - "webcord", - "dream2nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1658427149, - "narHash": "sha256-ToD/1z/q5VHsLMrS2h96vjJoLho59eNRtknOUd19ey8=", - "owner": "kamadorueda", - "repo": "alejandra", - "rev": "f5a22afd2adfb249b4e68e0b33aa1f0fb73fb1be", - "type": "github" - }, - "original": { - "owner": "kamadorueda", - "repo": "alejandra", - "type": "github" - } - }, - "all-cabal-json": { - "flake": false, - "locked": { - "lastModified": 1665552503, - "narHash": "sha256-r14RmRSwzv5c+bWKUDaze6pXM7nOsiz1H8nvFHJvufc=", - "owner": "nix-community", - "repo": "all-cabal-json", - "rev": "d7c0434eebffb305071404edcf9d5cd99703878e", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "hackage", - "repo": "all-cabal-json", - "type": "github" - } - }, - "beautysh": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ], - "poetry2nix": "poetry2nix", - "utils": "utils_3" - }, - "locked": { - "lastModified": 1680308980, - "narHash": "sha256-aUEHV0jk2qIFP3jlsWYWhBbm+w/N9gzH3e4I5DcdB5s=", - "owner": "lovesegfault", - "repo": "beautysh", - "rev": "9845efc3ea3e86cc0d41465d720a47f521b2799c", - "type": "github" - }, - "original": { - "owner": "lovesegfault", - "repo": "beautysh", - "type": "github" - } - }, - "blobs": { - "flake": false, - "locked": { - "lastModified": 1604995301, - "narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=", - "owner": "simple-nixos-mailserver", - "repo": "blobs", - "rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265", - "type": "gitlab" - }, - "original": { - "owner": "simple-nixos-mailserver", - "repo": "blobs", - "type": "gitlab" - } - }, - "colmena": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "stable": "stable" - }, - "locked": { - "lastModified": 1682202576, - "narHash": "sha256-vcTEEEHKx4PTfY80bUmZMwXRy0cTDJCkULHhqe1HJS8=", - "owner": "zhaofengli", - "repo": "colmena", - "rev": "089431737e283ed3e402a7dff578cb442444c431", - "type": "github" - }, - "original": { - "owner": "zhaofengli", - "repo": "colmena", - "type": "github" - } - }, - "comma": { - "inputs": { - "flake-compat": "flake-compat_2", - "naersk": "naersk", - "nixpkgs": "nixpkgs_2", - "utils": "utils" - }, - "locked": { - "lastModified": 1680733215, - "narHash": "sha256-5HNH/Lqj8OU/piH3tvPRkINXHHkt6bRp0QYYR4xOybE=", - "owner": "nix-community", - "repo": "comma", - "rev": "ef97634016d17cc8cdea396ebcc002320494391a", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "comma", - "type": "github" - } - }, - "crane": { - "flake": false, - "locked": { - "lastModified": 1670284777, - "narHash": "sha256-JF0pc0s4z/X+Iy+lNHOwUQ8I5bz+q7uX4HrKTNIEj24=", - "owner": "ipetkov", - "repo": "crane", - "rev": "2243fb9c872de25cb564a02d324ea6a5b9853052", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "devshell": { - "flake": false, - "locked": { - "lastModified": 1663445644, - "narHash": "sha256-+xVlcK60x7VY1vRJbNUEAHi17ZuoQxAIH4S4iUFUGBA=", - "owner": "numtide", - "repo": "devshell", - "rev": "e3dc3e21594fe07bdb24bdf1c8657acaa4cb8f66", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "dream2nix": { - "inputs": { - "alejandra": "alejandra", - "all-cabal-json": "all-cabal-json", - "crane": "crane", - "devshell": "devshell", - "flake-parts": "flake-parts", - "flake-utils-pre-commit": "flake-utils-pre-commit", - "ghc-utils": "ghc-utils", - "gomod2nix": "gomod2nix", - "mach-nix": "mach-nix", - "nix-pypi-fetcher": "nix-pypi-fetcher", - "nixpkgs": [ - "webcord", - "nixpkgs" - ], - "poetry2nix": "poetry2nix_2", - "pre-commit-hooks": "pre-commit-hooks_2" - }, - "locked": { - "lastModified": 1670715183, - "narHash": "sha256-l3OhVCCimrN1HFPfqfKAyzuMuPxNXZYLsI9w7AaQXv8=", - "owner": "nix-community", - "repo": "dream2nix", - "rev": "3d6f13ef9d4cb8c41bc83383bbec3e74865ef90d", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "dream2nix", - "type": "github" - } - }, - "fenix": { - "inputs": { - "nixpkgs": [ - "riff", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1674282107, - "narHash": "sha256-0wBK+1IMJdAkckR715ssMPFUhCAqRpRcppGwraiWREU=", - "owner": "nix-community", - "repo": "fenix", - "rev": "18fc1446c44e05165437c5900b95670166a09270", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, - "fenix_2": { - "inputs": { - "nixpkgs": [ - "webcord", - "dream2nix", - "alejandra", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src_2" - }, - "locked": { - "lastModified": 1657607339, - "narHash": "sha256-HaqoAwlbVVZH2n4P3jN2FFPMpVuhxDy1poNOR7kzODc=", - "owner": "nix-community", - "repo": "fenix", - "rev": "b814c83d9e6aa5a28d0cf356ecfdafb2505ad37d", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1668681692, - "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "009399224d5e398d03b22badca40a37ac85412a1", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_4": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_5": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "id": "flake-compat", - "type": "indirect" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1668450977, - "narHash": "sha256-cfLhMhnvXn6x1vPm+Jow3RiFAUSCw/l1utktCw5rVA4=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "d591857e9d7dd9ddbfba0ea02b43b927c3c0f1fa", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils-pre-commit": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", - "type": "github" - }, - "original": { - "id": "flake-utils", - "type": "indirect" - } - }, - "flakeCompat": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "ghc-utils": { - "flake": false, - "locked": { - "lastModified": 1662774800, - "narHash": "sha256-1Rd2eohGUw/s1tfvkepeYpg8kCEXiIot0RijapUjAkE=", - "ref": "refs/heads/master", - "rev": "bb3a2d3dc52ff0253fb9c2812bd7aa2da03e0fea", - "revCount": 1072, - "type": "git", - "url": "https://gitlab.haskell.org/bgamari/ghc-utils" - }, - "original": { - "type": "git", - "url": "https://gitlab.haskell.org/bgamari/ghc-utils" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "nixvim", - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1660459072, - "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gomod2nix": { - "flake": false, - "locked": { - "lastModified": 1627572165, - "narHash": "sha256-MFpwnkvQpauj799b4QTBJQFEddbD02+Ln5k92QyHOSk=", - "owner": "tweag", - "repo": "gomod2nix", - "rev": "67f22dd738d092c6ba88e420350ada0ed4992ae8", - "type": "github" - }, - "original": { - "owner": "tweag", - "repo": "gomod2nix", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1682203081, - "narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "hyprpaper": { - "inputs": { - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1681650457, - "narHash": "sha256-IGXRZrFGFqUeM5iDgP/ojbrd+gKL40PaFFAITxbkfZ0=", - "owner": "hyprwm", - "repo": "hyprpaper", - "rev": "3bfaac09f58ce31c33e1a56e7eaa606a87fe4c32", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprpaper", - "type": "github" - } - }, - "lowdown-src": { - "flake": false, - "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", - "type": "github" - } - }, - "mach-nix": { - "flake": false, - "locked": { - "lastModified": 1634711045, - "narHash": "sha256-m5A2Ty88NChLyFhXucECj6+AuiMZPHXNbw+9Kcs7F6Y=", - "owner": "DavHau", - "repo": "mach-nix", - "rev": "4433f74a97b94b596fa6cd9b9c0402104aceef5d", - "type": "github" - }, - "original": { - "id": "mach-nix", - "type": "indirect" - } - }, - "mailserver": { - "inputs": { - "blobs": "blobs", - "flake-compat": "flake-compat_3", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-22_11": "nixpkgs-22_11", - "utils": "utils_2" - }, - "locked": { - "lastModified": 1671738303, - "narHash": "sha256-PRgqtaWf2kMSYqVmcnmhTh+UsC0RmvXRTr+EOw5VZUA=", - "owner": "simple-nixos-mailserver", - "repo": "nixos-mailserver", - "rev": "6d0d9fb966cc565a3df74d3b686f924c7615118c", - "type": "gitlab" - }, - "original": { - "owner": "simple-nixos-mailserver", - "repo": "nixos-mailserver", - "type": "gitlab" - } - }, - "naersk": { - "inputs": { - "nixpkgs": [ - "comma", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1679567394, - "narHash": "sha256-ZvLuzPeARDLiQUt6zSZFGOs+HZmE+3g4QURc8mkBsfM=", - "owner": "nix-community", - "repo": "naersk", - "rev": "88cd22380154a2c36799fe8098888f0f59861a15", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "master", - "repo": "naersk", - "type": "github" - } - }, - "naersk_2": { - "inputs": { - "nixpkgs": [ - "riff", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1671096816, - "narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=", - "owner": "nix-community", - "repo": "naersk", - "rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "naersk", - "type": "github" - } - }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": "nixpkgs_7", - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1654239108, - "narHash": "sha256-0JzuElxLe5DxM+R4tvBYfvQnMGCERZy4KMRf0JYxxS4=", - "owner": "nixos", - "repo": "nix", - "rev": "1dd7253133c4dfd2e7a16ad6fe505442cef38a5b", - "type": "github" - }, - "original": { - "id": "nix", - "type": "indirect" - } - }, - "nix-pypi-fetcher": { - "flake": false, - "locked": { - "lastModified": 1669065297, - "narHash": "sha256-UStjXjNIuIm7SzMOWvuYWIHBkPUKQ8Id63BMJjnIDoA=", - "owner": "DavHau", - "repo": "nix-pypi-fetcher", - "rev": "a9885ac6a091576b5195d547ac743d45a2a615ac", - "type": "github" - }, - "original": { - "owner": "DavHau", - "repo": "nix-pypi-fetcher", - "type": "github" - } - }, - "nixlib": { - "locked": { - "lastModified": 1681001314, - "narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "367c0e1086a4eb4502b24d872cea2c7acdd557f4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixos-generators": { - "inputs": { - "nixlib": "nixlib", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1681464810, - "narHash": "sha256-G7AD9qMvD7lU+5K7tTZpUMXvQa0kFR5KKY9y/okcX+w=", - "owner": "nix-community", - "repo": "nixos-generators", - "rev": "5ad9f98194cfe7aa990929fb8cae28c500da7620", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixos-generators", - "type": "github" - } - }, - "nixos-hardware": { - "locked": { - "lastModified": 1679726555, - "narHash": "sha256-h7Dd/uWu7i5Yv1E+DweyJJUzTvGWXqfSo8/hz1YEolY=", - "owner": "toastal", - "repo": "nixos-hardware", - "rev": "0889479119961000c4a15801a0343cd1f11de556", - "type": "github" - }, - "original": { - "owner": "toastal", - "ref": "z-series-no-hidpi", - "repo": "nixos-hardware", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1674641431, - "narHash": "sha256-qfo19qVZBP4qn5M5gXc/h1MDgAtPA5VxJm9s8RUAkVk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9b97ad7b4330aacda9b2343396eb3df8a853b4fc", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-22_11": { - "locked": { - "lastModified": 1669558522, - "narHash": "sha256-yqxn+wOiPqe6cxzOo4leeJOp1bXE/fjPEi/3F/bBHv8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ce5fe99df1f15a09a91a86be9738d68fadfbad82", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-22.11", - "type": "indirect" - } - }, - "nixpkgs-lib": { - "locked": { - "dir": "lib", - "lastModified": 1665349835, - "narHash": "sha256-UK4urM3iN80UXQ7EaOappDzcisYIuEURFRoGQ/yPkug=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "34c5293a71ffdb2fe054eb5288adc1882c1eb0b1", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1678872516, - "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1680668850, - "narHash": "sha256-mQMg13yRsS0LXVzaeoSPwqgPO6yhkGzGewPgMSqXSv8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4a65e9f64e53fdca6eed31adba836717a11247d2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_22-11": { - "locked": { - "lastModified": 1682134069, - "narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "fd901ef4bf93499374c5af385b2943f5801c0833", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1674641431, - "narHash": "sha256-qfo19qVZBP4qn5M5gXc/h1MDgAtPA5VxJm9s8RUAkVk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9b97ad7b4330aacda9b2343396eb3df8a853b4fc", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1682243997, - "narHash": "sha256-yLsPkvrkRYYtDLndtBbgduG1ErNlbTkNlHzwyIMGaig=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "f423f57ba63782c3b13af0c3100f7863dc8c1e61", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "master", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1681465517, - "narHash": "sha256-EasJh15/jcJNAHtq2SGbiADRXteURAnQbj1NqBoKkzU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "abe7316dd51a313ce528972b104f4f04f56eefc4", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { - "locked": { - "lastModified": 1672580127, - "narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "0874168639713f547c05947c76124f78441ea46c", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-22.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_7": { - "locked": { - "lastModified": 1645296114, - "narHash": "sha256-y53N7TyIkXsjMpOG7RhvqJFGDacLs9HlyHeSTBioqYU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "530a53dcbc9437363471167a5e4762c5fcfa34a1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-21.05-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_8": { - "locked": { - "lastModified": 1674736538, - "narHash": "sha256-/DszFMkAgYyB9dTWKkoZa9i0zcrA6Z4hYrOr/u/FSxY=", - "owner": "serokell", - "repo": "nixpkgs", - "rev": "1dfdbb65d77430fc0935e8592d0abc4addcce711", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_9": { - "locked": { - "lastModified": 1670507980, - "narHash": "sha256-riNZa0xzM1it3pzxciwALeMs+0CsBMWIW2FqulzK8vM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "2787fc7d1e51404678614bf0fe92fc296746eec0", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixvim": { - "inputs": { - "beautysh": "beautysh", - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_5", - "pre-commit-hooks": "pre-commit-hooks" - }, - "locked": { - "lastModified": 1682101773, - "narHash": "sha256-/H9R0GfgR0ApycChQSKu5NuaT4w76zo02aKl27pz2aQ=", - "owner": "pta2002", - "repo": "nixvim", - "rev": "9c8bee9da6070ea8b1a95fc5133ed1d88b9b959a", - "type": "github" - }, - "original": { - "owner": "pta2002", - "repo": "nixvim", - "type": "github" - } - }, - "nur": { - "locked": { - "lastModified": 1682222997, - "narHash": "sha256-7PEtbnVsdj+wFiEA14NdwAcxHNlx6z4mJ6MCCWhLPJw=", - "owner": "nix-community", - "repo": "NUR", - "rev": "12ce41b211b7a85975703b6c66868fdd8dc1e42a", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, - "poetry2nix": { - "inputs": { - "flake-utils": [ - "nixvim", - "beautysh", - "utils" - ], - "nixpkgs": [ - "nixvim", - "beautysh", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1658665240, - "narHash": "sha256-/wkx7D7enyBPRjIkK0w7QxLQhzEkb3UxNQnjyc3FTUI=", - "owner": "nix-community", - "repo": "poetry2nix", - "rev": "8b8edc85d24661d5a6d0d71d6a7011f3e699780f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "poetry2nix", - "type": "github" - } - }, - "poetry2nix_2": { - "flake": false, - "locked": { - "lastModified": 1666918719, - "narHash": "sha256-BkK42fjAku+2WgCOv2/1NrPa754eQPV7gPBmoKQBWlc=", - "owner": "nix-community", - "repo": "poetry2nix", - "rev": "289efb187123656a116b915206e66852f038720e", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "1.36.0", - "repo": "poetry2nix", - "type": "github" - } - }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat_4", - "flake-utils": "flake-utils_3", - "gitignore": "gitignore", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1681413034, - "narHash": "sha256-/t7OjNQcNkeWeSq/CFLYVBfm+IEnkjoSm9iKvArnUUI=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "d3de8f69ca88fb6f8b09e5b598be5ac98d28ede5", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "pre-commit-hooks_2": { - "inputs": { - "flake-utils": [ - "webcord", - "dream2nix", - "flake-utils-pre-commit" - ], - "nixpkgs": [ - "webcord", - "dream2nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1646153636, - "narHash": "sha256-AlWHMzK+xJ1mG267FdT8dCq/HvLCA6jwmx2ZUy5O8tY=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "b6bc0b21e1617e2b07d8205e7fae7224036dfa4b", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "riff": { - "inputs": { - "fenix": "fenix", - "naersk": "naersk_2", - "nixpkgs": "nixpkgs_6" - }, - "locked": { - "lastModified": 1677774593, - "narHash": "sha256-Drh8t1PPm7xSU8EzDkL2tJf7u75/jUiUKnVBarQkFro=", - "owner": "DeterminateSystems", - "repo": "riff", - "rev": "330868ae137cd8baefa6fb53e1cf5847ad7d2320", - "type": "github" - }, - "original": { - "owner": "DeterminateSystems", - "repo": "riff", - "type": "github" - } - }, - "root": { - "inputs": { - "colmena": "colmena", - "comma": "comma", - "home-manager": "home-manager", - "hyprpaper": "hyprpaper", - "mailserver": "mailserver", - "nixos-generators": "nixos-generators", - "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_4", - "nixpkgs_22-11": "nixpkgs_22-11", - "nixvim": "nixvim", - "nur": "nur", - "riff": "riff", - "vault-secrets": "vault-secrets", - "webcord": "webcord" - } - }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1674253028, - "narHash": "sha256-OzdEJpxIZw50DuZ1aBJlZnJ/GxHfKhexhn4Eu53YnEo=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "9a6294d7038e7eab00beafdf64ec4aa50a4c66a2", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, - "rust-analyzer-src_2": { - "flake": false, - "locked": { - "lastModified": 1657557289, - "narHash": "sha256-PRW+nUwuqNTRAEa83SfX+7g+g8nQ+2MMbasQ9nt6+UM=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "caf23f29144b371035b864a1017dbc32573ad56d", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, - "stable": { - "locked": { - "lastModified": 1669735802, - "narHash": "sha256-qtG/o/i5ZWZLmXw108N2aPiVsxOcidpHJYNkT45ry9Q=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "731cc710aeebecbf45a258e977e8b68350549522", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "utils": { - "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_2": { - "locked": { - "lastModified": 1605370193, - "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5021eac20303a61fafe17224c087f5519baed54d", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_3": { - "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "vault-secrets": { - "inputs": { - "flake-compat": "flake-compat_5", - "flake-utils": "flake-utils_4", - "nix": "nix", - "nixpkgs": "nixpkgs_8" - }, - "locked": { - "lastModified": 1679628347, - "narHash": "sha256-FacS4utvrARToWss3REX/0KMiP87BXE+2xc3a+vrvQI=", - "owner": "serokell", - "repo": "vault-secrets", - "rev": "e4ec077c2650a6d5500b34d0baae2e0d4c61c2ff", - "type": "github" - }, - "original": { - "owner": "serokell", - "repo": "vault-secrets", - "type": "github" - } - }, - "webcord": { - "inputs": { - "dream2nix": "dream2nix", - "nixpkgs": "nixpkgs_9", - "webcord": "webcord_2" - }, - "locked": { - "lastModified": 1670874335, - "narHash": "sha256-nJ1LUVj3dIHP5B+XkZXUvY39OqaZn/MMHSFwsOSPnwI=", - "owner": "fufexan", - "repo": "webcord-flake", - "rev": "b462d57c36d664b48f047c96b2f9de091bff6e8b", - "type": "github" - }, - "original": { - "owner": "fufexan", - "repo": "webcord-flake", - "type": "github" - } - }, - "webcord_2": { - "flake": false, - "locked": { - "lastModified": 1670713990, - "narHash": "sha256-e+y/M+/gjezHoNrdXeFhqtvxbPdhRSDOQlwK1nUhNfo=", - "owner": "SpacingBat3", - "repo": "WebCord", - "rev": "80ba858c025e0bb59510f7136211948d8ae10ece", - "type": "github" - }, - "original": { - "owner": "SpacingBat3", - "repo": "WebCord", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flux/olympus/apps/services/renovate/cronjob.yaml b/flux/olympus/apps/services/renovate/cronjob.yaml index 5ed7830..f78fd2d 100644 --- a/flux/olympus/apps/services/renovate/cronjob.yaml +++ b/flux/olympus/apps/services/renovate/cronjob.yaml @@ -19,7 +19,7 @@ spec: emptyDir: {} containers: - name: renovate - image: renovate/renovate:35.57.0 + image: renovate/renovate:35.58.0 volumeMounts: - name: config-volume mountPath: /opt/renovate/ diff --git a/nixos/common/default.nix b/nixos/common/default.nix index 09ef92a..7d08263 100644 --- a/nixos/common/default.nix +++ b/nixos/common/default.nix @@ -6,7 +6,8 @@ nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; nix.registry.nixpkgs.flake = inputs.nixpkgs; - home-manager.sharedModules = [ ./hm-modules ]; + home-manager.sharedModules = + [ ./hm-modules inputs.nixvim.homeManagerModules.nixvim ]; vault-secrets = let inherit (config.networking) domain hostName; diff --git a/nixos/common/desktop/README.md b/nixos/common/desktop/README.md new file mode 100644 index 0000000..3238074 --- /dev/null +++ b/nixos/common/desktop/README.md @@ -0,0 +1,9 @@ +# Common Desktop Config +This is where I store the NixOS config that is common between +my laptop and desktop + +## Files +* `./default.nix`: Contains common systemwide configuration + * See also my NixOS [modules](../modules), specifically gnome +* `./home.nix`: Contains common user-level configuration + * See also my Home-Manager [modules](../hm-modules) diff --git a/nixos/common/desktop/default.nix b/nixos/common/desktop/default.nix new file mode 100644 index 0000000..aac4970 --- /dev/null +++ b/nixos/common/desktop/default.nix @@ -0,0 +1,90 @@ +{ pkgs, ... }: { + # Bootloader. + boot = { + kernelPackages = pkgs.linuxPackages_latest; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + efi.efiSysMountPoint = "/boot/efi"; + }; + kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; }; + initrd = { + systemd.enable = true; + verbose = false; + }; + }; + + # Enable my config for the gnome desktop environment + services.v.gnome.enable = true; + + # Set your time zone. + time.timeZone = "Europe/Amsterdam"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_GB.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "nl_NL.UTF-8"; + LC_IDENTIFICATION = "nl_NL.UTF-8"; + LC_MEASUREMENT = "nl_NL.UTF-8"; + LC_MONETARY = "nl_NL.UTF-8"; + LC_NAME = "nl_NL.UTF-8"; + LC_NUMERIC = "nl_NL.UTF-8"; + LC_PAPER = "nl_NL.UTF-8"; + LC_TELEPHONE = "nl_NL.UTF-8"; + LC_TIME = "nl_NL.UTF-8"; + }; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Global Packages + environment.systemPackages = with pkgs; [ wireguard-tools ]; + + # Enable sound with pipewire. + sound.enable = true; + hardware.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; + + # 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; + }; + + virtualisation = { + podman.enable = true; + libvirtd = { + enable = true; + qemu.package = pkgs.qemu_kvm; + }; + }; + + fonts.fonts = with pkgs; [ + material-design-icons + noto-fonts + noto-fonts-cjk + noto-fonts-emoji + dejavu_fonts + (nerdfonts.override { + fonts = + [ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ]; + }) + ]; + + programs.steam = { + enable = true; + # Open ports in the firewall for Steam Remote Play + remotePlay.openFirewall = true; + }; + + # Networking + networking.networkmanager.enable = true; + networking.firewall.checkReversePath = false; + networking.firewall.enable = false; +} diff --git a/nixos/common/desktop/home.nix b/nixos/common/desktop/home.nix new file mode 100644 index 0000000..6458b8d --- /dev/null +++ b/nixos/common/desktop/home.nix @@ -0,0 +1,96 @@ +{ pkgs, inputs, config, ... }: +let + tex = pkgs.texlive.combine { + inherit (pkgs.texlive) scheme-full; + dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; }; + }; + my-python-packages = ps: with ps; [ pandas requests numpy ]; +in { + home.packages = with pkgs; [ + btop + calibre + element-desktop + fusee-launcher + gcc + gimp + inputs.comma.packages.${pkgs.system}.default + inputs.webcord.packages.${pkgs.system}.default + jetbrains.clion + jetbrains.idea-ultimate + mullvad-vpn + neofetch + nixfmt + nixpkgs-review + (python3.withPackages my-python-packages) + plex-media-player + rustup + solo2-cli + tex + yt-dlp + ]; + + # Enable my own hm modules + themes.v.catppuccin.enable = true; + programs.v.nvim.enable = true; + programs.v.vscode.enable = true; + + programs.riff = { + enable = true; + direnv = true; + }; + + programs.exa = { + enable = true; + enableAliases = true; + }; + + programs.bat.enable = true; + + programs.git = { + enable = true; + package = pkgs.gitAndTools.gitFull; + userName = "Victor"; + userEmail = "victor@xirion.net"; + lfs.enable = true; + # delta.enable = true; + extraConfig = { + push.autoSetupRemote = true; + init.defaultBranch = "main"; + }; + }; + + programs.tmux = { + enable = true; + shortcut = "b"; + terminal = "screen-256color"; + clock24 = true; + }; + + programs.firefox.enable = true; + + programs.direnv = { + enable = true; + nix-direnv.enable = true; + }; + + programs.zsh = { + enable = true; + sessionVariables = { DIRENV_LOG_FORMAT = ""; }; + }; + + # Syncthing + services.syncthing.enable = true; + xdg.userDirs = let home = config.home.homeDirectory; + in { + enable = true; + createDirectories = true; + desktop = "${home}/.desktop"; + documents = "${home}/cloud/Documents"; + download = "${home}/dl"; + music = "${home}/cloud/Music"; + pictures = "${home}/cloud/Pictures"; + publicShare = "${home}/.publicShare"; + templates = "${home}/.templates"; + videos = "${home}/cloud/Videos"; + }; +} diff --git a/nixos/common/hm-modules/catppuccin.nix b/nixos/common/hm-modules/catppuccin.nix new file mode 100644 index 0000000..a60b67b --- /dev/null +++ b/nixos/common/hm-modules/catppuccin.nix @@ -0,0 +1,40 @@ +{ config, pkgs, lib, ... }: +with lib; +let cfg = config.themes.v.catppuccin; +in { + options.themes.v.catppuccin = { + enable = mkEnableOption "catppuccin"; + }; + config = let + theme = "Catppuccin-Pink-Dark"; + cursorTheme = config.home.pointerCursor.name; + in mkIf cfg.enable { + home.pointerCursor = { + name = "Bibata_Ghost"; + size = 24; + package = pkgs.bibata-cursors-translucent; + }; + + gtk = { + enable = true; + theme = { + name = theme; + package = pkgs.catppuccin-gtk; + }; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme.override { color = "violet"; }; + }; + cursorTheme = { + name = cursorTheme; + inherit (config.home.pointerCursor) package size; + }; + }; + + programs.vscode = { + userSettings."workbench.colorTheme" = "Catppuccin Frappé"; + extensions = [ pkgs.vscode-extensions.catppuccin.catppuccin-vsc ]; + }; + }; +} + diff --git a/nixos/common/hm-modules/default.nix b/nixos/common/hm-modules/default.nix index 9676a72..8dabd6c 100644 --- a/nixos/common/hm-modules/default.nix +++ b/nixos/common/hm-modules/default.nix @@ -1,5 +1,8 @@ { ... }: { imports = [ + ./catppuccin.nix + ./nvim.nix ./riff.nix + ./vscode.nix ]; -} \ No newline at end of file +} diff --git a/nixos/common/hm-modules/nvim.nix b/nixos/common/hm-modules/nvim.nix new file mode 100644 index 0000000..2541697 --- /dev/null +++ b/nixos/common/hm-modules/nvim.nix @@ -0,0 +1,101 @@ +{ config, pkgs, lib, ... }: +with lib; +let cfg = config.programs.v.nvim; +in { + options.programs.v.nvim = { + enable = mkEnableOption "nvim"; + }; + config = mkIf cfg.enable { + programs.nixvim = { + enable = true; + package = pkgs.neovim-unwrapped; + vimAlias = true; + + globals = { mapleader = " "; }; + + maps.normal = { + "ff" = "lua require('telescope.builtin').find_files()"; + "fg" = "lua require('telescope.builtin').live_grep()"; + "" = + "lua require('Comment.api').toggle.linewise.current()"; # map ctrl+/ to commenting code + }; + + extraPlugins = with pkgs.vimPlugins; [ catppuccin-nvim luasnip ]; + + colorscheme = "catppuccin-frappe"; + + extraConfigLua = ""; + + plugins = { + bufferline.enable = true; + nix.enable = true; + treesitter = { + enable = true; + nixGrammars = true; + # ensureInstalled = [ ]; + }; + surround.enable = true; + fugitive.enable = true; + gitgutter.enable = true; + lualine = { + enable = true; + theme = "catppuccin"; + }; + telescope = { + enable = true; + extensions.fzf-native.enable = true; + extensions.fzf-native.fuzzy = true; + }; + comment-nvim = { enable = true; }; + lsp = { + enable = true; + servers.rust-analyzer.enable = true; + servers.rnix-lsp.enable = true; + servers.pyright.enable = true; + servers.elixirls.enable = true; + servers.clangd.enable = true; + }; + trouble.enable = true; + lspkind.enable = true; + nvim-cmp = { + enable = true; + autoEnableSources = true; + sources = [ + { name = "nvim_lsp"; } + { name = "cmp-latex-symbols"; } + { + name = "luasnip"; + option = { show_autosnippets = true; }; + } + { name = "cmp-spell"; } + { name = "cmp-rg"; } + { name = "path"; } + { name = "buffer"; } + ]; + snippet.expand = "luasnip"; + mappingPresets = [ "insert" "cmdline" ]; + mapping = { + "" = "cmp.mapping.confirm({ select = true })"; + "" = { + modes = [ "i" "s" ]; + action = '' + function(fallback) + local luasnip = require('luasnip') + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expandable() then + luasnip.expand() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end + ''; + }; + }; + }; + }; + }; + }; +} diff --git a/nixos/common/hm-modules/vscode.nix b/nixos/common/hm-modules/vscode.nix new file mode 100644 index 0000000..5a2b95a --- /dev/null +++ b/nixos/common/hm-modules/vscode.nix @@ -0,0 +1,68 @@ +{ config, pkgs, lib, ... }: +with lib; +let cfg = config.programs.v.vscode; +in { + options.programs.v.vscode = { enable = mkEnableOption "vscode"; }; + config = mkIf cfg.enable { + programs.vscode = { + enable = true; + package = pkgs.vscode; + userSettings = { + "ltex.language" = "en-GB"; + "latex-workshop.linting.chktex.enabled" = true; + "latex-workshop.latex.clean.subfolder.enabled" = true; + "latex-workshop.latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%"; + "editor.fontFamily" = + "'DejaVuSansMono Nerd Font', 'monospace', monospace"; + "keyboard.dispatch" = "keyCode"; + "rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer"; + "terminal.integrated.defaultProfile.linux" = "zsh"; + "nix.enableLanguageServer" = true; # Enable LSP. + "nix.serverPath" = "${pkgs.nil}/bin/nil"; + "[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; }; + "rust-analyzer.checkOnSave.command" = "clippy"; + "debug.allowBreakpointsEverywhere" = true; + # Don't index unecessary things + "files.exclude" = { + "**/.vscode" = true; + "**/.git" = true; + "**/.svn" = true; + "**/.hg" = true; + "**/.deps" = true; + "**/CVS" = true; + "**/.DS_Store" = true; + "/bin" = true; + "/boot" = true; + "/cdrom" = true; + "/dev" = true; + "/proc" = true; + "/etc" = true; + "/nix" = true; + }; + }; + extensions = with pkgs.vscode-extensions; + with pkgs.v.vscode-extensions; [ + brettm12345.nixfmt-vscode + codezombiech.gitignore + editorconfig.editorconfig + foxundermoon.shell-format + james-yu.latex-workshop + jnoortheen.nix-ide + matklad.rust-analyzer + mkhl.direnv + ms-vscode-remote.remote-ssh + ms-vscode.cpptools + platformio.platformio-ide + redhat.vscode-yaml + tamasfe.even-better-toml + valentjn.vscode-ltex + vscodevim.vim + vadimcn.vscode-lldb + xaver.clang-format + sumneko.lua + ]; + }; + + }; +} + diff --git a/nixos/common/modules/default.nix b/nixos/common/modules/default.nix index 3680ca0..3e78f27 100644 --- a/nixos/common/modules/default.nix +++ b/nixos/common/modules/default.nix @@ -2,6 +2,7 @@ imports = [ ./dns.nix ./flood.nix + ./gnome ./unpackerr.nix ./vault.nix ]; diff --git a/nixos/common/modules/gnome/default.nix b/nixos/common/modules/gnome/default.nix new file mode 100644 index 0000000..90b95a5 --- /dev/null +++ b/nixos/common/modules/gnome/default.nix @@ -0,0 +1,66 @@ +{ config, pkgs, lib, ... }: +with lib; +let cfg = config.services.v.gnome; +in { + options.services.v.gnome = { + enable = mkEnableOption "v.gnome"; + hm = mkOption { + type = types.bool; + default = true; + description = '' + Whether to enable home manager integration to set default dconf values + ''; + }; + }; + + config = mkIf cfg.enable { + services.xserver.enable = true; + services.xserver.excludePackages = [ pkgs.xterm ]; + + # Add Home-manager dconf stuff + home-manager.sharedModules = mkIf cfg.hm [ ./hm.nix ]; + + # Configure keymap in X11 + services.xserver = { + layout = "us"; + xkbVariant = "altgr-intl"; + }; + + # Enable the GNOME Desktop Environment. + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; + environment.gnome.excludePackages = + (with pkgs; [ gnome-photos gnome-tour gnome-connections ]) + ++ (with pkgs.gnome; [ + atomix # puzzle game + epiphany # web browser + geary # email reader + gedit # text editor + gnome-calendar + gnome-clocks + gnome-contacts + gnome-maps + gnome-music + gnome-notes + gnome-terminal + gnome-weather + hitori # sudoku game + iagno # go game + simple-scan # document scanner + tali # poker game + totem # video player + ]); + + # Services required for gnome + programs.dconf.enable = true; + services.dbus.enable = true; + services.udisks2.enable = true; + + # Extra gnome packages + environment.systemPackages = with pkgs; [ + gnome.gnome-tweaks + gnome.gnome-boxes + ]; + }; +} diff --git a/nixos/hosts/thalassa/eevee/home/dconf.nix b/nixos/common/modules/gnome/hm.nix similarity index 66% rename from nixos/hosts/thalassa/eevee/home/dconf.nix rename to nixos/common/modules/gnome/hm.nix index 32c102d..cba3ba8 100644 --- a/nixos/hosts/thalassa/eevee/home/dconf.nix +++ b/nixos/common/modules/gnome/hm.nix @@ -16,13 +16,44 @@ let "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${name}") binds; in { + xdg.mimeApps.enable = true; + xdg.mimeApps.defaultApplications = { + "text/html" = "firefox.desktop"; + "text/plain" = "org.gnome.TextEditor.desktop"; + "application/pdf" = "org.gnome.Evince.desktop"; + + # Images + "image/bmp" = "org.gnome.eog.desktop"; + "image/gif" = "org.gnome.eog.desktop"; + "image/jpg" = "org.gnome.eog.desktop"; + "image/pjpeg" = "org.gnome.eog.desktop"; + "image/png" = "org.gnome.eog.desktop"; + "image/tiff" = "org.gnome.eog.desktop"; + "image/webp" = "org.gnome.eog.desktop"; + "image/x-bmp" = "org.gnome.eog.desktop"; + "image/x-gray" = "org.gnome.eog.desktop"; + "image/x-icb" = "org.gnome.eog.desktop"; + "image/x-ico" = "org.gnome.eog.desktop"; + "image/x-png" = "org.gnome.eog.desktop"; + "image/x-portable-anymap" = "org.gnome.eog.desktop"; + "image/x-portable-bitmap" = "org.gnome.eog.desktop"; + "image/x-portable-graymap" = "org.gnome.eog.desktop"; + "image/x-portable-pixmap" = "org.gnome.eog.desktop"; + "image/x-xbitmap" = "org.gnome.eog.desktop"; + "image/x-xpixmap" = "org.gnome.eog.desktop"; + "image/x-pcx" = "org.gnome.eog.desktop"; + "image/svg+xml" = "org.gnome.eog.desktop"; + "image/svg+xml-compressed" = "org.gnome.eog.desktop"; + "image/vnd.wap.wbmp" = "org.gnome.eog.desktop"; + "image/x-icns" = "org.gnome.eog.desktop"; + }; + + + dconf.settings = { "org/gnome/desktop/input-sources" = { sources = [ (mkTuple [ "xkb" "us+altgr-intl" ]) ]; - }; - - "org/gnome/desktop/peripherals/mouse" = { - accel-profile = "flat"; + xkb-options = [ "terminate:ctrl_alt_bksp" ]; }; "org/gnome/desktop/peripherals/touchpad" = { diff --git a/nixos/hosts/hades/minio/configuration.nix b/nixos/hosts/hades/minio/configuration.nix index 00039c3..5d2f755 100644 --- a/nixos/hosts/hades/minio/configuration.nix +++ b/nixos/hosts/hades/minio/configuration.nix @@ -13,6 +13,6 @@ in { services.minio = { enable = true; rootCredentialsFile = "${vs.minio}/environment"; - package = pkgs.v.minio-old; + package = pkgs.minio_legacy_fs; }; } diff --git a/nixos/hosts/olympus/bastion/configuration.nix b/nixos/hosts/olympus/bastion/configuration.nix index a66794f..0c340d7 100644 --- a/nixos/hosts/olympus/bastion/configuration.nix +++ b/nixos/hosts/olympus/bastion/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ pkgs, ... }: +{ pkgs, lib, ... }: let fix-vscode = pkgs.writeScriptBin "fix-vscode" '' #!${pkgs.stdenv.shell} @@ -23,6 +23,15 @@ in { ./hardware-configuration.nix ]; + # This _should_ fix vscode errors as well + programs.nix-ld.enable = true; + # environment.variables = { + # NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [ + # pkgs.stdenv.cc.cc + # ]; + # # NIX_LD = lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker"; + # }; + # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; boot.loader.grub.version = 2; @@ -36,7 +45,7 @@ in { # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "22.11"; # Did you read the comment? - virtualisation.podman.enable = true; + virtualisation.podman.enable = true; # Additional packages environment.systemPackages = with pkgs; [ diff --git a/nixos/hosts/olympus/minio/configuration.nix b/nixos/hosts/olympus/minio/configuration.nix index 1ce65f3..95187b2 100644 --- a/nixos/hosts/olympus/minio/configuration.nix +++ b/nixos/hosts/olympus/minio/configuration.nix @@ -27,7 +27,7 @@ in { services.minio = { enable = true; - package = pkgs.v.minio-old; + package = pkgs.minio_legacy_fs; rootCredentialsFile = "${vs.minio}/environment"; listenAddress = ":${toString listenPort}"; consoleAddress = ":${toString consolePort}"; diff --git a/nixos/hosts/olympus/nginx/configuration.nix b/nixos/hosts/olympus/nginx/configuration.nix index 8474edb..564061b 100644 --- a/nixos/hosts/olympus/nginx/configuration.nix +++ b/nixos/hosts/olympus/nginx/configuration.nix @@ -39,11 +39,10 @@ in { recommendedProxySettings = true; recommendedTlsSettings = true; recommendedOptimisation = true; + recommendedBrotliSettings = true; clientMaxBodySize = "500m"; - package = pkgs.nginxMainline.override { - modules = with pkgs.nginxModules; [ brotli ]; - }; + package = pkgs.nginxMainline; # 0x76.dev virtualHosts."ha.0x76.dev" = proxy "http://home-assistant.olympus:8123/"; @@ -148,17 +147,6 @@ in { virtualHosts."blog.xirion.net" = k8s_proxy; }; - services.nginx.commonHttpConfig = '' - brotli on; - brotli_comp_level 6; - brotli_static on; - brotli_types application/atom+xml application/javascript application/json application/rss+xml - application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype - application/x-font-ttf application/x-javascript application/xhtml+xml application/xml - font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon - image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml; - ''; - security.acme.defaults.email = "victorheld12@gmail.com"; security.acme.acceptTerms = true; security.acme.preliminarySelfsigned = true; diff --git a/nixos/hosts/olympus/woodpecker/configuration.nix b/nixos/hosts/olympus/woodpecker/configuration.nix index d7ca1fa..a0590fb 100644 --- a/nixos/hosts/olympus/woodpecker/configuration.nix +++ b/nixos/hosts/olympus/woodpecker/configuration.nix @@ -18,53 +18,43 @@ in { # Additional packages environment.systemPackages = with pkgs; [ ]; - networking.firewall.allowedTCPPorts = [ ]; + networking.firewall.allowedTCPPorts = [ 8000 9000 ]; vault-secrets.secrets.woodpecker = { - services = [ "podman-woodpecker-server" "podman-woodpecker-agent" ]; + services = [ "woodpecker-server" "woodpecker-agent-docker" ]; quoteEnvironmentValues = false; # Needed for docker }; virtualisation.podman = { enable = true; dockerSocket.enable = true; + dockerCompat = true; }; - systemd.services.create-woodpecker-pod = with config.virtualisation.oci-containers; { - serviceConfig.Type = "oneshot"; - wantedBy = [ "${backend}-woodpecker-server.service" "${backend}-woodpecker-agent.service"]; - script = '' - ${pkgs.podman}/bin/podman pod exists woodpecker || \ - ${pkgs.podman}/bin/podman pod create -n woodpecker -p 8000:8000 - ''; + services.woodpecker-server = { + enable = true; + environment = { + WOODPECKER_OPEN = "true"; + WOODPECKER_HOST = "https://ci.0x76.dev"; + WOODPECKER_GITEA = "true"; + WOODPECKER_GITEA_URL = "https://git.0x76.dev"; + WOODPECKER_ADMIN = "v"; + WOODPECKER_AUTHENTICATE_PUBLIC_REPOS = "true"; + WOODPECKER_SERVER_ADDR = "10.42.42.33:8000"; + }; + environmentFile = "${vs.woodpecker}/environment"; }; - virtualisation.oci-containers = { - backend = "podman"; - containers = { - woodpecker-server = { - image = "woodpeckerci/woodpecker-server:latest"; - volumes = [ "woodpecker-server-data:/var/lib/woodpecker/" ]; - environmentFiles = [ "${vs.woodpecker}/environment" ]; - extraOptions = [ "--pod=woodpecker" ]; - environment = { - WOODPECKER_OPEN = "true"; - WOODPECKER_HOST = "https://ci.0x76.dev"; - WOODPECKER_GITEA = "true"; - WOODPECKER_GITEA_URL = "https://git.0x76.dev"; - WOODPECKER_ADMIN = "v"; - WOODPECKER_AUTHENTICATE_PUBLIC_REPOS = "true"; - }; - }; - woodpecker-agent = { - image = "woodpeckerci/woodpecker-agent:latest"; - dependsOn = [ "woodpecker-server" ]; - extraOptions = [ "--pod=woodpecker" ]; - cmd = [ "agent" ]; - volumes = [ "/var/run/docker.sock:/var/run/docker.sock" ]; - environmentFiles = [ "${vs.woodpecker}/environment" ]; - environment = { WOODPECKER_SERVER = "localhost:9000"; }; + services.woodpecker-agents.agents = { + docker = { + enable = true; + environment = { + DOCKER_HOST = "unix:///run/podman/podman.sock"; + WOODPECKER_BACKEND = "docker"; + WOODPECKER_SERVER = "localhost:9000"; }; + environmentFile = [ "${vs.woodpecker}/environment" ]; + extraGroups = [ "podman" ]; }; }; } diff --git a/nixos/hosts/thalassa/aoife/configuration.nix b/nixos/hosts/thalassa/aoife/configuration.nix index 655438f..29ed1f3 100644 --- a/nixos/hosts/thalassa/aoife/configuration.nix +++ b/nixos/hosts/thalassa/aoife/configuration.nix @@ -2,57 +2,20 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, inputs, ... }: { +{ pkgs, inputs, ... }: { imports = [ + ../../../common/desktop ./hardware-configuration.nix inputs.nixos-hardware.nixosModules.lenovo-thinkpad-z ./hardware.nix - ./networking.nix - ./desktop-env.nix ]; # Bootloader. boot = { - kernelPackages = pkgs.linuxPackages_latest; - # kernelPackages = pkgs.linuxKernel.packages.linux_zen; - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - efi.efiSysMountPoint = "/boot/efi"; - }; - kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; }; - initrd = { - kernelModules = [ "amdgpu" ]; - systemd.enable = true; - verbose = false; - }; + initrd.kernelModules = [ "amdgpu" ]; resumeDevice = "/dev/nvme0n1p2"; }; - fileSystems."/".options = [ "compress=zstd" ]; - - # Set your time zone. - time.timeZone = "Europe/Amsterdam"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_GB.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = "nl_NL.UTF-8"; - LC_IDENTIFICATION = "nl_NL.UTF-8"; - LC_MEASUREMENT = "nl_NL.UTF-8"; - LC_MONETARY = "nl_NL.UTF-8"; - LC_NAME = "nl_NL.UTF-8"; - LC_NUMERIC = "nl_NL.UTF-8"; - LC_PAPER = "nl_NL.UTF-8"; - LC_TELEPHONE = "nl_NL.UTF-8"; - LC_TIME = "nl_NL.UTF-8"; - }; - - # Enable CUPS to print documents. - services.printing.enable = true; - - environment.systemPackages = with pkgs; [ wireguard-tools ]; - home-manager = { useGlobalPkgs = true; useUserPackages = true; @@ -60,48 +23,8 @@ extraSpecialArgs = { inherit inputs; }; }; - # Enable sound with pipewire. - sound.enable = true; - hardware.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; - - # 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; - }; - - virtualisation = { - podman.enable = true; - libvirtd = { - enable = true; - qemu.package = pkgs.qemu_kvm; - }; - }; - - fonts.fonts = with pkgs; [ - material-design-icons - noto-fonts - noto-fonts-cjk - noto-fonts-emoji - dejavu_fonts - (nerdfonts.override { - fonts = - [ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ]; - }) - ]; - - programs.steam = { - enable = true; - # Open ports in the firewall for Steam Remote Play - remotePlay.openFirewall = true; - }; + # Enable Ozone rendering for Chromium and Electron apps. + environment.sessionVariables.NIXOS_OZONE_WL = "1"; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions @@ -110,14 +33,4 @@ # 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 = "23.05"; # Did you read the comment? - - # Enable ccache - # WARNING: Adding packages here makes them always be built from source, so only do so for once that are usually build like that - # This should be fixed when nix switches to content-addresabble paths - programs.ccache.enable = true; - programs.ccache.packageNames = [ - "mongodb" - ]; - nix.settings.extra-sandbox-paths = - [ (toString config.programs.ccache.cacheDir) ]; } diff --git a/nixos/hosts/thalassa/aoife/desktop-env.nix b/nixos/hosts/thalassa/aoife/desktop-env.nix deleted file mode 100644 index a016452..0000000 --- a/nixos/hosts/thalassa/aoife/desktop-env.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ pkgs, ... }: { - # Enable the X11 windowing system. - services.xserver.enable = true; - services.xserver.videoDrivers = [ "amdgpu" ]; - services.xserver.excludePackages = [ pkgs.xterm ]; - - # Configure keymap in X11 - services.xserver = { - # TODO: Is this smart? - dpi = 280; - layout = "us"; - xkbVariant = "altgr-intl"; - xkbOptions = "caps:swapescape"; - }; - - # Enable the GNOME Desktop Environment. - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; - services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; - environment.gnome.excludePackages = - (with pkgs; [ gnome-photos gnome-tour gnome-connections ]) - ++ (with pkgs.gnome; [ - atomix # puzzle game - epiphany # web browser - geary # email reader - gedit # text editor - gnome-calendar - gnome-clocks - gnome-contacts - gnome-maps - gnome-music - gnome-notes - gnome-terminal - gnome-weather - hitori # sudoku game - iagno # go game - simple-scan # document scanner - tali # poker game - totem # video player - ]); - - # Services required for gnome - programs.dconf.enable = true; - services.dbus.enable = true; - services.udisks2.enable = true; - - # Extra gnome packages - environment.systemPackages = with pkgs; [ - gnome.gnome-tweaks - gnome.gnome-boxes - ]; - -} diff --git a/nixos/hosts/thalassa/aoife/hardware.nix b/nixos/hosts/thalassa/aoife/hardware.nix index c6b1208..2875b28 100644 --- a/nixos/hosts/thalassa/aoife/hardware.nix +++ b/nixos/hosts/thalassa/aoife/hardware.nix @@ -5,6 +5,16 @@ services.hardware.bolt.enable = true; + # FS + fileSystems."/".options = [ "compress=zstd" ]; + + # Video Driver + services.xserver.videoDrivers = [ "amdgpu" ]; + services.xserver = { + dpi = 280; + xkbOptions = "caps:swapescape"; + }; + # Vulkan hardware.opengl.driSupport = true; hardware.opengl.extraPackages = with pkgs; [ @@ -12,6 +22,7 @@ rocm-opencl-icd rocm-opencl-runtime ]; + systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.hip}" ]; diff --git a/nixos/hosts/thalassa/aoife/home/dconf.nix b/nixos/hosts/thalassa/aoife/home/dconf.nix deleted file mode 100644 index 9b1e575..0000000 --- a/nixos/hosts/thalassa/aoife/home/dconf.nix +++ /dev/null @@ -1,88 +0,0 @@ -{ lib, ... }: - -with lib.hm.gvariant; -let - inherit (builtins) attrNames map; - inherit (lib.attrsets) mapAttrs' nameValuePair; - generate_custom_keybindings = binds: - { - "org/gnome/settings-daemon/plugins/media-keys" = { - custom-keybindings = map (name: - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${name}/") - (attrNames binds); - }; - } // mapAttrs' (name: - nameValuePair - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${name}") - binds; -in { - dconf.settings = { - "org/gnome/desktop/input-sources" = { - sources = [ (mkTuple [ "xkb" "us+altgr-intl" ]) ]; - xkb-options = [ "terminate:ctrl_alt_bksp" "caps:swapescape" ]; - }; - - "org/gnome/desktop/peripherals/touchpad" = { - tap-to-click = true; - two-finger-scrolling-enabled = true; - }; - - "org/gnome/mutter" = { - attach-modal-dialogs = true; - dynamic-workspaces = false; - edge-tiling = true; - focus-change-on-pointer-rest = true; - workspaces-only-on-primary = true; - }; - - "org/gnome/mutter/keybindings" = { - toggle-tiled-left = [ "bracketleft" ]; - toggle-tiled-right = [ "bracketright" ]; - }; - - "org/gnome/shell/keybindings" = { toggle-overview = [ "d" ]; }; - - "org/gnome/desktop/interface" = { color-scheme = "prefer-dark"; }; - - "org/gnome/desktop/wm/preferences" = { - auto-raise = false; - num-workspaces = 6; - focus-mode = "sloppy"; - }; - - "org/gnome/desktop/wm/keybindings" = { - raise-or-lower = [ "s" ]; - switch-applications = [ "Tab" ]; - switch-applications-backward = [ "Tab" ]; - move-to-workspace-1 = [ "exclam" ]; - move-to-workspace-2 = [ "at" ]; - move-to-workspace-3 = [ "numbersign" ]; - move-to-workspace-4 = [ "dollar" ]; - move-to-workspace-5 = [ "percent" ]; - move-to-workspace-6 = [ "asciicircum" ]; - switch-to-workspace-1 = [ "1" ]; - switch-to-workspace-2 = [ "2" ]; - switch-to-workspace-3 = [ "3" ]; - switch-to-workspace-4 = [ "4" ]; - switch-to-workspace-5 = [ "5" ]; - switch-to-workspace-6 = [ "6" ]; - toggle-fullscreen = [ "M" ]; - toggle-maximized = [ "m" ]; - }; - - "org/gnome/tweaks" = { show-extensions-notice = false; }; - - "org/gnome/boxes" = { first-run = false; }; - } // generate_custom_keybindings { - "terminal" = { - binding = "Return"; - command = "kgx"; - name = "Open Terminal"; - }; - "firefox" = { - binding = "f"; - command = "firefox"; - name = "Open Firefox"; - }; - }; -} diff --git a/nixos/hosts/thalassa/aoife/home/default.nix b/nixos/hosts/thalassa/aoife/home/default.nix index 855fe91..c84a073 100644 --- a/nixos/hosts/thalassa/aoife/home/default.nix +++ b/nixos/hosts/thalassa/aoife/home/default.nix @@ -1,193 +1,14 @@ -{ lib, config, pkgs, inputs, ... }: -let - tex = pkgs.texlive.combine { - inherit (pkgs.texlive) scheme-full; - dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; }; - }; -in { +{ ... }: { programs.home-manager.enable = true; home.username = "victor"; home.homeDirectory = "/home/victor"; home.stateVersion = "23.05"; - imports = [ - ./dconf.nix - ./theme.nix - ./neovim.nix - ]; + imports = [ ../../../../common/desktop/home.nix ]; - home.packages = with pkgs; [ - btop - calibre - element-desktop - fusee-launcher - gcc - gimp - inputs.comma.packages.${pkgs.system}.default - inputs.webcord.packages.${pkgs.system}.default - jetbrains.clion - jetbrains.idea-ultimate - mullvad-vpn - neofetch - nixfmt - nixpkgs-review - python3 - plex-media-player - rustup - solo2-cli - tex - yt-dlp - ]; - - programs.riff = { - enable = true; - direnv = true; + # Custom dconf settings + dconf.settings."org/gnome/desktop/input-sources" = { + xkb-options = [ "caps:swapescape" ]; }; - - xdg.mimeApps.enable = true; - xdg.mimeApps.defaultApplications = { - "text/html" = "firefox.desktop"; - "text/plain" = "org.gnome.TextEditor.desktop"; - "application/pdf" = "org.gnome.Evince.desktop"; - - # Images - "image/bmp" = "org.gnome.eog.desktop"; - "image/gif" = "org.gnome.eog.desktop"; - "image/jpg" = "org.gnome.eog.desktop"; - "image/pjpeg" = "org.gnome.eog.desktop"; - "image/png" = "org.gnome.eog.desktop"; - "image/tiff" = "org.gnome.eog.desktop"; - "image/webp" = "org.gnome.eog.desktop"; - "image/x-bmp" = "org.gnome.eog.desktop"; - "image/x-gray" = "org.gnome.eog.desktop"; - "image/x-icb" = "org.gnome.eog.desktop"; - "image/x-ico" = "org.gnome.eog.desktop"; - "image/x-png" = "org.gnome.eog.desktop"; - "image/x-portable-anymap" = "org.gnome.eog.desktop"; - "image/x-portable-bitmap" = "org.gnome.eog.desktop"; - "image/x-portable-graymap" = "org.gnome.eog.desktop"; - "image/x-portable-pixmap" = "org.gnome.eog.desktop"; - "image/x-xbitmap" = "org.gnome.eog.desktop"; - "image/x-xpixmap" = "org.gnome.eog.desktop"; - "image/x-pcx" = "org.gnome.eog.desktop"; - "image/svg+xml" = "org.gnome.eog.desktop"; - "image/svg+xml-compressed" = "org.gnome.eog.desktop"; - "image/vnd.wap.wbmp" = "org.gnome.eog.desktop"; - "image/x-icns" = "org.gnome.eog.desktop"; - }; - - programs.exa = { - enable = true; - enableAliases = true; - }; - - programs.bat.enable = true; - - programs.git = { - enable = true; - package = pkgs.gitAndTools.gitFull; - userName = "Victor"; - userEmail = "victor@xirion.net"; - lfs.enable = true; - # delta.enable = true; - extraConfig = { - push.autoSetupRemote = true; - init.defaultBranch = "main"; - }; - }; - - programs.tmux = { - enable = true; - shortcut = "b"; - terminal = "screen-256color"; - clock24 = true; - }; - - programs.firefox.enable = true; - - programs.vscode = { - enable = true; - package = pkgs.vscode; - userSettings = { - "ltex.language" = "en-GB"; - "latex-workshop.linting.chktex.enabled" = true; - "latex-workshop.latex.clean.subfolder.enabled" = true; - "latex-workshop.latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%"; - "editor.fontFamily" = - "'DejaVuSansMono Nerd Font', 'monospace', monospace"; - "keyboard.dispatch" = "keyCode"; - "rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer"; - "terminal.integrated.defaultProfile.linux" = "zsh"; - "nix.enableLanguageServer" = true; # Enable LSP. - "nix.serverPath" = "${pkgs.nil}/bin/nil"; - "[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; }; - "rust-analyzer.checkOnSave.command" = "clippy"; - "debug.allowBreakpointsEverywhere" = true; - # Don't index unecessary things - "files.exclude" = { - "**/.vscode" = true; - "**/.git" = true; - "**/.svn" = true; - "**/.hg" = true; - "**/.deps" = true; - "**/CVS" = true; - "**/.DS_Store" = true; - "/bin" = true; - "/boot" = true; - "/cdrom" = true; - "/dev" = true; - "/proc" = true; - "/etc" = true; - "/nix" = true; - }; - }; - extensions = with pkgs.vscode-extensions; - with pkgs.v.vscode-extensions; [ - brettm12345.nixfmt-vscode - codezombiech.gitignore - editorconfig.editorconfig - foxundermoon.shell-format - james-yu.latex-workshop - jnoortheen.nix-ide - matklad.rust-analyzer - mkhl.direnv - ms-vscode-remote.remote-ssh - ms-vscode.cpptools - platformio.platformio-ide - redhat.vscode-yaml - tamasfe.even-better-toml - valentjn.vscode-ltex - vscodevim.vim - vadimcn.vscode-lldb - xaver.clang-format - sumneko.lua - ]; - }; - - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; - - programs.zsh = { - enable = true; - sessionVariables = { DIRENV_LOG_FORMAT = ""; }; - }; - - xdg.userDirs = let home = config.home.homeDirectory; - in { - enable = true; - createDirectories = true; - desktop = "${home}/.desktop"; - documents = "${home}/cloud/Documents"; - download = "${home}/dl"; - music = "${home}/cloud/Music"; - pictures = "${home}/cloud/Pictures"; - publicShare = "${home}/.publicShare"; - templates = "${home}/.templates"; - videos = "${home}/cloud/Videos"; - }; - - services.syncthing.enable = true; } diff --git a/nixos/hosts/thalassa/aoife/home/neovim.nix b/nixos/hosts/thalassa/aoife/home/neovim.nix deleted file mode 100644 index 494acd2..0000000 --- a/nixos/hosts/thalassa/aoife/home/neovim.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ inputs, pkgs, ... }: { - imports = [ inputs.nixvim.homeManagerModules.nixvim ]; - programs.nixvim = { - enable = true; - package = pkgs.neovim-unwrapped; - vimAlias = true; - - globals = { mapleader = " "; }; - - maps.normal = { - "ff" = "lua require('telescope.builtin').find_files()"; - "fg" = "lua require('telescope.builtin').live_grep()"; - "" = - "lua require('Comment.api').toggle.linewise.current()"; # map ctrl+/ to commenting code - }; - - extraPlugins = with pkgs.vimPlugins; [ catppuccin-nvim luasnip ]; - - colorscheme = "catppuccin-frappe"; - - extraConfigLua = builtins.readFile ./nvim.lua; - - plugins = { - bufferline.enable = true; - nix.enable = true; - treesitter = { - enable = true; - nixGrammars = true; - # ensureInstalled = [ ]; - }; - surround.enable = true; - fugitive.enable = true; - gitgutter.enable = true; - lualine = { - enable = true; - theme = "catppuccin"; - }; - telescope = { - enable = true; - extensions.fzf-native.enable = true; - extensions.fzf-native.fuzzy = true; - }; - comment-nvim = { enable = true; }; - lsp = { - enable = true; - servers.rust-analyzer.enable = true; - servers.rnix-lsp.enable = true; - servers.pyright.enable = true; - servers.elixirls.enable = true; - servers.clangd.enable = true; - }; - trouble.enable = true; - lspkind.enable = true; - nvim-cmp = { - enable = true; - autoEnableSources = true; - sources = [ - { name = "nvim_lsp"; } - { name = "cmp-latex-symbols"; } - { - name = "luasnip"; - option = { show_autosnippets = true; }; - } - { name = "cmp-spell"; } - { name = "cmp-rg"; } - { name = "path"; } - { name = "buffer"; } - ]; - snippet.expand = "luasnip"; - mappingPresets = [ "insert" "cmdline" ]; - mapping = { - "" = "cmp.mapping.confirm({ select = true })"; - "" = { - modes = [ "i" "s" ]; - action = '' - function(fallback) - local luasnip = require('luasnip') - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expandable() then - luasnip.expand() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end - ''; - }; - }; - }; - }; - }; -} diff --git a/nixos/hosts/thalassa/aoife/home/nvim.lua b/nixos/hosts/thalassa/aoife/home/nvim.lua deleted file mode 100644 index e69de29..0000000 diff --git a/nixos/hosts/thalassa/aoife/home/theme.nix b/nixos/hosts/thalassa/aoife/home/theme.nix deleted file mode 100644 index f48e44c..0000000 --- a/nixos/hosts/thalassa/aoife/home/theme.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ lib, pkgs, config, ... }: -let - theme = "Catppuccin-Pink-Dark"; - cursorTheme = config.home.pointerCursor.name; -in { - home.pointerCursor = { - name = "Bibata_Ghost"; - size = 24; - package = pkgs.bibata-cursors-translucent; - }; - - gtk = { - enable = true; - theme = { - name = theme; - package = pkgs.catppuccin-gtk; - }; - iconTheme = { - name = "Papirus-Dark"; - package = pkgs.papirus-icon-theme.override { color = "violet"; }; - }; - cursorTheme = { - name = cursorTheme; - inherit (config.home.pointerCursor) package size; - }; - }; - - programs.vscode = { - userSettings."workbench.colorTheme" = "Catppuccin Frappé"; - extensions = [ pkgs.vscode-extensions.catppuccin.catppuccin-vsc ]; - }; -} diff --git a/nixos/hosts/thalassa/aoife/networking.nix b/nixos/hosts/thalassa/aoife/networking.nix deleted file mode 100644 index 826668a..0000000 --- a/nixos/hosts/thalassa/aoife/networking.nix +++ /dev/null @@ -1,5 +0,0 @@ -_: { - networking.networkmanager.enable = true; - networking.firewall.checkReversePath = false; - networking.firewall.enable = false; -} diff --git a/nixos/hosts/thalassa/eevee/configuration.nix b/nixos/hosts/thalassa/eevee/configuration.nix index 403cc7f..f4aef52 100644 --- a/nixos/hosts/thalassa/eevee/configuration.nix +++ b/nixos/hosts/thalassa/eevee/configuration.nix @@ -4,10 +4,9 @@ { config, pkgs, inputs, ... }: { imports = [ + ../../../common/desktop ./hardware-configuration.nix ./hardware.nix - ./desktop-env.nix - ./networking.nix ]; # Bootloader. @@ -56,50 +55,6 @@ users.victor = import ./home; extraSpecialArgs = { inherit inputs; }; }; - - # Enable sound with pipewire. - sound.enable = true; - hardware.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; - - # 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; - }; - - virtualisation = { - podman.enable = true; - libvirtd = { - enable = true; - qemu.package = pkgs.qemu_kvm; - }; - }; - - fonts.fonts = with pkgs; [ - material-design-icons - noto-fonts - noto-fonts-cjk - noto-fonts-emoji - dejavu_fonts - (nerdfonts.override { - fonts = - [ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ]; - }) - ]; - - programs.steam = { - enable = true; - # Open ports in the firewall for Steam Remote Play - remotePlay.openFirewall = true; - }; - # 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 diff --git a/nixos/hosts/thalassa/eevee/desktop-env.nix b/nixos/hosts/thalassa/eevee/desktop-env.nix deleted file mode 100644 index 515325a..0000000 --- a/nixos/hosts/thalassa/eevee/desktop-env.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ pkgs, ... }: { - # Enable the X11 windowing system. - services.xserver.enable = true; - services.xserver.videoDrivers = [ "nvidia" ]; - services.xserver.excludePackages = [ pkgs.xterm ]; - - # Configure keymap in X11 - services.xserver = { - layout = "us"; - xkbVariant = "altgr-intl"; - }; - - # Enable the GNOME Desktop Environment. - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; - services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; - environment.gnome.excludePackages = - (with pkgs; [ gnome-photos gnome-tour gnome-connections ]) - ++ (with pkgs.gnome; [ - atomix # puzzle game - epiphany # web browser - geary # email reader - gedit # text editor - gnome-calendar - gnome-clocks - gnome-contacts - gnome-maps - gnome-music - gnome-notes - gnome-terminal - gnome-weather - hitori # sudoku game - iagno # go game - simple-scan # document scanner - tali # poker game - totem # video player - ]); - - # Services required for gnome - programs.dconf.enable = true; - services.dbus.enable = true; - services.udisks2.enable = true; - - # Extra gnome packages - environment.systemPackages = with pkgs; [ - gnome.gnome-tweaks - gnome.gnome-boxes - ]; -} diff --git a/nixos/hosts/thalassa/eevee/hardware.nix b/nixos/hosts/thalassa/eevee/hardware.nix index 6c441a4..2e9e579 100644 --- a/nixos/hosts/thalassa/eevee/hardware.nix +++ b/nixos/hosts/thalassa/eevee/hardware.nix @@ -1,8 +1,6 @@ { pkgs, config, ... }: { hardware.enableAllFirmware = true; - hardware.bluetooth.enable = true; - services.hardware.bolt.enable = true; services.xserver.videoDrivers = [ "nvidia" ]; @@ -24,8 +22,12 @@ driSupport = true; }; + # udev services.udev.packages = with pkgs; [ wooting-udev-rules ]; + # FS + fileSystems."/".options = [ "compress=zstd" ]; + # SSD Trim services.fstrim.enable = true; } diff --git a/nixos/hosts/thalassa/eevee/home/default.nix b/nixos/hosts/thalassa/eevee/home/default.nix index 4aaf26f..cbc0a03 100644 --- a/nixos/hosts/thalassa/eevee/home/default.nix +++ b/nixos/hosts/thalassa/eevee/home/default.nix @@ -11,184 +11,9 @@ in { home.homeDirectory = "/home/victor"; home.stateVersion = "23.05"; - imports = [ - ./dconf.nix - ./theme.nix - ./neovim.nix - ]; + imports = [ ../../../../common/desktop/home.nix ]; - home.packages = with pkgs; [ - btop - calibre - element-desktop - fusee-launcher - gcc - gimp - inputs.comma.packages.${pkgs.system}.default - inputs.webcord.packages.${pkgs.system}.default - jetbrains.clion - jetbrains.idea-ultimate - mullvad-vpn - neofetch - nixfmt - nixpkgs-review - python3 - plex-media-player - rustup - solo2-cli - tex - yt-dlp - wootility - ]; - - programs.riff = { - enable = true; - direnv = true; + dconf.settings."org/gnome/desktop/peripherals/mouse" = { + accel-profile = "flat"; }; - - xdg.mimeApps.enable = true; - xdg.mimeApps.defaultApplications = { - "text/html" = "firefox.desktop"; - "text/plain" = "org.gnome.TextEditor.desktop"; - "application/pdf" = "org.gnome.Evince.desktop"; - - # Images - "image/bmp" = "org.gnome.eog.desktop"; - "image/gif" = "org.gnome.eog.desktop"; - "image/jpg" = "org.gnome.eog.desktop"; - "image/pjpeg" = "org.gnome.eog.desktop"; - "image/png" = "org.gnome.eog.desktop"; - "image/tiff" = "org.gnome.eog.desktop"; - "image/webp" = "org.gnome.eog.desktop"; - "image/x-bmp" = "org.gnome.eog.desktop"; - "image/x-gray" = "org.gnome.eog.desktop"; - "image/x-icb" = "org.gnome.eog.desktop"; - "image/x-ico" = "org.gnome.eog.desktop"; - "image/x-png" = "org.gnome.eog.desktop"; - "image/x-portable-anymap" = "org.gnome.eog.desktop"; - "image/x-portable-bitmap" = "org.gnome.eog.desktop"; - "image/x-portable-graymap" = "org.gnome.eog.desktop"; - "image/x-portable-pixmap" = "org.gnome.eog.desktop"; - "image/x-xbitmap" = "org.gnome.eog.desktop"; - "image/x-xpixmap" = "org.gnome.eog.desktop"; - "image/x-pcx" = "org.gnome.eog.desktop"; - "image/svg+xml" = "org.gnome.eog.desktop"; - "image/svg+xml-compressed" = "org.gnome.eog.desktop"; - "image/vnd.wap.wbmp" = "org.gnome.eog.desktop"; - "image/x-icns" = "org.gnome.eog.desktop"; - }; - - programs.exa = { - enable = true; - enableAliases = true; - }; - - programs.bat.enable = true; - - programs.git = { - enable = true; - package = pkgs.gitAndTools.gitFull; - userName = "Victor"; - userEmail = "victor@xirion.net"; - lfs.enable = true; - # delta.enable = true; - extraConfig = { - push.autoSetupRemote = true; - init.defaultBranch = "main"; - }; - }; - - programs.tmux = { - enable = true; - shortcut = "b"; - terminal = "screen-256color"; - clock24 = true; - }; - - programs.firefox.enable = true; - - programs.vscode = { - enable = true; - package = pkgs.vscode; - userSettings = { - "ltex.language" = "en-GB"; - "latex-workshop.linting.chktex.enabled" = true; - "latex-workshop.latex.clean.subfolder.enabled" = true; - "latex-workshop.latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%"; - "editor.fontFamily" = - "'DejaVuSansMono Nerd Font', 'monospace', monospace"; - "keyboard.dispatch" = "keyCode"; - "rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer"; - "terminal.integrated.defaultProfile.linux" = "zsh"; - "nix.enableLanguageServer" = true; # Enable LSP. - "nix.serverPath" = "${pkgs.nil}/bin/nil"; - "[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; }; - "rust-analyzer.checkOnSave.command" = "clippy"; - "debug.allowBreakpointsEverywhere" = true; - # Don't index unecessary things - "files.exclude" = { - "**/.vscode" = true; - "**/.git" = true; - "**/.svn" = true; - "**/.hg" = true; - "**/.deps" = true; - "**/CVS" = true; - "**/.DS_Store" = true; - "/bin" = true; - "/boot" = true; - "/cdrom" = true; - "/dev" = true; - "/proc" = true; - "/etc" = true; - "/nix" = true; - }; - }; - extensions = with pkgs.vscode-extensions; - with pkgs.v.vscode-extensions; [ - brettm12345.nixfmt-vscode - codezombiech.gitignore - editorconfig.editorconfig - foxundermoon.shell-format - james-yu.latex-workshop - jnoortheen.nix-ide - matklad.rust-analyzer - mkhl.direnv - ms-vscode-remote.remote-ssh - ms-vscode.cpptools - platformio.platformio-ide - redhat.vscode-yaml - tamasfe.even-better-toml - valentjn.vscode-ltex - vscodevim.vim - vadimcn.vscode-lldb - xaver.clang-format - sumneko.lua - ]; - }; - - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; - - programs.zsh = { - enable = true; - sessionVariables = { DIRENV_LOG_FORMAT = ""; }; - }; - - xdg.userDirs = let home = config.home.homeDirectory; - in { - enable = true; - createDirectories = true; - desktop = "${home}/.desktop"; - documents = "${home}/cloud/Documents"; - download = "${home}/dl"; - music = "${home}/cloud/Music"; - pictures = "${home}/cloud/Pictures"; - publicShare = "${home}/.publicShare"; - templates = "${home}/.templates"; - videos = "${home}/cloud/Videos"; - }; - - services.syncthing.enable = true; } diff --git a/nixos/hosts/thalassa/eevee/home/neovim.nix b/nixos/hosts/thalassa/eevee/home/neovim.nix deleted file mode 100644 index 494acd2..0000000 --- a/nixos/hosts/thalassa/eevee/home/neovim.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ inputs, pkgs, ... }: { - imports = [ inputs.nixvim.homeManagerModules.nixvim ]; - programs.nixvim = { - enable = true; - package = pkgs.neovim-unwrapped; - vimAlias = true; - - globals = { mapleader = " "; }; - - maps.normal = { - "ff" = "lua require('telescope.builtin').find_files()"; - "fg" = "lua require('telescope.builtin').live_grep()"; - "" = - "lua require('Comment.api').toggle.linewise.current()"; # map ctrl+/ to commenting code - }; - - extraPlugins = with pkgs.vimPlugins; [ catppuccin-nvim luasnip ]; - - colorscheme = "catppuccin-frappe"; - - extraConfigLua = builtins.readFile ./nvim.lua; - - plugins = { - bufferline.enable = true; - nix.enable = true; - treesitter = { - enable = true; - nixGrammars = true; - # ensureInstalled = [ ]; - }; - surround.enable = true; - fugitive.enable = true; - gitgutter.enable = true; - lualine = { - enable = true; - theme = "catppuccin"; - }; - telescope = { - enable = true; - extensions.fzf-native.enable = true; - extensions.fzf-native.fuzzy = true; - }; - comment-nvim = { enable = true; }; - lsp = { - enable = true; - servers.rust-analyzer.enable = true; - servers.rnix-lsp.enable = true; - servers.pyright.enable = true; - servers.elixirls.enable = true; - servers.clangd.enable = true; - }; - trouble.enable = true; - lspkind.enable = true; - nvim-cmp = { - enable = true; - autoEnableSources = true; - sources = [ - { name = "nvim_lsp"; } - { name = "cmp-latex-symbols"; } - { - name = "luasnip"; - option = { show_autosnippets = true; }; - } - { name = "cmp-spell"; } - { name = "cmp-rg"; } - { name = "path"; } - { name = "buffer"; } - ]; - snippet.expand = "luasnip"; - mappingPresets = [ "insert" "cmdline" ]; - mapping = { - "" = "cmp.mapping.confirm({ select = true })"; - "" = { - modes = [ "i" "s" ]; - action = '' - function(fallback) - local luasnip = require('luasnip') - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expandable() then - luasnip.expand() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end - ''; - }; - }; - }; - }; - }; -} diff --git a/nixos/hosts/thalassa/eevee/home/nvim.lua b/nixos/hosts/thalassa/eevee/home/nvim.lua deleted file mode 100644 index e69de29..0000000 diff --git a/nixos/hosts/thalassa/eevee/networking.nix b/nixos/hosts/thalassa/eevee/networking.nix deleted file mode 100644 index 826668a..0000000 --- a/nixos/hosts/thalassa/eevee/networking.nix +++ /dev/null @@ -1,5 +0,0 @@ -_: { - networking.networkmanager.enable = true; - networking.firewall.checkReversePath = false; - networking.firewall.enable = false; -} diff --git a/nixos/pkgs/deemix-gui/default.nix b/nixos/pkgs/deemix-gui/default.nix deleted file mode 100644 index cb76d31..0000000 --- a/nixos/pkgs/deemix-gui/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron }: - -stdenv.mkDerivation rec { - pname = "deemix-gui"; - version = "2022-08-20"; - - src = fetchurl { - url = "https://download.deemix.app/gui/linux-x64-latest.AppImage"; - sha256 = "sha256-e2neemsAzGniBpXIPYbKk5LQHoYLvFj5/8QszCcoTYM="; - name = "${pname}-${version}.AppImage"; - }; - - appimageContents = appimageTools.extractType2 { - name = "${pname}-${version}"; - inherit src; - }; - - dontUnpack = true; - dontConfigure = true; - dontBuild = true; - - nativeBuildInputs = [ makeWrapper ]; - - installPhase = '' - runHook preInstall - - mkdir -p $out/bin $out/share/${pname} $out/share/applications - - cp -a ${appimageContents}/{locales,resources} $out/share/${pname} - cp -a ${appimageContents}/usr/share/icons $out/share - - runHook postInstall - ''; - - postFixup = '' - makeWrapper ${electron}/bin/electron $out/bin/${pname} --add-flags $out/share/${pname}/resources/app.asar - ''; - - meta = { platforms = [ "x86_64-linux" ]; }; -} diff --git a/nixos/pkgs/default.nix b/nixos/pkgs/default.nix index 3e7f642..d87e564 100644 --- a/nixos/pkgs/default.nix +++ b/nixos/pkgs/default.nix @@ -1,13 +1,8 @@ # nix-build -E 'with import {}; callPackage ./default.nix {}' final: prev: { v = { - # nixos 22.11 version of minio, need to upgrade backend from fs to xl - minio-old = prev.callPackage ./minio-old { }; - glitch-soc = prev.callPackage ./glitch-soc { }; - deemix-gui = prev.callPackage ./deemix-gui { }; - unbound = prev.unbound.override { withSystemd = true; withDoH = true; diff --git a/nixos/pkgs/minio-old/default.nix b/nixos/pkgs/minio-old/default.nix deleted file mode 100644 index 13c29ac..0000000 --- a/nixos/pkgs/minio-old/default.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ lib, buildGoModule, fetchFromGitHub, nixosTests }: - -let - # The web client verifies, that the server version is a valid datetime string: - # https://github.com/minio/minio/blob/3a0e7347cad25c60b2e51ff3194588b34d9e424c/browser/app/js/web.js#L51-L53 - # - # Example: - # versionToTimestamp "2021-04-22T15-44-28Z" - # => "2021-04-22T15:44:28Z" - versionToTimestamp = version: - let - splitTS = builtins.elemAt (builtins.split "(.*)(T.*)" version) 1; - in - builtins.concatStringsSep "" [ (builtins.elemAt splitTS 0) (builtins.replaceStrings [ "-" ] [ ":" ] (builtins.elemAt splitTS 1)) ]; -in -buildGoModule rec { - pname = "minio"; - version = "2022-10-24T18-35-07Z"; - - src = fetchFromGitHub { - owner = "minio"; - repo = "minio"; - rev = "RELEASE.${version}"; - sha256 = "sha256-sABNzhyfBNU5pWyE/VWHUzuSyKsx0glj01ectJPakV8="; - }; - - vendorSha256 = "sha256-wB3UiuptT6D0CIUlHC1d5k0rjIxNeh5yAWOmYpyLGmA="; - - doCheck = false; - - subPackages = [ "." ]; - - CGO_ENABLED = 0; - - tags = [ "kqueue" ]; - - ldflags = let t = "github.com/minio/minio/cmd"; in [ - "-s" "-w" "-X ${t}.Version=${versionToTimestamp version}" "-X ${t}.ReleaseTag=RELEASE.${version}" "-X ${t}.CommitID=${src.rev}" - ]; - - passthru.tests.minio = nixosTests.minio; - - meta = with lib; { - homepage = "https://www.minio.io/"; - description = "An S3-compatible object storage server"; - changelog = "https://github.com/minio/minio/releases/tag/RELEASE.${version}"; - maintainers = with maintainers; [ eelco bachp ]; - platforms = platforms.unix; - license = licenses.agpl3Plus; - }; -}