Merge pull request 'structural-rework' (#1) from structural-rework into main

Reviewed-on: #1
This commit is contained in:
GHOSCHT 2023-12-29 10:35:45 +01:00
commit 01e315370e
112 changed files with 2779 additions and 1738 deletions

View file

@ -1,5 +1,245 @@
{
"nodes": {
"arkenfox": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"pre-commit": "pre-commit"
},
"locked": {
"lastModified": 1701036929,
"narHash": "sha256-5TkAr5a3EoY9/oeO53SU+FRNfOUTpChj7mEW/Ax3T1w=",
"owner": "dwarfmaster",
"repo": "arkenfox-nixos",
"rev": "1c9d061a4ef7bf3ce8a5260eaee4acdb3ee097f9",
"type": "github"
},
"original": {
"owner": "dwarfmaster",
"repo": "arkenfox-nixos",
"type": "github"
}
},
"base16-schemes": {
"flake": false,
"locked": {
"lastModified": 1689473676,
"narHash": "sha256-L0RhUr9+W5EPWBpLcmkKpUeCEWRs/kLzVMF3Vao2ZU0=",
"owner": "tinted-theming",
"repo": "base16-schemes",
"rev": "d95123ca6377cd849cfdce92c0a24406b0c6a789",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-schemes",
"type": "github"
}
},
"crane": {
"inputs": {
"nixpkgs": [
"xremap",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701386725,
"narHash": "sha256-w4aBlMYh9Y8co1V80m5LzEKMijUJ7CBTq209WbqVwUU=",
"owner": "ipetkov",
"repo": "crane",
"rev": "8b9bad9b30bd7a9ed08782e64846b7485f9d0a38",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"devshell": {
"inputs": {
"nixpkgs": "nixpkgs_3",
"systems": "systems_3"
},
"locked": {
"lastModified": 1700815693,
"narHash": "sha256-JtKZEQUzosrCwDsLgm+g6aqbP1aseUl1334OShEAS3s=",
"owner": "numtide",
"repo": "devshell",
"rev": "7ad1c417c87e98e56dcef7ecd0e0a2f2e5669d51",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"firefox-addons": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1703515744,
"narHash": "sha256-x/Oz43zeFewMyDglI4AGfyv7xgJZCL75/RL+kGwahto=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "3776272394cb8b1caf3db29bc6dc853f11208b46",
"type": "gitlab"
},
"original": {
"dir": "pkgs/firefox-addons",
"owner": "rycee",
"repo": "nur-expressions",
"type": "gitlab"
}
},
"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": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1698882062,
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"locked": {
"lastModified": 1629284811,
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c5d161cc0af116a2e17f54316f0bf43f0819785c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"arkenfox",
"pre-commit",
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"hardware": {
"locked": {
"lastModified": 1702453208,
"narHash": "sha256-0wRi9SposfE2wHqjuKt8WO2izKB/ASDOV91URunIqgo=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "7763c6fd1f299cb9361ff2abf755ed9619ef01d6",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixos-hardware",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -7,16 +247,34 @@
]
},
"locked": {
"lastModified": 1695108154,
"narHash": "sha256-gSg7UTVtls2yO9lKtP0yb66XBHT1Fx5qZSZbGMpSn2c=",
"lastModified": 1703113038,
"narHash": "sha256-oxkyzjpD+mNT7arzU/zHrkNHLuY9tKwmnD2MNaZiSDw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "07682fff75d41f18327a871088d20af2710d4744",
"rev": "0c2353d5d930c3d93724df6858aef064a31b3c00",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1701071203,
"narHash": "sha256-lQywA7QU/vzTdZ1apI0PfgCWNyQobXUYghVrR5zuIeM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "db1878f013b52ba5e4034db7c1b63e8d04173a86",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
@ -24,19 +282,17 @@
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"nixpkgs": [
"nixpkgs-unstable"
],
"systems": "systems",
"nixpkgs": "nixpkgs_5",
"systems": "systems_4",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1697151905,
"narHash": "sha256-sfuiRn7D5D2NzDkXXN/DUUcs2d1ddlf3VmzDBzDO2Tk=",
"lastModified": 1701370414,
"narHash": "sha256-Q7A8BWWS1YndiNaAKM0IP73SGKJiQDfOdZAIdTLGNj8=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "3a61350286de842c7f1566c38e2b42821080ddf4",
"rev": "b394c1695c05cf3b2133a473aa459d4cd750911b",
"type": "github"
},
"original": {
@ -48,10 +304,12 @@
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"xremap",
"hyprland",
"nixpkgs"
],
"systems": [
"xremap",
"hyprland",
"systems"
]
@ -70,32 +328,105 @@
"type": "github"
}
},
"nix-filter": {
"nh": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1693833173,
"narHash": "sha256-hlMABKrGbEiJD5dwUSfnw1CQ3bG7KKwDV+Nx3bEZd7U=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "ac030bd9ba98e318e1f4c4328d60766ade8ebe8b",
"lastModified": 1703024852,
"narHash": "sha256-mVJ/99zkqpqDDs68jYIVYyQH6NBgciKnUg8AfWyXSAM=",
"owner": "viperml",
"repo": "nh",
"rev": "37b0d469a328a5b5969eacdf137f1e6b86c75a1d",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nix-filter",
"owner": "viperml",
"repo": "nh",
"type": "github"
}
},
"nix-colors": {
"inputs": {
"base16-schemes": "base16-schemes",
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1695388192,
"narHash": "sha256-2jelpE7xK+4M7jZNyWL7QYOYegQLYBDQS5bvdo8XRUQ=",
"owner": "misterio77",
"repo": "nix-colors",
"rev": "37227f274b34a3b51649166deb94ce7fec2c6a4c",
"type": "github"
},
"original": {
"owner": "misterio77",
"repo": "nix-colors",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1696983906,
"narHash": "sha256-L7GyeErguS7Pg4h8nK0wGlcUTbfUMDu+HMf1UcyP72k=",
"owner": "nixos",
"lastModified": 1689261696,
"narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bd1cde45c77891214131cbbea5b1203e485a9d51",
"rev": "df1eee2aa65052a18121ed4971081576b25d6b5c",
"type": "github"
},
"original": {
"owner": "nixos",
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1694911725,
"narHash": "sha256-8YqI+YU1DGclEjHsnrrGfqsQg3Wyga1DfTbJrN3Ud0c=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "819180647f428a3826bfc917a54449da1e532ce0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-lib_2": {
"locked": {
"dir": "lib",
"lastModified": 1698611440,
"narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1685801374,
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
@ -117,53 +448,167 @@
"type": "github"
}
},
"nur": {
"nixpkgs_2": {
"locked": {
"lastModified": 1697208312,
"narHash": "sha256-pLhWx1QA0hLBgA7KoOeYWxQYqOUYSdoTAoDEEhMGx80=",
"owner": "nix-community",
"repo": "NUR",
"rev": "90683b5b6b475583fb307cd9d557e91881dccbcd",
"lastModified": 1703068421,
"narHash": "sha256-WSw5Faqlw75McIflnl5v7qVD/B3S2sLh+968bpOGrWA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d65bceaee0fb1e64363f7871bc43dc1c6ecad99f",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"owner": "nixos",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1677383253,
"narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9952d6bc395f5841262b006fbace8dd7e143b634",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1700794826,
"narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1700612854,
"narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "19cbff58383a4ae384dea4d1d0c823d72b49d614",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1701336116,
"narHash": "sha256-kEmpezCR/FpITc6yMbAh4WrOCiT2zg5pSjnKrq51h5Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f5c27c6136db4d76c30e533c20517df6864c46ee",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2",
"gitignore": "gitignore",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1700922917,
"narHash": "sha256-ej2fch/T584b5K9sk1UhmZF7W6wEfDHuoUYpFN8dtvM=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "e5ee5c5f3844550c01d2131096c7271cec5e9b78",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"arkenfox": "arkenfox",
"firefox-addons": "firefox-addons",
"hardware": "hardware",
"home-manager": "home-manager",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs",
"nh": "nh",
"nix-colors": "nix-colors",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur",
"split-monitor-workspaces": "split-monitor-workspaces"
}
},
"split-monitor-workspaces": {
"inputs": {
"hyprland": [
"hyprland"
],
"nix-filter": "nix-filter"
},
"locked": {
"lastModified": 1697056199,
"narHash": "sha256-Tkd4cI4Vq6cczZjiZdfs1Q9Gke+4iL1+S3c2GAGhEvc=",
"owner": "Duckonaut",
"repo": "split-monitor-workspaces",
"rev": "9b40de35aeb8c62df3326eae7979b438f3ee0fb1",
"type": "github"
},
"original": {
"owner": "Duckonaut",
"repo": "split-monitor-workspaces",
"type": "github"
"xremap": "xremap"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"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": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
@ -182,42 +627,45 @@
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1696410538,
"narHash": "sha256-ecDhdYLXWHsxMv+EWG36mCNDvzRbu9qfjH7dLxL7aGM=",
"lastModified": 1701368958,
"narHash": "sha256-7kvyoA91etzVEl9mkA/EJfB6z/PltxX7Xc4gcr7/xlo=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "3406c1b17a4a7e6d4e2a7d9c1176affa72bce1bc",
"rev": "5d639394f3e83b01596dcd166a44a9a1a2583350",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"rev": "3406c1b17a4a7e6d4e2a7d9c1176affa72bce1bc",
"rev": "5d639394f3e83b01596dcd166a44a9a1a2583350",
"type": "gitlab"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"xremap",
"hyprland",
"hyprland-protocols"
],
"nixpkgs": [
"xremap",
"hyprland",
"nixpkgs"
],
"systems": [
"xremap",
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1694628480,
"narHash": "sha256-Qg9hstRw0pvjGu5hStkr2UX1D73RYcQ9Ns/KnZMIm9w=",
"lastModified": 1700508250,
"narHash": "sha256-X4o/mifI7Nhu0UKYlxx53wIC+gYDo3pVM9L2u3PE2bE=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "8f45a6435069b9e24ebd3160eda736d7a391cbf2",
"rev": "eb120ff25265ecacd0fc13d7dab12131b60d0f47",
"type": "github"
},
"original": {
@ -225,6 +673,47 @@
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
},
"xremap": {
"inputs": {
"crane": "crane",
"devshell": "devshell",
"flake-parts": "flake-parts",
"home-manager": "home-manager_2",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs_6",
"xremap": "xremap_2"
},
"locked": {
"lastModified": 1701816620,
"narHash": "sha256-axgWrKpoV1T7KVbbT+3H/Q6mcBdUKylIz6ClFCMRxlA=",
"owner": "xremap",
"repo": "nix-flake",
"rev": "5b264392686e6caee50c9b12cb290b7d0f23cf93",
"type": "github"
},
"original": {
"owner": "xremap",
"repo": "nix-flake",
"type": "github"
}
},
"xremap_2": {
"flake": false,
"locked": {
"lastModified": 1701234505,
"narHash": "sha256-7k6GsKDUBvhKL9JU/QkWO+IHvhaty1udOYP8fXKr9QY=",
"owner": "k0kubun",
"repo": "xremap",
"rev": "97268d1d92d94609daddff1230c4ca77d54a84dd",
"type": "github"
},
"original": {
"owner": "k0kubun",
"ref": "v0.8.12",
"repo": "xremap",
"type": "github"
}
}
},
"root": "root",

141
flake.nix
View file

@ -1,76 +1,93 @@
#
# flake.nix *
# ├─ ./hosts
# │ └─ default.nix
# ├─ ./darwin
# │ └─ default.nix
# └─ ./nix
# └─ default.nix
#
{
description = "Nix, NixOS and Nix Darwin System Flake Configuration";
description = "Your new nix config";
inputs =
# References Used by Flake
{
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; # Stable Nix Packages (Default)
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # Unstable Nix Packages
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
# You can access packages and modules from different nixpkgs revs
# at the same time. Here's an working example:
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
home-manager = {
# User Environment Manager
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
# Home manager
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nur = {
# NUR Community Packages
url = "github:nix-community/NUR"; # Requires "nur.nixosModules.nur" to be added to the host modules
};
hyprland = {
# Official Hyprland Flake
url = "github:hyprwm/Hyprland"; # Requires "hyprland.nixosModules.default" to be added the host modules
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
split-monitor-workspaces = {
url = "github:Duckonaut/split-monitor-workspaces";
inputs.hyprland.follows = "hyprland"; # <- make sure this line is present for the plugin to work as intended
};
hardware.url = "github:nixos/nixos-hardware";
nh = {
url = "github:viperml/nh";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-colors.url = "github:misterio77/nix-colors";
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
arkenfox = {
url = "github:dwarfmaster/arkenfox-nixos";
inputs.nixpkgs.follows = "nixpkgs";
};
xremap.url = "github:xremap/nix-flake";
};
outputs = inputs @ {
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
home-manager,
nur,
hyprland,
split-monitor-workspaces,
arkenfox,
...
}:
# Function telling flake which inputs to use
let
vars = {
# Variables Used In Flake
user = "ghoscht";
location = "$HOME/.setup";
terminal = "alacritty";
editor = "nvim";
};
} @ inputs: let
inherit (self) outputs;
# Supported systems for your flake packages, shell, etc.
systems = [
"aarch64-linux"
"i686-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
# This is a function that generates an attribute by calling a function you
# pass to it, with each system as an argument
forAllSystems = nixpkgs.lib.genAttrs systems;
vars = import ./vars.nix;
in {
nixosConfigurations = ( # NixOS Configurations
import ./hosts {
inherit (nixpkgs) lib;
inherit inputs nixpkgs nixpkgs-unstable home-manager nur hyprland split-monitor-workspaces vars; # Inherit inputs
}
);
# Your custom packages
# Accessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
# Formatter for your nix files, available through 'nix fmt'
# Other options beside 'alejandra' include 'nixpkgs-fmt'
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
homeConfigurations = ( # Nix Configurations
import ./nix/home.nix {
inherit (nixpkgs) lib;
inherit inputs nixpkgs nixpkgs-unstable home-manager vars hyprland split-monitor-workspaces;
}
);
# Your custom packages and modifications, exported as overlays
overlays = import ./overlays {inherit inputs;};
# Reusable nixos modules you might want to export
# These are usually stuff you would upstream into nixpkgs
nixosModules = import ./modules/nixos;
# Reusable home-manager modules you might want to export
# These are usually stuff you would upstream into home-manager
homeManagerModules = import ./modules/home-manager;
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
adalbert = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs vars;};
modules = [
./hosts/adalbert
];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"ghoscht@adalbert" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs vars;};
modules = [
./home/adalbert.nix
];
};
};
};
}

46
home/adalbert.nix Normal file
View file

@ -0,0 +1,46 @@
{
inputs,
outputs,
...
}: let
in {
imports = [
./global
./features/desktop/awesome
./features/games
./features/coding
inputs.nix-colors.homeManagerModules.default
];
colorScheme = inputs.nix-colors.colorSchemes.catppuccin-mocha;
# wallpaper = outputs.wallpapers.cyberpunk-city-red;
#
# # ------ ----- ------
# # | DP-3 | | DP-1| | DP-2 |
# # ------ ----- ------
# monitors = [
# {
# name = "DP-3";
# width = 1920;
# height = 1080;
# x = 0;
# workspace = "3";
# enabled = false;
# }
# {
# name = "DP-1";
# width = 2560;
# height = 1080;
# x = 1920;
# workspace = "1";
# primary = true;
# }
# {
# name = "DP-2";
# width = 1920;
# height = 1080;
# x = 4480;
# workspace = "2";
# }
# ];
}

View file

@ -0,0 +1,6 @@
{
programs.bat = {
enable = true;
config.theme = "base16";
};
}

View file

@ -0,0 +1,98 @@
{config, ...}: {
programs.btop = {
enable = true;
settings = {
color_theme = "nix-colors";
theme_background = false;
truecolor = true;
vim_keys = true;
rounded_corners = true;
proc_gradient = false;
};
};
xdg.configFile."btop/themes/nix-colors".text = ''
# Main background, empty for terminal default, need to be empty if you want transparent background
# theme[main_bg]="#${config.colorScheme.colors.base00}"
# Main text color
theme[main_fg]="#${config.colorScheme.colors.base05}"
# Title color for boxes
theme[title]="#${config.colorScheme.colors.base05}"
# Highlight color for keyboard shortcuts
theme[hi_fg]="#${config.colorScheme.colors.base0D}"
# Background color of selected item in processes box
theme[selected_bg]="#${config.colorScheme.colors.base03}"
# Foreground color of selected item in processes box
theme[selected_fg]="#${config.colorScheme.colors.base0D}"
# Color of inactive/disabled text
theme[inactive_fg]="#${config.colorScheme.colors.base02}"
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
theme[graph_text]="#${config.colorScheme.colors.base06}"
# Background color of the percentage meters
theme[meter_bg]="#${config.colorScheme.colors.base03}"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#${config.colorScheme.colors.base06}"
# CPU, Memory, Network, Proc box outline colors
theme[cpu_box]="#${config.colorScheme.colors.base0E}" #Mauve
theme[mem_box]="#${config.colorScheme.colors.base0B}" #Green
theme[net_box]="#${config.colorScheme.colors.base08}" #Maroon
theme[proc_box]="#${config.colorScheme.colors.base0D}" #Blue
# Box divider line and small boxes line color
theme[div_line]="#${config.colorScheme.colors.base04}"
# Temperature graph color (Green -> Yellow -> Red)
theme[temp_start]="#${config.colorScheme.colors.base0B}"
theme[temp_mid]="#${config.colorScheme.colors.base0A}"
theme[temp_end]="#${config.colorScheme.colors.base08}"
# CPU graph colors (Teal -> Lavender)
theme[cpu_start]="#${config.colorScheme.colors.base0C}"
theme[cpu_mid]="#${config.colorScheme.colors.base0D}"
theme[cpu_end]="#${config.colorScheme.colors.base07}"
# Mem/Disk free meter (Mauve -> Lavender -> Blue)
theme[free_start]="#${config.colorScheme.colors.base0E}"
theme[free_mid]="#${config.colorScheme.colors.base07}"
theme[free_end]="#${config.colorScheme.colors.base0D}"
# Mem/Disk cached meter (Sapphire -> Lavender)
theme[cached_start]="#${config.colorScheme.colors.base0D}"
theme[cached_mid]="#${config.colorScheme.colors.base0D}"
theme[cached_end]="#${config.colorScheme.colors.base07}"
# Mem/Disk available meter (Peach -> Red)
theme[available_start]="#${config.colorScheme.colors.base0F}"
theme[available_mid]="#${config.colorScheme.colors.base09}"
theme[available_end]="#${config.colorScheme.colors.base08}"
# Mem/Disk used meter (Green -> Sky)
theme[used_start]="#${config.colorScheme.colors.base0B}"
theme[used_mid]="#${config.colorScheme.colors.base0C}"
theme[used_end]="#${config.colorScheme.colors.base0D}"
# Download graph colors (Peach -> Red)
theme[download_start]="#${config.colorScheme.colors.base0F}"
theme[download_mid]="#${config.colorScheme.colors.base09}"
theme[download_end]="#${config.colorScheme.colors.base08}"
# Upload graph colors (Green -> Sky)
theme[upload_start]="#${config.colorScheme.colors.base0B}"
theme[upload_mid]="#${config.colorScheme.colors.base0C}"
theme[upload_end]="#${config.colorScheme.colors.base0D}"
# Process box color gradient for threads, mem and cpu usage (Sapphire -> Mauve)
theme[process_start]="#${config.colorScheme.colors.base0D}"
theme[process_mid]="#${config.colorScheme.colors.base0C}"
theme[process_end]="#${config.colorScheme.colors.base0E}"
'';
}

View file

@ -0,0 +1,32 @@
{pkgs, ...}: {
imports = [
./bat.nix
./direnv.nix
./fish.nix
./git.nix
./gpg.nix
./btop.nix
./nix-index.nix
./lazygit.nix
];
home.packages = with pkgs; [
comma # Install and run programs by sticking a , before them
distrobox # Nice escape hatch, integrates docker images with my environment
bc # Calculator
eza # Better ls
ripgrep # Better grep
fd # Better find
httpie # Better curl
diffsitter # Better diff
jq # JSON pretty printer and manipulator
timer # To help with my ADHD paralysis
lazydocker # Docker TUI
neofetch
tldr # nice & short manual snippets
nvd # Differ
nix-output-monitor
nh # Nice wrapper for NixOS and HM
];
}

View file

@ -0,0 +1,6 @@
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}

View file

@ -0,0 +1,85 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf;
hasPackage = pname: lib.any (p: p ? pname && p.pname == pname) config.home.packages;
hasRipgrep = hasPackage "ripgrep";
hasExa = hasPackage "eza";
hasLazygit = config.programs.lazygit.enable;
hasLazydocker = hasPackage "lazydocker";
hasNixYourShell = hasPackage "nix-your-shell";
hasShellColor = config.programs.shellcolor.enable;
shellcolor = "${pkgs.shellcolord}/bin/shellcolor";
in {
programs.fish = {
enable = true;
interactiveShellInit = ''
${
if hasNixYourShell
then "nix-your-shell fish | source"
else ""
}
'';
plugins = [
{
name = "grc";
src = pkgs.fishPlugins.grc.src;
}
{
name = "fzf";
src = pkgs.fishPlugins.fzf.src;
}
{
name = "tide";
src = pkgs.fishPlugins.tide.src;
}
{
name = "sponge";
src = pkgs.fishPlugins.sponge.src;
}
{
name = "autopair";
src = pkgs.fishPlugins.autopair.src;
}
];
shellAliases = {
lzg = mkIf hasLazygit "lazygit";
lzd = mkIf hasLazydocker "lazydocker";
batt = ''upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -e "percentage" -e "state"'';
hx = "~/Documents/heliox-cli/target/debug/heliox-cli --mode";
slp = "systemctl suspend";
sdn = "shutdown 0";
nrs = "nh os switch ~/.setup";
};
shellAbbrs = rec {
jqless = "jq -C | less -r";
n = "nix";
nd = "nix develop -c $SHELL";
ns = "nix shell";
nsn = "nix shell nixpkgs#";
nb = "nix build";
nbn = "nix build nixpkgs#";
nf = "nix flake";
ls = mkIf hasExa "eza";
exa = mkIf hasExa "eza";
};
functions = {
# Disable greeting
fish_greeting = "";
fish_init_custom = ''
tide configure --auto --style=Rainbow --prompt_colors='True color' --show_time=No --rainbow_prompt_separators=Vertical --powerline_prompt_heads=Slanted --powerline_prompt_tails=Flat --powerline_prompt_style='Two lines, frame' --prompt_connection=Solid --powerline_right_prompt_frame=No --prompt_connection_andor_frame_color=Darkest --prompt_spacing=Compact --icons='Many icons' --transient=Yes
'';
};
};
home.packages = with pkgs; [grc fzf nix-your-shell];
# Applies tide configure on rebuild
home.activation.configureTide = lib.hm.dag.entryAfter ["writeBoundary"] ''
${pkgs.fish}/bin/fish -c "fish_init_custom"
'';
}

21
home/features/cli/git.nix Normal file
View file

@ -0,0 +1,21 @@
{pkgs, ...}: {
#Prefer IPv4 for ssh
home.file.".ssh/config".text = "AddressFamily inet";
programs.git = {
enable = true;
userName = "GHOSCHT";
userEmail = "31184695+GHOSCHT@users.noreply.github.com";
package = pkgs.gitAndTools.gitFull;
extraConfig = {
commit.gpgsign = true;
user.signingkey = "0x2C2C1C62A5388E82";
init.defaultBranch = "main";
};
lfs.enable = true;
aliases = {
graph = "log --decorate --oneline --graph";
};
};
}

25
home/features/cli/gpg.nix Normal file
View file

@ -0,0 +1,25 @@
{
lib,
pkgs,
...
}: {
programs.gpg = {
enable = true;
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
enableFishIntegration = true;
enableZshIntegration = true;
pinentryFlavor = "gnome3";
};
# Prevent clobbering SSH_AUTH_SOCK
home.sessionVariables.GSM_SKIP_SSH_AGENT_WORKAROUND = "1";
# Disable gnome-keyring ssh-agent
xdg.configFile."autostart/gnome-keyring-ssh.desktop".text = ''
${lib.fileContents "${pkgs.gnome3.gnome-keyring}/etc/xdg/autostart/gnome-keyring-ssh.desktop"}
Hidden=true
'';
}

View file

@ -0,0 +1,21 @@
{config, ...}: {
programs.lazygit = {
enable = true;
settings = with config.colorScheme.colors; {
gui = {
theme = {
activeBorderColor = ["#${base0D}" "bold"];
inactiveBorderColor = ["#${base05}"];
optionsTextColor = ["#${base0D}"];
selectedLineBgColor = ["${base02}"];
selectedRangeBgColor = ["${base02}"];
cherryPickedCommitBgColor = ["#${base03}"];
cherryPickedCommitFgColor = ["#${base0D}"];
unstagedChangesColor = ["#${base08}"];
defaultFgColor = ["#${base05}"];
searchingActiveBorderColor = ["#${base0A}"];
};
};
};
};
}

View file

@ -0,0 +1,33 @@
{pkgs, ...}: let
update-script = pkgs.writeShellApplication {
name = "fetch-nix-index-database";
runtimeInputs = with pkgs; [wget coreutils];
text = ''
filename="index-x86_64-linux"
mkdir -p ~/.cache/nix-index
cd ~/.cache/nix-index
wget -N "https://github.com/Mic92/nix-index-database/releases/latest/download/$filename"
ln -f "$filename" files
'';
};
in {
programs.nix-index.enable = true;
systemd.user.services.nix-index-database-sync = {
Unit = {Description = "fetch mic92/nix-index-database";};
Service = {
Type = "oneshot";
ExecStart = "${update-script}/bin/fetch-nix-index-database";
Restart = "on-failure";
RestartSec = "5m";
};
};
systemd.user.timers.nix-index-database-sync = {
Unit = {Description = "Automatic github:mic92/nix-index-database fetching";};
Timer = {
OnBootSec = "10m";
OnUnitActiveSec = "24h";
};
Install = {WantedBy = ["timers.target"];};
};
}

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
imports = [
./nvim
./vscode.nix
./intellij.nix
];
}

View file

@ -0,0 +1,5 @@
{pkgs, ...}: {
home.packages = with pkgs.unstable; [
(jetbrains.plugins.addPlugins jetbrains.idea-ultimate ["ideavim"])
];
}

View file

@ -0,0 +1,186 @@
{
config,
lib,
pkgs,
# vars,
...
}: let
vars = import ../../../../vars.nix;
colors = config.colorScheme.colors;
in {
home.sessionVariables.EDITOR = "nvim";
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
extraPackages = with pkgs; [
# LSP
lua-language-server
lua
rnix-lsp # nix
# Formatters
stylua # lua
black # pyton
alejandra # nix
clang-tools_16 # c/c++
# Linters
ruff # python
nodePackages.jsonlint # json
nodePackages.eslint_d # javascript
# Tools
xclip
wl-clipboard
fzf
gcc
];
plugins = with pkgs.vimPlugins; [
{
plugin = neodev-nvim;
type = "lua";
config = ''
require("neodev").setup({
override = function(root_dir, library)
if root_dir:find("/home/${vars.user + "/" + vars.dir_name}", 1, true) == 1 then
library.enabled = true
library.plugins = true
end
end,
})
'';
}
{
plugin = nvim-lspconfig;
config = builtins.readFile ./plugin/lsp.lua;
type = "lua";
}
{
plugin = comment-nvim;
config = "require('Comment').setup()";
type = "lua";
}
nvim-cmp
{
plugin = nvim-cmp;
config = builtins.readFile ./plugin/cmp.lua;
type = "lua";
}
{
plugin = telescope-nvim;
config = builtins.readFile ./plugin/telescope.lua;
type = "lua";
}
telescope-fzf-native-nvim
telescope-ui-select-nvim
cmp_luasnip
cmp-nvim-lsp
luasnip
friendly-snippets
{
plugin = nvim-treesitter.withAllGrammars;
config = builtins.readFile ./plugin/treesitter.lua;
type = "lua";
}
vim-nix
{
plugin = nvim-base16;
config = ''
require('base16-colorscheme').setup({
base00 = '#${colors.base00}', base01 = '#${colors.base01}', base02 = '#${colors.base02}', base03 = '#${colors.base03}',
base04 = '#${colors.base04}', base05 = '#${colors.base05}', base06 = '#${colors.base06}', base07 = '#${colors.base07}',
base08 = '#${colors.base08}', base09 = '#${colors.base09}', base0A = '#${colors.base0A}', base0B = '#${colors.base0B}',
base0C = '#${colors.base0C}', base0D = '#${colors.base0D}', base0E = '#${colors.base0E}', base0F = '#${colors.base0F}',
})'';
type = "lua";
}
{
plugin = lualine-nvim;
config = builtins.readFile ./plugin/lualine.lua;
type = "lua";
}
nvim-web-devicons
plenary-nvim
nui-nvim
{
plugin = neo-tree-nvim;
type = "lua";
}
{
plugin = gitsigns-nvim;
config = "require('gitsigns').setup()";
type = "lua";
}
diffview-nvim
lazygit-nvim
{
plugin = todo-comments-nvim;
config = builtins.readFile ./plugin/todo.lua;
type = "lua";
}
{
plugin = alpha-nvim;
config = builtins.readFile ./plugin/alpha.lua;
type = "lua";
}
{
plugin = none-ls-nvim;
config = builtins.readFile ./plugin/none-ls.lua;
type = "lua";
}
];
};
xdg.desktopEntries = {
nvim = {
name = "Neovim";
genericName = "Text Editor";
comment = "Edit text files";
exec = "nvim %F";
icon = "nvim";
mimeType = [
"text/english"
"text/plain"
"text/x-makefile"
"text/x-c++hdr"
"text/x-c++src"
"text/x-chdr"
"text/x-csrc"
"text/x-java"
"text/x-moc"
"text/x-pascal"
"text/x-tcl"
"text/x-tex"
"application/x-shellscript"
"text/x-c"
"text/x-c++"
];
terminal = true;
type = "Application";
categories = ["Utility" "TextEditor"];
};
};
}

View file

@ -0,0 +1,18 @@
vim.g.mapleader = " "
vim.g.maplocalleader = " "
vim.o.clipboard = "unnamedplus"
vim.o.number = true
vim.o.relativenumber = true
vim.o.signcolumn = "yes"
vim.o.tabstop = 4
vim.o.shiftwidth = 4
vim.o.updatetime = 300
vim.o.termguicolors = true
vim.o.mouse = "a"

View file

@ -0,0 +1,32 @@
local dashboard = require("alpha.themes.dashboard")
local function button(sc, txt, keybind, keybind_opts)
local b = dashboard.button(sc, txt, keybind, keybind_opts)
b.opts.hl = "Identifier"
b.opts.hl_shortcut = "Identifier"
return b
end
dashboard.section.buttons.val = {
button("r", " > Recent files", ":Telescope oldfiles<CR>"),
button("n", " > New file", ":ene <BAR> startinsert <CR>"),
button("f", " > Find files", ":Telescope find_files hidden=true<CR>"),
button("u", " > Update plugins", ":PackerSync<CR>"),
button("q", " > Quit Neovim", ":qa<CR>"),
}
dashboard.section.footer.val = require("alpha.fortune")
dashboard.section.header.val = {
[[ ███▄ █ ▓█████ ▒█████ ██▒ █▓ ██▓ ███▄ ▄███▓]],
[[ ██ ▀█ █ ▓█ ▀ ▒██▒ ██▒▓██░ █▒▓██▒▓██▒▀█▀ ██▒]],
[[▓██ ▀█ ██▒▒███ ▒██░ ██▒ ▓██ █▒░▒██▒▓██ ▓██░]],
[[▓██▒ ▐▌██▒▒▓█ ▄ ▒██ ██░ ▒██ █░░░██░▒██ ▒██ ]],
[[▒██░ ▓██░░▒████▒░ ████▓▒░ ▒▀█░ ░██░▒██▒ ░██▒]],
[[░ ▒░ ▒ ▒ ░░ ▒░ ░░ ▒░▒░▒░ ░ ▐░ ░▓ ░ ▒░ ░ ░]],
[[░ ░░ ░ ▒░ ░ ░ ░ ░ ▒ ▒░ ░ ░░ ▒ ░░ ░ ░]],
[[ ░ ░ ░ ░ ░ ░ ░ ▒ ░░ ▒ ░░ ░ ]],
[[ ░ ░ ░ ░ ░ ░ ░ ░ ]],
[[ ░ ]],
}
dashboard.section.header.opts.hl = "Function"
dashboard.section.footer.opts.hl = "Function"
require("alpha").setup(require("alpha.themes.dashboard").opts)

View file

@ -0,0 +1,46 @@
local cmp = require("cmp")
local luasnip = require("luasnip")
require("luasnip.loaders.from_vscode").lazy_load()
luasnip.config.setup({})
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-p>"] = cmp.mapping.select_prev_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete({}),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
}),
sources = {
{ name = "nvim_lsp" },
{ name = "luasnip" },
},
})

View file

@ -0,0 +1,45 @@
local on_attach = function(_, bufnr)
local bufmap = function(keys, func)
vim.keymap.set("n", keys, func, { buffer = bufnr })
end
bufmap("<leader>r", vim.lsp.buf.rename)
bufmap("<leader>a", vim.lsp.buf.code_action)
bufmap("gd", vim.lsp.buf.definition)
bufmap("gD", vim.lsp.buf.declaration)
bufmap("gI", vim.lsp.buf.implementation)
bufmap("<leader>D", vim.lsp.buf.type_definition)
bufmap("gr", require("telescope.builtin").lsp_references)
bufmap("<leader>s", require("telescope.builtin").lsp_document_symbols)
bufmap("<leader>S", require("telescope.builtin").lsp_dynamic_workspace_symbols)
bufmap("K", vim.lsp.buf.hover)
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
vim.lsp.buf.format()
end, {})
end
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
require("lspconfig").lua_ls.setup({
on_attach = on_attach,
capabilities = capabilities,
root_dir = function()
return vim.loop.cwd()
end,
settings = {
Lua = {
workspace = { checkThirdParty = false },
telemetry = { enable = false },
},
},
})
require("lspconfig").rnix.setup({
on_attach = on_attach,
capabilities = capabilities,
})

View file

@ -0,0 +1,10 @@
local lualine = require("lualine")
local config = {
options = {
theme = "base16",
globalstatus = true,
},
}
lualine.setup(config)

View file

@ -0,0 +1,37 @@
local null_ls = require("null-ls")
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
local opts = {
sources = {
-- Lua
null_ls.builtins.formatting.stylua,
-- Python
null_ls.builtins.formatting.black,
null_ls.builtins.diagnostics.ruff,
-- Javascript
null_ls.builtins.diagnostics.eslint_d,
null_ls.builtins.diagnostics.jsonlint,
-- C/C++
null_ls.builtins.formatting.clang_format,
-- Nix
null_ls.builtins.formatting.alejandra,
},
on_attach = function(client, bufnr)
if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({
group = augroup,
buffer = bufnr,
})
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format({ bufnr = bufnr })
end,
})
end
end,
}
null_ls.setup(opts)
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,20 @@
require("telescope").setup({
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
["ui-select"] = {
require("telescope.themes").get_dropdown({}),
},
},
},
})
require("telescope").load_extension("fzf")
require("telescope").load_extension("ui-select")
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})

View file

@ -0,0 +1,55 @@
require("todo-comments").setup({
signs = true,
sign_priority = 8,
keywords = {
FIX = {
icon = "", -- icon used for the sign, and in search results
color = "error", -- can be a hex color, or a named color (see below)
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
-- signs = false, -- configure signs for some keywords individually
},
TODO = { icon = "", color = "info" },
HACK = { icon = "", color = "warning" },
WARN = { icon = "", color = "warning", alt = { "WARNING", "XXX" } },
PERF = { icon = "󰑮 ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
NOTE = { icon = "", color = "hint", alt = { "INFO" } },
TEST = { icon = "󰤑 ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
},
gui_style = {
fg = "NONE", -- The gui style to use for the fg highlight group.
bg = "BOLD", -- The gui style to use for the bg highlight group.
},
merge_keywords = true, -- when true, custom keywords will be merged with the defaults
highlight = {
multiline = true, -- enable multine todo comments
multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword
multiline_context = 10, -- extra lines that will be re-evaluated when changing a line
before = "", -- "fg" or "bg" or empty
keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg)
after = "fg", -- "fg" or "bg" or empty
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex)
comments_only = true, -- uses treesitter to match keywords in comments only
max_line_len = 400, -- ignore lines longer than this
exclude = {}, -- list of file types to exclude highlighting
},
colors = {
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
info = { "DiagnosticInfo", "#2563EB" },
hint = { "DiagnosticHint", "#10B981" },
default = { "Identifier", "#7C3AED" },
test = { "Identifier", "#FF00FF" },
},
search = {
command = "rg",
args = {
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
},
-- pattern = [[\b(KEYWORDS):]], -- ripgrep regex
pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon.
},
})

View file

@ -0,0 +1,9 @@
require("nvim-treesitter.configs").setup({
ensure_installed = {},
auto_install = false,
highlight = { enable = true },
indent = { enable = true },
})

View file

@ -0,0 +1,71 @@
{
config,
lib,
pkgs,
vars,
...
}: let
in {
programs.vscode = {
enable = true;
package = pkgs.vscodium;
enableUpdateCheck = false;
extensions = with pkgs.vscode-extensions;
[
catppuccin.catppuccin-vsc
pkief.material-icon-theme
vscodevim.vim
bbenoist.nix
ms-python.python
ms-toolsai.jupyter
ms-toolsai.jupyter-renderers
ms-toolsai.jupyter-keymap
]
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "remote-ssh-edit";
publisher = "ms-vscode-remote";
version = "0.47.2";
sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
}
];
userSettings = {
#Theming
"workbench.colorTheme" = "Catppuccin Mocha";
"catppuccin.accentColor" = "green";
"workbench.iconTheme" = "material-icon-theme";
"window.menuBarVisibility" = "toggle";
"editor.minimap.autohide" = false;
#Extensions - General
"extensions.autoCheckUpdates" = false;
"extensions.autoUpdate" = false;
# Startup
"workbench.startupEditor" = "none";
# Vim
"editor.lineNumbers" = "relative";
};
keybindings = [
# Navigating Autosuggest and Quick Open entries
{
"key" = "ctrl+j";
"command" = "selectNextSuggestion";
"when" = "suggestWidgetVisible";
}
{
"key" = "ctrl+k";
"command" = "selectPrevSuggestion";
"when" = "suggestWidgetVisible";
}
{
"key" = "ctrl+j";
"command" = "workbench.action.quickOpenSelectNext";
"when" = "inQuickOpen";
}
{
"key" = "ctrl+k";
"command" = "workbench.action.quickOpenSelectPrevious";
"when" = "inQuickOpen";
}
];
};
}

View file

@ -0,0 +1,35 @@
{pkgs, ...}: {
imports = [
../common
];
home = {
file.".wallpapers" = {
source = ../../../../rsc/wallpaper;
recursive = true;
};
file.".config/awesome/" = {
source = ../../../../rsc/config/awesome;
recursive = true;
};
file.".config/picom/" = {
source = ../../../../rsc/config/picom;
recursive = true;
};
file.".config/rofi" = {
source = ../../../../rsc/config/rofi;
recursive = true;
};
packages = with pkgs; [
picom
rofi
redshift
xbindkeys
clipmenu
flameshot
xclip
brightnessctl
];
};
}

View file

@ -0,0 +1,60 @@
{
pkgs,
config,
...
}: {
programs.alacritty.enable = true;
programs.alacritty.settings = {
window = {
opacity = 0.83;
padding = {
x = 0;
y = 5;
};
};
font = {
normal = {
family = "${config.fontProfiles.monospace.family}";
style = "Medium";
};
bold = {
family = "${config.fontProfiles.monospace.family}";
style = "Bold";
};
italic = {
family = "${config.fontProfiles.monospace.family}";
style = "MediumItalic";
};
};
colors = with config.colorScheme.colors; {
bright = {
black = "0x${base00}";
blue = "0x${base0D}";
cyan = "0x${base0C}";
green = "0x${base0B}";
magenta = "0x${base0E}";
red = "0x${base08}";
white = "0x${base06}";
yellow = "0x${base09}";
};
cursor = {
cursor = "0x${base06}";
text = "0x${base06}";
};
normal = {
black = "0x${base00}";
blue = "0x${base0D}";
cyan = "0x${base0C}";
green = "0x${base0B}";
magenta = "0x${base0E}";
red = "0x${base08}";
white = "0x${base06}";
yellow = "0x${base0A}";
};
primary = {
background = "0x${base00}";
foreground = "0x${base06}";
};
};
};
}

View file

@ -0,0 +1,8 @@
{
imports = [
./firefox.nix
./alacritty.nix
./font.nix
./playerctl.nix
];
}

View file

@ -0,0 +1,182 @@
{
inputs,
pkgs,
vars,
...
}: {
imports = [inputs.arkenfox.hmModules.default];
programs.firefox = {
enable = true;
arkenfox = {
enable = true;
version = "119.0";
};
profiles.Default = {
extensions = with inputs.firefox-addons.packages."x86_64-linux"; [
bitwarden
ublock-origin
darkreader
tabliss
consent-o-matic
];
search.engines = {
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@np"];
};
"Home Manager" = {
urls = [
{
template = "https://mipmip.github.io/home-manager-option-search";
params = [
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@hm"];
};
"Searx" = {
urls = [
{
template = "https://paulgo.io/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
iconUpdateURL = "https://paulgo.io/favicon.ico";
definedAliases = ["@sx"];
};
"Amazon" = {
urls = [
{
template = "https://www.amazon.de/s";
params = [
{
name = "k";
value = "{searchTerms}";
}
];
}
];
iconUpdateURL = "https://amazon.de/favicon.ico";
definedAliases = ["@a"];
};
"YouTube" = {
urls = [
{
template = "https://efy.piped.pages.dev/results";
params = [
{
name = "search_query";
value = "{searchTerms}";
}
];
}
];
iconUpdateURL = "https://piped.video/favicon.ico";
definedAliases = ["yt"];
};
};
search.force = true;
search.default = "Searx";
settings = {
"dom.security.https_only_mode" = true;
"browser.download.panel.shown" = true;
"signon.rememberSignons" = false;
"browser.formfill.enable" = false;
"signon. prefillForms" = false;
"browser.shell.checkDefaultBrowser" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.uiCustomization.state" = ''{"placements":{"widget-overflow-fixed-list":[],"unified-extensions-area":["addon_darkreader_org-browser-action","plasma-browser-integration_kde_org-browser-action","_506e023c-7f2b-40a3-8066-bc5deb40aebe_-browser-action","_testpilot-containers-browser-action","7esoorv3_alefvanoon_anonaddy_me-browser-action","_a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7_-browser-action","gdpr_cavi_au_dk-browser-action","firefoxcolor_mozilla_com-browser-action","firefox-translations-addon_mozilla_org-browser-action"],"nav-bar":["back-button","forward-button","stop-reload-button","urlbar-container","downloads-button","unified-extensions-button","ublock0_raymondhill_net-browser-action","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["personal-bookmarks"]},"seen":["save-to-pocket-button","developer-button","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","addon_darkreader_org-browser-action","ublock0_raymondhill_net-browser-action","plasma-browser-integration_kde_org-browser-action","_506e023c-7f2b-40a3-8066-bc5deb40aebe_-browser-action","_testpilot-containers-browser-action","7esoorv3_alefvanoon_anonaddy_me-browser-action","_a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7_-browser-action","gdpr_cavi_au_dk-browser-action","firefoxcolor_mozilla_com-browser-action","firefox-translations-addon_mozilla_org-browser-action"],"dirtyAreaCache":["nav-bar","PersonalToolbar","toolbar-menubar","TabsToolbar","unified-extensions-area"],"currentVersion":20,"newElementCount":4}'';
};
arkenfox = {
enable = true;
"0000".enable = true;
"0100" = {
enable = true;
# Allow setting homepage
"0102"."browser.startup.page".value = 1;
};
"0200" = {
enable = true;
};
"0300".enable = true;
# We keep safebrowsing
"0400".enable = false;
"0600" = {
enable = true;
"0610"."browser.send_pings".enable = true;
};
"0700" = {
enable = true;
# Disable DNS over HTTPS
"0710"."network.trr.mode".value = 5;
};
# "0800" = {
# enable = true;
# # Keep using url bar as search bar
# "0801"."keyword.enabled".value = true;
# };
"0900".enable = true;
"1000" = {
enable = true;
# Enable disk cache for performance reasons
"1001"."browser.cache.disk.enable".enable = true;
"1001"."browser.cache.disk.enable".value = true;
};
"1200".enable = true;
# I don't use container tabs
"1700".enable = false;
"2600" = {
enable = true;
# The recent documents feature is useful
"2653".enable = false;
};
"2700".enable = true;
};
};
};
xdg.mimeApps.defaultApplications = {
"text/html" = ["firefox.desktop"];
"text/xml" = ["firefox.desktop"];
"x-scheme-handler/http" = ["firefox.desktop"];
"x-scheme-handler/https" = ["firefox.desktop"];
};
}

View file

@ -0,0 +1,13 @@
{pkgs, ...}: {
fontProfiles = {
enable = true;
monospace = {
family = "JetBrains Mono Nerd Font";
package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
};
regular = {
family = "Fira Sans";
package = pkgs.fira;
};
};
}

View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
home.packages = with pkgs; [playerctl];
services.playerctld = {
enable = true;
};
}

View file

@ -0,0 +1,5 @@
{pkgs, ...}: {
imports = [
# ./steam.nix
];
}

View file

@ -0,0 +1,31 @@
{
pkgs,
lib,
config,
...
}: let
steam-with-pkgs = pkgs.steam.override {
extraPkgs = pkgs:
with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
gamescope
mangohud
];
};
in {
home.packages = with pkgs; [
steam-with-pkgs
gamescope
mangohud
protontricks
];
}

83
home/global/default.nix Normal file
View file

@ -0,0 +1,83 @@
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{
inputs,
outputs,
lib,
config,
pkgs,
vars,
...
}: {
# You can import other home-manager modules here
imports =
[
# If you want to use modules your own flake exports (from modules/home-manager):
# outputs.homeManagerModules.example
# Or modules exported from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModules
# You can also split up your configuration and import pieces of it here:
../features/cli
]
++ (builtins.attrValues outputs.homeManagerModules);
nixpkgs = {
# You can add overlays here
overlays =
[
# Add overlays your own flake exports (from overlays and pkgs dir):
# outputs.overlays.additions
# outputs.overlays.modifications
# outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
]
++ (builtins.attrValues outputs.overlays);
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
permittedInsecurePackages = [
"electron-24.8.6" #fixes Feishin & Webcord
];
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
};
};
nix = {
package = lib.mkDefault pkgs.nix;
settings = {
experimental-features = ["nix-command" "flakes" "repl-flake"];
warn-dirty = false;
};
};
home = {
username = lib.mkDefault vars.user;
homeDirectory = lib.mkDefault "/home/${config.home.username}";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
stateVersion = "23.11";
};
# Add stuff for your user as you see fit:
# programs.neovim.enable = true;
# home.packages = with pkgs; [ steam ];
# Enable home-manager and git
programs.home-manager.enable = true;
programs.git.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
}

View file

@ -0,0 +1,84 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
# You can import other NixOS modules here
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
inputs.hardware.nixosModules.common-cpu-amd
inputs.hardware.nixosModules.common-gpu-nvidia
inputs.hardware.nixosModules.common-pc-ssd
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
../common/global
../common/optional/desktop/awesome.nix
../common/optional/systemd-boot.nix
../common/optional/wireshark.nix
../common/optional/kde-connect.nix
../common/optional/gnome-keyring.nix
../common/optional/adb.nix
../common/optional/gaming/gamemode.nix
../common/optional/gaming/steam.nix
../common/optional/gaming/vr.nix
];
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
firefox.enablePlasmaBrowserIntegration = true;
};
};
networking.hostName = "adalbert";
# Force disable Nvidia PRIME, needed by nix-hardware
hardware.nvidia.prime.offload.enable = false;
programs = {
adb.enable = true;
dconf.enable = true;
kdeconnect.enable = true;
};
hardware = {
opengl.enable = true;
opentabletdriver.enable = true;
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.11";
}

View file

@ -0,0 +1,33 @@
# This file (and the global directory) holds config that i use on all hosts
{
inputs,
outputs,
config,
...
}: {
imports =
[
inputs.home-manager.nixosModules.home-manager
./user.nix
./fish.nix
./locale.nix
./nix.nix
./podman.nix
./power-button.nix
]
++ (builtins.attrValues outputs.nixosModules);
home-manager.extraSpecialArgs = {inherit inputs outputs;};
nixpkgs = {
overlays = builtins.attrValues outputs.overlays;
config = {
allowUnfree = true;
};
};
# Fix for qt6 plugins
environment.profileRelativeSessionVariables = {
QT_PLUGIN_PATH = ["/lib/qt-6/plugins"];
};
}

View file

@ -0,0 +1,17 @@
{
inputs,
pkgs,
...
}: {
programs.fish = {
enable = true;
vendor = {
completions.enable = true;
config.enable = true;
functions.enable = true;
};
useBabelfish = true;
};
users.defaultUserShell = pkgs.fish;
environment.shells = with pkgs; [fish];
}

View file

@ -0,0 +1,20 @@
{lib, ...}: {
time.timeZone = "Europe/Berlin";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
};
console.keyMap = "de";
services.xserver.layout = "de";
}

View file

@ -0,0 +1,28 @@
{
inputs,
lib,
...
}: {
nix = {
settings = {
auto-optimise-store = lib.mkDefault true;
experimental-features = ["nix-command" "flakes" "repl-flake"];
warn-dirty = false;
system-features = ["kvm" "big-parallel" "nixos-test"];
};
gc = {
automatic = true;
dates = "weekly";
# Keep the last 3 generations
options = "--delete-older-than +3";
};
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
# Add nixpkgs input to NIX_PATH
# This lets nix2 commands still use <nixpkgs>
nixPath = ["nixpkgs=${inputs.nixpkgs.outPath}"];
};
}

View file

@ -0,0 +1,10 @@
{config, ...}: let
dockerEnabled = config.virtualisation.docker.enable;
in {
virtualisation.podman = {
enable = true;
dockerCompat = !dockerEnabled;
dockerSocket.enable = !dockerEnabled;
defaultNetwork.settings.dns_enabled = true;
};
}

View file

@ -0,0 +1,10 @@
{
inputs,
lib,
...
}: {
services.logind.extraConfig = ''
# don't shutdown when power button is short-pressed
HandlePowerKey=ignore
'';
}

View file

@ -0,0 +1,45 @@
{
inputs,
outputs,
pkgs,
config,
vars,
...
}: let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
users.users.${vars.user} = {
isNormalUser = true;
shell = pkgs.fish;
extraGroups =
[
"wheel"
"video"
"audio"
"camera"
]
++ ifTheyExist [
"minecraft"
"network"
"networkmanager"
"wireshark"
"i2c"
"mysql"
"docker"
"podman"
"git"
"libvirtd"
"deluge"
"lp"
"scanner"
"kvm"
"libvirtd"
"tty"
"dialout"
];
packages = [pkgs.home-manager];
};
home-manager.users.${vars.user} = import ../../../home/${config.networking.hostName}.nix;
}

View file

@ -0,0 +1,5 @@
{vars, ...}: let
in {
programs.adb.enable = true;
users.users.${vars.user}.extraGroups = ["adbusers"];
}

View file

@ -0,0 +1,15 @@
{
config,
lib,
pkgs,
...
}: {
imports = [./global.nix ./x11.nix];
services = {
xserver = {
# dpi = 180;
windowManager.awesome.enable = true;
};
};
}

View file

@ -0,0 +1,12 @@
{
config,
lib,
pkgs,
...
}: {
# Enable Flatpak
services.flatpak.enable = true;
# Create folder where all fonts are linked to /run/current-system/sw/share/X11/fonts
fonts.fontDir.enable = true;
}

View file

@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}: {
imports = [./pipewire.nix ../printing.nix ./flatpak.nix ./xdg.nix ./xremap.nix];
# Enable networking
networking.networkmanager.enable = true;
# Enable for GTK
programs.dconf.enable = true;
services.xserver = {
displayManager.sddm.enable = true;
};
}

View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}: {
imports = [./global.nix ./x11.nix ./wayland.nix];
services = {
xserver = {
desktopManager.gnome = {
enable = true;
};
};
};
}

View file

@ -0,0 +1,11 @@
{
security.rtkit.enable = true;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
}

View file

@ -0,0 +1,15 @@
{
config,
lib,
pkgs,
...
}: {
# Hint electron apps to use wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
environment.systemPackages = with pkgs; [
xwaylandvideobridge
libsForQt5.qt5.qtwayland
qt6.qtwayland
];
}

View file

@ -0,0 +1,28 @@
{
config,
lib,
pkgs,
...
}: {
services = {
# Enable the X11 windowing system.
xserver = {
enable = true;
# Enable touchpad support
libinput.enable = true;
# Remove xterm terminal
excludePackages = with pkgs; [xterm];
modules = [pkgs.xf86_input_wacom];
wacom.enable = true;
};
};
# Install installation
environment = {
systemPackages = with pkgs; [
# X11
xorg.xkbutils
xorg.xkill
];
};
}

View file

@ -0,0 +1,14 @@
{
config,
lib,
pkgs,
...
}: {
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
wlr.enable = true;
extraPortals = with pkgs; [xdg-desktop-portal-gtk];
configPackages = with pkgs; [gnome.gnome-session];
};
}

View file

@ -0,0 +1,25 @@
{
pkgs,
inputs,
...
}: {
imports = [
inputs.xremap.nixosModules.default
];
services.xremap = {
withX11 = true;
config = {
keymap = [
{
name = "main remaps";
remap = {
super-e = {
launch = ["firefox"];
};
};
}
];
};
};
}

View file

@ -0,0 +1,5 @@
{
virtualisation.docker = {
enable = true;
};
}

View file

@ -0,0 +1,7 @@
{config, ...}: let
hostname = config.networking.hostName;
in {
boot.initrd = {
luks.devices."${hostname}".device = "/dev/disk/by-label/${hostname}_crypt";
};
}

View file

@ -0,0 +1,3 @@
{
programs.gamemode.enable = true;
}

View file

@ -1,22 +1,16 @@
{
config,
pkgs,
nur,
lib,
unstable,
...
}: {
environment.systemPackages = [
unstable.heroic # Game Launcher
unstable.lutris # Game Launcher
unstable.steam # Game Launcher
{pkgs, ...}: {
environment.systemPackages = with pkgs.unstable; [
heroic # Game Launcher
lutris # Game Launcher
steam # Game Launcher
];
programs = {
steam = {
enable = true;
remotePlay.openFirewall = true;
gamescopeSession.enable = false;
};
gamemode.enable = true; # Better Gaming Performance
# Steam: Right-click game - Properties - Launch options: gamemoderun %command%
# Lutris: General Preferences - Enable Feral GameMode
# - Global options - Add Environment Variables: LD_PRELOAD=/nix/store/*-gamemode-*-lib/lib/libgamemodeauto.so

View file

@ -0,0 +1,6 @@
{
programs.alvr = {
enable = true;
openFirewall = true;
};
}

View file

@ -4,7 +4,8 @@
pkgs,
vars,
...
}: {
}: let
in {
security.pam.services.${vars.user}.enableGnomeKeyring = true;
services.gnome.gnome-keyring.enable = true;
programs.seahorse.enable = true;

View file

@ -0,0 +1,22 @@
{
config,
lib,
pkgs,
...
}: {
programs.kdeconnect.enable = true;
# Create system services for KDE connect
systemd.user.services.kdeconnect = {
description = "Adds communication between your desktop and your smartphone";
after = ["graphical-session-pre.target"];
partOf = ["graphical-session.target"];
wantedBy = ["graphical-session.target"];
serviceConfig = {
#Environment = "PATH=${config.home.profileDirectory}/bin";
ExecStart = "${pkgs.plasma5Packages.kdeconnect-kde}/libexec/kdeconnectd";
Restart = "on-abort";
};
};
}

View file

@ -0,0 +1,24 @@
{
config,
lib,
pkgs,
...
}: {
services = {
# Printer Setup
printing.enable = true;
avahi = {
enable = true;
nssmdns = true;
# for a WiFi printer
openFirewall = true;
};
udev.packages = [pkgs.utsushi];
};
# Scanner Setup
hardware.sane = {
enable = true;
extraBackends = [pkgs.utsushi];
};
}

View file

@ -0,0 +1,33 @@
{
pkgs,
config,
...
}: {
console = {
useXkbConfig = true;
earlySetup = false;
};
boot = {
plymouth = {
enable = true;
theme = "spinner-monochrome";
themePackages = [
(pkgs.plymouth-spinner-monochrome.override {
inherit (config.boot.plymouth) logo;
})
];
};
loader.timeout = 0;
kernelParams = [
"quiet"
"loglevel=3"
"systemd.show_status=auto"
"udev.log_level=3"
"rd.udev.log_level=3"
"vt.global_cursor_default=0"
];
consoleLogLevel = 0;
initrd.verbose = false;
};
}

View file

@ -0,0 +1,12 @@
{
config,
lib,
pkgs,
...
}: {
services.hardware.openrgb = {
enable = true;
package = pkgs.openrgb-with-all-plugins;
motherboard = lib.mkDefault config.variables.machine.motherboard;
};
}

View file

@ -0,0 +1,9 @@
{
boot.loader = {
systemd-boot = {
enable = true;
consoleMode = "max";
};
efi.canTouchEfiVariables = true;
};
}

View file

@ -0,0 +1,6 @@
{
imports = [../global/tailscale.nix];
services.tailscale = {
useRoutingFeatures = "both";
};
}

View file

@ -0,0 +1,10 @@
{lib, ...}: {
services.tailscale = {
enable = true;
useRoutingFeatures = lib.mkDefault "client";
};
networking.firewall = {
checkReversePath = "loose";
allowedUDPPorts = [41641]; # Facilitate firewall punching
};
}

View file

@ -0,0 +1,5 @@
{
programs.wireshark = {
enable = true;
};
}

View file

@ -0,0 +1,7 @@
{
services.xserver.serverFlagsSection = ''
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
'';
}

View file

@ -1,242 +0,0 @@
{
config,
lib,
pkgs,
unstable,
inputs,
vars,
...
}: {
imports =
(import ../modules/desktops) ++ (import ../modules/shell) ++ [../modules/programs/librewolf.nix ../modules/programs/alacritty.nix] ++ (import ../modules/theming) ++ (import ../modules/coding);
users.users.${vars.user} = {
# System User
isNormalUser = true;
extraGroups = ["wheel" "video" "audio" "camera" "networkmanager" "lp" "scanner" "kvm" "libvirtd" "i2c" "tty" "dialout" "wireshark"];
};
boot.supportedFilesystems = ["ntfs" "exfat"];
# Set default shell -> move to module
users.defaultUserShell = pkgs.fish;
environment.shells = with pkgs; [fish];
programs.fish.enable = true;
services.flatpak.enable = true;
# Enable the X11 windowing system.
# services.xserver.enable = true;
# programs.ssh.startAgent = true;
services.logind.extraConfig = ''
# dont shutdown when power button is short-pressed
HandlePowerKey=ignore
'';
# Enable the KDE Plasma Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
# Configure keymap in X11
# services.xserver = {
# layout = "de";
# xkbVariant = "";
# };
environment.defaultCursor = {
enable = true;
theme = "breeze_cursors";
};
time.timeZone = "Europe/Berlin";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
};
console = {
# font = "Lat2-Terminus16";
keyMap = "de";
};
security = {
rtkit.enable = true;
polkit.enable = true;
};
fonts.fonts = with pkgs; [
# Fonts
carlito # NixOS
vegur # NixOS
source-code-pro
jetbrains-mono
font-awesome # Icons
corefonts # MS
carlito
dejavu_fonts
ipafont
kochi-substitute
source-code-pro
ttf_bitstream_vera
inter
noto-fonts-cjk-sans
(nerdfonts.override {
# Nerdfont Icons override
fonts = [
"JetBrainsMono"
];
})
];
environment = {
variables = {
# Environment Variables
TERMINAL = "${vars.terminal}";
EDITOR = "${vars.editor}";
VISUAL = "${vars.editor}";
};
systemPackages = with pkgs;
[
# System-Wide Packages
# Terminal
btop # Resource Manager
coreutils # GNU Utilities
git # Version Control
killall # Process Killer
nano # Text Editor
neovim
nix-tree # Browse Nix Store
pciutils # Manage PCI
tldr # Helper
usbutils # Manage USB
wget # Retriever
bat
lazygit
fzf
neofetch
jmtpfs # Android MTP
ipinfo
# Video/Audio
alsa-utils # Audio Control
feh # Image Viewer
mpv # Media Player
pavucontrol # Audio Control
pipewire # Audio Server/Control
pulseaudio # Audio Server/Control
jellyfin-media-player
# Apps
appimage-run # Runs AppImages on NixOS
webcord
signal-desktop
alacritty
librewolf
zathura
# File Management
unzip # Zip Files
unrar # Rar Files
zip # Zip
# Shell
fishPlugins.grc
grc
fishPlugins.fzf
fishPlugins.tide
fishPlugins.sponge
fishPlugins.colored-man-pages
fishPlugins.autopair
nix-your-shell
# Other Packages Found @
# - ./<host>/default.nix
# - ../modules
]
++ (with unstable; [
# Terminal
eza
# Apps
feishin
sddm
electron-mail
xournalpp
]);
};
programs = {
dconf.enable = true;
};
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
];
};
services = {
printing = {
# CUPS
enable = true;
};
pipewire = {
# Sound
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
};
};
#hardware.pulseaudio.enable = false;
nix = {
# Nix Package Manager Settings
settings = {
auto-optimise-store = true;
};
# gc = { # Garbage Collection
# automatic = true;
# dates = "weekly";
# options = "--delete-older-than 2d";
# };
package = pkgs.nixVersions.unstable; # Enable Flakes
registry.nixpkgs.flake = inputs.nixpkgs;
extraOptions = ''
experimental-features = nix-command flakes
keep-outputs = true
keep-derivations = true
'';
};
nixpkgs.config.allowUnfree = true; # Allow Proprietary Software.
system = {
# NixOS Settings
stateVersion = "23.05";
};
home-manager.users.${vars.user} = {
# Home-Manager Settings
home = {
stateVersion = "23.05";
};
programs = {
home-manager.enable = true;
};
};
}

View file

@ -1,82 +0,0 @@
# NOTE: Dual booted with windows 11. Disable fast-boot in power plan and bios and turn off hibernate to get wifi and bluetooth working. This only works once but on reboot is borked again. So using the old school BLT dongle.
#
{
lib,
pkgs,
vars,
unstable,
...
}: {
imports = [
./hardware-configuration.nix
../../modules/virtualization/docker.nix
../../modules/virtualization/qemu.nix
../../modules/secrets/gnome-keyring.nix
../../modules/secrets/gpg.nix
];
boot = {
# Boot Options
loader = {
systemd-boot = {
enable = true;
configurationLimit = 3;
};
efi = {
canTouchEfiVariables = true;
};
timeout = 5;
};
};
boot.initrd.secrets = {
"/crypto_keyfile.bin" = null;
};
# Enable swap on luks
boot.initrd.luks.devices."luks-4397a73c-b1b9-4fd0-8f7d-21d5159269b8".device = "/dev/disk/by-uuid/4397a73c-b1b9-4fd0-8f7d-21d5159269b8";
boot.initrd.luks.devices."luks-4397a73c-b1b9-4fd0-8f7d-21d5159269b8".keyFile = "/crypto_keyfile.bin";
boot.kernelParams = ["i915.force_probe=9a49"];
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
vaapiVdpau
libvdpau-va-gl
];
};
# i18n.inputmethod = {
# enabled = "fcitx5";
# # fcitx5.addons = with pkgs; [
# # fcitx5-mozc
# # fcitx5-gtk
# # ];
# };
gnome.enable = true;
awesome.enable = true;
services.tailscale.enable = true;
services.tailscale.useRoutingFeatures = "client";
environment = {
etc = {
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
bluez_monitor.properties = {
["bluez5.enable-hw-volume"] = false,
}
'';
};
systemPackages = with pkgs;
[
tailscale
nextcloud-client
calibre
libreoffice
element-desktop
]
++ (with unstable; [xournalpp]);
};
}

View file

@ -1,46 +0,0 @@
# 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" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/e36453a3-629d-4704-a42e-180bf3640722";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-5f04c1e9-c3fe-42fb-97d1-0833bf66435a".device = "/dev/disk/by-uuid/5f04c1e9-c3fe-42fb-97d1-0833bf66435a";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/A2B4-1BBE";
fsType = "vfat";
};
swapDevices = [
{device = "/dev/disk/by-uuid/b16f0d66-5aec-4e0e-8162-c8e87e19888c";}
];
# 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.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,79 +0,0 @@
{
lib,
inputs,
nixpkgs,
nixpkgs-unstable,
home-manager,
nur,
hyprland,
split-monitor-workspaces,
vars,
...
}: let
system = "x86_64-linux"; # System Architecture
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true; # Allow Proprietary Software
};
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
lib = nixpkgs.lib;
in {
desktop = lib.nixosSystem {
# Desktop Profile
inherit system;
specialArgs = {
# Pass Flake Variable
inherit inputs system unstable hyprland vars split-monitor-workspaces;
host = {
hostName = "desktop";
mainMonitor = "DP-3";
secondMonitor = "DP-1";
};
};
modules = [
# Modules Used
nur.nixosModules.nur
hyprland.nixosModules.default
./desktop
./configuration.nix
home-manager.nixosModules.home-manager
{
# Home-Manager Module
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
convertible = lib.nixosSystem {
# Desktop Profile
inherit system;
specialArgs = {
# Pass Flake Variable
inherit inputs system unstable hyprland vars split-monitor-workspaces;
host = {
hostName = "convertible";
mainMonitor = "DP-3";
secondMonitor = "DP-1";
};
};
modules = [
# Modules Used
nur.nixosModules.nur
hyprland.nixosModules.default
./convertible
./configuration.nix
home-manager.nixosModules.home-manager
{
# Home-Manager Module
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
}

View file

@ -1,71 +0,0 @@
# NOTE: Dual booted with windows 11. Disable fast-boot in power plan and bios and turn off hibernate to get wifi and bluetooth working. This only works once but on reboot is borked again. So using the old school BLT dongle.
#
{
lib,
pkgs,
vars,
unstable,
...
}: {
imports = [
./hardware-configuration.nix
../../modules/hardware/nvidia.nix
../../modules/services/avahi.nix
../../modules/virtualization/docker.nix
../../modules/virtualization/qemu.nix
../../modules/programs/games.nix
../../modules/secrets/gnome-keyring.nix
../../modules/secrets/gpg.nix
# ../../modules/services/easyeffects.nix
];
boot = {
# Boot Options
loader = {
systemd-boot = {
enable = true;
configurationLimit = 3;
};
efi = {
canTouchEfiVariables = true;
};
timeout = 5;
};
kernelPackages = unstable.linuxPackages_latest;
};
hardware = {
sane = {
# Scanning
enable = true;
extraBackends = [unstable.utsushi];
};
};
services.udev.packages = [unstable.utsushi];
# Desktops
hyprland.enable = false;
kde.enable = false;
awesome.enable = true;
programs.kdeconnect.enable = true;
environment = {
systemPackages = with pkgs;
[
# System-Wide Packages
discord # Messaging
obs-studio # Live Streaming
simple-scan # Scanning
firefox
heroic
nextcloud-client
anki
easyeffects
qpwgraph
calibre
]
++ (with unstable; [
libsForQt5.kdeconnect-kde
]);
};
}

View file

@ -1,19 +0,0 @@
{
config,
lib,
pkgs,
unstable,
vars,
...
}: let
in {
home-manager.users.${vars.user} = {
};
programs.adb.enable = true;
users.users.${vars.user}.extraGroups = ["adbusers"];
environment.systemPackages = with unstable; [
android-studio
];
}

View file

@ -1,6 +0,0 @@
[
./nvim.nix
./vscode.nix
./intellij.nix
./android-studio.nix
]

View file

@ -1,16 +0,0 @@
{
config,
lib,
pkgs,
unstable,
vars,
...
}: let
in {
home-manager.users.${vars.user} = {
};
environment.systemPackages = with unstable; [
(jetbrains.plugins.addPlugins jetbrains.idea-ultimate ["ideavim"])
];
}

View file

@ -1,30 +0,0 @@
{
config,
lib,
pkgs,
vars,
...
}: let
in {
home-manager.users.${vars.user} = {
home.file.".config/nvim/lua/custom/" = {
source = ../../rsc/config/nvim;
recursive = true;
};
};
environment.systemPackages = with pkgs; [
gcc
black
python310Packages.debugpy # is this working?
mypy
ruff
nodePackages.pyright
clang-tools_16
rnix-lsp
rust-analyzer
nodePackages.eslint_d
nodePackages.jsonlint
alejandra
];
}

View file

@ -1,87 +0,0 @@
{
config,
lib,
pkgs,
vars,
...
}: let
in {
home-manager.users.${vars.user} = {
programs.vscode = {
enable = true;
package = pkgs.vscodium;
enableUpdateCheck = false;
extensions = with pkgs.vscode-extensions;
[
catppuccin.catppuccin-vsc
pkief.material-icon-theme
vscodevim.vim
bbenoist.nix
ms-python.python
ms-toolsai.jupyter
ms-toolsai.jupyter-renderers
ms-toolsai.jupyter-keymap
]
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "remote-ssh-edit";
publisher = "ms-vscode-remote";
version = "0.47.2";
sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
}
{
name = "cpptools";
publisher = "ms-vscode";
version = "1.19.1";
sha256 = "sha256-yUZTLnN4nomFp5I0VgRz7rRMkeMU9QzY+dzEdUUASek=";
}
{
name = "camkes-syntax-highlighting";
publisher = "hensoldt-cyber-gmbh";
version = "1.1.3";
sha256 = "sha256-dRhsFGSjR/Vp5aJgMDwCZQtwmmfNXbM85ViTIq5ORwY=";
}
];
userSettings = {
#Theming
"workbench.colorTheme" = "Catppuccin Mocha";
"catppuccin.accentColor" = "teal";
"workbench.iconTheme" = "material-icon-theme";
"window.menuBarVisibility" = "toggle";
"editor.minimap.autohide" = false;
#Extensions - General
"extensions.autoCheckUpdates" = false;
"extensions.autoUpdate" = false;
# Startup
"workbench.startupEditor" = "none";
# Vim
"editor.lineNumbers" = "relative";
};
keybindings = [
# Navigating Autosuggest and Quick Open entries
{
"key" = "ctrl+j";
"command" = "selectNextSuggestion";
"when" = "suggestWidgetVisible";
}
{
"key" = "ctrl+k";
"command" = "selectPrevSuggestion";
"when" = "suggestWidgetVisible";
}
{
"key" = "ctrl+j";
"command" = "workbench.action.quickOpenSelectNext";
"when" = "inQuickOpen";
}
{
"key" = "ctrl+k";
"command" = "workbench.action.quickOpenSelectPrevious";
"when" = "inQuickOpen";
}
];
};
};
# programs.vscode.package = pkgs.vscodium.fhsWithPackages (ps: with ps; [rustup zlib]);
}

View file

@ -1,82 +0,0 @@
#
# AwesomeWM Configuration
# Enable with "awesome.enable = true;"
#
{
config,
lib,
pkgs,
vars,
...
}:
with lib; {
options = {
awesome = {
enable = mkOption {
type = types.bool;
default = false;
};
};
};
config = mkIf (config.awesome.enable) {
services = {
xserver = {
enable = true;
layout = "de";
# dpi = 180;
libinput.enable = true;
modules = [pkgs.xf86_input_wacom];
wacom.enable = true;
windowManager.awesome.enable = true;
};
};
home-manager.users.${vars.user} = {
home.file.".wallpapers" = {
source = ../../rsc/wallpaper;
recursive = true;
};
home.file.".config/awesome/" = {
source = ../../rsc/config/awesome;
recursive = true;
};
home.file.".config/picom/" = {
source = ../../rsc/config/picom;
recursive = true;
};
home.file.".config/rofi" = {
source = ../../rsc/config/rofi;
recursive = true;
};
home.file.".config/flameshot" = {
source = ../../rsc/config/flameshot;
recursive = true;
};
home.file.".config/zathura" = {
source = ../../rsc/config/zathura;
recursive = true;
};
};
environment = {
systemPackages = with pkgs;
[
picom
rofi
redshift
xbindkeys
clipmenu
flameshot
xclip
brightnessctl
]
++ (with unstable; []);
};
# Flatpak
xdg.portal.enable = true;
xdg.portal.extraPortals = with pkgs; [xdg-desktop-portal-kde];
# Networking
networking.networkmanager.enable = true;
};
}

View file

@ -1,6 +0,0 @@
[
./hyprland.nix
./kde.nix
./gnome.nix
./awesome.nix
]

View file

@ -1,66 +0,0 @@
#
# Gnome Configuration
# Enable with "gnome.enable = true;"
#
{
config,
lib,
pkgs,
vars,
...
}:
with lib; {
options = {
gnome = {
enable = mkOption {
type = types.bool;
default = false;
};
};
};
config = mkIf (config.gnome.enable) {
hardware.pulseaudio.enable = false;
services = {
xserver = {
enable = true;
layout = "de";
libinput.enable = true;
modules = [pkgs.xf86_input_wacom];
wacom.enable = true;
desktopManager.gnome.enable = true; # Desktop Environment
};
udev.packages = with pkgs; [
gnome.gnome-settings-daemon
];
};
environment = {
systemPackages = with pkgs; [
# System-Wide Packages
gnome.adwaita-icon-theme
gnome.dconf-editor
gnome.gnome-tweaks
];
gnome.excludePackages =
(with pkgs; [
# Ignored Packages
gnome-tour
])
++ (with pkgs.gnome; [
atomix
epiphany
geary
gedit
gnome-characters
gnome-contacts
gnome-initial-setup
hitori
iagno
tali
]);
};
};
}

View file

@ -1,289 +0,0 @@
#
# Hyprland Configuration
# Enable with "hyprland.enable = true;"
#
{
config,
lib,
system,
pkgs,
unstable,
hyprland,
vars,
host,
split-monitor-workspaces,
...
}: let
hyprlandconf = ''
monitor = DP-1,1920x1080@75,auto,auto
monitor = DP-3,2560x1440@144,auto,auto
monitor = ,preferred,auto,auto
source = ~/.config/hypr/mocha.conf
exec-once = waybar
exec-once = dunst
exec-once = swww init && swww img ~/.wallpapers/robot.jpg
exec-once = signal-desktop --start-in-tray
exec-once = webcord --start-minimized
env = XCURSOR_SIZE,24
env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = WLR_NO_HARDWARE_CURSORS,1
env = NIXOS_OZONE_WL,1 # for any ozone-based browser & electron apps to run on wayland
env = MOZ_ENABLE_WAYLAND,1 # for firefox to run on wayland
env = MOZ_WEBRENDER,1
plugin {
split-monitor-workspaces {
count = 9
}
}
input {
kb_layout = de
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = no
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
gaps_in = 5
gaps_out = 5
border_size = 2
col.active_border = $teal
col.inactive_border = $tealAlpha
layout = dwindle
}
misc {
disable_hyprland_logo = true
vrr = true
vfr = true
}
decoration {
screen_shader = ~/.config/hypr/shaders/nightlight.frag
rounding = 10
blur {
enabled = true
size = 3
passes = 1
}
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
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 {
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 {
new_is_master = true
}
gestures {
workspace_swipe = off
}
$mainMod = SUPER
bind = $mainMod, RETURN, exec, alacritty
bind = $mainMod, SPACE, exec, rofi -i -show drun -modi drun -show-icons
bind = SUPER_SHIFT, C, killactive,
bind = SUPER_SHIFT, Q, exit,
bind = $mainMod, V, togglefloating,
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, O, split-changemonitorsilent,next
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, split-workspace, 1
bind = $mainMod, 2, split-workspace, 2
bind = $mainMod, 3, split-workspace, 3
bind = $mainMod, 4, split-workspace, 4
bind = $mainMod, 5, split-workspace, 5
bind = $mainMod, 6, split-workspace, 6
bind = $mainMod, 7, split-workspace, 7
bind = $mainMod, 8, split-workspace, 8
bind = $mainMod, 9, split-workspace, 9
bind = $mainMod, 0, split-workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, split-movetoworkspace, 1
bind = $mainMod SHIFT, 2, split-movetoworkspace, 2
bind = $mainMod SHIFT, 3, split-movetoworkspace, 3
bind = $mainMod SHIFT, 4, split-movetoworkspace, 4
bind = $mainMod SHIFT, 5, split-movetoworkspace, 5
bind = $mainMod SHIFT, 6, split-movetoworkspace, 6
bind = $mainMod SHIFT, 7, split-movetoworkspace, 7
bind = $mainMod SHIFT, 8, split-movetoworkspace, 8
bind = $mainMod SHIFT, 9, split-movetoworkspace, 9
bind = $mainMod SHIFT, 0, split-movetoworkspace, 10
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
bind = SUPERSHIFT, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
bind = $mainMod, L, exec, librewolf
bind = $mainMod SHIFT, L, exec, librewolf --private-window
'';
in
with lib;
with host; {
options = {
hyprland = {
enable = mkOption {
type = types.bool;
default = false;
};
};
};
config = mkIf (config.hyprland.enable) {
environment = {
systemPackages = with pkgs;
[
grim # Grab Images
slurp # Region Selector
wl-clipboard # Clipboard
wlr-randr # Monitor Settings
dunst
cliphist
rofi-wayland
swww
]
++ (with unstable; [waybar]);
# sessionVariables = {
# "NIXOS_OZONE_WL" = "1"; # for any ozone-based browser & electron apps to run on wayland
# "MOZ_ENABLE_WAYLAND" = "1"; # for firefox to run on wayland
# "MOZ_WEBRENDER" = "1";
#
# # for hyprland with nvidia gpu, ref https://wiki.hyprland.org/Nvidia/
# "LIBVA_DRIVER_NAME" = "nvidia";
# "XDG_SESSION_TYPE" = "wayland";
# "GBM_BACKEND" = "nvidia-drm";
# "__GLX_VENDOR_LIBRARY_NAME" = "nvidia";
# "WLR_NO_HARDWARE_CURSORS" = "1";
# "WLR_EGL_NO_MODIFIRES" = "1";
# };
};
programs = {
hyprland = {
# Window Manager
enable = true;
xwayland.enable = true;
enableNvidiaPatches =
if hostName == "desktop"
then true
else false;
};
};
hardware = {
opengl = {
enable = true;
};
};
xdg.portal = {
enable = true;
extraPortals = with pkgs; [xdg-desktop-portal-gtk];
};
home-manager.users.${vars.user} = {
imports = [hyprland.homeManagerModules.default];
home.file.".config/hypr/" = {
source = ../../rsc/config/hypr;
recursive = true;
};
home.file.".config/waybar" = {
source = ../../rsc/config/waybar;
recursive = true;
};
home.file.".config/dunst" = {
source = ../../rsc/config/dunst;
recursive = true;
};
home.file.".config/rofi" = {
source = ../../rsc/config/rofi;
recursive = true;
};
home.file.".wallpapers" = {
source = ../../rsc/wallpaper;
recursive = true;
};
programs.waybar.package = pkgs.waybar.overrideAttrs (oa: {
mesonFlags = (oa.mesonFlags or []) ++ ["-Dexperimental=true"];
patches =
(oa.patches or [])
++ [
(pkgs.fetchpatch {
name = "fix waybar hyprctl";
url = "https://aur.archlinux.org/cgit/aur.git/plain/hyprctl.patch?h=waybar-hyprland-git";
sha256 = "sha256-pY3+9Dhi61Jo2cPnBdmn3NUTSA8bAbtgsk2ooj4y7aQ=";
})
];
});
wayland.windowManager.hyprland = {
enable = true;
systemdIntegration = true;
extraConfig = hyprlandconf;
plugins = [
split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces
];
};
};
nix.settings = {
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
}; # Cache
};
}

View file

@ -1,52 +0,0 @@
#
# KDE Plasma 5 Configuration
# Enable with "kde.enable = true;"
#
{
config,
lib,
pkgs,
vars,
...
}:
with lib; {
options = {
kde = {
enable = mkOption {
type = types.bool;
default = false;
};
};
};
config = mkIf (config.kde.enable) {
services = {
xserver = {
enable = true;
layout = "de";
libinput.enable = true;
modules = [pkgs.xf86_input_wacom];
wacom.enable = true;
#displayManager.defaultSession = "plasmawayland";
desktopManager.plasma5 = {
enable = true; # Desktop Environment
};
};
};
environment = {
systemPackages = with pkgs.libsForQt5; [
# System-Wide Packages
];
plasma5.excludePackages = with pkgs.libsForQt5; [
elisa
khelpcenter
konsole
oxygen
];
};
};
}

View file

@ -1,17 +0,0 @@
{
config,
pkgs,
...
}: {
services.xserver.videoDrivers = ["nvidia"];
hardware = {
opengl.enable = true;
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = true;
powerManagement.enable = false;
open = true;
nvidiaSettings = true;
};
};
}

View file

@ -0,0 +1,8 @@
# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations.
{
# List your module files here
fonts = import ./fonts.nix;
monitors = import ./monitors.nix;
wallpaper = import ./wallpaper.nix;
}

View file

@ -0,0 +1,32 @@
{
lib,
config,
...
}: let
mkFontOption = kind: {
family = lib.mkOption {
type = lib.types.str;
default = null;
description = "Family name for ${kind} font profile";
example = "Fira Code";
};
package = lib.mkOption {
type = lib.types.package;
default = null;
description = "Package for ${kind} font profile";
example = "pkgs.fira-code";
};
};
cfg = config.fontProfiles;
in {
options.fontProfiles = {
enable = lib.mkEnableOption "Whether to enable font profiles";
monospace = mkFontOption "monospace";
regular = mkFontOption "regular";
};
config = lib.mkIf cfg.enable {
fonts.fontconfig.enable = true;
home.packages = [cfg.monospace.package cfg.regular.package];
};
}

View file

@ -0,0 +1,62 @@
{
lib,
config,
...
}: let
inherit (lib) mkOption types;
cfg = config.monitors;
in {
options.monitors = mkOption {
type = types.listOf (types.submodule {
options = {
name = mkOption {
type = types.str;
example = "DP-1";
};
primary = mkOption {
type = types.bool;
default = false;
};
width = mkOption {
type = types.int;
example = 1920;
};
height = mkOption {
type = types.int;
example = 1080;
};
refreshRate = mkOption {
type = types.int;
default = 60;
};
x = mkOption {
type = types.int;
default = 0;
};
y = mkOption {
type = types.int;
default = 0;
};
enabled = mkOption {
type = types.bool;
default = true;
};
workspace = mkOption {
type = types.nullOr types.str;
default = null;
};
};
});
default = [];
};
config = {
assertions = [
{
assertion =
((lib.length config.monitors) != 0)
-> ((lib.length (lib.filter (m: m.primary) config.monitors)) == 1);
message = "Exactly one monitor must be set to primary.";
}
];
};
}

View file

@ -0,0 +1,11 @@
{lib, ...}: let
inherit (lib) types mkOption;
in {
options.wallpaper = mkOption {
type = types.path;
default = "";
description = ''
Wallpaper path
'';
};
}

34
modules/nixos/alvr.nix Normal file
View file

@ -0,0 +1,34 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.programs.alvr;
in {
options = {
programs.alvr = {
enable = mkEnableOption (lib.mdDoc "ALVR");
package = mkPackageOption pkgs "alvr" {};
openFirewall = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Open the default ports in the firewall for the ALVR server.
'';
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [cfg.package];
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [9943 9944];
allowedUDPPorts = [9943 9944];
};
};
}

View file

@ -0,0 +1,6 @@
# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations.
{
# List your module files here
alvr = import ./alvr.nix;
}

View file

@ -1,14 +0,0 @@
{
config,
lib,
pkgs,
vars,
...
}: {
home-manager.users.${vars.user} = {
home.file.".config/alacritty" = {
source = ../../rsc/config/alacritty;
recursive = true;
};
};
}

View file

@ -1,25 +0,0 @@
{
config,
lib,
pkgs,
vars,
...
}: {
nixpkgs.config.librewolf.enablePlasmaBrowserIntegration = true;
home-manager.users.${vars.user} = {
programs.librewolf = {
enable = true;
settings = {
"identity.fxaccounts.enabled" = true;
"browser.sessionstore.enabled" = false;
"browser.startup.page" = 1;
"browser.sessionstore.resume_session_once" = true;
"browser.sessionstore.resume_from_crash" = false;
"middlemouse.paste" = false;
"general.autoScroll" = true;
"security.OCSP.require" = false;
};
};
};
}

View file

@ -1,30 +0,0 @@
{
config,
lib,
pkgs,
vars,
...
}: {
home-manager.users.${vars.user} = {
programs.gpg = {
enable = true;
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
enableFishIntegration = true;
enableZshIntegration = true;
pinentryFlavor = "gnome3";
};
# Prevent clobbering SSH_AUTH_SOCK
home.sessionVariables.GSM_SKIP_SSH_AGENT_WORKAROUND = "1";
# Disable gnome-keyring ssh-agent
xdg.configFile."autostart/gnome-keyring-ssh.desktop".text = ''
${lib.fileContents "${pkgs.gnome3.gnome-keyring}/etc/xdg/autostart/gnome-keyring-ssh.desktop"}
Hidden=true
'';
};
}

View file

@ -1,16 +0,0 @@
#
# Network Discoverability (for printers, scanners and such)
#
{
services = {
avahi = {
enable = true;
nssmdns = true;
publish = {
enable = true;
addresses = true;
userServices = true;
};
};
};
}

View file

@ -1 +0,0 @@
[./avahi.nix]

View file

@ -1,15 +0,0 @@
{
config,
lib,
pkgs,
vars,
...
}: {
home-manager.users.${vars.user} = {
services.easyeffects.enable = true;
home.file.".config/easyeffects/output/Beyerdynamic_DT990_Oratory.json" = {
source = ../../rsc/config/easyeffects/Beyerdynamic_DT990_Oratory.json;
};
};
}

View file

@ -1,5 +0,0 @@
[
./git.nix
./fish.nix
./zsh.nix
]

View file

@ -1,30 +0,0 @@
{
config,
lib,
pkgs,
vars,
...
}: {
home-manager.users.${vars.user} = {
programs.fish = {
enable = true;
interactiveShellInit = ''
nix-your-shell fish | source
set fish_greeting
'';
shellAliases = {
lzg = "lazygit";
lzd = "lazydocker";
batt = ''upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -e "percentage" -e "state"'';
hx = "~/Documents/heliox-cli/target/debug/heliox-cli --mode";
slp = "systemctl suspend";
sdn = "shutdown 0";
};
shellAbbrs = {
build = "bash sdk/scripts/open_trentos_build_env.sh sdk/build-system.sh sdk/demos/demo_hello_world rpi3 build-rpi3-Debug-demo_hello_world -DCMAKE_BUILD_TYPE=Debug";
simbuild = "bash sdk/scripts/open_trentos_build_env.sh sdk/build-system.sh sdk/demos/demo_hello_world zynq7000 build-zynq7000-Debug-demo_hello_world -DCMAKE_BUILD_TYPE=Debug";
sim = "sudo bash ../sdk/scripts/open_trentos_test_env.sh ./simulate";
};
};
};
}

View file

@ -1,24 +0,0 @@
{
config,
lib,
pkgs,
vars,
...
}: {
home-manager.users.${vars.user} = {
#Prefer IPv4 for ssh
home.file.".ssh/config".text = "AddressFamily inet";
programs.git = {
enable = true;
userName = "GHOSCHT";
userEmail = "31184695+GHOSCHT@users.noreply.github.com";
extraConfig = {
commit.gpgsign = true;
user.signingkey = "0x2C2C1C62A5388E82";
init.defaultBranch = "main";
};
};
};
}

Some files were not shown because too many files have changed in this diff Show more