diff options
| author | Freya Murphy <freya@freyacat.org> | 2026-02-18 22:03:26 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-02-18 22:03:46 -0500 |
| commit | 0cf4bac8d8b5a6b3ecf914f14663cb00d4cb235b (patch) | |
| tree | c2daf12b24a85cdfd00ba6b4800a8db311ef5221 | |
| parent | update commit more (fix thinkpad) (diff) | |
| download | dotfiles-nix-0cf4bac8d8b5a6b3ecf914f14663cb00d4cb235b.tar.gz dotfiles-nix-0cf4bac8d8b5a6b3ecf914f14663cb00d4cb235b.tar.bz2 dotfiles-nix-0cf4bac8d8b5a6b3ecf914f14663cb00d4cb235b.zip | |
Diffstat (limited to '')
| -rw-r--r-- | flake.lock | 39 | ||||
| -rw-r--r-- | flake.nix | 6 | ||||
| -rw-r--r-- | home/apps/astal.nix | 13 | ||||
| -rw-r--r-- | hosts/shinji/default.nix | 10 | ||||
| -rw-r--r-- | hosts/shinji/hardware.nix | 5 | ||||
| -rw-r--r-- | hosts/work/default.nix | 3 | ||||
| -rw-r--r-- | hosts/wsl/default.nix | 2 | ||||
| -rw-r--r-- | options.nix | 5 | ||||
| -rw-r--r-- | pkgs/astal/builder.nix | 63 | ||||
| -rw-r--r-- | pkgs/astal/default.nix | 35 | ||||
| -rw-r--r-- | pkgs/astal/theme.nix | 34 | ||||
| -rw-r--r-- | pkgs/default.nix | 18 | ||||
| -rw-r--r-- | system/default.nix | 8 | ||||
| -rw-r--r-- | system/fingerprint.nix | 5 |
14 files changed, 109 insertions, 137 deletions
@@ -61,26 +61,6 @@ "type": "github" } }, - "astal": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769774308, - "narHash": "sha256-8Ve6VdUpcYbl8bS5oyDwVnnNobyPxdPmUHGgSDyOazQ=", - "owner": "aylur", - "repo": "astal", - "rev": "eb235f8813bdea2a4a38ac228f2efc4e2a8a90af", - "type": "github" - }, - "original": { - "owner": "aylur", - "repo": "astal", - "type": "github" - } - }, "caelestia-cli": { "inputs": { "caelestia-shell": [ @@ -206,11 +186,11 @@ ] }, "locked": { - "lastModified": 1771037579, - "narHash": "sha256-NX5XuhGcsmk0oEII2PEtMRgvh2KaAv3/WWQsOpxAgR4=", + "lastModified": 1771102945, + "narHash": "sha256-e5NfW8NhC3qChR8bHVni/asrig/ZFzd1wzpq+cEE/tg=", "owner": "nix-community", "repo": "home-manager", - "rev": "05e6dc0f6ed936f918cb6f0f21f1dad1e4c53150", + "rev": "ff5e5d882c51f9a032479595cbab40fd04f56399", "type": "github" }, "original": { @@ -318,11 +298,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1771026735, - "narHash": "sha256-vIzZ1Pb1o9xOXwGTdr09vRwGFgD/II6ZnGpnCfl8zz8=", + "lastModified": 1771074565, + "narHash": "sha256-Xja6+RH4ka2VBHT3jo5Gj78r8dgclFDbd5MxTSmTK7Q=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "e80f705d76d4dbe836e0f57aadea994a624ac63e", + "rev": "48176160ab953c33a391413ce6b927546d6a4b87", "type": "github" }, "original": { @@ -633,11 +613,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1770841267, - "narHash": "sha256-9xejG0KoqsoKEGp2kVbXRlEYtFFcDTHjidiuX8hGO44=", + "lastModified": 1771008912, + "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ec7c70d12ce2fc37cb92aff673dcdca89d187bae", + "rev": "a82ccc39b39b621151d6732718e3e250109076fa", "type": "github" }, "original": { @@ -706,7 +686,6 @@ "root": { "inputs": { "apple-fonts": "apple-fonts", - "astal": "astal", "caelestia-shell": "caelestia-shell", "home-manager": "home-manager", "hy3": "hy3", @@ -19,9 +19,6 @@ # sops sops-nix.url = "github:Mic92/sops-nix"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; - # astal - astal.url = "github:aylur/astal"; - astal.inputs.nixpkgs.follows = "nixpkgs"; # talc talc.url = "git+https://g.trimill.xyz/talc"; talc.inputs.nixpkgs.follows = "nixpkgs"; @@ -104,8 +101,7 @@ packages = perSystem ( pkgs: system: import ./pkgs { - inherit pkgs inputs system; - inherit (nixpkgs) lib; + inherit pkgs; } ); diff --git a/home/apps/astal.nix b/home/apps/astal.nix index 1dd8527..73e90f7 100644 --- a/home/apps/astal.nix +++ b/home/apps/astal.nix @@ -1,11 +1,12 @@ { lib, config, - inputs, - system, + pkgs, ... }: let - astal = inputs.self.packages.${system}; + astal = pkgs.astal.override { + inherit (config.options) theme; + }; inherit (lib) mkIf; cfg = config.apps.astal; @@ -16,8 +17,8 @@ in { default.appLauncher = lib.mkDefault "astal-launcher"; home.packages = [ - astal.astal.shell - astal.astal.launcher + astal.shell + astal.launcher ]; systemd.user.services.astal = { @@ -33,7 +34,7 @@ in { }; Service = { - ExecStart = "${astal.astal.shell}/bin/astal-shell"; + ExecStart = "${astal.shell}/bin/astal-shell"; Restart = "always"; RestartSec = "10"; }; diff --git a/hosts/shinji/default.nix b/hosts/shinji/default.nix index 533c0eb..750b22a 100644 --- a/hosts/shinji/default.nix +++ b/hosts/shinji/default.nix @@ -1,11 +1,6 @@ # Shinji # System configuration for my laptop -{ - pkgs, - inputs, - system, - ... -}: { +{pkgs, ...}: { imports = [ ./hardware.nix ./sops.nix @@ -14,6 +9,7 @@ # options hostName = "shinji"; + cores = 16; monitors = [ { port = "eDP-1"; @@ -47,7 +43,7 @@ # logitech mouse udev services.udev.packages = [ - inputs.self.packages.${system}.solaar-udev-rules + pkgs.solaar-udev-rules ]; # packages diff --git a/hosts/shinji/hardware.nix b/hosts/shinji/hardware.nix index e7877b9..5a32364 100644 --- a/hosts/shinji/hardware.nix +++ b/hosts/shinji/hardware.nix @@ -1,6 +1,8 @@ { config, inputs, + pkgs, + lib, ... }: { # external defaults @@ -69,6 +71,9 @@ "nvidia-settings" ]; + # nvidia brokie + boot.kernelPackages = lib.mkForce pkgs.linuxPackages_6_18; + # luks device boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/ad489bfa-4280-44ea-8ad2-60347b516d60"; boot.initrd.luks.devices."swap".device = "/dev/disk/by-uuid/550e638d-eade-4d2f-aa39-c38774c91af3"; diff --git a/hosts/work/default.nix b/hosts/work/default.nix index 083c2ec..03ad03a 100644 --- a/hosts/work/default.nix +++ b/hosts/work/default.nix @@ -3,7 +3,6 @@ { lib, pkgs, - inputs, ... }: { # options @@ -14,7 +13,7 @@ # packages extraHome = { home.packages = with pkgs; [ - inputs.self.packages.${system}.arcanist + arcanist ]; programs.git = { diff --git a/hosts/wsl/default.nix b/hosts/wsl/default.nix index 3c60f14..f73eb01 100644 --- a/hosts/wsl/default.nix +++ b/hosts/wsl/default.nix @@ -25,7 +25,7 @@ ])) gnumake texliveFull - inputs.self.packages.${system}.arcanist + arcanist ]; # wsl ssh key diff --git a/options.nix b/options.nix index 3eb8b80..61dbc09 100644 --- a/options.nix +++ b/options.nix @@ -269,6 +269,11 @@ in { description = "NixOS State Version"; default = "26.05"; }; + cores = mkOption { + type = types.int; + description = "Number of logical cores on the system"; + default = 8; + }; # # Packages diff --git a/pkgs/astal/builder.nix b/pkgs/astal/builder.nix index db102bd..ffb38ce 100644 --- a/pkgs/astal/builder.nix +++ b/pkgs/astal/builder.nix @@ -1,43 +1,44 @@ { - pkgs, + stdenvNoCC, astal, + gobject-introspection, + lib, + lua, name, src, - extraLuaPackages ? (_: []), + wrapGAppsHook3, extraPackages ? [], }: let - lua = pkgs.lua.withPackages (ps: - (extraLuaPackages ps) - ++ [ - ps.lgi - (ps.luaPackages.toLuaModule (pkgs.stdenvNoCC.mkDerivation { - name = "astal"; - src = "${astal}/lang/lua/astal"; - dontBuild = true; - installPhase = '' - mkdir -p $out/share/lua/${ps.lua.luaversion}/astal - cp -r * $out/share/lua/${ps.lua.luaversion}/astal - ''; - })) - (ps.luaPackages.toLuaModule (pkgs.stdenvNoCC.mkDerivation { - inherit src name; - dontBuild = true; - installPhase = '' - mkdir -p $out/share/lua/${ps.lua.luaversion} - cp -r * $out/share/lua/${ps.lua.luaversion} - ''; - })) - ]); + lua_ = lua.withPackages (ps: [ + ps.lgi + (ps.luaPackages.toLuaModule (stdenvNoCC.mkDerivation { + name = "astal"; + src = "${astal}/lang/lua/astal"; + dontBuild = true; + installPhase = '' + mkdir -p $out/share/lua/${ps.lua.luaversion}/astal + cp -r * $out/share/lua/${ps.lua.luaversion}/astal + ''; + })) + (ps.luaPackages.toLuaModule (stdenvNoCC.mkDerivation { + inherit src name; + dontBuild = true; + installPhase = '' + mkdir -p $out/share/lua/${ps.lua.luaversion} + cp -r * $out/share/lua/${ps.lua.luaversion} + ''; + })) + ]); script = '' - #!${lua}/bin/lua + #!${lua_}/bin/lua require "init" ''; in - pkgs.stdenvNoCC.mkDerivation { + stdenvNoCC.mkDerivation { inherit src name; - nativeBuildInputs = with pkgs; [ + nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ]; @@ -45,9 +46,9 @@ in buildInputs = extraPackages ++ [ - lua - astal.packages.${pkgs.stdenv.hostPlatform.system}.io - astal.packages.${pkgs.stdenv.hostPlatform.system}.astal3 + lua_ + astal.io + astal.astal3 ]; installPhase = '' @@ -63,7 +64,7 @@ in preFixup = '' gappsWrapperArgs+=( - --prefix PATH : "${pkgs.lib.makeBinPath extraPackages}" + --prefix PATH : "${lib.makeBinPath extraPackages}" ) ''; } diff --git a/pkgs/astal/default.nix b/pkgs/astal/default.nix index dc8f2a7..d076f07 100644 --- a/pkgs/astal/default.nix +++ b/pkgs/astal/default.nix @@ -1,32 +1,29 @@ { - pkgs, - stdenv, - inputs, - options, + astal, + callPackage, + dart-sass, + networkmanager, + runCommand, + writeShellApplication, + # System theme must be passed in + theme ? null, ... }: let - inherit (pkgs) runCommand dart-sass; - - apkgs = inputs.astal.packages.${stdenv.hostPlatform.system}; - scss = "${dart-sass}/bin/sass"; - theme = import ./theme.nix {inherit options;}; - + vars = import ./theme.nix {inherit theme;}; mkAstal = file: - import ./builder.nix { - inherit pkgs; - astal = inputs.astal; + callPackage ./builder.nix { src = runCommand "src" {} '' mkdir -p $out cp -r ${./src}/{*.lua,widget} $out/ cp $out/${file}.lua $out/init.lua cp -r ${./src}/style/* . - echo '${theme}' > theme.scss + echo '${vars}' > theme.scss cat theme.scss style.scss widget/* > main.scss - ${scss} main.scss $out/main.css + ${dart-sass}/bin/sass main.scss $out/main.css ''; name = "astal-${file}"; extraPackages = - (with apkgs; [ + (with astal; [ apps battery hyprland @@ -36,15 +33,15 @@ tray wireplumber ]) - ++ (with pkgs; [ + ++ [ networkmanager - ]); + ]; }; mkAstalWrapper = file: let pkg = mkAstal file; in - pkgs.writeShellApplication { + writeShellApplication { name = "astal-${file}"; text = '' ${pkg}/bin/astal-${file} diff --git a/pkgs/astal/theme.nix b/pkgs/astal/theme.nix index 9774012..b76864c 100644 --- a/pkgs/astal/theme.nix +++ b/pkgs/astal/theme.nix @@ -1,26 +1,26 @@ -{options, ...}: '' +{theme, ...}: '' - $text: #${options.theme.colors.text}; - $subtext: #${options.theme.colors.subtext}; + $text: #${theme.colors.text}; + $subtext: #${theme.colors.subtext}; - $base: #${options.theme.colors.base}; - $surface: #${options.theme.colors.surface}; - $overlay: #${options.theme.colors.overlay}; + $base: #${theme.colors.base}; + $surface: #${theme.colors.surface}; + $overlay: #${theme.colors.overlay}; - $primary: #${options.theme.colors.primary}; - $success: #${options.theme.colors.success}; - $warning: #${options.theme.colors.warning}; - $error: #${options.theme.colors.error}; + $primary: #${theme.colors.primary}; + $success: #${theme.colors.success}; + $warning: #${theme.colors.warning}; + $error: #${theme.colors.error}; - $border: ${toString options.theme.borderWidth}px; + $border: ${toString theme.borderWidth}px; - $inner-radius: ${toString options.theme.innerRadius}px; - $outer-radius: ${toString options.theme.outerRadius}px; + $inner-radius: ${toString theme.innerRadius}px; + $outer-radius: ${toString theme.outerRadius}px; - $inner-gap: ${toString options.theme.innerGap}px; - $outer-gap: ${toString options.theme.outerGap}px; + $inner-gap: ${toString theme.innerGap}px; + $outer-gap: ${toString theme.outerGap}px; - $font-name: "${options.theme.font.regular}", "${options.theme.font.monospace}"; - $font-size: ${toString options.theme.font.size}px; + $font-name: "${theme.font.regular}", "${theme.font.monospace}"; + $font-size: ${toString theme.font.size}px; '' diff --git a/pkgs/default.nix b/pkgs/default.nix index f2bd7c6..3b6e894 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,20 +1,6 @@ -{ - pkgs, - inputs, - lib, - ... -}: let - options = - (lib.evalModules { - modules = [ - ../options.nix - ]; - }).config; -in { +{pkgs}: { arcanist = pkgs.callPackage ./arcanist {}; - astal = pkgs.callPackage ./astal { - inherit inputs options; - }; + astal = pkgs.callPackage ./astal {}; libfprint-2-tod1-vfs0090 = pkgs.callPackage ./libfprint-2-tod1-vfs0090 {}; solaar-udev-rules = pkgs.callPackage ./solaar-udev-rules {}; } diff --git a/system/default.nix b/system/default.nix index aba8c11..e912856 100644 --- a/system/default.nix +++ b/system/default.nix @@ -32,6 +32,8 @@ experimental-features = ["nix-command" "flakes"]; use-xdg-base-directories = true; trusted-users = ["root" "@wheel"]; + max-jobs = config.cores / 4; + cores = (config.cores - 2) / config.nix.settings.max-jobs; }; }; @@ -39,6 +41,11 @@ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.unfreePackages; + # load overlays + nixpkgs.overlays = [ + (final: _: import ../pkgs {pkgs = final;}) + ]; + # set state version system.stateVersion = config.stateVersion; @@ -112,6 +119,7 @@ }; # use the latest kernel + boot.kernelPackages = pkgs.linuxPackages_latest; # sysrq diff --git a/system/fingerprint.nix b/system/fingerprint.nix index 02b0e75..35737f5 100644 --- a/system/fingerprint.nix +++ b/system/fingerprint.nix @@ -1,8 +1,7 @@ { lib, config, - inputs, - system, + pkgs, ... }: let inherit (lib) mkIf; @@ -11,7 +10,7 @@ in { services.fprintd = { enable = true; tod.enable = true; - tod.driver = inputs.self.packages.${system}.libfprint-2-tod1-vfs0090; + tod.driver = pkgs.libfprint-2-tod1-vfs0090; }; }; } |