mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 06:18:03 +03:00
add: home-manager,hyprland,kitten and other extras
This commit is contained in:
commit
3615a7b307
56 files changed
+1804
No files matched your search
Generated
+443
@@ -0,0 +1,443 @@
|
||||
{
|
||||
"nodes": {
|
||||
"apple-fonts": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"ny": "ny",
|
||||
"sf-arabic": "sf-arabic",
|
||||
"sf-armenian": "sf-armenian",
|
||||
"sf-compact": "sf-compact",
|
||||
"sf-georgian": "sf-georgian",
|
||||
"sf-hebrew": "sf-hebrew",
|
||||
"sf-mono": "sf-mono",
|
||||
"sf-pro": "sf-pro"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772251183,
|
||||
"narHash": "sha256-Zfr9trB8LaesfpupugDgXPqC4F25MO18kyMyb9b2PkM=",
|
||||
"owner": "Lyndeno",
|
||||
"repo": "apple-fonts.nix",
|
||||
"rev": "f8dad87c2cb956695d18c1f36360322d8a0b7d63",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Lyndeno",
|
||||
"repo": "apple-fonts.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"chaotic": {
|
||||
"inputs": {
|
||||
"flake-schemas": "flake-schemas",
|
||||
"home-manager": "home-manager",
|
||||
"jovian": "jovian",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1765204341,
|
||||
"narHash": "sha256-7xd45skcuLCu2DHxVvU+W/z+7CUOjyv+QPtT4PLZaIU=",
|
||||
"owner": "chaotic-cx",
|
||||
"repo": "nyx",
|
||||
"rev": "aacb796ccd42be1555196c20013b9b674b71df75",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "chaotic-cx",
|
||||
"ref": "nyxpkgs-unstable",
|
||||
"repo": "nyx",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1747046372,
|
||||
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-schemas": {
|
||||
"locked": {
|
||||
"lastModified": 1721999734,
|
||||
"narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=",
|
||||
"rev": "0a5c42297d870156d9c57d8f99e476b738dcd982",
|
||||
"revCount": 75,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.5.tar.gz"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"helium": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1774428965,
|
||||
"narHash": "sha256-uL5wd9mP4A6fg6vNnKl6GTF5MKGzWbgt6kr4cRqyvQM=",
|
||||
"owner": "AlvaroParker",
|
||||
"repo": "helium-nix",
|
||||
"rev": "bef6427c60a6a3ffe64667efaee85e34520b760a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "AlvaroParker",
|
||||
"repo": "helium-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"chaotic",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764998300,
|
||||
"narHash": "sha256-fZatn/KLfHLDXnF0wy7JxXqGaZmGDTVufT4o/AOlj44=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "27a6182347ccae90a88231ae0dc5dfa7d15815bb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1774738535,
|
||||
"narHash": "sha256-2jfBEZUC67IlnxO5KItFCAd7Oc+1TvyV/jQlR+2ykGQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "769e07ef8f4cf7b1ec3b96ef015abec9bc6b1e2a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_3": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"zen-browser",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773422513,
|
||||
"narHash": "sha256-MPjR48roW7CUMU6lu0+qQGqj92Kuh3paIulMWFZy+NQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ef12a9a2b0f77c8fa3dda1e7e494fca668909056",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"jovian": {
|
||||
"inputs": {
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": [
|
||||
"chaotic",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764922999,
|
||||
"narHash": "sha256-LSvUxKm6S6ZAd/otQSkAHd3+8KJhi8OwGJGSe0K//B8=",
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"rev": "9b9ead1b5591b68f4048e7205ba1397bc85ce6c4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-github-actions": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"chaotic",
|
||||
"jovian",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729697500,
|
||||
"narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=",
|
||||
"owner": "zhaofengli",
|
||||
"repo": "nix-github-actions",
|
||||
"rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "zhaofengli",
|
||||
"ref": "matrix-name",
|
||||
"repo": "nix-github-actions",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1764950072,
|
||||
"narHash": "sha256-BmPWzogsG2GsXZtlT+MTcAWeDK5hkbGRZTeZNW42fwA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f61125a668a320878494449750330ca58b78c557",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1774386573,
|
||||
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1773389992,
|
||||
"narHash": "sha256-wvfdLLWJ2I9oEpDd9PfMA8osfIZicoQ5MT1jIwNs9Tk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c06b4ae3d6599a672a6210b7021d699c351eebda",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ny": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-3257NAH4qlan2YHVLpNRy7x8IJqR2pal3OzFo/ykqXs=",
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/NY.dmg"
|
||||
},
|
||||
"original": {
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/NY.dmg"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"apple-fonts": "apple-fonts",
|
||||
"chaotic": "chaotic",
|
||||
"helium": "helium",
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"zen-browser": "zen-browser"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"chaotic",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1765075567,
|
||||
"narHash": "sha256-KFDCdQcHJ0hE3Nt5Gm5enRIhmtEifAjpxgUQ3mzSJpA=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "769156779b41e8787a46ca3d7d76443aaf68be6f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sf-arabic": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-/0gjRimqvZyE60xYxxPdlU+7Q2LJnnvtbmwOP0YmS9U=",
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Arabic.dmg"
|
||||
},
|
||||
"original": {
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Arabic.dmg"
|
||||
}
|
||||
},
|
||||
"sf-armenian": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-rRoDkbNMYkzOHZmQm96Zv80TZvRlAeoxkv4pMHP5nUg=",
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Armenian.dmg"
|
||||
},
|
||||
"original": {
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Armenian.dmg"
|
||||
}
|
||||
},
|
||||
"sf-compact": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-oLhkN4HYkU1Xjxk+xdmyxJmROSzo1qd/tafdxw7icxs=",
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg"
|
||||
},
|
||||
"original": {
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg"
|
||||
}
|
||||
},
|
||||
"sf-georgian": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-IevVNOC28IiR45YfI3PsZzXLMRxuB5u7UiE53Zn6tRU=",
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Georgian.dmg"
|
||||
},
|
||||
"original": {
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Georgian.dmg"
|
||||
}
|
||||
},
|
||||
"sf-hebrew": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-Dw84kYwMpCtKKKqm8cZcQ9TZ7GayU5MO7W0LJw0Rcwk=",
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Hebrew.dmg"
|
||||
},
|
||||
"original": {
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Hebrew.dmg"
|
||||
}
|
||||
},
|
||||
"sf-mono": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-ICdHRFdNL7PM/fXJUzS7LgZxZiqcyIuCMHLze4En4vg=",
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Mono.dmg"
|
||||
},
|
||||
"original": {
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Mono.dmg"
|
||||
}
|
||||
},
|
||||
"sf-pro": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-s42hsaUe0Vkaw5yw8G7G3W3AYJb2TPqSlMqPyY0e5WU=",
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg"
|
||||
},
|
||||
"original": {
|
||||
"type": "file",
|
||||
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zen-browser": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager_3",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1774708879,
|
||||
"narHash": "sha256-rTYvYkQL69/YkZB+MRA/IaX1qJ1lPx5KXoQS2/9+7Mw=",
|
||||
"owner": "0xc000022070",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "d01d23c798cceef42307d5789bfbce70515e8800",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "0xc000022070",
|
||||
"repo": "zen-browser-flake",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
description = "copland nixos configurations";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||
zen-browser.url = "github:0xc000022070/zen-browser-flake";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
helium = {
|
||||
url = "github:AlvaroParker/helium-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
apple-fonts = {
|
||||
url = "github:Lyndeno/apple-fonts.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, chaotic, home-manager, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
copland = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs system; zen-browser = inputs.zen-browser; };
|
||||
|
||||
modules = [
|
||||
chaotic.nixosModules.default
|
||||
# inputs.noctalia.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
|
||||
{ nixpkgs.config.allowUnfree = true; }
|
||||
# { services.noctalia-shell.enable = true; }
|
||||
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit inputs system; };
|
||||
users.elars = import ./home;
|
||||
};
|
||||
}
|
||||
|
||||
./machine.nix
|
||||
./nixos/default.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Executable
+120
@@ -0,0 +1,120 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
[[ $EUID -ne 0 ]] && echo "Run with sudo" && exit 1
|
||||
|
||||
# ── CPU ──────────────────────────────────────────────────────────────────────
|
||||
VENDOR=$(grep -m1 'vendor_id' /proc/cpuinfo | awk '{print $3}')
|
||||
if [[ "$VENDOR" == "AuthenticAMD" ]]; then
|
||||
CPU_MICROCODE="hardware.cpu.amd.updateMicrocode"
|
||||
CPU_KVM="kvm-amd"
|
||||
else
|
||||
CPU_MICROCODE="hardware.cpu.intel.updateMicrocode"
|
||||
CPU_KVM="kvm-intel"
|
||||
fi
|
||||
|
||||
# ── GPU ──────────────────────────────────────────────────────────────────────
|
||||
HAS_AMD=false
|
||||
HAS_NVIDIA=false
|
||||
lspci | grep -qi 'amd\|radeon' && HAS_AMD=true
|
||||
lspci | grep -qi 'nvidia' && HAS_NVIDIA=true
|
||||
|
||||
if $HAS_AMD && $HAS_NVIDIA; then
|
||||
GPU_DRIVER="hybrid-amd-nvidia"
|
||||
elif $HAS_AMD; then
|
||||
GPU_DRIVER="amd"
|
||||
elif $HAS_NVIDIA; then
|
||||
GPU_DRIVER="nvidia"
|
||||
else
|
||||
GPU_DRIVER="intel"
|
||||
fi
|
||||
|
||||
echo "CPU: $VENDOR → $CPU_KVM"
|
||||
echo "GPU: $GPU_DRIVER"
|
||||
echo ""
|
||||
|
||||
INITRD_MODULES=""
|
||||
if [[ "$GPU_DRIVER" == "hybrid-amd-nvidia" ]]; then
|
||||
INITRD_MODULES="\"amdgpu\" \"nvidia\" \"nvidia_modeset\" \"nvidia_uvm\" \"nvidia_drm\""
|
||||
elif [[ "$GPU_DRIVER" == "intel" ]]; then
|
||||
INITRD_MODULES="\"i915\""
|
||||
elif [[ "$GPU_DRIVER" == "amd" ]]; then
|
||||
INITRD_MODULES="\"amdgpu\""
|
||||
elif [[ "$GPU_DRIVER" == "nvidia" ]]; then
|
||||
INITRD_MODULES="\"nvidia\" \"nvidia_modeset\" \"nvidia_uvm\" \"nvidia_drm\""
|
||||
fi
|
||||
|
||||
# ── Disks ────────────────────────────────────────────────────────────────────
|
||||
lsblk -o NAME,SIZE,FSTYPE,UUID,MOUNTPOINT
|
||||
echo ""
|
||||
|
||||
read -rp "Root partition (e.g. /dev/sda2): " ROOT_PART
|
||||
[[ ! -b "$ROOT_PART" ]] && echo "Invalid partition" && exit 1
|
||||
ROOT_UUID=$(blkid -s UUID -o value "$ROOT_PART")
|
||||
ROOT_FSTYPE=$(blkid -s TYPE -o value "$ROOT_PART")
|
||||
echo "Root → $ROOT_UUID ($ROOT_FSTYPE)"
|
||||
|
||||
read -rp "Boot/EFI partition (e.g. /dev/sda1): " BOOT_PART
|
||||
[[ ! -b "$BOOT_PART" ]] && echo "Invalid partition" && exit 1
|
||||
BOOT_UUID=$(blkid -s UUID -o value "$BOOT_PART")
|
||||
echo "Boot → $BOOT_UUID"
|
||||
|
||||
EXTRA_BLOCK=""
|
||||
read -rp "Extra partition? (leave empty to skip): " EXTRA_PART
|
||||
if [[ -n "$EXTRA_PART" ]]; then
|
||||
EXTRA_UUID=$(blkid -s UUID -o value "$EXTRA_PART")
|
||||
EXTRA_FSTYPE=$(blkid -s TYPE -o value "$EXTRA_PART")
|
||||
read -rp "Mount point (e.g. /mnt/hdd): " EXTRA_MOUNT
|
||||
EXTRA_BLOCK="
|
||||
fileSystems.\"$EXTRA_MOUNT\" = {
|
||||
device = \"/dev/disk/by-uuid/$EXTRA_UUID\";
|
||||
fsType = \"$EXTRA_FSTYPE\";
|
||||
options = [ \"defaults\" \"nofail\" ];
|
||||
};
|
||||
"
|
||||
fi
|
||||
|
||||
# ── Write hardware.nix ───────────────────────────────────────────────────────
|
||||
cat > ./hardware.nix <<EOF
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ $INITRD_MODULES ];
|
||||
boot.kernelModules = [ "$CPU_KVM" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/$ROOT_UUID";
|
||||
fsType = "$ROOT_FSTYPE";
|
||||
};
|
||||
$EXTRA_BLOCK
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/$BOOT_UUID";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
$CPU_MICROCODE = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
EOF
|
||||
|
||||
# ── Update machine.nix ───────────────────────────────────────────────────────
|
||||
if grep -q 'elars.hardware.graphics.driver' ./machine.nix; then
|
||||
sed -i "s|elars.hardware.graphics.driver = .*|elars.hardware.graphics.driver = \"$GPU_DRIVER\";|" ./machine.nix
|
||||
echo "Updated driver in machine.nix → $GPU_DRIVER"
|
||||
else
|
||||
echo ""
|
||||
echo "Add this line to machine.nix:"
|
||||
echo " elars.hardware.graphics.driver = \"$GPU_DRIVER\";"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Done. hardware.nix generated."
|
||||
[[ "$GPU_DRIVER" == "hybrid-amd-nvidia" ]] && \
|
||||
echo "PRIME bus IDs needed — run: lspci | grep -E 'VGA|3D'"
|
||||
@@ -0,0 +1,32 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/ebf71dbc-969e-4613-9117-78b4c62e7216";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/mnt/HDD" = {
|
||||
device = "/dev/disk/by-uuid/a9d12042-6501-4725-84bd-6e0bdbb64427";
|
||||
fsType = "ext4";
|
||||
options = [ "defaults" "nofail" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/72CC-9AE7";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{ config, pkgs, inputs, system, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./hyprland.nix ];
|
||||
|
||||
home.username = "elars";
|
||||
home.homeDirectory = "/home/elars";
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
initExtra = builtins.readFile /home/elars/.copdots/zsh/.zshrc;
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
shell = "zsh";
|
||||
confirm_os_window_close = 0;
|
||||
background_opacity = "0.8";
|
||||
cursor_trail = 3;
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"fastfetch".source = /home/elars/.copdots/fastfetch;
|
||||
"fish/functions".source = /home/elars/.copdots/fish/functions;
|
||||
"fish/completions".source = /home/elars/.copdots/fish/completions;
|
||||
"fish/conf.d".source = /home/elars/.copdots/fish/conf.d;
|
||||
};
|
||||
|
||||
# Packs
|
||||
home.packages = with pkgs; [
|
||||
eza bat fzf fd micro fastfetch starship
|
||||
vulkan-tools libva-utils mesa-demos intel-gpu-tools clinfo
|
||||
nerd-fonts.symbols-only
|
||||
|
||||
inputs.apple-fonts.packages.${system}.sf-pro
|
||||
inputs.apple-fonts.packages.${system}.sf-mono
|
||||
];
|
||||
|
||||
programs.starship.enable = true;
|
||||
programs.fzf.enable = true;
|
||||
home.file.".zshrc".source = /home/elars/.copdots/zsh/.zshrc;
|
||||
programs.home-manager.enable = true;
|
||||
fonts.fontconfig.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hyprland/env.nix
|
||||
./hyprland/execs.nix
|
||||
./hyprland/general.nix
|
||||
./hyprland/rules.nix
|
||||
./hyprland/keybinds.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
env = [
|
||||
"XCURSOR_SIZE,24"
|
||||
"XCURSOR_THEME,Bibata-Modern-Classic"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"GDK_BACKEND,wayland,x11"
|
||||
"QT_QPA_PLATFORM,wayland;xcb"
|
||||
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
||||
"TERMINAL,kitty"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
"noctalia-shell"
|
||||
"easyeffects --hide-window --service-mode"
|
||||
"gnome-keyring-daemon --start --components=secrets"
|
||||
"hyprctl setcursor Bibata-Modern-Classic 24"
|
||||
"wl-paste --type text --watch cliphist store"
|
||||
"wl-paste --type image --watch cliphist store"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = ",preferred,auto,1";
|
||||
|
||||
general = {
|
||||
gaps_in = 4;
|
||||
gaps_out = 5;
|
||||
border_size = 1;
|
||||
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||
"col.inactive_border" = "rgba(31313600)";
|
||||
resize_on_border = true;
|
||||
allow_tearing = true;
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
preserve_split = true;
|
||||
smart_split = false;
|
||||
smart_resizing = false;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 18;
|
||||
rounding_power = 2;
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 1.0;
|
||||
dim_inactive = true;
|
||||
dim_strength = 0.05;
|
||||
blur = { enabled = false; };
|
||||
shadow = { enabled = false; };
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "tr";
|
||||
numlock_by_default = true;
|
||||
repeat_delay = 250;
|
||||
repeat_rate = 35;
|
||||
sensitivity = 0.0;
|
||||
accel_profile = "flat";
|
||||
follow_mouse = 1;
|
||||
force_no_accel = true;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
clickfinger_behavior = true;
|
||||
scroll_factor = 0.8;
|
||||
};
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe_distance = 700;
|
||||
workspace_swipe_cancel_ratio = 0.2;
|
||||
workspace_swipe_min_speed_to_force = 5;
|
||||
workspace_swipe_direction_lock = true;
|
||||
workspace_swipe_create_new = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
vfr = 1;
|
||||
mouse_move_enables_dpms = true;
|
||||
key_press_enables_dpms = true;
|
||||
animate_manual_resizes = false;
|
||||
focus_on_activate = false;
|
||||
};
|
||||
|
||||
bezier = [
|
||||
"expressiveDefaultSpatial, 0.38, 1.21, 0.22, 1.00"
|
||||
"emphasizedDecel, 0.05, 0.7, 0.1, 1"
|
||||
"emphasizedAccel, 0.3, 0, 0.8, 0.15"
|
||||
"standardDecel, 0, 0, 0, 1"
|
||||
"menu_decel, 0.1, 1, 0, 1"
|
||||
"menu_accel, 0.52, 0.03, 0.72, 0.08"
|
||||
"stall, 1, -0.1, 0.7, 0.85"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"windowsIn, 1, 3, emphasizedDecel, popin 80%"
|
||||
"windowsOut, 1, 2, emphasizedDecel, popin 90%"
|
||||
"windowsMove,1, 3, emphasizedDecel, slide"
|
||||
"fadeIn, 1, 3, emphasizedDecel"
|
||||
"fadeOut, 1, 2, emphasizedDecel"
|
||||
"border, 1, 10, emphasizedDecel"
|
||||
"layersIn, 1, 2.7, emphasizedDecel, popin 93%"
|
||||
"layersOut, 1, 2.4, menu_accel, popin 94%"
|
||||
"fadeLayersIn, 1, 0.5, menu_decel"
|
||||
"fadeLayersOut, 1, 2.7, stall"
|
||||
"workspaces, 1, 7, menu_decel, slide"
|
||||
"specialWorkspaceIn, 1, 2.8, emphasizedDecel, slidevert"
|
||||
"specialWorkspaceOut, 1, 1.2, emphasizedAccel, slidevert"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
|
||||
bindr = [
|
||||
"$mainMod, SUPER_L, exec, pkill fuzzel || fuzzel"
|
||||
];
|
||||
|
||||
bind = [
|
||||
# launchers
|
||||
"$mainMod, Return, exec, kitty"
|
||||
"$mainMod, W, exec, zen"
|
||||
"$mainMod, C, exec, zed"
|
||||
"$mainMod, E, exec, dolphin"
|
||||
"$mainMod, R, exec, pkill fuzzel || fuzzel"
|
||||
|
||||
# window management
|
||||
"$mainMod, Q, killactive"
|
||||
"$mainMod ALT, SPACE, togglefloating"
|
||||
"$mainMod, F, fullscreen, 0"
|
||||
"$mainMod, D, fullscreen, 1"
|
||||
"$mainMod, P, pin"
|
||||
|
||||
# lock
|
||||
"$mainMod, L, exec, loginctl lock-session"
|
||||
"$mainMod SHIFT, L, exec, systemctl suspend"
|
||||
|
||||
# focus
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
# windows drag
|
||||
"$mainMod SHIFT, left, movewindow, l"
|
||||
"$mainMod SHIFT, right, movewindow, r"
|
||||
"$mainMod SHIFT, up, movewindow, u"
|
||||
"$mainMod SHIFT, down, movewindow, d"
|
||||
|
||||
# workspaces
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# moveworkspace
|
||||
"$mainMod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# s-workspace
|
||||
"$mainMod, S, togglespecialworkspace"
|
||||
"$mainMod ALT, S, movetoworkspacesilent, special"
|
||||
|
||||
# scrolling
|
||||
"$mainMod, mouse_up, workspace, +1"
|
||||
"$mainMod, mouse_down, workspace, -1"
|
||||
|
||||
# screenshot
|
||||
"Super, Print, exec, grim - | wl-copy"
|
||||
"Super SHIFT, S, exec, grim -g \"$(slurp)\" - | wl-copy"
|
||||
];
|
||||
|
||||
# scaling w-mouse
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
# volume
|
||||
bindel = [
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
", XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+"
|
||||
", XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-"
|
||||
];
|
||||
|
||||
# other
|
||||
bindl = [
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle"
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioPause, exec, playerctl play-pause"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
windowrule = [
|
||||
"match:title ^(Open File)(.*)$, float on"
|
||||
"match:title ^(Open File)(.*)$, center on"
|
||||
"match:title ^(Save As)(.*)$, float on"
|
||||
"match:title ^(Save As)(.*)$, center on"
|
||||
"match:title ^(File Upload)(.*)$, float on"
|
||||
"match:title ^(File Upload)(.*)$, center on"
|
||||
"match:class ^(pavucontrol)$, float on"
|
||||
"match:class ^(pavucontrol)$, center on"
|
||||
"match:class ^(pavucontrol)$, size 45% 45%"
|
||||
"match:title ^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$, float on"
|
||||
"match:title ^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$, pin on"
|
||||
"match:title ^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$, keep_aspect_ratio on"
|
||||
"match:class ^(steam_app).*, immediate on"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hypr/default.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
systemd.enable = true;
|
||||
};
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
{ config, pkgs, inputs, system, zen-browser, ... }:
|
||||
let
|
||||
packages = import ./packages.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hardware.nix
|
||||
./nixos
|
||||
];
|
||||
|
||||
elars.hardware.graphics.driver = "intel";
|
||||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
memoryPercent = 100;
|
||||
algorithm = "zstd";
|
||||
priority = 100;
|
||||
};
|
||||
|
||||
environment.systemPackages = packages.system ++ [
|
||||
inputs.helium.packages.${system}.default
|
||||
zen-browser.packages.${system}.default
|
||||
# inputs.noctalia.packages.${system}.default
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.kernelParams = [
|
||||
"i915.enable_guc=2" #make your own params this is for hd4k
|
||||
"i915.fastboot=1"
|
||||
"mitigations=off"
|
||||
"usbcore.autosuspend=-1"
|
||||
];
|
||||
boot.loader = {
|
||||
timeout = 5;
|
||||
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 15;
|
||||
consoleMode = "max";
|
||||
editor = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot
|
||||
./desktop
|
||||
./gaming
|
||||
./hardware
|
||||
./networking
|
||||
./services
|
||||
./system
|
||||
./users
|
||||
./virtualization
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./pipewire.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./display
|
||||
./window-managers
|
||||
./audio
|
||||
];
|
||||
|
||||
xdg.mime = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"image/png" = "org.kde.gwenview.desktop";
|
||||
"image/jpeg" = "org.kde.gwenview.desktop";
|
||||
"image/gif" = "org.kde.gwenview.desktop";
|
||||
"image/bmp" = "org.kde.gwenview.desktop";
|
||||
"image/svg+xml" = "org.kde.gwenview.desktop";
|
||||
"image/webp" = "org.kde.gwenview.desktop";
|
||||
"image/tiff" = "org.kde.gwenview.desktop";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.xserver.enable = true;
|
||||
services.displayManager.ly.enable = true;
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = "tr";
|
||||
variant = "";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
||||
config.common.default = "*";
|
||||
};
|
||||
|
||||
security.polkit.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./steam
|
||||
];
|
||||
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
enableRenice = true;
|
||||
settings = {
|
||||
general = {
|
||||
renice = 10;
|
||||
softrealtime = "auto";
|
||||
ioprio = 0;
|
||||
};
|
||||
gpu = {
|
||||
apply_gpu_optimisations = "accept-responsibility";
|
||||
gpu_device = 0;
|
||||
};
|
||||
cpu = {
|
||||
park_cores = "no";
|
||||
pin_cores = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gamescope
|
||||
protonup-qt
|
||||
mangohud
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.steam.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.bluetooth.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./bluetooth
|
||||
./graphics
|
||||
./udev
|
||||
./keyboard
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
driver = config.elars.hardware.graphics.driver;
|
||||
in {
|
||||
options.elars.hardware.graphics.driver = lib.mkOption {
|
||||
type = lib.types.enum [ "intel" "amd" "nvidia" "hybrid-amd-nvidia" ];
|
||||
default = "intel";
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
}
|
||||
|
||||
(lib.mkIf (driver == "intel") (import ./intel.nix { inherit config lib pkgs; }))
|
||||
(lib.mkIf (driver == "amd") (import ./amd.nix { inherit config lib pkgs; }))
|
||||
(lib.mkIf (driver == "nvidia") (import ./nvidia.nix { inherit config lib pkgs; }))
|
||||
(lib.mkIf (driver == "hybrid-amd-nvidia") (lib.mkMerge [
|
||||
(import ./amd.nix { inherit config lib pkgs; })
|
||||
(import ./nvidia.nix { inherit config lib pkgs; })
|
||||
(import ./prime.nix { inherit config lib pkgs; })
|
||||
]))
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
intel-vaapi-driver
|
||||
libvdpau-va-gl
|
||||
intel-media-driver
|
||||
];
|
||||
|
||||
hardware.graphics.extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
intel-vaapi-driver
|
||||
libvdpau-va-gl
|
||||
];
|
||||
|
||||
services.xserver.videoDrivers = [ "modesetting" ];
|
||||
|
||||
environment.variables = {
|
||||
LIBVA_DRIVER_NAME = "i965";
|
||||
VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/intel_hasvk_icd.x86_64.json";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
open = false; # for 20xx series make true for 30xx and newer
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.nvidia.prime = {
|
||||
offload.enable = true;
|
||||
amdgpuBusId = "PCI:X:X:X"; # TODO
|
||||
nvidiaBusId = "PCI:X:X:X"; # TODO
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.keyboard.qmk.enable = true;
|
||||
|
||||
services.udev.packages = with pkgs; [
|
||||
qmk-udev-rules
|
||||
via
|
||||
vial
|
||||
];
|
||||
|
||||
users.groups.plugdev = {};
|
||||
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
qmk
|
||||
via
|
||||
vial
|
||||
gcc-arm-embedded
|
||||
pkgsCross.avr.buildPackages.gcc
|
||||
pkgsCross.avr.avrlibc
|
||||
avrdude
|
||||
dfu-programmer
|
||||
dfu-util
|
||||
usbutils
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="ttyACM[0-9]*", MODE="0666"
|
||||
KERNEL=="ttyUSB[0-9]*", MODE="0666"
|
||||
'';
|
||||
|
||||
services.udisks2.enable = true;
|
||||
|
||||
services.gvfs.enable = true;
|
||||
|
||||
security.polkit.extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id.match("org.freedesktop.udisks2.") &&
|
||||
subject.isInGroup("wheel")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./vpn
|
||||
./network-manager
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking.hostName = "copland";
|
||||
networking.networkmanager.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# you can make this true if you have problems with zapret
|
||||
services.cloudflare-warp.enable = false;
|
||||
|
||||
# Zapret
|
||||
services.zapret = {
|
||||
enable = true;
|
||||
params = [
|
||||
"--filter-tcp=80"
|
||||
"--dpi-desync=fake,multisplit"
|
||||
"--dpi-desync-split-pos=method+2"
|
||||
"--dpi-desync-fooling=md5sig"
|
||||
|
||||
"--new"
|
||||
|
||||
"--filter-tcp=443"
|
||||
"--dpi-desync=fake,multidisorder"
|
||||
"--dpi-desync-split-pos=1,midsld"
|
||||
"--dpi-desync-fooling=badseq,md5sig"
|
||||
|
||||
"--new"
|
||||
|
||||
"--filter-udp=443"
|
||||
"--dpi-desync=fake"
|
||||
"--dpi-desync-repeats=6"
|
||||
];
|
||||
};
|
||||
|
||||
networking.enableIPv6 = false;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.appimage = {
|
||||
enable = true;
|
||||
binfmt = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./appimage
|
||||
./kde_connect
|
||||
./printing
|
||||
./ssh
|
||||
./security
|
||||
./psql
|
||||
./flatpak
|
||||
./fwupd
|
||||
./samba
|
||||
./performance
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
services.flatpak.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.fwupd.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
{
|
||||
programs.kdeconnect.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.scx = {
|
||||
enable = true;
|
||||
scheduler = "scx_rustland"; #you can find other schedulers to fit your needs
|
||||
};
|
||||
|
||||
services.ananicy = {
|
||||
enable = true;
|
||||
package = pkgs.ananicy-cpp;
|
||||
};
|
||||
|
||||
services.irqbalance.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.cnijfilter2 ];
|
||||
};
|
||||
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
extraBackends = [ pkgs.sane-airscan ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "mydatabase" ];
|
||||
authentication = pkgs.lib.mkOverride 10 ''
|
||||
#type database DBuser auth-method
|
||||
local all all trust
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/samba/usershares 0755 elars users -"
|
||||
];
|
||||
|
||||
environment.etc."samba/smbusers".text = ''
|
||||
nobody = guest
|
||||
'';
|
||||
|
||||
services.samba = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
global = {
|
||||
workgroup = "WORKGROUP";
|
||||
"server string" = config.networking.hostName;
|
||||
"netbios name" = config.networking.hostName;
|
||||
security = "user";
|
||||
"use sendfile" = "yes";
|
||||
"max protocol" = "SMB3";
|
||||
"min protocol" = "SMB2";
|
||||
"hosts allow" = "192.168.1.0/24 127.0.0.1 localhost";
|
||||
"hosts deny" = "0.0.0.0/0";
|
||||
"guest account" = "nobody";
|
||||
"map to guest" = "Bad User";
|
||||
"usershare path" = "/var/lib/samba/usershares";
|
||||
"usershare max shares" = "100";
|
||||
"usershare allow guests" = "yes";
|
||||
"usershare owner only" = "no";
|
||||
"usershare prefix allow list" = "/mnt /home";
|
||||
"idmap config * : backend" = "tdb";
|
||||
"idmap config * : range" = "3000-7999";
|
||||
"username map" = "/etc/samba/smbusers";
|
||||
};
|
||||
|
||||
"HDD" = {
|
||||
path = "/mnt/hdd";
|
||||
browseable = "yes";
|
||||
public = "yes";
|
||||
"read only" = "no";
|
||||
"guest ok" = "yes";
|
||||
"guest only" = "yes";
|
||||
"create mask" = "0777";
|
||||
"directory mask" = "0777";
|
||||
"force user" = config.users.users.elars.name;
|
||||
"force group" = "users";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.samba-wsdd = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
security.wrappers.gsr-kms-server = {
|
||||
owner = "root";
|
||||
group = "root";
|
||||
capabilities = "cap_sys_admin+ep";
|
||||
source = "${pkgs.gpu-screen-recorder}/bin/gsr-kms-server";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.openssh.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./locale
|
||||
./nix
|
||||
./power.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
time.timeZone = "Europe/Istanbul";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "tr_TR.UTF-8";
|
||||
LC_IDENTIFICATION = "tr_TR.UTF-8";
|
||||
LC_MEASUREMENT = "tr_TR.UTF-8";
|
||||
LC_MONETARY = "tr_TR.UTF-8";
|
||||
LC_NAME = "tr_TR.UTF-8";
|
||||
LC_NUMERIC = "tr_TR.UTF-8";
|
||||
LC_PAPER = "tr_TR.UTF-8";
|
||||
LC_TELEPHONE = "tr_TR.UTF-8";
|
||||
LC_TIME = "tr_TR.UTF-8";
|
||||
};
|
||||
|
||||
|
||||
console.keyMap = "trq";
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
max-jobs = "auto";
|
||||
cores = 0;
|
||||
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://nix-community.cachix.org"
|
||||
# "https://noctalia.cachix.org"
|
||||
# "https://quickshell.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
# "noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4="
|
||||
# "quickshell.cachix.org-1:ZmizBFkDp6s3KRnFfGFtEHBblFdSVDpU2eH3b0iFkKkc="
|
||||
];
|
||||
};
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.upower.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.elars = {
|
||||
isNormalUser = true;
|
||||
description = "elars";
|
||||
initialPassword = "1111";
|
||||
extraGroups = [
|
||||
"networkmanager" "wheel" "docker" "plugdev"
|
||||
"video" "audio" "lp" "scanner" "libvirtd"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
flake = "/home/elars/copland";
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
};
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
# security.sudo.wheelNeedsPassword = false;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./docker
|
||||
./vmware
|
||||
./virt-manager
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
virtualisation.vmware.host.enable = true;
|
||||
}
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
{ pkgs }:
|
||||
|
||||
with pkgs; {
|
||||
system = [
|
||||
# Gaming
|
||||
heroic
|
||||
bottles
|
||||
prismlauncher
|
||||
|
||||
# Networking
|
||||
zapret
|
||||
|
||||
# Hardware
|
||||
kdePackages.qtmultimedia
|
||||
qt6Packages.qtbase
|
||||
qt6Packages.qttools
|
||||
qt6Packages.qtsvg
|
||||
qt6Packages.qtdeclarative
|
||||
qt6Packages.qtwayland
|
||||
qt6Packages.qtwebsockets
|
||||
mesa
|
||||
cava
|
||||
direnv
|
||||
|
||||
# MTP support for Android devices
|
||||
libmtp
|
||||
jmtpfs
|
||||
doublecmd
|
||||
rar
|
||||
|
||||
# Iphone stuff
|
||||
libimobiledevice
|
||||
ifuse
|
||||
usbmuxd
|
||||
uxplay
|
||||
|
||||
# Virtualization
|
||||
virt-manager
|
||||
libvirt
|
||||
qemu
|
||||
|
||||
# Desktop
|
||||
bibata-cursors
|
||||
flatpak
|
||||
fuzzel
|
||||
swaylock
|
||||
mako
|
||||
swayidle
|
||||
feh
|
||||
spotatui
|
||||
whatsapp-electron
|
||||
ffmpeg
|
||||
sioyek
|
||||
gsmartcontrol
|
||||
smartmontools
|
||||
eww
|
||||
qbittorrent
|
||||
localsend
|
||||
jellyfin-media-player
|
||||
parted
|
||||
ollama
|
||||
alacritty
|
||||
antigravity
|
||||
|
||||
# Development tools
|
||||
git
|
||||
hidapi
|
||||
cachix
|
||||
dos2unix
|
||||
alsa-lib
|
||||
gnumake
|
||||
unzip
|
||||
luajit
|
||||
btop
|
||||
fastfetch
|
||||
ddcutil
|
||||
brightnessctl
|
||||
lm_sensors
|
||||
fish
|
||||
openssl
|
||||
openssl.dev
|
||||
solaar
|
||||
aubio
|
||||
docker-compose
|
||||
swappy
|
||||
cargo-tauri
|
||||
trunk
|
||||
libqalculate
|
||||
material-symbols
|
||||
nerd-fonts.caskaydia-cove
|
||||
kitty
|
||||
slack
|
||||
dioxus-cli
|
||||
sqlite
|
||||
picotool
|
||||
stripe-cli
|
||||
chromium
|
||||
autossh
|
||||
glib-networking
|
||||
libsoup_3
|
||||
gtk3
|
||||
webkitgtk_4_1
|
||||
xdotool
|
||||
easyeffects
|
||||
|
||||
# Editors
|
||||
vim
|
||||
micro
|
||||
neovim
|
||||
helix
|
||||
vscode
|
||||
zed-editor
|
||||
|
||||
# Languages
|
||||
uv
|
||||
pkg-config
|
||||
odin
|
||||
ghc
|
||||
cabal-install
|
||||
go
|
||||
rustc
|
||||
gcc
|
||||
binutils
|
||||
libGL
|
||||
wget
|
||||
glm
|
||||
glib
|
||||
glibc
|
||||
zlib
|
||||
zig
|
||||
lua
|
||||
|
||||
# Hyprland
|
||||
waybar
|
||||
wofi
|
||||
|
||||
# Desktop tools
|
||||
wl-clipboard
|
||||
grim
|
||||
slurp
|
||||
imagemagick
|
||||
nixos-icons
|
||||
papirus-icon-theme
|
||||
adwaita-icon-theme
|
||||
gnome-icon-theme
|
||||
hicolor-icon-theme
|
||||
pantheon.elementary-icon-theme
|
||||
tango-icon-theme
|
||||
arc-icon-theme
|
||||
shared-mime-info
|
||||
qalculate-gtk
|
||||
kdePackages.gwenview
|
||||
mpv
|
||||
equibop
|
||||
pavucontrol
|
||||
playerctl
|
||||
pamixer
|
||||
alsa-utils
|
||||
zip
|
||||
calibre
|
||||
ani-cli
|
||||
gnome-themes-extra
|
||||
|
||||
# Fonts
|
||||
noto-fonts-cjk-sans
|
||||
nerd-fonts.jetbrains-mono
|
||||
|
||||
# Applications
|
||||
thunderbird
|
||||
firefox
|
||||
telegram-desktop
|
||||
ghostty
|
||||
onlyoffice-desktopeditors
|
||||
kdePackages.dolphin
|
||||
wine
|
||||
];
|
||||
}
|
||||
Reference in new issue
Block a user