ma x.r: migrate to gnome

This commit is contained in:
makefu 2023-06-03 15:27:17 +02:00
parent bf8facca36
commit dd0a6294c8
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225
8 changed files with 217 additions and 62 deletions

View File

@ -48,6 +48,16 @@
{ bits = 4096; path = (toString <secrets/ssh_host_rsa_key>); type = "rsa";} { bits = 4096; path = (toString <secrets/ssh_host_rsa_key>); type = "rsa";}
]; ];
} }
#{
# imports = [
# <stockholm/makefu/2configs/bureautomation/rhasspy.nix>
# ];
# services.pipewire.config.pipewire-pulse = {
# "pulse.properties"."server.address" = [ "unix:native" "tcp:4713" ];
# };
# networking.firewall.allowedTCPPorts = [ 4713 ];
#}
#{ #{
# users.users.makefu.packages = with pkgs;[ mpc_cli ncmpcpp ]; # users.users.makefu.packages = with pkgs;[ mpc_cli ncmpcpp ];
@ -130,7 +140,7 @@
# <stockholm/makefu/2configs/deployment/hound> # <stockholm/makefu/2configs/deployment/hound>
# <stockholm/makefu/2configs/deployment/photostore.krebsco.de.nix> # <stockholm/makefu/2configs/deployment/photostore.krebsco.de.nix>
# <stockholm/makefu/2configs/deployment/bureautomation/hass.nix> # <stockholm/makefu/2configs/deployment/bureautomation/hass.nix>
<stockholm/makefu/2configs/bureautomation/office-radio> # <stockholm/makefu/2configs/bureautomation/office-radio>
# Krebs # Krebs
<stockholm/makefu/2configs/tinc/retiolum.nix> <stockholm/makefu/2configs/tinc/retiolum.nix>
@ -146,7 +156,7 @@
<stockholm/makefu/2configs/mail-client.nix> <stockholm/makefu/2configs/mail-client.nix>
<stockholm/makefu/2configs/printer.nix> <stockholm/makefu/2configs/printer.nix>
# <stockholm/makefu/2configs/syncthing.nix> # <stockholm/makefu/2configs/syncthing.nix>
<stockholm/makefu/2configs/sync> # <stockholm/makefu/2configs/sync>
# Virtualization # Virtualization
# <stockholm/makefu/2configs/virtualisation/libvirt.nix> # <stockholm/makefu/2configs/virtualisation/libvirt.nix>
@ -179,6 +189,7 @@
# temporary # temporary
# { services.redis.enable = true; } # { services.redis.enable = true; }
# citadel exporter
# { services.mongodb.enable = true; } # { services.mongodb.enable = true; }
# { services.elasticsearch.enable = true; } # { services.elasticsearch.enable = true; }
# <stockholm/makefu/2configs/deployment/nixos.wiki> # <stockholm/makefu/2configs/deployment/nixos.wiki>
@ -189,27 +200,28 @@
# <stockholm/makefu/2configs/lanparty/lancache-dns.nix> # <stockholm/makefu/2configs/lanparty/lancache-dns.nix>
# <stockholm/makefu/2configs/lanparty/samba.nix> # <stockholm/makefu/2configs/lanparty/samba.nix>
# <stockholm/makefu/2configs/lanparty/mumble-server.nix> # <stockholm/makefu/2configs/lanparty/mumble-server.nix>
<stockholm/makefu/2configs/wireguard/wiregrill.nix>
{ # {
networking.wireguard.interfaces.wg0 = { # networking.wireguard.interfaces.wg0 = {
ips = [ "10.244.0.2/24" ]; # ips = [ "10.244.0.2/24" ];
privateKeyFile = (toString <secrets>) + "/wireguard.key"; # privateKeyFile = (toString <secrets>) + "/wireguard.key";
allowedIPsAsRoutes = true; # allowedIPsAsRoutes = true;
peers = [ # peers = [
{ # {
# gum # # gum
endpoint = "${config.krebs.hosts.gum.nets.internet.ip4.addr}:51820"; # endpoint = "${config.krebs.hosts.gum.nets.internet.ip4.addr}:51820";
allowedIPs = [ "10.244.0.0/24" ]; # allowedIPs = [ "10.244.0.0/24" ];
publicKey = "yAKvxTvcEVdn+MeKsmptZkR3XSEue+wSyLxwcjBYxxo="; # publicKey = "yAKvxTvcEVdn+MeKsmptZkR3XSEue+wSyLxwcjBYxxo=";
} # }
#{ # #{
# # vbob # # # vbob
# allowedIPs = [ "10.244.0.3/32" ]; # # allowedIPs = [ "10.244.0.3/32" ];
# publicKey = "Lju7EsCu1OWXhkhdNR7c/uiN60nr0TUPHQ+s8ULPQTw="; # # publicKey = "Lju7EsCu1OWXhkhdNR7c/uiN60nr0TUPHQ+s8ULPQTw=";
#} # #}
]; # ];
}; # };
} # }
]; ];

View File

@ -0,0 +1,6 @@
{ pkgs, ... }:
{
powerManagement.powertop.enable = true;
services.power-profiles-daemon.enable = true;
users.users.makefu.packages = [ pkgs.gnome.gnome-power-manager ];
}

View File

@ -4,6 +4,7 @@
imports = [ imports = [
./zfs.nix ./zfs.nix
./input.nix ./input.nix
./battery.nix
<stockholm/makefu/2configs/hw/bluetooth.nix> <stockholm/makefu/2configs/hw/bluetooth.nix>
<nixos-hardware/lenovo/thinkpad/l14/amd> # close enough <nixos-hardware/lenovo/thinkpad/l14/amd> # close enough
# <stockholm/makefu/2configs/hw/tpm.nix> # <stockholm/makefu/2configs/hw/tpm.nix>
@ -17,23 +18,26 @@
# services.xserver.enable = lib.mkForce false; # services.xserver.enable = lib.mkForce false;
services.xserver.videoDrivers = [ services.xserver.videoDrivers = [ "amdgpu" ];
"amdgpu" boot.initrd.kernelModules = [ "amdgpu" ];
hardware.opengl.driSupport = true;
hardware.opengl.extraPackages = [ pkgs.amdvlk pkgs.rocm-opencl-icd pkgs.rocm-opencl-runtime ];
# For 32 bit applications
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages32 = with pkgs; [
driversi686Linux.amdvlk
]; ];
hardware.opengl.extraPackages = [ pkgs.amdvlk pkgs.rocm-opencl-icd ];
# is required for amd graphics support ( xorg wont boot otherwise ) # is required for amd graphics support ( xorg wont boot otherwise )
#boot.kernelPackages = pkgs.linuxPackages_latest; #boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = lib.mkForce pkgs.linuxPackages; boot.kernelPackages = lib.mkForce pkgs.linuxPackages;
environment.variables.VK_ICD_FILENAMES =
"/run/opengl-driver/share/vulkan/icd.d/amd_icd64.json";
services.fwupd.enable = true; services.fwupd.enable = true;
programs.light.enable = true; programs.light.enable = true;
users.groups.video = {}; users.groups.video = {};
users.users.makefu.extraGroups = [ "video" ]; users.groups.render = {};
users.users.makefu.extraGroups = [ "video" "render" ];
boot.extraModprobeConfig = '' boot.extraModprobeConfig = ''
options thinkpad_acpi fan_control=1 options thinkpad_acpi fan_control=1

View File

@ -0,0 +1,67 @@
{ disk ? "/dev/sda", ... }: {
disko.devices = {
disk = {
nvme = {
type = "disk";
device = disk;
content = {
type = "table";
format = "gpt";
partitions = [
{
name = "ESP";
start = "0";
end = "512MiB";
fs-type = "fat32";
bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
}
{
name = "zfs";
start = "512MiB";
end = "100%";
content = {
type = "zfs";
pool = "tank";
};
}
];
};
};
};
zpool = {
tank = {
type = "zpool";
rootFsOptions = {
compression = "lz4";
#reservation = "5G";
"com.sun:auto-snapshot" = "false";
};
mountpoint = null;
postCreateHook = "zfs snapshot tank@blank";
datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
options = {
encryption = "aes-256-gcm";
keyformat = "passphrase";
"com.sun:auto-snapshot" = "true";
};
#keylocation = "file:///tmp/secret.key";
};
"root/home" = {
type = "zfs_fs";
mountpoint = "/home";
};
};
};
};
};
}

View File

@ -4,14 +4,16 @@
# 1. for pressing insert hold shift+fn+Fin # 1. for pressing insert hold shift+fn+Fin
# scroll by holding middle mouse # scroll by holding middle mouse
services.xserver.displayManager.sessionCommands ='' #services.xserver.displayManager.sessionCommands =''
xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation" 8 1 # xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation" 8 1
xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Button" 8 2 # xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Button" 8 2
xinput set-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5 # xinput set-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5
# configure timeout of pressing and holding middle button # # configure timeout of pressing and holding middle button
# xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Timeout" 8 200 # # xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Timeout" 8 200
xinput disable 'ETPS/2 Elantech Touchpad' # xinput disable 'ETPS/2 Elantech Touchpad'
''; #'';
services.xserver.libinput.enable = true;
boot.kernelParams = [ boot.kernelParams = [
#"psmouse.proto=imps" #"psmouse.proto=imps"
#"psmouse.proto=bare" #"psmouse.proto=bare"
@ -27,20 +29,20 @@
{ keys = [ 224 ]; events = [ "key" ]; command = "${pkgs.light}/bin/light -U 10"; } # fn - F6 { keys = [ 224 ]; events = [ "key" ]; command = "${pkgs.light}/bin/light -U 10"; } # fn - F6
# fn - 4 => suspend # fn - 4 => suspend
# fn - d => lcdshadow # fn - d => lcdshadow
{ keys = [ 227 ]; events = [ "key" ]; command = builtins.toString ( # fn - F7 #{ keys = [ 227 ]; events = [ "key" ]; command = builtins.toString ( # fn - F7
pkgs.writers.writeDash "toggle_touchpad" '' # pkgs.writers.writeDash "toggle_touchpad" ''
PATH=${lib.makeBinPath [ pkgs.xorg.xinput pkgs.gnugrep ]} # PATH=${lib.makeBinPath [ pkgs.xorg.xinput pkgs.gnugrep ]}
DISPLAY=:0 # DISPLAY=:0
export DISPLAY PATH # export DISPLAY PATH
device=$(xinput list --name-only | grep Touchpad) # device=$(xinput list --name-only | grep Touchpad)
if [ "$(xinput list-props "$device" | grep -P ".*Device Enabled.*\K.(?=$)" -o)" -eq 1 ];then # if [ "$(xinput list-props "$device" | grep -P ".*Device Enabled.*\K.(?=$)" -o)" -eq 1 ];then
xinput disable "$device" # xinput disable "$device"
else # else
xinput enable "$device" # xinput enable "$device"
fi # fi
''); # '');
} #}
]; ];
}; };
} }

View File

@ -18,30 +18,28 @@ in
imports = [ imports = [
./urxvtd.nix ./urxvtd.nix
./pipewire.nix ./pipewire.nix
./gnome.nix
]; ];
# services.redshift.enable = true;
services.xserver = { services.xserver = {
enable = true; enable = true;
layout = "us"; layout = "us";
xkbVariant = "altgr-intl"; xkbVariant = "altgr-intl";
xkbOptions = "ctrl:nocaps, eurosign:e"; xkbOptions = "ctrl:nocaps, eurosign:e";
windowManager = { # windowManager = {
awesome.enable = true; # awesome.enable = true;
awesome.noArgb = true; # awesome.noArgb = true;
awesome.luaModules = [ pkgs.luaPackages.vicious ]; # awesome.luaModules = [ pkgs.luaPackages.vicious ];
}; # };
displayManager.defaultSession = lib.mkDefault "none+awesome"; # displayManager.defaultSession = lib.mkDefault "none+awesome";
displayManager.autoLogin = {
enable = true;
user = mainUser;
};
}; };
environment.systemPackages = [ pkgs.gnome.adwaita-icon-theme ]; environment.systemPackages = [ pkgs.gnome.adwaita-icon-theme ];
# lid switch is handled via button presses # lid switch is handled via button presses
services.logind.lidSwitch = lib.mkDefault "ignore"; # services.logind.lidSwitch = lib.mkDefault "ignore";
makefu.awesome.enable = true; #makefu.awesome.enable = true;
console.font = "Lat2-Terminus16"; console.font = "Lat2-Terminus16";
fonts = { fonts = {

View File

@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
let
mainUser = config.krebs.build.user.name;
in
{
programs.gnome-terminal.enable = true;
services.xserver = {
desktopManager.gnome.enable = true;
displayManager.gdm.enable = true;
#displayManager.autoLogin = {
# enable = true;
# user = mainUser;
#};
};
home-manager.users.${mainUser}.services.gammastep = {
enable = true;
provider = "manual";
latitude = config.location.latitude;
longitude = config.location.longitude;
};
}

View File

@ -0,0 +1,44 @@
{ pkgs, lib, ... }:
{
imports = [
./base.nix
];
users.users.kiosk = {
# packages = [ pkgs.chromium pkgs.vscode ];
group = "kiosk";
isNormalUser = true;
uid = 1003;
extraGroups = [ "wheel" "audio" "pulse" "pipewire" ];
};
users.groups.kiosk.gid = 989 ;
services.xserver = {
enable = true;
windowManager = lib.mkForce { awesome.enable = false; };
displayManager.gdm.enable = true;
displayManager.gdm.autoSuspend = false;
displayManager.autoLogin = {
enable = true;
user = lib.mkForce "kiosk";
};
displayManager.defaultSession = "gnome";
desktopManager.gnome.enable = true;
};
systemd.targets.sleep.enable = false;
systemd.targets.suspend.enable = false;
systemd.targets.hibernate.enable = false;
systemd.targets.hybrid-sleep.enable = false;
environment.systemPackages = [ pkgs.gnomeExtensions.appindicator ];
services.dbus.packages = with pkgs; [ gnome2.GConf gnome3.gnome-settings-daemon ];
services.pipewire.systemWide = lib.mkForce false;
services.pipewire.config.pipewire-pulse = {
"pulse.properties"."server.address" = [ "unix:native" "tcp:4713" ];
};
}