From 765e7a891e3d6206b47b683a3d2b2167dafcee77 Mon Sep 17 00:00:00 2001 From: atagen Date: Sat, 18 Mar 2023 00:24:09 +1100 Subject: [PATCH] halfway between the gutter and the stars --- flakes | 1 - home/bolt.nix | 40 +++++++++++++++++++--- home/home.nix | 32 +++++++++--------- system/configuration.nix | 71 ++++++++++++++++++++++++++------------- system/quiver.nix | 33 +++++++++++++++--- system/syspkgs/lemurs.nix | 26 ++++++++++++++ system/syspkgs/ly.nix | 41 ++++++++++++++++++++++ 7 files changed, 195 insertions(+), 49 deletions(-) delete mode 160000 flakes create mode 100755 system/syspkgs/lemurs.nix create mode 100644 system/syspkgs/ly.nix diff --git a/flakes b/flakes deleted file mode 160000 index 342a9df..0000000 --- a/flakes +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 342a9df73f90eb784d70bb7b096cff0e9699d14f diff --git a/home/bolt.nix b/home/bolt.nix index a457071..933daee 100755 --- a/home/bolt.nix +++ b/home/bolt.nix @@ -1,6 +1,15 @@ { config, pkgs, ... }: -{ +let + flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; + + hyprland = (import flake-compat { + src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz"; + }).defaultNix; +in { + imports = [ + hyprland.homeManagerModules.default + ]; nixpkgs.overlays = [ (self: super: { @@ -18,22 +27,43 @@ nicotine-plus ]; + + wayland.windowManager.sway = { + enable = true; + config = rec { + modifier = "Mod4"; + terminal = "kitty"; + gaps = { + inner = 15; + outer = 30; + }; + }; + wrapperFeatures = { + base = true; + gtk= true; + }; + }; + + + wayland.windowManager.hyprland = { + enable = true; + extraConfig = '' + bind = SUPER, Return, exec, kitty + ''; + }; + systemd.user.startServices = true; systemd.user.services."com.system76.Scheduler.dbusproxy" = { - Unit = { Description = "the system76 process scheduler kwin dbus proxy"; Requires = [ "dbus.service" ]; }; - Install = { WantedBy = [ "graphical-session.target" "default.target" ]; }; - Service = { ExecStart = ''${pkgs.kwin-system76-scheduler-integration}/bin/kwin-system76-scheduler-dbus-proxy.sh''; }; - }; } diff --git a/home/home.nix b/home/home.nix index 2d9ac5c..f5b805f 100755 --- a/home/home.nix +++ b/home/home.nix @@ -7,14 +7,14 @@ let # }; # nix-rice-overlay = import (nix-rice + "/overlay.nix"); # pkgs = import { overlays = [ nix-rice-overlay ]; }; - kitty_notest = pkgs.kitty.overridePythonAttrs (oldAttrs: { doCheck = false; checkPhase = ""; }); + # kitty_notest = pkgs.kitty.overridePythonAttrs (oldAttrs: { doCheck = false; checkPhase = ""; }); in { imports = [ # who are you? - # ./bolt.nix + ./bolt.nix # ./fossil.nix - ./plank.nix + # ./plank.nix ]; nixpkgs.config.packageOverrides = pkgs: { @@ -78,16 +78,15 @@ in enable = true; # enableExtensionUpdateCheck = false; # enableUpdateCheck = false; - package = pkgs.vscodium; extensions = []; - mutableExtensionsDir = false; + mutableExtensionsDir = true; }; xdg.desktopEntries = { - codium-url = { - name = "VsCodium"; + Code-url = { + name = "VsCode"; genericName = "Text Editor"; - exec = "codium --disable-gpu-sandbox --open-url %U"; + exec = "code --disable-gpu-sandbox --open-url %U"; icon = "code"; comment = "Code Editing. Redefined."; categories = [ "Utility" "TextEditor" "Development" "IDE" ]; @@ -97,17 +96,17 @@ in startupNotify = true; type = "Application"; }; - codium = { + Code = { categories = [ "Utility" "TextEditor" "Development" "IDE" ]; comment = "Code Editing. Redefined."; - exec = "codium --disable-gpu-sandbox %F"; + exec = "code --disable-gpu-sandbox %F"; genericName = "Text Editor"; icon = "code"; # keywords = [ "vscode" ]; mimeType = [ "text/plain" "inode/directory" ]; - name = "VsCodium"; + name = "VsCode"; startupNotify = true; - # startupWMClass = "vscodium"; + # startupWMClass = "vsCode"; type = "Application"; }; }; @@ -167,7 +166,7 @@ in programs.kitty = { enable = true; - package = kitty_notest; + # package = kitty_notest; font = { name = "Ellograph CF"; size = 10; @@ -244,12 +243,12 @@ in la_culr() { - ls -ralhX --color $@ | culr + ls -lha --group-directories-first --color $@ | culr } ls_culr() { - ls -rlhX --color $@ | culr + ls -lh --group-directories-first --color $@ | culr } ps_culr() @@ -389,6 +388,9 @@ fresh programs.helix.enable = true; programs.helix.settings = { theme = "bogster"; + editor.lsp.display-messages = true; + editor.auto-pairs = false; + editor.indent-guides.render = true; }; home.sessionVariables = { diff --git a/system/configuration.nix b/system/configuration.nix index 75e469f..8c51a3f 100755 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -1,13 +1,17 @@ { config, pkgs, ... }: +# let +# lemurs = callPackage ./system/syspkgs/lemurs.nix {}; +# ly = callPackage ./system/syspkgs/ly.nix {}; +# in { imports = [ # where are we ? #./wollomi.nix - ./adrift.nix - # ./quiver.nix + # ./adrift.nix + ./quiver.nix # home manager should exist for users @@ -29,15 +33,15 @@ keep-derivations = true ''; - # environment.sessionVariables = rec { - # WLR_NO_HARDWARE_CURSORS = "1"; - # GBM_BACKEND = "nvidia-drm"; - # NVD_BACKEND = "direct"; - # __GLX_VENDOR_LIBRARY_NAME = "nvidia"; - # LIBVA_DRIVER_NAME = "nvidia"; - # __GL_GSYNC_ALLOWED = "1"; - # __GL_VRR_ALLOWED = "1"; - # }; + environment.sessionVariables = rec { + WLR_NO_HARDWARE_CURSORS = "1"; + GBM_BACKEND = "nvidia-drm"; + NVD_BACKEND = "direct"; + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + LIBVA_DRIVER_NAME = "nvidia"; + __GL_GSYNC_ALLOWED = "1"; + __GL_VRR_ALLOWED = "1"; + }; environment.pathsToLink = [ "/share/zsh" ]; boot.loader.systemd-boot.enable = true; @@ -67,28 +71,44 @@ hardware.opengl.driSupport32Bit = true; #input stuff + services.xserver.enable = false; services.xserver.xkbOptions = "caps:escape"; - services.xserver.enable = true; services.xserver.layout = "us"; services.xserver.libinput.enable = true; # kde time services.xserver.desktopManager.plasma5.enable = true; services.xserver.displayManager.lightdm.enable = false; # gets installed by default.. - services.xserver.displayManager.sddm = { + # services.xserver.displayManager.sddm = { + # enable = true; + # theme = "${(pkgs.fetchFromGitHub { + # owner = "EricKotato"; + # repo = "sddm-slice"; + # rev = "763b8f4e01c00c1f8590fc7a103e14f6e8449443"; + # sha256 = "sha256-UW53ZdKb3RSrrcZ9GxZsJyjzS/uKR8lkaLLyi+2o27U="; + # })}"; + # autoNumlock = true; + # settings = { + # General = { + # InputMethod = ""; + # }; + # }; + # }; + + services.greetd = { enable = true; - theme = "${(pkgs.fetchFromGitHub { - owner = "EricKotato"; - repo = "sddm-slice"; - rev = "763b8f4e01c00c1f8590fc7a103e14f6e8449443"; - sha256 = "sha256-UW53ZdKb3RSrrcZ9GxZsJyjzS/uKR8lkaLLyi+2o27U="; - })}"; - autoNumlock = true; settings = { - General = { - InputMethod = ""; + default_session = { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet -r -g \"what's good\" --time --sessions ${config.services.xserver.displayManager.sessionData.desktops}/share/wayland-sessions"; + # export SESSION_DIRS=${config.services.xserver.displayManager.sessionData.desktops}/share/wayland-sessions; + # command = "${pkgs.greetd.regreet}/bin/regreet -l off"; + user = "greeter"; }; }; }; + + + security.polkit.enable = true; + services.xserver.desktopManager.plasma5.runUsingSystemd = true; programs.dconf.enable = true; @@ -141,6 +161,9 @@ nix-index comma + river + + # hackneyed ]; @@ -155,9 +178,9 @@ privateKey = "WD0CNYazB8D19SJvwz/TdPqoWgWCGfTwA7mim16q7UM="; peers = [ { - publicKey = "kOpdNLq/ePrlc2wXGinRvbQWRhy755cZ4G4S7xwsKiw="; + publicKey = "QhE7I5TnUuc3gLqSeF9KhOr0oew5v03bpj0EHrEOR2M="; allowedIPs = [ "0.0.0.0/0" ]; - endpoint = "43.245.162.234:51820"; + endpoint = "89.44.10.66:51820"; persistentKeepalive = 25; } ]; diff --git a/system/quiver.nix b/system/quiver.nix index dc4c885..682d6ee 100755 --- a/system/quiver.nix +++ b/system/quiver.nix @@ -1,6 +1,12 @@ { config, lib, pkgs, modulesPath, ... }: -{ +let + flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; + + hyprland = (import flake-compat { + src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz"; + }).defaultNix; +in { nixpkgs.overlays = [ (self: super: { @@ -9,12 +15,16 @@ }) ]; + nix.settings = { + substituters = [ "https://hyprland.cachix.org" ]; + trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; + }; + imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + [ hyprland.nixosModules.default ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbcore" "sd_mod" ]; - boot.initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ]; + boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" "i2c-dev" ]; boot.extraModulePackages = [ ]; boot.kernelParams = [ "nvidia_drm.modeset=1" "mitigations=off" "acpi_enforce_resources=lax" "preempt=full" ]; @@ -30,6 +40,14 @@ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + virtualisation = { + podman = { + enable = true; + dockerCompat = true; + defaultNetwork.settings.dns_enabled = true; + }; + }; + services.minidlna = { enable = true; settings = { @@ -39,6 +57,13 @@ }; }; + programs.hyprland = { + enable = true; + xwayland = { + enable = true; + }; + nvidiaPatches = true; + }; services.xserver.videoDrivers = [ "nvidia" ]; hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta; hardware.nvidia.modesetting.enable = true; diff --git a/system/syspkgs/lemurs.nix b/system/syspkgs/lemurs.nix new file mode 100755 index 0000000..82af7a8 --- /dev/null +++ b/system/syspkgs/lemurs.nix @@ -0,0 +1,26 @@ +{ lib, fetchFromGitHub, rustPlatform, linux-pam, pkg-config }: + +rustPlatform.buildRustPackage rec { + pname = "lemurs"; + version = "0.3.1"; + + src = fetchFromGitHub { + owner = "coastalwhite"; + repo = pname; + rev = "60fda2a"; + sha256 = "sha256-mQXavJULD5iyOnzj72xTV0EQ1HQvj25SHsbDgfRg4lQ="; + }; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ linux-pam ]; + + cargoSha256 = "sha256-OCaIeQB8reK0089vbC+4IvQt5pKdZ2SCyyGuQEYWzjo="; + + meta = with lib; { + description = "A customizable TUI display/login manager written in Rust"; + homepage = "https://git.atagen.co/coastalwhite/lemurs"; + license = licenses.mit; + maintainers = [ ]; + }; + +} diff --git a/system/syspkgs/ly.nix b/system/syspkgs/ly.nix new file mode 100644 index 0000000..dd499fe --- /dev/null +++ b/system/syspkgs/ly.nix @@ -0,0 +1,41 @@ +{ stdenv, lib, fetchFromGitHub, linux-pam, libxcb, git }: + +stdenv.mkDerivation rec { + pname = "ly"; + version = "0.5.0+"; + + src = fetchFromGitHub { + owner = "fairyglade"; + repo = pname; + rev = "c64f806a68af225cc95623971b5e464abb55b879"; + sha256 = "sha256-orCqjKlK6U1q7NDoMwxZZE44cyG8yuxdCCk1cQAalP0="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ git ]; + buildInputs = [ linux-pam libxcb ]; + makeFlags = [ "FLAGS=-Wno-error=unused-result" ]; + + preBuildPhase = '' + mkdir -p ./data + export DESTDIR="$PWD" + export DATADIR="$PWD/data" + ''; + buildPhase = '' + make -j16 + ''; + + installPhase = '' + mkdir -p $out/bin + cp bin/ly $out/bin + mkdir -p $out/etc/ly + cp -R ./data/* $out/etc/ly + ''; + + meta = with lib; { + description = "TUI display manager"; + license = licenses.wtfpl; + homepage = "https://github.com/fairyglade/ly"; + maintainers = [ ]; + }; +}