cleanup, statix fixes
Some checks failed
use nix / build (push) Failing after 3m27s

This commit is contained in:
Cyryl Płotnicki 2024-04-21 19:16:41 +01:00
parent 83c99fde4b
commit 02b5b07993
12 changed files with 182 additions and 298 deletions

View file

@ -11,8 +11,10 @@
];
home = "/data/shares/";
};
networking.firewall.enable = true;
networking.firewall.allowPing = true;
networking.firewall = {
enable = true;
allowPing = true;
};
services.samba = {
enable = true;
nsswins = true;

View file

@ -13,9 +13,11 @@
availableKernelModules = ["xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod"];
};
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
loader.efi.efiSysMountPoint = "/boot/efi";
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
efi.efiSysMountPoint = "/boot/efi";
};
};
boot.initrd.secrets = {"/crypto_keyfile.bin" = null;};

View file

@ -1,30 +0,0 @@
{pkgs, ...}: let
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
export __NV_PRIME_RENDER_OFFLOAD=1
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
exec -a "$0" "$@"
'';
whichgpu = pkgs.writeShellScriptBin "whichgpu" "glxinfo | grep vendor";
nvidiaon = pkgs.writeShellScriptBin "nvidiaon" ''
export __NV_PRIME_RENDER_OFFLOAD=1;
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0;
export __GLX_VENDOR_LIBRARY_NAME=nvidia;
export __VK_LAYER_NV_optimus=NVIDIA_only;
glxinfo | grep vendor; echo OK!;
'';
in {
environment.systemPackages = [nvidia-offload whichgpu nvidiaon];
hardware.opengl.enable = true;
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [libva];
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.prime = {
offload.enable = true;
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
intelBusId = "PCI:0:2:0";
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
nvidiaBusId = "PCI:1:0:0";
};
}

View file

@ -29,9 +29,11 @@
services.xserver = {
enable = true;
displayManager.lightdm.enable = true;
displayManager.autoLogin.enable = true;
displayManager.autoLogin.user = "kiosk";
displayManager = {
lightdm.enable = true;
autoLogin.enable = true;
autoLogin.user = "kiosk";
};
desktopManager.gnome.enable = true;
libinput.enable = true;
};

View file

@ -7,19 +7,17 @@
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
boot = {
initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod"];
kernelModules = ["kvm-intel"];
initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/0c192a18-178f-4598-a1ed-5295ef2abdc4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/9dba116f-c9fe-403a-a8e2-f9fdab23f1f1";
fsType = "btrfs";
options = ["compress=zstd"];
};
boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/0c192a18-178f-4598-a1ed-5295ef2abdc4";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0A6A-AAFC";
fsType = "vfat";

View file

@ -1,64 +0,0 @@
{ config, pkgs, inputs, lib, system, nixpkgs-nixos-unstable-and-unfree, ... }: {
networking.hostName = "yoga";
imports = [
./hardware-configuration.nix
../../boot.nix
../../git
../../gui
../../vim
];
boot.kernelPackages = pkgs.linuxPackages_latest;
hardware.trackpoint.enable = true;
services.hardware.bolt.enable = true;
services.fprintd = { enable = true; };
home-manager.users.cyryl = { lib, ... }: { home.packages = with pkgs; [ ]; };
networking.networkmanager.enable = true;
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_GB.UTF-8";
LC_IDENTIFICATION = "en_GB.UTF-8";
LC_MEASUREMENT = "en_GB.UTF-8";
LC_MONETARY = "en_GB.UTF-8";
LC_NAME = "en_GB.UTF-8";
LC_NUMERIC = "en_GB.UTF-8";
LC_PAPER = "en_GB.UTF-8";
LC_TELEPHONE = "en_GB.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.printing.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
users.users.cyryl = {
isNormalUser = true;
description = "cyryl";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [ ];
};
services.fwupd.enable = true;
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "cyryl";
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
}

View file

@ -1,41 +0,0 @@
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Setup keyfile
boot.initrd.secrets = {"/crypto_keyfile.bin" = null;};
fileSystems."/" = {
device = "/dev/disk/by-uuid/a43a1c42-9166-47dc-9e78-20e0975c75c5";
fsType = "btrfs";
options = ["subvol=@"];
};
boot.initrd.luks.devices."luks-99498047-118a-484a-8c2a-987ca68d4943".device = "/dev/disk/by-uuid/99498047-118a-484a-8c2a-987ca68d4943";
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/F179-A4EA";
fsType = "vfat";
};
swapDevices = [];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault true;
}

View file

@ -1,5 +1,11 @@
{ config, pkgs, lib, inputs, nixpkgs-nixos-unstable-and-unfree, ... }:
let
{
config,
pkgs,
lib,
inputs,
nixpkgs-nixos-unstable-and-unfree,
...
}: let
stateVersion = "23.11";
username = "cyryl";
in {
@ -54,19 +60,16 @@ in {
shell = pkgs.zsh;
};
networking.nameservers =
[ "9.9.9.9" "2620:fe::fe" "149.112.112.112" "2620:fe::9" ];
networking.nameservers = ["9.9.9.9" "2620:fe::fe" "149.112.112.112" "2620:fe::9"];
networking.hosts = {"10.11.99.1" = ["remarkable"];};
programs.light.enable = true;
programs.adb.enable = true;
programs.wireshark.enable = true;
programs = {
light.enable = true;
adb.enable = true;
wireshark.enable = true;
programs.ssh.extraConfig = ''
Host vpsfree1 vpsfree1.cyplo.dev vpsfree1.raptor-carp.ts.net
HostName vpsfree1
Port 2222
ssh.extraConfig = ''
Host cupsnet.cyplo.dev
HostName cupsnet.cyplo.dev
Port 2222
@ -75,7 +78,7 @@ in {
Port 2222
StrictHostKeyChecking=accept-new
'';
};
virtualisation.docker = {
enable = true;
autoPrune.enable = true;

View file

@ -55,16 +55,17 @@ in {
};
};
programs.mbsync.enable = true;
programs.msmtp.enable = true;
programs.neomutt = {enable = true;};
programs.notmuch = {
programs = {
mbsync.enable = true;
msmtp.enable = true;
neomutt = {enable = true;};
notmuch = {
enable = true;
hooks.preNew = "${pkgs.isync}/bin/mbsync -a";
};
programs.alot = {enable = true;};
home.packages = with pkgs; [unstable.protonmail-bridge];
alot = {enable = true;};
};
home.packages = [unstable.protonmail-bridge];
services.mbsync.enable = true;

View file

@ -1,15 +1,21 @@
{ config, pkgs, inputs, system, ... }:
let
{
config,
pkgs,
inputs,
system,
...
}: let
master = inputs.nixpkgs-master;
pkgs = master.legacyPackages."${system}";
in {
disabledModules = [];
imports = [];
services.flatpak.enable = true;
services = {
flatpak.enable = true;
services.desktopManager.plasma6.enable = true;
services.xserver = {
desktopManager.plasma6.enable = true;
xserver = {
enable = true;
displayManager.sddm = {
enable = true;
@ -17,8 +23,8 @@ in {
wayland.enable = true;
};
};
};
users.users.cyryl.packages = with pkgs; [];
programs.kdeconnect.enable = true;
}

View file

@ -22,7 +22,8 @@ in {
imports = [./keybindings.nix ../home-manager/programs/alacritty.nix];
home.pointerCursor = {
home = {
pointerCursor = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
size = 24;
@ -32,7 +33,7 @@ in {
};
};
home.sessionVariables = {
sessionVariables = {
XDG_CURRENT_DESKTOP = "Unity";
SDL_VIDEODRIVER = "wayland";
QT_QPA_PLATFORM = "wayland-egl";
@ -40,7 +41,7 @@ in {
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
};
home.packages = with pkgs; [
packages = with pkgs; [
firefox-wayland
wl-clipboard
clipman
@ -51,14 +52,14 @@ in {
gsettings-desktop-schemas
lxappearance
];
file.".config/wofi/style.css".source = ../../.config/wofi/style.css;
file.".config/waybar/config".source = ../../.config/waybar/config;
file.".config/waybar/style.css".source =
../../.config/waybar/style.css;
};
services.udiskie.enable = true;
xsession.preferStatusNotifierItems = true;
home.file.".config/wofi/style.css".source = ../../.config/wofi/style.css;
home.file.".config/waybar/config".source = ../../.config/waybar/config;
home.file.".config/waybar/style.css".source =
../../.config/waybar/style.css;
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.base = true;

View file

@ -1,6 +1,11 @@
{ config, pkgs, ... }: {
programs.atuin.enableZshIntegration = true;
programs.zsh = {
{
config,
pkgs,
...
}: {
programs = {
atuin.enableZshIntegration = true;
zsh = {
enable = true;
history = {
size = 102400;
@ -62,12 +67,16 @@
};
};
programs.direnv = {
direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv = {enable = true;};
};
starship = {
enable = true;
enableZshIntegration = true;
};
};
home.file.".config/starship.toml".text = ''
command_timeout = 8192
[aws]
@ -98,9 +107,4 @@
[nix_shell]
symbol = "nix-shell "
'';
programs.starship = {
enable = true;
enableZshIntegration = true;
};
}