orbi works and steam is a component now

feature/clan.lol
Ingolf Wagner 2024-02-28 23:17:23 +01:00
parent e69c5844e0
commit 41c802081a
Signed by: palo
GPG Key ID: 76BF5F1928B9618B
14 changed files with 135 additions and 100 deletions

View File

@ -7,17 +7,18 @@ with lib;
imports = [
# todo : structure with home-manager and such is not cool, create another structure
./xorg
./home-manager
./browser.nix
./suspend.nix
./pass.nix
./audio.nix
./kmonad.nix
./taskwarrior.nix
./browser.nix
./fonts.nix
./home-manager
./kmonad.nix
./noti.nix
./pass.nix
./steam.nix
./suspend.nix
./taskwarrior.nix
./vscode.nix
./xorg
];
config = mkIf config.components.gui.enable {

View File

@ -0,0 +1,40 @@
{ config, pkgs, lib, ... }:
with lib;
{
options.components.gui.steam.enable = mkOption {
type = lib.types.bool;
default = config.components.gui.enable;
};
config = mkIf (config.components.gui.steam.enable) {
environment.systemPackages = [
(pkgs.writeShellScriptBin "steam" ''
/var/run/wrappers/bin/sudo -u steam -i ${pkgs.steam}/bin/steam $@
'')
pkgs.xorg.xhost
# to use xbox controllers
pkgs.xboxdrv
];
users.users.steam = {
isNormalUser = false;
isSystemUser = true;
home = "/home/steam";
createHome = true;
extraGroups = [ "audio" "input" "video" "pipewire" ];
group = "steam";
shell = pkgs.bashInteractive;
};
users.groups.steam = { };
# for steam
# ---------
hardware.opengl.driSupport = true;
hardware.opengl.driSupport32Bit = true;
security.sudo.extraConfig = ''
${config.users.extraUsers.mainUser.name} ALL=(steam) NOPASSWD: ALL
'';
};
}

View File

@ -20,8 +20,14 @@ with lib;
# todo : configure this properly
tldr
bandwhich
];
programs.btop.enable = true;
}
(mkIf config.gui.enable {
home.packages = [
libreoffice

View File

@ -31,15 +31,6 @@
enableZshIntegration = true;
};
# provide better `Ctrl+r` command in terminal
#programs.mcfly = {
# enable = true;
# keyScheme = "vim";
# fuzzySearchFactor = 3;
# enableZshIntegration = true;
# enableBashIntegration = true;
#};
# provide better `Ctrl+r` command in terminal
programs.atuin = {
enable = true;
@ -53,7 +44,14 @@
auto_sync = true;
sync_frequency = "5m";
sync_address = "http://chungus.private:8888";
search_mode = "skim";
search_mode = "fuzzy";
style = "full";
inline_height = 20;
# With workspace filtering enabled, Atuin will filter for commands executed
# in any directory within a git repository tree.
workspaces = true;
};
};
}

View File

@ -115,7 +115,6 @@
};
};
programs.custom.steam.enable = true;
services.printing.enable = true;
# fonts

View File

@ -9,8 +9,9 @@
../../components
../../modules
./disko-config.nix
./hetzner.nix
#./disko-config.nix
#./hetzner.nix
./hardware-configuration
# services
#./borg.nix
@ -52,6 +53,7 @@
#./cache.nix
];
networking.hostName = "orbi";
components.terminal.enable = true;
components.mainUser.enable = true;

View File

@ -2,7 +2,6 @@
let
hostName = "orbi";
# apt install -y lshw
# lshw -C network | grep -Poh 'driver=[[:alnum:]]+'
@ -27,7 +26,13 @@ let
in
{
# needed lvm for raid
imports = [
./disko-config.nix
./hardware-configuration.nix
];
# luks unlock zeug
#boot.initrd.kernelModules = [ ];
#boot.initrd.systemd.users.root.shell = "/bin/cryptsetup-askpass";
#boot.initrd.systemd.services.openssh = {
@ -46,7 +51,6 @@ in
# { path = "/boot_sdb"; devices = [ "/dev/sdb" ]; }
#];
networking.hostName = hostName;
# Network configuration (Hetzner uses static IP assignments, and we don't use DHCP here)
#networking.useDHCP = false;

View File

@ -4,8 +4,7 @@
# nixos-install
{ config, lib, ... }:
let
#disks = [ "sda" "sdb" ];
disks = [ "sda" ];
disks = [ "sda" "sdb" ];
in
{
# ZFS already has its own scheduler. Without this my(@Artturin) computer froze for a second when i nix build something.
@ -18,38 +17,28 @@ in
disko.devices = {
disk =
lib.genAttrs disks (disk: {
#name = disk;
type = "disk";
device = "/dev/${disk}";
content = {
type = "gpt";
partitions = {
boot = {
priority = 0;
#start = "0";
#end = "1M";
priority = 0;
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
priority = 1;
#start = "1M";
#end = "500M";
priority = 1;
size = "500M";
type = "EF00";
# bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
#mountpoint = "/boot_${disk}";
mountpoint = if disk == "sda" then "/boot" else "/boot_${disk}";
mountOptions = [ "defaults" ];
};
};
root = {
#name = "zfs";
#start = "500M";
#end = "500G";
priority = 10;
size = "500G";
# content = {
@ -68,26 +57,24 @@ in
};
# };
};
#media = {
# #name = "zfs";
# #start = "500G";
# #end = "100%";
# size = "100%";
# # content = {
# # type = "luks";
# # settings = {
# # # if you want to use the key for interactive login be sure there is no trailing newline
# # # for example use `echo -n "password" > /run/secret.key`
# # keyFile = "/run/secret.key";
# # allowDiscards = true;
# # };
# # name = "media_${disk}";
# content = {
# type = "zfs";
# pool = "zmedia";
# };
# # };
#};
media = {
priority = 50;
size = "100%";
# content = {
# type = "luks";
# settings = {
# # if you want to use the key for interactive login be sure there is no trailing newline
# # for example use `echo -n "password" > /run/secret.key`
# keyFile = "/run/secret.key";
# allowDiscards = true;
# };
# name = "media_${disk}";
content = {
type = "zfs";
pool = "zmedia";
};
# };
};
};
};
});
@ -97,7 +84,7 @@ in
zroot = {
type = "zpool";
#mode = "mirror";
mode = "mirror";
rootFsOptions = {
mountpoint = "none";
canmount = "off";
@ -124,39 +111,40 @@ in
};
# `zpool import -f zraid` once on the first boot and reboot
#zmedia = {
# type = "zpool";
# rootFsOptions = {
# mountpoint = "none";
# canmount = "off";
# };
# datasets = {
# "media" = {
# type = "zfs_fs";
# mountpoint = "/media";
# options = {
# mountpoint = "legacy";
# compression = "lz4";
# #"com.sun:auto-snapshot:daily" = false;
# #"com.sun:auto-snapshot:weekly" = false;
# #"com.sun:auto-snapshot:monthly" = false;
# };
# };
# # todo make sure this disk has some minimum space
# "nextcloud" = {
# type = "zfs_fs";
# mountpoint = "/var/lib/nextcloud";
# options = {
# mountpoint = "legacy";
# compression = "lz4";
# "com.sun:auto-snapshot:hourly" = toString true;
# "com.sun:auto-snapshot:daily" = toString true;
# #"com.sun:auto-snapshot:weekly" = false;
# #"com.sun:auto-snapshot:monthly" = false;
# };
# };
# };
#};
zmedia = {
type = "zpool";
rootFsOptions = {
mountpoint = "none";
canmount = "off";
};
datasets = {
"media" = {
type = "zfs_fs";
mountpoint = "/media";
options = {
mountpoint = "legacy";
compression = "lz4";
#"com.sun:auto-snapshot:daily" = false;
#"com.sun:auto-snapshot:weekly" = false;
#"com.sun:auto-snapshot:monthly" = false;
};
};
# todo make sure this disk has some minimum space
"nextcloud" = {
type = "zfs_fs";
mountpoint = "/var/lib/nextcloud";
options = {
mountpoint = "legacy";
compression = "lz4";
"com.sun:auto-snapshot:hourly" = toString true;
"com.sun:auto-snapshot:daily" = toString true;
#"com.sun:auto-snapshot:weekly" = false;
#"com.sun:auto-snapshot:monthly" = false;
};
};
};
};
};
};

View File

@ -46,8 +46,6 @@
};
};
programs.custom.steam.enable = false;
# keyboard fiddling
i18n.defaultLocale = "de_DE.UTF-8";
console.keyMap = "de";

View File

@ -25,7 +25,6 @@
components.mainUser.enable = true;
users.users.mainUser.extraGroups = [ "adbusers" "video" ];
programs.custom.steam.enable = false;
services.printing.enable = false;
services.nginx.enable = true;

View File

@ -6,15 +6,15 @@
./services/castget.nix
./services/rbackup.nix
./services/home-assistant.nix
./services/lektor.nix
#./services/home-assistant.nix
#./services/lektor.nix
./services/samba-share.nix
./services/videoencoder.nix
#./services/videoencoder.nix
./services/taskwarrior-pushover.nix
./services/taskwarrior-autotag.nix
./programs/browser.nix
./programs/citate.nix
#./programs/citate.nix
./programs/curl-scripts.nix
#./programs/easytag.nix
#./programs/elm.nix

View File

@ -47,6 +47,7 @@ in
security.sudo.extraConfig = ''
${config.users.extraUsers.mainUser.name} ALL=(steam) NOPASSWD: ALL
'';
};
}

View File

@ -23,7 +23,6 @@
};
curlScripts.enable = true;
citate.enable = true;
};