From 79b1d22cc9eb3752ae798d5ca9e6eeefeb86799e Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 23 Jan 2023 15:44:04 -0500 Subject: chore: general cleanup + use `with` less --- .editorconfig | 2 +- hosts/common/default.nix | 1 + hosts/common/locale.nix | 13 +++++++++++++ hosts/common/security.nix | 4 +--- hosts/common/users.nix | 11 ++++------- users/seth/options.nix | 9 ++++----- users/seth/programs/mangohud/MangoHud/MangoHud.conf | 9 --------- users/seth/programs/mangohud/config/MangoHud.conf | 9 +++++++++ users/seth/programs/mangohud/default.nix | 4 ++-- users/seth/programs/npm.nix | 2 +- users/seth/programs/vim.nix | 6 +----- users/seth/shell/bash.nix | 7 ------- users/seth/shell/default.nix | 1 + 13 files changed, 38 insertions(+), 40 deletions(-) create mode 100644 hosts/common/locale.nix delete mode 100644 users/seth/programs/mangohud/MangoHud/MangoHud.conf create mode 100644 users/seth/programs/mangohud/config/MangoHud.conf diff --git a/.editorconfig b/.editorconfig index 813647e..f81219a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,6 +2,6 @@ root = true [*] charset = utf-8 -end_of_line = "lf" +end_of_line = 'lf' indent_style = tab insert_file_newline = true diff --git a/hosts/common/default.nix b/hosts/common/default.nix index 32dad83..9793191 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -2,5 +2,6 @@ imports = [ ./security.nix ./users.nix + ./locale.nix ]; } diff --git a/hosts/common/locale.nix b/hosts/common/locale.nix new file mode 100644 index 0000000..2699b3b --- /dev/null +++ b/hosts/common/locale.nix @@ -0,0 +1,13 @@ +{config, ...}: { + i18n = { + defaultLocale = "en_US.UTF-8"; + extraLocaleSettings = { + LC_MESSAGES = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + }; + + time = { + timeZone = "America/New_York"; + }; +} diff --git a/hosts/common/security.nix b/hosts/common/security.nix index 2d473be..a0825e7 100644 --- a/hosts/common/security.nix +++ b/hosts/common/security.nix @@ -2,9 +2,7 @@ lib, config, ... -}: -with builtins; -with lib; { +}: { security.sudo = { configFile = '' Defaults env_reset diff --git a/hosts/common/users.nix b/hosts/common/users.nix index 0d2681e..e2e845e 100644 --- a/hosts/common/users.nix +++ b/hosts/common/users.nix @@ -3,20 +3,17 @@ lib, pkgs, ... -}: -with config; -with lib; -with pkgs; { +}: { users = { - defaultUserShell = bash; + defaultUserShell = pkgs.bash; mutableUsers = false; users = { root = { home = "/root"; - uid = ids.uids.root; + uid = config.ids.uids.root; group = "root"; - initialHashedPassword = mkDefault "!"; + initialHashedPassword = lib.mkDefault "!"; }; }; }; diff --git a/users/seth/options.nix b/users/seth/options.nix index b073e78..f0bf636 100644 --- a/users/seth/options.nix +++ b/users/seth/options.nix @@ -2,15 +2,14 @@ config, lib, ... -}: -with lib; { - options.seth = with types; { - devel-packages = mkOption { +}: { + options.seth = with lib.types; { + devel-packages = lib.mkOption { type = bool; default = false; description = "install development packages for neovim lsp"; }; - gui-stuff = mkOption { + gui-stuff = lib.mkOption { type = bool; default = false; description = "install gui-related packages"; diff --git a/users/seth/programs/mangohud/MangoHud/MangoHud.conf b/users/seth/programs/mangohud/MangoHud/MangoHud.conf deleted file mode 100644 index 8e02a99..0000000 --- a/users/seth/programs/mangohud/MangoHud/MangoHud.conf +++ /dev/null @@ -1,9 +0,0 @@ -legacy_layout=false -cpu_stats -cpu_temp -gpu_stats -gpu_temp -fps -frametime -media_player -media_player_name = spotify diff --git a/users/seth/programs/mangohud/config/MangoHud.conf b/users/seth/programs/mangohud/config/MangoHud.conf new file mode 100644 index 0000000..8e02a99 --- /dev/null +++ b/users/seth/programs/mangohud/config/MangoHud.conf @@ -0,0 +1,9 @@ +legacy_layout=false +cpu_stats +cpu_temp +gpu_stats +gpu_temp +fps +frametime +media_player +media_player_name = spotify diff --git a/users/seth/programs/mangohud/default.nix b/users/seth/programs/mangohud/default.nix index 389256b..24b50f1 100644 --- a/users/seth/programs/mangohud/default.nix +++ b/users/seth/programs/mangohud/default.nix @@ -7,8 +7,8 @@ pkgs.mangohud ]; - xdg.configFile."MangoHud" = { - source = ./MangoHud; + xdg.configFile.MangoHud = { + source = ./config; recursive = true; }; } diff --git a/users/seth/programs/npm.nix b/users/seth/programs/npm.nix index 91eef83..07f7037 100644 --- a/users/seth/programs/npm.nix +++ b/users/seth/programs/npm.nix @@ -1,5 +1,5 @@ {config, ...}: { - config.programs.npm = { + programs.npm = { enable = true; npmrc = '' prefix=${config.xdg.dataHome}/npm diff --git a/users/seth/programs/vim.nix b/users/seth/programs/vim.nix index 31c9225..7bc115a 100644 --- a/users/seth/programs/vim.nix +++ b/users/seth/programs/vim.nix @@ -1,8 +1,4 @@ -{ - config, - nix, - ... -}: { +{config, ...}: { programs.vim = { enable = true; settings = { diff --git a/users/seth/shell/bash.nix b/users/seth/shell/bash.nix index c66e6a0..18167a4 100644 --- a/users/seth/shell/bash.nix +++ b/users/seth/shell/bash.nix @@ -5,13 +5,6 @@ }: { programs.bash = { enable = true; - bashrcExtra = '' - # drop into fish - if [[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z $BASH_EXECUTION_STRING ]] - then - exec fish - fi - ''; historyFile = "${config.xdg.stateHome}/bash/history"; historyFileSize = 1000; historySize = 100; diff --git a/users/seth/shell/default.nix b/users/seth/shell/default.nix index 088feec..993835b 100644 --- a/users/seth/shell/default.nix +++ b/users/seth/shell/default.nix @@ -20,5 +20,6 @@ home.shellAliases = { ls = "exa --icons"; + diff = "diff --color=auto"; }; } -- cgit v1.2.3