This commit is contained in:
parent
83c99fde4b
commit
02b5b07993
12 changed files with 182 additions and 298 deletions
|
@ -11,8 +11,10 @@
|
||||||
];
|
];
|
||||||
home = "/data/shares/";
|
home = "/data/shares/";
|
||||||
};
|
};
|
||||||
networking.firewall.enable = true;
|
networking.firewall = {
|
||||||
networking.firewall.allowPing = true;
|
enable = true;
|
||||||
|
allowPing = true;
|
||||||
|
};
|
||||||
services.samba = {
|
services.samba = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nsswins = true;
|
nsswins = true;
|
||||||
|
|
|
@ -13,9 +13,11 @@
|
||||||
availableKernelModules = ["xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
availableKernelModules = ["xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||||
};
|
};
|
||||||
|
|
||||||
loader.systemd-boot.enable = true;
|
loader = {
|
||||||
loader.efi.canTouchEfiVariables = true;
|
systemd-boot.enable = true;
|
||||||
loader.efi.efiSysMountPoint = "/boot/efi";
|
efi.canTouchEfiVariables = true;
|
||||||
|
efi.efiSysMountPoint = "/boot/efi";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.secrets = {"/crypto_keyfile.bin" = null;};
|
boot.initrd.secrets = {"/crypto_keyfile.bin" = null;};
|
||||||
|
|
|
@ -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";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -29,9 +29,11 @@
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
displayManager.lightdm.enable = true;
|
displayManager = {
|
||||||
displayManager.autoLogin.enable = true;
|
lightdm.enable = true;
|
||||||
displayManager.autoLogin.user = "kiosk";
|
autoLogin.enable = true;
|
||||||
|
autoLogin.user = "kiosk";
|
||||||
|
};
|
||||||
desktopManager.gnome.enable = true;
|
desktopManager.gnome.enable = true;
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,19 +7,17 @@
|
||||||
}: {
|
}: {
|
||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod"];
|
boot = {
|
||||||
boot.initrd.kernelModules = [];
|
initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod"];
|
||||||
boot.kernelModules = ["kvm-intel"];
|
kernelModules = ["kvm-intel"];
|
||||||
boot.extraModulePackages = [];
|
initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/0c192a18-178f-4598-a1ed-5295ef2abdc4";
|
||||||
|
};
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/9dba116f-c9fe-403a-a8e2-f9fdab23f1f1";
|
device = "/dev/disk/by-uuid/9dba116f-c9fe-403a-a8e2-f9fdab23f1f1";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["compress=zstd"];
|
options = ["compress=zstd"];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/0c192a18-178f-4598-a1ed-5295ef2abdc4";
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/0A6A-AAFC";
|
device = "/dev/disk/by-uuid/0A6A-AAFC";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
|
@ -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";
|
stateVersion = "23.11";
|
||||||
username = "cyryl";
|
username = "cyryl";
|
||||||
in {
|
in {
|
||||||
|
@ -11,7 +17,7 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
security.allowUserNamespaces = true;
|
security.allowUserNamespaces = true;
|
||||||
boot.supportedFilesystems = [ "ntfs" ];
|
boot.supportedFilesystems = ["ntfs"];
|
||||||
environment.enableDebugInfo = true;
|
environment.enableDebugInfo = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
@ -54,19 +60,16 @@ in {
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.nameservers =
|
networking.nameservers = ["9.9.9.9" "2620:fe::fe" "149.112.112.112" "2620:fe::9"];
|
||||||
[ "9.9.9.9" "2620:fe::fe" "149.112.112.112" "2620:fe::9" ];
|
|
||||||
|
|
||||||
networking.hosts = { "10.11.99.1" = [ "remarkable" ]; };
|
networking.hosts = {"10.11.99.1" = ["remarkable"];};
|
||||||
|
|
||||||
programs.light.enable = true;
|
programs = {
|
||||||
programs.adb.enable = true;
|
light.enable = true;
|
||||||
programs.wireshark.enable = true;
|
adb.enable = true;
|
||||||
|
wireshark.enable = true;
|
||||||
|
|
||||||
programs.ssh.extraConfig = ''
|
ssh.extraConfig = ''
|
||||||
Host vpsfree1 vpsfree1.cyplo.dev vpsfree1.raptor-carp.ts.net
|
|
||||||
HostName vpsfree1
|
|
||||||
Port 2222
|
|
||||||
Host cupsnet.cyplo.dev
|
Host cupsnet.cyplo.dev
|
||||||
HostName cupsnet.cyplo.dev
|
HostName cupsnet.cyplo.dev
|
||||||
Port 2222
|
Port 2222
|
||||||
|
@ -75,18 +78,18 @@ in {
|
||||||
Port 2222
|
Port 2222
|
||||||
StrictHostKeyChecking=accept-new
|
StrictHostKeyChecking=accept-new
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
virtualisation.docker = {
|
virtualisation.docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoPrune.enable = true;
|
autoPrune.enable = true;
|
||||||
daemon.settings = {
|
daemon.settings = {
|
||||||
"insecure-registries" = [ "vpsfree1.raptor-carp.ts.net:5000" ];
|
"insecure-registries" = ["vpsfree1.raptor-carp.ts.net:5000"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.fontconfig = {
|
fonts.fontconfig = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultFonts.monospace = [ "BerkeleyMono Nerd Font" ];
|
defaultFonts.monospace = ["BerkeleyMono Nerd Font"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
|
@ -112,7 +115,7 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
system = { inherit stateVersion; };
|
system = {inherit stateVersion;};
|
||||||
system.activationScripts.diff = ''
|
system.activationScripts.diff = ''
|
||||||
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
|
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -55,16 +55,17 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.mbsync.enable = true;
|
programs = {
|
||||||
programs.msmtp.enable = true;
|
mbsync.enable = true;
|
||||||
programs.neomutt = {enable = true;};
|
msmtp.enable = true;
|
||||||
programs.notmuch = {
|
neomutt = {enable = true;};
|
||||||
|
notmuch = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hooks.preNew = "${pkgs.isync}/bin/mbsync -a";
|
hooks.preNew = "${pkgs.isync}/bin/mbsync -a";
|
||||||
};
|
};
|
||||||
programs.alot = {enable = true;};
|
alot = {enable = true;};
|
||||||
|
};
|
||||||
home.packages = with pkgs; [unstable.protonmail-bridge];
|
home.packages = [unstable.protonmail-bridge];
|
||||||
|
|
||||||
services.mbsync.enable = true;
|
services.mbsync.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,21 @@
|
||||||
{ config, pkgs, inputs, system, ... }:
|
{
|
||||||
let
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
master = inputs.nixpkgs-master;
|
master = inputs.nixpkgs-master;
|
||||||
pkgs = master.legacyPackages."${system}";
|
pkgs = master.legacyPackages."${system}";
|
||||||
in {
|
in {
|
||||||
disabledModules = [ ];
|
disabledModules = [];
|
||||||
imports = [ ];
|
imports = [];
|
||||||
|
|
||||||
services.flatpak.enable = true;
|
services = {
|
||||||
|
flatpak.enable = true;
|
||||||
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
desktopManager.plasma6.enable = true;
|
||||||
services.xserver = {
|
xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
displayManager.sddm = {
|
displayManager.sddm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -17,8 +23,8 @@ in {
|
||||||
wayland.enable = true;
|
wayland.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
users.users.cyryl.packages = with pkgs; [ ];
|
};
|
||||||
|
users.users.cyryl.packages = with pkgs; [];
|
||||||
|
|
||||||
programs.kdeconnect.enable = true;
|
programs.kdeconnect.enable = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,8 @@ in {
|
||||||
|
|
||||||
imports = [./keybindings.nix ../home-manager/programs/alacritty.nix];
|
imports = [./keybindings.nix ../home-manager/programs/alacritty.nix];
|
||||||
|
|
||||||
home.pointerCursor = {
|
home = {
|
||||||
|
pointerCursor = {
|
||||||
name = "Adwaita";
|
name = "Adwaita";
|
||||||
package = pkgs.gnome.adwaita-icon-theme;
|
package = pkgs.gnome.adwaita-icon-theme;
|
||||||
size = 24;
|
size = 24;
|
||||||
|
@ -32,7 +33,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
sessionVariables = {
|
||||||
XDG_CURRENT_DESKTOP = "Unity";
|
XDG_CURRENT_DESKTOP = "Unity";
|
||||||
SDL_VIDEODRIVER = "wayland";
|
SDL_VIDEODRIVER = "wayland";
|
||||||
QT_QPA_PLATFORM = "wayland-egl";
|
QT_QPA_PLATFORM = "wayland-egl";
|
||||||
|
@ -40,7 +41,7 @@ in {
|
||||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
firefox-wayland
|
firefox-wayland
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
clipman
|
clipman
|
||||||
|
@ -51,14 +52,14 @@ in {
|
||||||
gsettings-desktop-schemas
|
gsettings-desktop-schemas
|
||||||
lxappearance
|
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;
|
services.udiskie.enable = true;
|
||||||
xsession.preferStatusNotifierItems = 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 = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wrapperFeatures.base = true;
|
wrapperFeatures.base = true;
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
{ config, pkgs, ... }: {
|
{
|
||||||
programs.atuin.enableZshIntegration = true;
|
config,
|
||||||
programs.zsh = {
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs = {
|
||||||
|
atuin.enableZshIntegration = true;
|
||||||
|
zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
history = {
|
history = {
|
||||||
size = 102400;
|
size = 102400;
|
||||||
|
@ -15,7 +20,7 @@
|
||||||
|
|
||||||
oh-my-zsh = {
|
oh-my-zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [ "vi-mode" "git" "python" "history-substring-search" "tmux" ];
|
plugins = ["vi-mode" "git" "python" "history-substring-search" "tmux"];
|
||||||
};
|
};
|
||||||
|
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
|
@ -62,12 +67,16 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.direnv = {
|
direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
nix-direnv = { enable = true; };
|
nix-direnv = {enable = true;};
|
||||||
|
};
|
||||||
|
starship = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file.".config/starship.toml".text = ''
|
home.file.".config/starship.toml".text = ''
|
||||||
command_timeout = 8192
|
command_timeout = 8192
|
||||||
[aws]
|
[aws]
|
||||||
|
@ -98,9 +107,4 @@
|
||||||
[nix_shell]
|
[nix_shell]
|
||||||
symbol = "nix-shell "
|
symbol = "nix-shell "
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.starship = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue