commit 46ebfc5cb60abc8fe5b8da45b961103634edd5c5 Author: blacknull Date: Wed Oct 2 00:54:05 2024 -0500 Initial Commit diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..cf6b2ae --- /dev/null +++ b/flake.lock @@ -0,0 +1,1195 @@ +{ + "nodes": { + "ags": { + "inputs": { + "ags": "ags_2" + }, + "locked": { + "lastModified": 1, + "narHash": "sha256-9Y4cvbAzeBwYc+5mFkT2CyENx8fNrBK3/ufajA252GE=", + "path": "/nix/store/jggsvcg33zbw57b96nhkfzzczapj8rjc-source/ags", + "type": "path" + }, + "original": { + "path": "/nix/store/jggsvcg33zbw57b96nhkfzzczapj8rjc-source/ags", + "type": "path" + } + }, + "ags_2": { + "inputs": { + "nixpkgs": "nixpkgs_5", + "systems": "systems_3" + }, + "locked": { + "lastModified": 1727303518, + "narHash": "sha256-lO5JMynTxNZxg/+E4/Y9reeLGIz/M8cEue+Re4cP6qo=", + "owner": "Aylur", + "repo": "ags", + "rev": "cd543afec4d9ed708990e5ba52184716809bf248", + "type": "github" + }, + "original": { + "owner": "Aylur", + "repo": "ags", + "type": "github" + } + }, + "aquamarine": { + "inputs": { + "hyprutils": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "nixpkgs" + ], + "systems": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1727261104, + "narHash": "sha256-rxDI7WrxIRV9it9mDCHcLa7xQykf1JloXnoXr5xQ8zI=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "b82fdaff917582a9d568969e15e61b398c71e990", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, + "bat": { + "locked": { + "lastModified": 1, + "narHash": "sha256-FJjoGC78eG2j8FTz8sELu6Cujzec4OumAZqhHoTyRcw=", + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/bat", + "type": "path" + }, + "original": { + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/bat", + "type": "path" + } + }, + "digital": { + "flake": false, + "locked": { + "lastModified": 1725393562, + "narHash": "sha256-xukWBh9LuxlfHcmlScEY49j/M+rhJoEaoWPXT4bWfSM=", + "type": "tarball", + "url": "https://github.com/hneemann/Digital/releases/latest/download/Digital.zip" + }, + "original": { + "type": "tarball", + "url": "https://github.com/hneemann/Digital/releases/latest/download/Digital.zip" + } + }, + "external": { + "inputs": { + "digital": "digital", + "lobster": "lobster", + "nixpkgs": "nixpkgs_2", + "swww": "swww", + "waveforms": "waveforms" + }, + "locked": { + "lastModified": 1, + "narHash": "sha256-ZS+Lcib5PQIR1vRfD623acFXQVcCCxIbHhqK4ao13UM=", + "path": "/nix/store/h54m30p9pl840r8j2q4776cvazmlgjya-source/external", + "type": "path" + }, + "original": { + "path": "/nix/store/h54m30p9pl840r8j2q4776cvazmlgjya-source/external", + "type": "path" + } + }, + "eza": { + "locked": { + "lastModified": 1, + "narHash": "sha256-k5AmFL4QVNTziCDiw5UBRMQn1JYpCsawHCtn95t9rYw=", + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/eza", + "type": "path" + }, + "original": { + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/eza", + "type": "path" + } + }, + "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" + } + }, + "fzf": { + "locked": { + "lastModified": 1, + "narHash": "sha256-GbjneK0hMLwVcIwri+7tIHPP6dI4IgQW2YsGxlbyPmc=", + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/fzf", + "type": "path" + }, + "original": { + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/fzf", + "type": "path" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726989464, + "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.05", + "repo": "home-manager", + "type": "github" + } + }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "nixpkgs" + ], + "systems": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1727532803, + "narHash": "sha256-ZaZ7h7PY8mQc4vtGmVqWLAq9CAO02gHMyNR5yY8zDmM=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "b98726e431d4d3ed58bd58bee1047cdb81cec69f", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "hyprland": "hyprland_2" + }, + "locked": { + "lastModified": 1, + "narHash": "sha256-9p5nag8Hg/2raOQbNetLYanO4Tl1pnkg5X+odgjC8ms=", + "path": "/nix/store/jggsvcg33zbw57b96nhkfzzczapj8rjc-source/hyprland", + "type": "path" + }, + "original": { + "path": "/nix/store/jggsvcg33zbw57b96nhkfzzczapj8rjc-source/hyprland", + "type": "path" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "nixpkgs" + ], + "systems": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1727451107, + "narHash": "sha256-qV9savtHwmZUa0eJE294WYJjKPGB2+bJhwByFShsVyo=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "6b3261ee13a6d2b99de79a31d352f6996e35bde3", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprland-protocols_2": { + "inputs": { + "nixpkgs": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "xdph", + "nixpkgs" + ], + "systems": [ + "nathan", + "prgms", + "hyprland", + "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_2": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprland-protocols": "hyprland-protocols", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner", + "nixpkgs": "nixpkgs_6", + "systems": "systems_4", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1727714556, + "narHash": "sha256-l4cPDA3xGtGdQmdSCAO2VyWg9xwW6//KwDYefdWtovQ=", + "ref": "refs/heads/main", + "rev": "5c6c300abfea2539ffad9bcbf857325eec5ab765", + "revCount": 5285, + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + }, + "original": { + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "nixpkgs" + ], + "systems": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1725997860, + "narHash": "sha256-d/rZ/fHR5l1n7PeyLw0StWMNLXVU9c4HFyfskw568so=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "dfeb5811dd6485490cce18d6cc1e38a055eea876", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "nixpkgs" + ], + "systems": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1727300645, + "narHash": "sha256-OvAtVLaSRPnbXzOwlR1fVqCXR7i+ICRX3aPMCdIiv+c=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "3f5293432b6dc6a99f26aca2eba3876d2660665c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "nixpkgs" + ], + "systems": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1726874836, + "narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "500c81a9e1a76760371049a8d99e008ea77aa59e", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "kitty": { + "locked": { + "lastModified": 1, + "narHash": "sha256-GzevfSGVuMyFSa9mgoxCUGDNY7hzocMkXS+BIEC/1iw=", + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/kitty", + "type": "path" + }, + "original": { + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/kitty", + "type": "path" + } + }, + "lobster": { + "inputs": { + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1726728133, + "narHash": "sha256-6UNJxOcFKZCE20yVdeXi3hhsNdo82o0WdI52bjw/Zx0=", + "owner": "justchokingaround", + "repo": "lobster", + "rev": "3cfac574621d0ffc3c44df053fb8df94b4c2480a", + "type": "github" + }, + "original": { + "owner": "justchokingaround", + "repo": "lobster", + "type": "github" + } + }, + "mpdris": { + "locked": { + "lastModified": 1, + "narHash": "sha256-4C3KHzyA6BldYX6U4etlZkvRx9nek6N6rWYadTjtZmI=", + "path": "/nix/store/ywqcaandc3byjb7f3vqfx8z381b4l1yq-source/mpdris", + "type": "path" + }, + "original": { + "path": "/nix/store/ywqcaandc3byjb7f3vqfx8z381b4l1yq-source/mpdris", + "type": "path" + } + }, + "nathan": { + "inputs": { + "packages": "packages", + "prgms": "prgms", + "srvcs": "srvcs" + }, + "locked": { + "lastModified": 1726368658, + "narHash": "sha256-1oDfel7+ZVhXNWI9buSBEHCJwD7YiRqbt9pWbFEybbE=", + "path": "/home/nathan/.nixos/home", + "type": "path" + }, + "original": { + "path": "/home/nathan/.nixos/home", + "type": "path" + } + }, + "neovim": { + "locked": { + "lastModified": 1, + "narHash": "sha256-tvSCDDUIW6BkzWSel1NV1dEKNplJHNBvMTkpWNSAO6I=", + "path": "/nix/store/jggsvcg33zbw57b96nhkfzzczapj8rjc-source/neovim", + "type": "path" + }, + "original": { + "path": "/nix/store/jggsvcg33zbw57b96nhkfzzczapj8rjc-source/neovim", + "type": "path" + } + }, + "neovim_2": { + "locked": { + "lastModified": 1727100707, + "narHash": "sha256-tvSCDDUIW6BkzWSel1NV1dEKNplJHNBvMTkpWNSAO6I=", + "path": "/home/nathan/.nixos/programs/neovim", + "type": "path" + }, + "original": { + "path": "/home/nathan/.nixos/programs/neovim", + "type": "path" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1703961334, + "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-old": { + "locked": { + "lastModified": 1720535198, + "narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-us": { + "locked": { + "lastModified": 1727634051, + "narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-us_2": { + "locked": { + "lastModified": 1727634051, + "narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1727264057, + "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1724819573, + "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 0, + "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "path": "/nix/store/mvz96grv31nxq69ldw5a5pn2qh1s6ca6-source", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1725634671, + "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1727348695, + "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1727672256, + "narHash": "sha256-9/79hjQc9+xyH+QxeMcRsA6hDyw6Z9Eo1/oxjvwirLk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1719f27dd95fd4206afb9cec9f415b539978827e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1727672256, + "narHash": "sha256-9/79hjQc9+xyH+QxeMcRsA6hDyw6Z9Eo1/oxjvwirLk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1719f27dd95fd4206afb9cec9f415b539978827e", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_9": { + "locked": { + "lastModified": 1726838390, + "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "ollama": { + "locked": { + "lastModified": 1, + "narHash": "sha256-K9Jzz59VYosk9X4m050yw7oWgJD7XU//3QJ8zbA6sIA=", + "path": "/nix/store/ywqcaandc3byjb7f3vqfx8z381b4l1yq-source/ollama", + "type": "path" + }, + "original": { + "path": "/nix/store/ywqcaandc3byjb7f3vqfx8z381b4l1yq-source/ollama", + "type": "path" + } + }, + "packages": { + "inputs": { + "external": "external", + "nixpkgs-old": "nixpkgs-old", + "nixpkgs-us": "nixpkgs-us", + "scripts": "scripts" + }, + "locked": { + "lastModified": 1727455424, + "narHash": "sha256-y5w5OW+yHFfVNoEW8BE/e4yBeHsTeKmV5SR527kC42M=", + "path": "/home/nathan/.nixos/packages", + "type": "path" + }, + "original": { + "path": "/home/nathan/.nixos/packages", + "type": "path" + } + }, + "prgms": { + "inputs": { + "ags": "ags", + "hyprland": "hyprland", + "neovim": "neovim", + "pywal": "pywal", + "rofi": "rofi", + "terminal": "terminal" + }, + "locked": { + "lastModified": 1727713105, + "narHash": "sha256-xt5FToWj2H7zYO+41GewPZu6QVP4Jg7Mtm/9K3oWqWs=", + "path": "/home/nathan/.nixos/programs", + "type": "path" + }, + "original": { + "path": "/home/nathan/.nixos/programs", + "type": "path" + } + }, + "pywal": { + "inputs": { + "nixpkgs-us": "nixpkgs-us_2", + "spicetify-ext": "spicetify-ext", + "spicetify-nix": "spicetify-nix", + "themecord": "themecord" + }, + "locked": { + "lastModified": 1, + "narHash": "sha256-EVhBDAt1miiP7BA3SooJNTCm0pESsl4VlRYCDSMutFY=", + "path": "/nix/store/jggsvcg33zbw57b96nhkfzzczapj8rjc-source/pywal", + "type": "path" + }, + "original": { + "path": "/nix/store/jggsvcg33zbw57b96nhkfzzczapj8rjc-source/pywal", + "type": "path" + } + }, + "repo": { + "flake": false, + "locked": { + "lastModified": 1686823900, + "narHash": "sha256-JRVVzyefqR2L3UrEK2iWyhUKfPMUNUnfRZmwdz05wL0=", + "owner": "siddrs", + "repo": "tokyo-night-sddm", + "rev": "320c8e74ade1e94f640708eee0b9a75a395697c6", + "type": "github" + }, + "original": { + "owner": "siddrs", + "repo": "tokyo-night-sddm", + "type": "github" + } + }, + "rofi": { + "locked": { + "lastModified": 1, + "narHash": "sha256-W1pO/5h94bemSfBkgwMcjnRJAySAtzd5RMTWKcmLkOI=", + "path": "/nix/store/jggsvcg33zbw57b96nhkfzzczapj8rjc-source/rofi", + "type": "path" + }, + "original": { + "path": "/nix/store/jggsvcg33zbw57b96nhkfzzczapj8rjc-source/rofi", + "type": "path" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nathan": "nathan", + "nixpkgs": "nixpkgs_9", + "root": "root_2", + "system": "system" + } + }, + "root_2": { + "inputs": { + "neovim": "neovim_2" + }, + "locked": { + "lastModified": 1725258514, + "narHash": "sha256-IyRMcCMadJXbvVDMLdza+gslf32Kf4EvrIZZTJnvDHE=", + "path": "/root/.nixos", + "type": "path" + }, + "original": { + "path": "/root/.nixos", + "type": "path" + } + }, + "scripts": { + "locked": { + "lastModified": 1, + "narHash": "sha256-C+dqz099tu2TqlOuCSCbvqBYXF30sxYp2MZ+YSworoM=", + "path": "/nix/store/h54m30p9pl840r8j2q4776cvazmlgjya-source/scripts", + "type": "path" + }, + "original": { + "path": "/nix/store/h54m30p9pl840r8j2q4776cvazmlgjya-source/scripts", + "type": "path" + } + }, + "sddm": { + "inputs": { + "theme": "theme" + }, + "locked": { + "lastModified": 1, + "narHash": "sha256-rcISoV4jVrutfC5Z7VPSZeFrr20TqcLV+GAnn/EEhYc=", + "path": "/nix/store/ndjnf771yn2w0vvl2mxr8h9k6qgr9b2l-source/sddm", + "type": "path" + }, + "original": { + "path": "/nix/store/ndjnf771yn2w0vvl2mxr8h9k6qgr9b2l-source/sddm", + "type": "path" + } + }, + "spicetify-ext": { + "flake": false, + "locked": { + "lastModified": 1725656114, + "narHash": "sha256-gra4N7JA6vuqCQg1zrulwxiM4nCSZ9m+fFouHdqI7Yk=", + "owner": "rxri", + "repo": "spicetify-extensions", + "rev": "66ec39bf454d9860154dedb2aee4ddc593144536", + "type": "github" + }, + "original": { + "owner": "rxri", + "repo": "spicetify-extensions", + "type": "github" + } + }, + "spicetify-nix": { + "inputs": { + "flake-compat": "flake-compat_2", + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1727756255, + "narHash": "sha256-C+Gmw5CsUXel9T/UYA+QEJPjF8m+2clv3uiKEVCSkNs=", + "owner": "Gerg-L", + "repo": "spicetify-nix", + "rev": "f190dd954b30e6830939fb764cac85c773846435", + "type": "github" + }, + "original": { + "owner": "Gerg-L", + "repo": "spicetify-nix", + "type": "github" + } + }, + "srvcs": { + "inputs": { + "mpdris": "mpdris", + "ollama": "ollama" + }, + "locked": { + "lastModified": 1727026230, + "narHash": "sha256-D1VemlF6VQcRjjTTRfL8BG1tTIa4HZxjcPMVxsFMmXI=", + "path": "/home/nathan/.nixos/services", + "type": "path" + }, + "original": { + "path": "/home/nathan/.nixos/services", + "type": "path" + } + }, + "swww": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs_3", + "utils": "utils" + }, + "locked": { + "lastModified": 1726747651, + "narHash": "sha256-Yg7c0XUgn82aNftvzSXTKMtZT1gdskun710aO5Dnd9M=", + "owner": "LGFae", + "repo": "swww", + "rev": "ddb0d5dbc83960d0c834d2a4dcb7f541474cb854", + "type": "github" + }, + "original": { + "owner": "LGFae", + "repo": "swww", + "type": "github" + } + }, + "system": { + "inputs": { + "sddm": "sddm" + }, + "locked": { + "lastModified": 1727822045, + "narHash": "sha256-ptknVfORoDZ3PJZrFqftg6PXI5BgshQdAsuKZQXOJVo=", + "path": "/home/nathan/.nixos/system", + "type": "path" + }, + "original": { + "path": "/home/nathan/.nixos/system", + "type": "path" + } + }, + "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" + } + }, + "terminal": { + "inputs": { + "bat": "bat", + "eza": "eza", + "fzf": "fzf", + "kitty": "kitty", + "tmux": "tmux", + "zoxide": "zoxide", + "zsh": "zsh" + }, + "locked": { + "lastModified": 1, + "narHash": "sha256-/6PqjAXsf3oJokNYPJJpE7izbi8E5y1Vmu7GJewdep0=", + "path": "/nix/store/jggsvcg33zbw57b96nhkfzzczapj8rjc-source/terminal", + "type": "path" + }, + "original": { + "path": "/nix/store/jggsvcg33zbw57b96nhkfzzczapj8rjc-source/terminal", + "type": "path" + } + }, + "theme": { + "inputs": { + "repo": "repo" + }, + "locked": { + "lastModified": 1, + "narHash": "sha256-4qcgTKJv2uerh2pzxBzFRaYh12KBI1ZlMhMtkl/MI90=", + "path": "/nix/store/0bhz93i8w5ssvw5i84h7kh03f63djyw0-source/themes/tokyo-night", + "type": "path" + }, + "original": { + "path": "/nix/store/0bhz93i8w5ssvw5i84h7kh03f63djyw0-source/themes/tokyo-night", + "type": "path" + } + }, + "themecord": { + "inputs": { + "nixpkgs": "nixpkgs_8" + }, + "locked": { + "lastModified": 1723741990, + "narHash": "sha256-miZF6mUk2C04L6NXv7pZBsNOcTpooBbZdmyTlQV00yE=", + "owner": "danihek", + "repo": "themecord", + "rev": "8d9791d6f97492ae88d248a29bff5c126016f2ae", + "type": "github" + }, + "original": { + "owner": "danihek", + "repo": "themecord", + "type": "github" + } + }, + "tmux": { + "locked": { + "lastModified": 1, + "narHash": "sha256-vkwha2aJoI69KMpfc6msyrBqJ1oy+Rhsq+Cja2A7Fzw=", + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/tmux", + "type": "path" + }, + "original": { + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/tmux", + "type": "path" + } + }, + "utils": { + "inputs": { + "systems": "systems_2" + }, + "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" + } + }, + "waveforms": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1726518634, + "narHash": "sha256-VsEAoGNO21d6irv6TyFd/m75o/+XoHz9ggRp4Nx583Y=", + "owner": "liff", + "repo": "waveforms-flake", + "rev": "eeb5438261394f3d0e35b7e20b511d6b865400c8", + "type": "github" + }, + "original": { + "owner": "liff", + "repo": "waveforms-flake", + "type": "github" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": "hyprland-protocols_2", + "hyprlang": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "nixpkgs" + ], + "systems": [ + "nathan", + "prgms", + "hyprland", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1727524473, + "narHash": "sha256-1DGktDtSWIJpnDbVoj/qpvJSH5zg6JbOfuh6xqZMap0=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "7e500e679ede40e79cf2d89b5f5fa3e34923bd26", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + }, + "zoxide": { + "locked": { + "lastModified": 1, + "narHash": "sha256-eBI7Be8dZ4zYMy+swgH83pTBFblMwUiK1Xc5PoyvwGE=", + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/zoxide", + "type": "path" + }, + "original": { + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/zoxide", + "type": "path" + } + }, + "zsh": { + "locked": { + "lastModified": 1, + "narHash": "sha256-kPuFq2R3i94eNuEp9Slq2H+/DEHWdL/SNrcnGP4mKxs=", + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/zsh", + "type": "path" + }, + "original": { + "path": "/nix/store/1v7nq1bra107kjia3g9qkccc773h638a-source/zsh", + "type": "path" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e31a55d --- /dev/null +++ b/flake.nix @@ -0,0 +1,51 @@ +{ + description = "Build Entire System"; + + inputs = { + + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + + home-manager.url = "github:nix-community/home-manager/release-24.05"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + nathan.url = "path:/home/nathan/.nixos/home"; + + root.url = "path:/root/.nixos"; + + system.url = "path:/home/nathan/.nixos/system"; + + }; + + outputs = { self, nixpkgs, ... }@inputs: + let + system = "x86_64-linux"; + in { + inputs.home-manager.useGlobalPkgs = true; + + nixosConfigurations.laptop = nixpkgs.lib.nixosSystem { + + inherit system; + specialArgs = { inherit inputs; }; + + modules = [ + inputs.system.nixosModule + inputs.nathan.nixosModule + inputs.home-manager.nixosModules.home-manager + ]; + + }; + + homeConfigurations."nathan" = inputs.home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + extraSpecialArgs = { inherit inputs; }; + + modules = [ inputs.nathan.homeManagerModule ]; + }; + + }; + + +} diff --git a/home/flake.nix b/home/flake.nix new file mode 100644 index 0000000..bcef90a --- /dev/null +++ b/home/flake.nix @@ -0,0 +1,61 @@ +{ + description = "Nathan user settings"; + + inputs = { + + prgms.url = "/home/nathan/.nixos/programs"; + + srvcs.url = "/home/nathan/.nixos/services"; + + packages.url = "/home/nathan/.nixos/packages"; + }; + + outputs = { self, ... }@inputs: { + + nixosModule = { config, lib, pkgs, ... }: { + imports = [ + inputs.prgms.module + inputs.srvcs.module + inputs.packages.module + ]; + }; + + homeManagerModule = { config, lib, pkgs, ... }: { + + imports = [ + inputs.prgms.hmModule + inputs.srvcs.hmModule + inputs.packages.hmModule + ]; + + home.stateVersion = "23.11"; + + home.username = "nathan"; + + home.homeDirectory = "/home/nathan"; + + + home.pointerCursor = { + gtk.enable = true; + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 16; + }; + + gtk = { + enable = true; + theme.name = "Tokyonight-Dark-B"; + theme.package = pkgs.tokyonight-gtk-theme; + iconTheme.name = "Tokyonight-Dark"; + }; + + services.mpris-proxy.enable = true; + + programs.ssh.enable = true; + + programs.home-manager.enable = true; + + }; + + }; +} diff --git a/packages/external/flake.lock b/packages/external/flake.lock new file mode 100644 index 0000000..3dec8e8 --- /dev/null +++ b/packages/external/flake.lock @@ -0,0 +1,209 @@ +{ + "nodes": { + "digital": { + "flake": false, + "locked": { + "lastModified": 1725393562, + "narHash": "sha256-xukWBh9LuxlfHcmlScEY49j/M+rhJoEaoWPXT4bWfSM=", + "type": "tarball", + "url": "https://github.com/hneemann/Digital/releases/latest/download/Digital.zip" + }, + "original": { + "type": "tarball", + "url": "https://github.com/hneemann/Digital/releases/latest/download/Digital.zip" + } + }, + "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" + } + }, + "lobster": { + "inputs": { + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1726728133, + "narHash": "sha256-6UNJxOcFKZCE20yVdeXi3hhsNdo82o0WdI52bjw/Zx0=", + "owner": "justchokingaround", + "repo": "lobster", + "rev": "3cfac574621d0ffc3c44df053fb8df94b4c2480a", + "type": "github" + }, + "original": { + "owner": "justchokingaround", + "repo": "lobster", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1703961334, + "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1727264057, + "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1724819573, + "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 0, + "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "path": "/nix/store/mvz96grv31nxq69ldw5a5pn2qh1s6ca6-source", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "digital": "digital", + "lobster": "lobster", + "nixpkgs": "nixpkgs_2", + "swww": "swww", + "waveforms": "waveforms" + } + }, + "swww": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs_3", + "utils": "utils" + }, + "locked": { + "lastModified": 1726747651, + "narHash": "sha256-Yg7c0XUgn82aNftvzSXTKMtZT1gdskun710aO5Dnd9M=", + "owner": "LGFae", + "repo": "swww", + "rev": "ddb0d5dbc83960d0c834d2a4dcb7f541474cb854", + "type": "github" + }, + "original": { + "owner": "LGFae", + "repo": "swww", + "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" + } + }, + "utils": { + "inputs": { + "systems": "systems_2" + }, + "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" + } + }, + "waveforms": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1726518634, + "narHash": "sha256-VsEAoGNO21d6irv6TyFd/m75o/+XoHz9ggRp4Nx583Y=", + "owner": "liff", + "repo": "waveforms-flake", + "rev": "eeb5438261394f3d0e35b7e20b511d6b865400c8", + "type": "github" + }, + "original": { + "owner": "liff", + "repo": "waveforms-flake", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/packages/external/flake.nix b/packages/external/flake.nix new file mode 100644 index 0000000..b94f0fb --- /dev/null +++ b/packages/external/flake.nix @@ -0,0 +1,62 @@ +{ + description = "External Flakes"; + + inputs = { + + lobster.url = "github:justchokingaround/lobster"; + + swww.url = "github:LGFae/swww"; + + waveforms.url = "github:liff/waveforms-flake"; + + digital = { + url = "https://github.com/hneemann/Digital/releases/latest/download/Digital.zip"; + flake = false; + }; + + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + }; + + outputs = { self, ... }@inputs: let + system = "x86_64-linux"; + _pkgs = import inputs.nixpkgs { inherit system; }; + in rec { + + packages.${system}.digital = _pkgs.stdenv.mkDerivation { + + name = "digital"; + + src = inputs.digital; + + buildPhase = '' + + ''; + + installPhase = '' + mkdir -p $out/bin + echo "${_pkgs.zulu}/bin/java -jar $src/Digital.jar" > $out/bin/$name + chmod +x $out/bin/digital + ''; + + }; + + module = { config, lib, pkgs, ... }: { + + imports = [ + inputs.waveforms.nixosModule + ]; + + }; + + hmModule = { config, lib, pkgs, ... }: { + + home.packages = [ + + inputs.lobster.packages.${pkgs.system}.lobster + inputs.swww.packages.${pkgs.system}.swww + packages.${pkgs.system}.digital + ]; + + }; + }; +} diff --git a/packages/external/result b/packages/external/result new file mode 120000 index 0000000..c2d2b8c --- /dev/null +++ b/packages/external/result @@ -0,0 +1 @@ +/nix/store/b7f8lzhzksy3rhhzma1r5iascqahhzzz-digital \ No newline at end of file diff --git a/packages/flake.nix b/packages/flake.nix new file mode 100644 index 0000000..43143b2 --- /dev/null +++ b/packages/flake.nix @@ -0,0 +1,122 @@ +{ + description = "Nathan user packages"; + + inputs = { + nixpkgs-old.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs-us.url = "github:nixos/nixpkgs/nixos-unstable"; + + scripts.url = "./scripts"; + + external.url = "./external"; + + }; + + outputs = { self, ... }@inputs: let + system = "x86_64-linux"; + + pkgs-old = import inputs.nixpkgs-old { + inherit system; + config.allowUnfree = true; + }; + + pkgs-us = import inputs.nixpkgs-us { + inherit system; + config.allowUnfree = true; + }; + + in { + + module = { config, lib, pkgs, ... }: { + imports = [ + inputs.external.module + ]; + }; + + hmModule = { config, lib, pkgs, ... }: { + + imports = [ + inputs.scripts.hmModule + inputs.external.hmModule + ]; + + nixpkgs.config.allowUnfree = true; + + home.packages = with pkgs; let + pypkgs = ps: with ps; [ + numpy + pandas + torch + torchvision + torchaudio + transformers + datasets + pyaudio + faster-whisper + pyusb + ]; + + in [ + + cava + gcc + android-tools + + (pkgs.python311.withPackages pypkgs) + + brightnessctl + libdbusmenu-gtk3 + zulu + lmms + killall + youtube-music + #unfree { + geogebra + #} + blueberry + wl-clipboard + firefox-wayland + swaylock-effects + + neofetch + pkgs-us.mpv + (ncmpcpp.override { visualizerSupport = true; clockSupport = true; }) + playerctl + mpc-cli + xfce.thunar + vlc + zip + unzip + pavucontrol + yewtube + ytmdl + ffmpeg_5 + lxqt.lxqt-policykit + rpi-imager + rsync + grim + slurp + tigervnc + keepassxc + httplz + + #school? + #pkgs-us.digital + + #3D modeling/printing + kicad + blender + freecad + cura + + #productivity + libreoffice + super-productivity + + #games + prismlauncher + ]; + + }; + + }; +} diff --git a/packages/scripts/flake.nix b/packages/scripts/flake.nix new file mode 100644 index 0000000..ad8d187 --- /dev/null +++ b/packages/scripts/flake.nix @@ -0,0 +1,110 @@ +{ + description = "Nathan user scripts"; + + inputs = { + }; + + outputs = { self, ... }: { + + module = { config, lib, pkgs, ... }: {}; + + hmModule = { config, lib, pkgs, ... }: { + + home.packages = [ + + #scripts + (pkgs.writeShellScriptBin "_systemRebuild" '' + sudo nix flake lock /home/nathan/.nixos --update-input nathan --update-input root --update-input system + ${pkgs.nh}/bin/nh os switch --ask /home/nathan/.nixos + echo //////Enter to close////// + read + '') + (pkgs.writeShellScriptBin "_homeRebuild" '' + sudo nix flake lock /home/nathan/.nixos --update-input nathan --update-input root + ${pkgs.nh}/bin/nh home switch --ask /home/nathan/.nixos + echo //////Enter to close////// + read + '') + (pkgs.writeShellScriptBin "addCoverArtMP3" '' + if [[ $# != 2 ]] + then echo "usage: addCoverArtMP3 song.mp3 image.jpg" + exit + fi + mv $1 copyof$1 + ffmpeg -i copyof$1 -i $2 -map_metadata 0 -map 0 -map 1 -acodec copy $1 + '') + + (pkgs.writeShellScriptBin "randWallpaper" '' + file=$(ls /home/nathan/Pictures/Wallpaper/ | shuf -n 1) + setWallpaper /home/nathan/Pictures/Wallpaper/$file + '') + + (pkgs.writeShellScriptBin "setWallpaper" '' + + img=''$(realpath ''${1:-~/.cache/bg}) + + if [[ ''${1:-~/.cache/bg} != ~/.cache/bg ]]; then + swww img $img --transition-step 10 --transition-fps 30 --transition-type center && changeColors $img $2 + else + changeColors $img $2 + fi + '') + + (pkgs.writeShellScriptBin "changeColors" '' + + if [[ $(ls ~/.cache/ | grep bga) != bga ]]; then + echo 100 > ~/.cache/bga + fi + + alpha=''${2:-`cat ~/.cache/bga`} + + img=''$(realpath ''${1:-~/.cache/bg}) + + if [[ $alpha -lt 0 ]]; then + $alpha=0 + fi + + if [[ $alpha -gt 100 ]]; then + $alpha=100 + fi + + wal -i $img -a $alpha --cols16 -n + + echo $alpha > ~/.cache/bga + + rm ~/.cache/bg + ln -s $img ~/.cache/bg + + sleep 0.4 + + pywalfox update & + + themecord > ~/.cache/_.txt && rm ~/.cache/_.txt + + [[ $(pidof cava) != "" ]] && pkill -USR1 cava & + + for i in $(ls /run/user/1000 | grep nvim); do nvr -s --servername /run/user/1000/$i --remote-send 'colorscheme pywal'; done + + pkill -USR1 kitty + '') + + (pkgs.writeShellScriptBin "onSystemStart" '' + ags & + swww-daemon & + pypr & + setWallpaper & + lxqt-policykit-agent & + nmcli device wifi connect EagleNet password '~?C#@ZiH' & + hyprctl setcursor Bibata-Modern-Classic 16 & + '') + + (pkgs.writeShellScriptBin "colorPrefix" '' + exec -a "$0" "$@" & + sleep 0.4 && changeColors & + '') + + ]; + }; + + }; +} diff --git a/programs/ags/flake.nix b/programs/ags/flake.nix new file mode 100644 index 0000000..caf68a7 --- /dev/null +++ b/programs/ags/flake.nix @@ -0,0 +1,54 @@ +{ + description = "ags config"; + + inputs = { + + ags.url = "github:Aylur/ags"; + + }; + + outputs = { self, ... }@inputs: { + + module = { config, lib, pkgs, ... }: { + services = { + upower.enable = true; + gvfs.enable = true; + power-profiles-daemon.enable = true; + }; + }; + + hmModule = { config, lib, pkgs, ... }: { + + imports = [ inputs.ags.homeManagerModules.default ]; + + programs.ags = { + enable = true; + + extraPackages = with pkgs; [ + gtksourceview + webkitgtk + accountsservice + ]; + }; + + home.file.".config/ags/launcher.js".text = '' + function Launcher() { + return Widget.EventBox({ + class_name: "launcher", + hpack: "center", + child: Widget.Icon({ + icon: '${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake.png', + css: 'font-size: 24px;' + }), + on_primary_click: () => {Utils.execAsync('rofi -show drun')}, + margin_left: 10, + }) + } + + export default Launcher + ''; + + }; + + }; +} diff --git a/programs/calcurse/default.nix b/programs/calcurse/default.nix new file mode 100644 index 0000000..6aabb2f --- /dev/null +++ b/programs/calcurse/default.nix @@ -0,0 +1,7 @@ +{ config, lib, pkgs, ... }: { + + home.packages = with pkgs; [ + calcurse + libnotify + ]; +} diff --git a/programs/flake.nix b/programs/flake.nix new file mode 100644 index 0000000..d6cb0b2 --- /dev/null +++ b/programs/flake.nix @@ -0,0 +1,44 @@ +{ + description = "Nathan user program config"; + + inputs = { + + ags.url = "./ags"; + + neovim.url = "./neovim"; + + terminal.url = "./terminal"; #home manager only + + rofi.url = "./rofi"; + + pywal.url = "./pywal"; + + hyprland.url = "./hyprland"; + }; + + outputs = { self, ... }@inputs: { + + module = { config, lib, pkgs, ... }: { + + imports = [ + inputs.hyprland.module + inputs.ags.module + ]; + }; + + hmModule = { config, lib, pkgs, ... }: { + + imports = [ + inputs.ags.hmModule + inputs.neovim.hmModule + inputs.hyprland.hmModule + inputs.terminal.hmModule + inputs.rofi.hmModule + inputs.pywal.hmModule + ./calcurse + ]; + + }; + + }; +} diff --git a/programs/hyprland/flake.nix b/programs/hyprland/flake.nix new file mode 100644 index 0000000..bb28e29 --- /dev/null +++ b/programs/hyprland/flake.nix @@ -0,0 +1,353 @@ +{ + description = "Hyprland Config"; + + inputs = { + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + }; + + outputs = { self, ... }@inputs: { + + module = { config, lib, pkgs, ... }: { + + programs.hyprland = { + enable = true; + + xwayland.enable = true; + + package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + + portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; + }; + + }; + + hmModule = { config, lib, pkgs, ... }: { + + home.sessionVariables.NIX_OZONE_WL = "1"; + + programs.kitty.enable = lib.mkDefault true; + + home.packages = with pkgs; [ + pyprland + ]; + + home.file.".config/hypr/pyprland.toml".text = '' + [pyprland] + plugins = [ + "scratchpads" + ] + + [scratchpads.nvim] + animation = "fromTop" + command = "kitty --class scratchpad-nvim -e nvim ~" + lazy = false + class = "scratchpad-nvim" + margin = 100 + multi = true + excludes = "*" + + [scratchpads.free] + animation = "fromBottom" + command = "kitty --class scratchpad" + class = "scratchpad" + lazy = false + margin = 100 + multi = true + excludes = "*" + ''; + + wayland.windowManager.hyprland = { + + enable = true; + + systemd.variables = [ "--all" ]; + + extraConfig = '' + +#------------------------------------------------# +# _ _ _ _ # +#| | | | | | | | # +#| |___| |_ _ ____ _ _| | __ _.-.___ ___| | # +#| ___ | | | | _ \| |/ | |/ _` | _ \/ _ | # +#| | | | |_| | |_) | /| | (_| | | | | (_| | # +#|_| |_|\__, | __/|__| |_|\__,_|_| |_|\___/_| # +# |___/|_| # +# # +#------------------------------------------------# + +monitor=eDP-1,1920x1080@300,0x0,1 +#monitor=eDP-1, addreserved, 0, 0, 45, 0 + +exec-once=onSystemStart + +# Some default env vars. +env = XCURSOR_SIZE,16 + +source = ./otf.conf +source = ~/.cache/wal/colors-hypr.conf + +# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = yes + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. +} + +cursor { + no_hardware_cursors = true +} + +general { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + gaps_in = 5 + gaps_out = 4 + border_size = 2 + col.active_border = $color1 $color5 100deg + col.inactive_border = $color0 + + layout = dwindle +} +decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more + + rounding = 2 + + blur { + enabled = false + } + + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + + # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} + + + +dwindle { + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this +} + +master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + new_status = "master" +} + +gestures { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + workspace_swipe = off +} + +misc { + disable_hyprland_logo = false + disable_splash_rendering = true + force_default_wallpaper = 2 +} + +# Binds +$mainMod = ALT + +bind = $mainMod, E, exec, colorPrefix kitty + +bind = $mainMod, B, exec, firefox + +bind = $mainMod SHIFT, B, exec, firefox --private-window + +bind = $mainMod, Q, killactive, + +bind = $mainMod, R, exec, colorPrefix kitty -e _systemRebuild + +bind = $mainMod SHIFT, R, exec, colorPrefix kitty -e _homeRebuild + +bind = $mainMod, C, exec, colorPrefix kitty -e bash -c "cd ~/.nixos; nvim /home/nathan/.nixos/flake.nix" + +bind = $mainMod, F, exec, thunar +bind = $mainMod SHIFT, F, fullscreen + +bind = $mainMod, semicolon, exec, colorPrefix kitty -e nvim ~ + +bind = $mainMod, Insert, exec, libreoffice & + +bind = $mainMod, H, exec, bluetoothctl connect 88:D0:39:F9:83:CE + +bind = $mainMod, V, togglefloating, + +bind = $mainMod SHIFT, V, exec, vlc & + +bind = , Menu, exec, rofi -show drun + +bind = $mainMod, Menu, exec, killall .ags-wrapped; ags & + +bind = $mainMod, P, pseudo, # dwindle + +bind = $mainMod, Z, togglesplit, # dwindle + +bind = $mainMod, M, exec, spotify + +bind = $mainMod SHIFT, M, exec, firefox --new-window soundcloud.com/you/library + +bind = $mainMod CTRL, M, exec, colorPrefix kitty -e ncmpcpp -s browser + +bind = $mainMod, XF86AudioPlay, exec, mpc load casual + +bind = , XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause + +bind = , XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl pause +bind = $mainMod, F9, exec, ${pkgs.playerctl}/bin/playerctl pause + +bind = , XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next + +bind = , XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous + +bind = , XF86Launch2, exec, steam & +bind = $mainMod, XF86Launch2, exec, prismlauncher + +bind = , XF86Calculator, exec, geogebra + +bind = $mainMod SHIFT, Print, exec, firefox --new-window localhost:631 +bind = , Print, exec, grim -g "$(slurp)" + +bind = $mainMod, Return, exec, ${pkgs.vesktop}/bin/vesktop --enable-features=UseOzonePlatform --ozone-platform=wayland & + +bind = $mainMod CTRL, Return, exec, firefox --new-window https://discord.com/app + +# Move focus with mainMod + arrow keys +bind = $mainMod, A, movefocus, l +bind = $mainMod, D, movefocus, r +bind = $mainMod, W, movefocus, u +bind = $mainMod, S, movefocus, d +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +bind = $mainMod, Home, workspace, 11 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 + +bind = $mainMod SHIFT, Home, movetoworkspace, 11 + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, right, workspace, e+1 +bind = $mainMod, left, workspace, e-1 + +#switch network connections +bind = CTRL SHIFT, Escape, exec, nmcli device down wlo1 +bind = CTRL SHIFT, 0, exec, nmcli device down wlo1; nmcli connection up Hotspot +bind = CTRL SHIFT, 1, exec, nmcli device wifi connect EagleNet password ~?C##@ZiH +bind = CTRL SHIFT, 2, exec, nmcli device down wlo1; nmcli device wifi connect CXNK00813829 password a8d859c8cfb420ab +bind = CTRL SHIFT, 3, exec, nmcli device down wlo1; nmcli device wifi connect ATT9MhT2ql password 325qxr89u?3t + +#brightness keys +bind = , XF86MonBrightnessUp, exec, brightnessctl set +10% +bind = , XF86MonBrightnessDown, exec, brightnessctl set 10%- + +#volume keys +binde = , XF86AudioRaiseVolume, exec, amixer -D default sset Master 10%+ +binde = , XF86AudioLowerVolume, exec, amixer -D default sset Master 10%- +bind = , XF86AudioMute, exec, amixer -D default sset Master toggle + + +#screen lock key +bind = $mainMod, F12, exec, swaylock + +#logout shortcut +bind = CTRL ALT, Delete, exec, loginctl kill-session self + + +# Move/resize windows with mainMod + LMB/RMB and dragging +bind = $mainMod SHIFT, W, movewindow, u +bind = $mainMod SHIFT, S, movewindow, d +bind = $mainMod SHIFT, A, movewindow, l +bind = $mainMod SHIFT, D, movewindow, r +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod SHIFT, mouse:272, resizewindow + +$scratchpadsize = size 60% 80% +$scratchpad = class:^(scratchpad)$ + +windowrulev2 = float, $scratchpad +windowrulev2 = $scratchpadsize, $scratchpad +windowrulev2 = workspace special silent, $scratchpad + +$kitty = class:^(scratchpad-kitty)$ + +windowrulev2 = float, $kitty +windowrulev2 = $scratchpadsize, $kitty +windowrulev2 = workspace special silent, $kitty +$nvim = class:^(scratchpad-nvim)$ + +windowrulev2 = float, $nvim +windowrulev2 = $scratchpadsize, $nvim +windowrulev2 = workspace special silent, $nvim + +bind = $mainMod SHIFT, N, exec, colorPrefix pypr toggle nvim +bind = $mainMod SHIFT, E, exec, colorPrefix pypr toggle free + + +bind = CTRL SHIFT, Home, exec, ssh -i ~/.ssh/key nathan@69.150.99.129 -fL 5900:localhost:5900 sleep 10; vncviewer localhost:5900 -fullscreen +bind = CTRL SHIFT, Home, submap, clean + + +bind = $mainMod CTRL, Home, submap, clean + +submap = clean + +bind = $mainMod CTRL, Home, submap, reset + +submap = reset + + + ''; + + }; + + }; + + }; +} diff --git a/programs/neovim/flake.nix b/programs/neovim/flake.nix new file mode 100644 index 0000000..6e93fba --- /dev/null +++ b/programs/neovim/flake.nix @@ -0,0 +1,271 @@ +{ + description = "neovim config"; + + inputs = { + + }; + + outputs = { self, ... }@inputs: { + + module = {}: {}; + + hmModule = { config, lib, pkgs, ... }: { + + imports = []; + + home.packages = with pkgs; [ + neovim-remote + ]; + + home.sessionVariables.SUDO_EDITOR = "kitten edit-in-kitty"; + + programs.neovim = with pkgs; { + enable = true; + #package = neovim; + defaultEditor = true; + extraLuaConfig = '' + vim.g.mapleader = ' ' + vim.g.maplocalleader = ' ' + + vim.opt.nu = true + vim.opt.rnu = true + + vim.opt.scrolloff = 12 + + vim.opt.tabstop = 4 + vim.opt.softtabstop = 4 + vim.opt.shiftwidth = 4 + vim.opt.expandtab = true + + vim.opt.smartindent = true + + vim.opt.wrap = false + + vim.opt.hlsearch = false + vim.opt.incsearch = true + + vim.filetype.add({ + pattern = { [".*/hypr/.*%.conf"] = "hyprlang" }, + }) + -- vim.opt.termguicolors = true + require("nvim-tree").setup() + + local lsp_zero = require('lsp-zero') + + -- lsp_attach is where you enable features that only work + -- if there is a language server active in the file + local lsp_attach = function(client, bufnr) + local opts = {buffer = bufnr} + + vim.keymap.set('n', 'K', 'lua vim.lsp.buf.hover()', opts) + vim.keymap.set('n', 'gd', 'lua vim.lsp.buf.definition()', opts) + vim.keymap.set('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) + vim.keymap.set('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) + vim.keymap.set('n', 'go', 'lua vim.lsp.buf.type_definition()', opts) + vim.keymap.set('n', 'gr', 'lua vim.lsp.buf.references()', opts) + vim.keymap.set('n', 'gs', 'lua vim.lsp.buf.signature_help()', opts) + vim.keymap.set('n', '', 'lua vim.lsp.buf.rename()', opts) + vim.keymap.set({'n', 'x'}, '', 'lua vim.lsp.buf.format({async = true})', opts) + vim.keymap.set('n', '', 'lua vim.lsp.buf.code_action()', opts) + end + + lsp_zero.extend_lspconfig({ + sign_text = true, + lsp_attach = lsp_attach, + capabilities = require('cmp_nvim_lsp').default_capabilities(), + }) + + local lspconfig = require("lspconfig") + lspconfig.ccls.setup{} + lspconfig.nil_ls.setup{} + lspconfig.statix.setup{} + lspconfig.pyright.setup{} + lspconfig.gopls.setup{} + +-- local llm = require('llm') + +-- llm.setup({ +-- api_token = nil, -- cf Install paragraph +-- model = "codellama:7b", -- the model ID, behavior depends on backend +-- backend = "ollama", -- backend ID, "huggingface" | "ollama" | "openai" | "tgi" +-- url = "http://localhost:11434", -- the http url of the backend +-- tokens_to_clear = { "<|endoftext|>" }, -- tokens to remove from the model's output + -- parameters that are added to the request body, values are arbitrary, you can set any field:value pair here it will be passed as is to the backend +-- request_body = { +-- parameters = { +-- temperature = 0.2, +-- top_p = 0.95, +-- }, +-- }, + -- set this if the model supports fill in the middle +-- fim = { +-- enabled = true, +-- prefix = "", +-- middle = "", +-- suffix = "", +-- }, +-- debounce_ms = 150, +-- accept_keymap = "", +-- dismiss_keymap = "", +-- tls_skip_verify_insecure = false, + -- llm-ls configuration, cf llm-ls section +-- lsp = { +-- bin_path = vim.api.nvim_call_function("stdpath", { "data" }) .. "${pkgs.llm-ls}/bin/llm-ls", +-- host = nil, +-- port = nil, +-- cmd_env = nil, -- or { LLM_LOG_LEVEL = "DEBUG" } to set the log level of llm-ls +-- version = "0.5.3", +-- }, +-- tokenizer = nil, -- cf Tokenizer paragraph +-- context_window = 1024, -- max number of tokens for the context window +-- enable_suggestions_on_startup = true, +-- enable_suggestions_on_files = "*", -- pattern matching syntax to enable suggestions on specific files, either a string or a list of strings +-- disable_url_path_completion = false, -- cf Backend +-- }) + + local luasnip = require("luasnip") + + +-- nvim-cmp setup +local cmp = require("cmp") +cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), -- Up + [''] = cmp.mapping.scroll_docs(4), -- Down + -- C-b (back) C-f (forward) for snippet placeholder navigation. + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { 'i', 's' }), + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { 'i', 's' }), + }), + sources = { + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + }, +}) + + require("noice").setup() + require("barbar").setup() + require("pywal").setup() + require("lualine").setup({ + options = { + theme = 'pywal-nvim', + }, + }) + vim.cmd[[colorscheme pywal]] + vim.notify = require("notify") + + vim.keymap.set("n", "ff", "Telescope find_files", {desc = "find files"}) + vim.keymap.set("n", "fa", "Telescope find_files no_ignore=true hidden=true", {desc = "find files"}) + vim.keymap.set("n", "fc", "Telescope treesitter", {desc = "find code"}) + vim.keymap.set("n", "t", "NvimTreeToggle", {desc = "toggle tree"}) + + vim.keymap.set("n", "", "BufferNext", {desc = "move to next tab"}) + vim.keymap.set("n", "", "BufferPrevious", {desc = "move to previous tab"}) + + vim.keymap.set("n", "", "wincmd h", {desc = "move to left window"}) + vim.keymap.set("n", "", "wincmd j", {desc = "move to below window"}) + vim.keymap.set("n", "", "wincmd k", {desc = "move to above window"}) + vim.keymap.set("n", "", "wincmd l", {desc = "move to right window"}) + + vim.keymap.set("v", "J", ":m '>+1gv=gv", {desc = "move selected down"}) + vim.keymap.set("v", "K", ":m '<-2gv=gv", {desc = "move selected up"}) + + vim.keymap.set("n", "J", "mzJ`z", {desc = "cursor still when appending next line"}) + + vim.keymap.set("n", "", "zz", {desc = "cursor mid when page down"}) + vim.keymap.set("n", "", "zz", {desc = "cursor mid when page up"}) + + vim.keymap.set("n", "n", "nzzzv", {desc = "search term mid"}) + vim.keymap.set("n", "N", "Nzzzv", {desc = "search term mid"}) + + vim.keymap.set("x", "p", "\"_dP", {desc = "no overwrite paste buffer"}) + + vim.keymap.set("n", "y", "\"+y", {desc = "yank to system clipboard"}) + vim.keymap.set("v", "y", "\"+y", {desc = "^"}) + vim.keymap.set("n", "Y", "\"+Y", {desc = "^"}) + + vim.keymap.set("n", "Q", "", {desc = "unmap Q"}) + + vim.keymap.set("n", "s", [[:%s/\<\>//gI]], {desc = "replace current word entire file"}) + vim.keymap.set("n", "F", function() vim.lsp.buf.format() end, {desc = "format buffer?"}) + ''; + plugins = with vimPlugins; [ + telescope-nvim + nvim-tree-lua + nvim-web-devicons + mini-nvim + noice-nvim + nvim-notify + barbar-nvim + pywal-nvim + lualine-nvim + tokyonight-nvim + llm-nvim + + cmp-buffer + cmp-nvim-lsp + cmp_luasnip + luasnip + cmp-path + cmp-cmdline + nvim-cmp + nvim-lspconfig + + lsp-zero-nvim + + nvim-treesitter + nvim-treesitter-parsers.cpp + nvim-treesitter-parsers.nix + nvim-treesitter-parsers.bash + nvim-treesitter-parsers.python + nvim-treesitter-parsers.lua + nvim-treesitter-parsers.vim + nvim-treesitter-parsers.javascript + nvim-treesitter-parsers.css + nvim-treesitter-parsers.hyprlang + + ]; + + extraPackages = with pkgs; [ + nil + statix # Lints and suggestions for the nix programming language + pyright + gopls + ccls + ]; + + viAlias = true; + vimAlias = true; + vimdiffAlias = true; + + }; + + }; + + }; +} diff --git a/programs/nixvim/README.md b/programs/nixvim/README.md new file mode 100644 index 0000000..bff36b7 --- /dev/null +++ b/programs/nixvim/README.md @@ -0,0 +1,17 @@ +# Nixvim template + +This template gives you a good starting point for configuring nixvim standalone. + +## Configuring + +To start configuring, just add or modify the nix files in `./config`. +If you add a new configuration file, remember to add it to the +[`config/default.nix`](./config/default.nix) file + +## Testing your new configuration + +To test your configuration simply run the following command + +``` +nix run . +``` diff --git a/programs/nixvim/config/bufferline.nix b/programs/nixvim/config/bufferline.nix new file mode 100644 index 0000000..2dfee9e --- /dev/null +++ b/programs/nixvim/config/bufferline.nix @@ -0,0 +1,6 @@ +{ + plugins = { + bufferline.enable = true; + web-devicons.enable = true; + }; +} diff --git a/programs/nixvim/config/default.nix b/programs/nixvim/config/default.nix new file mode 100644 index 0000000..d0c98e4 --- /dev/null +++ b/programs/nixvim/config/default.nix @@ -0,0 +1,176 @@ +{ pkgs, ... }: { + # Import all your configuration modules here + imports = [ ./bufferline.nix ]; + + plugins = { + + lualine.enable = true; + + luasnip.enable = true; + + barbar.enable = true; + + nvim-tree.enable = true; + + noice.enable = true; + + mini.enable = true; + + notify.enable = true; + + telescope.enable = true; + + treesitter.enable = true; + + web-devicons.enable = true; + + lsp = { + enable = true; + servers = { + #js/typescript + ts-ls.enable = true; + #c/c++ + ccls.enable = true; + #nix + nil-ls.enable = true; + #python + pyright.enable = true; + #bash + bashls.enable = true; + #css + cssls.enable = true; + }; + }; + + cmp = { + enable = true; + autoEnableSources = true; + settings = { + sources = [ + { name = "nvim_lsp"; } + { name = "path"; } + { name = "buffer"; } + { name = "luasnip"; } + { name = "cmdline"; } + ]; + }; + + }; + }; + + globals = { + mapleader = " "; + maplocalleader = " "; + }; + + opts = { + nu = true; + rnu = true; + + scrolloff = 12; + + tabstop = 4; + softtabstop = 4; + shiftwidth = 4; + expandtab = true; + + smartindent = true; + + wrap = false; + + hlsearch = false; + incsearch = true; + }; + + keymaps = [ + { + mode = "n"; + key = "ff"; + action = "Telescope find_files hidden=true"; + } + + { + mode = "n"; + key = "fc"; + action = "Telescope treesitter"; + } + + { + mode = "n"; + key = "t"; + action = "NvimTreeToggle"; + } + + { + mode = "n"; + key = ""; + action = "BufferNext"; + } + + { + mode = "n"; + key = ""; + action = "BufferPrevious"; + } + + { + mode = "n"; + key = ""; + action = "wincmd h"; + } + + { + mode = "n"; + key = ""; + action = "wincmd j"; + } + + { + mode = "n"; + key = ""; + action = "wincmd k"; + } + + { + mode = "n"; + key = ""; + action = "wincmd l"; + } + + { + mode = "n"; + key = "Q"; + action = ""; + } + + { + mode = "v"; + key = "J"; + action = ":m '>+1gv=gv"; + } + + { + mode = "v"; + key = "K"; + action = ":m '<-2gv=gv"; + } + + ]; + + extraConfigLua = '' + vim.filetype.add({ + pattern = { [".*/hypr/.*%.conf"] = "hyprlang" }, + }) + ''; + + extraPlugins = with pkgs.vimPlugins; [ + pywal-nvim + tokyonight-nvim + llm-nvim + + nvim-lspconfig + + ]; + + colorscheme = "pywal"; +} diff --git a/programs/nixvim/flake.lock b/programs/nixvim/flake.lock new file mode 100644 index 0000000..5f8e218 --- /dev/null +++ b/programs/nixvim/flake.lock @@ -0,0 +1,327 @@ +{ + "nodes": { + "devshell": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722113426, + "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", + "owner": "numtide", + "repo": "devshell", + "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-compat": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1726153070, + "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726153070, + "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "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" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "nixvim", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726745158, + "narHash": "sha256-D5AegvGoEjt4rkKedmxlSEmC+nNLMBPWFxvmYnVLhjk=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "4e743a6920eab45e8ba0fbe49dc459f1423a4b74", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixvim", + "git-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" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726902823, + "narHash": "sha256-Gkc7pwTVLKj4HSvRt8tXNvosl8RS9hrBAEhOjAE0Tt4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "14929f7089268481d86b83ed31ffd88713dcd415", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726742753, + "narHash": "sha256-QclpWrIFIg/yvWRiOUaMp1WR+TGUE9tb7RE31xHlxWc=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "c03f85fa42d68d1056ca1740f3113b04f3addff2", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1726937504, + "narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "9357f4f23713673f310988025d9dc261c20e70c6", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1726755586, + "narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts_2", + "git-hooks": "git-hooks", + "home-manager": "home-manager", + "nix-darwin": "nix-darwin", + "nixpkgs": "nixpkgs_2", + "nuschtosSearch": "nuschtosSearch", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1727118532, + "narHash": "sha256-nRzlwdPaSb1UCoqndT52AUNpx9e8wLCEjY28eAkCHIg=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "47364df49645e89d8aa03aa61c893e12ecbac366", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726816132, + "narHash": "sha256-AbB0lgc0IbzLIxj1O3cosiMNAVQak4KJtvq9q8MjHhs=", + "owner": "NuschtOS", + "repo": "search", + "rev": "7733a39a1321057172d87e6251ded7cdeb67171e", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs", + "nixvim": "nixvim" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726734507, + "narHash": "sha256-VUH5O5AcOSxb0uL/m34dDkxFKP6WLQ6y4I1B4+N3L2w=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "ee41a466c2255a3abe6bc50fc6be927cdee57a9f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/programs/nixvim/flake.nix b/programs/nixvim/flake.nix new file mode 100644 index 0000000..7cb3279 --- /dev/null +++ b/programs/nixvim/flake.nix @@ -0,0 +1,47 @@ +{ + description = "A nixvim configuration"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixvim.url = "github:nix-community/nixvim"; + flake-parts.url = "github:hercules-ci/flake-parts"; + }; + + outputs = + { nixvim, flake-parts, ... }@inputs: + flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + perSystem = + { pkgs, system, ... }: + let + nixvimLib = nixvim.lib.${system}; + nixvim' = nixvim.legacyPackages.${system}; + nixvimModule = { + inherit pkgs; + module = import ./config; # import the module directly + # You can use `extraSpecialArgs` to pass additional arguments to your module files + extraSpecialArgs = { + inherit pkgs; + }; + }; + nvim = nixvim'.makeNixvimWithModule nixvimModule; + in + { + checks = { + # Run `nix flake check .` to verify that your config is not broken + default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule; + }; + + packages = { + # Lets you run `nix run .` to start nixvim + default = nvim; + }; + }; + }; +} diff --git a/programs/pywal/flake.nix b/programs/pywal/flake.nix new file mode 100644 index 0000000..0c9defd --- /dev/null +++ b/programs/pywal/flake.nix @@ -0,0 +1,81 @@ +{ + description = "Pywal Config"; + + inputs = { + + themecord = { + url = "github:danihek/themecord"; + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + }; + + spicetify-nix = { + url = "github:Gerg-L/spicetify-nix"; + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + }; + + spicetify-ext = { + url = "github:rxri/spicetify-extensions"; + flake = false; + }; + + nixpkgs-us.url = "github:nixos/nixpkgs/nixos-unstable"; + + }; + + outputs = { self, ... }@inputs: let + system = "x86_64-linux"; + pkgs-us = import inputs.nixpkgs-us { + inherit system; + config.allowUnfree = true; + }; + + in { + + hmModule = { config, lib, pkgs, ... }: let + pywalfox-wrapper = pkgs.writeShellScriptBin "pywalfox-wrapper" '' + ${pkgs.pywalfox-native}/bin/pywalfox start + ''; + in { + + imports = [ + inputs.spicetify-nix.homeManagerModules.default + ]; + + programs.spicetify = let + spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; + in { + enable = true; + spotifyPackage = pkgs-us.spotify; + theme = spicePkgs.themes.default; + enabledExtensions = with spicePkgs.extensions; [ + ({ + src = "${inputs.spicetify-ext}/adblock"; + name = "adblock.js"; + }) + copyToClipboard + oneko + #randomBadToTheBoneRiff #this could be hilarious + ]; + enabledCustomApps = with spicePkgs.apps; [ + ncsVisualizer + ]; + }; + + home.packages = with pkgs; [ + + inputs.themecord.packages.${pkgs.system}.default + vesktop + + pkgs-us.pywal16 + pywalfox-native + ]; + + home.file.".mozilla/native-messaging-hosts/pywalfox.json".text = lib.replaceStrings [ "" ] [ + "${pywalfox-wrapper}/bin/pywalfox-wrapper" + ] + (lib.readFile "${pkgs.pywalfox-native}/lib/python3.11/site-packages/pywalfox/assets/manifest.json"); + + }; + + }; +} diff --git a/programs/rofi/flake.nix b/programs/rofi/flake.nix new file mode 100644 index 0000000..d12b043 --- /dev/null +++ b/programs/rofi/flake.nix @@ -0,0 +1,23 @@ +{ + description = "Rofi Config"; + + inputs = { + + }; + + outputs = { self, ... }: { + + hmModule = { config, lib, pkgs, ... }: { + programs.rofi = { + + enable = true; + package = pkgs.rofi-wayland; + + cycle = true; + + theme = "/home/nathan/.cache/wal/colors-rofi-dark.rasi"; + }; + }; + + }; +} diff --git a/programs/terminal/bat/bat.nix b/programs/terminal/bat/bat.nix new file mode 100644 index 0000000..2c1f101 --- /dev/null +++ b/programs/terminal/bat/bat.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: { + + programs.bat = { + + enable = true; + + extraPackages = with pkgs.bat-extras; [ + batman + batpipe + batgrep + batdiff + batwatch + prettybat + ]; + + + }; +} diff --git a/programs/terminal/bat/flake.nix b/programs/terminal/bat/flake.nix new file mode 100644 index 0000000..6a19005 --- /dev/null +++ b/programs/terminal/bat/flake.nix @@ -0,0 +1,11 @@ +{ + description = "bat config"; + + inputs = {}; + + outputs = { self, ... }: { + + hmModule = import ./bat.nix; + + }; +} diff --git a/programs/terminal/eza/eza.nix b/programs/terminal/eza/eza.nix new file mode 100644 index 0000000..d067b0c --- /dev/null +++ b/programs/terminal/eza/eza.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: { + + programs.eza = { + + enable = true; + + enableZshIntegration = true; + + extraOptions = [ + "--color=auto" + ]; + + git = true; + + icons = true; + }; +} diff --git a/programs/terminal/eza/flake.nix b/programs/terminal/eza/flake.nix new file mode 100644 index 0000000..756b103 --- /dev/null +++ b/programs/terminal/eza/flake.nix @@ -0,0 +1,11 @@ +{ + description = "eza config"; + + inputs = {}; + + outputs = { self, ... }: { + + hmModule = import ./eza.nix; + + }; +} diff --git a/programs/terminal/flake.nix b/programs/terminal/flake.nix new file mode 100644 index 0000000..373d457 --- /dev/null +++ b/programs/terminal/flake.nix @@ -0,0 +1,29 @@ +{ + description = "terminal config"; + + inputs = { + eza.url = "./eza"; + bat.url = "./bat"; + fzf.url = "./fzf"; + zoxide.url = "./zoxide"; + kitty.url = "./kitty"; + tmux.url = "./tmux"; + zsh.url = "./zsh"; + }; + + outputs = { self, ... }@inputs: { + + hmModule = { config, lib, pkgs, ... }: { + imports = [ + inputs.eza.hmModule + inputs.bat.hmModule + inputs.fzf.hmModule + inputs.zoxide.hmModule + inputs.kitty.hmModule + inputs.tmux.hmModule + inputs.zsh.hmModule + ]; + }; + + }; +} diff --git a/programs/terminal/fzf/flake.nix b/programs/terminal/fzf/flake.nix new file mode 100644 index 0000000..0ebe49c --- /dev/null +++ b/programs/terminal/fzf/flake.nix @@ -0,0 +1,11 @@ +{ + description = "fzf config"; + + inputs = {}; + + outputs = { self, ... }: { + + hmModule = import ./fzf.nix; + + }; +} diff --git a/programs/terminal/fzf/fzf.nix b/programs/terminal/fzf/fzf.nix new file mode 100644 index 0000000..b9b7e6a --- /dev/null +++ b/programs/terminal/fzf/fzf.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: { + + programs.fzf = { + + enable = true; + + enableZshIntegration = true; + + tmux = { + #enableShellIntegration = true; + + #shellIntegrationOptions = []; + }; + }; +} diff --git a/programs/terminal/kitty/flake.nix b/programs/terminal/kitty/flake.nix new file mode 100644 index 0000000..230cd24 --- /dev/null +++ b/programs/terminal/kitty/flake.nix @@ -0,0 +1,13 @@ +{ + description = "Kitty Config"; + + inputs = { + + }; + + outputs = { self, ... }: { + + hmModule = import ./kitty.nix; + + }; +} diff --git a/programs/terminal/kitty/kitty.nix b/programs/terminal/kitty/kitty.nix new file mode 100644 index 0000000..ce01540 --- /dev/null +++ b/programs/terminal/kitty/kitty.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, ... }: { + + programs.kitty = { + + enable = true; + + font = { + name = "FiraCode Nerd Font"; + size = 12; + }; + + extraConfig = '' + +confirm_os_window_close 0 + +include ${config.home.homeDirectory}/.cache/wal/colors-kitty.conf + +disable_ligatures never + +dynamic_background_opacity yes + +tab_bar_edge top + +map ctrl+shift+t new_tab +map ctrl+shift+w close_tab + +map ctrl+tab next_tab +map ctrl+shift+tab previous_tab + + ''; + }; +} + diff --git a/programs/terminal/tmux/flake.nix b/programs/terminal/tmux/flake.nix new file mode 100644 index 0000000..2062bd6 --- /dev/null +++ b/programs/terminal/tmux/flake.nix @@ -0,0 +1,11 @@ +{ + description = "Tmux config"; + + inputs = {}; + + outputs = { self, ... }: { + + hmModule = import ./tmux.nix; + + }; +} diff --git a/programs/terminal/tmux/tmux.nix b/programs/terminal/tmux/tmux.nix new file mode 100644 index 0000000..62d73f7 --- /dev/null +++ b/programs/terminal/tmux/tmux.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: { + + programs.tmux = { + + enable = true; + + clock24 = true; + + mouse = true; + + baseIndex = 1; + + keyMode = "vi"; + + prefix = "C-b"; + + shell = "${pkgs.zsh}/bin/zsh"; + + }; + +} + + diff --git a/programs/terminal/zoxide/flake.nix b/programs/terminal/zoxide/flake.nix new file mode 100644 index 0000000..5556a2b --- /dev/null +++ b/programs/terminal/zoxide/flake.nix @@ -0,0 +1,11 @@ +{ + description = "Zoxide config"; + + inputs = {}; + + outputs = { self, ... }: { + + hmModule = import ./zoxide.nix; + + }; +} diff --git a/programs/terminal/zoxide/zoxide.nix b/programs/terminal/zoxide/zoxide.nix new file mode 100644 index 0000000..afbf058 --- /dev/null +++ b/programs/terminal/zoxide/zoxide.nix @@ -0,0 +1,13 @@ +{ config, lib, pkgs, ... }: { + + programs.zoxide = { + + enable = true; + + enableZshIntegration = true; + + options = [ + "--cmd cd" + ]; + }; +} diff --git a/programs/terminal/zsh/flake.nix b/programs/terminal/zsh/flake.nix new file mode 100644 index 0000000..5ed40db --- /dev/null +++ b/programs/terminal/zsh/flake.nix @@ -0,0 +1,11 @@ +{ + description = "zsh config"; + + inputs = {}; + + outputs = { self, ... }: { + + hmModule = import ./zsh.nix; + + }; +} diff --git a/programs/terminal/zsh/zsh.nix b/programs/terminal/zsh/zsh.nix new file mode 100644 index 0000000..d13fd60 --- /dev/null +++ b/programs/terminal/zsh/zsh.nix @@ -0,0 +1,153 @@ +{ config, lib, pkgs, ... }: { + + home.packages = with pkgs; [ + oh-my-posh + ]; + + programs.zsh = { + + enable = true; + + enableCompletion = true; + + autosuggestion.enable = true; + + syntaxHighlighting.enable = true; + + shellAliases = { + ls = "eza"; + ll = "ls -l"; + + ksh = "kitten ssh"; + + }; + + history = { + size = 5000; + ignoreAllDups = true; + ignoreSpace = true; + share = true; + }; + + initExtraFirst = '' + cat ${config.home.homeDirectory}/.cache/wal/sequences + eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)" + ''; + + }; + + home.file.".config/wal/templates/ohmyposh.toml".text = '' +#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json + +version = 2 +final_space = true +console_title_template = '{{{{ .Shell }}}} in {{{{ .Folder }}}}' + +[[blocks]] + type = 'prompt' + alignment = 'left' + newline = true + + [[blocks.segments]] + type = 'os' + style = 'diamond' + trailing_diamond = '' + background = 'p:c1' + foreground = 'p:c12' + template = ' {{{{ .Icon }}}} ' + + [[blocks.segments]] + type = 'session' + style = 'diamond' + trailing_diamond = '' + background = 'p:c2' + foreground = 'p:c14' + template = '{{{{ .UserName }}}}@{{{{ .HostName }}}}' + + [[blocks.segments]] + type = 'path' + style = 'diamond' + trailing_diamond = '' + background = 'p:c4' + foreground = 'p:c13' + template = '{{{{ .Path }}}}' + + [blocks.segments.properties] + style = 'full' + +[[blocks]] + type = 'prompt' + overflow = 'hidden' + alignment = 'right' + + [[blocks.segments]] + type = 'executiontime' + style = 'diamond' + leading_diamond = '' + background = 'p:c4' + foreground = 'p:c13' + template = '{{{{ .FormattedMs }}}}' + + [[blocks.segments]] + type = 'time' + style = 'diamond' + leading_diamond = '' + background = 'p:c2' + foreground = 'p:c14' + + [[blocks.segments]] + type = 'shell' + style = 'diamond' + leading_diamond = '' + background = 'p:c1' + foreground = 'p:c12' + +[[blocks]] + type = 'prompt' + alignment = 'left' + newline = true + + [[blocks.segments]] + type = 'text' + style = 'plain' + background = 'transparent' + foreground_templates = [ + "{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}", + "{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}", + ] + template = "{{{{ if gt .Code 0 }}}}!❭ {{{{else}}}}❭ {{{{end}}}}" + +[transient_prompt] + foreground_templates = [ + "{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}", + "{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}", + ] + background = 'transparent' + template = "{{{{ if gt .Code 0 }}}}!❭ {{{{else}}}}❭ {{{{end}}}}" + +[secondary_prompt] + background = 'transparent' + forground = 'p:c14' + template = "❭❭ " + + +[palette] + +c0 = "{color0}" +c1 = "{color1}" +c2 = "{color2}" +c3 = "{color3}" +c4 = "{color4}" +c5 = "{color5}" +c6 = "{color6}" +c7 = "{color7}" +c8 = "{color8}" +c9 = "{color9}" +c10 = "{color10}" +c11 = "{color11}" +c12 = "{color12}" +c13 = "{color13}" +c14 = "{color14}" +c15 = "{color15}" + ''; +} diff --git a/services/flake.nix b/services/flake.nix new file mode 100644 index 0000000..4c60db8 --- /dev/null +++ b/services/flake.nix @@ -0,0 +1,29 @@ +{ + description = "Nathan user service config"; + + inputs = { + + mpdris.url = "./mpdris"; + + ollama.url = "./ollama"; + + }; + + outputs = { self, ... }@inputs: { + + module = { config, lib, pkgs, ... }: { + imports = [ + inputs.ollama.module + ]; + }; + + hmModule = { config, lib, pkgs, ... }: { + + imports = [ + inputs.mpdris.hmModule + ]; + + }; + + }; +} diff --git a/services/mpdris/flake.nix b/services/mpdris/flake.nix new file mode 100644 index 0000000..0469fca --- /dev/null +++ b/services/mpdris/flake.nix @@ -0,0 +1,28 @@ +{ + description = "mpdris config"; + + inputs = { + + }; + + outputs = { self, ... }@inputs: { + + module = {}: {}; + + hmModule = { config, lib, pkgs, ... }: { + + imports = []; + + services.mpdris2 = { + enable = true; + mpd.host = "127.0.0.1"; + mpd.port = 6600; + package = pkgs.mpdris2; + mpd.musicDirectory = "/home/nathan/Music"; + notifications = true; + }; + + }; + + }; +} diff --git a/services/ollama/flake.nix b/services/ollama/flake.nix new file mode 100644 index 0000000..fafa78f --- /dev/null +++ b/services/ollama/flake.nix @@ -0,0 +1,12 @@ +{ + description = "ollama config"; + + inputs = { + }; + + outputs = { self, ... }: { + + module = import ./ollama.nix; + + }; +} diff --git a/services/ollama/ollama.nix b/services/ollama/ollama.nix new file mode 100644 index 0000000..b72695f --- /dev/null +++ b/services/ollama/ollama.nix @@ -0,0 +1,7 @@ +{ config, lib, pkgs, ... }: { + + services.ollama = { + enable = true; + acceleration = "cuda"; + }; +} diff --git a/system/configuration/configuration.nix b/system/configuration/configuration.nix new file mode 100644 index 0000000..350b38a --- /dev/null +++ b/system/configuration/configuration.nix @@ -0,0 +1,297 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, lib, pkgs, inputs, ... }: + +{ + + nixpkgs.config.allowUnfree = true; + + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ]; + + hardware = { + #graphics.enable = true; + + opengl = { + enable = true; + driSupport = true; + }; + + nvidia = { + modesetting.enable = true; + powerManagement.enable = true; + powerManagement.finegrained = false; + open = true; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.beta; + + prime = { + # Make sure to use the correct Bus ID values for your system! + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + # WARNING: sync and offload are mutually exclusive. + # You can only pick one!! + #sync.enable = true; + offload = { + enable = true; + enableOffloadCmd = true; + }; + }; + }; + #enable bluetooth + bluetooth.enable = true; + + pulseaudio.enable = false; + }; + + # Enable the X11 windowing system. + services.xserver = { + enable = true; + videoDrivers = ["nvidia"]; + + }; + + services.displayManager.enable = true; + + services.avahi = { + + enable = true; + ipv4 = true; + ipv6 = true; + openFirewall = true; + nssmdns4 = true; + wideArea = true; + + }; + + #networking + + networking = { + hostName = "laptop"; + + nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ]; + + networkmanager = { + enable = true; + }; + }; + + # nix experimental features + nix.settings = { + experimental-features = [ "nix-command" "flakes" ]; + substituters = ["https://hyprland.cachix.org"]; + trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; + }; + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Set your time zone. + time.timeZone = "America/Chicago"; + + # Select internationalisation properties. + 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"; + }; + + + programs.steam = { + enable = true; + }; + + programs.git = { + enable = true; + config = { + user = { + name = "blacknull"; + email = "nathanblunkall5@gmail.com"; + }; + }; + }; + + environment.sessionVariables = { + + NIXOS_OZONE_WL = "1"; + }; + + environment.shells = with pkgs; [ zsh ]; + + xdg.portal = { + enable = true; + config.common.default = "*"; + extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; +}; + + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable sound with pipewire. + sound.enable = true; + + security.rtkit.enable = true; + services.pipewire = { + enable = true; + package = pkgs.pipewire; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + extraConfig.pipewire-pulse."92-low-latency" = { + context.modules = [ + { + name = "libpipewire-module-protocol-pulse"; + args = { + pulse.min.req = "32/48000"; + pulse.default.req = "32/48000"; + pulse.max.req = "32/48000"; + pulse.min.quantum = "32/48000"; + pulse.max.quantum = "32/48000"; + }; + } + ]; + stream.properties = { + node.latency = "32/48000"; + resample.quality = 1; + }; + }; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + wireplumber.enable = true; + + }; + + + services.mpd = { + enable = true; + startWhenNeeded = true; + network.port = 6600; + network.listenAddress = "127.0.0.1"; + user = "nathan"; + musicDirectory = "/home/nathan/Music"; + extraConfig = '' + audio_output { + type "pipewire" + name "Audio1" + } + audio_output { + type "fifo" + name "visualizer" + path "/tmp/mpd.fifo" + format "44100:16:1" + } + ''; + }; + + systemd.services.mpd.environment = { + XDG_RUNTIME_DIR = "/run/user/1000"; + }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; + + programs.adb.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.nathan = { + isNormalUser = true; + description = "Nathan"; + extraGroups = [ + "networkmanager" + "wheel" + "adbusers" + #school? + "plugdev" + ]; + # packages supplied by home-manager + }; + + users.defaultUserShell = pkgs.zsh; + programs.zsh.enable = true; + + home-manager.backupFileExtension = ".backup"; + home-manager.users = { + root = inputs.root.homeManagerModule; + # nathan = inputs.nathan.homeManagerModule; + }; + + programs.nh = { + enable = true; + flake = "/home/nathan/.nixos"; + + clean = { + enable = true; + dates = "weekly"; + extraArgs = "--keep 5 --keep-since 3d"; + }; + }; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # gstreamer + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-bad + gst_all_1.gst-plugins-ugly + + ]; + + + fonts.packages = with pkgs; [ + nerdfonts + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + #networking.firewall.allowedTCPPorts = [ 80 443 ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + #networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "23.05"; # Did you read the comment? + +} diff --git a/system/configuration/hardware-configuration.nix b/system/configuration/hardware-configuration.nix new file mode 100644 index 0000000..3edf5cb --- /dev/null +++ b/system/configuration/hardware-configuration.nix @@ -0,0 +1,39 @@ +# 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 = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/78c0964d-c09e-4e31-8a73-eb719d79917a"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/AE5E-AC86"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + # 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.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/system/flake.nix b/system/flake.nix new file mode 100755 index 0000000..79de929 --- /dev/null +++ b/system/flake.nix @@ -0,0 +1,20 @@ +{ + description = "Unified System Configuration"; + + inputs = { + + sddm.url = "./sddm"; + }; + + outputs = { self, sddm, ... }@inputs: { + + nixosModule = { config, lib, pkgs, inputs, ... }: { + imports = [ + ./configuration/configuration.nix + sddm.module + ]; + }; + + }; + +} diff --git a/system/sddm/flake.nix b/system/sddm/flake.nix new file mode 100644 index 0000000..978be6c --- /dev/null +++ b/system/sddm/flake.nix @@ -0,0 +1,33 @@ +{ + description = "sddm config"; + + inputs = { + + theme.url = "./themes/tokyo-night"; + + }; + + outputs = { self, ... }@inputs: { + + module = { config, lib, pkgs, ... }: { + + imports = []; + + qt.enable = true; + + services.displayManager.sddm = { + enable = true; + autoNumlock = true; + theme = "${inputs.theme.theme { inherit pkgs; }}"; + enableHidpi = true; + extraPackages = with pkgs; [ + libsForQt5.qtsvg + libsForQt5.qtquickcontrols2 + libsForQt5.qtgraphicaleffects + ]; + }; + + }; + + }; +} diff --git a/system/sddm/themes/sugar-dark/flake.nix b/system/sddm/themes/sugar-dark/flake.nix new file mode 100644 index 0000000..2250ae2 --- /dev/null +++ b/system/sddm/themes/sugar-dark/flake.nix @@ -0,0 +1,29 @@ +{ + description = "Package Sugar Dark SDDM theme"; + + inputs = { + + repo = { + url = "github:MarianArlt/sddm-sugar-dark"; + flake = false; + }; + + }; + + outputs = { self, repo, ... }: { + + theme = { pkgs }: pkgs.stdenv.mkDerivation { + + name = "sugar-dark"; + + src = repo; + + installPhase = '' + mkdir -p $out + cp -R $src/* $out/ + ''; + + }; + + }; +} diff --git a/system/sddm/themes/tokyo-night/flake.nix b/system/sddm/themes/tokyo-night/flake.nix new file mode 100644 index 0000000..d652e28 --- /dev/null +++ b/system/sddm/themes/tokyo-night/flake.nix @@ -0,0 +1,29 @@ +{ + description = "Package Tokyo Night SDDM theme"; + + inputs = { + + repo = { + url = "github:siddrs/tokyo-night-sddm"; + flake = false; + }; + + }; + + outputs = { self, repo, ... }: { + + theme = { pkgs }: pkgs.stdenv.mkDerivation { + + name = "tokyo-night"; + + src = repo; + + installPhase = '' + mkdir -p $out + cp -R $src/* $out/ + ''; + + }; + + }; +}