From 94dcf0a93cad9310582eea8241f24d73cb62a4c0 Mon Sep 17 00:00:00 2001 From: Hare Date: Fri, 21 Feb 2025 19:56:38 +0900 Subject: [PATCH] add new host: fungus --- hosts/.default.nix.swp | Bin 0 -> 12288 bytes hosts/default.nix | 13 +++++++ hosts/fungus/hardware-configuration.nix | 32 ++++++++++++++++++ hosts/fungus/home-manager.nix | 43 ++++++++++++++++++++++++ hosts/fungus/nixos.nix | 41 ++++++++++++++++++++++ 5 files changed, 129 insertions(+) create mode 100644 hosts/.default.nix.swp create mode 100644 hosts/fungus/hardware-configuration.nix create mode 100644 hosts/fungus/home-manager.nix create mode 100644 hosts/fungus/nixos.nix diff --git a/hosts/.default.nix.swp b/hosts/.default.nix.swp new file mode 100644 index 0000000000000000000000000000000000000000..2e28a49fb979740abb279b32ed4eb39ec9fe9c93 GIT binary patch literal 12288 zcmeI2%ZnUE9LFnrS~c;N1VTV8$Dj$x_GDucVkEF35?^c%hTTgDv390rrrmx~UCr#W zPNIl-2#EiHpa&tB9DRTyUOebU5c~(sLA*qSJqTX>)@!DFHnNgKVBt6L=|^?duYUdc zRW~f#E60~#TjVcB^9;Yo8T)wo>;3}U$1d(>Y#@|0&D;I5cr7ot>xApqO~7_1S6MF+ ztFk@FOI^0RvL~uUM~L!2Vo(<{KnCu^K&5+gXZ9?;aAN+r8U1YQ8NT<)rTYj(L&yLb zAOmE843GgbKnBPF8Q7@?bg_%wK=L#G1}^#iuBp90r5za{17v^ab3;qU*yA7gA2`~mKOU%?OH3-BrU2z&_M18;%_a0EO7 zX29m7jQs>Y2k(OpSOCv~y z$jF~ZgFKaUsmMfMD$}!mj?Nos+9rbiF4GLP2hA~lDCfA$d9TX)Rf!(y>Z|xD(*_@h z=lrV6)bxznK0kcDImyp{ylF1GG#B%3l}LoU!fe~U1K6x;Bg^$t%hZiExrD)0DODy? z6R%~yAZ>+gjIVIvyt6pI=7O0aYiCYhJAHC4iL+|WU!Ewh-LJKe0UJ!o4z_V-lOKy3 zAHWAcdeqj#B^&ZF_j))^i(F|QMQxWt!_yHP()5E}W_Ny5sJyR4S~kia$xN(Rky=%< zK25DSAxf!*mdjF=ah{p`K5;UdpC9`Oy-d|!j&X-NSL>#m&98lEBUm1784_m$sbbAT zk7gbwptTle;BXg?Q@arA#hgk!#E!F~(xrU@Y(=-uCD*hPmkZg6MRH#CP0YzWwc2pr z$+KSEk3^E>!=v=&stxU{=+ZK4)V7BS>q{T8eXn|Jl*B8xl#A{G zzF>2zl+dO+AxBj)-JY^uc*8#nhPTY=*qIA;=-E30^PD6;itTmt5hUQcr)CiwkD8S zKxO2%wZ+|7HKt!Eg*nDUeTA6=_jB(2`-p{B&WEuc_?l15j90qv7+$%}6=au%y>!{W y?ELgDiP2d<)+{79?J?idNF_9eXC$15*I_t!gWQ>!!N2Ryu|#UT-OK}bmi-Gc7XuIg literal 0 HcmV?d00001 diff --git a/hosts/default.nix b/hosts/default.nix index 37586ae..c30c9a6 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -65,11 +65,24 @@ rec { ./arcadia/home-manager.nix ]; }; + fungus = mkHost { + system = "x86_64-linux"; + hostname = "Fungus"; + username = "hare"; + systemModules = [ + ./fungus/nixos.nix + ]; + homeModule = [ + ./fungus/home-manager.nix + ]; + }; }; nixos = { arcadia = hosts.arcadia.nixos; + fungus = hosts.fungus.nixos; }; home-manager = { arcadia = hosts.arcadia.home-manager; + fungus = hosts.fungus.home-manager; }; } diff --git a/hosts/fungus/hardware-configuration.nix b/hosts/fungus/hardware-configuration.nix new file mode 100644 index 0000000..6234d6f --- /dev/null +++ b/hosts/fungus/hardware-configuration.nix @@ -0,0 +1,32 @@ +# 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") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/e4eb343c-d88f-4d63-99aa-c2c41d8580db"; + fsType = "ext4"; + }; + + 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 + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/fungus/home-manager.nix b/hosts/fungus/home-manager.nix new file mode 100644 index 0000000..2f414d2 --- /dev/null +++ b/hosts/fungus/home-manager.nix @@ -0,0 +1,43 @@ +{ conifg, pkgs, ... }: +{ + imports = [ + ../../home-manager/hyprland.nix + ../../home-manager/tofi.nix + ../../home-manager/direnv.nix + ]; + home.packages = with pkgs; [ + vscode + vivaldi + discord + helvum + obs-studio + superfile + plemoljp + plemoljp-nf + prismlauncher + scrcpy + tetrio-desktop + kicad + blender-hip + gimp + inkscape + obsidian + zed-editor + easyeffects + ]; + programs.git = { + enable = true; + userName = "Hare"; + userEmail = "kei.hiracchi.0928@gmail.com"; + }; + + fonts = { + fontconfig = { + defaultFonts = { + serif = [ "Noto Serif" ]; + sansSerif = [ "Noto Sans" ]; + monospace = [ "PlemolJP NF Console" ]; + }; + }; + }; +} diff --git a/hosts/fungus/nixos.nix b/hosts/fungus/nixos.nix new file mode 100644 index 0000000..5925e48 --- /dev/null +++ b/hosts/fungus/nixos.nix @@ -0,0 +1,41 @@ +{ + config, + pkgs, + username, + ... +}: +{ + system.stateVersion = "24.11"; + + imports = [ + ./hardware-configuration.nix + + ../../system/core + ../../programs/ssh.nix + ../../programs/utility.nix + ../../programs/shell.nix + ../../programs/docker.nix + ]; + environment.systemPackages = with pkgs; [ + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + users.users.${username} = { + extraGroups = [ + "docker" + ]; + shell = pkgs.fish; + openssh.authorizedKeys.keys = [ + ]; + }; + programs.nix-ld.enable = true; + + services.openssh.enable = true; + + networking.firewall.allowedTCPPorts = [ + 22 + ]; + networking.firewall.allowedUDPPorts = [ ]; +}