Skip to content

Commit

Permalink
=
Browse files Browse the repository at this point in the history
=
  • Loading branch information
oluceps committed Oct 24, 2024
1 parent 5b19f0a commit 6ff6c17
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 27 deletions.
15 changes: 0 additions & 15 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
lib,
...
}:
let
homeCfgAttr = (import ./home { inherit pkgs lib; });
in
{

_module.args.pkgs = import inputs.nixpkgs {
Expand Down Expand Up @@ -72,18 +69,6 @@
];
};

apps.default = {
type = "app";
program = pkgs.writeShellScriptBin "link-home" (
lib.concatStringsSep "\n" (
lib.foldlAttrs (
acc: n: v:
acc ++ lib.singleton "mkdir -p ${extraLibs.parent n}; ln -sf ${v} ${n}"
) [ ] homeCfgAttr
)
);
};

packages =
let
shadowedPkgs = [
Expand Down
9 changes: 7 additions & 2 deletions home/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{ lib, pkgs, ... }@args:
{
lib,
pkgs,
user,
...
}@args:
# https://gist.github.com/thalesmg/ae5dc3c5359aed78a33243add14a887d
let
configPlace = "~/.config";
configPlace = "/home/${user}/.config";

inherit (builtins) readDir foldl' attrNames;
inherit (lib.attrsets) filterAttrs setAttrByPath recursiveUpdate;
Expand Down
11 changes: 4 additions & 7 deletions home/swaylock/config.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{ pkgs, ... }:
let
img = pkgs.fetchurl {
url = "https://maxwell.ydns.eu/git/rnhmjoj/nix-slim/raw/branch/master/background.png";
name = "img.jpg";
hash = "sha256-kqvVGHOaD7shJrvYfhLDvDs62r20wi8Sajth16Spsrk=";
url = "https://s3.nyaw.xyz/misskey//54f23f73-cd56-49ac-abf2-3c4ab3409c5a.jpg";
name = "54f23f73-cd56-49ac-abf2-3c4ab3409c5a";
hash = "sha256-AlQEyfi5f1cavux0advHDMQBfue14NPQhiXPUFpo/Bs=";
};
img-blurred = pkgs.runCommand "img.jpg" {
nativeBuildInputs = with pkgs; [ imagemagick ];
} "convert -blur 14x5 ${img} $out";
in
''
daemonize
font=Hanken Grotesk
image=${img-blurred}
image=${img}
indicator-radius=100
indicator-thickness=15
inside-clear-color=563F2E00
Expand Down
11 changes: 8 additions & 3 deletions hosts/home.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{ lib, pkgs, ... }:
{
lib,
pkgs,
user,
...
}:
let
homeCfgAttr = (import ../home { inherit pkgs lib; });
homeCfgAttr = (import ../home { inherit pkgs lib user; });
in
{
systemd.tmpfiles.rules = lib.foldlAttrs (
acc: n: v:
acc ++ lib.singleton "L+ ${v} - - - - ${n}"
acc ++ lib.singleton "L+ ${n} - - - - ${v}"
) [ ] homeCfgAttr;
}

0 comments on commit 6ff6c17

Please sign in to comment.