Settle on env solution
This commit is contained in:
parent
646689e4ff
commit
7d089187d8
|
@ -126,9 +126,6 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.sessionVariables = config.home.sessionVariables;
|
|
||||||
programs.zsh.sessionVariables = config.home.sessionVariables;
|
|
||||||
pam.sessionVariables = config.home.sessionVariables;
|
|
||||||
home = {
|
home = {
|
||||||
packages = builtins.attrValues my-pkgs.home-pkgs;
|
packages = builtins.attrValues my-pkgs.home-pkgs;
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
|
@ -148,13 +145,5 @@ in {
|
||||||
|
|
||||||
systemd.user = { startServices = true; };
|
systemd.user = { startServices = true; };
|
||||||
|
|
||||||
services = {
|
|
||||||
gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
defaultCacheTtl = 31536000; # 1year
|
|
||||||
maxCacheTtl = 31536000; # 1year
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
let
|
let
|
||||||
inherit (import ../../pkgs) desktop-pkgs my-ssh-add;
|
inherit (import ../../pkgs) desktop-pkgs;
|
||||||
inherit (import ../../lib) colors;
|
inherit (import ../../lib) colors;
|
||||||
in {
|
in {
|
||||||
imports =
|
imports = [ ./sleep-nag.nix ./kitty.nix ./wallpaper.nix ./gnome.nix ];
|
||||||
[ ./ssh-agent.nix ./sleep-nag.nix ./kitty.nix ./wallpaper.nix ./gnome.nix ];
|
|
||||||
m-0.colors = colors;
|
m-0.colors = colors;
|
||||||
home = {
|
home = {
|
||||||
packages = builtins.attrValues desktop-pkgs;
|
packages = builtins.attrValues desktop-pkgs;
|
||||||
file.".zprofile".text = ''
|
file = {
|
||||||
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
".zprofile".text = ''
|
||||||
'';
|
|
||||||
file.".zlogin".text = ''
|
|
||||||
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||||
'';
|
'';
|
||||||
|
".gnupg/gpg-agent.conf".text =
|
||||||
|
"pinentry-program ${pkgs.pinentry.gnome3}/bin/pinentry";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -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";
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,10 +1,8 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (import ../lib) unfreePkgs writeHaskellScript;
|
inherit (import ../lib) unfreePkgs writeHaskellScript;
|
||||||
inherit (import ../pkgs) my-ssh-add;
|
|
||||||
modes = pkgs.lib.attrNames (import ./modes.nix).apollo;
|
modes = pkgs.lib.attrNames (import ./modes.nix).apollo;
|
||||||
autostart-script = pkgs.writeShellScriptBin "home-manager-autostart" ''
|
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"}
|
${pkgs.xorg.xrdb}/bin/xrdb ${builtins.toFile "Xresources" "Xft.dpi: 96"}
|
||||||
'';
|
'';
|
||||||
configPath = "/home/maralorn/git/config";
|
configPath = "/home/maralorn/git/config";
|
||||||
|
|
|
@ -78,13 +78,7 @@ in {
|
||||||
gnome3.chrome-gnome-shell.enable = true;
|
gnome3.chrome-gnome-shell.enable = true;
|
||||||
xserver = {
|
xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
displayManager.gdm = {
|
displayManager.gdm.enable = true;
|
||||||
autoLogin = {
|
|
||||||
enable = true;
|
|
||||||
user = "maralorn";
|
|
||||||
};
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
desktopManager.gnome3.enable = true;
|
desktopManager.gnome3.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,18 +2,6 @@ let
|
||||||
my-lib = import ../lib;
|
my-lib = import ../lib;
|
||||||
inherit (my-lib) pkgs unstable sources writeHaskellScript unBreak colors;
|
inherit (my-lib) pkgs unstable sources writeHaskellScript unBreak colors;
|
||||||
in rec {
|
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;
|
obelisk = (import sources.obelisk { }).command;
|
||||||
nix-direnv = sources.nix-direnv + "/direnvrc";
|
nix-direnv = sources.nix-direnv + "/direnvrc";
|
||||||
neovim = unstable.neovim.override {
|
neovim = unstable.neovim.override {
|
||||||
|
@ -50,7 +38,7 @@ in rec {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
desktop-pkgs = {
|
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.gnomeExtensions) appindicator system-monitor;
|
||||||
inherit (pkgs.gnome3)
|
inherit (pkgs.gnome3)
|
||||||
dconf dconf-editor gnome-tweaks gnome-shell-extensions adwaita-icon-theme
|
dconf dconf-editor gnome-tweaks gnome-shell-extensions adwaita-icon-theme
|
||||||
|
|
Loading…
Reference in a new issue