Started working on guest@euporie
This commit is contained in:
parent
0503a81ee8
commit
230a739327
62 changed files with 188 additions and 135 deletions
hosts/nixos/common
|
@ -44,11 +44,19 @@ in
|
|||
|
||||
# Add each host in this repo to the knownHosts list
|
||||
programs.ssh = {
|
||||
knownHosts = builtins.mapAttrs
|
||||
(name: _: {
|
||||
publicKeyFile = pubKey name;
|
||||
extraHostNames = lib.optional (name == hostname) "localhost";
|
||||
})
|
||||
hosts;
|
||||
knownHosts = lib.pipe hosts [
|
||||
# attrsetof host -> attrsetof { ... }
|
||||
(builtins.mapAttrs
|
||||
# string -> host -> { ... }
|
||||
(name: _: {
|
||||
publicKeyFile = pubKey name;
|
||||
extraHostNames = lib.optional (name == hostname) "localhost";
|
||||
}))
|
||||
|
||||
# attrsetof { ... } -> attrsetof { ... }
|
||||
(lib.attrset.filterAttrs
|
||||
# string -> { ... } -> bool
|
||||
(_: { publicKeyFile, ... }: builtins.pathExists publicKeyFile))
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
{ pkgs, ... }: {
|
||||
security.rtkit.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
|
@ -10,14 +11,17 @@
|
|||
};
|
||||
|
||||
# Volume controls
|
||||
environment.shellAliases = {
|
||||
# Relative
|
||||
"v-up" = "pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
"v-down" = "pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
environment.shellAliases =
|
||||
let pactl = "${pkgs.pulseaudio}/bin/pactl";
|
||||
in
|
||||
{
|
||||
# Relative
|
||||
"v-up" = "${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
"v-down" = "${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
|
||||
# Absolute
|
||||
"v-min" = "pactl set-sink-volume @DEFAULT_SINK@ 0%";
|
||||
"v-mid" = "pactl set-sink-volume @DEFAULT_SINK@ 50%";
|
||||
"v-max" = "pactl set-sink-volume @DEFAULT_SINK@ 100%";
|
||||
};
|
||||
# Absolute
|
||||
"v-min" = "${pactl} set-sink-volume @DEFAULT_SINK@ 0%";
|
||||
"v-mid" = "${pactl} set-sink-volume @DEFAULT_SINK@ 50%";
|
||||
"v-max" = "${pactl} set-sink-volume @DEFAULT_SINK@ 100%";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, outputs, config, ... }:
|
||||
{ pkgs, outputs, config, lib, ... }:
|
||||
let
|
||||
# Record containing all the hosts
|
||||
hosts = outputs.nixosConfigurations;
|
||||
|
@ -16,37 +16,36 @@ in
|
|||
|
||||
# Create an user named adrielus
|
||||
users.adrielus = {
|
||||
# Make fish the default shell
|
||||
shell = pkgs.fish;
|
||||
# Adds me to some default groups, and creates the home dir
|
||||
isNormalUser = true;
|
||||
|
||||
# File containing my password, managed by agenix
|
||||
passwordFile = config.age.secrets.adrielusPassword.path;
|
||||
|
||||
# Set default shell
|
||||
shell = pkgs.fish;
|
||||
|
||||
# Add user to the following groups
|
||||
extraGroups = [
|
||||
"wheel" # access to sudo
|
||||
"network" # for wireless stuff
|
||||
"networkmanager" # I assume this let's me access network stuff?
|
||||
"lp" # Allows me to use printers
|
||||
"docker" # Allows me to use docker (?)
|
||||
"audio" # Allows me to use audio devices
|
||||
"video" # Allows me to use a webcam
|
||||
"uinput" # I think this let's me write to virtual devices
|
||||
"input" # Does this let me use evdev (?)
|
||||
|
||||
# TODO: find out why I added these here a long time ago
|
||||
"sound"
|
||||
"tty"
|
||||
"wheel" # Access to sudo
|
||||
"lp" # Printers
|
||||
"audio" # Audio devices
|
||||
"video" # Webcam and the like
|
||||
"network" # for wireless stuff (???)
|
||||
];
|
||||
|
||||
# Adds me to some default groups, and creates the home dir
|
||||
isNormalUser = true;
|
||||
|
||||
openssh.authorizedKeys.keyFiles =
|
||||
builtins.attrValues # attrsetof path -> path[]
|
||||
(builtins.mapAttrs # ... -> attrsetof host -> attrsetof path
|
||||
(name: _: idKey name) # string -> host -> path
|
||||
hosts);
|
||||
lib.pipe hosts [
|
||||
# attrsetof host -> attrsetof path
|
||||
(builtins.mapAttrs
|
||||
(name: _: idKey name)) # string -> host -> path
|
||||
|
||||
# attrsetof path -> path[]
|
||||
builtins.attrValues
|
||||
|
||||
# path[] -> path[]
|
||||
(builtins.filter builtins.pathExists)
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue