diff --git a/flake.nix b/flake.nix index 081c056..942eac1 100644 --- a/flake.nix +++ b/flake.nix @@ -47,13 +47,23 @@ ]; home-manager_module = import home/nix-on-droid/aarch64/pstar_1/home.nix; }; + + fily_pad_f12_1_modules = { + nix-on-droid_modules = [ + ./hosts/nix-on-droid/aarch64/fily_pad_f12_1/nix-on-droid.nix + ]; + home-manager_module = import home/nix-on-droid/aarch64/fily_pad_f12_1/home.nix; + }; in { formatter = forAllSystems ( system: nixpkgs.legacyPackages.${system}.alejandra ); - nixOnDroidConfigurations.mondrian_1 = make_nix-on-droid (aarch64-nix-on-droid_base_args // mondrian_1_modules); - nixOnDroidConfigurations.pstar_1 = make_nix-on-droid (aarch64-nix-on-droid_base_args // pstar_1_modules); + nixOnDroidConfigurations = { + mondrian_1 = make_nix-on-droid (aarch64-nix-on-droid_base_args // mondrian_1_modules); + pstar_1 = make_nix-on-droid (aarch64-nix-on-droid_base_args // pstar_1_modules); + fily_pad_f11_1 = make_nix-on-droid (aarch64-nix-on-droid_base_args // fily_pad_f11_1_modules); + }; }; nixConfig = { diff --git a/home/nix-on-droid/aarch64/fily_pad_f12_1/home.nix b/home/nix-on-droid/aarch64/fily_pad_f12_1/home.nix new file mode 100644 index 0000000..b8d0032 --- /dev/null +++ b/home/nix-on-droid/aarch64/fily_pad_f12_1/home.nix @@ -0,0 +1,14 @@ +{ + config, + lib, + pkgs, + ... +}: { + imports = [ + ./modules + ]; + # Read the changelog before changing this value + home.stateVersion = "23.05"; + + # insert home-manager config +} diff --git a/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/.gitkeep b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/ENV_VAR.nix b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/ENV_VAR.nix new file mode 100644 index 0000000..af48b87 --- /dev/null +++ b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/ENV_VAR.nix @@ -0,0 +1,13 @@ +{ + pkgs, + config, + ... +}: { + home.sessionPath = [ + "$HOME/.local/bin" + "$HOME/go/bin" + ]; + home.sessionVariables = { + home_sessionVariables_enable = 1; + }; +} diff --git a/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/browers.nix b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/browers.nix new file mode 100644 index 0000000..808a8b2 --- /dev/null +++ b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/browers.nix @@ -0,0 +1,7 @@ +{pkgs, ...}: { + programs = { + firefox = { + enable = true; + }; + }; +} diff --git a/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/creative.nix b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/creative.nix new file mode 100644 index 0000000..e282810 --- /dev/null +++ b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/creative.nix @@ -0,0 +1,38 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + # creative + blender # 3d modeling + # gimp # image editing, I prefer using figma in browser instead of this one + (gimp-with-plugins.override { + plugins = with gimpPlugins; [ + fourier + # resynthesizer # broken since 2023-03-20 + gmic + ]; + }) + shotcut + mdp + inkscape # vector graphics + krita # digital painting + musescore # music notation + reaper # audio production + sonic-pi # music programming + + # this app consumes a lot of storage, so do not install it currently + kicad-unstable # 3d printing, eletrical engineering + ngspice + #digital # A digital logic designer and circuit simulator. + logisim-evolution # Digital logic designer and simulator + + freecad + ]; + + programs = { + # live streaming + obs-studio = { + enable = true; + plugins = with pkgs; [ + ]; + }; + }; +} diff --git a/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/default.nix b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/default.nix new file mode 100644 index 0000000..6274a97 --- /dev/null +++ b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/default.nix @@ -0,0 +1,25 @@ +{ + config, + catppuccin-urxvt, + ... +} @ args: { + imports = [ + ./font.nix + ./development.nix + ./creative.nix + ./menu.nix + ./dewm.nix + ./browers.nix + ./system-tools.nix + ./ENV_VAR.nix + ./others.nix + # nix-on-droid common + #../../../common/modules/virtualisation.nix + ../../../common/modules/x11_catppuccin.nix + ../../../common/modules/nix.nix + # common + ../../../../common/modules/neovim + ../../../../common/modules/others.nix + ../../../../common/modules/fhs.nix + ]; +} diff --git a/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/development.nix b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/development.nix new file mode 100644 index 0000000..e86e7c4 --- /dev/null +++ b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/development.nix @@ -0,0 +1,105 @@ +{ + pkgs, + pkgs-unstable, + ... +}: let + my_python = pkgs-unstable.python311.withPackages (ps: + with ps; [ + ipykernel + #jupyterlab + matplotlib + numpy + seaborn + networkx + beautifulsoup4 + selenium + urllib3 + pyclip + pybluez + pymysql + jieba + wordcloud + pandas-datareader + pip # use in venv "python -m venv .venv" "source .venv/bin/activate" + + ipython + pandas + requests + pyquery + pyyaml + + #docx2pdf + ]); +in { + home.packages = with pkgs-unstable; [ + #-- python + # my_python + + #-- golang + go + gomodifytags + iferr # generate error handling code for go + impl # generate function implementation for go + gotools # contains tools like: godoc, goimports, etc. + gopls # go language server + delve # go debugger + + #-- jdk + jdk17 # used to run some java based tools(.jar) + + rsync # File Copy/Snyc + ranger # Terminal FileManager + proxychains + tmux # Background Shell process + + # User-facing stuff that you really really want to have + vim # or some other editor, e.g. nano or neovim + helix # An editor with lots of functions out of box + git # Version Manager + direnv + + neofetch + openssh + curl + gnumake + + # Some common stuff that people expect to have + fzf + diffutils + findutils + utillinux + tzdata + hostname + gnupg + gnused + gnutar + bzip2 + gzip + xz + zip + unzip + ncurses # command clear + which + htop + tree + netcat # nc + procps # command ps/pgrep and ... + lsof + time + ]; + programs = { + zsh = { + enable = true; + }; + nushell = { + enable = true; + }; + bash = { + enable = true; + enableCompletion = true; + }; + fish = { + enable = true; + }; + }; +} diff --git a/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/dewm.nix b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/dewm.nix new file mode 100644 index 0000000..e3ea689 --- /dev/null +++ b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/dewm.nix @@ -0,0 +1,9 @@ +{ + pkgs, + pkgs-unstable, + ... +}: { + home.packages = with pkgs-unstable; [ + xdg-utils + ]; +} diff --git a/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/font.nix b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/font.nix new file mode 100644 index 0000000..2c7f6fc --- /dev/null +++ b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/font.nix @@ -0,0 +1,42 @@ +{ + pkgs, + pkgs-unstable, + config, + ... +}: { + home.packages = with pkgs-unstable; [ + # ...various + # dejavu_fonts + # powerline-fonts + + # icon fonts + #material-design-icons + #font-awesome + + # Noto 系列字体是 Google 主导的,名字的含义是「没有豆腐」(no tofu),因为缺字时显示的方框或者方框被叫作 tofu + # Noto 系列字族名只支持英文,命名规则是 Noto + Sans 或 Serif + 文字名称。 + # 其中汉字部分叫 Noto Sans/Serif CJK SC/TC/HK/JP/KR,最后一个词是地区变种。 + noto-fonts # 大部分文字的常见样式,不包含汉字 + noto-fonts-cjk # 汉字部分 + noto-fonts-emoji # 彩色的表情符号字体 + noto-fonts-extra # 提供额外的字重和宽度变种 + + # 思源系列字体是 Adobe 主导的。其中汉字部分被称为「思源黑体」和「思源宋体」,是由 Adobe + Google 共同开发的 + source-sans # 无衬线字体,不含汉字。字族名叫 Source Sans 3 和 Source Sans Pro,以及带字重的变体,加上 Source Sans 3 VF + source-serif # 衬线字体,不含汉字。字族名叫 Source Code Pro,以及带字重的变体 + source-han-sans # 思源黑体 + source-han-serif # 思源宋体 + + sarasa-gothic + # nerdfonts + (nerdfonts.override { + fonts = [ + "FiraCode" + "JetBrainsMono" + "Iosevka" + ]; + }) + ]; + + fonts.fontconfig.enable = true; +} diff --git a/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/menu.nix b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/menu.nix new file mode 100644 index 0000000..932d373 --- /dev/null +++ b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/menu.nix @@ -0,0 +1,16 @@ +{ + pkgs, + pkgs-unstable, + ... +}: { + home.packages = with pkgs-unstable; [ + dmenu + #rofi + ]; + + programs = { + rofi = { + enable = true; + }; + }; +} diff --git a/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/others.nix b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/others.nix new file mode 100644 index 0000000..4a7cf17 --- /dev/null +++ b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/others.nix @@ -0,0 +1,8 @@ +{ + pkgs, + pkgs-unstable, + ... +}: { + home.packages = with pkgs-unstable; [ + ]; +} diff --git a/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/system-tools.nix b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/system-tools.nix new file mode 100644 index 0000000..ee7802d --- /dev/null +++ b/home/nix-on-droid/aarch64/fily_pad_f12_1/modules/system-tools.nix @@ -0,0 +1,104 @@ +{ + pkgs, + pkgs-unstable, + ... +}: { + # Linux Only Packages, not available on Darwin + home.packages = with pkgs-unstable; [ + nmon + iotop + iftop + + # misc + libnotify + wireguard-tools # manage wireguard vpn manually, via wg-quick + + # need to run `conda-install` before using it + # need to run `conda-shell` before using command `conda` + # conda is not available for MacOS + conda + + # (lib.lowPrio busybox) + + # system call monitoring + strace # system call monitoring + ltrace # library call monitoring + bpftrace # powerful tracing tool + tcpdump # network sniffer + lsof # list open files + + # system tools + sysstat + lm_sensors # for `sensors` command + ethtool + #pciutils # lspci + #usbutils # lsusb + hdparm # for disk performance, command + #dmidecode # a tool that reads information about your system's hardware from the BIOS according to the SMBIOS/DMI standard + + neofetch + ranger # terminal file manager(batteries included, with image preview support) + + # archives + zip + xz + unzip + p7zip + + # networking tools + mtr # A network diagnostic tool + iperf3 + iproute2 + dnsutils # `dig` + `nslookup` + ldns # replacement of `dig`, it provide the command `drill` + aria2 # A lightweight multi-protocol & multi-source command-line download utility + socat # replacement of openbsd-netcat + nmap # A utility for network discovery and security auditing + ipcalc # it is a calculator for the IPv4/v6 addresses + + # Text Processing + # Docs: https://github.com/learnbyexample/Command-line-text-processing + gnugrep # GNU grep, provides `grep`/`egrep`/`fgrep` + gnused # GNU sed, very powerful(mainly for replacing text in files) + gawk # GNU awk, a pattern scanning and processing language + (ripgrep.override {withPCRE2 = true;}) # recursively searches directories for a regex pattern + sad # CLI search and replace, with diff preview, really useful!!! + delta # A viewer for git and diff output + # A fast and polyglot tool for code searching, linting, rewriting at large scale + # supported languages: only some mainstream languages currently(do not support nix/nginx/yaml/toml/...) + ast-grep + jq # A lightweight and flexible command-line JSON processor + yq-go # yaml processer https://github.com/mikefarah/yq + + # misc + tldr + cowsay + file + which + tree + gnutar + zstd + caddy + gnupg + + # nix related + # + # it provides the command `nom` works just like `nix + # with more details log output + nix-output-monitor + nodePackages.node2nix + + # productivity + hugo # static site generator + glow # markdown previewer in terminal + ]; + + # auto mount usb drives + services = { + udiskie.enable = true; + }; + + services = { + # syncthing.enable = true; + }; +} diff --git a/hosts/nix-on-droid/aarch64/fily_pad_f12_1/modules/.gitkeep b/hosts/nix-on-droid/aarch64/fily_pad_f12_1/modules/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/hosts/nix-on-droid/aarch64/fily_pad_f12_1/modules/default.nix b/hosts/nix-on-droid/aarch64/fily_pad_f12_1/modules/default.nix new file mode 100644 index 0000000..9496d36 --- /dev/null +++ b/hosts/nix-on-droid/aarch64/fily_pad_f12_1/modules/default.nix @@ -0,0 +1,13 @@ +{ + config, + pkgs, + ... +} @ args: { + imports = [ + ../../../common/modules/extra_keys.nix + ../../../common/modules/font.nix + ../../../common/modules/sshd.nix + #../../../common/modules/proxychains.nix + ../../../common/modules/development_manual.nix + ]; +} diff --git a/hosts/nix-on-droid/aarch64/fily_pad_f12_1/nix-on-droid.nix b/hosts/nix-on-droid/aarch64/fily_pad_f12_1/nix-on-droid.nix new file mode 100644 index 0000000..5ae990d --- /dev/null +++ b/hosts/nix-on-droid/aarch64/fily_pad_f12_1/nix-on-droid.nix @@ -0,0 +1,50 @@ +{ + config, + lib, + pkgs, + ... +}: { + imports = [ + ./modules + ]; + # Simply install just the packages + environment.packages = with pkgs; [ + # User-facing stuff that you really really want to have + # vim # or some other editor, e.g. nano or neovim + nano + + # Some common stuff that people expect to have + #diffutils + #findutils + #utillinux + #tzdata + #hostname + #man + #gnugrep + #gnupg + #gnused + #gnutar + #bzip2 + #gzip + #xz + #zip + #unzip + ]; + + # Backup etc files instead of failing to activate generation if a file already exists in /etc + environment.etcBackupExtension = ".bak"; + + # Read the changelog before changing this value + system.stateVersion = "23.05"; + + # Set up nix for flakes + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + + # Set your time zone + #time.timeZone = "Europe/Berlin"; + + # user.shell = "${pkgs.fish}/bin/fish"; + # networking.hostName = "mondrian_1"; +}