commit ecb581dd901aaa8eb13a7d1f123d3be15e372dee Author: C4 Patino Date: Sat Jul 27 18:45:06 2024 -0500 Initial commit diff --git a/.git-crypt/.gitattributes b/.git-crypt/.gitattributes new file mode 100644 index 0000000..665b10e --- /dev/null +++ b/.git-crypt/.gitattributes @@ -0,0 +1,4 @@ +# Do not edit this file. To specify the files to encrypt, create your own +# .gitattributes file in the directory where your files are. +* !filter !diff +*.gpg binary diff --git a/.git-crypt/keys/default/0/1AD10CAE1BE45DD2EB83A7BBD8FEED903A66415C.gpg b/.git-crypt/keys/default/0/1AD10CAE1BE45DD2EB83A7BBD8FEED903A66415C.gpg new file mode 100644 index 0000000..99944db Binary files /dev/null and b/.git-crypt/keys/default/0/1AD10CAE1BE45DD2EB83A7BBD8FEED903A66415C.gpg differ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..679a877 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +secrets/crypt/** filter=git-crypt diff=git-crypt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9c558e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +. diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..da77dbd --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "neovim"] + path = neovim + url = git@github.com:C4theBomb/neovim.git +[submodule "dotfiles"] + path = dotfiles + url = git@github.com:C4theBomb/dotfiles.git diff --git a/.sops.yaml b/.sops.yaml new file mode 100644 index 0000000..0a09234 --- /dev/null +++ b/.sops.yaml @@ -0,0 +1,8 @@ +keys: + - &desktop age1mt673rdh9g4ylt4se20vnv2mf7qul0ax9mwlhy5x97h4pxyypaascdyccn +creation_rules: + - path_regex: secrets/sops/secrets.yaml + key_groups: + - age: + - *desktop + diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/dotfiles b/dotfiles new file mode 160000 index 0000000..95ee60d --- /dev/null +++ b/dotfiles @@ -0,0 +1 @@ +Subproject commit 95ee60d3c5a4ac7581cb1c98d1c824e8f04f0d6d diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..da1650a --- /dev/null +++ b/flake.lock @@ -0,0 +1,1198 @@ +{ + "nodes": { + "anyrun": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1721135360, + "narHash": "sha256-ZhSA0e45UxiOAjEVqkym/aULh0Dt+KHJLNda7bjx9UI=", + "owner": "Kirottu", + "repo": "anyrun", + "rev": "c6101a31a80b51e32e96f6a77616b609770172e0", + "type": "github" + }, + "original": { + "owner": "Kirottu", + "repo": "anyrun", + "type": "github" + } + }, + "aquamarine": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1723405438, + "narHash": "sha256-bpmC2m7OhlDvqgQZdZ2jBLyeIkq/Jld3X4bqRAxBSp8=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "9312aa28271c91e5d67ecb9def527b2bbcff0e66", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1708890466, + "narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "665b3c6748534eb766c777298721cece9453fdae", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1622559957, + "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "type": "github" + } + }, + "base16-foot": { + "flake": false, + "locked": { + "lastModified": 1696725948, + "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", + "owner": "tinted-theming", + "repo": "base16-foot", + "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-foot", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1720809814, + "narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "34f41987bec14c0f3f6b2155c19787b1f6489625", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-kitty": { + "flake": false, + "locked": { + "lastModified": 1665001328, + "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=", + "owner": "kdrag0n", + "repo": "base16-kitty", + "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805", + "type": "github" + }, + "original": { + "owner": "kdrag0n", + "repo": "base16-kitty", + "type": "github" + } + }, + "base16-tmux": { + "flake": false, + "locked": { + "lastModified": 1696725902, + "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", + "owner": "tinted-theming", + "repo": "base16-tmux", + "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-tmux", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1716150083, + "narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "type": "github" + } + }, + "disko": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1723685519, + "narHash": "sha256-GkXQIoZmW2zCPp1YFtAYGg/xHNyFH/Mgm79lcs81rq0=", + "owner": "nix-community", + "repo": "disko", + "rev": "276a0d055a720691912c6a34abb724e395c8e38a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "disko", + "type": "github" + } + }, + "dotfiles": { + "flake": false, + "locked": { + "lastModified": 1723429798, + "narHash": "sha256-PX+02uWPspvCtcBmINsspfRwkIpW2AbPHlPdkL9SqyI=", + "ref": "refs/heads/main", + "rev": "95ee60d3c5a4ac7581cb1c98d1c824e8f04f0d6d", + "revCount": 1, + "type": "git", + "url": "https://github.com/C4theBomb/dotfiles.git" + }, + "original": { + "type": "git", + "url": "https://github.com/C4theBomb/dotfiles.git" + } + }, + "eww": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs_2", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1720177068, + "narHash": "sha256-LTSFlW/46hl1u9SzqnvbtNxswCW05bhwOY6CzVEJC5o=", + "owner": "elkowar", + "repo": "eww", + "rev": "4d55e9ad63d1fae887726dffcd25a32def23d34f", + "type": "github" + }, + "original": { + "owner": "elkowar", + "repo": "eww", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { + "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-parts": { + "inputs": { + "nixpkgs-lib": [ + "anyrun", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_6" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1689549921, + "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1713702291, + "narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "46.1", + "repo": "gnome-shell", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1723399884, + "narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "086f619dd991a4d355c07837448244029fc2d9ab", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1715930644, + "narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1722623071, + "narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "912d56025f03d41b1ad29510c423757b4379eb1c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner", + "nixpkgs": "nixpkgs_3", + "systems": "systems_3", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1723723403, + "narHash": "sha256-IKWf8JdUOgoTYaWaQ7pFIjfpD6bFvf8V+rKuZRUytro=", + "ref": "refs/heads/main", + "rev": "069faa4027d016549ee72afcd7df3b2c1e7ee578", + "revCount": 5091, + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + }, + "original": { + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "xdph", + "nixpkgs" + ], + "systems": [ + "hyprland", + "xdph", + "systems" + ] + }, + "locked": { + "lastModified": 1721326555, + "narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprland-protocols_2": { + "inputs": { + "nixpkgs": [ + "xdg-portal-hyprland", + "nixpkgs" + ], + "systems": [ + "xdg-portal-hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721326555, + "narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721324361, + "narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlang_2": { + "inputs": { + "hyprutils": "hyprutils_2", + "nixpkgs": [ + "xdg-portal-hyprland", + "nixpkgs" + ], + "systems": "systems_4" + }, + "locked": { + "lastModified": 1721324361, + "narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1722869141, + "narHash": "sha256-0KU4qhyMp441qfwbirNg3+wbm489KnEjXOz2I/RbeFs=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "0252fd13e78e60fb0da512a212e56007515a49f7", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprutils_2": { + "inputs": { + "nixpkgs": [ + "xdg-portal-hyprland", + "hyprlang", + "nixpkgs" + ], + "systems": [ + "xdg-portal-hyprland", + "hyprlang", + "systems" + ] + }, + "locked": { + "lastModified": 1721324102, + "narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "962582a090bc233c4de9d9897f46794280288989", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721324119, + "narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "impermanence": { + "locked": { + "lastModified": 1719091691, + "narHash": "sha256-AxaLX5cBEcGtE02PeGsfscSb/fWMnyS7zMWBXQWDKbE=", + "owner": "nix-community", + "repo": "impermanence", + "rev": "23c1f06316b67cb5dabdfe2973da3785cfe9c34a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "impermanence", + "type": "github" + } + }, + "neovim-config": { + "flake": false, + "locked": { + "lastModified": 1722357932, + "narHash": "sha256-ve14UIJsUsl/0AvHK2eX4P9TklhdtOiiJJBAlZqvJw8=", + "ref": "refs/heads/main", + "rev": "1f33a8d61a4b618490bb7e7e79cf725b732d1edd", + "revCount": 8, + "type": "git", + "url": "https://github.com/C4theBomb/neovim.git" + }, + "original": { + "type": "git", + "url": "https://github.com/C4theBomb/neovim.git" + } + }, + "nixos-config": { + "flake": false, + "locked": { + "lastModified": 1723470643, + "narHash": "sha256-Sue5BY+Vk5mLGBiG4zoFTl4mYgeUNhHChp5p1M8x4Qo=", + "ref": "refs/heads/main", + "rev": "df2bd06417cd3dbab23a0f2e23f8ca24952564c2", + "revCount": 1, + "type": "git", + "url": "https://github.com/C4theBomb/nixos-config.git" + }, + "original": { + "type": "git", + "url": "https://github.com/C4theBomb/nixos-config.git" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1717196966, + "narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "57610d2f8f0937f39dbd72251e9614b1561942d8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1722555339, + "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1720386169, + "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_2": { + "locked": { + "lastModified": 1721524707, + "narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "556533a23879fc7e5f98dd2e0b31a6911a213171", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1709038661, + "narHash": "sha256-Ys611iT6pChGv954aa4f8oKoDKJG3IXjJjPhnj6uaLY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8520c158aee718c6e87b56881105fc4223c3c723", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1723637854, + "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1723637854, + "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1719082008, + "narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9693852a2070b398ee123a329e68f0dab5526681", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1714912032, + "narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ee4a6e0f566fe5ec79968c57a9c2c3c25f2cf41d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1722062969, + "narHash": "sha256-QOS0ykELUmPbrrUGmegAUlpmUFznDQeR4q7rFhl8eQg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b73c2221a46c13557b1b3be9c2070cc42cf01eb3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1722415718, + "narHash": "sha256-5US0/pgxbMksF92k1+eOa8arJTJiPvsdZj9Dl+vJkM4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c3392ad349a5227f4a3464dce87bcc5046692fce", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_2", + "gitignore": "gitignore", + "nixpkgs": "nixpkgs_5", + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1723202784, + "narHash": "sha256-qbhjc/NEGaDbyy0ucycubq4N3//gDFFH3DOmp1D3u1Q=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "c7012d0c18567c889b948781bc74a501e92275d1", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "root": { + "inputs": { + "anyrun": "anyrun", + "disko": "disko", + "dotfiles": "dotfiles", + "eww": "eww", + "flake-parts": "flake-parts_2", + "home-manager": "home-manager", + "hyprland": "hyprland", + "impermanence": "impermanence", + "neovim-config": "neovim-config", + "nixos-config": "nixos-config", + "nixpkgs": "nixpkgs_4", + "pre-commit-hooks": "pre-commit-hooks", + "sops-nix": "sops-nix", + "stylix": "stylix", + "xdg-portal-hyprland": "xdg-portal-hyprland", + "yazi": "yazi" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "eww", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1708999822, + "narHash": "sha256-X55GxqI3oDEfqy38Pt7xyypYNly4bkd/RajFE+FGn+A=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "1a618c62479a6896ac497aaa0d969c6bd8e24911", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_2": { + "inputs": { + "nixpkgs": [ + "yazi", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1721441897, + "narHash": "sha256-gYGX9/22tPNeF7dR6bWN5rsrpU4d06GnQNNgZ6ZiXz0=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "b7996075da11a2d441cfbf4e77c2939ce51506fd", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "b7996075da11a2d441cfbf4e77c2939ce51506fd", + "type": "github" + } + }, + "sops-nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable_2" + }, + "locked": { + "lastModified": 1723501126, + "narHash": "sha256-N9IcHgj/p1+2Pvk8P4Zc1bfrMwld5PcosVA0nL6IGdE=", + "owner": "Mic92", + "repo": "sops-nix", + "rev": "be0eec2d27563590194a9206f551a6f73d52fa34", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "sops-nix", + "type": "github" + } + }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-foot": "base16-foot", + "base16-helix": "base16-helix", + "base16-kitty": "base16-kitty", + "base16-tmux": "base16-tmux", + "base16-vim": "base16-vim", + "flake-compat": "flake-compat_3", + "gnome-shell": "gnome-shell", + "home-manager": "home-manager_2", + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1722946882, + "narHash": "sha256-mxtnMye8gs82tdQbVC+g6v3aPOZlH150f9WyntHIkTg=", + "owner": "danth", + "repo": "stylix", + "rev": "5853f1a8bd072f2ebabfc3de3973084353cf6f1e", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "xdg-portal-hyprland": { + "inputs": { + "hyprland-protocols": "hyprland-protocols_2", + "hyprlang": "hyprlang_2", + "nixpkgs": "nixpkgs_7", + "systems": "systems_5" + }, + "locked": { + "lastModified": 1722365976, + "narHash": "sha256-Khdm+mDzYA//XaU0M+hftod+rKr5q9SSHSEuiQ0/9ow=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "7f2a77ddf60390248e2a3de2261d7102a13e5341", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": "hyprland-protocols", + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1722365976, + "narHash": "sha256-Khdm+mDzYA//XaU0M+hftod+rKr5q9SSHSEuiQ0/9ow=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "7f2a77ddf60390248e2a3de2261d7102a13e5341", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + }, + "yazi": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_8", + "rust-overlay": "rust-overlay_2" + }, + "locked": { + "lastModified": 1723713666, + "narHash": "sha256-BoTMeLv9Fo5DtJDyYpolJe6nc0wx8+q4VfdX1SXWbsE=", + "owner": "sxyazi", + "repo": "yazi", + "rev": "fc304ca043490c524211e615bdc9e197d5b0032e", + "type": "github" + }, + "original": { + "owner": "sxyazi", + "repo": "yazi", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ec0f8ba --- /dev/null +++ b/flake.nix @@ -0,0 +1,90 @@ +{ + description = "snowflake"; + + outputs = inputs: inputs.flake-parts.lib.mkFlake { + inherit inputs; + } { + imports = [ + inputs.pre-commit-hooks.flakeModule + ./hosts + ./home/profiles + ]; + systems = ["x86_64-linux"]; + perSystem = { config, pkgs, ... }: { + pre-commit = { + check.enable = true; + settings = { + excludes = ["flake.lock"]; + hooks = { + stylua.enable = true; + statix.enable = true; + alejandra.enable = true; + deadnix = { + enable = true; + excludes = ["overlays.nix"]; + }; + prettier = { + enable = true; + files = "\\.(js|ts|md|json)$"; + settings = { + trailing-comma = "none"; + }; + }; + }; + }; + }; + devShells.default = pkgs.mkShell { + name = "snowflake"; + shellHook = config.pre-commit.installationScript; + packages = with pkgs; [ + git + sops + alejandra + yaml-language-server + lua-language-server + ]; + }; + formatter = pkgs.alejandra; + }; + }; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; + + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + xdg-portal-hyprland.url = "github:hyprwm/xdg-desktop-portal-hyprland"; + yazi.url = "github:sxyazi/yazi"; + stylix.url = "github:danth/stylix"; + eww.url = "github:elkowar/eww"; + anyrun.url = "github:Kirottu/anyrun"; + impermanence.url = "github:nix-community/impermanence"; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + sops-nix = { + url = "github:Mic92/sops-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + neovim-config = { + url = "git+https://github.com/C4theBomb/neovim.git"; + flake = false; + }; + dotfiles = { + url = "git+https://github.com/C4theBomb/dotfiles.git"; + flake = false; + }; + nixos-config = { + url = "git+https://github.com/C4theBomb/nixos-config.git"; + flake = false; + }; + }; +} diff --git a/home/default.nix b/home/default.nix new file mode 100644 index 0000000..447231a --- /dev/null +++ b/home/default.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: { + programs.home-manager.enable = true; + + nixpkgs.config.allowUnfree = true; + + home.packages = [ + (import ./scripts/get-music-cover.nix { inherit pkgs; }) + (import ./scripts/scratchpad.nix { inherit pkgs; }) + ]; +} diff --git a/home/profiles/arisu/default.nix b/home/profiles/arisu/default.nix new file mode 100644 index 0000000..0090d0a --- /dev/null +++ b/home/profiles/arisu/default.nix @@ -0,0 +1,59 @@ +{ inputs, pkgs, ... }: { + imports = [ + ./stylix.nix + + ../../programs + ../../wayland + + inputs.sops-nix.homeManagerModules.sops + ]; + + home.packages = with pkgs; [ + curl + wget + xclip + sops + git-crypt + ]; + + sops = { + defaultSopsFile = ../../../secrets/sops/secrets.yaml; + defaultSopsFormat = "yaml"; + age = { + keyFile = "/home/c4patino/.config/sops/age/keys.txt"; + generateKey = true; + }; + + secrets = { + github-auth = {}; + }; + }; + + home = { + username = "c4patino"; + homeDirectory = "/home/c4patino"; + stateVersion = "23.11"; + sessionVariables = { + FLAKE = "/home/c4patino/dotfiles"; + }; + }; + + music.enable = true; + pycharm.enable = true; + idea.enable = true; + leetcode.enable = true; + nvtop.enable = true; + sms.enable = true; + obsidian.enable = true; + libreoffice.enable = true; + obs.enable = true; + postman.enable = true; + google-chrome.enable = true; + languages.enable = true; + + wayland.windowManager.hyprland.settings.monitor = [ + "DP-1, 2560x1440@120, 0x0, 1" + "DP-2, 2560x1440@120, 2560x0, 1" + ", preferred, auto, 1" + ]; +} diff --git a/home/profiles/arisu/stylix.nix b/home/profiles/arisu/stylix.nix new file mode 100644 index 0000000..e7386a4 --- /dev/null +++ b/home/profiles/arisu/stylix.nix @@ -0,0 +1,50 @@ +{ inputs, pkgs, ... }: { + imports = [ inputs.stylix.homeManagerModules.stylix ]; + + stylix = { + enable = true; + autoEnable = false; + polarity = "dark"; + base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml"; + fonts = { + monospace = { + name = "Meslo"; + package = pkgs.nerdfonts; + }; + serif = { + name = "Noto Serif"; + package = pkgs.noto-fonts; + }; + sansSerif = { + name = "Noto Sans"; + package = pkgs.noto-fonts; + }; + emoji = { + name = "Twitter Color Emoji"; + package = pkgs.twitter-color-emoji; + }; + sizes = { + applications = 10; + desktop = 10; + popups = 10; + terminal = 12; + }; + }; + cursor = { + name = "Bibata-Modern-Ice"; + package = pkgs.bibata-cursors; + size = 24; + }; + opacity = { + terminal = 0.9; + }; + targets = { + mako.enable = true; + lazygit.enable = true; + nushell.enable = true; + yazi.enable = true; + zellij.enable = true; + bat.enable = true; + }; + }; +} diff --git a/home/profiles/default.nix b/home/profiles/default.nix new file mode 100644 index 0000000..cb80a0d --- /dev/null +++ b/home/profiles/default.nix @@ -0,0 +1,40 @@ +{ inputs, self, ... }: +let + extraSpecialArgs = { inherit inputs self secrets; }; + + homeImports = { + "c4patino@arisu" = [ + ../. + ./arisu + ]; + "c4patino@kokoro" = [ + ../. + ./kokoro + ]; + "c4patino@hikari" = [ + ../. + ./hikari + ]; + }; + + pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; + + secrets = builtins.fromJSON (builtins.readFile "${self}/secrets/crypt/secrets.json"); +in +{ + _module.args = { inherit homeImports; }; + + flake = { + homeConfigurations = { + "c4patino@arisu" = inputs.home-manager.lib.homeManagerConfiguration { + modules = homeImports."c4patino@arisu"; + inherit pkgs extraSpecialArgs; + }; + "c4patino@kokoro" = inputs.home-manager.lib.homeManagerConfiguration { + modules = homeImports."c4patino@kokoro"; + inherit pkgs extraSpecialArgs; + }; + }; + }; + +} diff --git a/home/profiles/hikari/default.nix b/home/profiles/hikari/default.nix new file mode 100644 index 0000000..ea35fc2 --- /dev/null +++ b/home/profiles/hikari/default.nix @@ -0,0 +1,57 @@ +{ inputs, pkgs, ... }: { + imports = [ + ./stylix.nix + + ../../programs + ../../wayland + + inputs.sops-nix.homeManagerModules.sops + ]; + + home.packages = with pkgs; [ + curl + wget + xclip + sops + git-agecrypt + ]; + + home.file."dotfiles/".source = inputs.nixos-config; + + sops = { + defaultSopsFile = inputs.dotfiles + "/secrets/sops/secrets.yaml" ; + defaultSopsFormat = "yaml"; + age = { + keyFile = "/home/nixos/.config/sops/age/keys.txt"; + generateKey = true; + }; + + secrets = { + }; + }; + + home = { + username = "nixos"; + homeDirectory = "/home/nixos"; + stateVersion = "23.11"; + sessionVariables = { + FLAKE = "/home/nixos/dotfiles"; + }; + }; + + music.enable = false; + pycharm.enable = false; + idea.enable = false; + leetcode.enable = false; + nvtop.enable = true; + sms.enable = false; + libreoffice.enable = false; + obs.enable = false; + postman.enable = false; + google-chrome.enable = false; + languages.enable = false; + + wayland.windowManager.hyprland.settings.monitor = [ + ", preferred, auto, 1" + ]; +} diff --git a/home/profiles/hikari/stylix.nix b/home/profiles/hikari/stylix.nix new file mode 100644 index 0000000..e7386a4 --- /dev/null +++ b/home/profiles/hikari/stylix.nix @@ -0,0 +1,50 @@ +{ inputs, pkgs, ... }: { + imports = [ inputs.stylix.homeManagerModules.stylix ]; + + stylix = { + enable = true; + autoEnable = false; + polarity = "dark"; + base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml"; + fonts = { + monospace = { + name = "Meslo"; + package = pkgs.nerdfonts; + }; + serif = { + name = "Noto Serif"; + package = pkgs.noto-fonts; + }; + sansSerif = { + name = "Noto Sans"; + package = pkgs.noto-fonts; + }; + emoji = { + name = "Twitter Color Emoji"; + package = pkgs.twitter-color-emoji; + }; + sizes = { + applications = 10; + desktop = 10; + popups = 10; + terminal = 12; + }; + }; + cursor = { + name = "Bibata-Modern-Ice"; + package = pkgs.bibata-cursors; + size = 24; + }; + opacity = { + terminal = 0.9; + }; + targets = { + mako.enable = true; + lazygit.enable = true; + nushell.enable = true; + yazi.enable = true; + zellij.enable = true; + bat.enable = true; + }; + }; +} diff --git a/home/profiles/kokoro/default.nix b/home/profiles/kokoro/default.nix new file mode 100644 index 0000000..7238d37 --- /dev/null +++ b/home/profiles/kokoro/default.nix @@ -0,0 +1,56 @@ +{ inputs, pkgs, ... }: { + imports = [ + ./stylix.nix + + ../../programs + ../../wayland + + inputs.sops-nix.homeManagerModules.sops + ]; + + home.packages = with pkgs; [ + curl + wget + xclip + sops + git-agecrypt + ]; + + sops = { + defaultSopsFile = inputs.dotfiles + "/secrets/sops/secrets.yaml" ; + defaultSopsFormat = "yaml"; + age = { + keyFile = "/home/c4patino/.config/sops/age/keys.txt"; + generateKey = true; + }; + + secrets = { + }; + }; + + home = { + username = "c4patino"; + homeDirectory = "/home/c4patino"; + stateVersion = "23.11"; + sessionVariables = { + FLAKE = "/home/c4patino/dotfiles"; + }; + }; + + music.enable = true; + pycharm.enable = true; + idea.enable = true; + leetcode.enable = true; + nvtop.enable = true; + sms.enable = true; + libreoffice.enable = true; + obsidian.enable = true; + obs.enable = true; + postman.enable = true; + google-chrome.enable = true; + languages.enable = true; + + wayland.windowManager.hyprland.settings.monitor = [ + ", preferred, auto, 1" + ]; +} diff --git a/home/profiles/kokoro/stylix.nix b/home/profiles/kokoro/stylix.nix new file mode 100644 index 0000000..e7386a4 --- /dev/null +++ b/home/profiles/kokoro/stylix.nix @@ -0,0 +1,50 @@ +{ inputs, pkgs, ... }: { + imports = [ inputs.stylix.homeManagerModules.stylix ]; + + stylix = { + enable = true; + autoEnable = false; + polarity = "dark"; + base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml"; + fonts = { + monospace = { + name = "Meslo"; + package = pkgs.nerdfonts; + }; + serif = { + name = "Noto Serif"; + package = pkgs.noto-fonts; + }; + sansSerif = { + name = "Noto Sans"; + package = pkgs.noto-fonts; + }; + emoji = { + name = "Twitter Color Emoji"; + package = pkgs.twitter-color-emoji; + }; + sizes = { + applications = 10; + desktop = 10; + popups = 10; + terminal = 12; + }; + }; + cursor = { + name = "Bibata-Modern-Ice"; + package = pkgs.bibata-cursors; + size = 24; + }; + opacity = { + terminal = 0.9; + }; + targets = { + mako.enable = true; + lazygit.enable = true; + nushell.enable = true; + yazi.enable = true; + zellij.enable = true; + bat.enable = true; + }; + }; +} diff --git a/home/programs/anyrun/default.nix b/home/programs/anyrun/default.nix new file mode 100644 index 0000000..78f4315 --- /dev/null +++ b/home/programs/anyrun/default.nix @@ -0,0 +1,70 @@ +{ inputs, pkgs, lib, config, ... }: +let + compileSCSS = name: source: "${pkgs.runCommandLocal name {} '' + mkdir -p $out + ${lib.getExe pkgs.sassc} -t expanded '${source}' > $out/${name}.css + ''}/${name}.css"; +in +{ + options = { + anyrun.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable anyrun"; + }; + }; + + imports = [inputs.anyrun.homeManagerModules.default]; + + config = lib.mkIf config.anyrun.enable { + programs.anyrun = { + enable = true; + config = { + plugins = with inputs.anyrun.packages.${pkgs.system}; [ + applications + dictionary + websearch + ]; + + width = {fraction = 0.3;}; + hideIcons = false; + ignoreExclusiveZones = false; + layer = "overlay"; + hidePluginInfo = false; + closeOnClick = false; + showResultsImmediately = false; + }; + + + extraCss = builtins.readFile (compileSCSS "style" ./style.scss); + extraConfigFiles = { + "dictionary.ron".text = '' + Config( + prefix: ":def", + ) + ''; + "applications.ron".text = '' + Config( + desktop_actions: false, + max_entries: 10, + ) + ''; + "websearch.ron".text = '' + Config( + prefix: "?", + engines: [ + Custom( + name: "SearXNG", + url: "100.121.201.47:8100/search?q={}", + ), + Custom( + name: "nix packages", + url: "search.nixos.org/packages?query={}&channel=unstable", + ), + ], + ) + ''; + }; + }; + }; +} diff --git a/home/programs/anyrun/style.scss b/home/programs/anyrun/style.scss new file mode 100644 index 0000000..c6f9bde --- /dev/null +++ b/home/programs/anyrun/style.scss @@ -0,0 +1,42 @@ +* { + all: unset; + transition: 200ms ease-out; + color: #c0caf5; + font-family: JetBrainsMono NF Medium; + font-size: 1.1rem; +} + +#window, +#match, +#entry, +#plugin, +#main { + background: transparent; +} + +#main { + margin-top: 0.5rem; +} + +#match { + padding: 3px; + border-radius: 12px; +} + +#match:hover, +#match:selected { + background: #45475a; + padding: 0.6rem; +} + +entry#entry { + border-color: transparent; + margin-top: 0.5rem; +} + +box#main { + background: #1a1b26; + border: 3px solid #7dcfff; + border-radius: 10px; + padding: 0.3rem; +} diff --git a/home/programs/browsers.nix b/home/programs/browsers.nix new file mode 100644 index 0000000..c5f72ae --- /dev/null +++ b/home/programs/browsers.nix @@ -0,0 +1,17 @@ +{ pkgs, lib, config, ... }: { + options = { + google-chrome.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable google-chrome"; + }; + }; + + config = lib.mkIf config.google-chrome.enable { + home.packages = with pkgs; [ + (google-chrome.override { + commandLineArgs = [ "--enable-features=UseOzonePlatform" "--ozone-platform=wayland" ]; + }) + ]; + }; +} diff --git a/home/programs/default.nix b/home/programs/default.nix new file mode 100644 index 0000000..6833817 --- /dev/null +++ b/home/programs/default.nix @@ -0,0 +1,12 @@ +{ lib, ... }: { + imports = [ + ./anyrun + ./editors + ./media + ./terminal + + ./browsers.nix + ./desktop-applications.nix + ./languages.nix + ]; +} diff --git a/home/programs/desktop-applications.nix b/home/programs/desktop-applications.nix new file mode 100644 index 0000000..a55617f --- /dev/null +++ b/home/programs/desktop-applications.nix @@ -0,0 +1,54 @@ +{ pkgs, lib, config, ... }: { + options = { + sms.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable SMS applications"; + }; + libreoffice.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable LibreOffice"; + }; + obs.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable OBS Studio"; + }; + postman.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable Postman"; + }; + mongodb-compass.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable MongoDB Compass"; + }; + obsidian.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable Obsidian"; + }; + }; + + config = { + home.packages = with pkgs; [ + (lib.mkIf config.sms.enable webcord) + (lib.mkIf config.sms.enable slack) + (lib.mkIf config.sms.enable zoom-us) + + (lib.mkIf config.obs.enable obs-studio) + + (lib.mkIf config.postman.enable postman) + + (lib.mkIf config.mongodb-compass.enable mongodb-compass) + + (lib.mkIf config.obsidian.enable obsidian) + + (lib.mkIf config.libreoffice.enable libreoffice-qt) + (lib.mkIf config.libreoffice.enable hunspell) + (lib.mkIf config.libreoffice.enable hunspellDicts.en_US) + ]; + }; +} diff --git a/home/programs/editors/default.nix b/home/programs/editors/default.nix new file mode 100644 index 0000000..6d637ba --- /dev/null +++ b/home/programs/editors/default.nix @@ -0,0 +1,8 @@ +{ lib, ... }: { + imports = [ + ./neovim.nix + ./idea.nix + ./pycharm.nix + ./vscode.nix + ]; +} diff --git a/home/programs/editors/idea.nix b/home/programs/editors/idea.nix new file mode 100644 index 0000000..71e8041 --- /dev/null +++ b/home/programs/editors/idea.nix @@ -0,0 +1,16 @@ +{ pkgs, lib, config, inputs, ... }: { + options = { + idea.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "enables IntelliJ IDEA"; + }; + }; + + config = lib.mkIf config.idea.enable { + home.packages = with pkgs; [ jetbrains.idea-ultimate ]; + home.file = { + ".ideavimrc".source = inputs.dotfiles + "/ideavimrc"; + }; + }; +} diff --git a/home/programs/editors/neovim.nix b/home/programs/editors/neovim.nix new file mode 100644 index 0000000..c6fcd3e --- /dev/null +++ b/home/programs/editors/neovim.nix @@ -0,0 +1,27 @@ +{ lib, config, pkgs, inputs, ... }: { + options = { + neovim.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable neovim"; + }; + }; + + config = lib.mkIf config.neovim.enable { + home.packages = with pkgs; [ ripgrep ]; + + programs.neovim = { + enable = true; + defaultEditor = true; + + viAlias = true; + vimAlias = true; + vimdiffAlias = true; + }; + + xdg.configFile.nvim = { + source = inputs.neovim-config; + recursive = true; + }; + }; +} diff --git a/home/programs/editors/pycharm.nix b/home/programs/editors/pycharm.nix new file mode 100644 index 0000000..1881bc8 --- /dev/null +++ b/home/programs/editors/pycharm.nix @@ -0,0 +1,17 @@ +{ pkgs, lib, config, inputs, ... }: { + options = { + pycharm.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable Pycharm"; + }; + }; + + config = lib.mkIf config.pycharm.enable { + home.packages = with pkgs; [ jetbrains.pycharm-professional ]; + + home.file = { + ".ideavimrc".source = inputs.dotfiles + "/ideavimrc"; + }; + }; +} diff --git a/home/programs/editors/vscode.nix b/home/programs/editors/vscode.nix new file mode 100644 index 0000000..ac10082 --- /dev/null +++ b/home/programs/editors/vscode.nix @@ -0,0 +1,15 @@ +{ lib, config, ... }: { + options = { + vscode.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "enables VSCode"; + }; + }; + + config = lib.mkIf config.vscode.enable { + programs.vscode = { + enable = true; + }; + }; +} diff --git a/home/programs/languages.nix b/home/programs/languages.nix new file mode 100644 index 0000000..481ffdd --- /dev/null +++ b/home/programs/languages.nix @@ -0,0 +1,22 @@ +{ pkgs, lib, config, ... }: { + options = { + languages.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable support for multiple programming languages"; + }; + }; + + config = lib.mkIf config.languages.enable { + home.packages = with pkgs; [ + conda + gcc + python3 + nodejs_22 + maven + go + ]; + + programs.java.enable = true; + }; +} diff --git a/home/programs/media/default.nix b/home/programs/media/default.nix new file mode 100644 index 0000000..b5ba94f --- /dev/null +++ b/home/programs/media/default.nix @@ -0,0 +1,6 @@ +{ lib, config, ... }: { + imports = [ + ./yazi + ./music.nix + ]; +} diff --git a/home/programs/media/music.nix b/home/programs/media/music.nix new file mode 100644 index 0000000..7f63b26 --- /dev/null +++ b/home/programs/media/music.nix @@ -0,0 +1,114 @@ +{pkgs, config, lib, ...}: { + options = { + music.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable Spotify"; + }; + }; + + config = lib.mkIf config.music.enable { + home.packages = with pkgs; [ + pkgs.spotify-player + spotify + ]; + + programs.cava = { + enable = true; + + settings = { + general = { + mode = "normal"; + framerate = 144; + bars = 0; + bar_width = 2; + bar_spacing = 3; + }; + color = { + gradient = 1; + gradient_count = 2; + gradient_color_2 = "'#f7768e'"; + gradient_color_1 = "'#7dcfff'"; + }; + smoothing = { + monstercat = 1; + waves = 1; + gravity = 100; + }; + }; + }; + + xdg.configFile."spotify-player/app.toml" = { + text = '' + theme = "tokyonight" + client_id = "d0136e02950c48869f941ab053d5ac11" + client_port = 8080 + playack_format = "{track} • {artists}\n{album}\n{metadata}" + notify_format = { summary = "{track} • {artists}", body = "{album}" } + copy_command = { command = "wl-copy", args = [] } + app_refresh_duration_in_ms = 32 + playback_refresh_duration_in_ms = 0 + cover_image_refresh_duration_in_ms = 2000 + page_size_in_rows = 20 + track_table_item_max_len = 32 + enable_media_control = true + enable_streaming = true + enable_cover_image_cache = true + default_device = "c4-desktop" + play_icon = "▶" + pause_icon = "▌▌" + liked_icon = "♥" + playback_window_position = "Top" + cover_img_width = 5 + cover_img_length = 11 + cover_img_scale = 1 + playback_window_width = 6 + + [device] + name = "computer" + device_type = "computer" + volume = 100 + bitrate = 320 + audio_cache = true + normalization = false + ''; + }; + + xdg.configFile."spotify-player/theme.toml" = { + text = '' + [[themes]] + name = "tokyonight" + [themes.palette] + foreground = "#c0caf5" + black = "#414868" + red = "#f7768e" + green = "#9ece6a" + yellow = "#e0af68" + blue = "#2ac3de" + magenta = "#bb9af7" + cyan = "#7dcfff" + white = "#eee8d5" + bright_black = "#24283b" + bright_red = "#ff4499" + bright_green = "#73daca" + bright_yellow = "#657b83" + bright_blue = "#839496" + bright_magenta = "#ff007c" + bright_cyan = "#93a1a1" + bright_white = "#fdf6e3" + [themes.component_style] + block_title = { fg = "Magenta" } + border = {} + playback_track = { fg = "Cyan", modifiers = ["Bold"] } + playback_artists = { fg = "Cyan", modifiers = ["Bold"] } + playback_album = { fg = "Yellow" } + playback_metadata = { fg = "White" } + playback_progress_bar = { bg = "BrightBlack", fg = "Green" } + current_playing = { fg = "Green", modifiers = ["Bold"] } + page_desc = { fg = "Cyan", modifiers = ["Bold"] } + table_header = { fg = "Blue" } + selection = { modifiers = ["Bold", "Reversed"] } + ''; + }; + }; +} diff --git a/home/programs/media/yazi/default.nix b/home/programs/media/yazi/default.nix new file mode 100644 index 0000000..f7735ef --- /dev/null +++ b/home/programs/media/yazi/default.nix @@ -0,0 +1,48 @@ +{ config, pkgs, lib, inputs, ... }: { + options = { + yazi.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable yazi"; + }; + }; + + imports = [ + ./keymap.nix + ./openers.nix + ./zathura.nix + ]; + + config = lib.mkIf config.yazi.enable { + home.packages = with pkgs; [ + mpv + imv + jq + exiftool + ]; + + + programs.yazi = { + enable = true; + package = pkgs.yazi; + enableZshIntegration = true; + settings = { + manager = { + ratio = [1 3 3]; + sort_by = "natural"; + sort_reverse = false; + sort_dir_first = true; + show_hidden = true; + show_symlink = true; + linemode = "size"; + }; + preview = { + cache_dir = "${config.xdg.cacheHome}"; + max_height = 900; + max_width = 600; + }; + log.enable = false; + }; + }; + }; +} diff --git a/home/programs/media/yazi/keymap.nix b/home/programs/media/yazi/keymap.nix new file mode 100644 index 0000000..4984e2a --- /dev/null +++ b/home/programs/media/yazi/keymap.nix @@ -0,0 +1,284 @@ +{ config, lib, ... }: { + config = lib.mkIf config.yazi.enable { + programs.yazi.keymap = { + manager.keymap = [ + { + on = [""]; + run = "escape"; + desc = "Exit visual mode; clear selected; or cancel search"; + } + { + on = ["q"]; + run = "quit"; + desc = "Exit the process"; + } + { + on = [""]; + run = "close"; + desc = "Close the current tab; or quit if it is last tab"; + } + + # Navigation + { + on = ["k"]; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = ["j"]; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = ["h"]; + run = "leave"; + desc = "Go back to the parent directory"; + } + { + on = ["l"]; + run = "enter"; + desc = "Enter the child directory"; + } + { + on = ["g" "g"]; + run = "arrow -99999999"; + desc = "Move cursor to the top"; + } + { + on = ["G"]; + run = "arrow 99999999"; + desc = "Move cursor to the bottom"; + } + + # Selection + { + on = [""]; + run = ["select --state=none" "arrow 1"]; + desc = "Toggle the current selection state"; + } + { + on = ["v"]; + run = "visual_mode"; + desc = "Enter visual mode (selection mode)"; + } + { + on = ["V"]; + run = "visual_mode --unset"; + desc = "Enter visual mode (unset mode)"; + } + { + on = [""]; + run = "select_all --state=true"; + desc = "Select all files"; + } + { + on = [""]; + run = "select_all --state=none"; + desc = "Inverse selection of all files"; + } + + # Operations + { + on = [""]; + run = "open"; + desc = "Open selected file(s)"; + } + { + on = ["y"]; + run = "yank"; + desc = "Copy selected file(s)"; + } + { + on = ["x"]; + run = "yank --cut"; + desc = "Cut selected file(s)"; + } + { + on = ["p"]; + run = "paste"; + desc = "Paste the file(s)"; + } + { + on = ["P"]; + run = "paste --force"; + desc = "Paste the files (overwrite)"; + } + { + on = ["d"]; + run = "remove --permanently"; + desc = "Permanently delete the file(s)"; + } + { + on = ["D"]; + run = "remove --permanently"; + desc = "Permanently delete the files(s)"; + } + { + on = ["a"]; + run = "create"; + desc = "create a file or directory (ends with / for directories)"; + } + { + on = ["r"]; + run = "rename"; + desc = "rename a file or directory"; + } + { + on = [":"]; + run = "shell --interactive --block"; + desc = "run a blocking shell command"; + } + { + on = ["."]; + run = "hidden toggle"; + desc = "toggle hidden files"; + } + { + on = ["z"]; + run = "plugin zoxide"; + desc = "jump to a directory using zoxide"; + } + { + on = ["Z"]; + run = "plugin fzf"; + desc = "reveal files with fzf"; + } + + # Copy + { + on = ["c" "c"]; + run = "copy path"; + desc = "copy the absolute path"; + } + { + on = ["c" "d"]; + run = "copy dirname"; + desc = "copy parent directory path"; + } + { + on = ["c" "f"]; + run = "copy filename"; + desc = "copy file name"; + } + + # Find + { + on = ["/"]; + run = "find"; + } + { + on = ["?"]; + run = "find --previous"; + } + { + on = ["n"]; + run = "find_arrow"; + } + { + on = ["N"]; + run = "find_arrow --previous"; + } + { + on = ["s"]; + run = "search fd"; + } + { + on = ["S"]; + run = "search rg"; + } + { + on = [""]; + run = "search none"; + } + + # Tabs + { + on = ["t"]; + run = "tab_create --current"; + desc = "Create a new tab using the current path"; + } + + { + on = ["1"]; + run = "tab_switch 0"; + desc = "Switch to the first tab"; + } + { + on = ["2"]; + run = "tab_switch 1"; + desc = "Switch to the second tab"; + } + { + on = ["3"]; + run = "tab_switch 2"; + desc = "Switch to the third tab"; + } + { + on = ["4"]; + run = "tab_switch 3"; + desc = "Switch to the fourth tab"; + } + { + on = ["5"]; + run = "tab_switch 4"; + desc = "Switch to the fifth tab"; + } + { + on = ["6"]; + run = "tab_switch 5"; + desc = "Switch to the sixth tab"; + } + { + on = ["7"]; + run = "tab_switch 6"; + desc = "Switch to the seventh tab"; + } + { + on = ["8"]; + run = "tab_switch 7"; + desc = "Switch to the eighth tab"; + } + { + on = ["9"]; + run = "tab_switch 8"; + desc = "Switch to the ninth tab"; + } + + { + on = ["["]; + run = "tab_switch -1 --relative"; + desc = "Switch to the previous tab"; + } + { + on = ["]"]; + run = "tab_switch 1 --relative"; + desc = "Switch to the next tab"; + } + { + on = ["{"]; + run = "tab_swap -1"; + desc = "Swap the current tab with the previous tab"; + } + { + on = ["}"]; + run = "tab_swap 1"; + desc = "Swap the current tab with the next tab"; + } + + # Tasks + { + on = ["w"]; + run = "tasks_show"; + desc = "Show the tasks manager"; + } + + # Help + { + on = ["~"]; + run = "help"; + desc = "Open help"; + } + ]; + }; + }; +} diff --git a/home/programs/media/yazi/openers.nix b/home/programs/media/yazi/openers.nix new file mode 100644 index 0000000..7e87cb9 --- /dev/null +++ b/home/programs/media/yazi/openers.nix @@ -0,0 +1,71 @@ +{pkgs, config, lib, ...}: { + config = lib.mkIf config.yazi.enable { + programs.yazi.settings = { + open.rules = [ + { + mime = "text/*"; + use = ["text" "reveal"]; + } + { + mime = "image/*"; + use = ["image" "reveal"]; + } + { + mime = "video/*"; + use = ["video" "reveal"]; + } + { + mime = "application/json"; + use = ["json" "reveal"]; + } + { + mime = "application/pdf"; + use = ["pdf" "reveal"]; + } + { + mime = "*"; + use = ["text" "reveal"]; + } + ]; + opener = { + text = [ + { + run = ''nvim "$@" ''; + block = true; + for = "linux"; + } + ]; + json = [ + { + run = ''jq "$@"''; + for = "linux"; + } + ]; + pdf = [ + { + run = ''zathura "$@"''; + for = "linux"; + } + ]; + image = [ + { + run = ''imv "$@" ''; + for = "linux"; + } + ]; + video = [ + { + run = ''mpv "$@" ''; + for = "linux"; + } + ]; + reveal = [ + { + run = ''${pkgs.exiftool}/bin/exiftool "$1";''; + block = true; + } + ]; + }; + }; + }; +} diff --git a/home/programs/media/yazi/zathura.nix b/home/programs/media/yazi/zathura.nix new file mode 100644 index 0000000..97194f2 --- /dev/null +++ b/home/programs/media/yazi/zathura.nix @@ -0,0 +1,36 @@ +_: { + programs.zathura = { + enable = true; + extraConfig = '' + set notification-error-bg "#f7768e" + set notification-error-fg "#c0caf5" + set notification-warning-bg "#e0af68" + set notification-warning-fg "#414868" + set notification-bg "#1a1b26" + set notification-fg "#c0caf5" + set completion-bg "#1a1b26" + set completion-fg "#a9b1d6" + set completion-group-bg "#1a1b26" + set completion-group-fg "#a9b1d6" + set completion-highlight-bg "#414868" + set completion-highlight-fg "#c0caf5" + set index-bg "#1a1b26" + set index-fg "#c0caf5" + set index-active-bg "#414868" + set index-active-fg "#c0caf5" + set inputbar-bg "#1a1b26" + set inputbar-fg "#c0caf5" + set statusbar-bg "#1a1b26" + set statusbar-fg "#c0caf5" + set highlight-color "#e0af68" + set highlight-active-color "#9ece6a" + set default-bg "#1a1b26" + set default-fg "#c0caf5" + set render-loading true + set render-loading-fg "#1a1b26" + set render-loading-bg "#c0caf5" + set recolor-lightcolor "#1a1b26" + set recolor-darkcolor "#c0caf5" + ''; + }; +} diff --git a/home/programs/terminal/bat.nix b/home/programs/terminal/bat.nix new file mode 100644 index 0000000..e50cdee --- /dev/null +++ b/home/programs/terminal/bat.nix @@ -0,0 +1,10 @@ +{ ... }: { + programs.bat = { + enable = true; + config = { + theme = "base16-stylix"; + pager = "--RAW-CONTROL-CHARS --quit-if-one-screen --mouse"; + style = "plain"; + }; + }; +} diff --git a/home/programs/terminal/default.nix b/home/programs/terminal/default.nix new file mode 100644 index 0000000..e0de4b4 --- /dev/null +++ b/home/programs/terminal/default.nix @@ -0,0 +1,12 @@ +{ lib, ... }: { + imports = [ + ./bat.nix + ./git.nix + ./kitty.nix + ./leetcode.nix + ./metrics.nix + ./ssh.nix + ./zoxide.nix + ./zsh.nix + ]; +} diff --git a/home/programs/terminal/git.nix b/home/programs/terminal/git.nix new file mode 100644 index 0000000..5dafc5a --- /dev/null +++ b/home/programs/terminal/git.nix @@ -0,0 +1,36 @@ +{ lib, config, pkgs, ... }: { + options = { + git.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable git, git-lfs, and gh-cli"; + }; + }; + + config = lib.mkIf config.git.enable { + programs.git = { + enable = true; + lfs.enable = true; + userName = "C4 Patino"; + userEmail = "c4patino@gmail.com"; + + extraConfig = { + user.signingkey = "~/.ssh/id_ed25519.pub"; + init.defaultBranch = "main"; + pull.rebase = true; + fetch.prune = true; + + maintenance.auto = true; + core.editor = "nvim"; + commit.gpgsign = true; + gpg.format = "ssh"; + diff.colorMoved = "zebra"; + }; + }; + + programs.gh = { + enable = true; + extensions = with pkgs; [ gh-copilot ]; + }; + }; +} diff --git a/home/programs/terminal/kitty.nix b/home/programs/terminal/kitty.nix new file mode 100644 index 0000000..9ab096a --- /dev/null +++ b/home/programs/terminal/kitty.nix @@ -0,0 +1,25 @@ +{ pkgs, lib, config, ... }: { + options = { + kitty.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable the kitty terminal emulator"; + }; + }; + + config = lib.mkIf config.kitty.enable { + programs.kitty = { + enable = true; + shellIntegration.enableZshIntegration = true; + font.name = "MesloLGM Nerd Font Mono"; + + keybindings = { + "ctrl+enter" = "new_window_with_cwd"; + }; + + extraConfig = '' + enabled_layouts grid, fat + ''; + }; + }; +} diff --git a/home/programs/terminal/leetcode.nix b/home/programs/terminal/leetcode.nix new file mode 100644 index 0000000..bd90c7a --- /dev/null +++ b/home/programs/terminal/leetcode.nix @@ -0,0 +1,23 @@ +{ pkgs, lib, config, inputs, secrets, ... }: { + options = { + leetcode.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable leetcode"; + }; + }; + + config = lib.mkIf config.leetcode.enable { + home.packages = with pkgs; [ leetcode-cli ]; + + home.file.".leetcode/leetcode.toml" = { + text = '' + ${builtins.readFile (inputs.dotfiles + "/leetcode.toml")} + + [cookies] + csrf = '${secrets.leetcode.csrf}' + session = '${secrets.leetcode.session}' + ''; + }; + }; +} diff --git a/home/programs/terminal/metrics.nix b/home/programs/terminal/metrics.nix new file mode 100644 index 0000000..2e0b9a4 --- /dev/null +++ b/home/programs/terminal/metrics.nix @@ -0,0 +1,37 @@ +{ pkgs, lib, config, ... }: { + options = { + bottom.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable bottom"; + }; + + nvtop.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable nvtop"; + }; + }; + + config = { + home.packages = with pkgs; [ + (lib.mkIf config.nvtop.enable nvtopPackages.nvidia) + ]; + + programs.bottom = lib.mkIf config.bottom.enable { + enable = true; + settings = { + flags = { + current_usage = true; + group_processes = true; + case_sensitive = false; + mem_as_value = true; + enable_gpu = true; + disable_advanced_kill = true; + unnormalized_cpu = false; + temperature_type = "c"; + }; + }; + }; + }; +} diff --git a/home/programs/terminal/ssh.nix b/home/programs/terminal/ssh.nix new file mode 100644 index 0000000..116de97 --- /dev/null +++ b/home/programs/terminal/ssh.nix @@ -0,0 +1,34 @@ +{ lib, config, ... }: { + options = { + ssh.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable ssh configuration"; + }; + }; + + config = lib.mkIf config.ssh.enable { + programs.ssh = { + enable = true; + extraConfig = '' + Host github + HostName github.com + User git + + Host swan + HostName swan.unl.edu + User c4patino + ControlMaster auto + ControlPath /tmp/ssh_%r@%h:%p + ControlPersist 2h + + Host cse + HostName cse.unl.edu + User cpatino + ControlMaster auto + ControlPath /tmp/ssh_%r@%h:%p + ControlPersist 2h + ''; + }; + }; +} diff --git a/home/programs/terminal/zoxide.nix b/home/programs/terminal/zoxide.nix new file mode 100644 index 0000000..77c7850 --- /dev/null +++ b/home/programs/terminal/zoxide.nix @@ -0,0 +1,17 @@ +{ lib, config, ... }: { + options = { + zoxide.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable zoxide"; + }; + }; + + config = lib.mkIf config.zoxide.enable { + programs.zoxide = { + enable = true; + enableZshIntegration = true; + options = [ "--cmd cd" ]; + }; + }; +} diff --git a/home/programs/terminal/zsh.nix b/home/programs/terminal/zsh.nix new file mode 100644 index 0000000..06864b8 --- /dev/null +++ b/home/programs/terminal/zsh.nix @@ -0,0 +1,46 @@ +{ pkgs, lib, config, inputs, ... }: { + options = { + zsh.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable zsh and its plugins"; + }; + }; + + config = lib.mkIf config.zsh.enable { + home.packages = with pkgs; [ + zsh-powerlevel10k + ]; + + home.file.".p10k.zsh".source = inputs.dotfiles + "/p10k.zsh"; + + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + + initExtra = "source ~/.p10k.zsh"; + + history = { + size = 10000; + path = "${config.xdg.dataHome}/zsh/history"; + }; + + oh-my-zsh = { + enable = true; + plugins = [ "sudo" "git" "gitignore" "web-search" "copypath" "jsontools" ]; + theme = "robbyrussell"; + }; + + plugins = [ + { + name = "powerlevel10k"; + src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/"; + file = "powerlevel10k.zsh-theme"; + } + ]; + }; + }; +} + diff --git a/home/scripts/get-music-cover.nix b/home/scripts/get-music-cover.nix new file mode 100644 index 0000000..62aa80e --- /dev/null +++ b/home/scripts/get-music-cover.nix @@ -0,0 +1,35 @@ +{ pkgs, ... }: pkgs.writeShellScriptBin "get-music-cover" '' + COVER_PATH="/tmp/eww/cache_directory" + cd $COVER_PATH + + IMGPATH="$COVER_PATH/music_cover.png" + + playerctl -F metadata mpris:artUrl 2>/dev/null | while read -r COVER_URL; do + if [[ "$COVER_URL" = https* ]]; then + FILENAME=$(basename "$COVER_URL") + FILEPATH="$COVER_PATH/$FILENAME" + + if [ ! -e "$FILEPATH" ]; then + wget -N "$COVER_URL" -o /dev/null + + NUM_IMAGES=$(ls -1 "$COVER_PATH"/* | wc -l) + + if [ "$NUM_IMAGES" -gt 10 ]; then + OLDEST_IMAGE=$(ls -1t "$COVER_PATH"/* | tail -1) + rm "$OLDEST_IMAGE" + fi + fi + + rm "$IMGPATH" + sleep 1 + ln -s "$FILENAME" "$IMGPATH" + + echo "$IMG_PATH" + elif [ "$COVER_URL" = "" ]; then + echo "" + else + echo "$COVER_URL" + fi + done +'' + diff --git a/home/scripts/scratchpad.nix b/home/scripts/scratchpad.nix new file mode 100644 index 0000000..018820d --- /dev/null +++ b/home/scripts/scratchpad.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: pkgs.writeShellScriptBin "scratchpad" '' + workspace_name="magic" + cmd="kitty" + + windows=$(hyprctl clients -j | jq ".[] | select(.workspace.name == \"special:$workspace_name\")") + + if [ -z "$windows" ]; then + hyprctl dispatch "exec [workspace special:$workspace_name] $cmd" + else + hyprctl dispatch togglespecialworkspace "$workspace_name" + fi +'' + diff --git a/home/wayland/default.nix b/home/wayland/default.nix new file mode 100644 index 0000000..008f7dd --- /dev/null +++ b/home/wayland/default.nix @@ -0,0 +1,52 @@ +{ pkgs, lib, config, ... }: { + imports = [ + ./eww + ./hyprland + ./services/gtk + ./services/clipboard.nix + ./services/mako.nix + ./services/variety.nix + ]; + + options = { + hyprland.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable Hyprland window manager"; + }; + }; + + config = { + home.packages = with pkgs; [ + (waybar.overrideAttrs (oldAttrs: { mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; })) + + hyprpicker + ]; + + wayland.windowManager.hyprland = { + settings = { + env = [ + "GDK_BACKEND,wayland,x11,*" + "QT_QPA_PlATFORM,wayland;xcb" + "SDLVIDEODRIVER,wayland" + "CLUTTER_BACKEND,wayland" + "XDG_CURRENT_DESKTOP,Hyprland" + "XDG_SESSION_TYPE,wayland" + "XDG_SESSION_DESKTOP,Hyprland" + + "QT_AUTO_SCREEN_SCALE_FACTOR,1" + "QT_QPA_PLATOFMR,wayland;xcb" + "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" + "QT_QPA_PLATFORMTHEME,qt5ct" + + "XCURSOR_SIZE,24" + "HYPRCURSOR_SIZE,24" + + "GBM_BACKEND,nvidia-drm" + "__GLX_VENDOR_LIBRARY_NAME,nvidia" + "LIBVA_DRIVER_NAME,nvidia" + ]; + }; + }; + }; +} diff --git a/home/wayland/eww/config/eww.scss b/home/wayland/eww/config/eww.scss new file mode 100644 index 0000000..2b5dd3a --- /dev/null +++ b/home/wayland/eww/config/eww.scss @@ -0,0 +1,24 @@ +* { + all: unset; +} + +@import "./style/mixins.scss"; +@import "./style/menu.scss"; +@import "./style/music.scss"; +@import "./style/workspaces.scss"; +@import "./style/sysinfo.scss"; + +.logo { + margin: 0.4rem 10rem 0.4rem 1rem; + border-radius: 8px; + background-color: $background; +} + +.time { + font-size: 16px; + margin: 0.5rem 1rem 0.5rem 1rem; + padding-left: 0.4rem; + padding-right: 0.4rem; + border-radius: 8px; + background-color: $background; +} diff --git a/home/wayland/eww/config/eww.yuck b/home/wayland/eww/config/eww.yuck new file mode 100644 index 0000000..58bd220 --- /dev/null +++ b/home/wayland/eww/config/eww.yuck @@ -0,0 +1,49 @@ +(include "./widgets/logo.yuck") +(include "./widgets/workspaces.yuck") +(include "./widgets/menu.yuck") +(include "./widgets/time.yuck") +(include "./widgets/music.yuck") +(include "./widgets/sysinfo.yuck") +(include "./vars.yuck") + +(defwidget left [] + (box :orientation "h" + :halign "start" + (logo) + (workspaces))) + +(defwidget center[] + (box :orientation "h" + :halign "center" + (music))) + +(defwidget right [] + (box :orientation "h" + :halign "end" + (cpu) + (time) + (menu))) + + +(defwidget bar [] + (centerbox :orientation "h" + (left) + (center) + (right))) + + +(defwindow bar + :monitor 0 + :windowtype "dock" + :geometry (geometry + :x "0%" + :y "0%" + :width "100%" + :height "47px" + :anchor "top center") + :stacking "fg" + :reserve (struts :distance "40px" :side "top") + :windowtype "dock" + :wm-ignore false + :exclusive true; + (bar)) diff --git a/home/wayland/eww/config/style/colors.scss b/home/wayland/eww/config/style/colors.scss new file mode 100644 index 0000000..1d4b467 --- /dev/null +++ b/home/wayland/eww/config/style/colors.scss @@ -0,0 +1,24 @@ +/* tokyonight */ + +$red: #f7768e; +$orange: #ff9e64; +$yellow: #e0af68; +$light-green: #9ece6a; +$green: #73daca; +$turquoise: #89ddff; +$light-cyan: #b4f9f8; +$teal: #2ac3de; +$cyan: #7dcfff; +$blue: #7aa2f7; +$magenta: #bb9af7; +$white: #c0caf5; +$light-gray: #9aa5ce; +$parameters: #cfc9c2; +$comment: #565f89; +$black: #414868; +$foreground: #a9b1d6; +$foreground-highlight: #c0caf5; +$foreground-gutter: #363b54; +$background: #1a1b26; +$background-highlight: #30374b; +$background-menu: #16161e; diff --git a/home/wayland/eww/config/style/menu.scss b/home/wayland/eww/config/style/menu.scss new file mode 100644 index 0000000..cd8b838 --- /dev/null +++ b/home/wayland/eww/config/style/menu.scss @@ -0,0 +1,64 @@ +@import "./mixins.scss"; +@import "./colors.scss"; + +.menu-widget { + font-size: 20px; + margin: 0.5rem 1.2rem 0.5rem 1.5rem; + padding-right: 0.3rem; + border-radius: 8px; + background-color: $background; +} + +.menubox { + border: 3px solid $background-highlight; + border-radius: 10px; + background-color: $background; +} + +.menubox-header { + @include button-sizing; + font-size: 32px; + background-color: $background-highlight; + margin: 2rem; +} + +.menubox-text { + @include button-sizing; + background-color: $background; +} + +.menubox-widgets { + @include button-sizing(); + background-color: $background-highlight; + margin: 2rem; + transition: all 100ms ease; + &:hover { + @include button-sizing(); + background-color: $red; + transition: all 100ms ease; + color: $background-highlight; + } +} + +.cpu { + @include sysinfo(); + color: $red; +} + +.mem { + @include sysinfo(); + color: $green; + font-size: 17px; +} + +.storage { + @include sysinfo(); + color: $blue; + font-size: 24px; +} + +.info-box { + @include button-sizing; + background-color: $background-highlight; + margin: 2rem; +} diff --git a/home/wayland/eww/config/style/mixins.scss b/home/wayland/eww/config/style/mixins.scss new file mode 100644 index 0000000..b17fabc --- /dev/null +++ b/home/wayland/eww/config/style/mixins.scss @@ -0,0 +1,23 @@ +@import "./colors.scss"; + +@mixin workspace-font { + font-size: 20px; + font-weight: normal; +} + +@mixin button-sizing { + margin: 10px; + border-radius: 16px; + padding: 10px 10px 10px 10px; + font-size: 32px; +} + +@mixin sysinfo { + margin: 10px; + font-size: 24px; + background-color: $light-gray; +} + +@mixin widget-border-radius { + border-radius: 8px; +} diff --git a/home/wayland/eww/config/style/music.scss b/home/wayland/eww/config/style/music.scss new file mode 100644 index 0000000..34d609f --- /dev/null +++ b/home/wayland/eww/config/style/music.scss @@ -0,0 +1,92 @@ +@import "./mixins.scss"; +@import "./colors.scss"; + +.music { + @include widget-border-radius; + font-size: 15px; + background-color: $background; + margin: 0.5rem 2rem 0.5rem 1rem; + padding-left: 1rem; + padding-right: 1rem; +} + +.music-cover { + @include widget-border-radius; + background-size: 42px 42px; + background-position: center; + background-repeat: no-repeat; + margin-top: 0.3rem; + margin-bottom: 0.3rem; + min-height: 2rem; + min-width: 4rem; + border-radius: 0.8rem; +} + +.music-cover-big { + margin: 0rem; + background-size: 450px 450px; + background-position: center; + background-repeat: no-repeat; + border-radius: 30%; +} + +.music-widget { + background-position: center; + background-repeat: no-repeat; + background-size: 1100px 1100px; + border: 3px solid $background-highlight; + border-radius: 0.7rem; +} + +.music-widget-title { + @include widget-border-radius; + font-size: 24px; + margin: 2rem 2rem 0rem 1rem; + background-color: $background; + padding: 1.1rem; + border: 3px solid $background-highlight; +} + +.music-controls { + @include button-sizing; + background-color: $background; + margin: 5rem 7rem 2rem 6rem; + padding: 0.4rem; + border-radius: 8px; + border: 3px solid $background-highlight; +} + +.hover-play { + transition: all 200ms ease; + border-radius: 5px; + &:hover { + background-color: $green; + transition: all 200ms ease; + color: $background-highlight; + border-radius: 5px; + } +} + +.hover-pause { + transition: all 200ms ease; + border-radius: 5px; + &:hover { + background-color: $red; + transition: all 200ms ease; + color: $background-highlight; + border-radius: 5px; + } +} + +.close-button { + margin: 0.5rem 2rem 0rem 30rem; + background-color: $background; + border-radius: 8px; + padding: 0.5rem; + &:hover { + background-color: $red; + transition: all 100ms ease-in; + color: $background-highlight; + border-radius: 5px; + } +} diff --git a/home/wayland/eww/config/style/sysinfo.scss b/home/wayland/eww/config/style/sysinfo.scss new file mode 100644 index 0000000..03b1232 --- /dev/null +++ b/home/wayland/eww/config/style/sysinfo.scss @@ -0,0 +1,14 @@ +@import "./mixins.scss"; +@import "./colors.scss"; + +.sysinfo-cpu { + @include sysinfo; + color: $red; + margin: 0.1rem; +} + +.sysinfo-mem { + @include sysinfo; + color: $green; + margin: 0.1rem; +} diff --git a/home/wayland/eww/config/style/workspaces.scss b/home/wayland/eww/config/style/workspaces.scss new file mode 100644 index 0000000..cf99e08 --- /dev/null +++ b/home/wayland/eww/config/style/workspaces.scss @@ -0,0 +1,27 @@ +@import "./mixins.scss"; +@import "./colors.scss"; + +.workspaces { + @include widget-border-radius; + margin: 0.5rem 4rem 0.5rem 1rem; + padding-left: 1rem; + background-color: $background; +} + +.ws0 { + color: $red; + @include workspace-font(); +} + +.ws1 { + color: $teal; + @include workspace-font(); +} +.ws2 { + color: $cyan; + @include workspace-font(); +} +.ws3 { + color: $blue; + @include workspace-font(); +} diff --git a/home/wayland/eww/config/vars.yuck b/home/wayland/eww/config/vars.yuck new file mode 100644 index 0000000..aca1571 --- /dev/null +++ b/home/wayland/eww/config/vars.yuck @@ -0,0 +1,18 @@ +(deflisten musicArtist :initial "-" "playerctl --follow metadata --format '{{ artist }}'") +(deflisten musicTitle :initial "-" "playerctl --follow metadata --format '{{title}}'") +(deflisten musicCover "get-music-cover") + + +(defpoll fulldate :interval "1s" + :initial "initial-value" +`date "+%A - %d %B %Y - %H:%H:%S"`) + +(defpoll time :interval "60s" + :initial "initial-value" +`date +%H:%M`) + +(defpoll date :interval "60s" + :initial "initial-value" +`date +%D-%Y`) + +(defpoll uptime :interval "1s" "uptime | awk '{print $3}' | tr ',' ' '") diff --git a/home/wayland/eww/config/widgets/container.yuck b/home/wayland/eww/config/widgets/container.yuck new file mode 100644 index 0000000..398bf36 --- /dev/null +++ b/home/wayland/eww/config/widgets/container.yuck @@ -0,0 +1,7 @@ +(defwidget container [] + (box + :class "container" + :orientation "h" + (children) + ) +) diff --git a/home/wayland/eww/config/widgets/datetime.yuck b/home/wayland/eww/config/widgets/datetime.yuck new file mode 100644 index 0000000..bace4ff --- /dev/null +++ b/home/wayland/eww/config/widgets/datetime.yuck @@ -0,0 +1,9 @@ +(defpoll time :interval "60s" + :initial "initial-value" +`date +%H:%M`) + +(defwidget time [] + (box + :class "time" + (label + :text time))) diff --git a/home/wayland/eww/config/widgets/logo.yuck b/home/wayland/eww/config/widgets/logo.yuck new file mode 100644 index 0000000..d12d623 --- /dev/null +++ b/home/wayland/eww/config/widgets/logo.yuck @@ -0,0 +1,6 @@ +(defwidget logo [] + (box + :class "logo" + (image :path "/home/c4patino/.assets/nix-logo.png" + :image-width 24 + :image-height 24))) diff --git a/home/wayland/eww/config/widgets/menu.yuck b/home/wayland/eww/config/widgets/menu.yuck new file mode 100644 index 0000000..91c6951 --- /dev/null +++ b/home/wayland/eww/config/widgets/menu.yuck @@ -0,0 +1,70 @@ +(defwidget menu [] + (button + :onclick "eww open menu-window" + (label + :text "⏻" + :class "menu-widget"))) + + +(defwidget menubox [] + (box + :orientation "v" + :space-evenly true + :class "menubox" + :spacing 0 + (box :class "menubox-header" + :orientation "h" + (label :halign "start" :text "${fulldate}")) + (box :class "info-box" + :orientation "h" + (circular-progress + :class "cpu" + :start-at 0 + :thickness 6 + :clockwise true + :value {EWW_CPU.avg} + (label + :style "font-size: 24px; margin-right: 0.1rem;" + :text "󰍛")) + (circular-progress + :class "mem" + :start-at 0 + :thickness 6 + :clockwise true + :value {EWW_RAM.used_mem_perc} + (label + :style "font-size: 24px; margin-right: 0.8rem;" + :text "")) + (circular-progress + :class "storage" + :start-at 0 + :thickness 6 + :clockwise true + :value {EWW_RAM.used_mem_perc} + (label + :style "font-size: 24px;" + :text "")) + (label + :text " ${uptime}") + ) + (box :class "menubox-widgets" + :orientation "h" + (button :class "menubox-widgets text" :onclick "reboot" "") + (button :class "menubox-widgets text" :onclick "shutdown now" "") + (button :class "menubox-widgets text" :onclick "eww close menu-window" ""))) +) + +(defwindow menu-window + :monitor 0 + :windowtype "dock" + :geometry (geometry + :x "0.9%" + :y "1.5%" + :width "25%" + :height "600px" + :anchor "top right") + :stacking "fg" + :windowtype "dock" + :wm-ignore true + :exclusive false + (menubox)) diff --git a/home/wayland/eww/config/widgets/music.yuck b/home/wayland/eww/config/widgets/music.yuck new file mode 100644 index 0000000..42f0854 --- /dev/null +++ b/home/wayland/eww/config/widgets/music.yuck @@ -0,0 +1,55 @@ +(defwidget bar-art [] + (box + :space-evenly false + (box :class "music-cover" + :style "background-image:url('${musicCover}');") + (eventbox + :onclick "eww open music-widget" + (label :class "music" + :text "${musicTitle}")))) + + + +(defwidget music-widget [] + (box :class "music-widget" + (box :class "music-cover-big" + :space-evenly false + :orientation "h" + :style "background-image:url('${musicCover}');") + (box + :orientation "v" + :space-evenly false + :spacing 0 + (box + (button + :class "close-button" + :onclick "eww close music-widget" + (label :text "" :style "font-size: 18px; margin-right: 0.5rem;"))) + (label :class "music-widget-title" :text "${musicTitle}") + (label :class "music-widget-title" :text "${musicArtist}") + (box :class "music-c") + (box :class "music-controls" + :valign "center" + (button :class "hover-play" :onclick "playerctl play" "") + (button :class "hover-pause" :onclick "playerctl pause" ""))))) + + +(defwidget music [] + (box + (bar-art))) + +(defwindow music-widget + :monitor 0 + :windowtype "dock" + :namespace "music-widget" + :geometry (geometry + :x "0" + :y "1.5%" + :width "42%" + :height "550px" + :anchor "top center") + :stacking "fg" + :windowtype "dock" + :wm-ignore true + :exclusive false + (music-widget)) diff --git a/home/wayland/eww/config/widgets/sysinfo.yuck b/home/wayland/eww/config/widgets/sysinfo.yuck new file mode 100644 index 0000000..7e87b5c --- /dev/null +++ b/home/wayland/eww/config/widgets/sysinfo.yuck @@ -0,0 +1,21 @@ +(defwidget cpu [] + (box + :spacing 5 + (circular-progress + :class "sysinfo-cpu" + :start-at 0 + :thickness 4 + :clockwise true + :value {EWW_CPU.avg} + (label + :style "font-size: 13px; margin-right: 0.1rem;" + :text "󰍛")) + (circular-progress + :class "sysinfo-mem" + :start-at 0 + :thickness 4 + :clockwise true + :value {EWW_RAM.used_mem_perc} + (label + :style "font-size: 10px; margin-right: 0.3rem;" + :text "")))) diff --git a/home/wayland/eww/config/widgets/time.yuck b/home/wayland/eww/config/widgets/time.yuck new file mode 100644 index 0000000..e5af93c --- /dev/null +++ b/home/wayland/eww/config/widgets/time.yuck @@ -0,0 +1,5 @@ +(defwidget time [] + (box + :class "time" + (label + :text time))) diff --git a/home/wayland/eww/config/widgets/workspaces.yuck b/home/wayland/eww/config/widgets/workspaces.yuck new file mode 100644 index 0000000..bb9df80 --- /dev/null +++ b/home/wayland/eww/config/widgets/workspaces.yuck @@ -0,0 +1,28 @@ +(defwidget workspaces [] + (box :class "workspaces" + :space-evenly true + :spacing 6 + (button + :class "ws0" + :onclick "hyprctl dispatch workspace 1" " ") + (button + :class "ws1" + :onclick "hyprctl dispatch workspace 2" " ") + (button + :class "ws2" + :onclick "hyprctl dispatch workspace 3" " ") + (button + :class "ws3" + :onclick "hyprctl dispatch workspace 4" " ") + (button + :class "ws0" + :onclick "hyprctl dispatch workspace 5" " ") + (button + :class "ws1" + :onclick "hyprctl dispatch workspace 6" " ") + (button + :class "ws2" + :onclick "hyprctl dispatch workspace 7" " ") + (button + :class "ws3" + :onclick "hyprctl dispatch workspace 8" " "))) diff --git a/home/wayland/eww/default.nix b/home/wayland/eww/default.nix new file mode 100644 index 0000000..387d541 --- /dev/null +++ b/home/wayland/eww/default.nix @@ -0,0 +1,20 @@ +{ pkgs, inputs, lib, config, ... }: { + config = lib.mkIf config.hyprland.enable { + home.packages = with pkgs; [ + eww + playerctl + imagemagick + ]; + + home.file.".assets/" = { + source = inputs.dotfiles + "/assets"; + recursive = true; + }; + + programs.eww = { + enable = true; + package = pkgs.eww; + configDir = ./config; + }; + }; +} diff --git a/home/wayland/hyprland/config/general.nix b/home/wayland/hyprland/config/general.nix new file mode 100644 index 0000000..63b0173 --- /dev/null +++ b/home/wayland/hyprland/config/general.nix @@ -0,0 +1,90 @@ +{ pkgs, lib, config, ... }: { + config = lib.mkIf config.hyprland.enable { + wayland.windowManager.hyprland = { + settings = { + exec-once = [ + "eww open bar --screen 0" + + "dbus-update-activation-environment --systmd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" + "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" + ]; + + general = { + gaps_in = 5; + gaps_out = 20; + + border_size = 2; + "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; + "col.inactive_border" = "rgba(595959aa)"; + resize_on_border = false; + + allow_tearing = false; + + layout = "dwindle"; + }; + + decoration = { + rounding = 10; + + active_opacity = 1.0; + inactive_opacity = 1.0; + fullscreen_opacity = 1.0; + + drop_shadow = true; + shadow_range = 60; + shadow_offset = "0 5"; + shadow_render_power = 4; + "col.shadow" = "rgba(00000099)"; + + blur = { + enabled = true; + size = 6; + passes = 3; + new_optimizations = true; + }; + }; + + animations = { + enabled = true; + + bezier = [ + "fastBezier, 0.05, 1.1, 0.2, 1.0" + "linear, 0.0, 0.0, 1.0, 1.0" + "liner, 1, 1, 1, 1" + ]; + + animation = [ + "windows, 1, 7, fastBezier, slide" + "windowsOut, 1, 7, fastBezier, slide" + "border, 1, 10, fastBezier" + "fade, 1, 7, fastBezier" + "workspaces, 1, 6, fastBezier" + "border, 1, 1, liner" + "borderangle, 1, 40, liner, loop" + "borderangle, 1, 100, linear, loop" + ]; + }; + + dwindle = { + pseudotile = true; + preserve_split = true; + }; + + master = { + new_status = "master"; + }; + + gestures = { + workspace_swipe = false; + }; + + misc = { + disable_hyprland_logo = true; + mouse_move_enables_dpms = true; + key_press_enables_dpms = false; + }; + }; + }; + }; +} + diff --git a/home/wayland/hyprland/config/keybinds.nix b/home/wayland/hyprland/config/keybinds.nix new file mode 100644 index 0000000..993df5d --- /dev/null +++ b/home/wayland/hyprland/config/keybinds.nix @@ -0,0 +1,98 @@ +{ lib, config, ... } : { + config = lib.mkIf config.hyprland.enable { + wayland.windowManager.hyprland.settings = { + "$mainMod" = "SUPER"; + "$terminal" = "kitty"; + "$menu" = "anyrun"; + + bind = [ + # System + ", F8, exec, playerctl previous" + ", F9, exec, playerctl play-pause" + ", F10, exec, playerctl next" + + # General + "$mainMod, T, exec, $terminal" + "$mainMod, R, exec, $menu" + "$mainMod, Q, killactive," + "$mainMod ALT, Q, exit," + "$mainMod, V, togglefloating," + "$mainMod, F, fullscreen," + "$mainMod, P, pseudo," + "$mainMod, S, togglesplit," + + "$mainMod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy" + + # Switch tabs + "ALT, Tab, cyclenext" + "ALT, Tab, bringactivetotop" + "SHIFT ALT, Tab, cyclenext, prev" + + # Cycle recent workspaces + "SUPER, Tab, workspace, previous" + + # Scratchpad + "ALT, S, exec, scratchpad" + "ALT SHIFT, S, movetoworkspace, special:magic" + + # Window focus + "$mainMod, h, movefocus, l" + "$mainMod, l, movefocus, r" + "$mainMod, k, movefocus, u" + "$mainMod, j, movefocus, d" + + # Window position + "$mainMod SHIFT, h, movewindow, l" + "$mainMod SHIFT, l, movewindow, r" + "$mainMod SHIFT, k, movewindow, u" + "$mainMod SHIFT, j, movewindow, d" + + # Switch workspaces with mainMod + [0-9] + "$mainMod, 1, workspace, 1" + "$mainMod, 2, workspace, 2" + "$mainMod, 3, workspace, 3" + "$mainMod, 4, workspace, 4" + "$mainMod, 5, workspace, 5" + "$mainMod, 6, workspace, 6" + "$mainMod, 7, workspace, 7" + "$mainMod, 8, workspace, 8" + "$mainMod, 9, workspace, 9" + "$mainMod, 0, workspace, 10" + "$mainMod, bracketright, workspace, e+1" + "$mainMod, bracketleft, workspace, e-1" + + # Move active window to a workspace with mainMod + SHIFT + [0-9] + "$mainMod SHIFT, 1, movetoworkspace, 1" + "$mainMod SHIFT, 2, movetoworkspace, 2" + "$mainMod SHIFT, 3, movetoworkspace, 3" + "$mainMod SHIFT, 4, movetoworkspace, 4" + "$mainMod SHIFT, 5, movetoworkspace, 5" + "$mainMod SHIFT, 6, movetoworkspace, 6" + "$mainMod SHIFT, 7, movetoworkspace, 7" + "$mainMod SHIFT, 8, movetoworkspace, 8" + "$mainMod SHIFT, 9, movetoworkspace, 9" + "$mainMod SHIFT, 0, movetoworkspace, 10" + "$mainMod SHIFT, bracketright, movetoworkspace, +1" + "$mainMod SHIFT, bracketleft, movetoworkspace, -1" + + "$mainMod, grave, hyprexpo:expo, toggle" + ]; + + bindm = [ + "$mainMod, mouse:272, movewindow" + "$mainMod, mouse:273, resizewindow" + ]; + + bindle = [ + ", F2, exec, brightnessctl s 2%-" + ", F3, exec, brightnessctl s +2%" + ", F6, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ", F7, exec, wpctl set-volume -l 1.2 @DEFAULT_AUDIO_SINK@ 5%+" + ]; + + bindl = [ + ", F5, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ]; + }; + }; +} diff --git a/home/wayland/hyprland/config/plugins.nix b/home/wayland/hyprland/config/plugins.nix new file mode 100644 index 0000000..7018d62 --- /dev/null +++ b/home/wayland/hyprland/config/plugins.nix @@ -0,0 +1,23 @@ +{ pkgs, config, lib, ... }: { + config = lib.mkIf config.hyprland.enable { + wayland.windowManager.hyprland = { + plugins = with pkgs.hyprlandPlugins; [ + hyprexpo + ]; + + settings.plugin = { + hyprexpo = { + columns = 3; + gap_size = 5; + bg_col = "rgb(111111)"; + workspace_method = "center current"; # [center/first] [workspace] e.g. first 1 or center m+1 + + enable_gesture = true; # laptop touchpad + gesture_fingers = 3; # 3 or 4 + gesture_distance = 300; # how far is the "max" + gesture_positive = true; # positive = swipe down. Negative = swipe up. + }; + }; + }; + }; +} diff --git a/home/wayland/hyprland/config/rules.nix b/home/wayland/hyprland/config/rules.nix new file mode 100644 index 0000000..56eda32 --- /dev/null +++ b/home/wayland/hyprland/config/rules.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: { + config = lib.mkIf config.hyprland.enable { + wayland.windowManager.hyprland.settings = { + windowrulev2 = [ + "suppressevent maximize, class:.*" + ]; + + workspace = [ + + ]; + }; + }; + } diff --git a/home/wayland/hyprland/default.nix b/home/wayland/hyprland/default.nix new file mode 100644 index 0000000..59581f3 --- /dev/null +++ b/home/wayland/hyprland/default.nix @@ -0,0 +1,16 @@ +{ inputs, lib, config, ... }: { + imports = [ + ./config/general.nix + ./config/rules.nix + ./config/keybinds.nix + ./config/plugins.nix + ]; + + config = lib.mkIf config.hyprland.enable { + wayland.windowManager.hyprland = { + enable = true; + systemd.enable = true; + xwayland.enable = true; + }; + }; +} diff --git a/home/wayland/services/clipboard.nix b/home/wayland/services/clipboard.nix new file mode 100644 index 0000000..186963f --- /dev/null +++ b/home/wayland/services/clipboard.nix @@ -0,0 +1,19 @@ +{ pkgs, lib, config, ... }: { + config = lib.mkIf config.hyprland.enable { + home.packages = with pkgs; [ + wl-clipboard + cliphist + rofi + ]; + + wayland.windowManager.hyprland = { + settings = { + exec-once = [ + "wl-paste --type text --watch cliphist store" + "wl-paste --type image --watch cliphist store" + ]; + }; + }; + }; +} + diff --git a/home/wayland/services/gtk/default.nix b/home/wayland/services/gtk/default.nix new file mode 100644 index 0000000..5c00aa4 --- /dev/null +++ b/home/wayland/services/gtk/default.nix @@ -0,0 +1,24 @@ +{ pkgs, config, lib, ... }: +let + gruvboxPlus = import ./gruvbox-plus.nix { inherit pkgs; }; +in +{ + config = lib.mkIf config.hyprland.enable { + qt = { + enable = true; + platformTheme.name = "gtk"; + }; + + gtk = { + enable = true; + theme = { + package = pkgs.adw-gtk3; + name = "adw-gtk3"; + }; + iconTheme = { + package = gruvboxPlus; + name = "GruvboxPlus"; + }; + }; + }; +} diff --git a/home/wayland/services/gtk/gruvbox-plus.nix b/home/wayland/services/gtk/gruvbox-plus.nix new file mode 100644 index 0000000..266127d --- /dev/null +++ b/home/wayland/services/gtk/gruvbox-plus.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: pkgs.stdenv.mkDerivation { + name = "gruvbox-plus"; + + src = pkgs.fetchurl { + url = "https://github.com/SylEleuth/gruvbox-plus-icon-pack/releases/download/v3.1/gruvbox-plus-icon-pack-3.1.zip"; + sha256 = "0rra07p0iw1k4ncp40ri7khw1xvysm0d4qvfn2bjf07zij2k7w4b"; + }; + + dontUnpack = true; + + installPhase = '' + mkdir -p $out + ${pkgs.unzip}/bin/unzip $src -d $out/ + ''; +} diff --git a/home/wayland/services/mako.nix b/home/wayland/services/mako.nix new file mode 100644 index 0000000..08481a2 --- /dev/null +++ b/home/wayland/services/mako.nix @@ -0,0 +1,15 @@ +{ lib, config, ... }: { + config = lib.mkIf config.hyprland.enable { + services.mako = { + enable = true; + icons = true; + + maxIconSize = 64; + maxVisible = 3; + defaultTimeout = 5000; + ignoreTimeout = true; + anchor = "top-right"; + output = "DP-2"; + }; + }; +} diff --git a/home/wayland/services/variety.nix b/home/wayland/services/variety.nix new file mode 100644 index 0000000..a1d457f --- /dev/null +++ b/home/wayland/services/variety.nix @@ -0,0 +1,25 @@ +{ pkgs, lib, inputs, config, ... }: { + config = lib.mkIf config.hyprland.enable { + home = { + packages = with pkgs; [ + swaybg + variety + ]; + + file.".desktops/" = { + source = inputs.dotfiles + "/desktops"; + recursive = true; + }; + }; + + wayland.windowManager.hyprland = { + settings = { + exec-once = [ + "swaybg &" + "variety &" + ]; + }; + }; + }; +} + diff --git a/hosts/arisu/default.nix b/hosts/arisu/default.nix new file mode 100644 index 0000000..da0a72f --- /dev/null +++ b/hosts/arisu/default.nix @@ -0,0 +1,23 @@ +{ config, pkgs, inputs, ... }: +{ + imports = [ + ./hardware-configuration.nix + ../../nixosModules + ]; + + networking.hostName = "arisu"; + networking.networkmanager.enable = true; + + users.users.c4patino = { + isNormalUser = true; + description = "C4 Patino"; + extraGroups = [ "networkmanager" "wheel" "vboxusers" "docker" ]; + initialPassword = "passw0rd"; + shell = pkgs.zsh; + }; + + docker.enable = true; + virtualbox.enable = true; + teamviewer.enable = true; + nvidia.enable = true; +} diff --git a/hosts/arisu/hardware-configuration.nix b/hosts/arisu/hardware-configuration.nix new file mode 100644 index 0000000..fa59267 --- /dev/null +++ b/hosts/arisu/hardware-configuration.nix @@ -0,0 +1,41 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/81cbd453-78f2-453e-9657-e284f1104c3c"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/14BD-1DF6"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/82a94746-e772-4c28-bcc8-7f402733b5be"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp42s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/default.nix b/hosts/default.nix new file mode 100644 index 0000000..86ed1bd --- /dev/null +++ b/hosts/default.nix @@ -0,0 +1,33 @@ +{ inputs, homeImports, ... }: { + flake.nixosConfigurations = + let + inherit (inputs.nixpkgs.lib) nixosSystem; + specialArgs = { inherit inputs; }; + in + { + arisu = nixosSystem { + inherit specialArgs; + modules = [ ./arisu ]; + }; + kokoro = nixosSystem { + inherit specialArgs; + modules = [ ./kokoro ]; + }; + hikari = nixosSystem { + inherit specialArgs; + modules = [ + ./hikari + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = specialArgs; + users.nixos = { + imports = homeImports."c4patino@hikari"; + }; + }; + } + ]; + }; + }; +} diff --git a/hosts/hikari/default.nix b/hosts/hikari/default.nix new file mode 100644 index 0000000..4f401fb --- /dev/null +++ b/hosts/hikari/default.nix @@ -0,0 +1,23 @@ +{ pkgs, modulesPath, inputs, ... }: { + imports = [ + "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" + + inputs.home-manager.nixosModules.home-manager + + ../../nixosModules + ]; + + environment.systemPackages = with pkgs; [ + neovim + disko + parted + git + ]; + + efi-bootloader.enable = false; + audio.enable = false; + network-manager.enable = false; + hyprland.enable = false; + + nixpkgs.hostPlatform = "x86_64-linux"; +} diff --git a/hosts/kokoro/default.nix b/hosts/kokoro/default.nix new file mode 100644 index 0000000..d2b350d --- /dev/null +++ b/hosts/kokoro/default.nix @@ -0,0 +1,21 @@ +{ config, pkgs, inputs, ... }: +{ + imports = [ + ../../nixosModules + ]; + + networking.hostName = "kokoro"; + networking.networkmanager.enable = true; + + users.users.c4patino = { + isNormalUser = true; + description = "C4 Patino"; + extraGroups = [ "networkmanager" "wheel" "vboxusers" "docker" ]; + initialPassword = "passw0rd"; + shell = pkgs.zsh; + }; + + docker.enable = true; + virtualbox.enable = true; + teamviewer.enable = true; +} diff --git a/neovim b/neovim new file mode 160000 index 0000000..1f33a8d --- /dev/null +++ b/neovim @@ -0,0 +1 @@ +Subproject commit 1f33a8d61a4b618490bb7e7e79cf725b732d1edd diff --git a/nixosModules/audio.nix b/nixosModules/audio.nix new file mode 100644 index 0000000..cfdc0ec --- /dev/null +++ b/nixosModules/audio.nix @@ -0,0 +1,20 @@ +{ pkgs, inputs, config, lib, ... }: { + options = { + audio.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable audio support"; + }; + }; + + config = lib.mkIf config.audio.enable { + services.pipewire = { + enable = true; + pulse.enable = true; + jack.enable = true; + wireplumber.enable = true; + alsa.enable = true; + alsa.support32Bit = true; + }; + }; +} diff --git a/nixosModules/bootloader.nix b/nixosModules/bootloader.nix new file mode 100644 index 0000000..0317847 --- /dev/null +++ b/nixosModules/bootloader.nix @@ -0,0 +1,21 @@ +{ pkgs, inputs, config, lib, ... }: { + options = { + efi-bootloader.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable EFI bootloader"; + }; + }; + + config = lib.mkIf config.efi-bootloader.enable { + boot.loader = { + efi.canTouchEfiVariables = true; + grub = { + enable = true; + devices = [ "nodev" ]; + efiSupport = true; + useOSProber = true; + }; + }; + }; +} diff --git a/nixosModules/default.nix b/nixosModules/default.nix new file mode 100644 index 0000000..f218f66 --- /dev/null +++ b/nixosModules/default.nix @@ -0,0 +1,80 @@ +{ lib, pkgs, ... }: { + imports = [ + ./virtualization + ./audio.nix + ./bootloader.nix + ./hyprland.nix + ./network-manager.nix + ./nvidia.nix + ./disko.nix + ]; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + home-manager + nh + networkmanagerapplet + gnupg + ]; + + time.timeZone = "America/Chicago"; + time.hardwareClockInLocalTime = true; + + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + networking.wireless.enable = true; + + services = { + xserver = { + enable = true; + xkb = { + layout = "us"; + variant = ""; + }; + displayManager.gdm.enable = true; + }; + + printing.enable = true; + + blueman.enable = true; + }; + + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; + + security = { + polkit.enable = true; + rtkit.enable = true; + }; + + programs.zsh.enable = true; + programs.nix-ld = { + enable = true; + libraries = with pkgs; [ + stdenv.cc.cc + cudaPackages.cudatoolkit + ]; + }; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + system.stateVersion = "24.05"; +} diff --git a/nixosModules/disko.nix b/nixosModules/disko.nix new file mode 100644 index 0000000..bbdc046 --- /dev/null +++ b/nixosModules/disko.nix @@ -0,0 +1,80 @@ +{ pkgs, inputs, config, lib, ... }: { + options = { + disko.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable Disko"; + }; + }; + + config = lib.mkIf config.disko.enable { + disko.devices = { + disk.main = { + inherit device; + type = "disk"; + content = { + type = "gpt"; + partitions = { + boot = { + name = "boot"; + size = "1M"; + type = "EF02"; + }; + esp = { + name = "ESP"; + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + swap = { + size = "32G"; + content = { + type = "swap"; + resumeDevice = true; + }; + }; + root = { + name = "root"; + size = "100%"; + content = { + type = "lvm_pv"; + vg = "root_vg"; + }; + }; + }; + }; + }; + lvm_vg = { + root_vg = { + type = "lvm_vg"; + lvs = { + root = { + size = "100%FREE"; + content = { + type = "btrfs"; + extraArgs = ["-f"]; + + subvolumes = { + "/root" = { + mountpoint = "/"; + }; + "/persist" = { + mountOptions = ["subvol=persist" "noatime"]; + mountpoint = "/persist"; + }; + "/nix" = { + mountOptions = ["subvol=nix" "noatime"]; + mountpoint = "/nix"; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/nixosModules/hyprland.nix b/nixosModules/hyprland.nix new file mode 100644 index 0000000..3b7a175 --- /dev/null +++ b/nixosModules/hyprland.nix @@ -0,0 +1,31 @@ +{ pkgs, inputs, config, lib, ... }: { + options = { + hyprland.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable hyprland"; + }; + }; + + config = lib.mkIf config.hyprland.enable { + programs.hyprland = { + enable = true; + package = inputs.hyprland.packages."${pkgs.system}".hyprland; + xwayland.enable = true; + }; + + environment.systemPackages = with pkgs; [ + xdg-desktop-portal-hyprland + ]; + + xdg.portal = { + enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + }; + + environment.sessionVariables = { + WLR_NO_HARDWARE_CURSORS = "1"; + NIXOS_OZONE_WL = "1"; + }; + }; +} diff --git a/nixosModules/network-manager.nix b/nixosModules/network-manager.nix new file mode 100644 index 0000000..259d953 --- /dev/null +++ b/nixosModules/network-manager.nix @@ -0,0 +1,13 @@ +{ pkgs, inputs, config, lib, ... }: { + options = { + network-manager.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable network manager"; + }; + }; + + config = lib.mkIf config.network-manager.enable { + networking.networkmanager.enable = true; + }; +} diff --git a/nixosModules/nvidia.nix b/nixosModules/nvidia.nix new file mode 100644 index 0000000..3fb7141 --- /dev/null +++ b/nixosModules/nvidia.nix @@ -0,0 +1,30 @@ +{ config, pkgs, lib, ... }: { + options = { + nvidia.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable NVIDIA GPU support"; + }; + }; + + config = lib.mkIf config.nvidia.enable { + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + + services.xserver.videoDrivers = [ "nvidia" ]; + + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = false; + powerManagement.finegrained = false; + + open = false; + + nvidiaSettings = true; + + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; + }; +} diff --git a/nixosModules/virtualization/default.nix b/nixosModules/virtualization/default.nix new file mode 100644 index 0000000..cbc456b --- /dev/null +++ b/nixosModules/virtualization/default.nix @@ -0,0 +1,7 @@ +{ lib, ... }: { + imports = [ + ./docker.nix + ./virtualbox.nix + ./teamviewer.nix + ]; +} diff --git a/nixosModules/virtualization/docker.nix b/nixosModules/virtualization/docker.nix new file mode 100644 index 0000000..a7d8bca --- /dev/null +++ b/nixosModules/virtualization/docker.nix @@ -0,0 +1,20 @@ +{ pkgs, lib, config, ... }: { + options = { + docker.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable Docker support"; + }; + }; + + config = lib.mkIf config.docker.enable { + virtualisation.docker = { + enable = true; + rootless = { + enable = true; + setSocketVariable = true; + }; + }; + }; +} + diff --git a/nixosModules/virtualization/teamviewer.nix b/nixosModules/virtualization/teamviewer.nix new file mode 100644 index 0000000..b4543ec --- /dev/null +++ b/nixosModules/virtualization/teamviewer.nix @@ -0,0 +1,17 @@ +{ pkgs, lib, config, ... }: { + options = { + teamviewer.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable TeamViewer"; + }; + }; + + config = lib.mkIf config.teamviewer.enable { + environment.systemPackages = with pkgs; [ + teamviewer + ]; + + services.teamviewer.enable = true; + }; +} diff --git a/nixosModules/virtualization/virtualbox.nix b/nixosModules/virtualization/virtualbox.nix new file mode 100644 index 0000000..1e93141 --- /dev/null +++ b/nixosModules/virtualization/virtualbox.nix @@ -0,0 +1,16 @@ +{ pkgs, lib, config, ... }: { + options = { + virtualbox.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable VirtualBox support"; + }; + }; + + config = lib.mkIf config.virtualbox.enable { + virtualisation.virtualbox.host = { + enable = true; + enableExtensionPack = true; + }; + }; +} diff --git a/secrets/crypt/secrets.json b/secrets/crypt/secrets.json new file mode 100644 index 0000000..736624e Binary files /dev/null and b/secrets/crypt/secrets.json differ diff --git a/secrets/sops/secrets.yaml b/secrets/sops/secrets.yaml new file mode 100644 index 0000000..16b661d --- /dev/null +++ b/secrets/sops/secrets.yaml @@ -0,0 +1,21 @@ +github-auth: ENC[AES256_GCM,data:CByqbu86Ar4uXygIHDzrDGLuo0sJmvprBt/a6/SHef7u15BzcKvopw==,iv:Iphc6h/3nR+6jbiTPO/birEhITmNu+jRNTooMS/QtNk=,tag:MV0mu4bhnOgnU23GSsAq1A==,type:str] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1mt673rdh9g4ylt4se20vnv2mf7qul0ax9mwlhy5x97h4pxyypaascdyccn + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBLZi9qenpscnk0UG1BSXYv + OGFUVTFPUHFWTGZCVjFCSXpIaEZrM1VWV0FZCmNqNWNiQ1BKV3JianA4UlQzcVJT + NGkxUVErbWlZWDY3NVBUa25FM1JPWXMKLS0tIGdISXNMNmpzend4Q2M5eDRUQTdw + TEdTSVphN1daeE9ybS9vL09taWRlQTgK0GUHS4SYdBdJyBccZ8mENRQSU54wtXrG + UJN3hWPBIl207VcBUc7wb02Oiac+gQzB/TAgDr3uQ4PANBkuE7xvUg== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2024-08-11T21:27:34Z" + mac: ENC[AES256_GCM,data:ZNTEVFNuFMDg1a201meTQWo2EYRNHCLNo9XgHzDRoDtonYgjHL5MstFDvxiGUWxwRopGkeKOipzIBT3bEPe7KDV3HkiKfkxr0SYGEQg9NIfPsVGAQnfGpXqSkNTxVZVTx2sKX9tgg1peGJbU2YcZLluxn1UXP1yyBxJmd+rz/4k=,iv:09yNwU/AOkRfp5SRL22Rq3YbXfoqh4mHYIr6Yv9tQxA=,tag:UZE/xJ1CLTsDPObhfbaVJw==,type:str] + pgp: [] + unencrypted_suffix: _unencrypted + version: 3.9.0