From 6b861b77b8f8fb3a516550668f42e7559b32e3a8 Mon Sep 17 00:00:00 2001 From: randomuser Date: Sun, 21 Jan 2024 12:07:54 -0600 Subject: [PATCH] some changes, added remote key --- boxes/mainsail/default.nix | 47 ++++++++++----- boxes/mainsail/hardware-configuration.nix | 21 +++---- boxes/mainsail/home.nix | 9 --- boxes/mainsail/server.nix | 70 ----------------------- flake.lock | 4 +- flake.nix | 7 --- 6 files changed, 45 insertions(+), 113 deletions(-) delete mode 100644 boxes/mainsail/home.nix delete mode 100644 boxes/mainsail/server.nix diff --git a/boxes/mainsail/default.nix b/boxes/mainsail/default.nix index e492f9b..d17b946 100644 --- a/boxes/mainsail/default.nix +++ b/boxes/mainsail/default.nix @@ -2,11 +2,8 @@ { imports = [ ./hardware-configuration.nix - ./server.nix ../../modules/bootstrap.nix ../../modules/common.nix - ../../modules/x11.nix - ../../modules/discord.nix ]; boot.loader.grub.enable = true; @@ -26,20 +23,40 @@ "; environment.systemPackages = with pkgs; [ - vscodium-fhs - libreoffice + neovim + git + curl + ]; - anki-bin - ytfzf - kdenlive - libreoffice - i3 - gcc - gnumake + services.home-assistant = { + enable = true; + extraComponents = [ + # Components required to complete the onboarding + "netgear" + "hue" + "nest" + "esphome" + "met" + "radio_browser" + ]; + config = { + # Includes dependencies for a basic setup + # https://www.home-assistant.io/integrations/default_config/ + default_config = {}; + }; + openFirewall = true; + }; - scrcpy - thunderbird - mepo + services.openssh = { + enable = true; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + }; + }; + + users.users.usr.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbhM3wj0oqjR3pUaZgpfX4Xo4dlzvBTbQ48zHyg7Pwx usr" ]; system.stateVersion = "23.11"; diff --git a/boxes/mainsail/hardware-configuration.nix b/boxes/mainsail/hardware-configuration.nix index c2a86c1..9bc31a8 100644 --- a/boxes/mainsail/hardware-configuration.nix +++ b/boxes/mainsail/hardware-configuration.nix @@ -5,27 +5,28 @@ { imports = - [ (modulesPath + "/profiles/qemu-guest.nix") + [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "ums_realtek" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/7b70ab88-296c-4737-90b2-267cb2432dc1"; + { device = "/dev/disk/by-uuid/948aeaf8-cb7e-4f85-ae3e-1bc6a25ec156"; fsType = "ext4"; }; - swapDevices = [ ]; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/617cb1ae-a788-429a-b0d4-63d46d8a4e1b"; + fsType = "ext4"; + }; - # 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.enp1s0.useDHCP = lib.mkDefault true; + swapDevices = + [ { device = "/dev/disk/by-uuid/d82ae76c-68f4-4e70-9162-5dab5f84375b"; } + ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/boxes/mainsail/home.nix b/boxes/mainsail/home.nix deleted file mode 100644 index 144dd0e..0000000 --- a/boxes/mainsail/home.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ lib, inputs, config, pkgs, home, ... }: - -{ - imports = [ - ../../home/x11.nix - ]; - - home.stateVersion = "23.11"; -} diff --git a/boxes/mainsail/server.nix b/boxes/mainsail/server.nix deleted file mode 100644 index 7503d58..0000000 --- a/boxes/mainsail/server.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ lib, config, pkgs, ...}: -{ - services.paperless = { - enable = true; - passwordFile = "/etc/paperless-password"; - port = 3004; - address = "localhost"; - extraConfig = { - PAPERLESS_URL = "https://paperless.beepboop.systems"; - }; - }; - - services.calibre-web.enable = true; - services.calibre-web.listen.port = 8080; - - powerManagement.enable = false; - - programs.adb.enable = true; - users.users.usr.extraGroups = ["adbusers"]; - - services.openssh = { - enable = true; - ports = [2222]; - }; - -<<<<<<< Updated upstream - services.radicale = { - enable = true; - settings = { - auth = { - type = "htpasswd"; - htpasswd_filename = "radicale-passwd"; - htpasswd_encryption = "plain"; - }; - }; - }; - -======= ->>>>>>> Stashed changes - systemd.targets.sleep.enable = false; - systemd.targets.suspend.enable = false; - systemd.targets.hibernate.enable = false; - systemd.targets.hybrid-sleep.enable = false; - - systemd.services.paperless-web-bridge = { - script = '' - ${pkgs.openssh}/bin/ssh -v -NR 3004:localhost:3004 -oExitOnForwardFailure=yes -p 55555 useracc@beepboop.systems - ''; - wantedBy = [ "multi-user.target" ]; - after = [ "network.target" "ankisyncd.service" ]; - serviceConfig = { - Restart = "on-failure"; - StartLimitBurst = 10000; - RestartSec = "0s"; - }; - }; - - systemd.services.internal-ssh-bridge = { - script = '' - ${pkgs.openssh}/bin/ssh -v -NR 2222:localhost:2222 -oExitOnForwardFailure=yes -p 55555 useracc@beepboop.systems - ''; - wantedBy = [ "multi-user.target" ]; - after = [ "network.target" "ankisyncd.service" ]; - serviceConfig = { - Restart = "on-failure"; - StartLimitBurst = 10000; - RestartSec = "0s"; - }; - }; -} diff --git a/flake.lock b/flake.lock index 572223e..5c25f72 100644 --- a/flake.lock +++ b/flake.lock @@ -210,11 +210,11 @@ "locked": { "lastModified": 1, "narHash": "sha256-iemuV19UU8TriqixcvwdRUTa8lIrxc3Krwt4bHpUUWE=", - "path": "/nix/store/vsn2v6zr402x5cf1w340ifbp2xb07jcg-source/builds", + "path": "/nix/store/0ygfgmnw546l628g3a6gdnk9h7hh1pv0-source/builds", "type": "path" }, "original": { - "path": "/nix/store/vsn2v6zr402x5cf1w340ifbp2xb07jcg-source/builds", + "path": "/nix/store/0ygfgmnw546l628g3a6gdnk9h7hh1pv0-source/builds", "type": "path" } }, diff --git a/flake.nix b/flake.nix index 06e0817..2a1dfcb 100644 --- a/flake.nix +++ b/flake.nix @@ -82,13 +82,6 @@ specialArgs = { inherit inputs; }; modules = [ ./boxes/mainsail - - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit inputs; }; - home-manager.users.usr = import ./boxes/mainsail/home.nix; - } ]; }; };