fixed ssh ownership issue & removed hypr swapescape

This commit is contained in:
Sam 2024-05-31 22:52:54 +01:00
parent 57e98861d7
commit 6ce28c8b54
4 changed files with 40 additions and 17 deletions

View File

@ -29,11 +29,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717032306, "lastModified": 1717177033,
"narHash": "sha256-s3Sis+M1qTSVIehHrEKBzHBpqprIFJli5V6WojkJnYE=", "narHash": "sha256-G3CZJafCO8WDy3dyA2EhpUJEmzd5gMJ2IdItAg0Hijw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "8ea5bcccc03111bdedaeaae9380dfab61e9deb33", "rev": "0274af4c92531ebfba4a5bd493251a143bc51f3c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -182,11 +182,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717052710, "lastModified": 1717097707,
"narHash": "sha256-LRhOxzXmOza5SymhOgnEzA8EAQp+94kkeUYWKKpLJ/U=", "narHash": "sha256-HC5vJ3oYsjwsCaSbkIPv80e4ebJpNvFKQTBOGlHvjLs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "29c69d9a466e41d46fd3a7a9d0591ef9c113c2ae", "rev": "0eb314b4f0ba337e88123e0b1e57ef58346aafd9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -255,11 +255,11 @@
"nix-secrets": { "nix-secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1717081517, "lastModified": 1717190678,
"narHash": "sha256-Pvennf20SmdaJ7mZK4I3jjQX8jQy9Hd/KeE64e2uqHU=", "narHash": "sha256-Dz7bJS76gW/yhTBx6n96d/ZN03gsTNY+GCwZXaMlKTg=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "c9a84172f898001d8e1732e7b6872be9d9352cef", "rev": "6e50c8300596629cee6aa72cbb3ab606e68660e8",
"revCount": 80, "revCount": 83,
"type": "git", "type": "git",
"url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git" "url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git"
}, },
@ -270,11 +270,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1716977081, "lastModified": 1717112898,
"narHash": "sha256-pFe5jLeIPlKEln5n2h998d7cpzXFdbrBMRe3suz4K1o=", "narHash": "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ac82a513e55582291805d6f09d35b6d8b60637a1", "rev": "6132b0f6e344ce2fe34fc051b72fb46e34f668e0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -329,11 +329,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1717081007, "lastModified": 1717188043,
"narHash": "sha256-GNr1i6itjFKGXSco3lcdKe8GxEwrmSYFDUpZyXsXWp4=", "narHash": "sha256-qg8Tq7OcKtc0BS4RVUYrMZ+KofgMv6DiXOnqz7TN8CA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "da9bd1f2e8fc8cd8553a76a9e22afd386c18f205", "rev": "1bbd58b6b293840716355e63fb3d5aa5af00d389",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -36,7 +36,6 @@
kb_layout = gb kb_layout = gb
kb_variant = kb_variant =
kb_model = kb_model =
kb_options = caps:swapescape
kb_rules = kb_rules =
follow_mouse = 1 follow_mouse = 1

View File

@ -61,6 +61,18 @@ in
}; };
}; };
# The containing ssh folders are created as root and if this is the first ~/.ssh/ entry when writing keys,
# the ownership is busted and home-manager can't target because it can't write into .ssh...
# FIXME: We might not need this depending on how https://github.com/Mic92/sops-nix/issues/381 is fixed
system.activationScripts.sopsSetSshOwnwership = let
sshFolder = "/home/${username}/.ssh";
user = config.users.users.${username}.name;
group = config.users.users.${username}.group;
in ''
mkdir -p ${sshFolder} || true
chown -R ${user}:${group} /home/${username}/.ssh
'';
services.flatpak.enable = true; services.flatpak.enable = true;
programs.zsh.enable = true; programs.zsh.enable = true;

View File

@ -37,6 +37,18 @@ in
}; };
}; };
# The containing ssh folders are created as root and if this is the first ~/.ssh/ entry when writing keys,
# the ownership is busted and home-manager can't target because it can't write into .ssh...
# FIXME: We might not need this depending on how https://github.com/Mic92/sops-nix/issues/381 is fixed
system.activationScripts.sopsSetSshOwnwership = let
sshFolder = "/home/${username}/.ssh";
user = config.users.users.${username}.name;
group = config.users.users.${username}.group;
in ''
mkdir -p ${sshFolder} || true
chown -R ${user}:${group} /home/${username}/.ssh
'';
programs.zsh.enable = true; programs.zsh.enable = true;
home-manager = { home-manager = {