From 7758e10d8fe1095ee77643f7248d94ed4235834b Mon Sep 17 00:00:00 2001 From: s Date: Fri, 21 Feb 2025 17:10:50 +0700 Subject: mac --- hosts/base.nix | 3 +- hosts/darwin.nix | 2 +- hosts/mac/m1mba/configuration.nix | 12 ++----- hosts/mac/m1mba/default.nix | 4 +++ hosts/mac/m1mba/mac.nix | 12 ------- hosts/mac/m1mba/pkgs.nix | 69 ++++++++++++++++++++++++++------------- hosts/mac/mac.nix | 19 ++++++++--- hosts/pkgs.nix | 1 - hosts/users.nix | 18 ++++++---- 9 files changed, 80 insertions(+), 60 deletions(-) create mode 100644 hosts/mac/m1mba/default.nix delete mode 100644 hosts/mac/m1mba/mac.nix (limited to 'hosts') diff --git a/hosts/base.nix b/hosts/base.nix index 96df7c4..aea25e9 100644 --- a/hosts/base.nix +++ b/hosts/base.nix @@ -1,11 +1,10 @@ {pkgs, ...}: { # fucking linux vulnerability - services.printing.enable = false; # enable flakes nix = { gc = { automatic = true; - dates = "weekly"; + interval = {Weekday = 0; Hour = 20; Minute = 0;}; options = "--delete-older-than 7d"; }; # package = pkgs.nixFlakes; diff --git a/hosts/darwin.nix b/hosts/darwin.nix index 909322b..78de32f 100644 --- a/hosts/darwin.nix +++ b/hosts/darwin.nix @@ -1,6 +1,6 @@ inputs: let mkDarwinSystem = system: path: - inputs.nixpkgs.lib.darwinSystem { + inputs.nix-darwin.lib.darwinSystem { inherit system; specialArgs = {inherit inputs;}; modules = import (./. + "/${path}") inputs; diff --git a/hosts/mac/m1mba/configuration.nix b/hosts/mac/m1mba/configuration.nix index 373f781..8809af7 100644 --- a/hosts/mac/m1mba/configuration.nix +++ b/hosts/mac/m1mba/configuration.nix @@ -1,18 +1,10 @@ {...}: { imports = [ ../../base.nix + ../../users.nix ../mac.nix - ./users.nix ./pkgs.nix + ]; - # Auto upgrade nix package and the daemon service. - services.nix-daemon.enable = true; - # nix.package = pkgs.nix; - # Used for backwards compatibility, please read the changelog before changing. - # $ darwin-rebuild changelog - system.stateVersion = 4; - - # The platform the configuration will be used on. - nixpkgs.hostPlatform = "aarch64-darwin"; } diff --git a/hosts/mac/m1mba/default.nix b/hosts/mac/m1mba/default.nix new file mode 100644 index 0000000..3370bb0 --- /dev/null +++ b/hosts/mac/m1mba/default.nix @@ -0,0 +1,4 @@ +inputs: [ + #inputs.kmonad.nixosModules.default + ./configuration.nix +] diff --git a/hosts/mac/m1mba/mac.nix b/hosts/mac/m1mba/mac.nix deleted file mode 100644 index dba3035..0000000 --- a/hosts/mac/m1mba/mac.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs, ... }: -{ - fonts.fontDir.enable = true; - fonts.fonts = with pkgs; [ - recursive - (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) - ]; - system.keyboard = { - enableKeyMapping = true; - remapCapsLockToEscape = true; - }; -} diff --git a/hosts/mac/m1mba/pkgs.nix b/hosts/mac/m1mba/pkgs.nix index dffcd66..f7ac5f4 100644 --- a/hosts/mac/m1mba/pkgs.nix +++ b/hosts/mac/m1mba/pkgs.nix @@ -1,28 +1,34 @@ -{ pkgs, kmonad, unstablePkgs, ...}: +{ pkgs, ...}: { # custom # y.kmonad.enable = true; - environment.systemPackages = with unstablePkgs; [ - # custom - pkgs.overlays.yabai - #unfree -# slack -# spotify -# corefonts -# symbola - #gui - alacritty - vscodium - tdesktop - # terminal - # - vim - neovim - helix - # --- + environment.systemPackages = with pkgs; [ + # dont work on mac + #nethogs + #networking + # images + #sxiv + # audio debug + #alsa-firmware + # wine + #wineWowPackages.staging + #wineWowPackages.waylandFull + #appimage-run + # disk automount + #udiskie + #ghostty + # /mac + minio + minio-client + curlFull wget + deluge + autossh + sshfs + # htop + rlwrap bat gitAndTools.gitFull lazygit @@ -41,10 +47,10 @@ jq vifm nnn - # neovim asks for a c compiler just to run nvim-treesitter commands. let's see fzf killall tree + qrcp deluge ncdu edir @@ -54,15 +60,32 @@ # direnv direnv nix-direnv - # scraping - python310Packages.yt-dlp + # nix lsp + nil + alejandra + # markdown lsp + marksman + #crypto + electrum + # mac only + # custom + #pkgs.overlays.yabai + # terminals + alacritty + # files + ranger + zip + unzip + # direnv + direnv + nix-direnv # code + superhtml nodejs node2nix zig gcc gnumake - sqlite ]; } diff --git a/hosts/mac/mac.nix b/hosts/mac/mac.nix index dba3035..2e55b01 100644 --- a/hosts/mac/mac.nix +++ b/hosts/mac/mac.nix @@ -1,12 +1,23 @@ -{ pkgs, ... }: +{ self, pkgs, ... }: { - fonts.fontDir.enable = true; - fonts.fonts = with pkgs; [ + fonts.packages = with pkgs; [ recursive - (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) + pkgs.nerd-fonts.droid-sans-mono + # (pkgs.nerd-fonts.override { fonts = [ "JetBrainsMono" ]; }) ]; + #system.configurationRevision = self.rev or self.dirtyRev or null; system.keyboard = { enableKeyMapping = true; remapCapsLockToEscape = true; }; + #pkgs = import nixpkgs { + # overlays = builtins.attrValues self.overlays; + # system = "aarch64-darwin"; + #}; + nixpkgs.hostPlatform = "aarch64-darwin"; + system.stateVersion = 6; + ids.gids.nixbld = 30000; + #services.nix-daemon.enable = true; + + } diff --git a/hosts/pkgs.nix b/hosts/pkgs.nix index 953b7fd..a636215 100644 --- a/hosts/pkgs.nix +++ b/hosts/pkgs.nix @@ -76,7 +76,6 @@ # yacreader nethogs superhtml - sshfs sxiv # ai stuff! diff --git a/hosts/users.nix b/hosts/users.nix index 3572fbc..a32407c 100644 --- a/hosts/users.nix +++ b/hosts/users.nix @@ -1,6 +1,7 @@ { config, pkgs, + lib, ... }: let shellAliases = { @@ -33,9 +34,14 @@ in { users = { users = { y = { - group = "users"; + createHome = true; + home = "/home/y"; + shell = pkgs.fish; + } // (if !pkgs.stdenv.isDarwin then { + isSystemUser = false; isNormalUser = true; - extraGroups = [ + group = "users"; + extraGroups = (!pkgs.stdenv.isDarwin) [ "systemd-journal" "wheel" "networkmanager" @@ -46,11 +52,9 @@ in { "uinput" "jellyfin" ]; - createHome = true; - home = "/home/y"; - isSystemUser = false; - shell = pkgs.fish; - }; + } else {}); }; }; } + + -- cgit v1.2.3 From c758310626204f21fcddda5334e79d645b2dca2e Mon Sep 17 00:00:00 2001 From: s Date: Fri, 21 Feb 2025 17:28:53 +0700 Subject: m --- hosts/editors.nix | 4 +- hosts/local/i3.nix | 1 + hosts/local/wayland.nix | 2 + hosts/mac/m1mba/configuration.nix | 3 +- hosts/mac/m1mba/pkgs.nix | 91 -------------------------- hosts/mac/mac.nix | 8 ++- hosts/pkgs.nix | 134 +++++++++++++++++++++----------------- 7 files changed, 88 insertions(+), 155 deletions(-) delete mode 100644 hosts/mac/m1mba/pkgs.nix (limited to 'hosts') diff --git a/hosts/editors.nix b/hosts/editors.nix index b3e6e69..241ea57 100644 --- a/hosts/editors.nix +++ b/hosts/editors.nix @@ -7,8 +7,8 @@ environment.variables.F = "hx"; environment.systemPackages = [ pkgs.neovim - inputs.helix.packages.${pkgs.system}.helix + #inputs.helix.packages.${pkgs.system}.helix pkgs.nodePackages.prettier - # pkgs.helix + pkgs.helix ]; } diff --git a/hosts/local/i3.nix b/hosts/local/i3.nix index ba84982..210c0d0 100644 --- a/hosts/local/i3.nix +++ b/hosts/local/i3.nix @@ -90,6 +90,7 @@ easyeffects # games! ryujinx + wineWowPackages.staging ]; services.flatpak.enable = true; diff --git a/hosts/local/wayland.nix b/hosts/local/wayland.nix index 8f588c8..b56967c 100644 --- a/hosts/local/wayland.nix +++ b/hosts/local/wayland.nix @@ -120,6 +120,8 @@ # espeak-ng # espeak-ng-data ghostty + wineWowPackages.staging + wineWowPackages.waylandFull ]; services.speechd.enable = true; diff --git a/hosts/mac/m1mba/configuration.nix b/hosts/mac/m1mba/configuration.nix index 8809af7..ed64688 100644 --- a/hosts/mac/m1mba/configuration.nix +++ b/hosts/mac/m1mba/configuration.nix @@ -2,8 +2,9 @@ imports = [ ../../base.nix ../../users.nix + ../../editors.nix + ../../pkgs.nix ../mac.nix - ./pkgs.nix ]; diff --git a/hosts/mac/m1mba/pkgs.nix b/hosts/mac/m1mba/pkgs.nix deleted file mode 100644 index f7ac5f4..0000000 --- a/hosts/mac/m1mba/pkgs.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ pkgs, ...}: - -{ -# custom -# y.kmonad.enable = true; - environment.systemPackages = with pkgs; [ - # dont work on mac - #nethogs - #networking - # images - #sxiv - # audio debug - #alsa-firmware - # wine - #wineWowPackages.staging - #wineWowPackages.waylandFull - #appimage-run - # disk automount - #udiskie - #ghostty - # /mac - minio - minio-client - curlFull - wget - deluge - autossh - sshfs - # - htop - rlwrap - bat - gitAndTools.gitFull - lazygit - git-lfs - lsd - lsof - tmux - tmate - curlFull - ripgrep - ranger - minio - minio-client - zip - unzip - jq - vifm - nnn - fzf - killall - tree - qrcp - deluge - ncdu - edir - bottom - pigz - rclone - # direnv - direnv - nix-direnv - # nix lsp - nil - alejandra - # markdown lsp - marksman - #crypto - electrum - # mac only - # custom - #pkgs.overlays.yabai - # terminals - alacritty - # files - ranger - zip - unzip - # direnv - direnv - nix-direnv - # code - superhtml - nodejs - node2nix - zig - gcc - gnumake - ]; -} - diff --git a/hosts/mac/mac.nix b/hosts/mac/mac.nix index 2e55b01..651e2e4 100644 --- a/hosts/mac/mac.nix +++ b/hosts/mac/mac.nix @@ -1,5 +1,11 @@ -{ self, pkgs, ... }: +{ pkgs, ... }: { +# custom +# y.kmonad.enable = true; + environment.systemPackages = with pkgs;[ + alacritty + #overlays.yabai + ]; fonts.packages = with pkgs; [ recursive pkgs.nerd-fonts.droid-sans-mono diff --git a/hosts/pkgs.nix b/hosts/pkgs.nix index a636215..2f55c40 100644 --- a/hosts/pkgs.nix +++ b/hosts/pkgs.nix @@ -1,86 +1,100 @@ { inputs, pkgs, + lib, ... }: { environment.systemPackages = with pkgs; [ - moreutils - alejandra - # nixfmt - # - busybox - usbutils - xdg-utils - rlwrap - wget - htop - btop - bat - gitAndTools.gitFull - lazygit - git-lfs - lsd - lsof - tmux - socat - tmate - curlFull - ripgrep - ranger - minio - minio-client - zip - unzip - jq - vifm - nnn - fzf - killall - tree - qrcp - deluge - ncdu - edir - bottom - pigz - rclone - gparted - autossh - #hardware problems - lm_sensors - linuxKernel.packages.linux_hardened.cpupower - # linuxKernel.packages.linux_latest_libre.cpupower + # 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 - sxiv - # audio debug - alsa-firmware - # wine - #wineWowPackages.staging - #wineWowPackages.waylandFull - appimage-run - # code + # nix nil + alejandra + #nixfmt direnv nix-direnv - # devenv - inputs.devenv.packages.${pkgs.system}.default + devenv + #inputs.devenv.packages.${pkgs.system}.default # scraping python312Packages.yt-dlp # markdown lsp marksman # disk automount - udiskie #crypto # electrum # yacreader - nethogs superhtml - sxiv # ai stuff! # aider-chat - yek + # yek # python312Packages.google-generativeai + ] ++ lib.optionals pkgs.stdenv.isLinux [ + # linuxKernel.packages.linux_latest_libre.cpupower + gparted + moreutils + busybox + usbutils + xdg-utils + #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 ]; } -- cgit v1.2.3