orbi works and steam is a component now

This commit is contained in:
Ingolf Wagner 2024-02-28 23:17:23 +01:00
parent e69c5844e0
commit 41c802081a
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
14 changed files with 135 additions and 100 deletions

View file

@ -7,17 +7,18 @@ with lib;
imports = [ imports = [
# todo : structure with home-manager and such is not cool, create another structure # todo : structure with home-manager and such is not cool, create another structure
./xorg
./home-manager
./browser.nix
./suspend.nix
./pass.nix
./audio.nix ./audio.nix
./kmonad.nix ./browser.nix
./taskwarrior.nix
./fonts.nix ./fonts.nix
./home-manager
./kmonad.nix
./noti.nix ./noti.nix
./pass.nix
./steam.nix
./suspend.nix
./taskwarrior.nix
./vscode.nix ./vscode.nix
./xorg
]; ];
config = mkIf config.components.gui.enable { 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 # todo : configure this properly
tldr tldr
bandwhich
]; ];
programs.btop.enable = true;
} }
(mkIf config.gui.enable { (mkIf config.gui.enable {
home.packages = [ home.packages = [
libreoffice libreoffice

View file

@ -31,15 +31,6 @@
enableZshIntegration = true; 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 # provide better `Ctrl+r` command in terminal
programs.atuin = { programs.atuin = {
enable = true; enable = true;
@ -53,7 +44,14 @@
auto_sync = true; auto_sync = true;
sync_frequency = "5m"; sync_frequency = "5m";
sync_address = "http://chungus.private:8888"; 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; services.printing.enable = true;
# fonts # fonts

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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