From dadf6bd521e62a08870afaa953c42f08a409afde Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sat, 22 Jun 2024 13:10:30 +0200 Subject: [PATCH] android and other stuff --- modules/hardware/android.nix | 14 ++++++++++++++ modules/hardware/default.nix | 4 ++-- modules/misc/cli-tools.nix | 12 +++++++----- modules/misc/default.nix | 1 + modules/misc/packages-list.nix | 8 ++++++++ systems/pc/configuration.nix | 2 +- users/kopatz/home.nix | 5 +++++ 7 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 modules/hardware/android.nix create mode 100644 modules/misc/packages-list.nix diff --git a/modules/hardware/android.nix b/modules/hardware/android.nix new file mode 100644 index 0000000..ca131ec --- /dev/null +++ b/modules/hardware/android.nix @@ -0,0 +1,14 @@ +{ config, pkgs, lib, ... }: +let cfg = config.custom.hardware.android; +in { + options.custom.hardware.android = { + enable = lib.mkEnableOption "Enables android phone support"; + }; + + config = lib.mkIf cfg.enable { + programs.adb = { + enable = true; + }; + users.users.${config.mainUser.name}.extraGroups = [ "adbusers" ]; + }; +} diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index 6b9d4db..35c6d24 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -1,6 +1,6 @@ -{ pkgs, config, ...}: -{ +{ pkgs, config, ... }: { imports = [ + ./android.nix ./firmware.nix ./nvidia.nix ./scheduler.nix diff --git a/modules/misc/cli-tools.nix b/modules/misc/cli-tools.nix index 4179a54..14107b2 100644 --- a/modules/misc/cli-tools.nix +++ b/modules/misc/cli-tools.nix @@ -10,6 +10,13 @@ in config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ + fzf # fuzzy finder + bat # fancy cat + fd # nicer find + duf # nicer du + eza # nicer ls + ripgrep # faster grep + gdu wget pciutils rippkgs # faster nixpkgs search, init with `rippkgs-index nixpkgs && mv rippkgs-index.sqlite ~/.local/share/`; @@ -23,7 +30,6 @@ in inputs.agenix.packages."x86_64-linux".default fastfetch pdfgrep - ncdu glxinfo vulkan-tools ffmpeg @@ -40,19 +46,15 @@ in screen tmux fatrace # monitor filesystem events - ripgrep nh nix-output-monitor # nom nvd # nix diff, example: nvd diff /nix/var/nix/profiles/system-389-link /nix/var/nix/profiles/system-390-link compsize trashy # move files to trash - fzf # fuzzy finder - bat # fancy cat shell-gpt libheif #convert heic to jpg with `heif-convert something.heic something.jpg` tree kop-newproject # creates a shell.nix and .envrc - fd # nicer find ]; }; } diff --git a/modules/misc/default.nix b/modules/misc/default.nix index a0d6928..4b7c9d6 100644 --- a/modules/misc/default.nix +++ b/modules/misc/default.nix @@ -1,6 +1,7 @@ { pkgs, config, ...}: { imports = [ + ./packages-list.nix ./backup.nix ./btrfs.nix ./cli-tools.nix diff --git a/modules/misc/packages-list.nix b/modules/misc/packages-list.nix new file mode 100644 index 0000000..27dd7a6 --- /dev/null +++ b/modules/misc/packages-list.nix @@ -0,0 +1,8 @@ +{ config, pkgs, ... }: { + environment.etc."current-system-packages".text = let + packages = builtins.map (p: "${p.name}") config.environment.systemPackages; + sortedUnique = + builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages); + formatted = builtins.concatStringsSep "\n" sortedUnique; + in formatted; +} diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index a95d4ea..446bff0 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -38,6 +38,7 @@ #}; misc = { docker.enable = true; }; hardware = { + android.enable = true; nvidia.enable = true; firmware.enable = true; ssd.enable = true; @@ -45,7 +46,6 @@ tpm.enable = true; tablet.enable = true; }; - services = { caldav.enable = true; }; graphical = { audio.enable = true; code = { diff --git a/users/kopatz/home.nix b/users/kopatz/home.nix index 960defa..c9455ef 100644 --- a/users/kopatz/home.nix +++ b/users/kopatz/home.nix @@ -161,6 +161,11 @@ tags = [ "security" ]; url = "https://cvefeed.io/rssfeed/severity/high.xml"; } + { + title = "Terminal Trove"; + tags = [ "terminal" "cli" ]; + url = "https://terminaltrove.com/new.xml"; + } ]; };