Compare commits

...

2 commits

Author SHA1 Message Date
30e2515aee add background slideshow
Some checks reported errors
Hydra packages.x86_64-linux.package-updater Hydra build #25160 of nixos-config:pr618:packages.x86_64-linux.package-updater
Hydra packages.x86_64-linux.art-lotte-bgs-nsfw Hydra build #25158 of nixos-config:pr618:packages.x86_64-linux.art-lotte-bgs-nsfw
Hydra packages.riscv64-linux.art-lotte-bgs-nsfw Hydra build #25154 of nixos-config:pr618:packages.riscv64-linux.art-lotte-bgs-nsfw
Hydra packages.x86_64-linux.art-lotte-bgs-sfw Hydra build #25159 of nixos-config:pr618:packages.x86_64-linux.art-lotte-bgs-sfw
Hydra packages.aarch64-linux.art-lotte-bgs-nsfw Hydra build #25150 of nixos-config:pr618:packages.aarch64-linux.art-lotte-bgs-nsfw
Hydra packages.aarch64-linux.art-lotte-bgs-sfw Hydra build #25151 of nixos-config:pr618:packages.aarch64-linux.art-lotte-bgs-sfw
Hydra devShells.x86_64-linux.default Hydra build #25140 of nixos-config:pr618:devShells.x86_64-linux.default
Hydra packages.aarch64-linux.art-lotte Hydra build #25149 of nixos-config:pr618:packages.aarch64-linux.art-lotte
Hydra packages.riscv64-linux.art-lotte-bgs-sfw Hydra build #25155 of nixos-config:pr618:packages.riscv64-linux.art-lotte-bgs-sfw
Hydra nixosConfigurations.container-default-aarch64-linux Hydra build #25141 of nixos-config:pr618:nixosConfigurations.container-default-aarch64-linux
Hydra packages.x86_64-linux.art-lotte Hydra build #25157 of nixos-config:pr618:packages.x86_64-linux.art-lotte
Hydra packages.riscv64-linux.art-lotte Hydra build #25153 of nixos-config:pr618:packages.riscv64-linux.art-lotte
Hydra packages.aarch64-linux.package-updater Hydra build #25152 of nixos-config:pr618:packages.aarch64-linux.package-updater
Hydra nixosConfigurations.container-default-x86_64-linux Hydra build #25143 of nixos-config:pr618:nixosConfigurations.container-default-x86_64-linux
Hydra nixosConfigurations.thinkrac Hydra build #25148 of nixos-config:pr618:nixosConfigurations.thinkrac
Hydra nixosConfigurations.rainbow-resort Hydra build #25147 of nixos-config:pr618:nixosConfigurations.rainbow-resort
Hydra nixosConfigurations.pc-installer Hydra build #25146 of nixos-config:pr618:nixosConfigurations.pc-installer
Hydra checks.x86_64-linux.containers-default Hydra build #25139 of nixos-config:pr618:checks.x86_64-linux.containers-default
Hydra nixosConfigurations.not522-installer Hydra build #25145 of nixos-config:pr618:nixosConfigurations.not522-installer
Hydra nixosConfigurations.not522 Hydra build #25144 of nixos-config:pr618:nixosConfigurations.not522
Hydra nixosConfigurations.container-default-riscv64-linux Hydra build #25142 of nixos-config:pr618:nixosConfigurations.container-default-riscv64-linux
Hydra packages.riscv64-linux.package-updater Hydra build #25156 of nixos-config:pr618:packages.riscv64-linux.package-updater
2024-11-10 22:20:25 +01:00
1f192d1945 add kdegraphics.thumbnailers 2024-11-10 21:13:10 +01:00
14 changed files with 229 additions and 3 deletions

View file

@ -1,7 +1,12 @@
{ ... }: { systemConfig, pkgs, ... }:
{ {
programs.plasma = { programs.plasma = {
workspace.lookAndFeel = "org.kde.breezedark.desktop"; workspace = {
lookAndFeel = "org.kde.breezedark.desktop";
wallpaperSlideShow = {
path = if systemConfig.isNSFW then "${pkgs.art-lotte-bgs-nsfw}" else "${pkgs.art-lotte-bgs-sfw}";
};
};
hotkeys.commands."launch-konsole" = { hotkeys.commands."launch-konsole" = {
name = "Launch Konsole"; name = "Launch Konsole";
key = "Meta+Alt+K"; key = "Meta+Alt+K";

View file

@ -101,6 +101,7 @@
in in
import nixpkgs { import nixpkgs {
inherit system; inherit system;
config.allowUnfree = true;
overlays = overlays =
[ [
( (
@ -110,6 +111,7 @@
inputs = inputs'; inputs = inputs';
} }
) )
self.overlays.default
] ]
++ ( ++ (
if system == "riscv64-linux" then if system == "riscv64-linux" then
@ -218,7 +220,7 @@
in in
containers // systems; containers // systems;
hydraJobs = { hydraJobs = {
inherit (self) checks devShells; inherit (self) checks devShells packages;
nixosConfigurations = nixpkgs.lib.mapAttrs ( nixosConfigurations = nixpkgs.lib.mapAttrs (
_: v: v.config.system.build.toplevel _: v: v.config.system.build.toplevel
) self.nixosConfigurations; ) self.nixosConfigurations;
@ -231,8 +233,34 @@
sops sops
ssh-to-age ssh-to-age
nixfmt-rfc-style nixfmt-rfc-style
nix-prefetch
nix-prefetch-git
]; ];
}; };
formatter.x86_64-linux = (pkgsFor "x86_64-linux").nixfmt-rfc-style; formatter.x86_64-linux = (pkgsFor "x86_64-linux").nixfmt-rfc-style;
overlays.default = import ./packages;
packages = nixpkgs.lib.listToAttrs (
map
(name: {
inherit name;
value =
let
pkgs = pkgsFor name;
in
{
inherit (pkgs)
art-lotte
art-lotte-bgs-nsfw
art-lotte-bgs-sfw
package-updater
;
};
})
[
"x86_64-linux"
"riscv64-linux"
"aarch64-linux"
]
);
}; };
} }

View file

@ -1,5 +1,6 @@
{ {
nixos-config, nixos-config,
lib,
... ...
}: }:
{ {
@ -20,5 +21,23 @@
} }
]; ];
}; };
specialisation.sfw = {
configuration.imports = [
{
nix.auto-update.specialisation = "sfw";
isNSFW = lib.mkForce false;
}
];
};
specialisation.quiet-sfw = {
configuration.imports = [
"${nixos-config}/config/graphical/plymouth.nix"
{
nix.auto-update.specialisation = "quiet-sfw";
isNSFW = lib.mkForce false;
}
];
};
home-manager.users.darkkirb.imports = [ ./home-manager.nix ]; home-manager.users.darkkirb.imports = [ ./home-manager.nix ];
isNSFW = true;
} }

View file

@ -20,4 +20,21 @@
} }
]; ];
}; };
specialisation.nsfw = {
configuration.imports = [
{
nix.auto-update.specialisation = "nsfw";
isNSFW = true;
}
];
};
specialisation.quiet-nsfw = {
configuration.imports = [
"${nixos-config}/config/graphical/plymouth.nix"
{
nix.auto-update.specialisation = "quiet-nsfw";
isNSFW = true;
}
];
};
} }

View file

@ -2,6 +2,8 @@
disko, disko,
home-manager, home-manager,
lib, lib,
inTester,
self,
... ...
}: }:
with lib; with lib;
@ -18,4 +20,15 @@ with lib;
]; ];
options.isGraphical = mkEnableOption "Whether or not this configuration is a graphical install"; options.isGraphical = mkEnableOption "Whether or not this configuration is a graphical install";
options.isInstaller = mkEnableOption "Whether or not this configuration is an installer and has no access to secrets"; options.isInstaller = mkEnableOption "Whether or not this configuration is an installer and has no access to secrets";
options.isNSFW = mkEnableOption "Whether or not this configuration is NSFW";
config =
if !inTester then
{
nixpkgs.overlays = [
self.overlays.default
];
}
else
{ };
} }

View file

@ -0,0 +1,39 @@
{ art-lotte, stdenvNoCC }:
stdenvNoCC.mkDerivation {
pname = "sfw-bgs";
inherit (art-lotte) version;
src = art-lotte;
dontUnpack = true;
dontBuild = true;
nsfwBgs = [
"2020-07-24-urbankitsune-bna-ych.jxl"
"2021-09-15-cloverhare-lotteplush.jxl"
"2021-10-29-butterskunk-lotte-scat-buffet.jxl"
"2021-11-27-theroguez-lottegassyvore1.jxl"
"2021-12-12-baltnwolf-christmas-diaper-messy.jxl"
"2021-12-12-baltnwolf-christmas-diaper.jxl"
"2022-04-20-cloverhare-mxbatty-maffsie-train-plush.jxl"
"2022-04-20-cloverhare-mxbatty-me-train-maffsie-plush.jxl"
"2022-05-02-anonfurryartist-giftart.jxl"
"2022-06-21-sammythetanuki-lotteplushpride.jxl"
"2022-08-12-deathtoaster-funpit-scat.jxl"
"2022-08-15-deathtoaster-funpit-mud.jxl"
"2022-11-15-wolfsifi-maff-me-leashed.jxl"
"2022-12-27-rexyi-scatych.jxl"
"2023-03-09-rexyi-voredisposal-ych.jxl"
"2023-08-09-coldquarantine-lotte-eating-trash.jxl"
"2023-08-10-coldquarantine-lotte-eating-trash-diapers.jxl"
"2023-08-20-coldquarantine-lotte-eating-trash-clean.jxl"
];
installPhase = ''
mkdir $out
for f in $nsfwBgs; do
ln -svf $src/$f $out/$f
done
'';
meta = {
description = "NSFW computer backgrounds";
inherit (art-lotte.meta) license;
};
}

View file

@ -0,0 +1,26 @@
{ art-lotte, stdenvNoCC }:
stdenvNoCC.mkDerivation {
pname = "sfw-bgs";
inherit (art-lotte) version;
src = art-lotte;
dontUnpack = true;
dontBuild = true;
sfwBgs = [
"2020-07-24-urbankitsune-bna-ych.jxl"
"2021-09-15-cloverhare-lotteplush.jxl"
"2022-05-02-anonfurryartist-giftart.jxl"
"2022-06-21-sammythetanuki-lotteplushpride.jxl"
"2022-11-15-wolfsifi-maff-me-leashed.jxl"
];
installPhase = ''
mkdir $out
for f in $sfwBgs; do
ln -svf $src/$f $out/$f
done
'';
meta = {
description = "SFW computer backgrounds";
inherit (art-lotte.meta) license;
};
}

View file

@ -0,0 +1,27 @@
{
fetchgit,
lib,
}:
let
srcInfo = lib.importJSON ./source.json;
src = fetchgit {
inherit (srcInfo)
url
rev
sha256
fetchLFS
fetchSubmodules
deepClone
leaveDotGit
;
};
in
src.overrideAttrs (_: rec {
name = "${pname}-${version}";
pname = "lotte-art";
version = srcInfo.date;
meta = {
description = "Art I commissioned or made";
license = lib.licenses.cc-by-nc-sa-40;
};
})

View file

@ -0,0 +1,12 @@
{
"url": "https://git.chir.rs/darkkirb/lotte-art",
"rev": "9d341d1b44bfbd1305e66ac1f5a07f01413951d0",
"date": "2024-09-29T11:09:27+02:00",
"path": "/nix/store/s1j9hzifi3f7wc8w39619yvr6n4a0vv7-lotte-art",
"sha256": "1rzlvlyjqkbzpyl14v6hgiyb9xkx5rzvhgnbn1gwp0pv5r2lbsnn",
"hash": "sha256-1upFRS77gstfsMs+uH8uffa0fHzQbBKov39NLD3d9Oc=",
"fetchLFS": true,
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View file

@ -0,0 +1,15 @@
{
nix-prefetch-git,
curl,
jq,
}:
''
echo "lotte-art: Checking for updates"
set CURRENT_COMMIT $(${curl}/bin/curl https://git.chir.rs/api/v1/repos/darkkirb/lotte-art/commits | ${jq}/bin/jq -r '.[0].sha')
set KNOWN_COMMIT $(${jq}/bin/jq -r '.rev' packages/art/lotte/source.json)
if [ $CURRENT_COMMIT != $KNOWN_COMMIT ];
echo "lotte-art: Updating from $KNOWN_COMMIT to $CURRENT_COMMIT"
${nix-prefetch-git}/bin/nix-prefetch-git https://git.chir.rs/darkkirb/lotte-art --fetch-lfs | ${jq}/bin/jq > packages/art/lotte/source.json
end
echo "lotte-art: Done"
''

5
packages/art/updater.nix Normal file
View file

@ -0,0 +1,5 @@
{
lib,
callPackage,
}:
lib.concatMapStringsSep "\n" (f: callPackage "${f}/updater.nix" { }) [ ./lotte ]

6
packages/default.nix Normal file
View file

@ -0,0 +1,6 @@
self: super: {
art-lotte = self.callPackage ./art/lotte { };
art-lotte-bgs-nsfw = self.callPackage ./art/lotte/bgs-nsfw.nix { };
art-lotte-bgs-sfw = self.callPackage ./art/lotte/bgs-sfw.nix { };
package-updater = self.callPackage ./updater.nix { };
}

13
packages/updater.nix Normal file
View file

@ -0,0 +1,13 @@
{
lib,
callPackage,
writeScriptBin,
fish,
}:
let
script = lib.concatMapStringsSep "\n" (f: callPackage "${f}/updater.nix" { }) [ ./art ];
in
writeScriptBin "updater" ''
#!${fish}/bin/fish
${script}
''

View file

@ -15,6 +15,7 @@
kdePackages.kalk kdePackages.kalk
kdePackages.kalgebra kdePackages.kalgebra
kdePackages.filelight kdePackages.filelight
kdePackages.kdegraphics-thumbnailers
kdePackages.ffmpegthumbs kdePackages.ffmpegthumbs
kdePackages.dolphin-plugins kdePackages.dolphin-plugins
]; ];