diff options
author | polwex <polwex@sortug.com> | 2025-02-21 17:50:41 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-02-21 17:50:41 +0700 |
commit | 02ea8a3dd32173351206c2c9b2aaa458904e8966 (patch) | |
tree | 105e3446c34b063b8ad0080b71c4678346f9962d /hosts | |
parent | 266bcb770323b5d461347fbdc83e43296cb18d34 (diff) |
m
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/base.nix | 21 | ||||
-rw-r--r-- | hosts/pkgs.nix | 169 | ||||
-rw-r--r-- | hosts/users.nix | 48 |
3 files changed, 128 insertions, 110 deletions
diff --git a/hosts/base.nix b/hosts/base.nix index aea25e9..e8de7d8 100644 --- a/hosts/base.nix +++ b/hosts/base.nix @@ -2,11 +2,22 @@ # fucking linux vulnerability # enable flakes nix = { - gc = { - automatic = true; - interval = {Weekday = 0; Hour = 20; Minute = 0;}; - options = "--delete-older-than 7d"; - }; + gc = + { + automatic = true; + options = "--delete-older-than 7d"; + } + // ( + if pkgs.stdenv.isDarwin + then { + interval = { + Weekday = 0; + Hour = 20; + Minute = 0; + }; + } + else {dates = "weekly";} + ); # package = pkgs.nixFlakes; extraOptions = '' experimental-features = nix-command flakes diff --git a/hosts/pkgs.nix b/hosts/pkgs.nix index 2f55c40..bbd7a35 100644 --- a/hosts/pkgs.nix +++ b/hosts/pkgs.nix @@ -4,71 +4,73 @@ lib, ... }: { - environment.systemPackages = with pkgs; [ - # networking - minio - minio-client - curlFull - wget - deluge - autossh - sshfs - # terminal basics + environment.systemPackages = with pkgs; + [ + # networking + minio + minio-client + curlFull + wget + deluge + autossh + sshfs + # terminal basics - htop - rlwrap - bat - gitAndTools.gitFull - lazygit - git-lfs - lsd - lsof - tmux - tmate - jq - vifm - killall - tree - qrcp - edir - bottom - pigz - rclone - # files/disk - nnn - ranger - ripgrep - fzf - ncdu - zip - unzip - - # images - imagemagick - # nix - nil - alejandra - #nixfmt - direnv - nix-direnv - devenv - #inputs.devenv.packages.${pkgs.system}.default - # scraping - python312Packages.yt-dlp - # markdown lsp - marksman - # disk automount - #crypto - # electrum - # yacreader - superhtml + htop + rlwrap + bat + gitAndTools.gitFull + lazygit + git-lfs + lsd + lsof + tmux + tmate + jq + vifm + killall + tree + qrcp + edir + bottom + pigz + rclone + # files/disk + nnn + ranger + ripgrep + fzf + ncdu + zip + unzip - # ai stuff! - # aider-chat - # yek - # python312Packages.google-generativeai - ] ++ lib.optionals pkgs.stdenv.isLinux [ - # linuxKernel.packages.linux_latest_libre.cpupower + # images + imagemagick + # nix + nil + alejandra + #nixfmt + direnv + nix-direnv + devenv + #inputs.devenv.packages.${pkgs.system}.default + # scraping + python312Packages.yt-dlp + # markdown lsp + marksman + # disk automount + #crypto + # electrum + # yacreader + superhtml + + # ai stuff! + # aider-chat + # yek + # python312Packages.google-generativeai + ] + ++ lib.optionals pkgs.stdenv.isLinux [ + # linuxKernel.packages.linux_latest_libre.cpupower gparted moreutils busybox @@ -77,24 +79,25 @@ #hardware problems lm_sensors linuxKernel.packages.linux_hardened.cpupower - nethogs - #networking - # images - sxiv - # audio debug - alsa-firmware - # wine - appimage-run - # disk automount - udiskie - # /mac - ] ++ lib.optionals pkgs.stdenv.isDarwin [ - # mostly for mcp stuff - nodejs - node2nix - zig - gcc - gnumake - bun - ]; + nethogs + #networking + # images + sxiv + # audio debug + alsa-firmware + # wine + appimage-run + # disk automount + udiskie + # /mac + ] + ++ lib.optionals pkgs.stdenv.isDarwin [ + # mostly for mcp stuff + nodejs + node2nix + zig + gcc + gnumake + bun + ]; } diff --git a/hosts/users.nix b/hosts/users.nix index a32407c..a016642 100644 --- a/hosts/users.nix +++ b/hosts/users.nix @@ -33,28 +33,32 @@ in { users = { users = { - y = { - createHome = true; - home = "/home/y"; - shell = pkgs.fish; - } // (if !pkgs.stdenv.isDarwin then { - isSystemUser = false; - isNormalUser = true; - group = "users"; - extraGroups = (!pkgs.stdenv.isDarwin) [ - "systemd-journal" - "wheel" - "networkmanager" - "input" - "uinput" - "docker" - "plugdev" - "uinput" - "jellyfin" - ]; - } else {}); + y = + { + createHome = true; + home = "/home/y"; + shell = pkgs.fish; + } + // ( + if !pkgs.stdenv.isDarwin + then { + isSystemUser = false; + isNormalUser = true; + group = "users"; + extraGroups = [ + "systemd-journal" + "wheel" + "networkmanager" + "input" + "uinput" + "docker" + "plugdev" + "uinput" + "jellyfin" + ]; + } + else {} + ); }; }; } - - |