1
Fork 0

Started working on guest@euporie

This commit is contained in:
Matei Adriel 2023-05-28 02:00:10 +02:00
parent 0503a81ee8
commit 230a739327
No known key found for this signature in database
62 changed files with 188 additions and 135 deletions
hosts/nixos

View file

@ -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))
];
};
}

View file

@ -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%";
};
}

View file

@ -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)
];
};
};
}

View file

@ -1,34 +0,0 @@
{ inputs, outputs, lib, config, pkgs, ... }: {
imports = [
../common/global
../common/users/adrielus.nix
../common/optional/pipewire.nix
../common/optional/touchpad.nix
../common/optional/xserver.nix
../common/optional/lightdm.nix
../common/optional/steam.nix
../common/optional/slambda.nix
../common/optional/xdg-portal.nix
../common/optional/hyprland.nix
../common/optional/xmonad
./hardware-configuration.nix
./boot.nix
];
# Set the name of this machine!
networking.hostName = "tethys";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "22.11";
# {{{ A few ad-hoc hardware settings
hardware.opengl.enable = true;
hardware.opentabletdrivers.enable = true;
# }}}
# {{{ A few ad-hoc programs
programs.kdeconnect.enable = true;
programs.extra-container.enable = true;
# }}}
}

View file

@ -0,0 +1,17 @@
{
imports = [
../common/global
../common/optional/pipewire.nix
../common/optional/touchpad.nix
../common/optional/lightdm.nix
../common/optional/xdg-portal.nix
../common/optional/hyprland.nix
];
# Set the name of this machine!
networking.hostName = "euporie";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "22.11";
}

View file

@ -1,4 +1,4 @@
{ inputs, outputs, lib, config, pkgs, ... }: {
{
imports = [
../common/global
../common/users/adrielus.nix