update for AI stuff and new nix syntax
This commit is contained in:
parent
a770f582dd
commit
4712934003
8 changed files with 152 additions and 136 deletions
144
flake.lock
generated
144
flake.lock
generated
|
@ -103,6 +103,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-root": {
|
||||
"locked": {
|
||||
"lastModified": 1713493429,
|
||||
"narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=",
|
||||
"owner": "srid",
|
||||
"repo": "flake-root",
|
||||
"rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "srid",
|
||||
"repo": "flake-root",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
|
@ -222,11 +237,11 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713879663,
|
||||
"narHash": "sha256-hIwbELgx8E40jwnVI2d8pumR811c10cU0OSzugyp2AA=",
|
||||
"lastModified": 1714317710,
|
||||
"narHash": "sha256-djwrEnMHwGYMSKElkfD2TLKwHYOJmhnCa6gTjvDPc6w=",
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"rev": "89a9f2be788017615f6d2406d4e12f50949a5492",
|
||||
"rev": "e2594b64c0daf15bacdb5396d439f206fcbe11e6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -242,32 +257,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713906585,
|
||||
"narHash": "sha256-fv84DCOkBtjF6wMATt0rfovu7e95L8rdEkSfNbwKR3U=",
|
||||
"lastModified": 1714377222,
|
||||
"narHash": "sha256-UsDsjWCKlWn8vbXi8Zza9Hkq3xyk8fpvFNo2VM5S74E=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "bfa7c06436771e3a0c666ccc6ee01e815d4c33aa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"plasma-manager",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713789879,
|
||||
"narHash": "sha256-4Wt3Bg6uOnvwZcECBZaFEdzlWRlGLgd8DqLL4ugLdxg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "46833c3115e8858370880d892748f0927d8193c3",
|
||||
"rev": "2af7c78b7bb9cf18406a193eba13ef9f99388f49",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -299,11 +293,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713869268,
|
||||
"narHash": "sha256-o3CMQeu/S8/4zU0pMtYg51rd1FWdJsI2Xohzng1Ysdg=",
|
||||
"lastModified": 1714273701,
|
||||
"narHash": "sha256-bmoeZ5zMSSO/e8P51yjrzaxA9uzA3SZAEFvih6S3LFo=",
|
||||
"owner": "Mic92",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "dcb6ac44922858ce3a5b46f77a36d6030181460c",
|
||||
"rev": "941c4973c824509e0356be455d89613611f76c8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -321,11 +315,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713589173,
|
||||
"narHash": "sha256-8LBvfDbnuPMrF43bmejUZwD9TuP081iuG1nLl8m0jM4=",
|
||||
"lastModified": 1714253190,
|
||||
"narHash": "sha256-+9BSaBDbz3N65KgFhyJLXsIazYmpA4CUVcL4u29BIC0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-ld-rs",
|
||||
"rev": "c4f56b515ed0bf8c2cd4d6a13224067017a6dc39",
|
||||
"rev": "d5939e6da59ea8a55b47ea48ce212f602a4fa59b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -374,14 +368,15 @@
|
|||
"nixd": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-root": "flake-root",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713894248,
|
||||
"narHash": "sha256-6K5bu1Pe0EIibKKILXAjBW7N5QLQZ858u/mBReYNQY4=",
|
||||
"lastModified": 1714353612,
|
||||
"narHash": "sha256-YTnNNPc4c4n8XxWP9FdddzEY7/4uatIZ8vliNKkFv0o=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixd",
|
||||
"rev": "a8d7322d35dce8c0d6a54eb24213cfe31f5339d3",
|
||||
"rev": "dad49ea93797833eed2dee288c15c8130953406b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -398,11 +393,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713838558,
|
||||
"narHash": "sha256-X+zHtAxW8gk2oMKyQeHukAr9YPb5Wn3U36A+sbSnC94=",
|
||||
"lastModified": 1714354228,
|
||||
"narHash": "sha256-os1TJOIoAl24tlsE1iU3FpoeM7+BHNU+DDrNlcbRUlc=",
|
||||
"owner": "lilyinstarlight",
|
||||
"repo": "nixos-cosmic",
|
||||
"rev": "f09f8fbb1b97efdb32f8711e37a31266c04a264f",
|
||||
"rev": "d0e668fdb5e5e1912ea5d7a40ac0570d1a11ad85",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -460,22 +455,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-polonium": {
|
||||
"locked": {
|
||||
"lastModified": 1710680090,
|
||||
"narHash": "sha256-K6SxA0WMfpbqsKd7xH2jln5AF00VKHH9dg6cHBB1OSc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5a42ed5aef8631bb5cd30eb16b30ea3ddb0dd91f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5a42ed5aef8631bb5cd30eb16b30ea3ddb0dd91f",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1678872516,
|
||||
|
@ -526,27 +505,11 @@
|
|||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1713714899,
|
||||
"narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=",
|
||||
"lastModified": 1714253743,
|
||||
"narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6143fc5eeb9c4f00163267708e26191d1e918932",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1713714899,
|
||||
"narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6143fc5eeb9c4f00163267708e26191d1e918932",
|
||||
"rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -558,11 +521,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1713912298,
|
||||
"narHash": "sha256-r0xi+Sso/4z6r3un+dloRXcOJHnQkv5fybKJTI//wA8=",
|
||||
"lastModified": 1714387460,
|
||||
"narHash": "sha256-p2WP/Mr7hh9QVXCbtlqf9bj62JOIqaP+C3/09DpCoaY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "12d272c11768b65067f621034eaf507932e2fc2e",
|
||||
"rev": "a16bed921e49adac4f59bbaa4d2a28c69dafdf80",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -571,25 +534,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plasma-manager": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713805120,
|
||||
"narHash": "sha256-WmqVyblqQ3g2Bmm+WONc1OnUuOuULQRIQya9wCLp5o8=",
|
||||
"owner": "pjones",
|
||||
"repo": "plasma-manager",
|
||||
"rev": "ffeef9dc96a5a0e442479c94a6000f93b69aeaac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "pjones",
|
||||
"repo": "plasma-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_3",
|
||||
|
@ -628,10 +572,8 @@
|
|||
"nixd": "nixd",
|
||||
"nixos-cosmic": "nixos-cosmic",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs-polonium": "nixpkgs-polonium",
|
||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||
"nur": "nur",
|
||||
"plasma-manager": "plasma-manager",
|
||||
"rust-overlay": "rust-overlay_2"
|
||||
}
|
||||
},
|
||||
|
@ -670,11 +612,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713838472,
|
||||
"narHash": "sha256-lCdDz6/YgyXdFRHall3P+dCETRpfz3Pi9eREnA9RX6k=",
|
||||
"lastModified": 1714356894,
|
||||
"narHash": "sha256-W6Mss7AG6bnFT1BqRApHXvLXBrFOu7V0+EUe9iML30s=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "28a9436d356181603fb0d333565431c3d952f299",
|
||||
"rev": "d9b44509b4064f0a3fc9c7c92a603861f52fbedc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
nixpkgs-polonium.url = "github:NixOS/nixpkgs/5a42ed5aef8631bb5cd30eb16b30ea3ddb0dd91f";
|
||||
|
||||
nur.url = "github:/nix-community/NUR";
|
||||
|
||||
|
@ -42,8 +41,6 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
plasma-manager.url = "github:pjones/plasma-manager";
|
||||
|
||||
flatpaks.url = "github:gmodena/nix-flatpak";
|
||||
|
||||
nixos-cosmic = {
|
||||
|
@ -56,12 +53,10 @@
|
|||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-stable,
|
||||
nixpkgs-polonium,
|
||||
nixos-cosmic,
|
||||
home-manager,
|
||||
nur,
|
||||
helix,
|
||||
plasma-manager,
|
||||
flatpaks,
|
||||
nixd,
|
||||
nix-ld-rs,
|
||||
|
|
|
@ -16,10 +16,11 @@ in {
|
|||
./programs/firefox.nix
|
||||
./programs/kitty.nix
|
||||
./programs/zsh.nix
|
||||
./programs/stable-diffusion.nix
|
||||
./util/ez.nix
|
||||
./util/firefox-webapp.nix
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
./programs/plasma.nix
|
||||
# inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
# ./programs/plasma.nix
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
];
|
||||
|
||||
|
@ -51,7 +52,7 @@ in {
|
|||
libnotify
|
||||
playerctl
|
||||
|
||||
kooha
|
||||
# kooha
|
||||
|
||||
croc
|
||||
|
||||
|
@ -61,7 +62,7 @@ in {
|
|||
tuxguitar
|
||||
|
||||
# kdeconnect
|
||||
plasma-browser-integration
|
||||
# plasma-browser-integration
|
||||
keepassxc
|
||||
git-credential-keepassxc
|
||||
|
||||
|
@ -70,7 +71,7 @@ in {
|
|||
mpv
|
||||
|
||||
gtk-engine-murrine
|
||||
polonium-pkgs.pkgs.plasma5Packages.polonium
|
||||
# polonium-pkgs.pkgs.plasma5Packages.polonium
|
||||
]
|
||||
++ pkgs.rice.fonts.pkgs
|
||||
++ pkgs.rice.icons.pkgs;
|
||||
|
@ -193,8 +194,9 @@ in {
|
|||
systemd.user.startServices = "sd-switch";
|
||||
ezServices = with pkgs; {
|
||||
ckb-next = "${lib.getExe ckb-next} -c -b";
|
||||
# swaybg = "${lib.getExe swaybg} -i ${rice.bg.image} -m fill";
|
||||
# # swayosd = "${lib.getExe' swayosd "swayosd"} --max-volume 100";
|
||||
};
|
||||
ezOneShots = with pkgs; {
|
||||
xrdb = "${lib.getExe xorg.xrdb} -load ${config.home.homeDirectory}/.Xresources";
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
|
|
56
home/programs/stable-diffusion.nix
Normal file
56
home/programs/stable-diffusion.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# TODO: create a flake for this
|
||||
# https://github.com/AbdBarho/stable-diffusion-webui-docker/
|
||||
|
||||
config.programs.firefox.webapps = {
|
||||
"StableDiffusion" = {
|
||||
url = "http://127.0.0.1:7860";
|
||||
id = 5;
|
||||
extraSettings = config.programs.firefox.profiles.default.settings;
|
||||
name = "Stable Diffusion Client";
|
||||
};
|
||||
};
|
||||
|
||||
# consider making these manually activated systemd services
|
||||
config.systemd.user.services = {
|
||||
stable-diffusion = {
|
||||
Unit.Description = "Stable Diffusion Backend";
|
||||
Service = {
|
||||
WorkingDirectory = "${config.home.homeDirectory}/code/etc/stable-diffusion-webui-docker";
|
||||
ExecStart = "${lib.getExe pkgs.docker} compose --profile comfy up --build";
|
||||
# ExecStop = "${lib.getExe pkgs.docker} compose stop";
|
||||
};
|
||||
};
|
||||
# stable-diffusion-dl = {}
|
||||
};
|
||||
|
||||
config.xdg.desktopEntries = {
|
||||
stable-diffusion = {
|
||||
name = "Stable Diffusion Backend Start";
|
||||
type = "Application";
|
||||
exec = "systemctl --user start stable-diffusion.service";
|
||||
};
|
||||
stable-diffusion-stop = {
|
||||
name = "Stable Diffusion Backend Stop";
|
||||
type = "Application";
|
||||
exec = "systemctl --user stop stable-diffusion.service";
|
||||
};
|
||||
# settings = {
|
||||
# Path = "${config.home.homeDirectory}/code/etc/stable-diffusion-webui-docker";
|
||||
# };
|
||||
# exec = "kitty -d ${config.home.homeDirectory}/code/etc/stable-diffusion-webui-docker sh -c \"docker compose --profile comfy up --build\"";
|
||||
# stable-diffusion-dl = {
|
||||
# name = "Stable Diffusion Setup";
|
||||
# type = "Application";
|
||||
# settings = {
|
||||
# Path = "${config.home.homeDirectory}/code/etc/stable-diffusion-webui-docker";
|
||||
# };
|
||||
# exec = "kitty --hold docker compose --profile download up --build";
|
||||
# };
|
||||
};
|
||||
}
|
|
@ -10,6 +10,12 @@
|
|||
type = with types; attrsOf str;
|
||||
default = {};
|
||||
};
|
||||
|
||||
ezOneShots = with lib;
|
||||
mkOption {
|
||||
type = with types; attrsOf str;
|
||||
default = {};
|
||||
};
|
||||
ezConf = with lib;
|
||||
mkOption {
|
||||
type = with types; attrsOf path;
|
||||
|
@ -39,7 +45,21 @@
|
|||
WantedBy = ["graphical-session.target"] ++ config.extraTarget;
|
||||
};
|
||||
})
|
||||
config.ezServices;
|
||||
config.ezServices
|
||||
// builtins.mapAttrs (name: cmd: {
|
||||
Unit = {
|
||||
Description = "${name}";
|
||||
After = ["graphical-session.target"] ++ config.extraTarget;
|
||||
};
|
||||
Service = {
|
||||
ExecStart = cmd;
|
||||
Type = "oneshot";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"] ++ config.extraTarget;
|
||||
};
|
||||
})
|
||||
config.ezOneShots;
|
||||
|
||||
xdg.configFile =
|
||||
builtins.mapAttrs (name: value: {
|
||||
|
|
|
@ -78,27 +78,29 @@
|
|||
|
||||
#input stuff
|
||||
|
||||
services.xserver = {
|
||||
enable = true; # SDDM requires this
|
||||
xkb.options = "caps:escape";
|
||||
xkb.layout = "us";
|
||||
libinput.enable = true;
|
||||
# services.xserver = {
|
||||
# enable = true; # SDDM requires this
|
||||
# xkb.options = "caps:escape";
|
||||
# xkb.layout = "us";
|
||||
|
||||
desktopManager.plasma5 = {
|
||||
enable = true;
|
||||
# enableQt5Integration = true; # for plasma6
|
||||
runUsingSystemd = true;
|
||||
};
|
||||
};
|
||||
# desktopManager.plasma5 = {
|
||||
# enable = true;
|
||||
# enableQt5Integration = true; # for plasma6
|
||||
# runUsingSystemd = true;
|
||||
# };
|
||||
# };
|
||||
services.libinput.enable = true;
|
||||
services.desktopManager.cosmic.enable = true;
|
||||
services.displayManager.cosmic-greeter.enable = true;
|
||||
|
||||
services.udisks2.enable = true;
|
||||
|
||||
environment.plasma5.excludePackages = with pkgs.libsForQt5; [
|
||||
konsole
|
||||
gwenview
|
||||
];
|
||||
services.system76-scheduler.enable = true;
|
||||
|
||||
# environment.plasma5.excludePackages = with pkgs.libsForQt5; [
|
||||
# konsole
|
||||
# gwenview
|
||||
# ];
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
|
@ -175,9 +177,9 @@
|
|||
package = pkgs.nix-ld-rs;
|
||||
};
|
||||
|
||||
# networking.firewall = {
|
||||
# checkReversePath = "loose";
|
||||
# };
|
||||
networking.firewall = {
|
||||
checkReversePath = "loose";
|
||||
};
|
||||
|
||||
# give cpuset to user
|
||||
systemd.services."user@".serviceConfig.Delegate = "memory pids cpu cpuset";
|
||||
|
|
|
@ -70,8 +70,11 @@
|
|||
docker = {
|
||||
enable = true;
|
||||
enableNvidia = true;
|
||||
enableOnBoot = true;
|
||||
extraOptions = "--add-runtime nvidia=/run/current-system/sw/bin/nvidia-container-runtime";
|
||||
};
|
||||
};
|
||||
systemd.enableUnifiedCgroupHierarchy = false; # libnvidia-container doesn't support cgroups v2
|
||||
|
||||
services.minidlna = {
|
||||
enable = true;
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
system = final.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
polonium-pkgs = import inputs.nixpkgs-polonium {
|
||||
system = final.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
rice = import ./rice.nix;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue