Fix ssh config format
This commit is contained in:
parent
2badb1d1b5
commit
459d84e842
@ -3,25 +3,20 @@
|
|||||||
let
|
let
|
||||||
user = "exu";
|
user = "exu";
|
||||||
hostname = "nixos";
|
hostname = "nixos";
|
||||||
in
|
in {
|
||||||
{
|
imports = [ <home-manager/nixos> ];
|
||||||
imports = [
|
|
||||||
<home-manager/nixos>
|
|
||||||
];
|
|
||||||
|
|
||||||
# root home
|
# root home
|
||||||
home-manager.users.root = { pkgs, ... }: {
|
home-manager.users.root = { pkgs, ... }: {
|
||||||
home.username = "root";
|
home.username = "root";
|
||||||
home.homeDirectory = "/root";
|
home.homeDirectory = "/root";
|
||||||
home.stateVersion = "22.11";
|
home.stateVersion = "22.11";
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs;
|
||||||
kitty # terminfo support
|
[
|
||||||
];
|
kitty # terminfo support
|
||||||
|
];
|
||||||
|
|
||||||
imports = [
|
imports = [ ./home-manager/hyprland.nix ./home-manager/fish.nix ];
|
||||||
./home-manager/hyprland.nix
|
|
||||||
./home-manager/fish.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -55,33 +50,26 @@ in
|
|||||||
transmission-remote-gtk # torrent remote controll gui
|
transmission-remote-gtk # torrent remote controll gui
|
||||||
];
|
];
|
||||||
|
|
||||||
imports = [
|
imports = [ ./home-manager/hyprland.nix ./home-manager/fish.nix ];
|
||||||
./home-manager/hyprland.nix
|
|
||||||
./home-manager/fish.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.user = {
|
systemd.user = {
|
||||||
# user services
|
# user services
|
||||||
services = {
|
services = {
|
||||||
# ssh-agent user service
|
# ssh-agent user service
|
||||||
ssh-agent = {
|
ssh-agent = {
|
||||||
Unit = {
|
Unit = { Description = "SSH key agent"; };
|
||||||
Description = "SSH key agent";
|
|
||||||
};
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
Environment = "SSH_AUTH_SOCK=%t/ssh-agent.socket";
|
Environment = "SSH_AUTH_SOCK=%t/ssh-agent.socket";
|
||||||
ExecStart = "${pkgs.openssh}/bin/ssh-agent -D -a $SSH_AUTH_SOCK";
|
ExecStart = "${pkgs.openssh}/bin/ssh-agent -D -a $SSH_AUTH_SOCK";
|
||||||
};
|
};
|
||||||
Install = {
|
Install = { WantedBy = [ "default.target" ]; };
|
||||||
WantedBy = [ "default.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# user environment variables
|
# user environment variables
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
# see https://discourse.nixos.org/t/how-to-use-xdg-runtime-dir-in-pam-sessionvariables/10120/3 about the builtin variable
|
# see https://discourse.nixos.org/t/how-to-use-xdg-runtime-dir-in-pam-sessionvariables/10120/3 about the builtin variable
|
||||||
SSH_AUTH_SOCK = "${builtins.getEnv"XDG_RUNTIME_DIR"}/ssh-agent.socket";
|
SSH_AUTH_SOCK = "${builtins.getEnv "XDG_RUNTIME_DIR"}/ssh-agent.socket";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -89,19 +77,13 @@ in
|
|||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
init = {
|
init = { defaultBranch = "main"; };
|
||||||
defaultBranch = "main";
|
|
||||||
};
|
|
||||||
user = {
|
user = {
|
||||||
name = "RealStickman";
|
name = "RealStickman";
|
||||||
email = "mrc@frm01.net";
|
email = "mrc@frm01.net";
|
||||||
};
|
};
|
||||||
gitlab = {
|
gitlab = { user = "RealStickman"; };
|
||||||
user = "RealStickman";
|
github = { user = "RealStickman"; };
|
||||||
};
|
|
||||||
github = {
|
|
||||||
user = "RealStickman";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -109,35 +91,35 @@ in
|
|||||||
waybar = {
|
waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
mainBar = (builtins.fromJSON (builtins.readFile ./home-manager/config/waybar/config.json));
|
mainBar = (builtins.fromJSON
|
||||||
|
(builtins.readFile ./home-manager/config/waybar/config.json));
|
||||||
};
|
};
|
||||||
style = (builtins.readFile ./home-manager/config/waybar/style.css);
|
style = (builtins.readFile ./home-manager/config/waybar/style.css);
|
||||||
};
|
};
|
||||||
kitty = {
|
kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = (builtins.readFile ./home-manager/config/kitty/kitty.conf);
|
extraConfig =
|
||||||
|
(builtins.readFile ./home-manager/config/kitty/kitty.conf);
|
||||||
};
|
};
|
||||||
ssh = {
|
ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraOptionOverrides = {
|
extraOptionOverrides = { AddKeysToAgent = "yes"; };
|
||||||
extraConfig = "AddKeysToAgent yes";
|
|
||||||
};
|
|
||||||
matchBlocks = [
|
matchBlocks = [
|
||||||
{
|
{
|
||||||
host = "gitlab.com";
|
host = "gitlab.com";
|
||||||
identityFile = [ "${builtins.getEnv"HOME"}/.ssh/id_ed25519_git" ];
|
identityFile = [ "${builtins.getEnv "HOME"}/.ssh/id_ed25519_git" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
host = "github.com";
|
host = "github.com";
|
||||||
identityFile = [ "${builtins.getEnv"HOME"}/.ssh/id_ed25519_git" ];
|
identityFile = [ "${builtins.getEnv "HOME"}/.ssh/id_ed25519_git" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
host = "gitea.exu.li";
|
host = "gitea.exu.li";
|
||||||
identityFile = [ "${builtins.getEnv"HOME"}/.ssh/id_ed25519_git" ];
|
identityFile = [ "${builtins.getEnv "HOME"}/.ssh/id_ed25519_git" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
host = "aur.archlinux.org";
|
host = "aur.archlinux.org";
|
||||||
identityFile = [ "${builtins.getEnv"HOME"}/.ssh/id_ed25519_git" ];
|
identityFile = [ "${builtins.getEnv "HOME"}/.ssh/id_ed25519_git" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@ -164,15 +146,17 @@ in
|
|||||||
# xdg user dirs
|
# xdg user dirs
|
||||||
".config/user-dirs.dirs".source = ./home-manager/config/user-dirs.dirs;
|
".config/user-dirs.dirs".source = ./home-manager/config/user-dirs.dirs;
|
||||||
# xdg user locales
|
# xdg user locales
|
||||||
".config/user-dirs.locale".source = ./home-manager/config/user-dirs.locale;
|
".config/user-dirs.locale".source =
|
||||||
|
./home-manager/config/user-dirs.locale;
|
||||||
# libreoffice settings
|
# libreoffice settings
|
||||||
".config/libreoffice".source = ./home-manager/config/libreoffice;
|
".config/libreoffice".source = ./home-manager/config/libreoffice;
|
||||||
# transmission remote settings
|
# transmission remote settings
|
||||||
".config/transmission-remote-gtk".source = ./home-manager/config/transmission-remote-gtk;
|
".config/transmission-remote-gtk".source =
|
||||||
|
./home-manager/config/transmission-remote-gtk;
|
||||||
# TODO firefox configuration
|
# TODO firefox configuration
|
||||||
# TODO calibre configuration
|
# TODO calibre configuration
|
||||||
};
|
};
|
||||||
|
|
||||||
services.mako.enable = true;
|
services.mako.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user