From 74a0b4f9bde787238d3c663ab6b724b515278f86 Mon Sep 17 00:00:00 2001 From: Alexander Szczepanski Date: Sun, 19 Sep 2021 13:05:23 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=8D=E2=9C=8B=F0=9F=8D=86=F0=9F=A9=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configs/.bin/fzip | 0 configs/common.nix | 16 ------------ configs/gui.nix | 1 - configs/user-gui.nix | 30 ++++++++++++++-------- configs/user.nix | 24 +++++++++++++++++- machine/desktop.nix | 1 - machine/nixos-vm.nix | 1 - machine/raspberrypi4.nix | 55 ++++++++++++++++++++++++++++++++++++++++ machine/thinkpad.nix | 1 - 9 files changed, 97 insertions(+), 32 deletions(-) create mode 100644 configs/.bin/fzip create mode 100644 machine/raspberrypi4.nix diff --git a/configs/.bin/fzip b/configs/.bin/fzip new file mode 100644 index 0000000..e69de29 diff --git a/configs/common.nix b/configs/common.nix index 1e0b9b4..50651dd 100644 --- a/configs/common.nix +++ b/configs/common.nix @@ -48,48 +48,32 @@ in environment.systemPackages = with pkgs; [ ack - atop borgbackup - bpytop broot btrfs-progs bwm_ng cargo - dfc exa ffmpeg - git - git-secret - glances gnupg gocryptfs home-manager - htop inxi iotop - kubectl lm_sensors lsd lsof manpages - ncdu - neofetch nix-du nmap nodejs pciutils - pstree - ranger ruby - sshfs tealdeer - tree unixtools.xxd unzip usbutils wget - youtube-dl - zsh graphviz nix-tree ]; diff --git a/configs/gui.nix b/configs/gui.nix index 5534933..914e6c6 100644 --- a/configs/gui.nix +++ b/configs/gui.nix @@ -51,7 +51,6 @@ ponymix prusa-slicer pulseaudio-ctl - python39Packages.python-miio python39Packages.pyyaml solaar sxhkd diff --git a/configs/user-gui.nix b/configs/user-gui.nix index 7e5457d..5d9e87f 100644 --- a/configs/user-gui.nix +++ b/configs/user-gui.nix @@ -11,26 +11,26 @@ }; }; packages = with pkgs; [ + arandr + baobab bitwarden + blueberry + gnome.cheese gnome.eog gnome.file-roller gnome.gnome-calculator gnome.seahorse - gnome.cheese homebank + lutris rpi-imager signal-desktop spotify steam + discord + lxrandr teams unrar wine - baobab - steam-tui - blueberry - lutris - teams - arandr ]; }; @@ -101,7 +101,6 @@ ms-azuretools.vscode-docker ms-vsliveshare.vsliveshare #hsnazar.hyper-term-theme - #rafaelmaiolla.remote-vscode eamodio.gitlens ]; # userSettings = { @@ -145,6 +144,11 @@ mpv = { enable = true; + config = { + hwdec = "auto-safe"; + vo = "gpu"; + profile = "gpu-hq"; + }; }; @@ -296,9 +300,9 @@ "super + shift + comma" = "bspc node @/ --circulate forward"; "super + {1-9,0}" = "bspc desktop -f '{I,II,III,IV,V,VI,VII,VIII,IX,X}' && notify-send `bspc query -D -d --names`"; "super + shift + {1-9,0}" = "bspc node -d '{I,II,III,IV,V,VI,VII,VIII,IX,X}'"; - "XF86AudioMute" = "pulseaudio-ctl mute"; - "XF86AudioLowerVolume" = "pulseaudio-ctl down"; - "XF86AudioRaiseVolume" = "pulseaudio-ctl up"; + # "XF86AudioMute" = "pulseaudio-ctl mute"; + # "XF86AudioLowerVolume" = "pulseaudio-ctl down"; + # "XF86AudioRaiseVolume" = "pulseaudio-ctl up"; "Print" = "flameshot gui"; }; }; @@ -330,6 +334,10 @@ package = pkgs.pantheon.elementary-icon-theme; }; windowManager = { + command = pkgs.lib.mkForce '' + ${pkgs.bspwm}/bin/bspwm -c ~/.config/bspwm/bspwmrc & + ${pkgs.xfce.xfce4-session}/bin/xfce4-session + ''; bspwm = { enable = true; extraConfig = '' diff --git a/configs/user.nix b/configs/user.nix index 858f0be..4ca82e9 100644 --- a/configs/user.nix +++ b/configs/user.nix @@ -21,7 +21,27 @@ environment.pathsToLink = [ "/share/zsh" ]; home-manager.users.alex = { pkgs, ... }: { - home.enableNixpkgsReleaseCheck = false; + + + home = { + enableNixpkgsReleaseCheck = false; + packages = with pkgs; [ + atop + bpytop + dfc + git-secret + glances + htop + kubectl + ncdu + neofetch + pstree + ranger + sshfs + tree + youtube-dl + ]; + }; services = { syncthing = { @@ -90,6 +110,8 @@ userName = "Alexander Szczepanski"; userEmail = "alexander@szczepan.ski"; extraConfig = { + core = { autocrlf = false; }; + color = { ui = "auto"; }; push = { default = "current"; }; pull = { rebase = true; }; credential.helper = "${ diff --git a/machine/desktop.nix b/machine/desktop.nix index 1f5261a..5a21288 100644 --- a/machine/desktop.nix +++ b/machine/desktop.nix @@ -13,7 +13,6 @@ in ../configs/common.nix ../configs/user-gui.nix ../configs/user.nix - ../configs/desktop.nix ]; # Use the systemd-boot EFI boot loader. diff --git a/machine/nixos-vm.nix b/machine/nixos-vm.nix index a944b2d..47e51d5 100644 --- a/machine/nixos-vm.nix +++ b/machine/nixos-vm.nix @@ -11,7 +11,6 @@ in ../configs/common.nix ../configs/user.nix ../configs/user-gui.nix - ../configs/desktop.nix ]; # Use the GRUB 2 boot loader. diff --git a/machine/raspberrypi4.nix b/machine/raspberrypi4.nix new file mode 100644 index 0000000..4061ab6 --- /dev/null +++ b/machine/raspberrypi4.nix @@ -0,0 +1,55 @@ +{ config, pkgs, lib, ... }: +{ + imports = + [ + # + /etc/nixos/hardware-configuration.nix + #../configs/docker.nix + ../configs/common.nix + ../configs/user.nix + ]; + + # Boot + boot.loader.grub.enable = false; + boot.loader.raspberryPi.enable = true; + boot.loader.raspberryPi.version = 4; + + # Kernel configuration + boot.kernelPackages = pkgs.linuxPackages_rpi4; + boot.kernelParams = ["cma=64M" "console=tty0"]; + + # Enable additional firmware (such as Wi-Fi drivers). + hardware.enableRedistributableFirmware = true; + + # # Filesystems + # fileSystems = { + # # There is no U-Boot on the Pi 4 (yet) -- the firmware partition has to be mounted as /boot. + # "/boot" = { + # device = "/dev/disk/by-label/FIRMWARE"; + # fsType = "vfat"; + # }; + # "/" = { + # device = "/dev/disk/by-label/NIXOS_SD"; + # fsType = "ext4"; + # }; + # }; + + swapDevices = [ { device = "/swapfile"; size = 1024; } ]; + + networking.hostName = "raspberrypi4"; + + # Packages + environment.systemPackages = with pkgs; [ + nano git htop + ]; + + # Miscellaneous + time.timeZone = "Europe/Berlin"; # you probably want to change this -- otherwise, ciao! + + # WARNING: if you remove this, then you need to assign a password to your user, otherwise + # `sudo` won't work. You can do that either by using `passwd` after the first rebuild or + # by setting an hashed password in the `users.users.yourName` block as `initialHashedPassword`. + security.sudo.wheelNeedsPassword = false; + + system.stateVersion = "21.05"; +} diff --git a/machine/thinkpad.nix b/machine/thinkpad.nix index e61cdd3..841e5fa 100644 --- a/machine/thinkpad.nix +++ b/machine/thinkpad.nix @@ -23,7 +23,6 @@ in ../configs/common.nix ../configs/user.nix ../configs/user-gui.nix - ../configs/desktop.nix ]; # boot.initrd.luks.devices = {