1
0
Fork 0

Settle on env solution

This commit is contained in:
Malte Brandy 2020-05-21 17:32:21 +02:00
parent 646689e4ff
commit 7d089187d8
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9
6 changed files with 11 additions and 58 deletions

View file

@ -126,9 +126,6 @@ in {
};
};
systemd.user.sessionVariables = config.home.sessionVariables;
programs.zsh.sessionVariables = config.home.sessionVariables;
pam.sessionVariables = config.home.sessionVariables;
home = {
packages = builtins.attrValues my-pkgs.home-pkgs;
sessionVariables = {
@ -148,13 +145,5 @@ in {
systemd.user = { startServices = true; };
services = {
gpg-agent = {
enable = true;
defaultCacheTtl = 31536000; # 1year
maxCacheTtl = 31536000; # 1year
};
};
xdg.enable = true;
}

View file

@ -1,19 +1,19 @@
{ pkgs, lib, config, ... }:
let
inherit (import ../../pkgs) desktop-pkgs my-ssh-add;
inherit (import ../../pkgs) desktop-pkgs;
inherit (import ../../lib) colors;
in {
imports =
[ ./ssh-agent.nix ./sleep-nag.nix ./kitty.nix ./wallpaper.nix ./gnome.nix ];
imports = [ ./sleep-nag.nix ./kitty.nix ./wallpaper.nix ./gnome.nix ];
m-0.colors = colors;
home = {
packages = builtins.attrValues desktop-pkgs;
file.".zprofile".text = ''
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
'';
file.".zlogin".text = ''
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
'';
file = {
".zprofile".text = ''
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
'';
".gnupg/gpg-agent.conf".text =
"pinentry-program ${pkgs.pinentry.gnome3}/bin/pinentry";
};
};
gtk = {
enable = true;

View file

@ -1,16 +0,0 @@
{ pkgs, config, lib, ... }: {
xsession.initExtra = let
cat-pw = pkgs.writeShellScriptBin "cat-ssh-pw" ''
pass eu/m-0/${config.m-0.hostName}.m-0.eu/ssh-key
'';
start-agent = pkgs.writeShellScriptBin "start-ssh-agent" ''
${pkgs.psmisc}/bin/killall -q ssh-agent
eval `${pkgs.openssh}/bin/ssh-agent -s`
systemctl --user set-environment SSH_AUTH_SOCK="$SSH_AUTH_SOCK"
systemctl --user set-environment SSH_AGENT_PID="$SSH_AGENT_PID"
SSH_ASKPASS=${cat-pw}/bin/cat-ssh-pw ${pkgs.openssh}/bin/ssh-add & < /dev/null
'';
in ". ${start-agent}/bin/start-ssh-agent";
}

View file

@ -1,10 +1,8 @@
{ pkgs, lib, ... }:
let
inherit (import ../lib) unfreePkgs writeHaskellScript;
inherit (import ../pkgs) my-ssh-add;
modes = pkgs.lib.attrNames (import ./modes.nix).apollo;
autostart-script = pkgs.writeShellScriptBin "home-manager-autostart" ''
${my-ssh-add}/bin/my-ssh-add
${pkgs.xorg.xrdb}/bin/xrdb ${builtins.toFile "Xresources" "Xft.dpi: 96"}
'';
configPath = "/home/maralorn/git/config";

View file

@ -78,13 +78,7 @@ in {
gnome3.chrome-gnome-shell.enable = true;
xserver = {
enable = true;
displayManager.gdm = {
autoLogin = {
enable = true;
user = "maralorn";
};
enable = true;
};
displayManager.gdm.enable = true;
desktopManager.gnome3.enable = true;
};
};

View file

@ -2,18 +2,6 @@ let
my-lib = import ../lib;
inherit (my-lib) pkgs unstable sources writeHaskellScript unBreak colors;
in rec {
start-ssh-agent = pkgs.writeShellScriptBin "start-ssh-agent" ''
${pkgs.psmisc}/bin/killall -q ssh-agent
eval `${pkgs.openssh}/bin/ssh-agent -s`
systemctl --user set-environment SSH_AUTH_SOCK="$SSH_AUTH_SOCK"
systemctl --user set-environment SSH_AGENT_PID="$SSH_AGENT_PID"
'';
cat-pw = pkgs.writeShellScriptBin "cat-ssh-pw" ''
pass eu/m-0/$(hostname).m-0.eu/ssh-key
'';
my-ssh-add = pkgs.writeShellScriptBin "my-ssh-add" ''
SSH_ASKPASS=${cat-pw}/bin/cat-ssh-pw ${pkgs.openssh}/bin/ssh-add < /dev/null
'';
obelisk = (import sources.obelisk { }).command;
nix-direnv = sources.nix-direnv + "/direnvrc";
neovim = unstable.neovim.override {
@ -50,7 +38,7 @@ in rec {
'';
};
desktop-pkgs = {
inherit (pkgs) lm_sensors xwayland dmenu xdg_utils libnotify;
inherit (pkgs) lm_sensors xwayland dmenu xdg_utils libnotify pinentry;
inherit (pkgs.gnomeExtensions) appindicator system-monitor;
inherit (pkgs.gnome3)
dconf dconf-editor gnome-tweaks gnome-shell-extensions adwaita-icon-theme