From c3a0a0847fec2b91cb51c0eafaec7262b9a5f343 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Fri, 13 Dec 2024 11:50:29 -0600 Subject: [PATCH] task | reformatted with nixfmt --- flake.nix | 260 +++++++++------------ home/common/bash.nix | 11 +- home/common/bash_complition.nix | 108 ++++----- home/common/btop.nix | 10 +- home/common/bufferline.nix | 186 ++++++++------- home/common/catppuccin.nix | 6 +- home/common/default.nix | 13 +- home/common/git.nix | 39 +--- home/common/gnupg.nix | 2 +- home/common/khal.nix | 4 +- home/common/khard.nix | 30 +-- home/common/lf.nix | 8 +- home/common/liquidprompt.nix | 4 +- home/common/listadmin.nix | 8 +- home/common/mail.nix | 30 +-- home/common/mopidy.nix | 16 +- home/common/neovim.nix | 10 +- home/common/newsboat.nix | 6 +- home/common/taskwarrior.nix | 63 +++-- home/common/tmux.nix | 2 +- home/common/topgrade.nix | 6 +- home/common/vifm.nix | 2 +- home/default.nix | 27 +-- home/gui/alacritty.nix | 2 +- home/gui/autostart.nix | 2 +- home/gui/boxes.nix | 8 +- home/gui/default.nix | 85 ++++--- home/gui/fuzzel.nix | 12 +- home/gui/kde.nix | 4 +- home/gui/mpv.nix | 5 +- home/gui/qutebrowser.nix | 126 ++++------ home/gui/redshift.nix | 6 +- home/gui/services.nix | 10 +- home/gui/sway.nix | 42 ++-- home/gui/terminals.nix | 22 +- home/work/citrix.nix | 31 +-- home/work/default.nix | 13 +- home/work/zoom.nix | 8 +- hosts/ace/colmena.nix | 17 +- hosts/ace/default.nix | 9 +- hosts/ace/hardware-configuration.nix | 32 +-- hosts/disko/nvme.nix | 9 +- hosts/display/default.nix | 9 +- hosts/dragon/default.nix | 7 +- hosts/dragon/hardware-configuration.nix | 35 +-- hosts/eve/colmena.nix | 17 +- hosts/eve/default.nix | 9 +- hosts/eve/hardware-configuration.nix | 30 +-- hosts/eve/kernel.nix | 7 +- hosts/fred/colmena.nix | 17 +- hosts/fred/default.nix | 15 +- hosts/fred/docker.nix | 6 +- hosts/fred/hardware-configuration.nix | 34 +-- hosts/fred/podman.nix | 95 +++----- hosts/harper/default.nix | 14 +- hosts/harper2/default.nix | 14 +- hosts/loki/colmena.nix | 17 +- hosts/loki/default.nix | 9 +- hosts/loki/hardware-configuration.nix | 31 +-- hosts/loki/kernel.nix | 11 +- hosts/nuwww/default.nix | 14 +- hosts/pi1/colmena.nix | 15 +- hosts/pi1/default.nix | 14 +- hosts/pi1/hardware-configuration.nix | 22 +- hosts/pihole/default.nix | 14 +- hosts/pocket2/colmena.nix | 17 +- hosts/pocket2/default.nix | 7 +- hosts/pocket2/hardware-configuration.nix | 30 +-- hosts/server/default.nix | 144 ++++-------- hosts/server/searxng.nix | 10 +- hosts/server/systemd.nix | 13 +- hosts/server/tailscale.nix | Bin 1155 -> 1103 bytes hosts/server/unifi.nix | 10 +- hosts/server/upgrade-diff.nix | 2 +- hosts/smaug/colmena.nix | 15 +- hosts/smaug/default.nix | 9 +- hosts/smaug/hardware-configuration.nix | 28 +-- hosts/smaug/podman.nix | 82 ++----- hosts/t2/colmena.nix | 17 +- hosts/t2/default.nix | 15 +- hosts/t2/hardware-configuration.nix | 22 +- hosts/themes.nix | 9 +- hosts/vm/default.nix | 14 +- hosts/vm/hardware-configuration.nix | 34 +-- hosts/vm1/default.nix | 13 +- hosts/vm1/hardware-configuration.nix | 34 +-- hosts/w1/colmena.nix | 17 +- hosts/w1/default.nix | 14 +- hosts/w1/hardware-configuration.nix | 25 +- hosts/w1/network.nix | 36 ++- hosts/w1/podman.nix | 98 +++----- hosts/w2/colmena.nix | 15 +- hosts/w2/default.nix | 14 +- hosts/w2/hardware-configuration.nix | 25 +- hosts/w2/network.nix | 36 ++- hosts/w2/podman.nix | 98 +++----- hosts/wm/cosmic/default.nix | 7 +- hosts/wm/default.nix | 4 +- hosts/wm/greetd/default.nix | 5 +- hosts/wm/kde/default.nix | 7 +- hosts/wm/sddm/default.nix | 4 +- hosts/wm/sway/default.nix | 3 +- hosts/workstation/default.nix | 214 ++++++----------- hosts/workstation/detect-reboot-needed.nix | 11 +- hosts/workstation/games/default.nix | 13 +- hosts/workstation/kvm.nix | 8 +- hosts/workstation/systemd.nix | 17 +- hosts/workstation/tailscale.nix | Bin 1155 -> 1103 bytes hosts/workstation/upgrade-diff.nix | 2 +- hosts/www2/default.nix | 14 +- hosts/www2/hardware-configuration.nix | 34 +-- iso.nix | 6 +- nixos-anywhere/configuration-vm.nix | 28 +-- nixos-anywhere/configuration-vps.nix | 28 +-- nixos-anywhere/configuration.nix | 48 ++-- nixos-anywhere/disk-config-vm.nix | 6 +- nixos-anywhere/disk-config-vps.nix | 6 +- nixos-anywhere/disk-config.nix | 6 +- nixos-anywhere/flake.nix | 21 +- 119 files changed, 1010 insertions(+), 2135 deletions(-) diff --git a/flake.nix b/flake.nix index 9584791..ae45002 100644 --- a/flake.nix +++ b/flake.nix @@ -14,165 +14,117 @@ nixos-hardware.url = "github:NixOS/nixos-hardware/master"; }; - outputs = inputs @ { - self, - nixpkgs, - nix, + outputs = inputs@{ self, nixpkgs, nix, # nixos-cosmic, - nixos-hardware, - home-manager, - catppuccin, - colmena, - ... - }: let - inherit (self) outputs; - lib = nixpkgs.lib // home-manager.lib; - systems = [ - "x86_64-linux" - "aarch64-linux" - ]; - forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system}); - pkgsFor = lib.genAttrs systems ( - system: + nixos-hardware, home-manager, catppuccin, colmena, ... }: + let + inherit (self) outputs; + lib = nixpkgs.lib // home-manager.lib; + systems = [ "x86_64-linux" "aarch64-linux" ]; + forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system}); + pkgsFor = lib.genAttrs systems (system: import nixpkgs { inherit system; config.allowUnfree = true; - } - ); - in { - inherit lib; - colmena = { - meta = { - nixpkgs = import nixpkgs { - system = "x86_64-linux"; - }; - specialArgs = { - inherit inputs outputs; + }); + in { + inherit lib; + colmena = { + meta = { + nixpkgs = import nixpkgs { system = "x86_64-linux"; }; + specialArgs = { inherit inputs outputs; }; }; + # ace = import ./hosts/ace/colmena.nix; + # eve = import ./hosts/eve/colmena.nix; + fred = import ./hosts/fred/colmena.nix; + loki = import ./hosts/loki/colmena.nix; + # pocket2 = import ./hosts/pocket2/colmena.nix; + smaug = import ./hosts/smaug/colmena.nix; + w1 = import ./hosts/w1/colmena.nix; + # w2 = import ./hosts/w2/colmena.nix; + # t2 = import ./hosts/t2/colmena.nix; + # pi1 = import ./hosts/pi1/colmena.nix; + }; + + nixosConfigurations = { + # clients + ace = lib.nixosSystem { + modules = [ ./hosts/ace ]; + specialArgs = { inherit inputs outputs; }; + }; + dragon = lib.nixosSystem { + modules = [ ./hosts/dragon ]; + specialArgs = { inherit inputs outputs; }; + }; + eve = lib.nixosSystem { + modules = [ ./hosts/eve ]; + specialArgs = { inherit inputs outputs; }; + }; + loki = lib.nixosSystem { + modules = [ ./hosts/loki ]; + specialArgs = { inherit inputs outputs; }; + }; + + pocket2 = lib.nixosSystem { + modules = [ ./hosts/pocket2 ]; + specialArgs = { inherit inputs outputs; }; + }; + smaug = lib.nixosSystem { + modules = [ ./hosts/smaug ]; + specialArgs = { inherit inputs outputs; }; + }; + t2 = lib.nixosSystem { + modules = [ ./hosts/t2 ]; + specialArgs = { inherit inputs outputs; }; + }; + + # servers + display = lib.nixosSystem { + modules = [ ./hosts/display ]; + specialArgs = { inherit inputs outputs; }; + }; + fred = lib.nixosSystem { + modules = [ ./hosts/fred ]; + specialArgs = { inherit inputs outputs; }; + }; + vm = lib.nixosSystem { + modules = [ + "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix" + "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" + ./hosts/vm + ]; + specialArgs = { inherit inputs outputs; }; + }; + harper2 = lib.nixosSystem { + modules = [ ./hosts/harper2 ]; + specialArgs = { inherit inputs outputs; }; + }; + harper = lib.nixosSystem { + modules = [ ./hosts/harper ]; + specialArgs = { inherit inputs outputs; }; + }; + nuwww = lib.nixosSystem { + modules = [ ./hosts/nuwww ]; + specialArgs = { inherit inputs outputs; }; + }; + pihole = lib.nixosSystem { + modules = [ ./hosts/pihole ]; + specialArgs = { inherit inputs outputs; }; + }; + www2 = lib.nixosSystem { + modules = [ ./hosts/www2 ]; + specialArgs = { inherit inputs outputs; }; + }; + w1 = lib.nixosSystem { + modules = [ ./hosts/w1 ]; + specialArgs = { inherit inputs outputs; }; + }; + # w2 = lib.nixosSystem { + # modules = [./hosts/w2]; + # specialArgs = { + # inherit inputs outputs; + # }; + # }; }; - # ace = import ./hosts/ace/colmena.nix; - # eve = import ./hosts/eve/colmena.nix; - fred = import ./hosts/fred/colmena.nix; - loki = import ./hosts/loki/colmena.nix; - # pocket2 = import ./hosts/pocket2/colmena.nix; - smaug = import ./hosts/smaug/colmena.nix; - w1 = import ./hosts/w1/colmena.nix; - # w2 = import ./hosts/w2/colmena.nix; - # t2 = import ./hosts/t2/colmena.nix; - # pi1 = import ./hosts/pi1/colmena.nix; }; - - nixosConfigurations = { - # clients - ace = lib.nixosSystem { - modules = [./hosts/ace]; - specialArgs = { - inherit inputs outputs; - }; - }; - dragon = lib.nixosSystem { - modules = [./hosts/dragon]; - specialArgs = { - inherit inputs outputs; - }; - }; - eve = lib.nixosSystem { - modules = [./hosts/eve]; - specialArgs = { - inherit inputs outputs; - }; - }; - loki = lib.nixosSystem { - modules = [./hosts/loki]; - specialArgs = { - inherit inputs outputs; - }; - }; - - pocket2 = lib.nixosSystem { - modules = [./hosts/pocket2]; - specialArgs = { - inherit inputs outputs; - }; - }; - smaug = lib.nixosSystem { - modules = [./hosts/smaug]; - specialArgs = { - inherit inputs outputs; - }; - }; - t2 = lib.nixosSystem { - modules = [./hosts/t2]; - specialArgs = { - inherit inputs outputs; - }; - }; - - # servers - display = lib.nixosSystem { - modules = [./hosts/display]; - specialArgs = { - inherit inputs outputs; - }; - }; - fred = lib.nixosSystem { - modules = [./hosts/fred]; - specialArgs = { - inherit inputs outputs; - }; - }; - vm = lib.nixosSystem { - modules = [ - "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix" - "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" - ./hosts/vm - ]; - specialArgs = { - inherit inputs outputs; - }; - }; - harper2 = lib.nixosSystem { - modules = [./hosts/harper2]; - specialArgs = { - inherit inputs outputs; - }; - }; - harper = lib.nixosSystem { - modules = [./hosts/harper]; - specialArgs = { - inherit inputs outputs; - }; - }; - nuwww = lib.nixosSystem { - modules = [./hosts/nuwww]; - specialArgs = { - inherit inputs outputs; - }; - }; - pihole = lib.nixosSystem { - modules = [./hosts/pihole]; - specialArgs = { - inherit inputs outputs; - }; - }; - www2 = lib.nixosSystem { - modules = [./hosts/www2]; - specialArgs = { - inherit inputs outputs; - }; - }; - w1 = lib.nixosSystem { - modules = [./hosts/w1]; - specialArgs = { - inherit inputs outputs; - }; - }; - # w2 = lib.nixosSystem { - # modules = [./hosts/w2]; - # specialArgs = { - # inherit inputs outputs; - # }; - # }; - }; - }; } diff --git a/home/common/bash.nix b/home/common/bash.nix index 430d05f..ad64b42 100644 --- a/home/common/bash.nix +++ b/home/common/bash.nix @@ -1,9 +1,5 @@ -{ - config, - pkgs, - ... -}: { - imports = [./bash_complition.nix]; +{ config, pkgs, ... }: { + imports = [ ./bash_complition.nix ]; home.file.".bash_local".source = files/bash/bash_local; home.file.".bash_aliases".source = files/bash/bash_aliases; home.file.".bash_functions".source = files/bash/bash_functions; @@ -11,7 +7,8 @@ home.file.".bash_keychain".source = files/bash/bash_keychain; home.file.".bash_logout".source = files/bash/bash_logout; home.file.".bash_motd".source = files/bash/bash_motd; - home.file.".bash_motd_ownscript.sh".source = files/bash/bash_motd_ownscript.sh; + home.file.".bash_motd_ownscript.sh".source = + files/bash/bash_motd_ownscript.sh; home.file.".bash_profile".source = files/bash/bash_profile; home.file.".bashrc".source = files/bash/bashrc; home.file.".bash_ssh".source = files/bash/bash_ssh; diff --git a/home/common/bash_complition.nix b/home/common/bash_complition.nix index 6eabf91..924e436 100644 --- a/home/common/bash_complition.nix +++ b/home/common/bash_complition.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { home.file = { doascomplete = { enable = true; @@ -10,36 +10,36 @@ _init_completion -s || return local i mode=normal - [[ ''$1 == *doasedit ]] && mode=edit + [[ $1 == *doasedit ]] && mode=edit - [[ ''$mode == normal ]] && + [[ $mode == normal ]] && for ((i = 1; i <= cword; i++)); do if [[ ''${words[i]} != -* ]]; then - local PATH=''$PATH:/sbin:/usr/sbin:/usr/local/sbin + local PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin local root_command=''${words[i]} - _command_offset ''$i + _command_offset $i return fi [[ ''${words[i]} == -@(!(-*)[uUgCp]) ]] && ((i++)) done - case "''$prev" in + case "$prev" in -u) - COMPREPLY=(''$(compgen -u -- "''$cur")) + COMPREPLY=($(compgen -u -- "$cur")) return ;; esac - ''$split && return + $split && return - if [[ ''$cur == -* ]]; then - local opts=''$(_parse_help "''$1") - COMPREPLY=(''$(compgen -W ' ''${opts:-''$(_parse_usage "''$1")}' -- "''$cur")) + if [[ $cur == -* ]]; then + local opts=$(_parse_help "$1") + COMPREPLY=($(compgen -W ' ''${opts:-$(_parse_usage "$1")}' -- "$cur")) [[ ''${COMPREPLY-} == *= ]] && compopt -o nospace return fi - if [[ ''$mode == edit ]]; then + if [[ $mode == edit ]]; then _filedir fi } && @@ -105,26 +105,26 @@ taskcommand='task rc.verbose:nothing rc.confirmation:no rc.hooks:off' _task_get_tags() { - ''$taskcommand _tags + $taskcommand _tags } _task_get_config() { - ''$taskcommand _config + $taskcommand _config } _task_offer_priorities() { - COMPREPLY=( ''$(compgen -W "L M H" -- ''${cur/*:/}) ) + COMPREPLY=( $(compgen -W "L M H" -- ''${cur/*:/}) ) } _task_offer_projects() { - COMPREPLY=( ''$(compgen -W "''$(''$taskcommand _projects)" -- ''${cur/*:/}) ) + COMPREPLY=( $(compgen -W "$($taskcommand _projects)" -- ''${cur/*:/}) ) } _task_offer_contexts() { - COMPREPLY=( ''$(compgen -W "''$(''$taskcommand _context) define delete list none show" -- ''$cur) ) + COMPREPLY=( $(compgen -W "$($taskcommand _context) define delete list none show" -- $cur) ) } - _task_context_alias=''$(''$taskcommand show | grep alias.*context | cut -d' ' -f1 | cut -d. -f2) + _task_context_alias=$($taskcommand show | grep alias.*context | cut -d' ' -f1 | cut -d. -f2) _task() { @@ -144,25 +144,25 @@ # echo "prev='''$prev'" # echo "prev2='''$prev2'" - abbrev_min=''$(''$taskcommand show | grep "abbreviation.minimum" | awk {'print ''$2'}) - commands_aliases=''$(echo ''$(''$taskcommand _commands; ''$taskcommand _aliases) | tr " " "\n"|sort|tr "\n" " ") - opts="''$commands_aliases ''$(''$taskcommand _columns)" + abbrev_min=$($taskcommand show | grep "abbreviation.minimum" | awk {'print $2'}) + commands_aliases=$(echo $($taskcommand _commands; $taskcommand _aliases) | tr " " "\n"|sort|tr "\n" " ") + opts="$commands_aliases $($taskcommand _columns)" case "''${prev}" in - ''$_task_context_alias|cont|conte|contex|context) + $_task_context_alias|cont|conte|contex|context) _task_offer_contexts return 0 ;; :) case "''${prev2}" in pri|prior|priori|priorit|priority) - if [ ''${#prev2} -ge ''$abbrev_min ]; then + if [ ''${#prev2} -ge $abbrev_min ]; then _task_offer_priorities fi return 0 ;; pro|proj|proje|projec|project) - if [ ''${#prev2} -ge ''$abbrev_min ]; then + if [ ''${#prev2} -ge $abbrev_min ]; then _task_offer_projects fi return 0 @@ -187,13 +187,13 @@ :) case "''${prev}" in pri|prior|priori|priorit|priority) - if [ ''${#prev} -ge ''$abbrev_min ]; then + if [ ''${#prev} -ge $abbrev_min ]; then _task_offer_priorities fi return 0 ;; pro|proj|proje|projec|project) - if [ ''${#prev} -ge ''$abbrev_min ]; then + if [ ''${#prev} -ge $abbrev_min ]; then _task_offer_projects fi return 0 @@ -212,24 +212,24 @@ esac ;; +*) - local tags=''$(_task_get_tags | sed 's/^/+/') - COMPREPLY=( ''$(compgen -W "''${tags}" -- ''${cur}) ) + local tags=$(_task_get_tags | sed 's/^/+/') + COMPREPLY=( $(compgen -W "''${tags}" -- ''${cur}) ) return 0 ;; -*) - local tags=''$(_task_get_tags | sed 's/^/-/') - COMPREPLY=( ''$(compgen -W "''${tags}" -- ''${cur}) ) + local tags=$(_task_get_tags | sed 's/^/-/') + COMPREPLY=( $(compgen -W "''${tags}" -- ''${cur}) ) return 0 ;; rc.*) - local config=''$(_task_get_config | sed -e 's/^/rc\./' -e 's/''$/:/') - COMPREPLY=( ''$(compgen -W "''${config}" -- ''${cur}) ) + local config=$(_task_get_config | sed -e 's/^/rc\./' -e 's/$/:/') + COMPREPLY=( $(compgen -W "''${config}" -- ''${cur}) ) return 0 ;; *) case "''${prev}" in import) - COMPREPLY=( ''$(compgen -o "default" -- ''${cur}) ) + COMPREPLY=( $(compgen -o "default" -- ''${cur}) ) return 0 ;; esac @@ -238,7 +238,7 @@ ;; esac - COMPREPLY=( ''$(compgen -W "''${opts}" -- ''${cur}) ) + COMPREPLY=( $(compgen -W "''${opts}" -- ''${cur}) ) return 0 } complete -o nospace -F _task task @@ -272,7 +272,7 @@ function __get_help_items() { - echo -e "''$( __get_commands ) interval hints date duration dom" + echo -e "$( __get_commands ) interval hints date duration dom" } function __get_options() @@ -283,7 +283,7 @@ function __get_ids() { local count - count="''$( timew get dom.tracked.count )" + count="$( timew get dom.tracked.count )" if [[ "''${count}" -eq "0" ]] ; then echo "" else @@ -293,12 +293,12 @@ function __get_tags() { - timew tags | tail -n +4 -- | sed -e "s|[[:space:]]*-''$||" + timew tags | tail -n +4 -- | sed -e "s|[[:space:]]*-$||" } function __get_extensions() { - timew extensions | awk '{if(NR>6)print ''$1}' + timew extensions | awk '{if(NR>6)print $1}' } function __has_entered_id() @@ -314,7 +314,7 @@ function __has_entered_subcommand() { - local subcommands=''$( __get_subcommands "''${1}" ) + local subcommands=$( __get_subcommands "''${1}" ) for word in "''${COMP_WORDS[@]}" ; do for cmd in ''${subcommands} ; do @@ -329,7 +329,7 @@ function __has_entered_help_item() { - local items=''$( __get_help_items ) + local items=$( __get_help_items ) for word in "''${COMP_WORDS[@]:2}" ; do for item in ''${items} ; do @@ -358,17 +358,17 @@ local line wordlist declare -a wordlist - while IFS=''$'\n' read -r line ; do + while IFS=$'\n' read -r line ; do wordlist+=( "''${line}" ) - done <<< "''$( __get_tags )" + done <<< "$( __get_tags )" declare -a completions while read -r line ; do completions+=( "''${line}" ) - done < <( compgen -W "''$(printf '%q ' "''${wordlist[@]}")" -- "''${cur}" 2>/dev/null ) + done < <( compgen -W "$(printf '%q ' "''${wordlist[@]}")" -- "''${cur}" 2>/dev/null ) for completion in "''${completions[@]}" ; do - COMPREPLY+=( "''$(printf "%q" "''${completion}")" ) + COMPREPLY+=( "$(printf "%q" "''${completion}")" ) done } @@ -385,7 +385,7 @@ wordlist="" ;; annotate|continue|delete|join|lengthen|move|resize|shorten|split) - wordlist=''$( __get_ids ) + wordlist=$( __get_ids ) ;; export|gaps|start|stop|summary|tags|track) __complete_tag @@ -393,40 +393,40 @@ ;; modify) if __has_entered_subcommand "''${first}" ; then - wordlist=''$( __get_ids ) + wordlist=$( __get_ids ) else - wordlist=''$( __get_subcommands "''${first}" ) + wordlist=$( __get_subcommands "''${first}" ) fi ;; tag|untag) if __is_entering_id ; then - wordlist=''$( __get_ids ) + wordlist=$( __get_ids ) elif __has_entered_id ; then __complete_tag return else - wordlist=''$( __get_ids ) + wordlist=$( __get_ids ) fi ;; report) - wordlist=''$( __get_extensions ) + wordlist=$( __get_extensions ) ;; help) if __has_entered_help_item ; then wordlist="" else - wordlist=''$( __get_help_items ) + wordlist=$( __get_help_items ) fi ;; -*) - wordlist=''$( __get_options ) + wordlist=$( __get_options ) ;; *) - wordlist=''$( __get_commands ) + wordlist=$( __get_commands ) ;; esac - COMPREPLY=(''$( compgen -W "''${wordlist}" -- "''${cur}" )) + COMPREPLY=($( compgen -W "''${wordlist}" -- "''${cur}" )) } complete -F _timew timew diff --git a/home/common/btop.nix b/home/common/btop.nix index 8447158..700c2dd 100644 --- a/home/common/btop.nix +++ b/home/common/btop.nix @@ -1,13 +1,7 @@ -{ - config, - pkgs, - ... -}: { +{ config, pkgs, ... }: { #home.packages = with pkgs; [ btop ]; programs.btop = { enable = true; - settings = { - proc_gradient = false; - }; + settings = { proc_gradient = false; }; }; } diff --git a/home/common/bufferline.nix b/home/common/bufferline.nix index e66a754..f1d1e16 100644 --- a/home/common/bufferline.nix +++ b/home/common/bufferline.nix @@ -1,100 +1,98 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.neovim = { - plugins = with pkgs.vimPlugins; [ - { - plugin = bufferline-nvim; - type = "lua"; - config = '' - require("bufferline").setup({ - options = { - close_command = "bdelete! %d", -- can be a string | function, see "Mouse actions" - right_mouse_command = "bdelete! %d", -- can be a string | function, see "Mouse actions" - offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, - separator_style = "thin", -- | "thick" | "thin" | { 'any', 'any' }, + plugins = with pkgs.vimPlugins; [{ + plugin = bufferline-nvim; + type = "lua"; + config = '' + require("bufferline").setup({ + options = { + close_command = "bdelete! %d", -- can be a string | function, see "Mouse actions" + right_mouse_command = "bdelete! %d", -- can be a string | function, see "Mouse actions" + offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, + separator_style = "thin", -- | "thick" | "thin" | { 'any', 'any' }, + }, + highlights = { + fill = { + fg = "#ff0000", + bg = { attribute = "bg", highlight = "TabLine" }, }, - highlights = { - fill = { - fg = "#ff0000", - bg = { attribute = "bg", highlight = "TabLine" }, - }, - background = { - fg = { attribute = "fg", highlight = "TabLine" }, - bg = { attribute = "bg", highlight = "TabLine" }, - }, - - buffer_visible = { - fg = { attribute = "fg", highlight = "TabLine" }, - bg = { attribute = "bg", highlight = "TabLine" }, - }, - - close_button = { - fg = { attribute = "fg", highlight = "TabLine" }, - bg = { attribute = "bg", highlight = "TabLine" }, - }, - close_button_visible = { - fg = { attribute = "fg", highlight = "TabLine" }, - bg = { attribute = "bg", highlight = "TabLine" }, - }, - - tab_selected = { - fg = { attribute = "fg", highlight = "Normal" }, - bg = { attribute = "bg", highlight = "Normal" }, - }, - tab = { - fg = { attribute = "fg", highlight = "TabLine" }, - bg = { attribute = "bg", highlight = "TabLine" }, - }, - tab_close = { - fg = { attribute = "fg", highlight = "TabLineSel" }, - bg = { attribute = "bg", highlight = "Normal" }, - }, - - duplicate_selected = { - fg = { attribute = "fg", highlight = "TabLineSel" }, - bg = { attribute = "bg", highlight = "TabLineSel" }, - italic = true, - }, - duplicate_visible = { - fg = { attribute = "fg", highlight = "TabLine" }, - bg = { attribute = "bg", highlight = "TabLine" }, - italic = true, - }, - duplicate = { - fg = { attribute = "fg", highlight = "TabLine" }, - bg = { attribute = "bg", highlight = "TabLine" }, - italic = true, - }, - - modified = { - fg = { attribute = "fg", highlight = "TabLine" }, - bg = { attribute = "bg", highlight = "TabLine" }, - }, - modified_selected = { - fg = { attribute = "fg", highlight = "Normal" }, - bg = { attribute = "bg", highlight = "Normal" }, - }, - modified_visible = { - fg = { attribute = "fg", highlight = "TabLine" }, - bg = { attribute = "bg", highlight = "TabLine" }, - }, - - separator = { - fg = { attribute = "bg", highlight = "TabLine" }, - bg = { attribute = "bg", highlight = "TabLine" }, - }, - separator_selected = { - fg = { attribute = "bg", highlight = "Normal" }, - bg = { attribute = "bg", highlight = "Normal" }, - }, - indicator_selected = { - fg = { attribute = "fg", highlight = "LspDiagnosticsDefaultHint" }, - bg = { attribute = "bg", highlight = "Normal" }, - }, + background = { + fg = { attribute = "fg", highlight = "TabLine" }, + bg = { attribute = "bg", highlight = "TabLine" }, }, - }) - ''; - } - ]; + + buffer_visible = { + fg = { attribute = "fg", highlight = "TabLine" }, + bg = { attribute = "bg", highlight = "TabLine" }, + }, + + close_button = { + fg = { attribute = "fg", highlight = "TabLine" }, + bg = { attribute = "bg", highlight = "TabLine" }, + }, + close_button_visible = { + fg = { attribute = "fg", highlight = "TabLine" }, + bg = { attribute = "bg", highlight = "TabLine" }, + }, + + tab_selected = { + fg = { attribute = "fg", highlight = "Normal" }, + bg = { attribute = "bg", highlight = "Normal" }, + }, + tab = { + fg = { attribute = "fg", highlight = "TabLine" }, + bg = { attribute = "bg", highlight = "TabLine" }, + }, + tab_close = { + fg = { attribute = "fg", highlight = "TabLineSel" }, + bg = { attribute = "bg", highlight = "Normal" }, + }, + + duplicate_selected = { + fg = { attribute = "fg", highlight = "TabLineSel" }, + bg = { attribute = "bg", highlight = "TabLineSel" }, + italic = true, + }, + duplicate_visible = { + fg = { attribute = "fg", highlight = "TabLine" }, + bg = { attribute = "bg", highlight = "TabLine" }, + italic = true, + }, + duplicate = { + fg = { attribute = "fg", highlight = "TabLine" }, + bg = { attribute = "bg", highlight = "TabLine" }, + italic = true, + }, + + modified = { + fg = { attribute = "fg", highlight = "TabLine" }, + bg = { attribute = "bg", highlight = "TabLine" }, + }, + modified_selected = { + fg = { attribute = "fg", highlight = "Normal" }, + bg = { attribute = "bg", highlight = "Normal" }, + }, + modified_visible = { + fg = { attribute = "fg", highlight = "TabLine" }, + bg = { attribute = "bg", highlight = "TabLine" }, + }, + + separator = { + fg = { attribute = "bg", highlight = "TabLine" }, + bg = { attribute = "bg", highlight = "TabLine" }, + }, + separator_selected = { + fg = { attribute = "bg", highlight = "Normal" }, + bg = { attribute = "bg", highlight = "Normal" }, + }, + indicator_selected = { + fg = { attribute = "fg", highlight = "LspDiagnosticsDefaultHint" }, + bg = { attribute = "bg", highlight = "Normal" }, + }, + }, + }) + ''; + }]; }; } # vim: shiftwidth=2 tabstop=2 expandtab diff --git a/home/common/catppuccin.nix b/home/common/catppuccin.nix index aab8f77..7e264ba 100644 --- a/home/common/catppuccin.nix +++ b/home/common/catppuccin.nix @@ -1,8 +1,4 @@ -{ - pkgs, - config, - ... -}: { +{ pkgs, config, ... }: { catppuccin = { enable = true; flavor = "mocha"; diff --git a/home/common/default.nix b/home/common/default.nix index 7fa9620..15178ff 100644 --- a/home/common/default.nix +++ b/home/common/default.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{ config, pkgs, ... }: { imports = [ ./bash.nix ./btop.nix @@ -94,9 +90,7 @@ zip ]; services = { - syncthing = { - tray.enable = true; - }; + syncthing = { tray.enable = true; }; gpg-agent = { enable = true; defaultCacheTtl = 1800; @@ -108,7 +102,8 @@ enable = true; enableBashIntegration = true; agents = "ssh"; - keys = "id_aur id_dsa id_ed25519 id_rsa 56913AD86A18257132AA9F03928BC0B78C1BF5AA"; + keys = + "id_aur id_dsa id_ed25519 id_rsa 56913AD86A18257132AA9F03928BC0B78C1BF5AA"; inheritType = "any"; }; home.file.".links/links.cfg".source = files/links.cfg; diff --git a/home/common/git.nix b/home/common/git.nix index f220aa7..2d7e09c 100644 --- a/home/common/git.nix +++ b/home/common/git.nix @@ -1,13 +1,5 @@ -{ - pkgs, - config, - ... -}: { - programs.lazygit = { - settings = { - os.editPreset = "lvim"; - }; - }; +{ pkgs, config, ... }: { + programs.lazygit = { settings = { os.editPreset = "lvim"; }; }; programs.git = { enable = true; aliases = { @@ -17,9 +9,7 @@ st = "status"; last = "cat-file commit HEAD"; }; - diff-so-fancy = { - enable = true; - }; + diff-so-fancy = { enable = true; }; extraConfig = { core = { user = "Don Harper"; @@ -27,9 +17,7 @@ editor = "${pkgs.lunarvim}/bin/lvim"; sshCommand = "${pkgs.openssh}/bin/ssh -i ~/.ssh/git"; }; - safe = { - directory = "/home/don/src/nixos/duckland/.git"; - }; + safe = { directory = "/home/don/src/nixos/duckland/.git"; }; status = { submoduleSummary = "true"; short = "true"; @@ -38,21 +26,14 @@ name = "Don Harper"; email = "duck@duckland.org"; }; - push = { - default = "simple"; - }; - pull = { - rebase = "false"; - }; + push = { default = "simple"; }; + pull = { rebase = "false"; }; git-extras = { - github-personal-access-token = "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"; - }; - fetch = { - prune = "true"; - }; - init = { - defaultBranch = "main"; + github-personal-access-token = + "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"; }; + fetch = { prune = "true"; }; + init = { defaultBranch = "main"; }; credential = { "https://github.com" = { helper = "!${pkgs.gh}/bin/gh auth git-credential"; diff --git a/home/common/gnupg.nix b/home/common/gnupg.nix index aca1d9b..2eed5da 100644 --- a/home/common/gnupg.nix +++ b/home/common/gnupg.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { programs.gpg = { enable = true; settings = { diff --git a/home/common/khal.nix b/home/common/khal.nix index ad4f748..3a65c83 100644 --- a/home/common/khal.nix +++ b/home/common/khal.nix @@ -1,5 +1,5 @@ -{pkgs, ...}: { - home.packages = with pkgs; [khal]; +{ pkgs, ... }: { + home.packages = with pkgs; [ khal ]; xdg.configFile."khal/config".text = '' [calendars] [[work]] diff --git a/home/common/khard.nix b/home/common/khard.nix index 5263d95..8acb33d 100644 --- a/home/common/khard.nix +++ b/home/common/khard.nix @@ -1,18 +1,11 @@ -{ - config, - pkgs, - ... -}: { +{ config, pkgs, ... }: { programs.khard = { enable = true; settings = { general = { default_action = "list"; editor = "${pkgs.neovim}/bin/nvim"; - merge_editor = [ - "${pkgs.neovim}/bin/nvim" - "-d" - ]; + merge_editor = [ "${pkgs.neovim}/bin/nvim" "-d" ]; }; "contact table" = { display = "first_name"; @@ -22,24 +15,11 @@ show_uids = "no"; sort = "last_name"; localize_dates = "yes"; - preferred_phone_number_type = [ - "pref" - "cell" - "home" - ]; - preferred_email_address_type = [ - "pref" - "work" - "home" - ]; + preferred_phone_number_type = [ "pref" "cell" "home" ]; + preferred_email_address_type = [ "pref" "work" "home" ]; }; vcard = { - private_objects = [ - "Jabber" - "Skype" - "Twitter" - "Mastodon" - ]; + private_objects = [ "Jabber" "Skype" "Twitter" "Mastodon" ]; preferred_version = "3.0"; search_in_source_files = "no"; skip_unparsable = "no"; diff --git a/home/common/lf.nix b/home/common/lf.nix index f039cd5..cea33be 100644 --- a/home/common/lf.nix +++ b/home/common/lf.nix @@ -1,14 +1,10 @@ -{ - pkgs, - config, - ... -}: { +{ pkgs, config, ... }: { xdg.configFile."lf/icons".source = ./icons; programs.lf = { enable = true; commands = { - editor-open = ''$$EDITOR $f''; + editor-open = "$$EDITOR $f"; mkdir = '' ''${{ printf "Directory Name: " diff --git a/home/common/liquidprompt.nix b/home/common/liquidprompt.nix index 6e3f0de..6c6018a 100644 --- a/home/common/liquidprompt.nix +++ b/home/common/liquidprompt.nix @@ -1,5 +1,5 @@ -{pkgs, ...}: { - home.packages = with pkgs; [liquidprompt]; +{ pkgs, ... }: { + home.packages = with pkgs; [ liquidprompt ]; xdg.configFile."liquidpromptrc".text = '' source ~/.config/liquidprompt.theme LOCAL_RCFILE=$HOME/.config/liquidpromptrc.local diff --git a/home/common/listadmin.nix b/home/common/listadmin.nix index 2622290..7245ac0 100644 --- a/home/common/listadmin.nix +++ b/home/common/listadmin.nix @@ -1,9 +1,5 @@ -{ - config, - pkgs, - ... -}: { - home.packages = with pkgs; [listadmin]; +{ config, pkgs, ... }: { + home.packages = with pkgs; [ listadmin ]; home.file."listadmin.ini" = { enable = true; target = ".listadmin.ini"; diff --git a/home/common/mail.nix b/home/common/mail.nix index 8af1725..1a80595 100644 --- a/home/common/mail.nix +++ b/home/common/mail.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{ config, pkgs, ... }: { accounts.email.accounts = { "don@donharper.org" = { primary = true; @@ -17,7 +13,7 @@ programs.notmuch = { enable = true; new = { - tags = ["unread"]; + tags = [ "unread" ]; ignore = [ ".mbsyncstate" ".uidvalidity" @@ -26,11 +22,7 @@ ".mbsyncstate.lock" ]; }; - extraConfig = { - database = { - path = "/home/don/Mail"; - }; - }; + extraConfig = { database = { path = "/home/don/Mail"; }; }; }; xdg.configFile."neomutt/neomuttrc".source = ./files/neomutt/neomuttrc; @@ -49,9 +41,7 @@ OnUnitActiveSec = "5m"; AccuracySec = "1m"; }; - Install = { - WantedBy = ["timers.target"]; - }; + Install = { WantedBy = [ "timers.target" ]; }; }; services.mbsync = { @@ -60,9 +50,7 @@ Environment = "PATH=/run/current-system/sw/bin"; Type = "oneshot"; }; - Install = { - WantedBy = ["mbsync.timer"]; - }; + Install = { WantedBy = [ "mbsync.timer" ]; }; }; services."mbsync-all" = { @@ -71,9 +59,7 @@ Environment = "PATH=/run/current-system/sw/bin"; Type = "oneshot"; }; - Install = { - WantedBy = ["mbsync-all.timer"]; - }; + Install = { WantedBy = [ "mbsync-all.timer" ]; }; }; timers."mbsync-all" = { @@ -81,9 +67,7 @@ AccuracySec = "1m"; OnUnitActiveSec = "14m"; }; - Install = { - WantedBy = ["timers.target"]; - }; + Install = { WantedBy = [ "timers.target" ]; }; }; }; } diff --git a/home/common/mopidy.nix b/home/common/mopidy.nix index 868bd80..8f03f4f 100644 --- a/home/common/mopidy.nix +++ b/home/common/mopidy.nix @@ -1,16 +1,8 @@ -{ - pkgs, - config, - ... -}: { +{ pkgs, config, ... }: { services = { mopidy = { enable = true; - extensionPackages = with pkgs; [ - mopidy-mpd - mopidy-subidy - mopidy-moped - ]; + extensionPackages = with pkgs; [ mopidy-mpd mopidy-subidy mopidy-moped ]; settings = { http = { enabled = true; @@ -26,9 +18,7 @@ password = "D4u5c3k!@"; albumartistsort = false; }; - mpd = { - enabled = true; - }; + mpd = { enabled = true; }; }; }; }; diff --git a/home/common/neovim.nix b/home/common/neovim.nix index 458a1be..95db5a4 100644 --- a/home/common/neovim.nix +++ b/home/common/neovim.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{ config, pkgs, ... }: { programs.neovim = { enable = true; defaultEditor = false; @@ -63,7 +59,5 @@ vimux ]; }; - imports = [ - ./bufferline.nix - ]; + imports = [ ./bufferline.nix ]; } diff --git a/home/common/newsboat.nix b/home/common/newsboat.nix index 6f04121..214289c 100644 --- a/home/common/newsboat.nix +++ b/home/common/newsboat.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{ config, pkgs, ... }: { programs.newsboat = { enable = true; autoReload = true; diff --git a/home/common/taskwarrior.nix b/home/common/taskwarrior.nix index 810a06e..1de9af2 100644 --- a/home/common/taskwarrior.nix +++ b/home/common/taskwarrior.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { home.packages = with pkgs; [ taskwarrior2 taskwarrior-tui @@ -13,9 +13,7 @@ dataLocation = "~/.task"; config = { weekstart = "Monday"; - burndown = { - cumulative = 0; - }; + burndown = { cumulative = 0; }; journal = { info = "no"; time = "yes"; @@ -35,8 +33,10 @@ report = { _reviewed = { columns = "uuid"; - description = "Tasksh review report. Adjust the filter to your needs."; - filter = "( reviewed.none: or reviewed.before:now-4weeks ) and ( +PENDING or +WAITING ) and -someday and project.not:books"; + description = + "Tasksh review report. Adjust the filter to your needs."; + filter = + "( reviewed.none: or reviewed.before:now-4weeks ) and ( +PENDING or +WAITING ) and -someday and project.not:books"; sort = "reviewed+,modified+"; }; mine = { @@ -48,25 +48,33 @@ }; next.filter = " status:pending limit:page -BLOCKED -someday -WAITING"; inbox = { - columns = " id,start.age,entry.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description,urgency"; + columns = + " id,start.age,entry.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description,urgency"; description = "list inbox items"; - filter = " status:pending limit:10 -BLOCKED -someday -WAITING proj:inbox"; - labels = " ID,Active,Age,Deps,P,Project,Tag,Recur,S,Due,Until,Description,Urg"; + filter = + " status:pending limit:10 -BLOCKED -someday -WAITING proj:inbox"; + labels = + " ID,Active,Age,Deps,P,Project,Tag,Recur,S,Due,Until,Description,Urg"; sort = " urgency-"; context = " 0"; }; waiting = { - columns = " id,start.age,entry.age,depends,priority,project,tags,recur,wait,due,until.remaining,description,urgency"; + columns = + " id,start.age,entry.age,depends,priority,project,tags,recur,wait,due,until.remaining,description,urgency"; description = "Waiting"; - filter = " status.not:deleted status.not:completed -BLOCKED -someday +WAITING"; - labels = " ID,Active,Age,Deps,P,Project,Tag,Recur,Wait til,Due,Until,Description,Urg"; + filter = + " status.not:deleted status.not:completed -BLOCKED -someday +WAITING"; + labels = + " ID,Active,Age,Deps,P,Project,Tag,Recur,Wait til,Due,Until,Description,Urg"; sort = " wait"; }; nnext = { - columns = " id,start.age,entry.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description,urgency"; + columns = + " id,start.age,entry.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description,urgency"; description = "Next 10 list"; filter = " status:pending limit:10 -BLOCKED -someday -WAITING"; - labels = " ID,Active,Age,Deps,P,Project,Tag,Recur,S,Due,Until,Description,Urg"; + labels = + " ID,Active,Age,Deps,P,Project,Tag,Recur,S,Due,Until,Description,Urg"; sort = " urgency-"; }; title = { @@ -78,23 +86,28 @@ sort = " description+"; }; anext = { - columns = " id,start.age,entry.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description,urgency"; + columns = + " id,start.age,entry.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description,urgency"; description = "Next 10 list"; filter = " status:pending limit:10 -BLOCKED -WAITING"; - labels = " ID,Active,Age,Deps,P,Project,Tag,Recur,S,Due,Until,Description,Urg"; + labels = + " ID,Active,Age,Deps,P,Project,Tag,Recur,S,Due,Until,Description,Urg"; sort = " urgency-"; }; last = { - columns = " id,start.age,entry.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description,urgency"; + columns = + " id,start.age,entry.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description,urgency"; description = "Oldest 10 list"; filter = " status:pending limit:10 -BLOCKED -someday -WAITING"; - labels = " ID,Active,Age,Deps,P,Project,Tag,Recur,S,Due,Until,Description,Urg"; + labels = + " ID,Active,Age,Deps,P,Project,Tag,Recur,S,Due,Until,Description,Urg"; sort = " entry+"; }; inboxdash = { columns = " id,project,description.count"; description = "Inbox for dashboards"; - filter = " status:pending limit:10 -BLOCKED -someday -WAITING proj:inbox"; + filter = + " status:pending limit:10 -BLOCKED -someday -WAITING proj:inbox"; labels = " ID,Project,Description"; sort = " urgency-"; }; @@ -106,7 +119,8 @@ sort = " urgency-"; }; mail = { - columns = " id,priority,project,due.relative,until.remaining,description.count,urgency"; + columns = + " id,priority,project,due.relative,until.remaining,description.count,urgency"; description = "Next 5 list"; filter = " status:pending limit:5 -BLOCKED -someday -WAITING"; labels = " ID,P,Project,Due,Until,Description,Urg"; @@ -115,13 +129,15 @@ followup = { columns = " id,start.age,entry.age,priority,project,description"; description = "Someday list"; - filter = " status.not:completed status.not:deleted -BLOCKED +followup"; + filter = + " status.not:completed status.not:deleted -BLOCKED +followup"; labels = " ID,Active,Age,P,Project,Description"; sort = " project,urgency-"; context = " 0"; }; someday = { - columns = " id,start.age,entry.age,priority,project,description,urgency"; + columns = + " id,start.age,entry.age,priority,project,description,urgency"; description = "Someday list"; filter = " status:pending -BLOCKED +someday limit:page -WAITING"; labels = " ID,Active,Age,P,Project,Description,Urg"; @@ -133,7 +149,8 @@ taskd = { ca = "/home/don/.task/ca.cert.pem"; certificate = "/home/don/.task/don_harper.cert.pem"; - credentials = "duckland.org/Don Harper/de27c234-6217-4e8b-83c1-2ea840bac55f"; + credentials = + "duckland.org/Don Harper/de27c234-6217-4e8b-83c1-2ea840bac55f"; key = "/home/don/.task/don_harper.key.pem"; server = "task.duckland.org:53589"; recurrence = "on"; diff --git a/home/common/tmux.nix b/home/common/tmux.nix index 2b23f77..5a23ab0 100644 --- a/home/common/tmux.nix +++ b/home/common/tmux.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.tmux = { enable = true; aggressiveResize = true; diff --git a/home/common/topgrade.nix b/home/common/topgrade.nix index fdb0057..5d437bf 100644 --- a/home/common/topgrade.nix +++ b/home/common/topgrade.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{ config, pkgs, ... }: { programs.topgrade = { enable = true; settings = { diff --git a/home/common/vifm.nix b/home/common/vifm.nix index 084564e..4208dfa 100644 --- a/home/common/vifm.nix +++ b/home/common/vifm.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.vifm = { enable = true; extraConfig = '' diff --git a/home/default.nix b/home/default.nix index e266e61..331d4a5 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,36 +1,21 @@ -{ - inputs, - outputs, - ... -}: { - imports = [ - inputs.home-manager.nixosModules.home-manager - ]; - home-manager.extraSpecialArgs = { - inherit inputs outputs; - }; +{ inputs, outputs, ... }: { + imports = [ inputs.home-manager.nixosModules.home-manager ]; + home-manager.extraSpecialArgs = { inherit inputs outputs; }; home-manager = { useGlobalPkgs = true; useUserPackages = true; backupFileExtension = "home-manager-backup"; users = { don = { - imports = [ - inputs.catppuccin.homeManagerModules.catppuccin - ./common - ]; + imports = [ inputs.catppuccin.homeManagerModules.catppuccin ./common ]; home = { username = "don"; homeDirectory = "/home/don"; stateVersion = "23.05"; }; programs = { - home-manager = { - enable = true; - }; - go = { - enable = true; - }; + home-manager = { enable = true; }; + go = { enable = true; }; }; }; }; diff --git a/home/gui/alacritty.nix b/home/gui/alacritty.nix index 59e17ee..bff971c 100644 --- a/home/gui/alacritty.nix +++ b/home/gui/alacritty.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.alacritty = { enable = true; settings = { diff --git a/home/gui/autostart.nix b/home/gui/autostart.nix index 24c1d41..2a2a818 100644 --- a/home/gui/autostart.nix +++ b/home/gui/autostart.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { xdg.configFile."autostart" = { recursive = true; source = ./files/autostart; diff --git a/home/gui/boxes.nix b/home/gui/boxes.nix index ed9e0d8..1652987 100644 --- a/home/gui/boxes.nix +++ b/home/gui/boxes.nix @@ -1,7 +1 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ - gnome-boxes - libvirt - qemu - ]; -} +{ pkgs, ... }: { home.packages = with pkgs; [ gnome-boxes libvirt qemu ]; } diff --git a/home/gui/default.nix b/home/gui/default.nix index c331bde..a384803 100644 --- a/home/gui/default.nix +++ b/home/gui/default.nix @@ -1,8 +1,4 @@ -{ - pkgs, - inputs, - ... -}: { +{ pkgs, inputs, ... }: { home-manager.users.don = { imports = [ ./alacritty.nix @@ -16,13 +12,11 @@ ./sway.nix ./terminals.nix ]; - fonts = { - fontconfig = { - enable = true; - }; - }; + fonts = { fontconfig = { enable = true; }; }; nixpkgs.overlays = [ - (final: prev: {qutebrowser = prev.qutebrowser.override {enableWideVine = true;};}) + (final: prev: { + qutebrowser = prev.qutebrowser.override { enableWideVine = true; }; + }) ]; home.packages = with pkgs; [ @@ -69,45 +63,46 @@ watchmate widevine-cdm yt-dlp - ] - ++ lib.optional (pkgs.hostPlatform.system == "x86_64-linux") sonixd; + ] ++ lib.optional (pkgs.hostPlatform.system == "x86_64-linux") sonixd; xdg = { mimeApps = { enable = true; associations.added = { - "application/octet-stream" = ["gvim.desktop"]; + "application/octet-stream" = [ "gvim.desktop" ]; "application/pdf" = [ "qpdfview.desktop;org.gnome.Evince.desktop;org.pwmt.zathura-pdf-mupdf.desktop" ]; - "audio/mpeg" = ["org.kde.kid3.desktop"]; - "image/jpeg" = ["darktable.desktop;gimp.desktop;imv.desktop"]; - "image/png" = ["darktable.desktop;gimp.desktop;imv-folder.desktop;imv.desktop"]; - "image/x-adobe-dng" = ["imv.desktop"]; - "inode/directory" = ["thunar.desktop"]; - "text/plain" = ["gvim.desktop"]; - "x-scheme-handler/pdf" = ["pdfview.desktop"]; + "audio/mpeg" = [ "org.kde.kid3.desktop" ]; + "image/jpeg" = [ "darktable.desktop;gimp.desktop;imv.desktop" ]; + "image/png" = + [ "darktable.desktop;gimp.desktop;imv-folder.desktop;imv.desktop" ]; + "image/x-adobe-dng" = [ "imv.desktop" ]; + "inode/directory" = [ "thunar.desktop" ]; + "text/plain" = [ "gvim.desktop" ]; + "x-scheme-handler/pdf" = [ "pdfview.desktop" ]; "x-scheme-handler/tg" = [ "userapp-Telegram Desktop-9M6O50.desktop;userapp-Telegram Desktop-6IJLW1.desktop;userapp-Telegram Desktop-IQIXX1.desktop;userapp-Telegram Desktop-FK06Y1.desktop;userapp-Telegram Desktop-1SZ7Y1.desktop;userapp-Telegram Desktop-C24MZ1.desktop;userapp-Telegram Desktop-29FD01.desktop;userapp-Telegram Desktop-21P401.desktop;userapp-Telegram Desktop-LOTG11.desktop" ]; }; defaultApplications = { - "inode/directory" = ["thunar.desktop"]; - "model/3mf" = ["com.ultimaker.cura.desktop"]; - "model/gltf+json" = ["com.ultimaker.cura.desktop"]; - "model/gltf-binary" = ["com.ultimaker.cura.desktop"]; - "model/stl" = ["com.ultimaker.cura.desktop"]; - "text/html" = ["org.qutebrowser.qutebrowser.desktop"]; - "x-scheme-handler/about" = ["org.qutebrowser.qutebrowser.desktop"]; - "x-scheme-handler/etcher" = ["balena-etcher.desktop"]; - "x-scheme-handler/http" = ["org.qutebrowser.qutebrowser.desktop"]; - "x-scheme-handler/https" = ["org.qutebrowser.qutebrowser.desktop"]; - "x-scheme-handler/msteams" = ["teams-for-linux.desktop"]; - "x-scheme-handler/pdf" = ["myweb.desktop"]; - "x-scheme-handler/tg" = ["userapp-Telegram Desktop-LOTG11.desktop"]; - "x-scheme-handler/tootle" = ["com.github.bleakgrey.tootle.desktop"]; - "x-scheme-handler/unknown" = ["org.qutebrowser.qutebrowser.desktop"]; - "application/pdf" = ["org.pwmt.zathura-pdf-mupdf.desktop"]; - "x-scheme-handler/mailto" = ["neomutt.desktop"]; + "inode/directory" = [ "thunar.desktop" ]; + "model/3mf" = [ "com.ultimaker.cura.desktop" ]; + "model/gltf+json" = [ "com.ultimaker.cura.desktop" ]; + "model/gltf-binary" = [ "com.ultimaker.cura.desktop" ]; + "model/stl" = [ "com.ultimaker.cura.desktop" ]; + "text/html" = [ "org.qutebrowser.qutebrowser.desktop" ]; + "x-scheme-handler/about" = [ "org.qutebrowser.qutebrowser.desktop" ]; + "x-scheme-handler/etcher" = [ "balena-etcher.desktop" ]; + "x-scheme-handler/http" = [ "org.qutebrowser.qutebrowser.desktop" ]; + "x-scheme-handler/https" = [ "org.qutebrowser.qutebrowser.desktop" ]; + "x-scheme-handler/msteams" = [ "teams-for-linux.desktop" ]; + "x-scheme-handler/pdf" = [ "myweb.desktop" ]; + "x-scheme-handler/tg" = [ "userapp-Telegram Desktop-LOTG11.desktop" ]; + "x-scheme-handler/tootle" = [ "com.github.bleakgrey.tootle.desktop" ]; + "x-scheme-handler/unknown" = + [ "org.qutebrowser.qutebrowser.desktop" ]; + "application/pdf" = [ "org.pwmt.zathura-pdf-mupdf.desktop" ]; + "x-scheme-handler/mailto" = [ "neomutt.desktop" ]; }; }; desktopEntries = { @@ -133,7 +128,7 @@ terminal = false; name = "myweb"; exec = "/home/don/bin/myweb %u"; - mimeType = ["x-scheme-handler/pdf"]; + mimeType = [ "x-scheme-handler/pdf" ]; }; cooking-notebook = { type = "Application"; @@ -148,8 +143,8 @@ type = "Application"; icon = "obsidian"; comment = "Obsidian"; - mimeType = ["x-scheme-handler/obsidian"]; - categories = ["Office"]; + mimeType = [ "x-scheme-handler/obsidian" ]; + categories = [ "Office" ]; }; journal = { name = "Journal"; @@ -158,13 +153,11 @@ type = "Application"; icon = "obsidian"; comment = "Obsidian Journal"; - mimeType = ["x-scheme-handler/obsidian"]; - categories = ["Office"]; + mimeType = [ "x-scheme-handler/obsidian" ]; + categories = [ "Office" ]; }; }; - configFile = { - "shikane/config.toml".source = files/shikane.toml; - }; + configFile = { "shikane/config.toml".source = files/shikane.toml; }; }; }; } diff --git a/home/gui/fuzzel.nix b/home/gui/fuzzel.nix index 98d2458..eb4d3ef 100644 --- a/home/gui/fuzzel.nix +++ b/home/gui/fuzzel.nix @@ -1,9 +1,5 @@ -{ - config, - pkgs, - ... -}: { - home.packages = with pkgs; [fuzzel]; +{ config, pkgs, ... }: { + home.packages = with pkgs; [ fuzzel ]; programs.fuzzel = { enable = true; settings = { @@ -15,9 +11,7 @@ prompt = "❯ "; layer = "overlay"; }; - border = { - radius = 20; - }; + border = { radius = 20; }; dmenu = { exit-immediately-if-empty = true; mode = "index"; diff --git a/home/gui/kde.nix b/home/gui/kde.nix index 6e16e8f..4e6eed0 100644 --- a/home/gui/kde.nix +++ b/home/gui/kde.nix @@ -1,5 +1,5 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ktimer]; +{ pkgs, ... }: { + home.packages = with pkgs; [ ktimer ]; xdg.configFile."ktimerrc".text = '' [Job0] Command[$e]=$HOME/bin/timeup diff --git a/home/gui/mpv.nix b/home/gui/mpv.nix index d28e34e..dc867b9 100644 --- a/home/gui/mpv.nix +++ b/home/gui/mpv.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs = { mpv = { enable = true; @@ -22,7 +22,8 @@ hr-seek = "yes"; index = "default"; save-position-on-quit = "yes"; - script-opts = "ytdl_hook-ytdl_path=/etc/profiles/per-user/don/bin/yt-dlp"; + script-opts = + "ytdl_hook-ytdl_path=/etc/profiles/per-user/don/bin/yt-dlp"; # scripts=[ pkgs.mpvScripts.autoload ]; slang = "en"; user-agent = "Mozilla/5.0"; diff --git a/home/gui/qutebrowser.nix b/home/gui/qutebrowser.nix index 737b3a8..ae9142b 100644 --- a/home/gui/qutebrowser.nix +++ b/home/gui/qutebrowser.nix @@ -1,9 +1,4 @@ -{ - inputs, - outputs, - pkgs, - ... -}: { +{ inputs, outputs, pkgs, ... }: { programs.qutebrowser = { enable = true; loadAutoconfig = true; @@ -20,7 +15,8 @@ ",j" = "spawn --userscript joplin-import"; ",l" = "spawn --userscript qute-bitwarden"; ",m" = "spawn --userscript mymail"; - ",n" = ''config-cycle content.user_stylesheets /home/don/src/solarized-everything-css/css/mine.css ""''; + ",n" = '' + config-cycle content.user_stylesheets /home/don/src/solarized-everything-css/css/mine.css ""''; ",o" = "spawn --userscript obsidian-import"; ",r" = "spawn --userscript recipe"; ",t" = "spawn --userscript qute-bitwarden --totp-only"; @@ -31,7 +27,8 @@ "gF" = "spawn --userscript openfeeds"; "xb" = "config-cycle statusbar.show always in-mode"; "xt" = "config-cycle tabs.show always switching"; - "xx" = "config-cycle statusbar.show always in-mode ;; config-cycle tabs.show always switching"; + "xx" = + "config-cycle statusbar.show always in-mode ;; config-cycle tabs.show always switching"; }; }; searchEngines = { @@ -51,7 +48,8 @@ buymusic2 = "https://www.hdtracks.com/"; cal = "https://cloud.trex-halfbeak.ts.net/apps/calendar/timeGridDay/now"; canvas = "https://katyisd.instructure.com/login/ldap"; - centerpoint = "http://gis.centerpointenergy.com/outagetracker/?WT.ac=OC_Image_Callout"; + centerpoint = + "http://gis.centerpointenergy.com/outagetracker/?WT.ac=OC_Image_Callout"; chase = "https://www.chase.com/"; chromeos = "https://cros-updates-serving.appspot.com/"; cloud = "https://cloud.trex-halfbeak.ts.net/apps/dashboard/"; @@ -61,7 +59,8 @@ cups = "http://localhost:631/printers/printer"; darkroom = "https://thedarkroom.com/photodashboard/"; disk = "https://smart.trex-halfbeak.ts.net/web/dashboard"; - driversed = "https://driving.aceable.com/teacher/log?studentId=I89fno2YEZo4hQ40"; + driversed = + "https://driving.aceable.com/teacher/log?studentId=I89fno2YEZo4hQ40"; droplet = "https://cloud.digitalocean.com/droplets?i=a8b99f"; dtstyle = "https://dtstyle.net/"; ercot = "https://www.ercot.com/gridmktinfo/dashboards"; @@ -69,28 +68,35 @@ flood = "https://www.harriscountyfws.org/"; gatus = "https://gatus.trex-halfbeak.ts.net/"; gcal = "https://calendar.google.com/calendar/r"; - gfamily = "https://familylink.google.com/member/112279402605706545724/highlights"; + gfamily = + "https://familylink.google.com/member/112279402605706545724/highlights"; git = "https://git.trex-halfbeak.ts.net/?repo-search-query=m"; gmail = "https://mail.google.com/mail/u/0/?pli=1#inbox"; gmaps = "https://www.google.com/maps/"; gmessages = "https://messages.google.com/web/conversations"; gphoto = "https://photos.google.com/"; gvoice = "https://voice.google.com/u/0/calls"; - hac = "https://homeaccess.katyisd.org/HomeAccess/Account/LogOn?ReturnUrl=%2FHomeAccess"; - heb = "https://www.heb.com/collections/weekly-ad?customFilters=onAdFilter&shoppingStore=497&utm_source=1021275&utm_medium=email&utm_campaign=2023-11-24-weekly-ad&utm_content=weekly-ad-banner"; + hac = + "https://homeaccess.katyisd.org/HomeAccess/Account/LogOn?ReturnUrl=%2FHomeAccess"; + heb = + "https://www.heb.com/collections/weekly-ad?customFilters=onAdFilter&shoppingStore=497&utm_source=1021275&utm_medium=email&utm_campaign=2023-11-24-weekly-ad&utm_content=weekly-ad-banner"; hetzner = "https://console.hetzner.cloud/projects"; hometail = "http://homeassistant.tail:8123/lovelace-mine/default_view"; hurricane = "https://www.nhc.noaa.gov/"; ice = "https://ice.home.duckland.org/"; imdb = "https://www.imdb.com/"; - instapot-cook-times = "https://temeculablogs.com/instant-pot-cooking-times/"; - jelly = "https://jellyfin.trex-halfbeak.ts.net/web/index.html#!/home.html"; + instapot-cook-times = + "https://temeculablogs.com/instant-pot-cooking-times/"; + jelly = + "https://jellyfin.trex-halfbeak.ts.net/web/index.html#!/home.html"; jellyreq = "https://jellyseerr.trex-halfbeak.ts.net/discover/trending"; jzoom = "https://jpmchase.zoom.us/"; katy-bus = "https://busroutes.katyisd.org/wqsimweb/webquery/"; - katy-bus-times = "https://busroutes.katyisd.org/wqsimweb/webquery/WebQueryRequestController?action=2&schoolcode=046&numofstops=1&schoolname=BECK+JUNIOR+HIGH&attendSchoolIndex=0#stops"; + katy-bus-times = + "https://busroutes.katyisd.org/wqsimweb/webquery/WebQueryRequestController?action=2&schoolcode=046&numofstops=1&schoolname=BECK+JUNIOR+HIGH&attendSchoolIndex=0#stops"; katy-pay = "https://katyisd.revtrak.net/"; - kindle = "https://smile.amazon.com/mn/dcw/myx.html/ref=kinw_myk_redirect#/home/content/booksAll/dateDsc/"; + kindle = + "https://smile.amazon.com/mn/dcw/myx.html/ref=kinw_myk_redirect#/home/content/booksAll/dateDsc/"; kindle-read = "https://www.amazon.com/kindle-dbs/ku/ku-central/"; kisdcal = "https://www.katyisd.org/Page/2#calendar1/20230801/month"; kroger = "https://www.kroger.com/weeklyad"; @@ -112,16 +118,19 @@ nix-config = "https://nixos.org/manual/nixos/stable/options.html"; nix-dev = "https://nix.dev/"; nix-hardware = "https://github.com/duckunix/nixos-hardware"; - nix-home-manual = "https://nix-community.github.io/home-manager/options.xhtml"; + nix-home-manual = + "https://nix-community.github.io/home-manager/options.xhtml"; nix-manual = "https://nixos.org/manual/nixos/stable/index.html"; nix-options = "https://search.nixos.org/options?"; nix-package = "https://search.nixos.org/packages"; - nix-up-software = "https://nix.dev/tutorials/learning-journey/packaging-existing-software"; + nix-up-software = + "https://nix.dev/tutorials/learning-journey/packaging-existing-software"; nix-versions = "https://lazamar.co.uk/nix-versions/"; nix-wiki = "https://nixos.wiki/"; ntop = "https://ice.home.duckland.org:3001/"; octoprint = "http://octopi.tail/?#temp"; - orders = "https://www.amazon.com/gp/css/order-history?ref_=nav_orders_first"; + orders = + "https://www.amazon.com/gp/css/order-history?ref_=nav_orders_first"; photos = "https://photos.trex-halfbeak.ts.net/"; pi = "http://pihole.tail/admin/"; pinetab2-releases = "https://wiki.pine64.org/wiki/PineTab2_Releases"; @@ -135,7 +144,8 @@ smile = "https://www.amazon.com/"; spacecity = "https://spacecityweather.com/"; sprouts = "https://www.sprouts.com/weekly-ad/"; - star = "https://starpizzacinco.revelup.com/weborder/?establishment=1#index"; + star = + "https://starpizzacinco.revelup.com/weborder/?establishment=1#index"; swayutil = "https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway"; sync-dragon = "http://dragon.tail:8384/#"; sync-eve = "http://eve.tail:8384/#"; @@ -160,7 +170,8 @@ vonage = "https://secure.vonage.com/account/login.html"; vortexic = "https://vortexic-university.sparkuniversity.co/Courses.aspx"; waze = "https://www.waze.com/livemap"; - weather = "https://merrysky.net/forecast/Cinco%20Ranch%20High%20School,%20Katy,%20%20TX/us"; + weather = + "https://merrysky.net/forecast/Cinco%20Ranch%20High%20School,%20Katy,%20%20TX/us"; weather2 = "https://openweathermap.org/city/4681485"; weather3 = "https://www.wunderground.com/weather/us/tx/katy/29.79,-95.82"; weather4 = "https://www.weatherbug.com/weather-forecast/now/"; @@ -180,9 +191,7 @@ #c.bindings = { key_mappings = ['': '' '': '' '': '' '': '' '': '' '': '' '': '' '': '']} ''; settings = { - auto_save = { - session = true; - }; + auto_save = { session = true; }; #}; colors = { webpage = { @@ -203,12 +212,8 @@ }; }; completion = { - open_categories = [ - "quickmarks" - "searchengines" - "bookmarks" - "history" - ]; + open_categories = + [ "quickmarks" "searchengines" "bookmarks" "history" ]; }; content = { autoplay = false; @@ -223,66 +228,35 @@ enabled = true; }; }; - downloads = { - prevent_mixed_content = true; - }; + downloads = { prevent_mixed_content = true; }; fileselect = { - folder = { - command = [ - "kitty" - "-e" - "ranger" - "--choosedir={}" - ]; - }; + folder = { command = [ "kitty" "-e" "ranger" "--choosedir={}" ]; }; handler = "external"; multiple_files = { - command = [ - "kitty" - "-e" - "ranger" - "--choosefile={}" - ]; + command = [ "kitty" "-e" "ranger" "--choosefile={}" ]; }; single_file = { - command = [ - "kitty" - "-e" - "ranger" - "--choosefile={}" - ]; + command = [ "kitty" "-e" "ranger" "--choosefile={}" ]; }; }; qt = { - args = ["widevine-path=${pkgs.widevine-cdm}/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"]; - workarounds = { - remove_service_workers = true; - }; - }; - spellcheck = { - languages = ["en-US"]; - }; - statusbar = { - show = "in-mode"; + args = [ + "widevine-path=${pkgs.widevine-cdm}/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so" + ]; + workarounds = { remove_service_workers = true; }; }; + spellcheck = { languages = [ "en-US" ]; }; + statusbar = { show = "in-mode"; }; tabs = { - favicons = { - scale = 1; - }; - indicator = { - width = 1; - }; + favicons = { scale = 1; }; + indicator = { width = 1; }; mode_on_change = "restore"; position = "bottom"; select_on_remove = "next"; show = "always"; - title = { - format = "{audio}{current_title}"; - }; - }; - url = { - default_page = "about:blank"; + title = { format = "{audio}{current_title}"; }; }; + url = { default_page = "about:blank"; }; }; }; home.file.qutebrowserlocal = { diff --git a/home/gui/redshift.nix b/home/gui/redshift.nix index 77243d3..d732781 100644 --- a/home/gui/redshift.nix +++ b/home/gui/redshift.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{ config, pkgs, ... }: { services.redshift = { enable = true; latitude = "29.74"; diff --git a/home/gui/services.nix b/home/gui/services.nix index 2de882a..156c07d 100644 --- a/home/gui/services.nix +++ b/home/gui/services.nix @@ -1,10 +1,6 @@ -{...}: { +{ ... }: { services = { - gnome-keyring = { - enable = true; - }; - ssh-agent = { - enable = true; - }; + gnome-keyring = { enable = true; }; + ssh-agent = { enable = true; }; }; } diff --git a/home/gui/sway.nix b/home/gui/sway.nix index b0b0a0f..e6dc316 100644 --- a/home/gui/sway.nix +++ b/home/gui/sway.nix @@ -1,12 +1,6 @@ -{ - inputs, - pkgs, - hostname, - outputs, - osConfig, - ... -}: { - xdg.configFile."sway/config".source = ./files/sway/${osConfig.networking.hostName}; +{ inputs, pkgs, hostname, outputs, osConfig, ... }: { + xdg.configFile."sway/config".source = + ./files/sway/${osConfig.networking.hostName}; xdg.configFile."waybar/weather.py".source = ./files/sway/weather.py; xdg.configFile."waybar/weather.conf".source = ./files/sway/weather.conf; @@ -30,13 +24,9 @@ position = "top"; height = 10; spacing = 0; - modules-left = [ - "sway/workspaces" - "sway/mode" - "wlr/workspaces" - "custom/mycal" - ]; - modules-center = []; + modules-left = + [ "sway/workspaces" "sway/mode" "wlr/workspaces" "custom/mycal" ]; + modules-center = [ ]; # modules-right = ["idle_inhibitor" "custom/mytimew" "pulseaudio" "custom/mymusic" "bluetooth" "network" "backlight" "battery" "battery#bat2" "tray" "custom/mycal" "clock"]; modules-right = [ "idle_inhibitor" @@ -89,12 +79,8 @@ on-click = "~/bin/control-music --pause"; interval = 5; }; - "sway/window" = { - icon-size = 10; - }; - "sway/mode" = { - format = "{}"; - }; + "sway/window" = { icon-size = 10; }; + "sway/mode" = { format = ''{}''; }; "idle_inhibitor" = { format = "{icon}"; format-icons = { @@ -107,7 +93,9 @@ spacing = 10; }; clock = { - tooltip-format = "{:%Y %B %d}\n{calendar}"; + tooltip-format = '' + {:%Y %B %d} + {calendar}''; format = "{:%I:%M %p}"; format-alt = "{:%Y-%m-%d}"; on-click = "~/bin/mynewterm -e ikhal"; @@ -116,9 +104,7 @@ format = "cpu: {usage}%"; tooltip = false; }; - memory = { - format = "mem: {}%"; - }; + memory = { format = "mem: {}%"; }; temperature = { critical-threshold = 80; format = "{temperatureC}°C {icon}"; @@ -135,9 +121,7 @@ format-discharging = "d:{capacity}% {time}"; format-alt = "{time} {icon}"; }; - "battery#bat2" = { - bat = "BAT2"; - }; + "battery#bat2" = { bat = "BAT2"; }; network = { format-wifi = "{essid} ({signalStrength}%)"; format-ethernet = "{ipaddr}/{cidr}"; diff --git a/home/gui/terminals.nix b/home/gui/terminals.nix index 5f5bfa3..68b63ad 100644 --- a/home/gui/terminals.nix +++ b/home/gui/terminals.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{ config, pkgs, ... }: { programs.kitty = { enable = true; settings = { @@ -16,19 +12,11 @@ }; programs.foot = { enable = true; - server = { - enable = true; - }; + server = { enable = true; }; settings = { - main = { - term = "tmux-256color"; - }; - mouse = { - hide-when-typing = "yes"; - }; - bell = { - urgent = "yes"; - }; + main = { term = "tmux-256color"; }; + mouse = { hide-when-typing = "yes"; }; + bell = { urgent = "yes"; }; }; }; } diff --git a/home/work/citrix.nix b/home/work/citrix.nix index 6d1841c..846b73e 100644 --- a/home/work/citrix.nix +++ b/home/work/citrix.nix @@ -1,22 +1,15 @@ -{ - config, - pkgs, - inputs, - ... -}: { - home.packages = with pkgs; [ - (pkgs.citrix_workspace.override { - libvorbis = pkgs.libvorbis.override { - libogg = pkgs.libogg.overrideAttrs (prevAttrs: { - cmakeFlags = - (prevAttrs.cmakeFlags or []) - ++ [ - (lib.cmakeBool "BUILD_SHARED_LIBS" true) - ]; - }); - }; - }) - ]; +{ config, pkgs, inputs, ... }: { + home.packages = with pkgs; + [ + (pkgs.citrix_workspace.override { + libvorbis = pkgs.libvorbis.override { + libogg = pkgs.libogg.overrideAttrs (prevAttrs: { + cmakeFlags = (prevAttrs.cmakeFlags or [ ]) + ++ [ (lib.cmakeBool "BUILD_SHARED_LIBS" true) ]; + }); + }; + }) + ]; home.file."ICAClient" = { recursive = true; source = ./files/citrix; diff --git a/home/work/default.nix b/home/work/default.nix index 218e205..03b04c7 100644 --- a/home/work/default.nix +++ b/home/work/default.nix @@ -1,12 +1,3 @@ -{ - pkgs, - inputs, - ... -}: { - home-manager.users.don = { - imports = [ - ./citrix.nix - ./zoom.nix - ]; - }; +{ pkgs, inputs, ... }: { + home-manager.users.don = { imports = [ ./citrix.nix ./zoom.nix ]; }; } diff --git a/home/work/zoom.nix b/home/work/zoom.nix index ea84453..d7c88d5 100644 --- a/home/work/zoom.nix +++ b/home/work/zoom.nix @@ -1,9 +1,5 @@ -{ - config, - pkgs, - ... -}: { - home.packages = with pkgs; [zoom-us]; +{ config, pkgs, ... }: { + home.packages = with pkgs; [ zoom-us ]; # xdg = { # configFile."zoom.conf".source = files/zoom.conf; # configFile."zoomus.conf".source = files/zoomus.conf; diff --git a/hosts/ace/colmena.nix b/hosts/ace/colmena.nix index 8af2647..33db243 100644 --- a/hosts/ace/colmena.nix +++ b/hosts/ace/colmena.nix @@ -1,15 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./default.nix - ]; - deployment = { - tags = ["workstation" "intel"]; - }; +{ inputs, outputs, lib, config, pkgs, ... }: { + imports = [ ./default.nix ]; + deployment = { tags = [ "workstation" "intel" ]; }; } diff --git a/hosts/ace/default.nix b/hosts/ace/default.nix index ca67fc0..4dbdd28 100644 --- a/hosts/ace/default.nix +++ b/hosts/ace/default.nix @@ -1,11 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { +{ inputs, outputs, lib, config, pkgs, ... }: { imports = [ ./hardware-configuration.nix # ../disko/mmcblk.nix diff --git a/hosts/ace/hardware-configuration.nix b/hosts/ace/hardware-configuration.nix index 1a5cb6e..623f911 100644 --- a/hosts/ace/hardware-configuration.nix +++ b/hosts/ace/hardware-configuration.nix @@ -1,26 +1,13 @@ # 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") - ]; +{ config, lib, pkgs, modulesPath, ... }: { + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ - "xhci_pci" - "ahci" - "uas" - "sd_mod" - ]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "uas" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; fileSystems."/" = { device = "/dev/sda2"; @@ -32,9 +19,7 @@ fsType = "vfat"; }; - swapDevices = [ - {device = "/dev/sda3";} - ]; + swapDevices = [{ device = "/dev/sda3"; }]; # 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 @@ -45,5 +30,6 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/disko/nvme.nix b/hosts/disko/nvme.nix index 19cee5e..548e1d8 100644 --- a/hosts/disko/nvme.nix +++ b/hosts/disko/nvme.nix @@ -1,11 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { +{ inputs, outputs, lib, config, pkgs, ... }: { disko.devices = { disk = { vdb = { diff --git a/hosts/display/default.nix b/hosts/display/default.nix index d0b68c9..d6af5fc 100644 --- a/hosts/display/default.nix +++ b/hosts/display/default.nix @@ -1,11 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { +{ inputs, outputs, lib, config, pkgs, ... }: { imports = [ inputs.nixos-hardware.nixosModules.raspberry-pi-4 ./hardware-configuration.nix diff --git a/hosts/dragon/default.nix b/hosts/dragon/default.nix index 4a5f78d..7ebb717 100644 --- a/hosts/dragon/default.nix +++ b/hosts/dragon/default.nix @@ -1,9 +1,4 @@ -{ - inputs, - config, - pkgs, - ... -}: { +{ inputs, config, pkgs, ... }: { imports = [ ./hardware-configuration.nix inputs.nixos-hardware.nixosModules.common-cpu-intel diff --git a/hosts/dragon/hardware-configuration.nix b/hosts/dragon/hardware-configuration.nix index c4891e3..cf891cf 100644 --- a/hosts/dragon/hardware-configuration.nix +++ b/hosts/dragon/hardware-configuration.nix @@ -1,27 +1,14 @@ # 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") - ]; +{ config, lib, pkgs, modulesPath, ... }: { + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ - "xhci_pci" - "ehci_pci" - "ahci" - "sd_mod" - "rtsx_pci_sdmmc" - ]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = + [ "xhci_pci" "ehci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; fileSystems."/" = { device = "/dev/disk/by-uuid/8f55014e-8c1b-475d-8fe6-501977358d97"; @@ -33,9 +20,8 @@ fsType = "vfat"; }; - swapDevices = [ - {device = "/dev/disk/by-uuid/843421e5-cb74-4c43-b88d-5053e7f7dec4";} - ]; + swapDevices = + [{ device = "/dev/disk/by-uuid/843421e5-cb74-4c43-b88d-5053e7f7dec4"; }]; # 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 @@ -47,5 +33,6 @@ # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/eve/colmena.nix b/hosts/eve/colmena.nix index 8af2647..33db243 100644 --- a/hosts/eve/colmena.nix +++ b/hosts/eve/colmena.nix @@ -1,15 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./default.nix - ]; - deployment = { - tags = ["workstation" "intel"]; - }; +{ inputs, outputs, lib, config, pkgs, ... }: { + imports = [ ./default.nix ]; + deployment = { tags = [ "workstation" "intel" ]; }; } diff --git a/hosts/eve/default.nix b/hosts/eve/default.nix index 3501ecf..9e23d76 100644 --- a/hosts/eve/default.nix +++ b/hosts/eve/default.nix @@ -1,11 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { +{ inputs, outputs, lib, config, pkgs, ... }: { imports = [ inputs.nixos-hardware.nixosModules.google-pixelbook ./hardware-configuration.nix diff --git a/hosts/eve/hardware-configuration.nix b/hosts/eve/hardware-configuration.nix index 09691ba..8f7b379 100644 --- a/hosts/eve/hardware-configuration.nix +++ b/hosts/eve/hardware-configuration.nix @@ -1,27 +1,14 @@ # 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") - ]; +{ config, lib, pkgs, modulesPath, ... }: { + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ - "xhci_pci" - "usb_storage" - "usbhid" - "sd_mod" - "sdhci_pci" - ]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = + [ "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; fileSystems."/" = { device = "/dev/mmcblk0p2"; @@ -46,5 +33,6 @@ powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/eve/kernel.nix b/hosts/eve/kernel.nix index ba503eb..df9bf3c 100644 --- a/hosts/eve/kernel.nix +++ b/hosts/eve/kernel.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: { +{ config, pkgs, lib, ... }: { boot.kernelPatches = lib.singleton { name = "eve-config"; patch = null; diff --git a/hosts/fred/colmena.nix b/hosts/fred/colmena.nix index f42a576..2969eae 100644 --- a/hosts/fred/colmena.nix +++ b/hosts/fred/colmena.nix @@ -1,15 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./default.nix - ]; - deployment = { - tags = ["server" "intel"]; - }; +{ inputs, outputs, lib, config, pkgs, ... }: { + imports = [ ./default.nix ]; + deployment = { tags = [ "server" "intel" ]; }; } diff --git a/hosts/fred/default.nix b/hosts/fred/default.nix index c902b27..33589c4 100644 --- a/hosts/fred/default.nix +++ b/hosts/fred/default.nix @@ -1,11 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { +{ inputs, outputs, lib, config, pkgs, ... }: { imports = [ ./hardware-configuration.nix ../server @@ -16,11 +9,9 @@ ]; networking.hostName = "fred"; boot = { - binfmt.emulatedSystems = ["aarch64-linux"]; + binfmt.emulatedSystems = [ "aarch64-linux" ]; loader = { - systemd-boot = { - enable = true; - }; + systemd-boot = { enable = true; }; efi = { canTouchEfiVariables = true; efiSysMountPoint = "/boot"; diff --git a/hosts/fred/docker.nix b/hosts/fred/docker.nix index 881f566..9111b0e 100644 --- a/hosts/fred/docker.nix +++ b/hosts/fred/docker.nix @@ -1,9 +1,5 @@ # Auto-generated using compose2nix v0.1.6. -{ - config, - lib, - ... -}: { +{ config, lib, ... }: { # Runtime virtualisation.docker = { enable = true; diff --git a/hosts/fred/hardware-configuration.nix b/hosts/fred/hardware-configuration.nix index c2b5489..3f502bd 100644 --- a/hosts/fred/hardware-configuration.nix +++ b/hosts/fred/hardware-configuration.nix @@ -1,29 +1,14 @@ # 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") - ]; +{ config, lib, pkgs, modulesPath, ... }: { + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ - "xhci_pci" - "ehci_pci" - "ahci" - "usbhid" - "ums_realtek" - "sd_mod" - "sr_mod" - ]; - boot.initrd.kernelModules = ["dm-snapshot"]; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = + [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "ums_realtek" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; fileSystems."/" = { device = "/dev/disk/by-uuid/4a1d2915-6964-4479-98c6-d17e333e83e9"; @@ -35,7 +20,7 @@ fsType = "vfat"; }; - swapDevices = []; + 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 @@ -45,5 +30,6 @@ # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/fred/podman.nix b/hosts/fred/podman.nix index e223d64..71a9a6d 100644 --- a/hosts/fred/podman.nix +++ b/hosts/fred/podman.nix @@ -1,9 +1,5 @@ # Auto-generated using compose2nix v0.1.6. -{ - pkgs, - lib, - ... -}: { +{ pkgs, lib, ... }: { # Runtime virtualisation.podman = { enable = true; @@ -35,29 +31,16 @@ "/home/don/docker/speedtest/config:/config:rw" "/home/don/docker/speedtest/web:/etc/ssl/web:rw" ]; - dependsOn = [ - "bandwidth-db" - "bandwidth-ts" - ]; + dependsOn = [ "bandwidth-db" "bandwidth-ts" ]; log-driver = "journald"; - extraOptions = [ - "--network=container:bandwidth-ts" - ]; + extraOptions = [ "--network=container:bandwidth-ts" ]; }; systemd.services."podman-bandwidth" = { - serviceConfig = { - Restart = lib.mkOverride 500 "always"; - }; - partOf = [ - "podman-compose-tstest-root.target" - ]; - unitConfig.UpheldBy = [ - "podman-bandwidth-db.service" - "podman-bandwidth-ts.service" - ]; - wantedBy = [ - "podman-compose-tstest-root.target" - ]; + serviceConfig = { Restart = lib.mkOverride 500 "always"; }; + partOf = [ "podman-compose-tstest-root.target" ]; + unitConfig.UpheldBy = + [ "podman-bandwidth-db.service" "podman-bandwidth-ts.service" ]; + wantedBy = [ "podman-compose-tstest-root.target" ]; }; virtualisation.oci-containers.containers."bandwidth-db" = { image = "mariadb:10"; @@ -69,30 +52,16 @@ PGID = "1000"; PUID = "1000"; }; - volumes = [ - "/home/don/docker/speedtest-db:/var/lib/mysql:rw" - ]; - dependsOn = [ - "bandwidth-ts" - ]; + volumes = [ "/home/don/docker/speedtest-db:/var/lib/mysql:rw" ]; + dependsOn = [ "bandwidth-ts" ]; log-driver = "journald"; - extraOptions = [ - "--network=container:bandwidth-ts" - ]; + extraOptions = [ "--network=container:bandwidth-ts" ]; }; systemd.services."podman-bandwidth-db" = { - serviceConfig = { - Restart = lib.mkOverride 500 "always"; - }; - partOf = [ - "podman-compose-tstest-root.target" - ]; - unitConfig.UpheldBy = [ - "podman-bandwidth-ts.service" - ]; - wantedBy = [ - "podman-compose-tstest-root.target" - ]; + serviceConfig = { Restart = lib.mkOverride 500 "always"; }; + partOf = [ "podman-compose-tstest-root.target" ]; + unitConfig.UpheldBy = [ "podman-bandwidth-ts.service" ]; + wantedBy = [ "podman-compose-tstest-root.target" ]; }; virtualisation.oci-containers.containers."bandwidth-ts" = { image = "tailscale/tailscale"; @@ -108,7 +77,7 @@ "/dev/net/tun:/dev/net/tun:rw" "/home/don/docker/tailscale/var_lib:/var/lib:rw" ]; - cmd = ["tailscaled"]; + cmd = [ "tailscaled" ]; log-driver = "journald"; extraOptions = [ "--cap-add=net_admin" @@ -119,26 +88,16 @@ ]; }; systemd.services."podman-bandwidth-ts" = { - serviceConfig = { - Restart = lib.mkOverride 500 "no"; - }; - after = [ - "podman-network-tstest-default.service" - ]; - requires = [ - "podman-network-tstest-default.service" - ]; - partOf = [ - "podman-compose-tstest-root.target" - ]; - wantedBy = [ - "podman-compose-tstest-root.target" - ]; + serviceConfig = { Restart = lib.mkOverride 500 "no"; }; + after = [ "podman-network-tstest-default.service" ]; + requires = [ "podman-network-tstest-default.service" ]; + partOf = [ "podman-compose-tstest-root.target" ]; + wantedBy = [ "podman-compose-tstest-root.target" ]; }; # Networks systemd.services."podman-network-tstest-default" = { - path = [pkgs.podman]; + path = [ pkgs.podman ]; serviceConfig = { Type = "oneshot"; RemainAfterExit = true; @@ -147,17 +106,15 @@ script = '' podman network inspect tstest-default || podman network create tstest-default --opt isolate=true ''; - partOf = ["podman-compose-tstest-root.target"]; - wantedBy = ["podman-compose-tstest-root.target"]; + partOf = [ "podman-compose-tstest-root.target" ]; + wantedBy = [ "podman-compose-tstest-root.target" ]; }; # Root service # When started, this will automatically create all resources and start # the containers. When stopped, this will teardown all resources. systemd.targets."podman-compose-tstest-root" = { - unitConfig = { - Description = "Root target generated by compose2nix."; - }; - wantedBy = ["multi-user.target"]; + unitConfig = { Description = "Root target generated by compose2nix."; }; + wantedBy = [ "multi-user.target" ]; }; } diff --git a/hosts/harper/default.nix b/hosts/harper/default.nix index bccff60..bc29122 100644 --- a/hosts/harper/default.nix +++ b/hosts/harper/default.nix @@ -1,14 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./hardware-configuration.nix - ../../server - ]; +{ inputs, outputs, lib, config, pkgs, ... }: { + imports = [ ./hardware-configuration.nix ../../server ]; networking.hostName = "harper"; } diff --git a/hosts/harper2/default.nix b/hosts/harper2/default.nix index e142e2a..261b417 100644 --- a/hosts/harper2/default.nix +++ b/hosts/harper2/default.nix @@ -1,14 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./hardware-configuration.nix - ../../server - ]; +{ inputs, outputs, lib, config, pkgs, ... }: { + imports = [ ./hardware-configuration.nix ../../server ]; networking.hostName = "harper2"; } diff --git a/hosts/loki/colmena.nix b/hosts/loki/colmena.nix index 0f9cb0a..faa6d1f 100644 --- a/hosts/loki/colmena.nix +++ b/hosts/loki/colmena.nix @@ -1,17 +1,8 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./default.nix - ]; - boot.binfmt.emulatedSystems = ["aarch64-linux"]; +{ inputs, outputs, lib, config, pkgs, ... }: { + imports = [ ./default.nix ]; + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; deployment = { - tags = ["workstation" "intel"]; + tags = [ "workstation" "intel" ]; allowLocalDeployment = true; }; } diff --git a/hosts/loki/default.nix b/hosts/loki/default.nix index 88ec6db..9d9d575 100644 --- a/hosts/loki/default.nix +++ b/hosts/loki/default.nix @@ -1,11 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { +{ inputs, outputs, lib, config, pkgs, ... }: { imports = [ inputs.nixos-hardware.nixosModules.dell-xps-13-9310 ./hardware-configuration.nix diff --git a/hosts/loki/hardware-configuration.nix b/hosts/loki/hardware-configuration.nix index e29db33..baa9755 100644 --- a/hosts/loki/hardware-configuration.nix +++ b/hosts/loki/hardware-configuration.nix @@ -1,28 +1,14 @@ # 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") - ]; +{ config, lib, pkgs, modulesPath, ... }: { + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ - "xhci_pci" - "thunderbolt" - "nvme" - "uas" - "sd_mod" - "rtsx_pci_sdmmc" - ]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = + [ "xhci_pci" "thunderbolt" "nvme" "uas" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; fileSystems."/" = { device = "/dev/nvme0n1p2"; @@ -47,5 +33,6 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/loki/kernel.nix b/hosts/loki/kernel.nix index 0cf0bcc..24153cb 100644 --- a/hosts/loki/kernel.nix +++ b/hosts/loki/kernel.nix @@ -1,10 +1 @@ -{ - config, - pkgs, - ... -}: { - boot.kernelModules = [ - "axge" - "ax88179_178a" - ]; -} +{ config, pkgs, ... }: { boot.kernelModules = [ "axge" "ax88179_178a" ]; } diff --git a/hosts/nuwww/default.nix b/hosts/nuwww/default.nix index 596607f..20852f5 100644 --- a/hosts/nuwww/default.nix +++ b/hosts/nuwww/default.nix @@ -1,14 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./hardware-configuration.nix - ../../server - ]; +{ inputs, outputs, lib, config, pkgs, ... }: { + imports = [ ./hardware-configuration.nix ../../server ]; networking.hostName = "nuwww"; } diff --git a/hosts/pi1/colmena.nix b/hosts/pi1/colmena.nix index 871d67b..76778bf 100644 --- a/hosts/pi1/colmena.nix +++ b/hosts/pi1/colmena.nix @@ -1,16 +1,7 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./default.nix - ]; +{ inputs, outputs, lib, config, pkgs, ... }: { + imports = [ ./default.nix ]; deployment = { targetHost = "nixos"; - tags = ["arm"]; + tags = [ "arm" ]; }; } diff --git a/hosts/pi1/default.nix b/hosts/pi1/default.nix index 170b22d..29ccbea 100644 --- a/hosts/pi1/default.nix +++ b/hosts/pi1/default.nix @@ -1,14 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./hardware-configuration.nix - ../server - ]; +{ inputs, outputs, lib, config, pkgs, ... }: { + imports = [ ./hardware-configuration.nix ../server ]; networking.hostName = "pi1"; } diff --git a/hosts/pi1/hardware-configuration.nix b/hosts/pi1/hardware-configuration.nix index 161d1ec..efe148e 100644 --- a/hosts/pi1/hardware-configuration.nix +++ b/hosts/pi1/hardware-configuration.nix @@ -1,21 +1,13 @@ # 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") - ]; +{ config, lib, pkgs, modulesPath, ... }: { + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = []; - boot.initrd.kernelModules = []; - boot.kernelModules = []; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = [ ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; boot.loader.grub.enable = false; boot.loader.generic-extlinux-compatible.enable = true; @@ -24,7 +16,7 @@ fsType = "ext4"; }; - swapDevices = []; + 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 diff --git a/hosts/pihole/default.nix b/hosts/pihole/default.nix index e33d4a0..e595ddf 100644 --- a/hosts/pihole/default.nix +++ b/hosts/pihole/default.nix @@ -1,14 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./hardware-configuration.nix - ../../server - ]; +{ inputs, outputs, lib, config, pkgs, ... }: { + imports = [ ./hardware-configuration.nix ../../server ]; networking.hostName = "pihole"; } diff --git a/hosts/pocket2/colmena.nix b/hosts/pocket2/colmena.nix index 32686b8..d20e9c2 100644 --- a/hosts/pocket2/colmena.nix +++ b/hosts/pocket2/colmena.nix @@ -1,15 +1,4 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./default.nix - ]; - deployment = { - tags = ["intel"]; - }; +{ inputs, outputs, lib, config, pkgs, ... }: { + imports = [ ./default.nix ]; + deployment = { tags = [ "intel" ]; }; } diff --git a/hosts/pocket2/default.nix b/hosts/pocket2/default.nix index 3fbab61..6fca297 100644 --- a/hosts/pocket2/default.nix +++ b/hosts/pocket2/default.nix @@ -1,9 +1,4 @@ -{ - inputs, - config, - pkgs, - ... -}: { +{ inputs, config, pkgs, ... }: { imports = [ ./hardware-configuration.nix inputs.nixos-hardware.nixosModules.common-cpu-intel diff --git a/hosts/pocket2/hardware-configuration.nix b/hosts/pocket2/hardware-configuration.nix index 5315fc3..ce5b20b 100644 --- a/hosts/pocket2/hardware-configuration.nix +++ b/hosts/pocket2/hardware-configuration.nix @@ -1,27 +1,14 @@ # 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") - ]; +{ config, lib, pkgs, modulesPath, ... }: { + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ - "xhci_pci" - "usb_storage" - "usbhid" - "sd_mod" - "sdhci_pci" - ]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = + [ "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; fileSystems."/" = { device = "/dev/disk/by-uuid/90189466-8309-4b46-befe-cf476b8a7dd7"; @@ -43,5 +30,6 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/server/default.nix b/hosts/server/default.nix index b6ce044..10cc8ef 100644 --- a/hosts/server/default.nix +++ b/hosts/server/default.nix @@ -1,11 +1,5 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: let +{ inputs, outputs, lib, config, pkgs, ... }: +let my-python-packages = python-packages: with python-packages; [ pip @@ -18,16 +12,10 @@ in { nix = { settings = { - experimental-features = [ - "nix-command" - "flakes" - ]; + experimental-features = [ "nix-command" "flakes" ]; warn-dirty = false; auto-optimise-store = true; - trusted-users = [ - "root" - "don" - ]; + trusted-users = [ "root" "don" ]; }; gc = { automatic = true; @@ -35,12 +23,7 @@ in { options = "--delete-older-than 7d"; }; }; - imports = [ - ../../home - ./systemd.nix - ./tailscale.nix - ./upgrade-diff.nix - ]; + imports = [ ../../home ./systemd.nix ./tailscale.nix ./upgrade-diff.nix ]; # Enable networking networking.networkmanager.enable = true; @@ -59,17 +42,14 @@ in { inputMethod = { enable = true; type = "fcitx5"; - fcitx5.addons = with pkgs; [ - fcitx5-mozc - fcitx5-gtk - ]; + fcitx5.addons = with pkgs; [ fcitx5-mozc fcitx5-gtk ]; }; }; # Bootloader. boot = { kernelPackages = pkgs.linuxPackages_latest; - kernelParams = ["consoleblank=60"]; + kernelParams = [ "consoleblank=60" ]; #loader = { #systemd-boot = { #enable = true; @@ -79,53 +59,33 @@ in { #efiSysMountPoint = "/boot"; #}; #}; - plymouth = { - enable = true; - }; - kernel = { - sysctl = { - "vm.swappiness" = 10; - }; - }; + plymouth = { enable = true; }; + kernel = { sysctl = { "vm.swappiness" = 10; }; }; }; security = { - polkit = { - enable = true; - }; + polkit = { enable = true; }; sudo.enable = false; doas = { enable = true; - extraRules = [ - { - users = ["don"]; - keepEnv = true; - noPass = true; - } - ]; + extraRules = [{ + users = [ "don" ]; + keepEnv = true; + noPass = true; + }]; }; }; services = { - pcscd = { - enable = true; - }; + pcscd = { enable = true; }; avahi = { enable = true; nssmdns4 = true; }; - printing = { - enable = true; - }; - udisks2 = { - enable = true; - }; - nscd = { - enableNsncd = true; - }; - tailscale = { - enable = true; - }; + printing = { enable = true; }; + udisks2 = { enable = true; }; + nscd = { enableNsncd = true; }; + tailscale = { enable = true; }; locate = { enable = true; package = pkgs.mlocate; @@ -206,12 +166,8 @@ in { ]; programs = { - dconf = { - enable = true; - }; - mtr = { - enable = true; - }; + dconf = { enable = true; }; + mtr = { enable = true; }; gnupg = { agent = { enable = true; @@ -223,9 +179,7 @@ in { nixpkgs.overlays = [ (final: super: { - khal = super.khal.overridePythonAttrs (_: { - doCheck = false; - }); + khal = super.khal.overridePythonAttrs (_: { doCheck = false; }); }) ]; @@ -233,45 +187,33 @@ in { networking.firewall = { enable = true; # always allow traffic from your Tailscale network - trustedInterfaces = ["tailscale0"]; + trustedInterfaces = [ "tailscale0" ]; checkReversePath = "loose"; # allow the Tailscale UDP port through the firewall - allowedUDPPorts = [config.services.tailscale.port]; - allowedTCPPortRanges = [ - { - from = 1714; - to = 1764; - } - ]; - allowedUDPPortRanges = [ - { - from = 1714; - to = 1764; - } - ]; + allowedUDPPorts = [ config.services.tailscale.port ]; + allowedTCPPortRanges = [{ + from = 1714; + to = 1764; + }]; + allowedUDPPortRanges = [{ + from = 1714; + to = 1764; + }]; # allow you to SSH in over the public internet - allowedTCPPorts = [22]; + allowedTCPPorts = [ 22 ]; interfaces = { "tailscale0" = { - allowedTCPPorts = [ - 22 - 8080 - 8443 - ]; - allowedTCPPortRanges = [ - { - from = 1714; - to = 1764; - } - ]; - allowedUDPPortRanges = [ - { - from = 1714; - to = 1764; - } - ]; + allowedTCPPorts = [ 22 8080 8443 ]; + allowedTCPPortRanges = [{ + from = 1714; + to = 1764; + }]; + allowedUDPPortRanges = [{ + from = 1714; + to = 1764; + }]; }; }; }; diff --git a/hosts/server/searxng.nix b/hosts/server/searxng.nix index 5ba687d..e34baaa 100644 --- a/hosts/server/searxng.nix +++ b/hosts/server/searxng.nix @@ -1,11 +1,5 @@ -{ - pkgs, - config, - ... -}: { - environment.systemPackages = with pkgs; [ - searxng - ]; +{ pkgs, config, ... }: { + environment.systemPackages = with pkgs; [ searxng ]; services.searx = { enable = true; settings = { diff --git a/hosts/server/systemd.nix b/hosts/server/systemd.nix index e692bfd..c28077e 100644 --- a/hosts/server/systemd.nix +++ b/hosts/server/systemd.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let readlink = "${pkgs.coreutils}/bin/readlink"; notify-send = "${pkgs.libnotify}/bin/notify-send"; in { @@ -6,7 +7,7 @@ in { services = { clean-keychain = { description = "Clean up .keychain on boot"; - wantedBy = ["multi-user.target"]; + wantedBy = [ "multi-user.target" ]; serviceConfig = { Type = "oneshot"; ExecStart = "${pkgs.coreutils-full}/bin/rm -rf /home/don/.keychain"; @@ -26,15 +27,13 @@ in { ${notify-send} --urgency=low --icon=system-reboot "Reboot is needed for a NixOS upgrade." fi ''; - serviceConfig = { - Type = "oneshot"; - }; + serviceConfig = { Type = "oneshot"; }; }; }; timers = { detect-reboot-for-upgrade = { - wantedBy = ["timers.target"]; - partOf = ["detect-reboot-for-upgrade.service"]; + wantedBy = [ "timers.target" ]; + partOf = [ "detect-reboot-for-upgrade.service" ]; timerConfig = { OnCalendar = "hourly"; Unit = "detect-reboot-for-upgrade.service"; diff --git a/hosts/server/tailscale.nix b/hosts/server/tailscale.nix index 9baf2edfe99b997c6501e01294ddae339e36f861..7b0407ae52b0f758d25160f1283e2da7cac5fd1d 100644 GIT binary patch literal 1103 zcmV-V1hD%6M@dveQdv+`0IBmh1Y+&A3^G6_oQQIcu=;W3xPiC#*F}z%1Lv1kb^u4H zQs&Z|rpJBWHs|cwgl(BQRQ5*Wk+yzKb?vT4*T$4n9x%eBG_=6vh#eM=fHR-X1++mv zi!wzHYTAsfo~yXp*8nLmz74M@-RhMTRrKRmzNBb+8qNtVzPEf3hsYm^eqwtzp*G4w z)f}?Oq|SBi$uF^{mLG}l)POB&;g9FE0y-i%r(s!_h&pe+e2iWzV~t6IfI6Qi5`3r2 z-fnux7gBWCulBX!YQlq@3ll=rD2Lldbq7FK7mg~2&ya4Opp1Kv#|nfYGLwxn1tpq* zJx|1n>)vi(SqdbF-(|~n@$!CL0w3wJnswe>#@j( zicsapo>Y<~e-uJKXrhUtu~WzHNsGz7s9r5HK;9J4wIua((%$i?<2_jJiwvjE3APY& znJMtDEY-pSkRl+5Y$}5b`jobdw17`%%(Qj!9QL;&jC)OidW}4e1E+R#39!c|G@d@d zoKc=4ntS&T^dtk6P$D1>upbpCl4{~>>rIl~50DL!h?7ddgd|8^)9?F%YP=x|r?lXW zaM%cJU^EH(lXaXe1JCYILQLI5k1qZj`Yn*xwtUoQQebaQJad5veV%q#`2XBPUq#=Z z4^R6y(qXf!*Q%@B?d9~LgI(Z59w5h=!XTQ2fmE`3P`a4ncp&B!&WjW5n&8W)K&~y}2vypoF&dAN;Ti zsS?*0*)6q+78y9k3Nd~1Z4eAieu-8DM0FX2`oxTLY|SDI(NGGjH$R$R+>YLxI5y&2 zyNg^0PZa{&@LPwAY?;_t?TsS@2^%^qVv587Ht!O{<~x2fYDeCPkz2jnOB`Xnu4rMz zLnyWI=^6v+ZH?`q7$ix>1cw?ckoY9hM=FB5bak@Fw+B#w+g-H;-p(({ku}tfG VQvdbqR*;KVBDh8!ksZnB$l$Pt})PTMhOB;@1Y#dwHZJ4?dM^8Mr(3@U@f%v zghriD)#8l78DgLN$$^`megDv5wluuoWydi_!10$#c`r0#YvQwrNlD3UWtDn4BIFT5 zGmyZDOy?>N2A~&@d9q;&vu)!>-OrCcEUSBP$PW|G&M{lo#Hsj#BkZha0q2wG5Y%q( z|6H7sn|ZA4sUvZFd}8~%eu{$FF&L&ulrHi+3ya(NcfPY`NRUif8U0_pJn$-c9x; zwgx23Wa9XB?YU-}sw|5X_w6+>+x4eOpT#hl8nIW^IZSuG6crWU z&dm=RPTBw=W5+EcA0OLJFqghzgPUs{Ci&$FdCGwOhU{vhL@nCyL`RC^@3!iEcG~HE#o~*cSKxT}e0Qo?=$QtCmZzrR4e+T{1r( zNF7W0a$2&GAuj|>iI)Mib6=&bJlBs^BO?~RUo}lg>zYc5Szt}JGF*#lylrz}T<2g~K=W;^QO(N(DDT|HB0$$6lw)>&kM*WO(l5@(|Bm+O z6JuLxSPBbw>A+UW<>qz9CBL3FG)_$T0`mlLX*%oHSr+ekBiU_#jzWpQN~hzRzLd+d z%!I+Yiv=F96{rMM1Vn)vi(SqdbF-(|~n@$!CL0w3wJnswe>#@j( zicsapo>Y<~e-uJKXrhUtu~WzHNsGz7s9r5HK;9J4wIua((%$i?<2_jJiwvjE3APY& znJMtDEY-pSkRl+5Y$}5b`jobdw17`%%(Qj!9QL;&jC)OidW}4e1E+R#39!c|G@d@d zoKc=4ntS&T^dtk6P$D1>upbpCl4{~>>rIl~50DL!h?7ddgd|8^)9?F%YP=x|r?lXW zaM%cJU^EH(lXaXe1JCYILQLI5k1qZj`Yn*xwtUoQQebaQJad5veV%q#`2XBPUq#=Z z4^R6y(qXf!*Q%@B?d9~LgI(Z59w5h=!XTQ2fmE`3P`a4ncp&B!&WjW5n&8W)K&~y}2vypoF&dAN;Ti zsS?*0*)6q+78y9k3Nd~1Z4eAieu-8DM0FX2`oxTLY|SDI(NGGjH$R$R+>YLxI5y&2 zyNg^0PZa{&@LPwAY?;_t?TsS@2^%^qVv587Ht!O{<~x2fYDeCPkz2jnOB`Xnu4rMz zLnyWI=^6v+ZH?`q7$ix>1cw?ckoY9hM=FB5bak@Fw+B#w+g-H;-p(({ku}tfG VQvdbqR*;KVBDh8!ksZnB$l$Pt})PTMhOB;@1Y#dwHZJ4?dM^8Mr(3@U@f%v zghriD)#8l78DgLN$$^`megDv5wluuoWydi_!10$#c`r0#YvQwrNlD3UWtDn4BIFT5 zGmyZDOy?>N2A~&@d9q;&vu)!>-OrCcEUSBP$PW|G&M{lo#Hsj#BkZha0q2wG5Y%q( z|6H7sn|ZA4sUvZFd}8~%eu{$FF&L&ulrHi+3ya(NcfPY`NRUif8U0_pJn$-c9x; zwgx23Wa9XB?YU-}sw|5X_w6+>+x4eOpT#hl8nIW^IZSuG6crWU z&dm=RPTBw=W5+EcA0OLJFqghzgPUs{Ci&$FdCGwOhU{vhL@nCyL`RC^@3!iEcG~HE#o~*cSKxT}e0Qo?=$QtCmZzrR4e+T{1r( zNF7W0a$2&GAuj|>iI)Mib6=&bJlBs^BO?~RUo}lg>zYc5Szt}JGF*#lylrz}T<2g~K=W;^QO(N(DDT|HB0$$6lw)>&kM*WO(l5@(|Bm+O z6JuLxSPBbw>A+UW<>qz9CBL3FG)_$T0`mlLX*%oHSr+ekBiU_#jzWpQN~hzRzLd+d z%!I+Yiv=F96{rMM1Vn diff --git a/nixos-anywhere/configuration-vm.nix b/nixos-anywhere/configuration-vm.nix index 94f95e7..2b609d8 100644 --- a/nixos-anywhere/configuration-vm.nix +++ b/nixos-anywhere/configuration-vm.nix @@ -1,10 +1,4 @@ -{ - modulesPath, - config, - lib, - pkgs, - ... -}: { +{ modulesPath, config, lib, pkgs, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix") @@ -12,13 +6,12 @@ ]; boot = { kernelPackages = pkgs.linuxPackages_latest; - kernelParams = ["consoleblank=60"]; + kernelParams = [ "consoleblank=60" ]; loader = { timeout = 10; - /* - systemd-boot = { - enable = true; - }; + /* systemd-boot = { + enable = true; + }; */ grub = { device = "nodev"; @@ -35,17 +28,12 @@ enable = true; theme = "breeze"; }; - kernel = { - sysctl = {"vm.swappiness" = 10;}; - }; + kernel = { sysctl = { "vm.swappiness" = 10; }; }; }; services.openssh.enable = true; - environment.systemPackages = map lib.lowPrio [ - pkgs.curl - pkgs.git - pkgs.git-crypt - ]; + environment.systemPackages = + map lib.lowPrio [ pkgs.curl pkgs.git pkgs.git-crypt ]; users.users.root = { initialPassword = "changeme"; diff --git a/nixos-anywhere/configuration-vps.nix b/nixos-anywhere/configuration-vps.nix index 99134ce..06baf59 100644 --- a/nixos-anywhere/configuration-vps.nix +++ b/nixos-anywhere/configuration-vps.nix @@ -1,10 +1,4 @@ -{ - modulesPath, - config, - lib, - pkgs, - ... -}: { +{ modulesPath, config, lib, pkgs, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix") @@ -12,13 +6,12 @@ ]; boot = { kernelPackages = pkgs.linuxPackages_latest; - kernelParams = ["consoleblank=60"]; + kernelParams = [ "consoleblank=60" ]; loader = { timeout = 10; - /* - systemd-boot = { - enable = true; - }; + /* systemd-boot = { + enable = true; + }; */ grub = { device = "nodev"; @@ -35,17 +28,12 @@ enable = true; theme = "breeze"; }; - kernel = { - sysctl = {"vm.swappiness" = 10;}; - }; + kernel = { sysctl = { "vm.swappiness" = 10; }; }; }; services.openssh.enable = true; - environment.systemPackages = map lib.lowPrio [ - pkgs.curl - pkgs.git - pkgs.git-crypt - ]; + environment.systemPackages = + map lib.lowPrio [ pkgs.curl pkgs.git pkgs.git-crypt ]; users.users.root = { initialPassword = "changeme"; diff --git a/nixos-anywhere/configuration.nix b/nixos-anywhere/configuration.nix index 944ffbf..c1de310 100644 --- a/nixos-anywhere/configuration.nix +++ b/nixos-anywhere/configuration.nix @@ -1,10 +1,4 @@ -{ - modulesPath, - config, - lib, - pkgs, - ... -}: { +{ modulesPath, config, lib, pkgs, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix") @@ -39,41 +33,27 @@ # }; boot = { kernelPackages = pkgs.linuxPackages_latest; - kernelParams = ["consoleblank=60"]; + kernelParams = [ "consoleblank=60" ]; # extraModulePackages = [config.boot.kernelPackages.ddcci-driver]; # kernelModules = ["i2c-dev" "ddcci_backlight"]; - loader = - if (pkgs.hostPlatform != lib.mkDefault "aarch64-linux") - then { - systemd-boot = { - enable = true; - }; - efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot"; - }; - } - else { - grub.enable = false; - generic-extlinux-compatible.enable = true; - }; - plymouth = { - enable = true; - }; - kernel = { - sysctl = { - "vm.swappiness" = 10; + loader = if (pkgs.hostPlatform != lib.mkDefault "aarch64-linux") then { + systemd-boot = { enable = true; }; + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot"; }; + } else { + grub.enable = false; + generic-extlinux-compatible.enable = true; }; + plymouth = { enable = true; }; + kernel = { sysctl = { "vm.swappiness" = 10; }; }; }; services.openssh.enable = true; - environment.systemPackages = map lib.lowPrio [ - pkgs.curl - pkgs.git - pkgs.git-crypt - ]; + environment.systemPackages = + map lib.lowPrio [ pkgs.curl pkgs.git pkgs.git-crypt ]; users.users.root = { initialPassword = "changeme"; diff --git a/nixos-anywhere/disk-config-vm.nix b/nixos-anywhere/disk-config-vm.nix index fda4c63..c6301b3 100644 --- a/nixos-anywhere/disk-config-vm.nix +++ b/nixos-anywhere/disk-config-vm.nix @@ -1,5 +1,5 @@ # Example to create a bios compatible gpt partition -{lib, ...}: { +{ lib, ... }: { disko.devices = { disk.disk1 = { device = lib.mkDefault "/dev/vda"; @@ -43,9 +43,7 @@ type = "filesystem"; format = "ext4"; mountpoint = "/"; - mountOptions = [ - "defaults" - ]; + mountOptions = [ "defaults" ]; }; }; }; diff --git a/nixos-anywhere/disk-config-vps.nix b/nixos-anywhere/disk-config-vps.nix index c72a8d4..d50a504 100644 --- a/nixos-anywhere/disk-config-vps.nix +++ b/nixos-anywhere/disk-config-vps.nix @@ -1,5 +1,5 @@ # Example to create a bios compatible gpt partition -{lib, ...}: { +{ lib, ... }: { disko.devices = { disk.disk1 = { device = lib.mkDefault "/dev/sda"; @@ -43,9 +43,7 @@ type = "filesystem"; format = "ext4"; mountpoint = "/"; - mountOptions = [ - "defaults" - ]; + mountOptions = [ "defaults" ]; }; }; }; diff --git a/nixos-anywhere/disk-config.nix b/nixos-anywhere/disk-config.nix index c72a8d4..d50a504 100644 --- a/nixos-anywhere/disk-config.nix +++ b/nixos-anywhere/disk-config.nix @@ -1,5 +1,5 @@ # Example to create a bios compatible gpt partition -{lib, ...}: { +{ lib, ... }: { disko.devices = { disk.disk1 = { device = lib.mkDefault "/dev/sda"; @@ -43,9 +43,7 @@ type = "filesystem"; format = "ext4"; mountpoint = "/"; - mountOptions = [ - "defaults" - ]; + mountOptions = [ "defaults" ]; }; }; }; diff --git a/nixos-anywhere/flake.nix b/nixos-anywhere/flake.nix index b2fb390..4ace001 100644 --- a/nixos-anywhere/flake.nix +++ b/nixos-anywhere/flake.nix @@ -3,31 +3,18 @@ inputs.disko.url = "github:nix-community/disko"; inputs.disko.inputs.nixpkgs.follows = "nixpkgs"; - outputs = { - nixpkgs, - disko, - ... - }: { + outputs = { nixpkgs, disko, ... }: { nixosConfigurations.smaug = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ - disko.nixosModules.disko - ./configuration.nix - ]; + modules = [ disko.nixosModules.disko ./configuration.nix ]; }; nixosConfigurations.vm = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ - disko.nixosModules.disko - ./configuration-vm.nix - ]; + modules = [ disko.nixosModules.disko ./configuration-vm.nix ]; }; nixosConfigurations.w2 = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ - disko.nixosModules.disko - ./configuration-vps.nix - ]; + modules = [ disko.nixosModules.disko ./configuration-vps.nix ]; }; }; }