diff --git a/class/desktop/syncthing.nix b/class/desktop/syncthing.nix index 0f74af1..0ec4025 100644 --- a/class/desktop/syncthing.nix +++ b/class/desktop/syncthing.nix @@ -4,4 +4,6 @@ overrideDevices = false; overrideFolders = false; }; + + systemd.user.services.syncthing.wantedBy = ["default.target"]; } diff --git a/common/bash.nix b/common/cli.nix similarity index 60% rename from common/bash.nix rename to common/cli.nix index 74ecf6c..b2d9800 100644 --- a/common/bash.nix +++ b/common/cli.nix @@ -1,12 +1,24 @@ { + config, lib, pkgs, ... }: { programs = { - direnv.enable = true; command-not-found.enable = false; + git = { + enable = true; + lfs.enable = true; + }; + + nix-index = { + enable = true; + enableBashIntegration = true; + }; + + direnv.enable = true; + bash = { promptInit = '' if [[ -v SSH_CLIENT && -v SSH_CONNECTION && -v SSH_TTY ]]; then @@ -27,10 +39,21 @@ shopt -s checkwinsize - eval "$(${lib.getExe pkgs.direnv} hook bash)" + eval "$(${lib.getExe config.programs.direnv.package} hook bash)" ''; }; }; - environment.systemPackages = [pkgs.comma]; + environment = { + systemPackages = [ + pkgs.bottom + pkgs.comma + pkgs.helix + ]; + + variables = { + EDITOR = lib.getExe pkgs.helix; + VISUAL = lib.getExe pkgs.helix; + }; + }; } diff --git a/common/default.nix b/common/default.nix index f9e0703..b2a843f 100644 --- a/common/default.nix +++ b/common/default.nix @@ -1,16 +1,13 @@ { imports = [ ./avahi.nix - ./bash.nix ./boot.nix + ./cli.nix ./dbus.nix ./fs.nix ./fwupd.nix - ./git.nix - ./helix.nix ./nix.nix ./opengl.nix - ./openssh.nix ./readline.nix ./ssh.nix ./sudo.nix diff --git a/common/git.nix b/common/git.nix deleted file mode 100644 index d8ac829..0000000 --- a/common/git.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - programs.git = { - enable = true; - lfs.enable = true; - }; -} diff --git a/common/helix.nix b/common/helix.nix deleted file mode 100644 index 2b29ccf..0000000 --- a/common/helix.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - lib, - pkgs, - ... -}: let - package = pkgs.helix; -in { - environment = { - systemPackages = [package]; - variables = { - EDITOR = lib.getExe package; - VISUAL = lib.getExe package; - }; - }; -} diff --git a/common/opengl.nix b/common/opengl.nix index cc22ba6..f525cf6 100644 --- a/common/opengl.nix +++ b/common/opengl.nix @@ -2,7 +2,7 @@ hardware.opengl = { enable = true; driSupport = true; - extraPackages = with pkgs; [ + extraPackages = [ pkgs.libvdpau-va-gl pkgs.vaapiVdpau ]; diff --git a/common/openssh.nix b/common/openssh.nix deleted file mode 100644 index 267880b..0000000 --- a/common/openssh.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - environment.persistence."/persist".files = [ - "/etc/ssh/ssh_host_ed25519_key" - "/etc/ssh/ssh_host_ed25519_key.pub" - ]; - - age.identityPaths = ["/persist/etc/ssh/ssh_host_ed25519_key"]; - - services.openssh = { - enable = true; - openFirewall = true; - hostKeys = [ - { - path = "/etc/ssh/ssh_host_ed25519_key"; - type = "ed25519"; - } - ]; - settings = { - PermitRootLogin = "no"; - PasswordAuthentication = false; - }; - }; -} diff --git a/common/ssh.nix b/common/ssh.nix index 71c2d04..bf2ddf5 100644 --- a/common/ssh.nix +++ b/common/ssh.nix @@ -1,4 +1,26 @@ {lib, ...}: { + environment.persistence."/persist".files = [ + "/etc/ssh/ssh_host_ed25519_key" + "/etc/ssh/ssh_host_ed25519_key.pub" + ]; + + age.identityPaths = ["/persist/etc/ssh/ssh_host_ed25519_key"]; + + services.openssh = { + enable = true; + openFirewall = true; + hostKeys = [ + { + path = "/etc/ssh/ssh_host_ed25519_key"; + type = "ed25519"; + } + ]; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + }; + }; + programs.ssh.startAgent = true; environment.etc."ssh/ssh_config".text = lib.mkAfter '' diff --git a/scripts/home.sh b/scripts/home.sh index 7c03702..92d15ff 100644 --- a/scripts/home.sh +++ b/scripts/home.sh @@ -205,7 +205,3 @@ if chose helix; then rm --recursive --force -- "$helixdir" ln --force --symbolic -- "$PWD/home/helix" "$helixdir" fi - -if chose syncthing; then - systemctl --user enable syncthing.service -fi