diff --git a/dev-flakes/cpp/CMakeLists.txt b/dev-flakes/cpp/CMakeLists.txt new file mode 100644 index 0000000..084b6e5 --- /dev/null +++ b/dev-flakes/cpp/CMakeLists.txt @@ -0,0 +1,23 @@ +# Make sure to change some parameter to fit your project + +cmake_minimum_required(VERSION 3.22) +project(MyApp LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +add_executable(myapp + src/main.cpp + src/utils.cpp +) + +# This is the install rule - it tells CMake where to put the binary +# when 'make install' or 'ninja install' is run +install(TARGETS myapp + RUNTIME DESTINATION bin +) + +# If you have data files, you can install them too: +# install(FILES assets/config.json +# DESTINATION share/myapp +# ) diff --git a/dev-flakes/cpp/flake.lock b/dev-flakes/cpp/flake.lock new file mode 100644 index 0000000..923e9f1 --- /dev/null +++ b/dev-flakes/cpp/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1770562336, + "narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d6c71932130818840fc8fe9509cf50be8c64634f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/dev-flakes/cpp/flake.nix b/dev-flakes/cpp/flake.nix index aaa626c..8921ca7 100644 --- a/dev-flakes/cpp/flake.nix +++ b/dev-flakes/cpp/flake.nix @@ -3,6 +3,47 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - flake-utils.url = + flake-utils.url = "github:numtide/flake-utils"; }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + in + { + packages.default = pkgs.stdenv.mkDerivation { + pname = "myapp"; + version = "0.1.0"; + src = self; + + nativeBuildInputs = with pkgs; [ cmake ninja ]; + buildInputs = with pkgs; [ ]; + }; + + devShells.default = pkgs.mkShell { + name = "cpp-dev"; + + # In the dev shell, you get more tools than just what's needed to build + packages = with pkgs; [ + gcc + clang + cmake + ninja + gdb + valgrind + clang-tools + ccache + ]; + + shellHook = '' + echo "C++ loaded" + export CC="ccache gcc" + export CXX="ccache g++" + ''; + }; + }); } diff --git a/dev-flakes/python/flake.nix b/dev-flakes/python/flake.nix index 2d79203..d9e09d5 100644 --- a/dev-flakes/python/flake.nix +++ b/dev-flakes/python/flake.nix @@ -14,15 +14,15 @@ config.allowUnfree = true; }; - python = pkgs.python311; + python = pkgs.python314; in { devShells.default = pkgs.mkShell { - name = "python-ml"; + name = "python"; packages = with pkgs; [ - python314 - python314.pkgs.pygame + python + python.pkgs.pygame #python.pkgs.pip #python.pkgs.virtualenv diff --git a/migrate-regist.sh b/migrate-regist.sh deleted file mode 100644 index 2cddef3..0000000 --- a/migrate-regist.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -FILES=$(rg "modules/.+\.nix" -l hosts) - -for file in $FILES; do - echo "Migrating $file" - - # Skip files that already import registry - if rg "import .*modules" "$file" >/dev/null; then - continue - fi - - # Insert let modules = import … - sed -i '' ' -1s|^|let\n modules = import ../../modules;\nin\n| -' "$file" - - # Replace common patterns - sed -i '' \ - -e 's|../../modules/common/\([^/]*\)\.nix|modules.common.\1|g' \ - -e 's|../../modules/home-manager/Hyprland/\([^/]*\)\.nix|modules.hm.\1|g' \ - -e 's|../../modules/home-manager/\([^/]*\)\.nix|modules.hm.\1|g' \ - -e 's|../../modules/nixos/\([^/]*\)\.nix|modules.nixos.\1|g' \ - "$file" - -done - -echo "✓ Migration pass complete" -echo "⚠️ Please review files manually and fix edge cases." diff --git a/modules/home-manager/Hyprland/hyprland.nix b/modules/home-manager/Hyprland/hyprland.nix index 7804290..1cedc46 100644 --- a/modules/home-manager/Hyprland/hyprland.nix +++ b/modules/home-manager/Hyprland/hyprland.nix @@ -125,6 +125,7 @@ in firefox cava inputs.awww.packages.${pkgs.stdenv.hostPlatform.system}.awww + quickshell # File manager kdePackages.dolphin kdePackages.gwenview