1
Fork 0

Set up the basics of imperanence

This commit is contained in:
Matei Adriel 2023-04-27 02:08:20 +03:00
parent 7bd9d9aa0b
commit 78f154b38a
No known key found for this signature in database
20 changed files with 224 additions and 134 deletions
hosts/nixos/common

View file

@ -6,7 +6,7 @@ let
inputs.stylix.nixosModules.stylix
inputs.slambda.nixosModule
inputs.nur.nixosModules.nur
# inputs.impermanence.nixosModule
inputs.impermanence.nixosModule
./nix.nix
./openssh.nix
@ -20,9 +20,9 @@ in
# Import all modules defined in modules/nixos
imports = builtins.attrValues outputs.nixosModules ++ imports;
age.identityPaths = [
"/etc/ssh/ssh_host_ed25519_key"
];
# Allow non root users to specify the "allowOther" option.
# See [the imperanence readme](https://github.com/nix-community/impermanence#home-manager)
programs.fuse.userAllowOther = true;
nixpkgs = {
# Add all overlays defined in the overlays directory

View file

@ -30,10 +30,13 @@ in
gatewayPorts = "clientspecified";
# Generate ssh key
hostKeys = [{
path = "/persist/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}];
hostKeys =
let mkKey = type: path: extra: { inherit type path; } // extra;
in
[
(mkKey "ed25519" "/persist/etc/ssh/ssh_host_ed25519_key" { })
(mkKey "rsa" "/persist/etc/ssh/ssh_host_rsa_key" { bits = 4096; })
];
};
# Passwordless sudo when SSH'ing with keys

View file

@ -43,10 +43,9 @@
# Ensure group exists
users.groups.network = { };
# TODO: figure out why this does not work!
# Persist imperative config
# environment.persistence = {
# "/persist".files = [
# "/etc/wpa_supplicant.conf"
# ];
# };
# environment.persistence."/persist".files = [
# "/etc/wpa_supplicant.conf"
# ];
}

View file

@ -7,7 +7,7 @@
# How fast we should scroll I think
accelSpeed = "3.5";
# #TODO: I forgor what this did
# TODO: I forgor what this did
naturalScrolling = true;
# Dsiable the touchpad while typing

View file

@ -0,0 +1,10 @@
{ pkgs, lib, ... }: {
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [ pkgs.xdg-desktop-portal ];
};
# HACK: copied from @lily on discord.
systemd.user.services.xdg-desktop-portal.path = lib.mkAfter [ "/run/current-system/sw" ];
}