nixpkgs-fmt

This commit is contained in:
LordGrimmauld 2024-04-10 16:51:28 +02:00
parent e8abbd0c1f
commit 36252de722
28 changed files with 502 additions and 438 deletions

View File

@ -1,47 +1,66 @@
{pkgs, config, lib, ... }: let
{ pkgs, config, lib, ... }:
let
cfg = config.grimmShared;
in {
config = with cfg; lib.mkIf (enable && cloudSync.enable) (let
in
{
config = with cfg; lib.mkIf (enable && cloudSync.enable) (
let
cloud_cmd = ''${pkgs.nextcloud-client}/bin/nextcloudcmd -u ${config.grimmShared.cloudSync.username} -p "$(cat ${config.grimmShared.cloudSync.passwordFile})" -h -n --path'';
sync_server = "https://${config.grimmShared.cloudSync.server}";
in {
in
{
environment.systemPackages = with pkgs; [
(writeShellScriptBin "cloudsync-cmd" (cloud_cmd + " $@ " + sync_server))
nextcloud-client
];
systemd.services = lib.mkMerge (lib.mapAttrsToList (local_user: user_conf: let
systemd.services = lib.mkMerge (lib.mapAttrsToList
(local_user: user_conf:
let
paths = user_conf.syncPaths;
sync_script = lib.strings.concatLines (map ({local, remote}: let
sync_script = lib.strings.concatLines (map
({ local, remote }:
let
remote_clean = lib.strings.concatStrings (builtins.match "/*(.+)" remote);
in "${cloud_cmd} /${remote_clean} ${local} ${sync_server}" ) paths);
in { # user-specific sync jobs
"nextcloud-autosync-${local_user}" = lib.mkIf ( paths != [] ) {
in
"${cloud_cmd} /${remote_clean} ${local} ${sync_server}")
paths);
in
{
# user-specific sync jobs
"nextcloud-autosync-${local_user}" = lib.mkIf (paths != [ ]) {
description = "Auto sync Nextcloud";
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig.Type = "simple";
serviceConfig.User = local_user;
serviceConfig.Group= "users";
script= sync_script;
serviceConfig.Group = "users";
script = sync_script;
# TimeoutStopSec = "180";
# KillMode = "process";
# KillSignal = "SIGINT";
wantedBy = ["multi-user.target"];
enable=true;
wantedBy = [ "multi-user.target" ];
enable = true;
};
}) config.users.users );
})
config.users.users);
systemd.timers = lib.mkMerge (lib.mapAttrsToList (local_user: user_conf: let
systemd.timers = lib.mkMerge (lib.mapAttrsToList
(local_user: user_conf:
let
paths = user_conf.syncPaths;
in { # user-specific sync jobs
"nextcloud-autosync-${local_user}" = lib.mkIf ( paths != [] ) {
in
{
# user-specific sync jobs
"nextcloud-autosync-${local_user}" = lib.mkIf (paths != [ ]) {
description = "Automatic sync files with Nextcloud when booted up after 5 minutes then rerun every 60 minutes";
timerConfig.OnBootSec = "5min";
timerConfig.OnUnitActiveSec = "60min";
wantedBy = ["multi-user.target" "timers.target"];
wantedBy = [ "multi-user.target" "timers.target" ];
enable = true;
};
}) config.users.users );
});
})
config.users.users);
}
);
}

View File

@ -1,26 +1,32 @@
{ inputs, pkgs, config, lib, ... }: let
{ inputs, pkgs, config, lib, ... }:
let
cfg = config.grimmShared;
in {
in
{
config = with cfg; lib.mkIf (enable && firefox.enable) {
environment.systemPackages = []
environment.systemPackages = [ ]
++ lib.optionals config.services.desktopManager.plasma6.enable [ pkgs.plasma-browser-integration ];
programs.firefox = {
package = pkgs.firefox-beta;
enable = true;
nativeMessagingHosts.packages = []
nativeMessagingHosts.packages = [ ]
++ lib.optionals (cfg.tooling.enable && cfg.tooling.pass) [ pkgs.passff-host ];
languagePacks = [ "de" "en-US" ];
policies = {
ExtensionSettings = lib.mkMerge [
(lib.mkIf cfg.firefox.disableUserPlugins {
"*".installation_mode = "blocked";
} )
(lib.mapAttrs (guid: shortId: { # explicit plugins by config
})
(lib.mapAttrs
(guid: shortId: {
# explicit plugins by config
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
installation_mode = "force_installed";
} ) cfg.firefox.plugins )
(lib.mkIf (cfg.tooling.enable && cfg.tooling.pass) { # password-store support
})
cfg.firefox.plugins)
(lib.mkIf (cfg.tooling.enable && cfg.tooling.pass) {
# password-store support
"passff@invicem.pro" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/passff/latest.xpi";
installation_mode = "force_installed";
@ -42,8 +48,8 @@ in {
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
DontCheckDefaultBrowser = true;
Preferences = lib.mkMerge ([]
++ lib.optionals cfg.sway.enable [ {"browser.tabs.inTitlebar" = 0; } ]);
Preferences = lib.mkMerge ([ ]
++ lib.optionals cfg.sway.enable [{ "browser.tabs.inTitlebar" = 0; }]);
};
};
};

View File

@ -1,6 +1,8 @@
{ pkgs, config, lib, ... }: let
{ pkgs, config, lib, ... }:
let
cfg = config.grimmShared;
in {
in
{
config = with cfg; lib.mkIf (enable && gaming) {
programs.steam = {
enable = true;
@ -14,7 +16,7 @@ in {
enable = true;
settings = {
general = {
inhibit_screensaver=0;
inhibit_screensaver = 0;
renice = 10;
};
custom = {
@ -27,7 +29,7 @@ in {
services.udev.packages = [ pkgs.wooting-udev-rules ];
environment.sessionVariables = {
GAMEMODERUNEXEC="env DRI_PRIME=1";
GAMEMODERUNEXEC = "env DRI_PRIME=1";
};
environment.systemPackages = with pkgs; [

View File

@ -1,6 +1,8 @@
{ config, lib, ... }: let
{ config, lib, ... }:
let
cfg = config.grimmShared;
in {
in
{
config = with cfg; lib.mkIf (enable && locale) {
time.timeZone = "Europe/Berlin";

View File

@ -1,6 +1,8 @@
{ pkgs, config, lib, ... }: let
{ pkgs, config, lib, ... }:
let
cfg = config.grimmShared;
in {
in
{
config = lib.mkMerge [
(with cfg; lib.mkIf (enable && network) {
networking.networkmanager.enable = true;

View File

@ -1,13 +1,15 @@
{ pkgs, config, lib, ... }: let
{ pkgs, config, lib, ... }:
let
cfg = config.grimmShared;
in {
in
{
config = with cfg; lib.mkIf (enable && graphical) {
# Enable OpenGL
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [];
extraPackages = with pkgs; [ ];
};
boot.kernelParams = [ "nouveau.config=NvGspRm=1" ];
@ -18,8 +20,8 @@ in {
__GL_SYNC_TO_VBLANK = "0";
__GL_THREADED_OPTIMIZATIONS = "1";
__GL_VRR_ALLOWED = "1";
# MESA_LOADER_DRIVER_OVERRIDE="zink";
# FLATPAK_GL_DRIVERS="mesa-git";
# MESA_LOADER_DRIVER_OVERRIDE="zink";
# FLATPAK_GL_DRIVERS="mesa-git";
};
environment.systemPackages = with pkgs; [

View File

@ -1,6 +1,8 @@
{ pkgs, config, lib, ... }: let
{ pkgs, config, lib, ... }:
let
cfg = config.grimmShared;
in {
in
{
config = with cfg; lib.mkIf (enable && tooling.enable && tooling.pass) {
security.polkit.enable = true;
@ -18,7 +20,7 @@ in {
services.passSecretService.enable = true;
programs.gnupg.agent = {
settings = {
# default-cache-ttl = 6000;
# default-cache-ttl = 6000;
};
pinentryPackage = lib.mkForce pkgs.pinentry;
enable = true;

View File

@ -1,6 +1,8 @@
{ pkgs, config, lib, ... }: let
{ pkgs, config, lib, ... }:
let
cfg = config.grimmShared;
in {
in
{
config = with cfg; lib.mkIf (enable && portals) {
xdg.portal = {
enable = true;
@ -14,7 +16,7 @@ in {
environment.sessionVariables = {
XDG_CONFIG_HOME = "$HOME/.config";
FREETYPE_PROPERTIES="cff:no-stem-darkening=0 autofitter:no-stem-darkening=0";
FREETYPE_PROPERTIES = "cff:no-stem-darkening=0 autofitter:no-stem-darkening=0";
};
fonts.fontDir.enable = true;

View File

@ -1,6 +1,8 @@
{ pkgs, config, lib, ... }: let
{ pkgs, config, lib, ... }:
let
cfg = config.grimmShared;
in {
in
{
config = with cfg; lib.mkIf (enable && printing) {
# Enable CUPS to print documents.
services.printing.enable = true;

View File

@ -1,6 +1,8 @@
{ grimm-shared-inputs, pkgs, config, lib, ... }: let
{ grimm-shared-inputs, pkgs, config, lib, ... }:
let
cfg = config.grimmShared;
in {
in
{
config = with cfg; lib.mkIf (enable && sound) {
sound.enable = true;
hardware.pulseaudio.enable = false;

View File

@ -1,7 +1,10 @@
{ pkgs, config, lib, ... }: let
{ pkgs, config, lib, ... }:
let
cfg = config.grimmShared;
in {
config = let
in
{
config =
let
waybar_full = pkgs.writeShellScriptBin "waybar-full" (
"${config.programs.waybar.package}/bin/waybar"
+ (if isNull cfg.sway.bar.config then "" else " -c ${cfg.sway.bar.config}")
@ -9,19 +12,21 @@ in {
);
bar_config = ''
bar {
bar {
swaybar_command ${waybar_full}/bin/waybar-full
}
'';
}
'';
build_conf = sway_conf : let
build_conf = sway_conf:
let
build_definition_lines = lib.mapAttrsToList (name: value: "set \$${name} ${value}");
build_keybind_lines = lib.mapAttrsToList (key: value: "bindsym ${key} ${value}");
build_exec_lines = map (item: "exec " + item);
build_mode_lines = lib.mapAttrsToList (name: value: ''
mode "${name}" {
${lib.strings.concatLines (map (item: " " + item ) (build_conf value))}}'');
in ([]
mode "${name}" {
${lib.strings.concatLines (map (item: " " + item ) (build_conf value))}}'');
in
([ ]
++ (build_definition_lines sway_conf.definitions)
++ (build_keybind_lines sway_conf.keybinds)
++ (build_exec_lines sway_conf.autolaunch)
@ -35,7 +40,8 @@ ${lib.strings.concatLines (map (item: " " + item ) (build_conf value))}}'');
);
sway_conf = pkgs.writeText "sway.conf" text;
in with cfg; lib.mkIf (enable && sway.enable) {
in
with cfg; lib.mkIf (enable && sway.enable) {
environment.etc."sway.conf" = {
source = sway_conf;
};
@ -53,17 +59,17 @@ ${lib.strings.concatLines (map (item: " " + item ) (build_conf value))}}'');
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "oneshot";
script =''
for pid in $(${pkgs.procps}/bin/pgrep sway -x)
do
script = ''
for pid in $(${pkgs.procps}/bin/pgrep sway -x)
do
uid=$(id -u $(${pkgs.procps}/bin/ps -o user= -p $pid))
export SWAYSOCK="/run/user/$uid/sway-ipc.$uid.$pid.sock"
if [[ -e "$SWAYSOCK" ]] ; then
echo "sock is $SWAYSOCK"
${config.programs.sway.package}/bin/swaymsg reload
fi
done
'';
done
'';
reloadTriggers = [ text ];
};
@ -97,9 +103,9 @@ done
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
export _JAVA_AWT_WM_NONREPARENTING=1
export MOZ_ENABLE_WAYLAND=1
# export WLR_RENDERER=vulkan
# export DRI_PRIME=1
# export MESA_LOADER_DRIVER_OVERRIDE="zink"
# export WLR_RENDERER=vulkan
# export DRI_PRIME=1
# export MESA_LOADER_DRIVER_OVERRIDE="zink"
'';
};
};

View File

@ -1,11 +1,14 @@
{ pkgs, config, lib, ... }: let
{ pkgs, config, lib, ... }:
let
cfg = config.grimmShared;
in {
in
{
config = with cfg; lib.mkIf (enable && tooling.enable) {
environment.systemPackages = with pkgs; [
(writeShellScriptBin "silent-add" "git add --intent-to-add $@ ; git update-index --assume-unchanged $@")
(writeShellScriptBin "systemd-owner" "systemctl show -pUser,UID $@")
(writeShellScriptBin "nix-referrers" "nix-store --query --referrers $@")
nixpkgs-fmt
gcc
jdk17
python3
@ -84,7 +87,7 @@ in {
if filereadable($HOME . "/.vimrc")
source ~/.vimrc
endif
'';
'';
packages.myVimPackage = with pkgs.vimPlugins; {
# loaded on launch
start = [

View File

@ -5,7 +5,8 @@
{ config, fetchpatch, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
[
# Include the results of the hardware scan.
./modules/fonts.nix
./modules/tabletdriver.nix
./sway/sway-conf.nix
@ -71,10 +72,10 @@
};
environment.sessionVariables = {
NIXPKGS_ALLOW_UNFREE="1";
MOZ_ENABLE_WAYLAND="1";
# QT_QPA_PLATFORM="wayland-egl";
OCI_CLI_RC_FILE="/home/grimmauld/.oci/config";
NIXPKGS_ALLOW_UNFREE = "1";
MOZ_ENABLE_WAYLAND = "1";
# QT_QPA_PLATFORM="wayland-egl";
OCI_CLI_RC_FILE = "/home/grimmauld/.oci/config";
};
# Allow unfree packages

View File

@ -19,9 +19,11 @@
};
};
outputs = inputs @ { self, nix-gaming, agenix, nixpkgs, chaotic, ... }: let
outputs = inputs @ { self, nix-gaming, agenix, nixpkgs, chaotic, ... }:
let
system = "x86_64-linux";
in {
in
{
nixosConfigurations = {
grimmauld-nixos = nixpkgs.lib.nixosSystem {
inherit system;
@ -35,7 +37,7 @@
./configuration.nix
./modules/users.nix
# ./modules/tlp.nix
# ./modules/tlp.nix
./modules/spotify-tui.nix
./modules/xserver.nix
./modules/system-packages.nix
@ -44,7 +46,5 @@
];
};
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
};
}

View File

@ -2,7 +2,7 @@
with lib;
let
cfg = config.grimmShared;
sync_mod = types.submodule ({config, ...} : {
sync_mod = types.submodule ({ config, ... }: {
options = {
remote = mkOption {
type = types.nonEmptyStr;
@ -17,17 +17,17 @@ let
};
});
sway_conf = types.submodule ({config, ...} : rec {
sway_conf = types.submodule ({ config, ... }: rec {
options = {
keybinds = mkOption {
type = types.attrsOf types.str;
default = {};
default = { };
description = "set of keybinds assigning key combo to action";
};
autolaunch = mkOption {
type = types.listOf types.str;
default = [];
default = [ ];
description = "set of commands to be run at sway startup";
};
@ -39,18 +39,19 @@ let
definitions = mkOption {
type = types.attrsOf types.str;
default = {};
default = { };
description = "set of definitions assigning variable to value";
};
modes = mkOption {
type = types.attrsOf sway_conf;
default = {};
default = { };
description = "possible modes to switch to, e.g. resize";
};
};
});
in {
in
{
options.grimmShared = {
enable = mkEnableOption "grimm-shared-common";
@ -123,7 +124,7 @@ in {
plugins = mkOption {
type = types.attrsOf types.str;
default = {};
default = { };
description = "set of plugins to install. Format: guid = short-id";
};
@ -184,7 +185,7 @@ in {
options = {
syncPaths = mkOption {
type = types.listOf sync_mod;
default = [];
default = [ ];
description = "paths to sync via nextcloud";
};
};

View File

@ -1,4 +1,4 @@
{pkgs, fonts, ...}:
{ pkgs, fonts, ... }:
{
fonts.packages = with pkgs; [
noto-fonts

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: let
{ pkgs, ... }:
let
loadvfio = pkgs.writeShellScriptBin "loadvfio" ''
udevadm trigger --verbose --type=devices --action=remove --subsystem-match=drm --property-match="MINOR=1"
sleep 2
@ -48,7 +49,8 @@
fi
'';
in {
in
{
environment.systemPackages = [ loadnvidia loadvfio ];
security.sudo.extraConfig = "grimmauld ALL=(ALL) NOPASSWD:/run/current-system/sw/bin/loadnvidia, /run/current-system/sw/bin/loadvfio";
virtualisation.libvirtd = {
@ -58,7 +60,7 @@ in {
ovmf = {
enable = true;
packages = [
# pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd # AAVMF
# pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd # AAVMF
pkgs.OVMF.fd
];
};

View File

@ -1,17 +1,20 @@
{config, pkgs, ...}:
{ config, pkgs, ... }:
let
spotifyd_cache_dir = "/tmp/spotifyd";
in {
nixpkgs.overlays = [ (final: prev: { spotifyd = prev.spotifyd.overrideAttrs (old: {
in
{
nixpkgs.overlays = [
(final: prev: {
spotifyd = prev.spotifyd.overrideAttrs (old: {
postInstall = ''
mkdir -p $out/share/dbus-1/system.d/
tee $out/share/dbus-1/system.d/org.mpris.MediaPlayer2.spotifyd.conf <<END
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
tee $out/share/dbus-1/system.d/org.mpris.MediaPlayer2.spotifyd.conf <<END
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
<!DOCTYPE busconfig PUBLIC
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<busconfig>
<policy user="spotifyd">
<allow own_prefix="org.mpris.MediaPlayer2.spotifyd"/>
<allow send_destination_prefix="org.mpris.MediaPlayer2.spotifyd"/>
@ -21,10 +24,11 @@ tee $out/share/dbus-1/system.d/org.mpris.MediaPlayer2.spotifyd.conf <<END
<allow send_destination_prefix="org.mpris.MediaPlayer2.spotifyd"/>
<allow receive_sender="org.mpris.MediaPlayer2"/>
</policy>
</busconfig>
END
</busconfig>
END
'';
});})
});
})
];
environment.systemPackages = with pkgs; [
@ -48,7 +52,7 @@ END
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "oneshot";
script =''
script = ''
mkdir -p ${spotifyd_cache_dir}
chown spotifyd:spotifyd -R ${spotifyd_cache_dir}
'';
@ -67,7 +71,7 @@ END
device = "default";
control = "default";
volume_controller = "softvol";
# no_audio_cache = true;
# no_audio_cache = true;
spotifyd_cache_dir = spotifyd_cache_dir;
max_cache_size = 10000000000;
initial_volume = "90";
@ -88,5 +92,5 @@ END
};
# spotifyd is also a group
users.groups = { spotifyd = {}; };
users.groups = { spotifyd = { }; };
}

View File

@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
spice-gtk
kate
@ -10,6 +10,6 @@
(writeShellScriptBin "rebuild" ''
pkexec nixos-rebuild switch --flake /home/grimmauld/grimm-nixos-laptop
'')
'')
];
}

View File

@ -1,4 +1,4 @@
{pkgs, ...}:
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
opentabletdriver

View File

@ -1,23 +1,23 @@
{pkgs, ...}:
{ pkgs, ... }:
{
services.power-profiles-daemon.enable = false;
services.tlp = {
enable = true;
settings = {
USB_AUTOSUSPEND=1;
USB_EXCLUDE_BTUSB=1;
USB_EXCLUDE_PHONE=1;
SOUND_POWER_SAVE_ON_AC=0;
SOUND_POWER_SAVE_ON_BAT=1;
SATA_LINKPWR_ON_AC="max_performance";
SATA_LINKPWR_ON_BAT="min_power";
MAX_LOST_WORK_SECS_ON_BAT=15;
CPU_ENERGY_PERF_POLICY_ON_AC="performance";
CPU_ENERGY_PERF_POLICY_ON_BAT="power";
CPU_BOOST_ON_AC=1;
CPU_BOOST_ON_BAT=0;
RUNTIME_PM_ON_AC="on";
RUNTIME_PM_ON_BAT="auto";
USB_AUTOSUSPEND = 1;
USB_EXCLUDE_BTUSB = 1;
USB_EXCLUDE_PHONE = 1;
SOUND_POWER_SAVE_ON_AC = 0;
SOUND_POWER_SAVE_ON_BAT = 1;
SATA_LINKPWR_ON_AC = "max_performance";
SATA_LINKPWR_ON_BAT = "min_power";
MAX_LOST_WORK_SECS_ON_BAT = 15;
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0;
RUNTIME_PM_ON_AC = "on";
RUNTIME_PM_ON_BAT = "auto";
};
};
}

View File

@ -1,4 +1,4 @@
{lib, config, pkgs, ...}: {
{ lib, config, pkgs, ... }: {
users.users.grimmauld = {
isNormalUser = true;
shell = pkgs.xonsh;

View File

@ -3,9 +3,9 @@
services.xserver = {
enable = true;
videoDrivers = [ "nouveau" "fbdev" "modesetting" ];
# videoDrivers = [ "nouveau" ];
# videoDrivers = [ "nouveau" ];
displayManager = {
# lightdm.enable = true;
# lightdm.enable = true;
sddm = {
enable = true;
wayland.enable = true;
@ -13,13 +13,13 @@
defaultSession = "sway";
};
desktopManager = {
# xfce.enable = true;
# xfce.enable = true;
};
};
services.desktopManager = {
plasma6.enable = true;
# xfce.enable = true;
# xfce.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).

View File

@ -1,6 +1,7 @@
let
laptop_pub = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCy7X5ByG4/9y2XkQSnXcpMGnV5WPGUd+B6FaYCDNmPQ7xIZEteS+kCpu9oiMP6C/H/FT+i9DZvCflkzgdFAyujYLKRYaZbZ3K6F60qN0rkJ0z/ZO5c6rqwIwR6BEoB7dq5inkyH9fZ8/SI+PXxELmeWF9ehT7kkQC+o9Ujpcjd7ZuZllbAz4UQZFRbbpwdVJCEDenu9/63yuYbvMupgGk0edaTiFT0Q9MSzs/3pNP8xlAxmmZ3HzSjeF7gUzBF7CaIroTeguiUjSVybUEx48P8fy878t7dUZf4anEno9MS0B3aqfZvCKuuPdAUdeBfCbFHRqN7GuCylFIXGPe95Mxl grimmauld@grimmauld-nixos";
in {
in
{
"spotify_pass.age".publicKeys = [ laptop_pub ];
"nextcloud_pass.age".publicKeys = [ laptop_pub ];
}

View File

@ -1,5 +1,6 @@
{ pkgs, ... }: {
imports = [ # Include the results of the hardware scan.
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./screenshare-select.nix
];

View File

@ -5,8 +5,9 @@
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
# ./modules/nvidia.nix
[
(modulesPath + "/installer/scan/not-detected.nix")
# ./modules/nvidia.nix
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
@ -15,19 +16,21 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/3a4a7076-98e7-4ecd-bb07-7e182a04ceac";
{
device = "/dev/disk/by-uuid/3a4a7076-98e7-4ecd-bb07-7e182a04ceac";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D20D-B5B0";
{
device = "/dev/disk/by-uuid/D20D-B5B0";
fsType = "vfat";
};
swapDevices = [ {
swapDevices = [{
device = "/var/lib/swapfile";
size = 48*1024;
} ];
size = 48 * 1024;
}];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";

View File

@ -1,4 +1,4 @@
{pkgs, ...}:
{ pkgs, ... }:
{
xdg.portal.wlr.settings = {
screencastExternal = {

View File

@ -68,9 +68,9 @@
"$mod+Shift+Down" = "move down";
"$mod+Shift+Up" = "move up";
"$mod+Shift+Right" = "move right";
#
# Workspaces:
#
#
# Workspaces:
#
# Switch to workspace
"$mod+1" = "workspace number 1";
"$mod+2" = "workspace number 2";
@ -95,9 +95,9 @@
"$mod+Shift+0" = "move container to workspace number 10";
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
# Layout stuff:
#
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
@ -138,7 +138,8 @@
XF86MonBrightnessUp = "exec brightnessctl s 10+%";
XF86MonBrightnessDown = "exec brightnessctl s 10-%";
};
autolaunch = [ # fixme: absolute paths
autolaunch = [
# fixme: absolute paths
"blueman-applet"
"lxqt-policykit-agent"
"otd-daemon"
@ -146,31 +147,31 @@
"systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP"
];
extraConfig = ''
output * bg ${./wallpapers/switzerland.jpg} fill
output HDMI-A-1 mode 1920x1080@60Hz position 0,0
for_window [app_id="lxqt-policykit-agent"] floating enable;
floating_modifier $mod normal
output * bg ${./wallpapers/switzerland.jpg} fill
output HDMI-A-1 mode 1920x1080@60Hz position 0,0
for_window [app_id="lxqt-policykit-agent"] floating enable;
floating_modifier $mod normal
input type:keyboard xkb_numlock enabled
include /etc/sway/config.d/*
input type:keyboard xkb_numlock enabled
include /etc/sway/config.d/*
# Borders, gaps, titlebars, behavior
default_border pixel 3
default_floating_border pixel 3
gaps inner 5
titlebar_padding 5 5
# Borders, gaps, titlebars, behavior
default_border pixel 3
default_floating_border pixel 3
gaps inner 5
titlebar_padding 5 5
#5Smart things
smart_gaps on
hide_edge_borders --i3 smart
#5Smart things
smart_gaps on
hide_edge_borders --i3 smart
input * {
input * {
xkb_layout "de"
}
}
for_window [app_id="swaymux"] floating enable
for_window [app_id="rmenu"] floating enable
for_window [app_id="swaymux"] floating enable
for_window [app_id="rmenu"] floating enable
'';
modes.resize.keybinds = {