Fix ssh config format

This commit is contained in:
RealStickman 2023-05-06 20:57:11 +02:00
parent 2badb1d1b5
commit 459d84e842

View File

@ -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,27 +50,20 @@ 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
@ -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,19 +91,19 @@ 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";
@ -164,11 +146,13 @@ 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
}; };