From 6ec6eb239a8231ed3b659d06372f6745e3f7d82e Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Sat, 8 Jun 2024 20:02:41 -0600 Subject: [PATCH] nixfmt fix --- base.nix | 42 ++----- gnome.nix | 40 +++--- home-manager.nix | 20 +-- hosts/workstation/configuration.nix | 89 ++++++------- hosts/workstation/hardware-configuration.nix | 124 ++++++++----------- modules/apps/office.nix | 12 +- modules/dev/docker.nix | 16 +-- modules/dev/haskell.nix | 13 +- modules/dev/javascript.nix | 27 ++-- modules/dev/nix.nix | 8 +- modules/dev/python.nix | 48 +++---- modules/dev/sh.nix | 20 +-- modules/emacs.nix | 56 ++++----- modules/scripts/download.nix | 23 ++-- modules/scripts/find-dup-episode.nix | 13 +- modules/scripts/manage-library.nix | 11 +- modules/scripts/nextcloud-cronjob.nix | 13 +- modules/scripts/run.nix | 11 +- modules/scripts/sub-sync.nix | 11 +- modules/scripts/update-dns.nix | 11 +- modules/shell/tools.nix | 22 ++-- pkgs/obs-studio.nix | 13 +- 22 files changed, 223 insertions(+), 420 deletions(-) diff --git a/base.nix b/base.nix index fdfe6bd..4b79274 100644 --- a/base.nix +++ b/base.nix @@ -1,12 +1,4 @@ -{ - config, - lib, - pkgs, - inputs, - outputs, - ... -}: -{ +{ config, lib, pkgs, inputs, outputs, ... }: { imports = [ inputs.home-manager.nixosModules.home-manager ./modules/apps.nix @@ -19,9 +11,7 @@ home-manager = { useUserPackages = true; useGlobalPkgs = true; - extraSpecialArgs = { - inherit inputs outputs; - }; + extraSpecialArgs = { inherit inputs outputs; }; users.jawz = import ./home-manager.nix; }; system.stateVersion = "24.05"; @@ -31,9 +21,7 @@ }; i18n = { defaultLocale = "en_CA.UTF-8"; - extraLocaleSettings = { - LC_MONETARY = "es_MX.UTF-8"; - }; + extraLocaleSettings = { LC_MONETARY = "es_MX.UTF-8"; }; }; console = { font = "Lat2-Terminus16"; @@ -46,14 +34,12 @@ enable = true; wheelNeedsPassword = false; }; - pam.loginLimits = [ - { - domain = "*"; - type = "soft"; - item = "nofile"; - value = "8192"; - } - ]; + pam.loginLimits = [{ + domain = "*"; + type = "soft"; + item = "nofile"; + value = "8192"; + }]; }; nix = { optimise.automatic = true; @@ -63,10 +49,7 @@ }; settings = { auto-optimise-store = true; - experimental-features = [ - "nix-command" - "flakes" - ]; + experimental-features = [ "nix-command" "flakes" ]; substituters = [ "https://nix-gaming.cachix.org" "https://nixpkgs-python.cachix.org" @@ -85,9 +68,7 @@ ]; }; }; - documentation = { - enable = false; - }; + documentation = { enable = false; }; users.groups.piracy.gid = 985; environment = { systemPackages = with pkgs; [ wget ]; @@ -100,6 +81,7 @@ XDG_STATE_HOME = "\${HOME}/.local/state"; # DEV PATH + CARGO_HOME = "${XDG_DATA_HOME}/cargo"; GEM_HOME = "${XDG_DATA_HOME}/ruby/gems"; GEM_PATH = "${XDG_DATA_HOME}/ruby/gems"; GEM_SPEC_CACHE = "${XDG_DATA_HOME}/ruby/specs"; diff --git a/gnome.nix b/gnome.nix index 41b0f75..d80cc46 100644 --- a/gnome.nix +++ b/gnome.nix @@ -17,30 +17,27 @@ }; }; }; - environment.gnome.excludePackages = - (with pkgs; [ - gnome-photos - gnome-tour - gnome-text-editor - gnome-connections - # gnome-shell-extensions - baobab - ]) - ++ (with pkgs.gnome; [ - # totem - gnome-music - epiphany - gnome-characters - yelp - gnome-font-viewer - cheese - ]); + environment.gnome.excludePackages = (with pkgs; [ + gnome-photos + gnome-tour + gnome-text-editor + gnome-connections + # gnome-shell-extensions + baobab + ]) ++ (with pkgs.gnome; [ + # totem + gnome-music + epiphany + gnome-characters + yelp + gnome-font-viewer + cheese + ]); qt = { enable = true; style = "adwaita"; }; - users.users.jawz.packages = - with pkgs; + users.users.jawz.packages = with pkgs; ([ # ffmpegthumbnailer # generate thumbnails adw-gtk3 # theme legacy applications @@ -49,8 +46,7 @@ # gradience # theme customizer, allows you to modify adw-gtk3 themes # lm_sensors # for extension, displays cpu temp libgda # for pano shell extension - ]) - ++ (with pkgs.gnomeExtensions; [ + ]) ++ (with pkgs.gnomeExtensions; [ appindicator # applets for open applications reading-strip # like putting a finger on every line I read tactile # window manager diff --git a/home-manager.nix b/home-manager.nix index af847e8..bfa3c20 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -1,22 +1,10 @@ -{ - config, - lib, - pkgs, - inputs, - outputs, - ... -}: -{ +{ config, lib, pkgs, inputs, outputs, ... }: { home.stateVersion = "24.05"; programs.bash = { enable = true; historyFile = "\${XDG_STATE_HOME}/bash/history"; - historyControl = [ - "erasedups" - "ignorespace" - "ignoredups" - ]; + historyControl = [ "erasedups" "ignorespace" "ignoredups" ]; shellAliases = { cp = "cp -i"; mv = "mv -i"; @@ -63,9 +51,7 @@ templates = "${config.xdg.dataHome}/Templates"; videos = "${config.home.homeDirectory}/Videos"; }; - configFile = { - "wgetrc".source = ../dotfiles/wget/wgetrc; - }; + configFile = { "wgetrc".source = ../dotfiles/wget/wgetrc; }; }; programs = { helix.enable = true; diff --git a/hosts/workstation/configuration.nix b/hosts/workstation/configuration.nix index 09231de..5792f4e 100644 --- a/hosts/workstation/configuration.nix +++ b/hosts/workstation/configuration.nix @@ -1,10 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { imports = [ # ./hardware-configuration.nix @@ -55,46 +49,40 @@ networking = { hostName = "workstation"; - firewall = - let - openPorts = [ - 6674 # ns-usbloader - ]; - openPortRanges = [ - { - from = 1714; # kdeconnect - to = 1764; # kdeconnect - } - ]; - in - { - allowedTCPPorts = openPorts; - allowedUDPPorts = openPorts; - allowedTCPPortRanges = openPortRanges; - allowedUDPPortRanges = openPortRanges; - }; + firewall = let + openPorts = [ + 6674 # ns-usbloader + ]; + openPortRanges = [{ + from = 1714; # kdeconnect + to = 1764; # kdeconnect + }]; + in { + allowedTCPPorts = openPorts; + allowedUDPPorts = openPorts; + allowedTCPPortRanges = openPortRanges; + allowedUDPPortRanges = openPortRanges; + }; }; - nix = - let - featuresList = [ - "nixos-test" - "benchmark" - "big-parallel" - "kvm" - "gccarch-znver3" - "gccarch-skylake" - "gccarch-alderlake" - ]; - in - { - distributedBuilds = true; - settings = { - cores = 16; - trusted-users = [ "nixremote" ]; - system-features = featuresList; - }; + nix = let + featuresList = [ + "nixos-test" + "benchmark" + "big-parallel" + "kvm" + "gccarch-znver3" + "gccarch-skylake" + "gccarch-alderlake" + ]; + in { + distributedBuilds = true; + settings = { + cores = 16; + trusted-users = [ "nixremote" ]; + system-features = featuresList; }; + }; nixpkgs.config = { allowUnfree = true; @@ -104,14 +92,11 @@ users = { groups.nixremote.gid = 555; users = { - jawz.packages = ( - with pkgs; - [ - gocryptfs # encrypted filesystem! shhh!!! - torrenttools # create torrent files from the terminal! - vcsi # video thumbnails for torrents, can I replace it with ^? - ] - ); + jawz.packages = (with pkgs; [ + gocryptfs # encrypted filesystem! shhh!!! + torrenttools # create torrent files from the terminal! + vcsi # video thumbnails for torrents, can I replace it with ^? + ]); nixremote = { isNormalUser = true; createHome = true; diff --git a/hosts/workstation/hardware-configuration.nix b/hosts/workstation/hardware-configuration.nix index efaa554..f5dff7b 100644 --- a/hosts/workstation/hardware-configuration.nix +++ b/hosts/workstation/hardware-configuration.nix @@ -1,15 +1,9 @@ -{ - config, - pkgs, - modulesPath, - lib, - ... -}: -{ +{ config, pkgs, modulesPath, lib, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; nixpkgs.hostPlatform = "x86_64-linux"; hardware = { - cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + cpu.amd.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; bluetooth = { enable = true; settings.General = { @@ -55,73 +49,57 @@ preLVM = true; }; initrd = { - availableKernelModules = [ - "xhci_pci" - "ahci" - "usbhid" - "nvme" - "usb_storage" - "sd_mod" - ]; + availableKernelModules = + [ "xhci_pci" "ahci" "usbhid" "nvme" "usb_storage" "sd_mod" ]; kernelModules = [ ]; }; }; - fileSystems = - let - nfsMount = ( - server: nfsDisk: { - device = "${server}:/${nfsDisk}"; - fsType = "nfs"; - options = [ - "x-systemd.automount" - "noauto" - "x-systemd.idle-timeout=600" - ]; - } - ); - btrfsMount = subvol: { - device = "/dev/mapper/nvme"; - fsType = "btrfs"; - options = [ - "subvol=${subvol}" - "ssd" - "compress=lzo" - "x-systemd.device-timeout=0" - "space_cache=v2" - "commit=120" - "datacow" - ] ++ (if subvol == "nixos" then [ "noatime" ] else [ ]); - }; - in - { - "/" = btrfsMount "nixos" // { }; - "/home" = btrfsMount "home" // { }; - "/mnt/games" = btrfsMount "games" // { }; - "/mnt/miniserver/pool" = nfsMount "miniserver" "pool" // { }; - "/mnt/miniserver/jawz" = nfsMount "miniserver" "jawz" // { }; - #"/mnt/server/pool" = nfsMount "server" "pool" // { }; - #"/mnt/server/jawz" = nfsMount "server" "jawz" // { }; - # "/mnt/miniserver/btrfs" = nfsMount "btrfs" // { }; - "/boot" = { - device = "/dev/disk/by-uuid/ac6d349a-96b9-499e-9009-229efd7743a5"; - fsType = "ext4"; - }; - "/boot/efi" = { - device = "/dev/disk/by-uuid/B05D-B5FB"; - fsType = "vfat"; - }; - + fileSystems = let + nfsMount = (server: nfsDisk: { + device = "${server}:/${nfsDisk}"; + fsType = "nfs"; + options = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=600" ]; + }); + btrfsMount = subvol: { + device = "/dev/mapper/nvme"; + fsType = "btrfs"; + options = [ + "subvol=${subvol}" + "ssd" + "compress=lzo" + "x-systemd.device-timeout=0" + "space_cache=v2" + "commit=120" + "datacow" + ] ++ (if subvol == "nixos" then [ "noatime" ] else [ ]); }; - swapDevices = [ - { - device = "/dev/disk/by-partuuid/c1bd22d7-e62c-440a-88d1-6464be1aa1b0"; - randomEncryption = { - enable = true; - cipher = "aes-xts-plain64"; - keySize = 512; - sectorSize = 4096; - }; - } - ]; + in { + "/" = btrfsMount "nixos" // { }; + "/home" = btrfsMount "home" // { }; + "/mnt/games" = btrfsMount "games" // { }; + "/mnt/miniserver/pool" = nfsMount "miniserver" "pool" // { }; + "/mnt/miniserver/jawz" = nfsMount "miniserver" "jawz" // { }; + #"/mnt/server/pool" = nfsMount "server" "pool" // { }; + #"/mnt/server/jawz" = nfsMount "server" "jawz" // { }; + # "/mnt/miniserver/btrfs" = nfsMount "btrfs" // { }; + "/boot" = { + device = "/dev/disk/by-uuid/ac6d349a-96b9-499e-9009-229efd7743a5"; + fsType = "ext4"; + }; + "/boot/efi" = { + device = "/dev/disk/by-uuid/B05D-B5FB"; + fsType = "vfat"; + }; + + }; + swapDevices = [{ + device = "/dev/disk/by-partuuid/c1bd22d7-e62c-440a-88d1-6464be1aa1b0"; + randomEncryption = { + enable = true; + cipher = "aes-xts-plain64"; + keySize = 512; + sectorSize = 4096; + }; + }]; } diff --git a/modules/apps/office.nix b/modules/apps/office.nix index c9f9b48..3e00708 100644 --- a/modules/apps/office.nix +++ b/modules/apps/office.nix @@ -1,10 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { options.my.apps.office.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.apps.office.enable { users.users.jawz.packages = with pkgs; [ @@ -17,8 +11,6 @@ # wike # gtk wikipedia wow! # denaro # manage your finances ]; - environment.variables = { - CALIBRE_USE_SYSTEM_THEME = "1"; - }; + environment.variables = { CALIBRE_USE_SYSTEM_THEME = "1"; }; }; } diff --git a/modules/dev/docker.nix b/modules/dev/docker.nix index be1e868..4af2480 100644 --- a/modules/dev/docker.nix +++ b/modules/dev/docker.nix @@ -1,16 +1,8 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { options.my.dev.docker.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.dev.docker.enable { - users.users.jawz.packages = - (with pkgs; [ dockfmt ]) ++ (with pkgs.nodePackages; [ dockerfile-language-server-nodejs ]); - }; - environment.variables = { - DOCKER_CONFIG = "${XDG_CONFIG_HOME}/docker"; + users.users.jawz.packages = (with pkgs; [ dockfmt ]) + ++ (with pkgs.nodePackages; [ dockerfile-language-server-nodejs ]); + environment.variables.DOCKER_CONFIG = "\${XDG_CONFIG_HOME}/docker"; }; } diff --git a/modules/dev/haskell.nix b/modules/dev/haskell.nix index 11694c8..dee66cb 100644 --- a/modules/dev/haskell.nix +++ b/modules/dev/haskell.nix @@ -1,10 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { options.my.dev.haskell.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.dev.haskell.enable { users.users.jawz.packages = with pkgs; ([ @@ -12,9 +6,8 @@ haskell-language-server # lsp ]); environment.variables = { - CABAL_DIR = "${XDG_CACHE_HOME}/cabal"; - CARGO_HOME = "${XDG_DATA_HOME}/cargo"; - STACK_ROOT = "${XDG_DATA_HOME}/stack"; + CABAL_DIR = "\${XDG_CACHE_HOME}/cabal"; + STACK_ROOT = "\${XDG_DATA_HOME}/stack"; GHCUP_USE_XDG_DIRS = "true"; }; }; diff --git a/modules/dev/javascript.nix b/modules/dev/javascript.nix index 416dea1..6a54c2d 100644 --- a/modules/dev/javascript.nix +++ b/modules/dev/javascript.nix @@ -1,28 +1,17 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { options.my.dev.javascript.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.dev.javascript.enable { home-manager.users.jawz.programs.xdg.configFile = { "npm/npmrc".source = ../dotfiles/npm/npmrc; - "configstore/update-notifier-npm-check.json".source = ../dotfiles/npm/update-notifier-npm-check.json; + "configstore/update-notifier-npm-check.json".source = + ../dotfiles/npm/update-notifier-npm-check.json; }; - users.users.jawz.packages = (with pkgs; [ nodejs ]) ++ (with pkgs.nodePackages; [ pnpm ]); + users.users.jawz.packages = (with pkgs; [ nodejs ]) + ++ (with pkgs.nodePackages; [ pnpm ]); environment.variables = { - NPM_CONFIG_USERCONFIG = "${XDG_CONFIG_HOME}/npm/npmrc"; - PNPM_HOME = "${XDG_DATA_HOME}/pnpm"; - PATH = [ - "${XDG_DATA_HOME}/npm/bin" - "${XDG_DATA_HOME}/pnpm" - ]; - }; - environment.variables = { - VISUAL = "emacsclient -ca emacs"; - PATH = [ "${XDG_CONFIG_HOME}/emacs/bin" ]; + NPM_CONFIG_USERCONFIG = "\${XDG_CONFIG_HOME}/npm/npmrc"; + PNPM_HOME = "\${XDG_DATA_HOME}/pnpm"; + PATH = [ "\${XDG_DATA_HOME}/npm/bin" "\${XDG_DATA_HOME}/pnpm" ]; }; }; } diff --git a/modules/dev/nix.nix b/modules/dev/nix.nix index 3d297bb..b54ef3f 100644 --- a/modules/dev/nix.nix +++ b/modules/dev/nix.nix @@ -1,10 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { options.my.dev.nix.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.dev.nix.enable { users.users.jawz.packages = with pkgs; ([ diff --git a/modules/dev/python.nix b/modules/dev/python.nix index a1a5b75..b9cf175 100644 --- a/modules/dev/python.nix +++ b/modules/dev/python.nix @@ -1,38 +1,28 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { options.my.dev.python.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.dev.python.enable { home-manager.users.jawz.programs.xdg.configFile = { "python/pythonrc".source = ../dotfiles/pythonrc; }; - users.users.jawz.packages = - (with pkgs; ([ - pipenv # python development workflow for humans - (python3.withPackages ( - ps: with ps; [ - black # Python code formatter - editorconfig # follow rules of contributin - flake8 # wraper for pyflakes, pycodestyle and mccabe - isort # sort Python imports - pyflakes # checks source code for errors - pylint # bug and style checker for python - speedtest-cli # check internet speed from the comand line - # nose # testing and running python scripts - # poetry # dependency management made easy - # pytest # framework for writing tests - ] - )) - ])) - ++ (with pkgs.nodePackages; [ + users.users.jawz.packages = (with pkgs; ([ + pipenv # python development workflow for humans + (python3.withPackages (ps: + with ps; [ + black # Python code formatter + editorconfig # follow rules of contributin + flake8 # wraper for pyflakes, pycodestyle and mccabe + isort # sort Python imports + pyflakes # checks source code for errors + pylint # bug and style checker for python + speedtest-cli # check internet speed from the comand line + # nose # testing and running python scripts + # poetry # dependency management made easy + # pytest # framework for writing tests + ])) + ])) ++ (with pkgs.nodePackages; + [ pyright # LSP ]); - environment.variables = { - PYTHONSTARTUP = "${XDG_CONFIG_HOME}/python/pythonrc"; - }; + environment.variables.PYTHONSTARTUP = "\${XDG_CONFIG_HOME}/python/pythonrc"; }; } diff --git a/modules/dev/sh.nix b/modules/dev/sh.nix index 4329ca1..ea9398b 100644 --- a/modules/dev/sh.nix +++ b/modules/dev/sh.nix @@ -1,18 +1,10 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { options.my.dev.sh.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.dev.sh.enable { - users.users.jawz.packages = - (with pkgs; [ - bashdb # autocomplete - shellcheck # linting - shfmt # a shell parser and formatter - ]) - ++ (with pkgs.nodePackages; [ bash-language-server ]); + users.users.jawz.packages = (with pkgs; [ + bashdb # autocomplete + shellcheck # linting + shfmt # a shell parser and formatter + ]) ++ (with pkgs.nodePackages; [ bash-language-server ]); }; } diff --git a/modules/emacs.nix b/modules/emacs.nix index c539cbc..d5ffecf 100644 --- a/modules/emacs.nix +++ b/modules/emacs.nix @@ -1,10 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { options.my.emacs.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.emacs.enable { home-manager.users.jawz = { @@ -14,35 +8,33 @@ }; services.lorri.enable = true; }; - users.users.jawz.packages = - (with pkgs; ([ - fd # modern find, faster searches - fzf # fuzzy finder! super cool and useful - ripgrep # modern grep - tree-sitter # code parsing based on symbols and shit, I do not get it - graphviz # graphs - tetex # export pdf - languagetool # proofreader for English + users.users.jawz.packages = (with pkgs; ([ + fd # modern find, faster searches + fzf # fuzzy finder! super cool and useful + ripgrep # modern grep + tree-sitter # code parsing based on symbols and shit, I do not get it + graphviz # graphs + tetex # export pdf + languagetool # proofreader for English - # doom everywhere - xorg.xwininfo - xdotool - xclip + # doom everywhere + xorg.xwininfo + xdotool + xclip - # lsps - yaml-language-server - markdownlint-cli - ])) - ++ (with pkgs.nodePackages; [ - vscode-json-languageserver - # linters - prettier - ]); + # lsps + yaml-language-server + markdownlint-cli + ])) ++ (with pkgs.nodePackages; [ + vscode-json-languageserver + # linters + prettier + ]); services.emacs = { enable = true; - package = - with pkgs; - ((emacsPackagesFor emacs-gtk).emacsWithPackages (epkgs: with epkgs; ([ vterm ]))); + package = with pkgs; + ((emacsPackagesFor emacs-gtk).emacsWithPackages + (epkgs: with epkgs; ([ vterm ]))); defaultEditor = true; }; home-manager.users.jawz.programs.bash.initExtra = '' diff --git a/modules/scripts/download.nix b/modules/scripts/download.nix index fd0b589..7e307c7 100644 --- a/modules/scripts/download.nix +++ b/modules/scripts/download.nix @@ -1,10 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { imports = [ ./base.nix ]; config = { home-manager.users.jawz = { @@ -14,8 +8,10 @@ }; bash = { shellAliases = { - comic = ''download -u jawz -i "$(cat $LC | fzf --multi --exact -i)"''; - gallery = ''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"''; + comic = + ''download -u jawz -i "$(cat $LC | fzf --multi --exact -i)"''; + gallery = + ''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"''; dl = "download -u jawz -i"; }; initExtra = '' @@ -34,19 +30,14 @@ install = true; service = false; name = "download"; - package = - with pkgs.python3Packages; + package = with pkgs.python3Packages; (buildPythonApplication rec { pname = "download"; version = "2.5"; src = ../../scripts/download/.; doCheck = false; buildInputs = [ setuptools ]; - propagatedBuildInputs = [ - pyyaml - types-pyyaml - yt-dlp - ]; + propagatedBuildInputs = [ pyyaml types-pyyaml yt-dlp ]; }); }; }; diff --git a/modules/scripts/find-dup-episode.nix b/modules/scripts/find-dup-episode.nix index e5b2b05..f983d10 100644 --- a/modules/scripts/find-dup-episode.nix +++ b/modules/scripts/find-dup-episode.nix @@ -1,18 +1,11 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { imports = [ ./base.nix ]; config.my.scripts.find-dup-episodes = { enable = true; install = true; service = false; name = "find-dup-episodes"; - package = pkgs.writeScriptBin "find-dup-episodes" ( - builtins.readFile ../../scripts/find-dup-episodes.sh - ); + package = pkgs.writeScriptBin "find-dup-episodes" + (builtins.readFile ../../scripts/find-dup-episodes.sh); }; } diff --git a/modules/scripts/manage-library.nix b/modules/scripts/manage-library.nix index 34e4c5a..d070215 100644 --- a/modules/scripts/manage-library.nix +++ b/modules/scripts/manage-library.nix @@ -1,10 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { imports = [ ./base.nix ]; config.my.scripts.manage-library = { enable = true; @@ -13,6 +7,7 @@ name = "manage-library"; timer = "00:30"; description = "scans the library directory and sorts files"; - package = pkgs.writeScriptBin "manage-library" (builtins.readFile ../../scripts/manage-library.sh); + package = pkgs.writeScriptBin "manage-library" + (builtins.readFile ../../scripts/manage-library.sh); }; } diff --git a/modules/scripts/nextcloud-cronjob.nix b/modules/scripts/nextcloud-cronjob.nix index 2950d58..7b1cebd 100644 --- a/modules/scripts/nextcloud-cronjob.nix +++ b/modules/scripts/nextcloud-cronjob.nix @@ -1,10 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { imports = [ ./base.nix ]; config.my.scripts.nextcloud-cronjob = { enable = true; @@ -13,8 +7,7 @@ timer = "*:0/10"; name = "nextcloud-cronjob"; description = "runs tasks for nextcloud"; - package = pkgs.writeScriptBin "nextcloud-cronjob" ( - builtins.readFile ../../scripts/nextcloud-cronjob.sh - ); + package = pkgs.writeScriptBin "nextcloud-cronjob" + (builtins.readFile ../../scripts/nextcloud-cronjob.sh); }; } diff --git a/modules/scripts/run.nix b/modules/scripts/run.nix index f862b4e..6c716ff 100644 --- a/modules/scripts/run.nix +++ b/modules/scripts/run.nix @@ -1,16 +1,11 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { imports = [ ./base.nix ]; config.my.scripts.run = { enable = true; install = true; service = false; name = "run"; - package = pkgs.writeScriptBin "run" (builtins.readFile ../../scripts/run.sh); + package = + pkgs.writeScriptBin "run" (builtins.readFile ../../scripts/run.sh); }; } diff --git a/modules/scripts/sub-sync.nix b/modules/scripts/sub-sync.nix index 51194a0..421629e 100644 --- a/modules/scripts/sub-sync.nix +++ b/modules/scripts/sub-sync.nix @@ -1,10 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { imports = [ ./base.nix ]; config.my.scripts.sub-sync = { enable = true; @@ -13,6 +7,7 @@ name = "sub-sync"; timer = "22:00"; description = "Syncronixes subtitles downloaded and modified the last day"; - package = pkgs.writeScriptBin "sub-sync" (builtins.readFile ../../scripts/sub-sync.sh); + package = pkgs.writeScriptBin "sub-sync" + (builtins.readFile ../../scripts/sub-sync.sh); }; } diff --git a/modules/scripts/update-dns.nix b/modules/scripts/update-dns.nix index f7c34d0..e139c5c 100644 --- a/modules/scripts/update-dns.nix +++ b/modules/scripts/update-dns.nix @@ -1,10 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { imports = [ ./base.nix ]; config.my.scripts.update-dns = { enable = true; @@ -13,6 +7,7 @@ name = "update-dns"; timer = "*:0/30"; description = "Updates the IP of all my domains"; - package = pkgs.writeScriptBin "update-dns" (builtins.readFile ../../scripts/update-dns.sh); + package = pkgs.writeScriptBin "update-dns" + (builtins.readFile ../../scripts/update-dns.sh); }; } diff --git a/modules/shell/tools.nix b/modules/shell/tools.nix index a3d2790..2d5c399 100644 --- a/modules/shell/tools.nix +++ b/modules/shell/tools.nix @@ -1,10 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: -{ +{ config, lib, pkgs, ... }: { options.my.shell.tools.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.shell.tools.enable { home-manager.users.jawz.programs = { @@ -28,9 +22,7 @@ uniq --count | sort -rn''; }; }; - xdg.configFile = { - "htop/htoprc".source = ../dotfiles/htop/htoprc; - }; + xdg.configFile = { "htop/htoprc".source = ../dotfiles/htop/htoprc; }; hstr.enable = true; htop = { enable = true; @@ -77,10 +69,10 @@ trash-cli # oop! did not meant to delete that jq # linting ]; - }; - environment.variables = { - HISTFILE = "${XDG_STATE_HOME}/bash/history"; - LESSHISTFILE = "-"; - RIPGREP_CONFIG_PATH = "${XDG_CONFIG_HOME}/ripgrep/ripgreprc"; + environment.variables = { + HISTFILE = "\${XDG_STATE_HOME}/bash/history"; + LESSHISTFILE = "-"; + RIPGREP_CONFIG_PATH = "\${XDG_CONFIG_HOME}/ripgrep/ripgreprc"; + }; }; } diff --git a/pkgs/obs-studio.nix b/pkgs/obs-studio.nix index ee11fdc..3b36ab3 100644 --- a/pkgs/obs-studio.nix +++ b/pkgs/obs-studio.nix @@ -1,16 +1,9 @@ -{ - pkgs, - lib, - config, - ... -}: +{ pkgs, lib, config, ... }: with lib; -let - cfg = config.programs.obs-studio; -in -{ +let cfg = config.programs.obs-studio; +in { options.programs.obs-studio = { enable = mkEnableOption "OBS Studio program";