Initial commit

This commit is contained in:
Franek 2025-02-06 11:58:03 +01:00
commit 5b865c24e2
26 changed files with 958 additions and 0 deletions

59
derivations/ddt4all.nix Normal file
View File

@ -0,0 +1,59 @@
{ mkDerivation,
lib,
stdenv,
fetchFromGitHub,
python3,
qtbase,
qttools,
wrapQtAppsHook,
git,
which,
}:
let
myPython = python3.withPackages (pkgs: with pkgs; [ pyqt5 pyqtwebengine pyusb crcmod pyserial ]);
in
mkDerivation rec {
pname = "ddt4all";
version = "1.0.0"; # Replace with the actual version if necessary
src = fetchFromGitHub {
owner = "cedricp";
repo = "ddt4all";
rev = "master";
sha256 = "sha256-EX7cobgxM8/o4cRmfMMDSYG9X9Av6zmoWlSv1nzfl5o=";
};
# If necessary, add patches to the source
# patches = [ ./some_patch.patch ];
nativeBuildInputs = [
myPython
wrapQtAppsHook # This is useful for Qt apps
qttools # Required for Qt applications
which # For locating binaries (e.g., python3)
];
propagatedBuildInputs = [
myPython
qtbase
qttools
];
#makeFlags = [ "PREFIX=$(out)" ];
runScript = ''
# Set up environment for running the app
export LD_LIBRARY_PATH=${qtbase}/lib:${myPython}/lib:$LD_LIBRARY_PATH
if [ ! -d ".venv" ]; then
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
else
source .venv/bin/activate
fi
# Run the application
python3 main.py
'';
}

249
flake.lock generated Normal file
View File

@ -0,0 +1,249 @@
{
"nodes": {
"ags": {
"inputs": {
"astal": "astal",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1736677288,
"narHash": "sha256-Vj3WOLy6o6Zf44Rwg9eLqNRQPlVoDrQ89tsef3l3990=",
"owner": "Aylur",
"repo": "ags",
"rev": "90db9b9fecc0f4228440d83107c6c745a35e7d77",
"type": "github"
},
"original": {
"owner": "Aylur",
"repo": "ags",
"type": "github"
}
},
"apple-emoji": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1711624089,
"narHash": "sha256-Glk61yudkHfUaTMlfUPLay/d6R/prmIt37oEWtVh+Qw=",
"owner": "oxcl",
"repo": "apple-emoji-nix",
"rev": "5b1a9d2513af73b5a23c7656e34d54a6bf76b34d",
"type": "github"
},
"original": {
"owner": "oxcl",
"repo": "apple-emoji-nix",
"type": "github"
}
},
"apple-fonts": {
"inputs": {
"nixpkgs": "nixpkgs_2",
"ny": "ny",
"sf-arabic": "sf-arabic",
"sf-compact": "sf-compact",
"sf-mono": "sf-mono",
"sf-pro": "sf-pro"
},
"locked": {
"lastModified": 1732029343,
"narHash": "sha256-sAOEhA/vfyAKggwyI3PNy2xeNzb/USZl4YNpeSzMRBI=",
"owner": "Lyndeno",
"repo": "apple-fonts.nix",
"rev": "714767021b57d0d30de35eb90e4b748fbbb9c99f",
"type": "github"
},
"original": {
"owner": "Lyndeno",
"repo": "apple-fonts.nix",
"type": "github"
}
},
"astal": {
"inputs": {
"nixpkgs": [
"ags",
"nixpkgs"
]
},
"locked": {
"lastModified": 1735172721,
"narHash": "sha256-rtEAwGsHSppnkR3Qg3eRJ6Xh/F84IY9CrBBLzYabalY=",
"owner": "aylur",
"repo": "astal",
"rev": "6c84b64efc736e039a8a10774a4a1bf772c37aa2",
"type": "github"
},
"original": {
"owner": "aylur",
"repo": "astal",
"type": "github"
}
},
"fingerprint-sensor": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1734692513,
"narHash": "sha256-3QEzFFrkXLj/JgZGoLaxq/pPkflSXfBOP10bXL8/Niw=",
"owner": "ahbnr",
"repo": "nixos-06cb-009a-fingerprint-sensor",
"rev": "3678b193efa1e06aab86058aecee18ddaa8878d2",
"type": "github"
},
"original": {
"owner": "ahbnr",
"ref": "24.11",
"repo": "nixos-06cb-009a-fingerprint-sensor",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1736373539,
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.11",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1711523803,
"narHash": "sha256-UKcYiHWHQynzj6CN/vTcix4yd1eCu1uFdsuarupdCQQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2726f127c15a4cc9810843b96cad73c7eb39e443",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1731319897,
"narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "dc460ec76cbff0e66e269457d7b728432263166c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1736549401,
"narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1dab772dd4a68a7bba5d9460685547ff8e17d899",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"ny": {
"flake": false,
"locked": {
"narHash": "sha256-3257NAH4qlan2YHVLpNRy7x8IJqR2pal3OzFo/ykqXs=",
"type": "file",
"url": "https://devimages-cdn.apple.com/design/resources/download/NY.dmg"
},
"original": {
"type": "file",
"url": "https://devimages-cdn.apple.com/design/resources/download/NY.dmg"
}
},
"root": {
"inputs": {
"ags": "ags",
"apple-emoji": "apple-emoji",
"apple-fonts": "apple-fonts",
"fingerprint-sensor": "fingerprint-sensor",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_3"
}
},
"sf-arabic": {
"flake": false,
"locked": {
"narHash": "sha256-/0gjRimqvZyE60xYxxPdlU+7Q2LJnnvtbmwOP0YmS9U=",
"type": "file",
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Arabic.dmg"
},
"original": {
"type": "file",
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Arabic.dmg"
}
},
"sf-compact": {
"flake": false,
"locked": {
"narHash": "sha256-J72Lyt2wy83E46wN8w6/Rih9kilM9wEjtY6KnbF0DsA=",
"type": "file",
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg"
},
"original": {
"type": "file",
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg"
}
},
"sf-mono": {
"flake": false,
"locked": {
"narHash": "sha256-ICdHRFdNL7PM/fXJUzS7LgZxZiqcyIuCMHLze4En4vg=",
"type": "file",
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Mono.dmg"
},
"original": {
"type": "file",
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Mono.dmg"
}
},
"sf-pro": {
"flake": false,
"locked": {
"narHash": "sha256-Q/pOQ4MGhW/ZtLka+UUQcwSoZFDWW34XvutxL4GvzUY=",
"type": "file",
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg"
},
"original": {
"type": "file",
"url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg"
}
}
},
"root": "root",
"version": 7
}

26
flake.nix Normal file
View File

@ -0,0 +1,26 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
apple-emoji.url = "github:oxcl/apple-emoji-nix";
ags = {
url = "github:Aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
fingerprint-sensor = {
url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor/24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, ... }: {
nixosConfigurations = import ./hosts { inherit self; };
};
}

18
hosts/NERD_tree_tab_1 Normal file
View File

@ -0,0 +1,18 @@
" Press ? for help
.. (up a dir)
/etc/nixos/
hosts/
modules/
overlays/
profiles/
hulk/
fish/
default.nix [RO]
files.nix [RO]
packages.nix [RO]
programs.nix [RO]
theme.nix [RO]
default.nix [RO]
flake.lock [RO]
flake.nix [RO]

View File

@ -0,0 +1,36 @@
{ config, pkgs, ... }:
{
# DO NOT change this unless you know what you're doing!
system.stateVersion = "24.11";
environment.variables = {
XDG_SESSION_TYPE = "wayland";
XDG_CURRENT_DESKTOP = "Hyprland";
NIXPKGS_ALLOW_INSECURE = 1;
};
nixpkgs.config = {
allowInsecurePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [
"fluffychat-linux"
"olm"
"python312Packages.youtube-dl"
];
};
environment.systemPackages = with pkgs; [
alacritty
vim
bluez
xwayland
unzip
networkmanager
];
services.automatic-timezoned.enable = true;
boot.loader.grub.enable = false;
boot.loader.systemd-boot.enable = true;
programs.xwayland.enable = true;
}

20
hosts/default.nix Normal file
View File

@ -0,0 +1,20 @@
{ self, ... }:
let
inherit (self) inputs;
system = "x86_64-linux";
homeDir = self + /profiles;
pkgs = inputs.nixpkgs.legacyPackages.${system};
mkSystem = pkgs: hostname:
pkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./base-configuration.nix
./${hostname}
homeDir
inputs.home-manager.nixosModules.home-manager
];
};
in {
hulk = mkSystem inputs.nixpkgs "hulk";
}

20
hosts/hulk/default.nix Normal file
View File

@ -0,0 +1,20 @@
{
imports = [
./hardware-configuration.nix
./modules.nix
./services.nix
./programs.nix
./users.nix
./networking.nix
./fonts.nix
];
nixpkgs.config.allowUnfree = true;
swapDevices = [
{
device = "/swap";
size = 8192;
}
];
}

20
hosts/hulk/fonts.nix Normal file
View File

@ -0,0 +1,20 @@
{ pkgs, inputs, ... }:
{
fonts.fontDir.enable = true;
fonts.packages = [
inputs.apple-emoji.packages.${pkgs.system}.apple-emoji-nix
inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd
inputs.apple-fonts.packages.${pkgs.system}.sf-compact-nerd
inputs.apple-fonts.packages.${pkgs.system}.sf-mono-nerd
];
fonts.fontconfig.enable = true;
fonts.enableDefaultPackages = false;
fonts.fontconfig.defaultFonts = {
sansSerif = [ "SFProText Nerd Font" "SFProDisplay Nerd Font" ];
serif = [ "SFProText Nerd Font" "SFProDisplay Nerd Font" ];
monospace = [ "SFMono Nerd Font" ];
emoji = [ "Apple Color Emoji" ];
};
}

View File

@ -0,0 +1,39 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9c4c982e-0ea2-46c7-b7d6-e5a94f8562d3";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/A399-E37C";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

10
hosts/hulk/modules.nix Normal file
View File

@ -0,0 +1,10 @@
{ inputs, ... }:
{
imports = [
../../modules/greetd.nix
../../modules/nvidia-support.nix
../../modules/open-fprint-suspend-fix.nix
inputs.fingerprint-sensor.nixosModules."06cb-009a-fingerprint-sensor"
];
}

10
hosts/hulk/programs.nix Normal file
View File

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
programs.thunar.enable = true;
programs.thunar.plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
}

59
hosts/hulk/services.nix Normal file
View File

@ -0,0 +1,59 @@
{ pkgs, ... }:
{
services."06cb-009a-fingerprint-sensor" = {
enable = true;
backend = "python-validity";
calib-data-file = ./calib-data.bin;
};
services.greetd-hyprland.enable = true;
services.nvidia.enable = true;
services.fingerprint-fix.enable = true;
services.fprintd.enable = pkgs.lib.mkForce true;
services.upower.enable = true;
services.udev.enable = true;
services.udev.packages = [ pkgs.hyprland ];
services.printing = {
enable = true;
drivers = with pkgs; [ hplipWithPlugin ];
};
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = false;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
extraConfig.pipewire.context.properties = {
default.clock.allowed-rates = [ 44100 48000 96000 ];
log.level = 4;
default.clock.quantum = 256;
default.clock.min-quantum = 256;
default.clock.max-quantum = 256;
};
};
systemd.services.bluetooth.serviceConfig.ExecStart = pkgs.lib.mkForce [
""
"${pkgs.bluez}/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf -C"
];
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
services.blueman.enable = true;
services.gvfs.enable = true;
services.tlp = {
enable = true;
settings = {
START_CHARGE_THRESH_BAT0 = 40;
STOP_CHARGE_THRESH_BAT0 = 80;
};
};
}

16
hosts/hulk/users.nix Normal file
View File

@ -0,0 +1,16 @@
{ pkgs, ... }:
let
username = "sadorowo";
fullname = "Franek";
preferredShell = pkgs.fish;
in {
users.users.${username} = {
isNormalUser = true;
description = fullname;
home = "/home/${username}";
extraGroups = [ "wheel" "networkmanager" ];
shell = preferredShell;
ignoreShellProgramCheck = true; # Will do it later in profile configuration
};
}

16
modules/greetd.nix Normal file
View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
{
options.services.greetd-hyprland.enable = lib.mkEnableOption "Enable GreetD with TUI-based login.";
config = lib.mkIf config.services.greetd-hyprland.enable {
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
};
};
};
};
}

View File

@ -0,0 +1,13 @@
{ config, lib, ... }:
{
options.services.nvidia.enable = lib.mkEnableOption "Enable NVIDIA kernel and modprobe configurations.";
config = lib.mkIf config.services.nvidia.enable {
boot.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
boot.extraModprobeConfig = ''
options nvidia NVreg_OpenRmEnableUnsupportedGpus=1
'';
};
}

View File

@ -0,0 +1,19 @@
{ config, lib, ... }:
{
options.services.fingerprint-fix.enable = lib.mkEnableOption "Enable systemd service to restart fingerprint services after suspend.";
config = lib.mkIf config.services.fingerprint-fix.enable {
systemd.services.validity-restart = let
targets = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target" ];
in {
description = "Restart services to fix fingerprint integration";
wantedBy = targets;
after = targets;
serviceConfig = {
type = "oneshot";
ExecStart = "systemctl restart open-fprintd.service python3-validity.service";
};
};
};
}

15
profiles/default.nix Normal file
View File

@ -0,0 +1,15 @@
{ self, impurity, inputs, ... }: {
home-manager = {
verbose = true;
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "bak";
extraSpecialArgs = {
inherit inputs self impurity;
};
users = {
sadorowo = ./hulk;
};
};
}

27
profiles/hulk/default.nix Normal file
View File

@ -0,0 +1,27 @@
{ pkgs, ... }:
let
username = "sadorowo";
homeDirectory = "/home/${username}";
in {
imports = [
./packages.nix # Packages to install
./programs.nix # Programs to enable
./files.nix # Files to create
./theme.nix # System-wide/GTK theme
];
home = {
inherit username homeDirectory;
sessionVariables = {
NIXPKGS_ALLOW_UNFREE = "1";
NIXPKGS_ALLOW_INSECURE = "1";
NIXOS_OZONE_WL = "1";
TZ = "Europe/Warsaw";
LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH";
};
};
programs.home-manager.enable = true;
home.stateVersion = "24.11"; # DO NOT change this unless you know what you're doing!
}

6
profiles/hulk/files.nix Normal file
View File

@ -0,0 +1,6 @@
{
xdg.configFile."gtk-3.0/settings.ini".text = ''
[Settings]
gtk-icon-theme-name=Adwaita
'';
}

View File

@ -0,0 +1,76 @@
{
imports = [
./starship.nix
./nix-index.nix
];
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting
'';
shellAliases = {
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../../";
"....." = "cd ../../../../";
"cp" = "cp -v";
"ddf" = "df -h";
"etc" = "erd -H";
"mkdir" = "mkdir -p";
"mv" = "mv -v";
"rm" = "rm -v";
"rr" = "rm -rf";
"neofetch" = "fastfetch";
};
shellAbbrs = {
gaa = "git add -A";
ga = "git add";
gbd = "git branch --delete";
gb = "git branch";
gc = "git commit";
gcm = "git commit -m";
gcob = "git checkout -b";
gco = "git checkout";
gd = "git diff";
gl = "git log";
gp = "git push";
gs = "git status";
};
functions = {
webcopy = ''
function webcopy
set -l domain (string trim $argv)
wget --recursive \
--level 5 \
--no-clobber \
--page-requisites \
--adjust-extension \
--span-hosts \
--convert-links \
--domains $domain \
--no-parent \
$domain
end
'';
venv = ''
function venv
source .venv/bin/activate.fish
end
'';
thunderbird = ''
if pgrep -x birdtray > /dev/null
birdtray -s
else
birdtray &
end
'';
};
};
}

View File

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

View File

@ -0,0 +1,6 @@
{
programs.starship = {
enable = true;
enableFishIntegration = true;
};
}

View File

@ -0,0 +1,71 @@
{ pkgs, inputs, ... }:
let
ddt4all = pkgs.stdenv.mkDerivation {
name = "ddt4all";
src = pkgs.fetchFromGitHub {
owner = "cedricp";
repo = "ddt4all";
rev = "master";
sha256 = "sha256-EX7cobgxM8/o4cRmfMMDSYG9X9Av6zmoWlSv1nzfl5o=";
};
nativeBuildInputs = [ pkgs.git ];
buildInputs = [ pkgs.stdenv.cc.cc.lib ];
installPhase = ''
mkdir -p $out/DDT4ALL
cp -r * $out/DDT4ALL
'';
};
in {
imports = [ inputs.ags.homeManagerModules.default ];
home = {
activation.ddt4all = pkgs.lib.mkAfter ''
if [ ! -d "$HOME/DDT4ALL" ]; then
cp -r ${ddt4all}/DDT4ALL $HOME/DDT4ALL
fi
'';
packages = with pkgs; [
hyprland hyprlock hypridle hyprshot wl-clipboard cliphist swww
lxqt.lxqt-policykit
stdenv.cc.cc.lib
(python3.withPackages (py: with py; [
pywayland
]))
(birdtray.overrideAttrs (_: {
cmakeFlags = [ "-DOPT_THUNDERBIRD_CMDLINE=${thunderbird}/bin/thunderbird" ];
}))
jq
bluez
dconf
starship
firefox-beta-bin
thunderbird-bin
fluffychat
libreoffice-qt6-fresh
gimp
vscodium git nodejs
fprintd
cups
fish
anydesk
fastfetch
greetd.greetd greetd.tuigreet
playerctl
adwaita-icon-theme
darkman
android-tools
filezilla
bitwarden-desktop
davinci-resolve
mpv
wget
sshfs
];
};
}

View File

@ -0,0 +1,32 @@
{ inputs, pkgs, ... }:
{
imports = [ ./fish ];
programs.ags = {
enable = true;
extraPackages = with inputs.ags.packages.${pkgs.system}; [
apps battery bluetooth greet hyprland mpris network notifd powerprofiles tray wireplumber
] ++ [
pkgs.fzf pkgs.icon-library
];
};
services.darkman = {
enable = true;
darkModeScripts = {
gtk-theme = ''
${pkgs.dconf}/bin/dconf write\
/org/gnome/desktop/interface/color-scheme "'prefer-dark'"
'';
};
lightModeScripts = {
gtk-theme = ''
${pkgs.dconf}/bin/dconf write\
/org/gnome/desktop/interface/color-scheme "'prefer-light'"
'';
};
settings = {
usegeoclue = true;
};
};
}

36
profiles/hulk/theme.nix Normal file
View File

@ -0,0 +1,36 @@
{ pkgs, inputs, ... }:
let
nerdfonts = (pkgs.nerdfonts.override {
fonts = [
"CascadiaCode"
"JetBrainsMono"
"FiraCode"
"SpaceMono"
];
});
cursor-theme = "Bibata-Modern-Classic";
cursor-pkg = pkgs.bibata-cursors;
in
{
home = {
packages = with pkgs; [
adw-gtk3
material-symbols
noto-fonts
noto-fonts-cjk-sans
bibata-cursors
];
sessionVariables = {
XCURSOR_THEME = cursor-theme;
XCURSOR_SIZE = "24";
};
pointerCursor = {
package = cursor-pkg;
name = cursor-theme;
size = 24;
gtk.enable = true;
};
};
}

53
shell.nix Normal file
View File

@ -0,0 +1,53 @@
{ pkgs ? import <nixpkgs> {} }:
let
pythonWithPkgs = pkgs.python3.withPackages (ps: with ps; [
ps.pyqt5
ps.pyqtwebengine
ps.pyusb
ps.crcmod
ps.pyserial
]);
in
pkgs.mkShell {
name = "ddt4all-env";
buildInputs = [
pythonWithPkgs
pkgs.qt5.qtbase
pkgs.qt5.qttools
pkgs.git
pkgs.freetype
pkgs.libGL
pkgs.dbus
pkgs.xorg.libX11
pkgs.xorg.libXcomposite
pkgs.xorg.libXdamage
pkgs.xorg.libXfixes
pkgs.xorg.libXrender
pkgs.xorg.libXrandr
pkgs.xorg.libXtst
pkgs.glib
pkgs.expat
pkgs.fontconfig
];
nativeBuildInputs = [ pkgs.libsForQt5.qt5.wrapQtAppsHook ];
shellHook = ''wrapQtAppsHook'';
runScript = ''
cd $HOME/DDT4ALL
if [ ! -d ".venv" ]; then
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
else
source .venv/bin/activate
fi
python3 main.py
'';
}