framework-2024-04-12-10-25-52

This commit is contained in:
Alexander Szczepanski
2024-04-12 10:25:52 +02:00
parent adaa83a3f2
commit 8df4de7f06
37 changed files with 83 additions and 33 deletions

0
.editorconfig Normal file → Executable file
View File

0
.gitignore vendored Normal file → Executable file
View File

0
backup/bspwm.nix Normal file → Executable file
View File

0
backup/desktop.nix Normal file → Executable file
View File

0
backup/sway.nix Normal file → Executable file
View File

0
backup/thinkpad.nix Normal file → Executable file
View File

0
configs/borg-exclude.nix Normal file → Executable file
View File

0
configs/browser.nix Normal file → Executable file
View File

0
configs/common-server.nix Normal file → Executable file
View File

0
configs/common.nix Normal file → Executable file
View File

0
configs/docker.nix Normal file → Executable file
View File

0
configs/games.nix Normal file → Executable file
View File

0
configs/gnome.nix Normal file → Executable file
View File

4
configs/gui.nix Normal file → Executable file
View File

@ -38,10 +38,10 @@ in
}; };
fonts = { fonts = {
enableDefaultFonts = true; enableDefaultPackages = true;
fontDir.enable = true; fontDir.enable = true;
fonts = with pkgs; [ packages = with pkgs; [
# (nerdfonts.override { fonts = [ "Liberation" ]; }) # (nerdfonts.override { fonts = [ "Liberation" ]; })
nerdfonts nerdfonts
corefonts corefonts

0
configs/libvirt.nix Normal file → Executable file
View File

0
configs/p10k-config/p10k.zsh Normal file → Executable file
View File

0
configs/pantheon.nix Normal file → Executable file
View File

0
configs/plasma.nix Normal file → Executable file
View File

0
configs/printing.nix Normal file → Executable file
View File

1
configs/user-gui.nix Normal file → Executable file
View File

@ -24,7 +24,6 @@ in
spotify spotify
baobab baobab
keepassxc keepassxc
ponymix
grsync grsync
virt-manager virt-manager
]; ];

18
configs/user.nix Normal file → Executable file
View File

@ -42,15 +42,15 @@ in
environment.pathsToLink = [ "/share/zsh" ]; environment.pathsToLink = [ "/share/zsh" ];
home-manager.users.alex = { pkgs, ... }: { home-manager.users.alex = { pkgs, ... }: {
# imports = [ imports = [
# "${ "${
# fetchTarball fetchTarball
# "https://github.com/msteen/nixos-vscode-server/tarball/master" "https://github.com/msteen/nixos-vscode-server/tarball/master"
# }/modules/vscode-server/home.nix" }/modules/vscode-server/home.nix"
# ]; ];
home = { home = {
stateVersion = "23.05"; stateVersion = "23.11";
packages = with unstable.pkgs; [ packages = with unstable.pkgs; [
atop atop
btop btop
@ -64,7 +64,7 @@ in
kubectl kubectl
ncdu ncdu
neofetch neofetch
nixfmt nixfmt-classic
pstree pstree
qrencode qrencode
ranger ranger
@ -179,6 +179,6 @@ in
tmux = { enable = true; }; tmux = { enable = true; };
}; };
# services.vscode-server.enable = true; services.vscode-server.enable = true;
}; };
} }

12
configs/virtualbox.nix Executable file
View File

@ -0,0 +1,12 @@
{ config, pkgs, lib, ... }:
{
nixpkgs.config.allowUnfree = true;
virtualisation = {
virtualbox.host = {
enable = true;
enableExtensionPack = true;
};
};
}

0
configs/wireguard.nix Normal file → Executable file
View File

0
ddclient.conf Normal file → Executable file
View File

0
home/bin/fzip Normal file → Executable file
View File

0
home/bin/rofi-default-sink.sh Normal file → Executable file
View File

0
home/npmrc Normal file → Executable file
View File

20
machine/desktop.nix Normal file → Executable file
View File

@ -44,17 +44,17 @@ in
}; };
loader = { # loader = {
grub = { # grub = {
enable = true; # enable = true;
device = "nodev"; # device = "nodev";
efiSupport = true; # efiSupport = true;
gfxmodeEfi = "1024x768"; # gfxmodeEfi = "1024x768";
configurationLimit = 5; # configurationLimit = 5;
}; # };
efi.canTouchEfiVariables = true; # efi.canTouchEfiVariables = true;
}; # };
initrd.kernelModules = [ "amdgpu" ]; initrd.kernelModules = [ "amdgpu" ];
plymouth.enable = true; plymouth.enable = true;

60
machine/framework.nix Normal file → Executable file
View File

@ -1,6 +1,11 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
unstable = import <nixos-unstable> {}; unstable = import <nixos-unstable> {
config = {
allowUnfree = true;
};
};
be = import ../configs/borg-exclude.nix;
secrets = import ../configs/secrets.nix; secrets = import ../configs/secrets.nix;
wireguard = import ../configs/wireguard.nix; wireguard = import ../configs/wireguard.nix;
in in
@ -24,7 +29,13 @@ in
boot = { boot = {
initrd.systemd.enable = true; initrd.systemd.enable = true;
loader = { loader = {
systemd-boot.enable = true; # systemd-boot.enable = true;
grub = {
enable = true;
device = "nodev";
useOSProber = true;
efiSupport = true;
};
efi = { efi = {
canTouchEfiVariables = true; canTouchEfiVariables = true;
}; };
@ -66,6 +77,7 @@ in
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
hardware = { hardware = {
keyboard.qmk.enable = true;
enableAllFirmware = true; enableAllFirmware = true;
cpu.intel.updateMicrocode = true; cpu.intel.updateMicrocode = true;
@ -74,9 +86,6 @@ in
driSupport32Bit = true; driSupport32Bit = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD intel-media-driver # LIBVA_DRIVER_NAME=iHD
# vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
# vaapiVdpau
# libvdpau-va-gl
]; ];
}; };
pulseaudio.enable = false; pulseaudio.enable = false;
@ -94,6 +103,27 @@ in
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
}; };
borgbackup.jobs.home = rec {
compression = "auto,zstd";
encryption = {
mode = "repokey-blake2";
passphrase = secrets.borg-key;
};
extraCreateArgs =
"--stats --verbose --checkpoint-interval 600 --exclude-caches";
environment.BORG_RSH = "ssh -i /home/alex/.ssh/id_borg_ed25519";
paths = [ "/home/alex" "/var/lib" ];
repo = secrets.borg-repo;
startAt = "daily";
prune.keep = {
daily = 7;
weekly = 4;
monthly = 6;
};
extraPruneArgs = "--save-space --list --stats";
exclude = map (x: "/home/alex/" + x) be.borg-exclude;
};
}; };
powerManagement = { powerManagement = {
@ -108,8 +138,10 @@ in
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;
environment.systemPackages = environment.systemPackages =
with unstable.pkgs; [ with unstable.pkgs; [
rustdesk
cinnamon.warpinator cinnamon.warpinator
psensor psensor
veracrypt
gnumake gnumake
pkg-config pkg-config
libftdi libftdi
@ -122,16 +154,17 @@ in
]; ];
# Set up deep sleep + hibernation # Set up deep sleep + hibernation
swapDevices = [ swapDevices = [{
{ device = "/swapfile"; } device = "/swapfile";
]; size = 64 * 1024;
}];
# Partition swapfile is on (after LUKS decryption) # Partition swapfile is on (after LUKS decryption)
boot.resumeDevice = "/dev/disk/by-uuid/ab1126e8-ae5a-4313-a520-4dc267fea528"; boot.resumeDevice = "/dev/disk/by-uuid/642b9f1c-f8ed-4bdf-baa4-465409942c2e";
# Resume Offset is offset of swapfile # Resume Offset is offset of swapfile
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file # https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
boot.kernelParams = [ "mem_sleep_default=deep" "resume_offset=128563200" ]; boot.kernelParams = [ "mem_sleep_default=deep" "resume_offset=7604224" ];
# Suspend-then-hibernate everywhere # Suspend-then-hibernate everywhere
services.logind = { services.logind = {
@ -144,5 +177,12 @@ in
}; };
systemd.sleep.extraConfig = "HibernateDelaySec=60m"; systemd.sleep.extraConfig = "HibernateDelaySec=60m";
home-manager.users.alex.services.barrier.client = {
enable = true;
enableCrypto = false;
name = "framework";
server = "192.168.0.168:24800";
};
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

0
machine/homeserver.nix Normal file → Executable file
View File

0
machine/mini.nix Normal file → Executable file
View File

0
machine/nixos-vm.nix Normal file → Executable file
View File

0
machine/raspberrypi.nix Normal file → Executable file
View File

0
machine/thinkpad.nix Normal file → Executable file
View File

1
machine/vps.nix Normal file → Executable file
View File

@ -143,7 +143,6 @@ in
progress progress
]; ];
programs = { programs = {
mtr.enable = true; mtr.enable = true;
fuse.userAllowOther = true; fuse.userAllowOther = true;

0
machine/vps2.nix Normal file → Executable file
View File

0
machine/vps3.nix Normal file → Executable file
View File