mirror of
https://github.com/JaxTheWolf/nixos.git
synced 2026-04-01 02:00:22 +02:00
WIP: Laptop config
This commit is contained in:
85
common/flakes/czkawka-master/flake.nix
Normal file
85
common/flakes/czkawka-master/flake.nix
Normal file
@@ -0,0 +1,85 @@
|
||||
{
|
||||
description = "Krokiet (Czkawka Slint GUI)";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
czkawka-src = {
|
||||
url = "github:qarmin/czkawka";
|
||||
flake = false;
|
||||
};
|
||||
naersk = {
|
||||
url = "github:nix-community/naersk";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
czkawka-src,
|
||||
naersk,
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
naersk-lib = pkgs.callPackage naersk { };
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
cmake
|
||||
makeWrapper
|
||||
cargo
|
||||
rustc
|
||||
];
|
||||
|
||||
runtimeLibs = with pkgs; [
|
||||
wayland
|
||||
libxkbcommon
|
||||
libglvnd
|
||||
fontconfig
|
||||
libX11
|
||||
libXcursor
|
||||
libXi
|
||||
libXrandr
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
packages.${system}.default = naersk-lib.buildPackage {
|
||||
pname = "krokiet";
|
||||
version = "master";
|
||||
src = czkawka-src;
|
||||
|
||||
nativeBuildInputs = nativeBuildInputs;
|
||||
buildInputs = runtimeLibs;
|
||||
|
||||
cargoBuildOptions =
|
||||
x:
|
||||
x
|
||||
++ [
|
||||
"-p"
|
||||
"krokiet"
|
||||
];
|
||||
|
||||
buildAndCheckFeatures = [
|
||||
"winit_wayland"
|
||||
"winit_x11"
|
||||
];
|
||||
|
||||
RUSTFLAGS = "-C target-cpu=native";
|
||||
NIX_CFLAGS_COMPILE = "-march=native -mtune=native";
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/krokiet \
|
||||
--prefix LD_LIBRARY_PATH : ${pkgs.lib.makeLibraryPath runtimeLibs}
|
||||
|
||||
install -Dm444 -t $out/share/applications data/io.github.qarmin.krokiet.desktop
|
||||
|
||||
install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/io.github.qarmin.krokiet.svg \
|
||||
|
||||
install -Dm444 -t $out/share/metainfo data/io.github.qarmin.krokiet.metainfo.xml
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
82
common/flakes/fet/flake.nix
Normal file
82
common/flakes/fet/flake.nix
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
description = "FET - Free Timetabling Software";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
packages.default = pkgs.stdenv.mkDerivation rec {
|
||||
pname = "fet";
|
||||
version = "7.7.6";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://lalescu.ro/liviu/fet/download/fet-${version}.tar.xz";
|
||||
sha256 = "06vvxxl5kza3a2v0fkw6bylavpickk8a5ybgabbhylmi59c1q1ns";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.qt6.qmake
|
||||
pkgs.qt6.wrapQtAppsHook
|
||||
pkgs.copyDesktopItems
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
pkgs.qt6.qtbase
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
qmake fet.pro
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(pkgs.makeDesktopItem {
|
||||
name = "fet";
|
||||
exec = "fet";
|
||||
icon = "fet";
|
||||
comment = "Free Timetabling Software";
|
||||
desktopName = "FET";
|
||||
categories = [
|
||||
"Education"
|
||||
"Qt"
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp fet $out/bin/
|
||||
|
||||
mkdir -p $out/share/icons/hicolor/128x128/apps
|
||||
cp icons/fet.png $out/share/icons/hicolor/128x128/apps/fet.png
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "Free software for automatically scheduling timetables";
|
||||
homepage = "https://lalescu.ro/liviu/fet/";
|
||||
license = licenses.agpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
mainProgram = "fet";
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
70
common/flakes/solaar-master/flake.nix
Normal file
70
common/flakes/solaar-master/flake.nix
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
description = "Solaar built from GitHub master branch";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
solaar-src = {
|
||||
url = "github:pwr-Solaar/Solaar/master";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
solaar-src,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pythonPackages = pkgs.python3Packages;
|
||||
in
|
||||
{
|
||||
packages.default = pythonPackages.buildPythonApplication rec {
|
||||
pname = "solaar";
|
||||
version = "master-${solaar-src.shortRev or "dirty"}";
|
||||
src = solaar-src;
|
||||
pyproject = true;
|
||||
|
||||
nativeBuildInputs =
|
||||
with pkgs;
|
||||
[
|
||||
gobject-introspection
|
||||
wrapGAppsHook3
|
||||
pkg-config
|
||||
]
|
||||
++ (with pythonPackages; [
|
||||
setuptools
|
||||
wheel
|
||||
]);
|
||||
|
||||
propagatedBuildInputs = with pythonPackages; [
|
||||
pyudev
|
||||
psutil
|
||||
xlib
|
||||
pyyaml
|
||||
evdev
|
||||
dbus-python
|
||||
pygobject3
|
||||
typing-extensions
|
||||
|
||||
pkgs.gtk3
|
||||
pkgs.libnotify
|
||||
pkgs.libayatana-appindicator
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 rules.d/42-logitech-unify-permissions.rules \
|
||||
$out/lib/udev/rules.d/42-logitech-unify-permissions.rules
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user