Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a206132d94
|
Generated
+42
-47
@@ -35,11 +35,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1787985728,
|
||||
"narHash": "sha256-qKYq/NmpxLKn2ZcxNUGx7PgVlmxW833xKZ3Hngvvnro=",
|
||||
"lastModified": 1782533477,
|
||||
"narHash": "sha256-2enYwf3n9GUkne9v4J3Ud6LpoG4Uarl3BaSQgRAAH7o=",
|
||||
"owner": "caelestia-dots",
|
||||
"repo": "cli",
|
||||
"rev": "56f404c61dff30d698961780aefcf48bd4dd7b86",
|
||||
"rev": "e9e115568f818ee1df2d7a9e21925141b053ec6e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -58,11 +58,11 @@
|
||||
"quickshell": "quickshell"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1788247772,
|
||||
"narHash": "sha256-KJtxaK9Ws9DimBKdrZFs3iHjUHF/V1WviJx5A2zk86c=",
|
||||
"lastModified": 1782636677,
|
||||
"narHash": "sha256-u01nEjf7afRMCtRjp0LV45DmhC4/n/uPY3S/HAh/V2w=",
|
||||
"owner": "caelestia-dots",
|
||||
"repo": "shell",
|
||||
"rev": "065dac2957a1f31bd2d2f029cabb96f69921f72b",
|
||||
"rev": "145a6795ee41e023e863681cec6c5db3b334ffc0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -79,11 +79,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1788281219,
|
||||
"narHash": "sha256-UpYGQw2PZhZPCDKeFGKYA9vbBbwdXwhfyifUqwRw4lM=",
|
||||
"lastModified": 1782492933,
|
||||
"narHash": "sha256-v/BH1zfHaCFqP+4Ev9PWiGy15YrpmI9wzjxRtiFhgvA=",
|
||||
"owner": "9001",
|
||||
"repo": "copyparty",
|
||||
"rev": "704af697c78efd189cc56359f5a9aa17d2d74944",
|
||||
"rev": "4c8203016f089b38281ed922a78255146f099e7b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -207,11 +207,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1788229478,
|
||||
"narHash": "sha256-G0F2rFORVcFkEvVdE/qWQTnYekIc77YP5/vRF9nZlxU=",
|
||||
"lastModified": 1782702263,
|
||||
"narHash": "sha256-8/MG4Su7PhnynrmsVO61IeAfrK7GuUEu+E+gwbhy1QQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "1dc2d1f720ab17fc7981e087346bf54b26d284b1",
|
||||
"rev": "789a35fbdeb3c46b260096daa0b321c11be527ea",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -245,24 +245,19 @@
|
||||
}
|
||||
},
|
||||
"m3shapes": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"caelestia-shell",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1787906858,
|
||||
"narHash": "sha256-YZelgEZflFNwGutX4/tIzBdbOeghJgE2oDw0uWYGxns=",
|
||||
"lastModified": 1781017666,
|
||||
"narHash": "sha256-kfHyzZaPHgqZML48OA+5JwBOsLdQJ2ci/aGPShvUB4Y=",
|
||||
"owner": "soramanew",
|
||||
"repo": "m3shapes",
|
||||
"rev": "32ad9ce328bb77ed349b40a3be10ee9ea610b8ab",
|
||||
"rev": "bdc327b29f95394a732baf3c9b19658ba23755b6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "soramanew",
|
||||
"repo": "m3shapes",
|
||||
"rev": "32ad9ce328bb77ed349b40a3be10ee9ea610b8ab",
|
||||
"rev": "bdc327b29f95394a732baf3c9b19658ba23755b6",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@@ -273,11 +268,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1788080100,
|
||||
"narHash": "sha256-n14luQo3F/ZLfCEHk1QieiI1nGnW92ZQZeZ0UIb0UMQ=",
|
||||
"lastModified": 1782636943,
|
||||
"narHash": "sha256-ripjZa7BBLwL1uS5VJF3s/VpZpWt5ZIQEvkJ/FJNpQw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "dbb978fa87faf13398e90ccbc52c343d21c7dd6d",
|
||||
"rev": "058b1f9381fa79fcda49982370a750ff92dbba43",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -288,11 +283,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1788179007,
|
||||
"narHash": "sha256-hn1oU2rue2SYK8dAr8+WNZWtbsz1S2W5mnHlSEuh3bo=",
|
||||
"lastModified": 1782467914,
|
||||
"narHash": "sha256-pGvFkM8N0xEkIIXDe5YYfbEAvHrk4IxBrjB/x8OomhE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "34ab99075ac4f7e40cf037eef32cb1c360bb85e9",
|
||||
"rev": "e73de5be04e0eff4190a1432b946d469c794e7b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -304,11 +299,11 @@
|
||||
},
|
||||
"nixpkgsStable": {
|
||||
"locked": {
|
||||
"lastModified": 1782847189,
|
||||
"narHash": "sha256-twXPFqFsrrY5r28Zh7Homgcp2gUMBgQ6WDS98Q/3xFI=",
|
||||
"lastModified": 1782498288,
|
||||
"narHash": "sha256-8/X3yyTXiE82b38n32ItbOqfWOVBl+gKa8fILyZfR4Q=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b6018f87da91d19d0ab4cf979885689b469cdd41",
|
||||
"rev": "3cac626ec5e3703e835f227687e88aa9e2f25701",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -347,11 +342,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1787994703,
|
||||
"narHash": "sha256-6SUZyyALo19heYPa/Xmu2H4zV+wvdfVX4fTcqbgHRnI=",
|
||||
"lastModified": 1781847791,
|
||||
"narHash": "sha256-Mo2YtNEGlcySnbq0YuP3nUKMAQCMAfE+TcCffo5vzD8=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "2d3b3e9c70ef380dff751b61d334dc88df016c29",
|
||||
"revCount": 856,
|
||||
"rev": "68c2c85c33845385f7ab8147b32f1450b1e468e0",
|
||||
"revCount": 824,
|
||||
"type": "git",
|
||||
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
||||
},
|
||||
@@ -471,11 +466,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1786629091,
|
||||
"narHash": "sha256-gkig4nPi1CWc4Z50GBsjE4ygSE7hMpl/TwID2an2Cck=",
|
||||
"lastModified": 1782165805,
|
||||
"narHash": "sha256-478kKQBvK6SYTOdN2h9jhKJv94nbXRbFMfuL1WshErg=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "a8627b21b9107c5711c96b84f32a9a4b3d45295f",
|
||||
"rev": "56b24064fdcaedca53553b1a6d607fd23b613a24",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -492,11 +487,11 @@
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1788263070,
|
||||
"narHash": "sha256-Mw163zYcjr59hB2JMC1iKU1Y69SNKZ2r/haXZ07UWQY=",
|
||||
"lastModified": 1782633406,
|
||||
"narHash": "sha256-JOSMk12GgnTLVlUSCuKkqyUF6cw82wl7t7e1WuFfg5s=",
|
||||
"owner": "Gerg-L",
|
||||
"repo": "spicetify-nix",
|
||||
"rev": "27ff19b00338052e8a504e1d1a34efad82c4bb26",
|
||||
"rev": "5ff9a6ca9dcbad7cccea2c97d30237468b16feda",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -512,11 +507,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1788143273,
|
||||
"narHash": "sha256-YXleehtVHiLcH2+V0lSrl5Nmo2c+J11tI3+l4l9q3AQ=",
|
||||
"lastModified": 1782700116,
|
||||
"narHash": "sha256-E63+nvH3jkAt/hBxhMa5aykstXdqRvBSeqNRDpQNv78=",
|
||||
"owner": "nix-community",
|
||||
"repo": "srvos",
|
||||
"rev": "e4d3f8fe5f1d4246d32177315edf8d9104f1c32b",
|
||||
"rev": "d45cf79058f2d42c0b0dd7912bedb5d14faa00ed",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -592,11 +587,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1788083005,
|
||||
"narHash": "sha256-e6U3sXUlu/QzZyJp/+ymW8s57Jbdb7bwT9+WaTAhHfQ=",
|
||||
"lastModified": 1782624757,
|
||||
"narHash": "sha256-pqFaCAV+g8H+p0kE4vYn9ZgcEFvt644zGy7SyCdf9c8=",
|
||||
"owner": "youwen5",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "afbbbef7c3c00f160f4a9dfdd8c6c6b8b089a33f",
|
||||
"rev": "907465791e7064d86d37964dd95e23280dfb68da",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -96,8 +96,7 @@
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
inherit (self) outputs;
|
||||
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
formatter = pkgs.alejandra;
|
||||
devShells.default = pkgs.mkShell {
|
||||
@@ -112,7 +111,7 @@
|
||||
packages = {
|
||||
homeConfigurations = let
|
||||
extraSpecialArgs = {inherit inputs outputs system;};
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
defaultUserModules = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.spicetify.homeManagerModules.default
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [./helpers.nix];
|
||||
|
||||
config = {
|
||||
flake = {
|
||||
nixosConfigurations = lib.mkMerge [
|
||||
(config.flake.lib.mkNixos "x86_64-linux" "alys")
|
||||
(config.flake.lib.mkNixos "x86_64-linux" "elcafe")
|
||||
(config.flake.lib.mkNixos "x86_64-linux" "gampo")
|
||||
(config.flake.lib.mkNixos "x86_64-linux" "marpa")
|
||||
(config.flake.lib.mkNixos "x86_64-linux" "NaroMk3")
|
||||
(config.flake.lib.mkNixos "x86_64-linux" "tilo")
|
||||
(config.flake.lib.mkPinetab "x86_64-linux" [
|
||||
inputs.self.modules.nixos.pinetab2-gnome
|
||||
])
|
||||
];
|
||||
|
||||
homeConfigurations = lib.mkMerge [
|
||||
(config.flake.lib.mkHome "aarch64-linux" "phundrak" "pinetab2")
|
||||
(config.flake.lib.mkHome "x86_64-linux" "creug" "elcafe")
|
||||
(config.flake.lib.mkHome "x86_64-linux" "phundrak" "NaroMk3")
|
||||
(config.flake.lib.mkHome "x86_64-linux" "phundrak" "alys")
|
||||
(config.flake.lib.mkHome "x86_64-linux" "phundrak" "elcafe")
|
||||
(config.flake.lib.mkHome "x86_64-linux" "phundrak" "gampo")
|
||||
(config.flake.lib.mkHome "x86_64-linux" "phundrak" "marpa")
|
||||
(config.flake.lib.mkHome "x86_64-linux" "phundrak" "tilo")
|
||||
];
|
||||
};
|
||||
perSystem = {
|
||||
config',
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
formatter = pkgs.alejandra;
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
nh
|
||||
jujutsu
|
||||
git
|
||||
inputs.jj-cz.packages.${config'.system}.default
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
imports = [./home-manager.nix];
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
settingsToLines = with lib;
|
||||
settings:
|
||||
concatStringsSep "\n" (
|
||||
mapAttrsToList (name: value: "set ${name} ${toString value}") settings
|
||||
);
|
||||
in {
|
||||
flake-file.inputs.zen-browser = {
|
||||
url = "github:youwen5/zen-browser-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake.modules.homeManager.firefox = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.flake.options.firefox;
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
zen = inputs.zen-browser.packages.${system}.default;
|
||||
in {
|
||||
options.flake.options.firefox = {
|
||||
enable = mkEnableOption "enable Firefox";
|
||||
useZen = mkEnableOption "use Zen instead of Firefox";
|
||||
tridactyl = {
|
||||
enable = mkEnableOption "enable Tridactyl";
|
||||
preConfig = mkOption {
|
||||
description = "Lines to add to the beginning of tridactylrc";
|
||||
type = types.lines;
|
||||
default = "";
|
||||
};
|
||||
config = mkOption {
|
||||
type = with types;
|
||||
attrsOf (oneOf [int str bool]);
|
||||
description = "Tridactyl settings (converted to 'set key value' lines)";
|
||||
default = {};
|
||||
example = {
|
||||
smoothscroll = true;
|
||||
history = 1000;
|
||||
};
|
||||
};
|
||||
extraConfig = mkOption {
|
||||
description = "Extra lines to add to tridactylrc (for bindings, autocmds, etc)";
|
||||
type = types.lines;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.sessionVariables.MOZ_ENABLE_WAYLAND = "1";
|
||||
programs.firefox = {
|
||||
inherit (cfg) enable;
|
||||
package =
|
||||
if cfg.useZen
|
||||
then zen
|
||||
else pkgs.firefox;
|
||||
nativeMessagingHosts = lists.optional cfg.tridactyl.enable pkgs.tridactyl-native;
|
||||
configPath = ".mozilla/firefox";
|
||||
};
|
||||
xdg.configFile."tridactyl/tridactylrc" = mkIf cfg.tridactyl.enable {
|
||||
text = concatStringsSep "\n" (filter (s: s != "") [
|
||||
cfg.tridactyl.preConfig
|
||||
(settingsToLines (cfg.tridactyl.config
|
||||
// {
|
||||
browser =
|
||||
if cfg.useZen
|
||||
then "zen"
|
||||
else "firefox";
|
||||
}))
|
||||
cfg.tridactyl.extraConfig
|
||||
]);
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
flake.modules.nixos.amdgpu = ./nixos.nix;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{pkgs, ...}: {
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
mesa rocmPackages.clr rocmPackages.clr.icd rocmPackages.rocblas
|
||||
rocmPackages.hipblas rocmPackages.rpp nvtopPackages.amd
|
||||
];
|
||||
};
|
||||
amdgpu = { initrd.enable = true; opencl.enable = true; };
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ clinfo amdgpu_top nvtopPackages.amd ];
|
||||
systemd = {
|
||||
packages = with pkgs; [ lact ];
|
||||
services.lactd.wantedBy = [ "multi-user.target" ];
|
||||
tmpfiles.rules = let
|
||||
rocmEnv = pkgs.symlinkJoin {
|
||||
name = "rocm-combined";
|
||||
paths = with pkgs.rocmPackages; [ clr clr.icd rocblas hipblas rpp ];
|
||||
};
|
||||
in [ "L+ /opt/rocm - - - - ${rocmEnv}" ];
|
||||
};
|
||||
environment.variables = {
|
||||
ROCM_PATH = "/opt/rocm";
|
||||
HIP_VISIBLE_DEVICES = "1";
|
||||
ROCM_VISIBLE_DEVICES = "1";
|
||||
HSA_OVERRIDE_GFX_VERSION = "10.3.0";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{inputs, ...}:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
rockchip = {
|
||||
url = "github:raboof/nixos-rockchip/pinetab-linux-7.0";
|
||||
inputs.utils.follows = "flake-utils";
|
||||
inputs.nixpkgsStable.follows = "nixpkgsStable";
|
||||
inputs.nixpkgsUnstable.follows = "nixpkgs";
|
||||
};
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
config.flake.factory.pinetab2 = buildPlatform: variantModules: {
|
||||
nixos.pinetab2 = {
|
||||
imports = [
|
||||
inputs.rockchip.nixosModules.sdImageRockchip
|
||||
inputs.rockchip.nixosModules.dtOverlayPCIeFix
|
||||
inputs.rockchip.nixosModules.noZFS
|
||||
inputs.self.modules.nixos.pinetab2-base
|
||||
] ++ variantModules;
|
||||
rockchip.uBoot = inputs.rockchip.packages.${buildPlatform}.uBootPineTab2;
|
||||
boot.kernelPackages =
|
||||
inputs.rockchip.legacyPackages.${buildPlatform}.kernel_linux_7_0_pinetab_unstable;
|
||||
hardware.firmware = [ inputs.rockchip.packages.aarch64-linux.bes2600 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config.flake.lib = {
|
||||
mkNixos = system: name: {
|
||||
${name} = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
inputs.self.modules.nixos.${name}
|
||||
{nixpkgs.hostPlatform = lib.mkDefault system;}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
mkHome = system: username: hostname: {
|
||||
"${username}@${hostname}" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
modules = [inputs.self.modules.homeManager.${username}.${hostname}];
|
||||
};
|
||||
};
|
||||
|
||||
mkPinetab = buildPlatform: variantModules: {
|
||||
pinetab2 = inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules =
|
||||
[
|
||||
inputs.rockchip.nixosModules.sdImageRockchip
|
||||
inputs.rockchip.nixosModules.dtOverlayPCIeFix
|
||||
inputs.rockchip.nixosModules.noZFS
|
||||
inputs.self.modules.nixos.pinetab2-base
|
||||
]
|
||||
++ variantModules
|
||||
++ [
|
||||
{
|
||||
rockchip.uBoot = inputs.rockchip.packages.${buildPlatform}.uBootPineTab2;
|
||||
boot.kernelPackages =
|
||||
inputs.rockchip.legacyPackages.${buildPlatform}.kernel_linux_7_0_pinetab_unstable;
|
||||
hardware.firmware = [inputs.rockchip.packages.aarch64-linux.bes2600];
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (inputs.nixpkgs.lib.getName pkg) ["bes2600-firmware"];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
flake-file = {
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
nixpkgsStable.url = "nixpkgs/nixos-25.11";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-file.url = "github:vic/flake-file";
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
jj-cz = {
|
||||
url = "git+https://labs.phundrak.com/phundrak/jj-cz?ref=main";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
outputs = "flake-parts";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
flake.nixConfig = {
|
||||
extra-trusted-public-keys = [
|
||||
"marpa-local:XoO+dFN4PeauF52pYuy3Vh4Sdtl2qIdxu5aUasWKv6Q="
|
||||
"phundrak.cachix.org-1:osJAkYO0ioTOPqaQCIXMfIRz1/+YYlVFkup3R2KSexk="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
];
|
||||
extra-substituters = [
|
||||
"http://marpa:5000?priority=5"
|
||||
"https://phundrak.cachix.org?priority=10"
|
||||
"https://nix-community.cachix.org?priority=20"
|
||||
"https://cache.nixos.org?priority=40"
|
||||
];
|
||||
extra-experimental-features = [ "nix-command" "flakes" ];
|
||||
http-connections = 128;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{inputs, ...}:
|
||||
{
|
||||
flake-file.inputs.srvos = {
|
||||
url = "github:nix-community/srvos";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
flake.modules.nixos.hetzner-server = {
|
||||
imports = [
|
||||
inputs.srvos.nixosModules.server
|
||||
inputs.srvos.nixosModules.hardware-hetzner-cloud
|
||||
inputs.srvos.nixosModules.mixins-terminfo
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{inputs, ...}:
|
||||
{
|
||||
flake-file.inputs.sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake.modules = {
|
||||
nixos.sops = {
|
||||
imports = [inputs.sops-nix.nixosModules.sops];
|
||||
};
|
||||
homeManager.sops = {
|
||||
imports = [inputs.sops-nix.homeManagerModules.sops];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{inputs, ...}: {
|
||||
flake.modules = {
|
||||
nixos.phundrak = {
|
||||
imports = [./nixos.nix];
|
||||
home-manager.users.phundrak = {
|
||||
imports = [inputs.self.modules.homeManager.phundrak];
|
||||
};
|
||||
};
|
||||
homeManager.phundrak = {
|
||||
imports = [./homeManager.nix];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.flake.options.phundrak;
|
||||
in {
|
||||
options.flake.options.phundrak = {
|
||||
sudo = mkEnableOption "Make phundrak a superuser";
|
||||
trusted = mkOption {
|
||||
description = "Mark phundrak as trusted by Nix";
|
||||
type = types.bool;
|
||||
default = cfg.sudo;
|
||||
};
|
||||
};
|
||||
config = {
|
||||
users.users.phundrak = {
|
||||
isNormalUser = true;
|
||||
description = "Greg";
|
||||
extraGroups =
|
||||
["networkmanager" "dialout" "games" "audio" "input"]
|
||||
++ optional cfg.sudo "wheel";
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keyFiles = filesystem.listFilesRecursive ./keys;
|
||||
};
|
||||
nix.settings = mkIf cfg.trusted {
|
||||
trusted-users = ["phundrak"];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
# Baseline variant of Bun for x86_64-linux CPUs without AVX2 support.
|
||||
# The regular `bun` from nixpkgs requires AVX2 and crashes with SIGILL on older hardware.
|
||||
#
|
||||
# Version is typically kept in sync with nixpkgs's `bun` (passed via `callPackage`).
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
autoPatchelfHook,
|
||||
unzip,
|
||||
makeBinaryWrapper,
|
||||
glibc,
|
||||
stdenv,
|
||||
version ? "1.3.13",
|
||||
}: let
|
||||
# When updating `version`, compute the new hash with:
|
||||
# nix store prefetch-file "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64-baseline.zip"
|
||||
hash = {
|
||||
"1.3.13" = "sha256-nYokKSpwaAkCBdqsCloiP19pc29Sh+N7+I07QDHtx1A=";
|
||||
};
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "bun-baseline";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64-baseline.zip";
|
||||
hash = hash.${version};
|
||||
};
|
||||
|
||||
nativeBuildInputs =
|
||||
[unzip]
|
||||
++ lib.optionals stdenvNoCC.hostPlatform.isLinux [
|
||||
autoPatchelfHook
|
||||
makeBinaryWrapper
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals stdenvNoCC.hostPlatform.isLinux [
|
||||
glibc
|
||||
(lib.getLib stdenv.cc.cc)
|
||||
];
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
unpackPhase = ''
|
||||
runHook preUnpack
|
||||
mkdir -p source
|
||||
cd source
|
||||
${lib.getExe unzip} -q $src
|
||||
runHook postUnpack
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
find . -type f -name "bun" -not -path "./__MACOSX/*" -exec cp {} $out/bin/bun \;
|
||||
chmod +x $out/bin/bun
|
||||
ln -s $out/bin/bun $out/bin/bunx
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Bun JavaScript runtime (baseline variant, works without AVX2)";
|
||||
homepage = "https://bun.sh";
|
||||
license = lib.licenses.mit;
|
||||
platforms = ["x86_64-linux"];
|
||||
mainProgram = "bun";
|
||||
};
|
||||
}
|
||||
@@ -7,14 +7,7 @@
|
||||
with lib; let
|
||||
cfg = config.home.desktop.caelestia;
|
||||
in {
|
||||
options.home.desktop.caelestia = {
|
||||
enable = mkEnableOption "Enables Caelestia Shell";
|
||||
idleTimeout = mkOption {
|
||||
description = "Idle duration in seconds before locking the session";
|
||||
default = 60 * 60; # an hour
|
||||
type = types.int;
|
||||
};
|
||||
};
|
||||
options.home.desktop.caelestia.enable = mkEnableOption "Enables Caelestia Shell";
|
||||
config.programs.caelestia = mkIf cfg.enable {
|
||||
inherit (cfg) enable;
|
||||
systemd = {
|
||||
@@ -35,7 +28,7 @@ in {
|
||||
inhibitWhenAudio = true;
|
||||
timeouts = [
|
||||
{
|
||||
timeout = cfg.idleTimeout;
|
||||
timeout = 3600;
|
||||
idleAction = "lock";
|
||||
}
|
||||
];
|
||||
|
||||
@@ -1,30 +1,15 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
cfg = config.home.dev.ai.opencode;
|
||||
|
||||
# On x86_64-linux CPUs without AVX2, use the baseline bun variant
|
||||
# when building opencode - the regular `bun` from nixpkgs requires
|
||||
# AVX2 and crashes on older hardware, such as my Thinkpad x220’s
|
||||
# Intel Core i5 2640M.
|
||||
needsBaselineBun =
|
||||
pkgs.stdenv.hostPlatform.isx86_64 && !pkgs.stdenv.hostPlatform.avx2Support;
|
||||
bunBaseline = pkgs.callPackage ../../../../packages/bun-baseline.nix {};
|
||||
|
||||
defaultPackageCli =
|
||||
if needsBaselineBun
|
||||
then pkgs.opencode.override {bun = bunBaseline;}
|
||||
else pkgs.opencode;
|
||||
|
||||
defaultPackageDesktop =
|
||||
if needsBaselineBun
|
||||
then pkgs.opencode-desktop.override {bun = bunBaseline;}
|
||||
else pkgs.opencode-desktop;
|
||||
|
||||
defaultPackageCli = inputs.opencode.packages.${system}.opencode;
|
||||
defaultPackageDesktop = inputs.opencode.packages.${system}.desktop;
|
||||
corsList = domains: lists.remove "" (lists.forEach (strings.splitString "," domains) trim);
|
||||
in {
|
||||
options.home.dev.ai.opencode = {
|
||||
@@ -81,9 +66,9 @@ in {
|
||||
};
|
||||
};
|
||||
config.programs.opencode = mkIf cfg.enable {
|
||||
inherit (cfg) enable tui package;
|
||||
inherit (cfg) enable tui;
|
||||
enableMcpIntegration = true;
|
||||
extraPackages = with pkgs; [uv] ++ lists.optional cfg.desktop.enable cfg.desktop.package;
|
||||
extraPackages = with pkgs; [uv];
|
||||
settings =
|
||||
{
|
||||
server = mkIf cfg.web.mdns.enable {
|
||||
|
||||
@@ -57,15 +57,12 @@ in {
|
||||
inherit (cfg) name email;
|
||||
};
|
||||
ui = {
|
||||
inherit (cfg) editor;
|
||||
default-command = "st";
|
||||
pager = ":builtin";
|
||||
show-cryptographic-signatures = true;
|
||||
diff-editor = ":builtin";
|
||||
merge-editort = ":builtin";
|
||||
# These are for vc-jj.el in Emacs
|
||||
diff-formatter = ":git";
|
||||
conflict-marker-style = "git";
|
||||
inherit (cfg) editor;
|
||||
};
|
||||
signing = mkIf cfg.signing.enable {
|
||||
behavior = "own";
|
||||
|
||||
@@ -38,10 +38,6 @@
|
||||
"*.env.*" = "deny";
|
||||
"*.env.example" = "allow";
|
||||
};
|
||||
skill = "allow";
|
||||
question = "allow";
|
||||
task = "allow";
|
||||
todowrite = "allow";
|
||||
};
|
||||
formatter.nixfmt = {
|
||||
command = ["nix" "fmt" "$FILE"];
|
||||
|
||||
@@ -106,7 +106,6 @@
|
||||
);
|
||||
};
|
||||
};
|
||||
media.mopidy.enable = false;
|
||||
};
|
||||
|
||||
manual = {
|
||||
|
||||
@@ -7,10 +7,7 @@
|
||||
enable = true;
|
||||
ollama.gpu = "rocm";
|
||||
};
|
||||
desktop = {
|
||||
hyprland.host = "marpa";
|
||||
caelestia.idleTimeout = 60 * 60 * 24; # a day
|
||||
};
|
||||
desktop.hyprland.host = "marpa";
|
||||
phundrak.sshKey.content = builtins.readFile ../keys/id_marpa.pub;
|
||||
};
|
||||
programs.caelestia.settings.bar.status = {
|
||||
|
||||
Reference in New Issue
Block a user