dotfiles

My PC Dotfiles & Website
commit 7a5338b4224a09e6caa58e47a118299f1a4883af
parent fd577cc1340620a865d23b4ca7a1303a5b463485
Author: maydayv7 <maydayv7@gmail.com>
Date:   Sun, 10 Dec 2023 19:01:27 +0530

fix: Dead Code

Diffstat:

11 files changed, 36 insertions(+), 31 deletions(-)

diff --git a/checks/flake.nix b/checks/flake.nix @@ -28,6 +28,10 @@ statix.enable = true; shellcheck.enable = false; stylua.enable = true; + deadnix = { + enable = true; + no-lambda-arg = true; + }; prettier = { enable = true; settings.bracketSameLine = true; diff --git a/devices/flake.nix b/devices/flake.nix @@ -60,7 +60,7 @@ in { }; # Install Media Checks - perSystem = {system, ...}: { + perSystem = _: { checks = pack.device self.installMedia "nixos-rebuild"; }; } diff --git a/files/gnome/dconf.nix b/files/gnome/dconf.nix @@ -6,11 +6,10 @@ ... }: with lib.hm.gvariant; let - inherit (builtins) head elem; + inherit (builtins) head; inherit (lib) mkBefore mkForce; homeDir = config.home.homeDirectory; fonts = sys.fonts.fontconfig.defaultFonts; - inherit (sys.gui) wallpaper; in { # Home Directory home.file = { diff --git a/modules/apps/games.nix b/modules/apps/games.nix @@ -4,7 +4,7 @@ pkgs, ... }: let - inherit (lib) mkAfter mkIf; + inherit (lib) mkIf; enable = builtins.elem "games" config.apps.list; wine = builtins.elem "wine" config.apps.list; in { diff --git a/modules/apps/vscode.nix b/modules/apps/vscode.nix @@ -2,7 +2,6 @@ config, lib, util, - inputs, pkgs, files, ... diff --git a/modules/gui/desktop/gnome.nix b/modules/gui/desktop/gnome.nix @@ -8,7 +8,7 @@ }: with files; let inherit (config.gui) desktop; - inherit (lib) mkIf mkForce mkMerge optional; + inherit (lib) mkIf mkForce mkMerge; exists = app: builtins.elem app config.environment.systemPackages; in { ## GNOME Desktop Configuration ## diff --git a/modules/gui/wayland.nix b/modules/gui/wayland.nix @@ -1,8 +1,4 @@ -{ - lib, - pkgs, - ... -}: { +{lib, ...}: { options.gui.wayland.enable = lib.mkEnableOption "Enable Wayland Configuration"; ## Wayland Configuration ## diff --git a/modules/hardware/virtualisation/default.nix b/modules/hardware/virtualisation/default.nix @@ -5,7 +5,7 @@ ... }: let inherit (builtins) concatStringsSep elem; - inherit (lib) mkIf mkOption optionals types; + inherit (lib) mkIf mkOption types; enable = elem "virtualisation" config.hardware.support; in { imports = [./android.nix]; diff --git a/modules/nix/config.nix b/modules/nix/config.nix @@ -2,6 +2,6 @@ allowAliases = true; allowBroken = false; allowUnfree = true; - allowInsecurePredicate = x: true; + allowInsecurePredicate = _: true; pulseAudio = true; } diff --git a/modules/nix/index.nix b/modules/nix/index.nix @@ -2,7 +2,6 @@ config, lib, inputs, - pkgs, ... }: { options.nix.index = lib.mkEnableOption "Enable Package Indexer"; diff --git a/scripts/nixos.nix b/scripts/nixos.nix @@ -226,8 +226,29 @@ in else DIR=${path.system} fi + + echo "Cloning Repository..." git clone --recurse-submodules ${path.repo} "$DIR" pushd "$DIR" &> /dev/null; git config core.fileMode false; popd &> /dev/null + newline + + read -rp "Enter Path to GPG Keys (path/.git): " KEY + LINK='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]' + if [ -z "$KEY" ] + then + error "Path to GPG Keys cannot be empty" + elif [[ $KEY =~ $LINK ]] + then + echo "Cloning Keys..." + git clone "$KEY" keys --progress + else + cp -r "$KEY"/. ./keys + fi + echo "Importing Keys..." + find ./keys -name '*.gpg' -exec gpg --homedir ${files.gpg} --import {} \+ + rm -rf ./keys + newline + nixos apply --activate ;; "") @@ -236,6 +257,7 @@ in then error "This Command must be Executed as 'root'" fi + read -rp "Enter Name of Device to Install: " HOST read -rp "Do you want to Automatically Create the Partitions? (Y/N): " choice case $choice in @@ -262,8 +284,10 @@ in *) error "Choose (1)simple or (2)advanced";; esac newline + mount_other newline + read -rp "Enter Path to Repository (path/URL): " URL if [ -z "$URL" ] then @@ -273,25 +297,9 @@ in nixos-install --no-root-passwd --root /mnt --flake "$URL"#"$HOST" newline - read -rp "Enter Path to GPG Keys (path/.git): " KEY - LINK='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]' - if [ -z "$KEY" ] - then - error "Path to GPG Keys cannot be empty" - elif [[ $KEY =~ $LINK ]] - then - echo "Cloning Keys..." - git clone "$KEY" keys --progress - else - cp -r "$KEY"/. ./keys - fi - echo "Importing Keys..." - find ./keys -name '*.gpg' -exec gpg --homedir /mnt${files.gpg} --import {} \+ - rm -rf ./keys - newline - unmount_all newline + info "Run 'nixos install --first-boot' after rebooting to finish the install" restart ;;