Compare commits

..

No commits in common. "0d71113b223a657bbdf8f332ce95e635815e5dd3" and "2a58f1da6858c7ae29e66f4e8dbc2756bb659f04" have entirely different histories.

12 changed files with 177 additions and 260 deletions

View file

@ -54,11 +54,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713173848, "lastModified": 1713166406,
"narHash": "sha256-TTQ2XLqng7TMLnRsLDb/50yyHYuMSPZJ4H+7CEFWQQ0=", "narHash": "sha256-lPAdHkIQBydROJ2e6t0nFP9X220GQ4sEwb5lFQBGYb0=",
"owner": "atuinsh", "owner": "atuinsh",
"repo": "atuin", "repo": "atuin",
"rev": "a0231a70950fbec9dcc3403e37066d891d1fc833", "rev": "50a73f055288d72eeeb128233e2a04bc88a5d5e8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -192,11 +192,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713204594, "lastModified": 1713152224,
"narHash": "sha256-5yyHYBWFZUKXkJvOccPBeX83hH2iED54NLnWs2eWgS0=", "narHash": "sha256-k1aV06cotPwWO3FW+ho+dEoGjxNM303+UmhiG2o6XPs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "d51114dc1bf3cfaba2b6644aabd16ff0c9909af5", "rev": "bb5ba68ebb73b5ca7996b64e1457fe885891e78e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -216,11 +216,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1713200735, "lastModified": 1713154103,
"narHash": "sha256-6qPfZsYW3BvyJq+BahgygLdFd5bdqrFue8QGat4lSQo=", "narHash": "sha256-7tpbjpUI7YDpxP0ciM9bWBxzAT3jsZP9l8EGWFQVBmU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "cf218237d0d80f1ec8109677ebc82ded2ca84c43", "rev": "1b01966ee01008bcec18702ea5e543b93236ecef",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -584,11 +584,11 @@
"spectrum": "spectrum" "spectrum": "spectrum"
}, },
"locked": { "locked": {
"lastModified": 1713189110, "lastModified": 1712654305,
"narHash": "sha256-c/yG/AsPmMBMe4RAxn4KOkOaR4rsW5s3AjtfriOQKD8=", "narHash": "sha256-CNdpLnGOUZfIhBanAFVF7t1xstaQGL4w6sQPrVeLlus=",
"owner": "astro", "owner": "astro",
"repo": "microvm.nix", "repo": "microvm.nix",
"rev": "a1341f7195e34d9bb88c12314cc3b0c4429f9b0a", "rev": "ee0068ca87bdabbde3cc39b7af807c0302d0304c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -838,13 +838,13 @@
"lastModified": 1712897695, "lastModified": 1712897695,
"narHash": "sha256-nMirxrGteNAl9sWiOhoN5tIHyjBbVi5e2tgZUgZlK3Y=", "narHash": "sha256-nMirxrGteNAl9sWiOhoN5tIHyjBbVi5e2tgZUgZlK3Y=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "40e6053ecb65fcbf12863338a6dcefb3f55f1bf8", "rev": "40e6053ecb65fcbf12863338a6dcefb3f55f1bf8",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "pre-commit-hooks.nix",
"type": "github" "type": "github"
} }
}, },
@ -873,8 +873,7 @@
"pre-commit-hooks": "pre-commit-hooks", "pre-commit-hooks": "pre-commit-hooks",
"rust-overlay": "rust-overlay_2", "rust-overlay": "rust-overlay_2",
"sops": "sops", "sops": "sops",
"sunshine": "sunshine", "sunshine": "sunshine"
"treefmt-nix": "treefmt-nix"
} }
}, },
"rust-overlay": { "rust-overlay": {
@ -933,11 +932,11 @@
"nixpkgs-stable": "nixpkgs-stable_4" "nixpkgs-stable": "nixpkgs-stable_4"
}, },
"locked": { "locked": {
"lastModified": 1713174909, "lastModified": 1713066950,
"narHash": "sha256-APoDs2GtzVrsE+Z9w72qpHzEtEDfuinWcNTN7zhwLxg=", "narHash": "sha256-ZaefFyvt5369XdjzSw43NhfbPM9MN5b9YXhzx4lFIRc=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "cc535d07cbcdd562bcca418e475c7b1959cefa4b", "rev": "226062b47fe0e2130ba3ee9f4f1c880dc815cf87",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1031,26 +1030,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1711963903,
"narHash": "sha256-N3QDhoaX+paWXHbEXZapqd1r95mdshxToGowtjtYkGI=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "49dc4a92b02b8e68798abd99184f228243b6e3ac",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -18,18 +18,13 @@
nixos-hardware.url = "github:NixOS/nixos-hardware"; nixos-hardware.url = "github:NixOS/nixos-hardware";
pre-commit-hooks = { pre-commit-hooks = {
url = "github:cachix/git-hooks.nix"; url = "github:cachix/pre-commit-hooks.nix";
inputs = { inputs = {
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
}; };
}; };
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
naersk = { naersk = {
url = "github:nix-community/naersk"; url = "github:nix-community/naersk";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -178,10 +173,7 @@
"aarch64-linux" "aarch64-linux"
]; ];
imports = [ imports = [ inputs.pre-commit-hooks.flakeModule ];
inputs.pre-commit-hooks.flakeModule
inputs.treefmt-nix.flakeModule
];
flake = { flake = {
lib = import ./lib inputs; lib = import ./lib inputs;
@ -259,28 +251,9 @@
}; };
}; };
treefmt = {
projectRootFile = "flake.lock";
programs = {
black.enable = true;
deadnix.enable = true;
nixfmt = {
enable = true;
package = pkgs.nixfmt-rfc-style;
};
shellcheck.enable = true;
shfmt = {
enable = true;
indent_size = 0;
};
};
};
packages = { packages = {
git-repo-go = pkgs.callPackage ./pkgs/git-repo-go { }; git-repo-go = pkgs.callPackage ./pkgs/git-repo-go { };
gitu = pkgs.callPackage ./pkgs/gitu { }; gitu = pkgs.callPackage ./pkgs/gitu { };
headscale-ui = pkgs.callPackage ./pkgs/headscale-ui { };
incus-ui = pkgs.callPackage ./pkgs/incus-ui { }; incus-ui = pkgs.callPackage ./pkgs/incus-ui { };
openfga = pkgs.callPackage ./pkgs/openfga { }; openfga = pkgs.callPackage ./pkgs/openfga { };
zed = pkgs.callPackage ./pkgs/zed { }; zed = pkgs.callPackage ./pkgs/zed { };
@ -339,6 +312,8 @@
name = "install"; name = "install";
packages = [ inputs'.disko.packages.disko ]; packages = [ inputs'.disko.packages.disko ];
}; };
formatter = pkgs.nixfmt-rfc-style;
}; };
}; };
} }

View file

@ -15,10 +15,6 @@ in
settings = { settings = {
dialect = "uk"; dialect = "uk";
sync = {
records = true;
};
}; };
}; };
}; };

View file

@ -40,7 +40,6 @@ in
shellAliases = { shellAliases = {
ls = "${pkgs.eza}/bin/eza --long --git --git-repos --header --classify --binary"; ls = "${pkgs.eza}/bin/eza --long --git --git-repos --header --classify --binary";
tree = "${pkgs.eza}/bin/eza --tree --icons";
vimdiff = mkIf config.eboskma.programs.neovim.enable "nvim -d"; vimdiff = mkIf config.eboskma.programs.neovim.enable "nvim -d";
vim = mkIf config.eboskma.programs.neovim.enable "nvim"; vim = mkIf config.eboskma.programs.neovim.enable "nvim";

View file

@ -217,16 +217,20 @@ in
workspaceAutoBackAndForth = true; workspaceAutoBackAndForth = true;
workspaceOutputAssign = builtins.concatLists ( workspaceOutputAssign = builtins.concatLists (
builtins.attrValues ( builtins.attrValues (
builtins.mapAttrs ( builtins.mapAttrs
(
name: workspaces: name: workspaces:
let let
output = if name == "right" then "DP-0" else "DP-4"; output = if name == "right" then "DP-0" else "DP-4";
in in
builtins.map (ws: { builtins.map
(ws: {
inherit output; inherit output;
workspace = toString ws; workspace = toString ws;
}) workspaces })
) workspacePartition workspaces
)
workspacePartition
) )
); );
# [ # [

View file

@ -17,7 +17,8 @@ in
programs.nnn = { programs.nnn = {
enable = true; enable = true;
package = package =
(pkgs.nnn.overrideAttrs (_prevAttrs: { (pkgs.nnn.overrideAttrs (
_prevAttrs: {
version = "unstable-2023-10-08"; version = "unstable-2023-10-08";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "jarun"; owner = "jarun";
@ -25,7 +26,8 @@ in
rev = "7f63bef4d6c9f70b99a4c98435c9c0a68e05be44"; rev = "7f63bef4d6c9f70b99a4c98435c9c0a68e05be44";
sha256 = "B9WRQW4wbs3+lJ9ACFheTaO+0+G/r67yJZJJPMDIQXI="; sha256 = "B9WRQW4wbs3+lJ9ACFheTaO+0+G/r67yJZJJPMDIQXI=";
}; };
})).override }
)).override
{ {
withNerdIcons = true; withNerdIcons = true;
extraMakeFlags = [ extraMakeFlags = [

View file

@ -19,11 +19,13 @@ let
rcloneRemote = rcloneRemote =
with types; with types;
attrsOf (oneOf [ attrsOf (
oneOf [
str str
int int
bool bool
]); ]
);
rcloneMount = rcloneMount =
with types; with types;
@ -59,7 +61,8 @@ in
home.packages = [ pkgs.rclone ]; home.packages = [ pkgs.rclone ];
systemd.user.services = builtins.listToAttrs ( systemd.user.services = builtins.listToAttrs (
builtins.map ( builtins.map
(
mount: mount:
let let
localPath = toString mount.local; localPath = toString mount.local;
@ -89,7 +92,8 @@ in
}; };
}; };
} }
) cfg.mounts )
cfg.mounts
); );
}; };
} }

View file

@ -13,14 +13,16 @@ let
"${pkgs.nitrogen}/bin/nitrogen --set-color=${cfg.backgroundColor} --set-tiled ${cfg.images}" "${pkgs.nitrogen}/bin/nitrogen --set-color=${cfg.backgroundColor} --set-tiled ${cfg.images}"
else else
builtins.concatStringsSep "\n" ( builtins.concatStringsSep "\n" (
map ( map
(
{ fst, snd }: { fst, snd }:
let let
image = fst; image = fst;
monitor = toString snd; monitor = toString snd;
in in
"${pkgs.nitrogen}/bin/nitrogen --head=${monitor} --set-color=${cfg.backgroundColor} --set-tiled ${image}" "${pkgs.nitrogen}/bin/nitrogen --head=${monitor} --set-color=${cfg.backgroundColor} --set-tiled ${image}"
) (zipLists cfg.images (builtins.genList (x: x) (builtins.length cfg.images))) )
(zipLists cfg.images (builtins.genList (x: x) (builtins.length cfg.images)))
) )
); );

View file

@ -20,11 +20,14 @@ in
}; };
imports = [ imports = [
(mkRemovedOptionModule [ (mkRemovedOptionModule
[
"eboskma" "eboskma"
"nix-common" "nix-common"
"disable-cache" "disable-cache"
] "The option `disable-cache` is no longer used") ]
"The option `disable-cache` is no longer used"
)
]; ];
config = mkIf cfg.enable { config = mkIf cfg.enable {

View file

@ -87,13 +87,19 @@ in
listenPort = cfg.port; listenPort = cfg.port;
privateKeyFile = cfg.privateKeyFile; privateKeyFile = cfg.privateKeyFile;
postSetup = concatMapStringsSep "\n" (range: '' postSetup =
concatMapStringsSep "\n"
(range: ''
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s ${range} -o ${cfg.externalInterface} -j MASQUERADE ${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s ${range} -o ${cfg.externalInterface} -j MASQUERADE
'') cfg.internalIPs; '')
cfg.internalIPs;
postShutdown = concatMapStringsSep "\n" (range: '' postShutdown =
concatMapStringsSep "\n"
(range: ''
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s ${range} -o ${cfg.externalInterface} -j MASQUERADE ${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s ${range} -o ${cfg.externalInterface} -j MASQUERADE
'') cfg.internalIPs; '')
cfg.internalIPs;
peers = cfg.peers; peers = cfg.peers;
}; };

View file

@ -1,55 +0,0 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
writeText,
}:
let
version = "2024.02.24-beta1";
# Got to love those hand crafted, artisinal patches 😁
insertVersionPatch = writeText "0001-headscale-ui-insert-version" ''
--- a/src/routes/settings.html/+page.svelte
+++ b/src/routes/settings.html/+page.svelte
@@ -26,7 +26,7 @@
<ThemeSettings />
<div class="p-4" />
<h1 class="text-2xl bold text-primary mb-4">Version</h1>
- <b>insert-version</b>
+ <b>${version}</b>
<div class ="p-4"></div>
<DevSettings></DevSettings>
</div>
'';
in
buildNpmPackage {
pname = "headscale-ui";
inherit version;
src = fetchFromGitHub {
owner = "gurucomputing";
repo = "headscale-ui";
rev = version;
hash = "sha256-jbyy8W/qAso2yb/hNsmVHiT0mJXInpEIejU+3IB9wJY=";
};
npmDepsHash = "sha256-SHcsTfX2AnHR8fNCE2+JYV33DtZFQOqN7LSoV+fUu5A=";
npmPackFlags = [ "--ignore-scripts" ];
makeCacheWritable = true;
patches = [ insertVersionPatch ];
installPhase = ''
cp -a build $out
'';
meta = with lib; {
description = "A web frontend for the headscale Tailscale-compatible coordination server";
homepage = "https://github.com/gurucomputing/headscale-ui";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
mainProgram = "headscale-ui";
platforms = platforms.all;
};
}

View file

@ -10,7 +10,8 @@
rsync, rsync,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (
finalAttrs: {
pname = "incus-ui"; pname = "incus-ui";
version = "0.6"; version = "0.6";
@ -85,4 +86,5 @@ stdenv.mkDerivation (finalAttrs: {
maintainers = with maintainers; [ ]; maintainers = with maintainers; [ ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
}) }
)