chore: Use nixfmt reformat all nix source code
This commit is contained in:
parent
1cdf00cefe
commit
11337b8f9e
184 changed files with 2349 additions and 1943 deletions
|
|
@ -4,28 +4,32 @@
|
|||
flake-parts-lib,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
inherit (inputs) deploy-rs;
|
||||
mkDeployNode = {
|
||||
hostName,
|
||||
unixName ? "deploy",
|
||||
system ? "x86_64-linux",
|
||||
sshName ? hostName,
|
||||
}: {
|
||||
"${hostName}" = {
|
||||
hostname = "${sshName}";
|
||||
sshUser = "${unixName}";
|
||||
interactiveSudo = true;
|
||||
profiles = {
|
||||
system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib."${system}".activate.nixos outputs.nixosConfigurations."${hostName}";
|
||||
mkDeployNode =
|
||||
{
|
||||
hostName,
|
||||
unixName ? "deploy",
|
||||
system ? "x86_64-linux",
|
||||
sshName ? hostName,
|
||||
}:
|
||||
{
|
||||
"${hostName}" = {
|
||||
hostname = "${sshName}";
|
||||
sshUser = "${unixName}";
|
||||
interactiveSudo = true;
|
||||
profiles = {
|
||||
system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib."${system}".activate.nixos outputs.nixosConfigurations."${hostName}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
flake = flake-parts-lib.mkSubmoduleOptions {
|
||||
deploy = lib.mkOption {
|
||||
|
|
@ -34,20 +38,21 @@ in {
|
|||
};
|
||||
};
|
||||
config = {
|
||||
flake.deploy.nodes = with lib;
|
||||
flake.deploy.nodes =
|
||||
with lib;
|
||||
pipe
|
||||
[
|
||||
"Cape"
|
||||
"Akun"
|
||||
]
|
||||
[
|
||||
(map (
|
||||
hostName:
|
||||
[
|
||||
"Cape"
|
||||
"Akun"
|
||||
]
|
||||
[
|
||||
(map (
|
||||
hostName:
|
||||
mkDeployNode {
|
||||
inherit hostName;
|
||||
}
|
||||
))
|
||||
(foldr (a: b: a // b) {})
|
||||
];
|
||||
))
|
||||
(foldr (a: b: a // b) { })
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,42 +4,44 @@
|
|||
self,
|
||||
rootPath,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
homeModules =
|
||||
(
|
||||
with lib;
|
||||
pipe (rootPath + "/home") [
|
||||
builtins.readDir
|
||||
(filterAttrs (_key: value: value == "directory"))
|
||||
(filterAttrs (
|
||||
key: _value:
|
||||
!builtins.elem key [
|
||||
"modules"
|
||||
"extra"
|
||||
]
|
||||
))
|
||||
builtins.attrNames
|
||||
(flip genAttrs (name: import (rootPath + "/home/${name}/modules")))
|
||||
]
|
||||
pipe (rootPath + "/home") [
|
||||
builtins.readDir
|
||||
(filterAttrs (_key: value: value == "directory"))
|
||||
(filterAttrs (
|
||||
key: _value:
|
||||
!builtins.elem key [
|
||||
"modules"
|
||||
"extra"
|
||||
]
|
||||
))
|
||||
builtins.attrNames
|
||||
(flip genAttrs (name: import (rootPath + "/home/${name}/modules")))
|
||||
]
|
||||
)
|
||||
// {
|
||||
default = import "${toString rootPath}/home/modules";
|
||||
extra = import "${toString rootPath}/home/extra";
|
||||
};
|
||||
makeHomeConfiguration = {
|
||||
hostName,
|
||||
unixName ? "david",
|
||||
system ? "x86_64-linux",
|
||||
nixpkgs ? inputs.nixpkgs,
|
||||
home-manager ? inputs.home-manager,
|
||||
}: {
|
||||
"${unixName}@${hostName}" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
localSystem = {inherit system;};
|
||||
};
|
||||
modules =
|
||||
[
|
||||
makeHomeConfiguration =
|
||||
{
|
||||
hostName,
|
||||
unixName ? "david",
|
||||
system ? "x86_64-linux",
|
||||
nixpkgs ? inputs.nixpkgs,
|
||||
home-manager ? inputs.home-manager,
|
||||
}:
|
||||
{
|
||||
"${unixName}@${hostName}" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
localSystem = { inherit system; };
|
||||
};
|
||||
modules = [
|
||||
(rootPath + "/home/${unixName}/configurations/${hostName}")
|
||||
]
|
||||
++ (with homeModules; [
|
||||
|
|
@ -51,30 +53,32 @@
|
|||
]
|
||||
++ [
|
||||
{
|
||||
lib = {inherit (lib) youthlic;};
|
||||
lib = { inherit (lib) youthlic; };
|
||||
}
|
||||
];
|
||||
extraSpecialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
outputs
|
||||
unixName
|
||||
hostName
|
||||
system
|
||||
rootPath
|
||||
;
|
||||
extraSpecialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
outputs
|
||||
unixName
|
||||
hostName
|
||||
system
|
||||
rootPath
|
||||
;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
flake = {
|
||||
homeConfigurations = with lib;
|
||||
foldr (a: b: a // b) {} (
|
||||
homeConfigurations =
|
||||
with lib;
|
||||
foldr (a: b: a // b) { } (
|
||||
pipe
|
||||
[
|
||||
# Hostname
|
||||
]
|
||||
[(map (hostName: makeHomeConfiguration {inherit hostName;}))]
|
||||
[
|
||||
# Hostname
|
||||
]
|
||||
[ (map (hostName: makeHomeConfiguration { inherit hostName; })) ]
|
||||
);
|
||||
inherit homeModules;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,36 +4,40 @@
|
|||
self,
|
||||
rootPath,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
in {
|
||||
in
|
||||
{
|
||||
flake = {
|
||||
nixosModules = {
|
||||
default = import (rootPath + "/nixos/modules/top-level");
|
||||
gui = import (rootPath + "/nixos/modules/top-level/gui.nix");
|
||||
};
|
||||
nixosConfigurations = let
|
||||
makeNixosConfiguration = hostName:
|
||||
lib.nixpkgs-patcher.nixosSystem {
|
||||
nixpkgsPatcher.inputs = inputs;
|
||||
modules = [(rootPath + "/nixos/configurations/${hostName}")];
|
||||
specialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
outputs
|
||||
rootPath
|
||||
lib
|
||||
;
|
||||
nixosConfigurations =
|
||||
let
|
||||
makeNixosConfiguration =
|
||||
hostName:
|
||||
lib.nixpkgs-patcher.nixosSystem {
|
||||
nixpkgsPatcher.inputs = inputs;
|
||||
modules = [ (rootPath + "/nixos/configurations/${hostName}") ];
|
||||
specialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
outputs
|
||||
rootPath
|
||||
lib
|
||||
;
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
in
|
||||
with lib;
|
||||
pipe
|
||||
pipe
|
||||
[
|
||||
"Tytonidae"
|
||||
"Cape"
|
||||
"Akun"
|
||||
]
|
||||
[(flip genAttrs makeNixosConfiguration)];
|
||||
[ (flip genAttrs makeNixosConfiguration) ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,15 +4,18 @@
|
|||
lib,
|
||||
rootPath,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
importWithArgs = lib.flip import {inherit inputs outputs;};
|
||||
in {
|
||||
flake.overlays = with lib;
|
||||
importWithArgs = lib.flip import { inherit inputs outputs; };
|
||||
in
|
||||
{
|
||||
flake.overlays =
|
||||
with lib;
|
||||
pipe
|
||||
[
|
||||
"modifications"
|
||||
"additions"
|
||||
]
|
||||
[(flip genAttrs (name: importWithArgs (rootPath + "/overlays/${name}")))];
|
||||
[
|
||||
"modifications"
|
||||
"additions"
|
||||
]
|
||||
[ (flip genAttrs (name: importWithArgs (rootPath + "/overlays/${name}"))) ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,85 +2,91 @@
|
|||
inputs,
|
||||
rootPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(rootPath + "/treefmt.nix")
|
||||
];
|
||||
perSystem = {
|
||||
pkgs,
|
||||
system,
|
||||
lib,
|
||||
self',
|
||||
inputs',
|
||||
...
|
||||
}: let
|
||||
patchedNixpkgs = lib.nixpkgs-patcher.patchNixpkgs {
|
||||
inherit system inputs;
|
||||
};
|
||||
in {
|
||||
_module.args.pkgs = import patchedNixpkgs {
|
||||
localSystem = {inherit system;};
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
perSystem =
|
||||
{
|
||||
pkgs,
|
||||
system,
|
||||
lib,
|
||||
self',
|
||||
inputs',
|
||||
...
|
||||
}:
|
||||
let
|
||||
patchedNixpkgs = lib.nixpkgs-patcher.patchNixpkgs {
|
||||
inherit system inputs;
|
||||
};
|
||||
overlays = [(_final: _prev: {inherit lib;})];
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
name = "nixos-shell";
|
||||
packages = with pkgs; [
|
||||
nixd
|
||||
nil
|
||||
typos
|
||||
typos-lsp
|
||||
just
|
||||
nvfetcher
|
||||
alejandra
|
||||
oxfmt
|
||||
|
||||
lua-language-server
|
||||
];
|
||||
};
|
||||
legacyPackages = let
|
||||
inputsScope = lib.makeScope pkgs.newScope (self: {
|
||||
inherit inputs rootPath;
|
||||
srcs = self.callPackage (rootPath + "/_sources/generated.nix") {};
|
||||
});
|
||||
in
|
||||
inputsScope.overrideScope (
|
||||
final: _prev:
|
||||
{
|
||||
_module.args.pkgs = import patchedNixpkgs {
|
||||
localSystem = { inherit system; };
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
overlays = [ (_final: _prev: { inherit lib; }) ];
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
name = "nixos-shell";
|
||||
packages = with pkgs; [
|
||||
nixd
|
||||
nil
|
||||
typos
|
||||
typos-lsp
|
||||
just
|
||||
nvfetcher
|
||||
alejandra
|
||||
oxfmt
|
||||
|
||||
lua-language-server
|
||||
];
|
||||
};
|
||||
legacyPackages =
|
||||
let
|
||||
inputsScope = lib.makeScope pkgs.newScope (self: {
|
||||
inherit inputs rootPath;
|
||||
srcs = self.callPackage (rootPath + "/_sources/generated.nix") { };
|
||||
});
|
||||
in
|
||||
inputsScope.overrideScope (
|
||||
final: _prev:
|
||||
lib.packagesFromDirectoryRecursive {
|
||||
inherit (final) callPackage;
|
||||
directory = rootPath + "/pkgs";
|
||||
}
|
||||
);
|
||||
packages = let
|
||||
flattenPkgs = path: value:
|
||||
if lib.isDerivation value
|
||||
then {
|
||||
${lib.concatStringsSep ":" path} = value;
|
||||
}
|
||||
else if lib.isAttrs value
|
||||
then lib.concatMapAttrs (name: flattenPkgs (path ++ [name])) value
|
||||
else {};
|
||||
in
|
||||
flattenPkgs [] (
|
||||
lib.removeAttrs self'.legacyPackages [
|
||||
"inputs"
|
||||
);
|
||||
packages =
|
||||
let
|
||||
flattenPkgs =
|
||||
path: value:
|
||||
if lib.isDerivation value then
|
||||
{
|
||||
${lib.concatStringsSep ":" path} = value;
|
||||
}
|
||||
else if lib.isAttrs value then
|
||||
lib.concatMapAttrs (name: flattenPkgs (path ++ [ name ])) value
|
||||
else
|
||||
{ };
|
||||
in
|
||||
flattenPkgs [ ] (
|
||||
lib.removeAttrs self'.legacyPackages [
|
||||
"inputs"
|
||||
|
||||
"srcs"
|
||||
"srcs"
|
||||
|
||||
"rootPath"
|
||||
"rootPath"
|
||||
|
||||
"newScope"
|
||||
"overrideScope"
|
||||
"packages"
|
||||
"callPackage"
|
||||
]
|
||||
);
|
||||
checks =
|
||||
lib.concatMapAttrs (name: value: {
|
||||
"newScope"
|
||||
"overrideScope"
|
||||
"packages"
|
||||
"callPackage"
|
||||
]
|
||||
);
|
||||
checks = lib.concatMapAttrs (name: value: {
|
||||
"package-${name}" = value;
|
||||
})
|
||||
self'.packages;
|
||||
};
|
||||
}) self'.packages;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
pkgs,
|
||||
unixName,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
youthlic = {
|
||||
xdg-dirs.enable = true;
|
||||
programs = {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{...}: {}
|
||||
{ ... }: { }
|
||||
|
|
|
|||
|
|
@ -4,32 +4,35 @@
|
|||
unixName,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = lib.youthlic.loadImports ./.;
|
||||
youthlic = {
|
||||
xdg-dirs.enable = true;
|
||||
programs = let
|
||||
email = config.accounts.email.accounts.ulic-youthlic;
|
||||
inherit (email) address name;
|
||||
signKey = email.gpg.key;
|
||||
in {
|
||||
gpg.enable = true;
|
||||
git = {
|
||||
inherit name signKey;
|
||||
email = address;
|
||||
encrypt-credential = true;
|
||||
programs =
|
||||
let
|
||||
email = config.accounts.email.accounts.ulic-youthlic;
|
||||
inherit (email) address name;
|
||||
signKey = email.gpg.key;
|
||||
in
|
||||
{
|
||||
gpg.enable = true;
|
||||
git = {
|
||||
inherit name signKey;
|
||||
email = address;
|
||||
encrypt-credential = true;
|
||||
};
|
||||
fish.enable = true;
|
||||
bash.enable = true;
|
||||
jujutsu = {
|
||||
enable = true;
|
||||
inherit name signKey;
|
||||
email = address;
|
||||
};
|
||||
starship.enable = true;
|
||||
sops.enable = true;
|
||||
atuin.enable = true;
|
||||
};
|
||||
fish.enable = true;
|
||||
bash.enable = true;
|
||||
jujutsu = {
|
||||
enable = true;
|
||||
inherit name signKey;
|
||||
email = address;
|
||||
};
|
||||
starship.enable = true;
|
||||
sops.enable = true;
|
||||
atuin.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
david = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{...}: {
|
||||
{ ... }: {
|
||||
david.programs.niri = {
|
||||
wluma.extraSettings = {
|
||||
output = {
|
||||
|
|
|
|||
|
|
@ -4,39 +4,42 @@
|
|||
config,
|
||||
unixName,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = lib.youthlic.loadImports ./.;
|
||||
youthlic = {
|
||||
xdg-dirs.enable = true;
|
||||
programs = let
|
||||
email = config.accounts.email.accounts.ulic-youthlic;
|
||||
inherit (email) name address;
|
||||
signKey = email.gpg.key;
|
||||
in {
|
||||
rustypaste-cli.enable = true;
|
||||
gpg.enable = true;
|
||||
jujutsu = {
|
||||
enable = true;
|
||||
inherit name signKey;
|
||||
email = address;
|
||||
programs =
|
||||
let
|
||||
email = config.accounts.email.accounts.ulic-youthlic;
|
||||
inherit (email) name address;
|
||||
signKey = email.gpg.key;
|
||||
in
|
||||
{
|
||||
rustypaste-cli.enable = true;
|
||||
gpg.enable = true;
|
||||
jujutsu = {
|
||||
enable = true;
|
||||
inherit name signKey;
|
||||
email = address;
|
||||
};
|
||||
git = {
|
||||
inherit name signKey;
|
||||
email = address;
|
||||
encrypt-credential = true;
|
||||
};
|
||||
fish.enable = true;
|
||||
bash.enable = true;
|
||||
starship.enable = true;
|
||||
sops.enable = true;
|
||||
kvm.enable = true;
|
||||
atuin.enable = true;
|
||||
ion.enable = true;
|
||||
awscli = {
|
||||
enable = true;
|
||||
url = "http://localhost:8491";
|
||||
};
|
||||
};
|
||||
git = {
|
||||
inherit name signKey;
|
||||
email = address;
|
||||
encrypt-credential = true;
|
||||
};
|
||||
fish.enable = true;
|
||||
bash.enable = true;
|
||||
starship.enable = true;
|
||||
sops.enable = true;
|
||||
kvm.enable = true;
|
||||
atuin.enable = true;
|
||||
ion.enable = true;
|
||||
awscli = {
|
||||
enable = true;
|
||||
url = "http://localhost:8491";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
david = {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.niri;
|
||||
in {
|
||||
in
|
||||
{
|
||||
david.programs.niri = lib.mkIf cfg.enable {
|
||||
wluma.extraSettings = {
|
||||
output = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }: {
|
||||
imports = lib.youthlic.loadImports ./.;
|
||||
config = {
|
||||
youthlic.programs = {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.accounts.email;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.accounts.email = {
|
||||
enable = lib.mkEnableOption "emails";
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.alacritty;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.alacritty = {
|
||||
enable = lib.mkEnableOption "alacritty";
|
||||
|
|
@ -17,13 +19,13 @@ in {
|
|||
settings =
|
||||
(
|
||||
with lib;
|
||||
pipe ./alacritty.toml [
|
||||
builtins.readFile
|
||||
builtins.fromTOML
|
||||
]
|
||||
pipe ./alacritty.toml [
|
||||
builtins.readFile
|
||||
builtins.fromTOML
|
||||
]
|
||||
)
|
||||
// {
|
||||
colors = lib.mkForce {};
|
||||
colors = lib.mkForce { };
|
||||
font.size = lib.mkForce 16;
|
||||
window.opacity = lib.mkForce 0.8;
|
||||
general.import = [
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.chromium;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.chromium = {
|
||||
enable = lib.mkEnableOption "chromium";
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.espanso;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.espanso = {
|
||||
enable = lib.mkEnableOption "espanso";
|
||||
|
|
@ -16,7 +18,7 @@ in {
|
|||
enable = true;
|
||||
package = pkgs.espanso-wayland;
|
||||
configs = {
|
||||
default = {};
|
||||
default = { };
|
||||
};
|
||||
matches = {
|
||||
base = {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.foot;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.foot = {
|
||||
enable = lib.mkEnableOption "foot";
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.fuzzel;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.fuzzel = {
|
||||
enable = lib.mkEnableOption "fuzzel";
|
||||
|
|
|
|||
|
|
@ -2,36 +2,39 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
david.programs.ghostty = {
|
||||
enable = lib.mkEnableOption "ghostty";
|
||||
};
|
||||
};
|
||||
config = let
|
||||
cfg = config.david.programs.ghostty;
|
||||
in (lib.mkIf cfg.enable {
|
||||
stylix.targets.ghostty.enable = false;
|
||||
programs.ghostty = lib.mkMerge [
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
font-family = [
|
||||
"MonoLisa"
|
||||
"Source Han Sans SC"
|
||||
];
|
||||
font-size = lib.mkForce 17;
|
||||
theme = "Atom One Dark";
|
||||
background-opacity = 0.8;
|
||||
confirm-close-surface = "false";
|
||||
};
|
||||
}
|
||||
(lib.mkIf config.youthlic.programs.fish.enable {
|
||||
enableFishIntegration = true;
|
||||
})
|
||||
(lib.mkIf config.youthlic.programs.bash.enable {
|
||||
enableBashIntegration = true;
|
||||
})
|
||||
];
|
||||
});
|
||||
config =
|
||||
let
|
||||
cfg = config.david.programs.ghostty;
|
||||
in
|
||||
(lib.mkIf cfg.enable {
|
||||
stylix.targets.ghostty.enable = false;
|
||||
programs.ghostty = lib.mkMerge [
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
font-family = [
|
||||
"MonoLisa"
|
||||
"Source Han Sans SC"
|
||||
];
|
||||
font-size = lib.mkForce 17;
|
||||
theme = "Atom One Dark";
|
||||
background-opacity = 0.8;
|
||||
confirm-close-surface = "false";
|
||||
};
|
||||
}
|
||||
(lib.mkIf config.youthlic.programs.fish.enable {
|
||||
enableFishIntegration = true;
|
||||
})
|
||||
(lib.mkIf config.youthlic.programs.bash.enable {
|
||||
enableBashIntegration = true;
|
||||
})
|
||||
];
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.helix;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.helix = {
|
||||
enable = lib.mkEnableOption "helix";
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.kanshi;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.kanshi = {
|
||||
enable = lib.mkEnableOption "kanshi";
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.mpv;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.mpv = {
|
||||
enable = lib.mkEnableOption "mpv";
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -3,39 +3,43 @@
|
|||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
osConfig ? (throw "Trying to access osConfig, the home-manager module is not being used in the nixos module"),
|
||||
osConfig ? (
|
||||
throw "Trying to access osConfig, the home-manager module is not being used in the nixos module"
|
||||
),
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.niri;
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
];
|
||||
options = {
|
||||
david.programs.niri = {
|
||||
enable =
|
||||
(lib.mkEnableOption "niri")
|
||||
// {
|
||||
default = osConfig.youthlic.gui.enabled == "niri";
|
||||
};
|
||||
enable = (lib.mkEnableOption "niri") // {
|
||||
default = osConfig.youthlic.gui.enabled == "niri";
|
||||
};
|
||||
config = lib.mkOption {
|
||||
type = inputs.niri-flake.lib.kdl.types.kdl-document;
|
||||
};
|
||||
configHelper = lib.mkOption {
|
||||
type = lib.types.anything;
|
||||
default = {
|
||||
validated-config-for = configuration:
|
||||
pkgs.runCommand "config.kdl" {
|
||||
inherit configuration;
|
||||
passAsFile = ["configuration"];
|
||||
buildInputs = [config.programs.niri.package];
|
||||
}
|
||||
#bash
|
||||
''
|
||||
niri validate -c $configurationPath
|
||||
cp $configurationPath $out
|
||||
'';
|
||||
validated-config-for =
|
||||
configuration:
|
||||
pkgs.runCommand "config.kdl"
|
||||
{
|
||||
inherit configuration;
|
||||
passAsFile = [ "configuration" ];
|
||||
buildInputs = [ config.programs.niri.package ];
|
||||
}
|
||||
#bash
|
||||
''
|
||||
niri validate -c $configurationPath
|
||||
cp $configurationPath $out
|
||||
'';
|
||||
};
|
||||
};
|
||||
wluma.extraSettings = lib.mkOption {
|
||||
|
|
@ -52,19 +56,21 @@ in {
|
|||
swayimg
|
||||
seahorse
|
||||
];
|
||||
xdg.configFile = let
|
||||
qtctConf = ''
|
||||
[Appearance]
|
||||
standard_dialogs=xdgdesktopportal
|
||||
'';
|
||||
in {
|
||||
"qt5ct/qt5ct.conf" = {
|
||||
text = qtctConf;
|
||||
xdg.configFile =
|
||||
let
|
||||
qtctConf = ''
|
||||
[Appearance]
|
||||
standard_dialogs=xdgdesktopportal
|
||||
'';
|
||||
in
|
||||
{
|
||||
"qt5ct/qt5ct.conf" = {
|
||||
text = qtctConf;
|
||||
};
|
||||
"qt6ct/qt6ct.conf" = {
|
||||
text = qtctConf;
|
||||
};
|
||||
};
|
||||
"qt6ct/qt6ct.conf" = {
|
||||
text = qtctConf;
|
||||
};
|
||||
};
|
||||
david.programs = {
|
||||
# fuzzel.enable = true;
|
||||
# waybar = {
|
||||
|
|
@ -83,11 +89,11 @@ in {
|
|||
};
|
||||
programs = {
|
||||
niri = {
|
||||
config =
|
||||
cfg.config
|
||||
++ [
|
||||
(inputs.niri-flake.lib.kdl.leaf "include" [(toString config.david.programs.noctalia.niriExtraConfig)])
|
||||
];
|
||||
config = cfg.config ++ [
|
||||
(inputs.niri-flake.lib.kdl.leaf "include" [
|
||||
(toString config.david.programs.noctalia.niriExtraConfig)
|
||||
])
|
||||
];
|
||||
};
|
||||
};
|
||||
})
|
||||
|
|
|
|||
|
|
@ -4,42 +4,101 @@
|
|||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.noctalia;
|
||||
inherit (inputs.niri-flake.lib.kdl) node leaf flag plain;
|
||||
inherit (inputs.niri-flake.lib.kdl)
|
||||
node
|
||||
leaf
|
||||
flag
|
||||
plain
|
||||
;
|
||||
spawn = leaf "spawn";
|
||||
noctalia = args: (spawn (["noctalia-shell" "ipc" "call"] ++ args));
|
||||
noctalia =
|
||||
args:
|
||||
(spawn (
|
||||
[
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
]
|
||||
++ args
|
||||
));
|
||||
|
||||
layer-rule = plain "layer-rule";
|
||||
match = leaf "match";
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.noctalia = {
|
||||
enable = lib.mkEnableOption "noctalia";
|
||||
niriExtraConfig = lib.mkOption {
|
||||
type = inputs.niri-flake.lib.kdl.types.kdl-document;
|
||||
default = [
|
||||
(leaf "spawn-at-startup" [(lib.getExe config.programs.noctalia-shell.package)])
|
||||
(leaf "spawn-at-startup" [ (lib.getExe config.programs.noctalia-shell.package) ])
|
||||
(plain "binds" [
|
||||
(plain "Mod+V" [(noctalia ["launcher" "clipboard"])])
|
||||
(plain "Mod+Shift+P" [(noctalia ["lockScreen" "lock"])])
|
||||
(plain "Mod+Space" [(noctalia ["launcher" "toggle"])])
|
||||
(node "XF86AudioRaiseVolume" [{allow-when-locked = true;}]
|
||||
[(noctalia ["volume" "increase"])])
|
||||
(node "XF86AudioLowerVolume" [{allow-when-locked = true;}]
|
||||
[(noctalia ["volume" "decrease"])])
|
||||
(node "XF86AudioMute" [{allow-when-locked = true;}]
|
||||
[(noctalia ["volume" "muteOutput"])])
|
||||
(node "XF86AudioMicMute" [{allow-when-locked = true;}]
|
||||
[(noctalia ["volume" "muteInput"])])
|
||||
(plain "Mod+V" [
|
||||
(noctalia [
|
||||
"launcher"
|
||||
"clipboard"
|
||||
])
|
||||
])
|
||||
(plain "Mod+Shift+P" [
|
||||
(noctalia [
|
||||
"lockScreen"
|
||||
"lock"
|
||||
])
|
||||
])
|
||||
(plain "Mod+Space" [
|
||||
(noctalia [
|
||||
"launcher"
|
||||
"toggle"
|
||||
])
|
||||
])
|
||||
(node "XF86AudioRaiseVolume"
|
||||
[ { allow-when-locked = true; } ]
|
||||
[
|
||||
(noctalia [
|
||||
"volume"
|
||||
"increase"
|
||||
])
|
||||
]
|
||||
)
|
||||
(node "XF86AudioLowerVolume"
|
||||
[ { allow-when-locked = true; } ]
|
||||
[
|
||||
(noctalia [
|
||||
"volume"
|
||||
"decrease"
|
||||
])
|
||||
]
|
||||
)
|
||||
(node "XF86AudioMute"
|
||||
[ { allow-when-locked = true; } ]
|
||||
[
|
||||
(noctalia [
|
||||
"volume"
|
||||
"muteOutput"
|
||||
])
|
||||
]
|
||||
)
|
||||
(node "XF86AudioMicMute"
|
||||
[ { allow-when-locked = true; } ]
|
||||
[
|
||||
(noctalia [
|
||||
"volume"
|
||||
"muteInput"
|
||||
])
|
||||
]
|
||||
)
|
||||
])
|
||||
(layer-rule [
|
||||
(match [{namespace = "^noctalia-wallpaper-.*$";}])
|
||||
(leaf "place-within-backdrop" [true])
|
||||
(match [ { namespace = "^noctalia-wallpaper-.*$"; } ])
|
||||
(leaf "place-within-backdrop" [ true ])
|
||||
])
|
||||
(layer-rule [
|
||||
(match [{namespace = "^noctalia-notifications-.*$";}])
|
||||
(leaf "block-out-from" ["screen-capture"])
|
||||
(match [ { namespace = "^noctalia-notifications-.*$"; } ])
|
||||
(leaf "block-out-from" [ "screen-capture" ])
|
||||
])
|
||||
(plain "layout" [
|
||||
(plain "focus-ring" [
|
||||
|
|
@ -54,41 +113,49 @@ in {
|
|||
])
|
||||
])
|
||||
];
|
||||
apply = configuration: config.david.programs.niri.configHelper.validated-config-for (inputs.niri-flake.lib.kdl.serialize.nodes configuration);
|
||||
apply =
|
||||
configuration:
|
||||
config.david.programs.niri.configHelper.validated-config-for (
|
||||
inputs.niri-flake.lib.kdl.serialize.nodes configuration
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
stylix.targets.noctalia-shell.enable = false;
|
||||
home.packages = [pkgs.app2unit pkgs.gpu-screen-recorder];
|
||||
home.packages = [
|
||||
pkgs.app2unit
|
||||
pkgs.gpu-screen-recorder
|
||||
];
|
||||
programs.noctalia-shell = {
|
||||
enable = true;
|
||||
plugins = builtins.fromJSON (builtins.readFile ./plugins.json);
|
||||
pluginSettings = let
|
||||
enabledPlugins = with lib;
|
||||
flip pipe [
|
||||
(filterAttrs (_name: settings: settings.enabled or false))
|
||||
builtins.attrNames
|
||||
]
|
||||
config.programs.noctalia-shell.plugins.states;
|
||||
staticSettings = lib.genAttrs enabledPlugins (name: let
|
||||
pluginSettingPath = ./plugin + "/${name}.json";
|
||||
pluginSettings =
|
||||
let
|
||||
enabledPlugins =
|
||||
with lib;
|
||||
flip pipe [
|
||||
(filterAttrs (_name: settings: settings.enabled or false))
|
||||
builtins.attrNames
|
||||
] config.programs.noctalia-shell.plugins.states;
|
||||
staticSettings = lib.genAttrs enabledPlugins (
|
||||
name:
|
||||
let
|
||||
pluginSettingPath = ./plugin + "/${name}.json";
|
||||
in
|
||||
if lib.pathIsRegularFile pluginSettingPath then
|
||||
builtins.fromJSON (builtins.readFile pluginSettingPath)
|
||||
else
|
||||
{ }
|
||||
);
|
||||
in
|
||||
if lib.pathIsRegularFile pluginSettingPath
|
||||
then builtins.fromJSON (builtins.readFile pluginSettingPath)
|
||||
else {});
|
||||
in
|
||||
lib.recursiveUpdate
|
||||
staticSettings {
|
||||
lib.recursiveUpdate staticSettings {
|
||||
screen-recorder.directory = "${config.xdg.userDirs.videos}/records";
|
||||
};
|
||||
settings =
|
||||
lib.recursiveUpdate
|
||||
(builtins.fromJSON (builtins.readFile ./settings.json))
|
||||
{
|
||||
general.avatarImage = "${config.home.homeDirectory}/.face";
|
||||
wallpaper.directory = "${config.home.homeDirectory}/${config.david.wallpaper.path}";
|
||||
};
|
||||
settings = lib.recursiveUpdate (builtins.fromJSON (builtins.readFile ./settings.json)) {
|
||||
general.avatarImage = "${config.home.homeDirectory}/.face";
|
||||
wallpaper.directory = "${config.home.homeDirectory}/${config.david.wallpaper.path}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.openssh;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.openssh = {
|
||||
enable = lib.mkEnableOption "openssh";
|
||||
|
|
@ -33,7 +35,7 @@ in {
|
|||
};
|
||||
})
|
||||
(lib.mkIf (cfg.enable && config.youthlic.programs.sops.enable) {
|
||||
programs.ssh.includes = [config.sops.secrets.ssh-config.path];
|
||||
programs.ssh.includes = [ config.sops.secrets.ssh-config.path ];
|
||||
sops.secrets = {
|
||||
"ssh-private-key/tytonidae" = {
|
||||
mode = "0600";
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.radicle;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.radicle = {
|
||||
enable = lib.mkEnableOption "radicle";
|
||||
|
|
|
|||
|
|
@ -4,10 +4,12 @@
|
|||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.spotify;
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.spotify = {
|
||||
enable = lib.mkEnableOption "spotify";
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.swaylock;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.swaylock = {
|
||||
enable = lib.mkEnableOption "swaylock";
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.swaync;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.swaync = {
|
||||
enable = lib.mkEnableOption "swaync";
|
||||
|
|
@ -18,7 +20,7 @@ in {
|
|||
};
|
||||
})
|
||||
(lib.mkIf (!cfg.systemd.enable) {
|
||||
systemd.user.services.swaync = lib.mkForce {};
|
||||
systemd.user.services.swaync = lib.mkForce { };
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.thunderbird;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.thunderbird = {
|
||||
enable = lib.mkEnableOption "thunderbird";
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@
|
|||
lib,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.waybar;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.waybar = {
|
||||
enable = lib.mkEnableOption "waybar";
|
||||
|
|
@ -23,7 +25,7 @@ in {
|
|||
"niri/workspaces"
|
||||
"wlr/taskbar"
|
||||
];
|
||||
modules-center = ["clock"];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"idle_inhibitor"
|
||||
|
|
@ -37,7 +39,7 @@ in {
|
|||
on-click = "activate";
|
||||
};
|
||||
|
||||
"niri/worksapces" = {};
|
||||
"niri/worksapces" = { };
|
||||
"niri/taskbar" = {
|
||||
icon-size = 15;
|
||||
on-click = "activate";
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.waypaper;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.waypaper = {
|
||||
enable = lib.mkEnableOption "waypaper";
|
||||
|
|
@ -27,7 +29,7 @@ in {
|
|||
OnCalendar = "*:0/10";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["timers.target"];
|
||||
WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
services."waypaper" = {
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
config,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.wluma;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.wluma = {
|
||||
enable = lib.mkEnableOption "wluma";
|
||||
|
|
@ -33,23 +35,22 @@ in {
|
|||
config = lib.mkIf cfg.enable {
|
||||
services.wluma = {
|
||||
enable = true;
|
||||
settings =
|
||||
{
|
||||
als = {
|
||||
webcam = {
|
||||
video = 0;
|
||||
thresholds = {
|
||||
"0" = "night";
|
||||
"15" = "dark";
|
||||
"30" = "dim";
|
||||
"45" = "normal";
|
||||
"60" = "bright";
|
||||
"75" = "outdoors";
|
||||
};
|
||||
settings = {
|
||||
als = {
|
||||
webcam = {
|
||||
video = 0;
|
||||
thresholds = {
|
||||
"0" = "night";
|
||||
"15" = "dark";
|
||||
"30" = "dim";
|
||||
"45" = "normal";
|
||||
"60" = "bright";
|
||||
"75" = "outdoors";
|
||||
};
|
||||
};
|
||||
}
|
||||
// cfg.extraSettings;
|
||||
};
|
||||
}
|
||||
// cfg.extraSettings;
|
||||
systemd = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.zed-editor;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.zed-editor = {
|
||||
enable = lib.mkEnableOption "zed-editor";
|
||||
|
|
@ -61,7 +63,7 @@ in {
|
|||
ty = {
|
||||
binary = {
|
||||
path = lib.getExe pkgs.ty;
|
||||
arguments = ["server"];
|
||||
arguments = [ "server" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.programs.zen-browser;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.programs.zen-browser = {
|
||||
enable = lib.mkEnableOption "zen-browser";
|
||||
|
|
@ -41,7 +43,7 @@ in {
|
|||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["@gp"];
|
||||
definedAliases = [ "@gp" ];
|
||||
};
|
||||
"Nix Packages" = {
|
||||
urls = [
|
||||
|
|
@ -60,7 +62,7 @@ in {
|
|||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@np"];
|
||||
definedAliases = [ "@np" ];
|
||||
};
|
||||
"Nix Options" = {
|
||||
urls = [
|
||||
|
|
@ -78,7 +80,7 @@ in {
|
|||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["@no"];
|
||||
definedAliases = [ "@no" ];
|
||||
};
|
||||
"Home Manager Options" = {
|
||||
urls = [
|
||||
|
|
@ -96,7 +98,7 @@ in {
|
|||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["@hm"];
|
||||
definedAliases = [ "@hm" ];
|
||||
};
|
||||
"Nix Flakes" = {
|
||||
urls = [
|
||||
|
|
@ -114,7 +116,7 @@ in {
|
|||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["@nf"];
|
||||
definedAliases = [ "@nf" ];
|
||||
};
|
||||
"NixOS Wiki" = {
|
||||
urls = [
|
||||
|
|
@ -128,7 +130,7 @@ in {
|
|||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["@nw"];
|
||||
definedAliases = [ "@nw" ];
|
||||
};
|
||||
"Rust Stdandard Lib" = {
|
||||
urls = [
|
||||
|
|
@ -142,7 +144,7 @@ in {
|
|||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["@rs"];
|
||||
definedAliases = [ "@rs" ];
|
||||
};
|
||||
"GitHub" = {
|
||||
urls = [
|
||||
|
|
@ -160,7 +162,7 @@ in {
|
|||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["@gh"];
|
||||
definedAliases = [ "@gh" ];
|
||||
};
|
||||
"Rust Reference" = {
|
||||
urls = [
|
||||
|
|
@ -174,7 +176,7 @@ in {
|
|||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["@rr"];
|
||||
definedAliases = [ "@rr" ];
|
||||
};
|
||||
"Rust Crates" = {
|
||||
urls = [
|
||||
|
|
@ -188,7 +190,7 @@ in {
|
|||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["@rc"];
|
||||
definedAliases = [ "@rc" ];
|
||||
};
|
||||
"C++ Reference" = {
|
||||
urls = [
|
||||
|
|
@ -206,7 +208,7 @@ in {
|
|||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["@cr"];
|
||||
definedAliases = [ "@cr" ];
|
||||
};
|
||||
"bing".metaData.hidden = true;
|
||||
"google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
|
||||
|
|
@ -215,12 +217,15 @@ in {
|
|||
};
|
||||
policies = {
|
||||
DisableAppUpdate = true;
|
||||
Preferences = let
|
||||
mkLockedAttrs = builtins.mapAttrs (_: value: {
|
||||
Value = value;
|
||||
Status = "locked";
|
||||
});
|
||||
in
|
||||
Preferences =
|
||||
let
|
||||
mkLockedAttrs = builtins.mapAttrs (
|
||||
_: value: {
|
||||
Value = value;
|
||||
Status = "locked";
|
||||
}
|
||||
);
|
||||
in
|
||||
mkLockedAttrs {
|
||||
"browser.tabs.closeTabByDblclick" = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.david.wallpaper;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
david.wallpaper = {
|
||||
enable = lib.mkEnableOption "wallpaper";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports =
|
||||
(with inputs; [
|
||||
niri-flake.homeModules.niri
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
config = {
|
||||
nixpkgs = {
|
||||
config = {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports =
|
||||
(with inputs; [
|
||||
sops-nix.homeManagerModules.sops
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.atuin;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.atuin = {
|
||||
enable = lib.mkEnableOption "atuin";
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.awscli;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.awscli = {
|
||||
enable = lib.mkEnableOption "awscli";
|
||||
|
|
@ -16,7 +18,7 @@ in {
|
|||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
sops.secrets."awscli" = {};
|
||||
sops.secrets."awscli" = { };
|
||||
programs.awscli = {
|
||||
enable = true;
|
||||
credentials = {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.bash;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.bash = {
|
||||
enable = lib.mkEnableOption "bash";
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.direnv;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.direnv = {
|
||||
enable = lib.mkEnableOption "direnv";
|
||||
|
|
|
|||
|
|
@ -2,12 +2,14 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.eza;
|
||||
fish-cfg = config.youthlic.programs.fish;
|
||||
bash-cfg = config.youthlic.programs.bash;
|
||||
ion-cfg = config.youthlic.programs.ion;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.eza = {
|
||||
enable = lib.mkEnableOption "eza";
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.fish;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.fish = {
|
||||
enable = lib.mkEnableOption "fish";
|
||||
|
|
@ -37,7 +39,7 @@ in {
|
|||
onEvent = "fish_command_not_found";
|
||||
};
|
||||
fish_greeting = {
|
||||
body = '''';
|
||||
body = "";
|
||||
};
|
||||
nani = {
|
||||
body =
|
||||
|
|
|
|||
|
|
@ -2,11 +2,13 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.fzf;
|
||||
fish-cfg = config.youthlic.programs.fish;
|
||||
bash-cfg = config.youthlic.programs.bash;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.fzf = {
|
||||
enable = lib.mkEnableOption "fzf";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.git = {
|
||||
email = lib.mkOption {
|
||||
|
|
@ -13,7 +14,7 @@
|
|||
};
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = ''youthlic'';
|
||||
example = "youthlic";
|
||||
description = ''
|
||||
git name
|
||||
'';
|
||||
|
|
@ -30,9 +31,10 @@
|
|||
encrypt-credential = lib.mkEnableOption "encrypt git credential";
|
||||
};
|
||||
};
|
||||
config = let
|
||||
cfg = config.youthlic.programs.git;
|
||||
in
|
||||
config =
|
||||
let
|
||||
cfg = config.youthlic.programs.git;
|
||||
in
|
||||
lib.mkMerge [
|
||||
{
|
||||
programs = {
|
||||
|
|
|
|||
|
|
@ -4,15 +4,17 @@
|
|||
lib,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.gpg = {
|
||||
enable = lib.mkEnableOption "gpg";
|
||||
};
|
||||
};
|
||||
config = let
|
||||
cfg = config.youthlic.programs.gpg;
|
||||
in
|
||||
config =
|
||||
let
|
||||
cfg = config.youthlic.programs.gpg;
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
services.gpg-agent = lib.mkMerge [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,23 +3,25 @@
|
|||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.helix;
|
||||
defaultLanguagesSettings = config.programs.helix.package.passthru.languages.language;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.helix = {
|
||||
enable = lib.mkEnableOption "helix";
|
||||
languageSettings = lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (
|
||||
{...}: {
|
||||
{ ... }: {
|
||||
freeformType = lib.types.anything;
|
||||
options = {
|
||||
language-servers = lib.mkOption {
|
||||
type = lib.types.listOf (lib.types.either lib.types.str lib.types.anything);
|
||||
default = ["typos-lsp"];
|
||||
example = ["rust-analyzer"];
|
||||
default = [ "typos-lsp" ];
|
||||
example = [ "rust-analyzer" ];
|
||||
apply = lib.unique;
|
||||
};
|
||||
};
|
||||
|
|
@ -27,16 +29,17 @@ in {
|
|||
)
|
||||
);
|
||||
default = lib.pipe defaultLanguagesSettings [
|
||||
(map (lang: lib.nameValuePair lang.name (lib.removeAttrs lang ["name"])))
|
||||
(map (lang: lib.nameValuePair lang.name (lib.removeAttrs lang [ "name" ])))
|
||||
lib.listToAttrs
|
||||
];
|
||||
apply = lib.mapAttrsToList (name: value: {inherit name;} // value);
|
||||
apply = lib.mapAttrsToList (name: value: { inherit name; } // value);
|
||||
};
|
||||
extraPackages = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
default = [];
|
||||
default = [ ];
|
||||
example = (
|
||||
with pkgs; [
|
||||
with pkgs;
|
||||
[
|
||||
deno
|
||||
]
|
||||
);
|
||||
|
|
@ -53,7 +56,8 @@ in {
|
|||
enable = true;
|
||||
defaultEditor = true;
|
||||
extraPackages = cfg.extraPackages;
|
||||
settings = with lib;
|
||||
settings =
|
||||
with lib;
|
||||
pipe ./config.toml [
|
||||
builtins.readFile
|
||||
fromTOML
|
||||
|
|
@ -82,200 +86,200 @@ in {
|
|||
command = "typos-lsp";
|
||||
};
|
||||
};
|
||||
} {language = cfg.languageSettings;};
|
||||
} { language = cfg.languageSettings; };
|
||||
};
|
||||
})
|
||||
(lib.mkIf cfg.enable {
|
||||
youthlic.programs.helix.languageSettings = lib.pipe defaultLanguagesSettings [
|
||||
(map ({name, ...}: lib.nameValuePair name {language-servers = ["typos-lsp"];}))
|
||||
(map ({ name, ... }: lib.nameValuePair name { language-servers = [ "typos-lsp" ]; }))
|
||||
lib.listToAttrs
|
||||
];
|
||||
})
|
||||
(lib.mkIf cfg.enable {
|
||||
youthlic.programs.helix.languageSettings =
|
||||
lib.recursiveUpdate
|
||||
(lib.pipe defaultLanguagesSettings [
|
||||
(map (lang: lib.nameValuePair lang.name (lib.removeAttrs lang ["name"])))
|
||||
lib.listToAttrs
|
||||
])
|
||||
{
|
||||
cmake = {
|
||||
language-servers = [
|
||||
"neocmakelsp"
|
||||
"cmake-language-server"
|
||||
];
|
||||
};
|
||||
kdl = {
|
||||
formatter = {
|
||||
command = "kdlfmt";
|
||||
args = [
|
||||
"format"
|
||||
"-"
|
||||
(lib.pipe defaultLanguagesSettings [
|
||||
(map (lang: lib.nameValuePair lang.name (lib.removeAttrs lang [ "name" ])))
|
||||
lib.listToAttrs
|
||||
])
|
||||
{
|
||||
cmake = {
|
||||
language-servers = [
|
||||
"neocmakelsp"
|
||||
"cmake-language-server"
|
||||
];
|
||||
};
|
||||
};
|
||||
just = {
|
||||
formatter = {
|
||||
command = "just";
|
||||
args = [
|
||||
"--dump"
|
||||
kdl = {
|
||||
formatter = {
|
||||
command = "kdlfmt";
|
||||
args = [
|
||||
"format"
|
||||
"-"
|
||||
];
|
||||
};
|
||||
};
|
||||
just = {
|
||||
formatter = {
|
||||
command = "just";
|
||||
args = [
|
||||
"--dump"
|
||||
];
|
||||
};
|
||||
};
|
||||
nix = {
|
||||
formatter = {
|
||||
command = "nixfmt";
|
||||
};
|
||||
};
|
||||
xml = {
|
||||
formatter = {
|
||||
command = "xmllint";
|
||||
args = [
|
||||
"--format"
|
||||
"-"
|
||||
];
|
||||
};
|
||||
};
|
||||
typst = {
|
||||
formatter = {
|
||||
command = "typstyle";
|
||||
};
|
||||
};
|
||||
c = {
|
||||
formatter = {
|
||||
command = "clang-format";
|
||||
};
|
||||
};
|
||||
cpp = {
|
||||
formatter = {
|
||||
command = "clang-format";
|
||||
};
|
||||
};
|
||||
python = {
|
||||
formatter = {
|
||||
command = "ruff";
|
||||
args = [
|
||||
"format"
|
||||
"-s"
|
||||
"--line-length"
|
||||
"88"
|
||||
"-"
|
||||
];
|
||||
};
|
||||
language-servers = [
|
||||
"pyright"
|
||||
"ruff"
|
||||
"ty"
|
||||
];
|
||||
};
|
||||
};
|
||||
nix = {
|
||||
formatter = {
|
||||
command = "nixfmt";
|
||||
go = {
|
||||
formatter = {
|
||||
command = "goimports";
|
||||
};
|
||||
};
|
||||
};
|
||||
xml = {
|
||||
formatter = {
|
||||
command = "xmllint";
|
||||
args = [
|
||||
"--format"
|
||||
"-"
|
||||
awk = {
|
||||
formatter = {
|
||||
command = "awk";
|
||||
timeout = 5;
|
||||
args = [
|
||||
"--file=/dev/stdin"
|
||||
"--pretty-print=/dev/stdout"
|
||||
];
|
||||
};
|
||||
};
|
||||
fish = {
|
||||
language-servers = [
|
||||
"fish-lsp"
|
||||
];
|
||||
};
|
||||
};
|
||||
typst = {
|
||||
formatter = {
|
||||
command = "typstyle";
|
||||
yaml = {
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"yaml"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
c = {
|
||||
formatter = {
|
||||
command = "clang-format";
|
||||
};
|
||||
};
|
||||
cpp = {
|
||||
formatter = {
|
||||
command = "clang-format";
|
||||
};
|
||||
};
|
||||
python = {
|
||||
formatter = {
|
||||
command = "ruff";
|
||||
args = [
|
||||
"format"
|
||||
"-s"
|
||||
"--line-length"
|
||||
"88"
|
||||
"-"
|
||||
html = {
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"html"
|
||||
];
|
||||
};
|
||||
language-servers = [
|
||||
"vscode-html-language-server"
|
||||
];
|
||||
};
|
||||
language-servers = [
|
||||
"pyright"
|
||||
"ruff"
|
||||
"ty"
|
||||
];
|
||||
};
|
||||
go = {
|
||||
formatter = {
|
||||
command = "goimports";
|
||||
};
|
||||
};
|
||||
awk = {
|
||||
formatter = {
|
||||
command = "awk";
|
||||
timeout = 5;
|
||||
args = [
|
||||
"--file=/dev/stdin"
|
||||
"--pretty-print=/dev/stdout"
|
||||
css = {
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"css"
|
||||
];
|
||||
};
|
||||
language-servers = [
|
||||
"vscode-css-language-server"
|
||||
];
|
||||
};
|
||||
};
|
||||
fish = {
|
||||
language-servers = [
|
||||
"fish-lsp"
|
||||
];
|
||||
};
|
||||
yaml = {
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"yaml"
|
||||
toml = {
|
||||
formatter = {
|
||||
command = "taplo";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
];
|
||||
};
|
||||
};
|
||||
markdown = {
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"md"
|
||||
];
|
||||
};
|
||||
};
|
||||
json = {
|
||||
language-servers = [
|
||||
"vscode-json-language-server"
|
||||
];
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"json"
|
||||
];
|
||||
};
|
||||
};
|
||||
jsonc = {
|
||||
language-servers = [
|
||||
"vscode-json-language-server"
|
||||
];
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"jsonc"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
html = {
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"html"
|
||||
];
|
||||
};
|
||||
language-servers = [
|
||||
"vscode-html-language-server"
|
||||
];
|
||||
};
|
||||
css = {
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"css"
|
||||
];
|
||||
};
|
||||
language-servers = [
|
||||
"vscode-css-language-server"
|
||||
];
|
||||
};
|
||||
toml = {
|
||||
formatter = {
|
||||
command = "taplo";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
];
|
||||
};
|
||||
};
|
||||
markdown = {
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"md"
|
||||
];
|
||||
};
|
||||
};
|
||||
json = {
|
||||
language-servers = [
|
||||
"vscode-json-language-server"
|
||||
];
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"json"
|
||||
];
|
||||
};
|
||||
};
|
||||
jsonc = {
|
||||
language-servers = [
|
||||
"vscode-json-language-server"
|
||||
];
|
||||
formatter = {
|
||||
command = "deno";
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
"--ext"
|
||||
"jsonc"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.ion;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.ion = {
|
||||
enable = lib.mkEnableOption "ion";
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.jujutsu;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.jujutsu = {
|
||||
enable = lib.mkEnableOption "jujutsu";
|
||||
|
|
@ -26,7 +28,7 @@ in {
|
|||
};
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = ''youthlic'';
|
||||
example = "youthlic";
|
||||
description = ''
|
||||
jujutsu name
|
||||
'';
|
||||
|
|
@ -43,10 +45,27 @@ in {
|
|||
settings = {
|
||||
"$schema" = "https://jj-vcs.github.io/jj/latest/config-schema.json";
|
||||
aliases = {
|
||||
dlog = ["log" "-r"];
|
||||
l = ["log" "-r" "(trunk()..@):: | (trunk()..@)-"];
|
||||
fresh = ["new" "trunk()"];
|
||||
tug = ["bookmark" "move" "--from" "closest_bookmark(@)" "--to" "closest_pushable(@)"];
|
||||
dlog = [
|
||||
"log"
|
||||
"-r"
|
||||
];
|
||||
l = [
|
||||
"log"
|
||||
"-r"
|
||||
"(trunk()..@):: | (trunk()..@)-"
|
||||
];
|
||||
fresh = [
|
||||
"new"
|
||||
"trunk()"
|
||||
];
|
||||
tug = [
|
||||
"bookmark"
|
||||
"move"
|
||||
"--from"
|
||||
"closest_bookmark(@)"
|
||||
"--to"
|
||||
"closest_pushable(@)"
|
||||
];
|
||||
};
|
||||
snapshot = {
|
||||
auto-track = "true";
|
||||
|
|
@ -84,7 +103,8 @@ in {
|
|||
};
|
||||
revset-aliases = {
|
||||
"closest_bookmark(to)" = "heads(::to & bookmarks())";
|
||||
"closest_pushable(to)" = "heads(::to & mutable() & ~description(exact:\"\") & (~empty() | merges()))";
|
||||
"closest_pushable(to)" =
|
||||
"heads(::to & mutable() & ~description(exact:\"\") & (~empty() | merges()))";
|
||||
"desc(x)" = "description(x)";
|
||||
"pending()" = ".. ~ ::tags() ~ ::remote_bookmarks() ~ @ ~ private()";
|
||||
"private()" = ''
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.kvm;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.kvm = {
|
||||
enable = lib.mkEnableOption "kvm";
|
||||
|
|
@ -14,8 +16,8 @@ in {
|
|||
dconf = {
|
||||
settings = {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
autoconnect = [ "qemu:///system" ];
|
||||
uris = [ "qemu:///system" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.radicle;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.radicle = {
|
||||
enable = lib.mkEnableOption "radicle";
|
||||
|
|
@ -59,14 +61,14 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
sops.secrets."radicle/Tytonidae" = {};
|
||||
sops.secrets."radicle/Tytonidae" = { };
|
||||
services.radicle.node = {
|
||||
enable = true;
|
||||
args = "--log-logger systemd";
|
||||
};
|
||||
systemd.user.services."radicle-node" = {
|
||||
Unit.After = ["default.target"];
|
||||
Service.EnvironmentFile = [config.sops.secrets."radicle/Tytonidae".path];
|
||||
Unit.After = [ "default.target" ];
|
||||
Service.EnvironmentFile = [ config.sops.secrets."radicle/Tytonidae".path ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,20 +3,22 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.rustypaste-cli;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.rustypaste-cli = {
|
||||
enable = lib.mkEnableOption "rustypaste-cli";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [pkgs.rustypaste-cli];
|
||||
home.packages = [ pkgs.rustypaste-cli ];
|
||||
sops = {
|
||||
secrets = {
|
||||
"rustypaste/auth" = {};
|
||||
"rustypaste/delete" = {};
|
||||
"rustypaste/auth" = { };
|
||||
"rustypaste/delete" = { };
|
||||
};
|
||||
templates."rustypaste-config.toml" = {
|
||||
path = "${config.xdg.configHome}/rustypaste/config.toml";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
pkgs,
|
||||
rootPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.sops = {
|
||||
enable = lib.mkOption {
|
||||
|
|
@ -24,12 +25,14 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
config = let
|
||||
cfg = config.youthlic.programs.sops;
|
||||
in
|
||||
config =
|
||||
let
|
||||
cfg = config.youthlic.programs.sops;
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
home.packages = (
|
||||
with pkgs; [
|
||||
with pkgs;
|
||||
[
|
||||
sops
|
||||
age
|
||||
]
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.spotifyd;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.spotifyd = {
|
||||
enable = lib.mkEnableOption "spotifyd";
|
||||
|
|
|
|||
|
|
@ -2,12 +2,14 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.starship;
|
||||
fish-cfg = config.youthlic.programs.fish;
|
||||
bash-cfg = config.youthlic.programs.bash;
|
||||
ion-cfg = config.youthlic.programs.ion;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.starship = {
|
||||
enable = lib.mkEnableOption "starship";
|
||||
|
|
@ -18,9 +20,10 @@ in {
|
|||
programs.starship = {
|
||||
enable = true;
|
||||
enableTransience = true;
|
||||
settings = let
|
||||
config-file = builtins.readFile ./config.toml;
|
||||
in
|
||||
settings =
|
||||
let
|
||||
config-file = builtins.readFile ./config.toml;
|
||||
in
|
||||
builtins.fromTOML config-file;
|
||||
};
|
||||
})
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.yazi;
|
||||
fish-cfg = config.youthlic.programs.fish;
|
||||
bash-cfg = config.youthlic.programs.bash;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.yazi = {
|
||||
enable = lib.mkEnableOption "yazi";
|
||||
|
|
@ -22,8 +24,7 @@ in {
|
|||
enable = true;
|
||||
shellWrapperName = "y";
|
||||
plugins = {
|
||||
inherit
|
||||
(pkgs.yaziPlugins)
|
||||
inherit (pkgs.yaziPlugins)
|
||||
ouch
|
||||
starship
|
||||
piper
|
||||
|
|
@ -81,7 +82,7 @@ in {
|
|||
desc = "Chmod on selected files";
|
||||
}
|
||||
{
|
||||
on = ["l"];
|
||||
on = [ "l" ];
|
||||
run = "plugin smart-enter";
|
||||
desc = "Enter the child directory, or open the file";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,13 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.zoxide;
|
||||
fish-cfg = config.youthlic.programs.fish;
|
||||
bash-cfg = config.youthlic.programs.bash;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.zoxide = {
|
||||
enable = lib.mkEnableOption "zoxide";
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.xdg-dirs;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.xdg-dirs = {
|
||||
enable = lib.mkEnableOption "xdg-dirs";
|
||||
|
|
|
|||
|
|
@ -1,39 +1,38 @@
|
|||
final: _prev: {
|
||||
youthlic = {
|
||||
loadImports' = dir: f:
|
||||
loadImports' =
|
||||
dir: f:
|
||||
final.pipe dir [
|
||||
final.youthlic.loadImports
|
||||
f
|
||||
];
|
||||
loadImports = dir:
|
||||
loadImports =
|
||||
dir:
|
||||
with final;
|
||||
if !(pathExists dir && builtins.readFileType dir == "directory")
|
||||
then []
|
||||
else let
|
||||
if !(pathExists dir && builtins.readFileType dir == "directory") then
|
||||
[ ]
|
||||
else
|
||||
let
|
||||
items = pipe dir [
|
||||
builtins.readDir
|
||||
attrNames
|
||||
];
|
||||
in
|
||||
pipe items [
|
||||
(concatMap (
|
||||
name: let
|
||||
path = dir + "/${name}";
|
||||
type = builtins.readFileType path;
|
||||
in
|
||||
if type == "directory"
|
||||
then
|
||||
if pathExists (path + "/default.nix")
|
||||
then [path]
|
||||
else youthlic.loadImports path
|
||||
else if type == "regular"
|
||||
then
|
||||
if hasSuffix ".nix" name
|
||||
then [path]
|
||||
else []
|
||||
else []
|
||||
))
|
||||
(filter (name: !hasSuffix "/default.nix" (toString name)))
|
||||
];
|
||||
pipe items [
|
||||
(concatMap (
|
||||
name:
|
||||
let
|
||||
path = dir + "/${name}";
|
||||
type = builtins.readFileType path;
|
||||
in
|
||||
if type == "directory" then
|
||||
if pathExists (path + "/default.nix") then [ path ] else youthlic.loadImports path
|
||||
else if type == "regular" then
|
||||
if hasSuffix ".nix" name then [ path ] else [ ]
|
||||
else
|
||||
[ ]
|
||||
))
|
||||
(filter (name: !hasSuffix "/default.nix" (toString name)))
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
lib,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports =
|
||||
(with inputs.nixos-hardware.nixosModules; [
|
||||
common-cpu-intel
|
||||
|
|
@ -70,11 +71,11 @@
|
|||
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
kernelParams = ["i915.enable_guc=2"];
|
||||
kernelParams = [ "i915.enable_guc=2" ];
|
||||
};
|
||||
nix = {
|
||||
settings = {
|
||||
system-features = ["gccarch-skylake"];
|
||||
system-features = [ "gccarch-skylake" ];
|
||||
};
|
||||
};
|
||||
hardware = {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
];
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"@root" = {
|
||||
mountpoint = "/";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{...}: {
|
||||
{ ... }: {
|
||||
youthlic.gui = {
|
||||
enabled = "niri";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
|
@ -20,9 +21,9 @@
|
|||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{...}: {
|
||||
{ ... }: {
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
wait-online.enable = false;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
pkgs,
|
||||
rootPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = rootPath + "/assets/wallpaper/01.png";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
users = {
|
||||
mutableUsers = true;
|
||||
users.david = {
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
lib,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
outputs.nixosModules.default
|
||||
]
|
||||
++ (lib.youthlic.loadImports ./.);
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
outputs.nixosModules.default
|
||||
]
|
||||
++ (lib.youthlic.loadImports ./.);
|
||||
|
||||
youthlic = {
|
||||
home-manager = {
|
||||
|
|
@ -76,7 +76,7 @@
|
|||
};
|
||||
nix = {
|
||||
settings = {
|
||||
system-features = ["gccarch-ivybridge"];
|
||||
system-features = [ "gccarch-ivybridge" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"@root" = {
|
||||
mountpoint = "/";
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
{config, ...}: {
|
||||
{ config, ... }: {
|
||||
youthlic.containers.forgejo = {
|
||||
enable = true;
|
||||
domain = "forgejo.youthlic.social";
|
||||
sshPort = 2222;
|
||||
httpPort = 8480;
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [2222];
|
||||
networking.firewall.allowedTCPPorts = [ 2222 ];
|
||||
services.caddy.virtualHosts = {
|
||||
"forgejo.${config.youthlic.programs.caddy.baseDomain}" = {
|
||||
extraConfig = ''
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
|
@ -19,9 +20,9 @@
|
|||
"sr_mod"
|
||||
"virtio_blk"
|
||||
];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{config, ...}: {
|
||||
{ config, ... }: {
|
||||
sops.secrets."miniflux" = {
|
||||
};
|
||||
youthlic.containers.miniflux = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{...}: {
|
||||
{ ... }: {
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
wait-online.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{config, ...}: {
|
||||
sops.secrets."ssh-private-key/radicle/Cape" = {};
|
||||
{ config, ... }: {
|
||||
sops.secrets."ssh-private-key/radicle/Cape" = { };
|
||||
youthlic.programs.radicle = {
|
||||
enable = true;
|
||||
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBbQrJNWcWsFncTX4w/hkhz6zPNwHrTjA+6lnq5dmu/s radicle";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{...}: {
|
||||
{ ... }: {
|
||||
stylix = {
|
||||
enable = false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }: {
|
||||
users.users.alice = {
|
||||
initialHashedPassword = "$y$j9T$eS5zCi4W.4IPpf3P8Tb/o1$xhumXY1.PJKmTguNi/zlljLbLemNGiubWoUEc878S36";
|
||||
isNormalUser = true;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
outputs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports =
|
||||
(with inputs.nixos-hardware.nixosModules; [
|
||||
common-hidpi
|
||||
|
|
@ -18,7 +19,7 @@
|
|||
++ (with outputs; [
|
||||
nixosModules.gui
|
||||
])
|
||||
++ [inputs.lanzaboote.nixosModules.lanzaboote]
|
||||
++ [ inputs.lanzaboote.nixosModules.lanzaboote ]
|
||||
++ (lib.youthlic.loadImports ./.);
|
||||
|
||||
youthlic = {
|
||||
|
|
@ -43,19 +44,21 @@
|
|||
programs = {
|
||||
miniserve = {
|
||||
enable = true;
|
||||
apps = let
|
||||
cinny-template = config.youthlic.programs.miniserve.templates.cinny;
|
||||
in {
|
||||
cinny-1 = cinny-template {
|
||||
port = 9093;
|
||||
apps =
|
||||
let
|
||||
cinny-template = config.youthlic.programs.miniserve.templates.cinny;
|
||||
in
|
||||
{
|
||||
cinny-1 = cinny-template {
|
||||
port = 9093;
|
||||
};
|
||||
cinny-2 = cinny-template {
|
||||
port = 9094;
|
||||
};
|
||||
cinny-3 = cinny-template {
|
||||
port = 9095;
|
||||
};
|
||||
};
|
||||
cinny-2 = cinny-template {
|
||||
port = 9094;
|
||||
};
|
||||
cinny-3 = cinny-template {
|
||||
port = 9095;
|
||||
};
|
||||
};
|
||||
};
|
||||
bash.enable = true;
|
||||
guix.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{...}: {
|
||||
{ ... }: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
disk1 = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{...}: {
|
||||
{ ... }: {
|
||||
youthlic.gui = {
|
||||
enabled = "niri";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
|
@ -19,9 +20,9 @@
|
|||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -3,29 +3,30 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
virtualisation.libvirtd.hooks.qemu = {
|
||||
"dynamic-cpu-isolation" =
|
||||
pkgs.writeShellScript "dynamic-cpu-isolation.sh"
|
||||
#bash
|
||||
''
|
||||
VM_NAME="$1"
|
||||
ACTION="$2"
|
||||
#bash
|
||||
''
|
||||
VM_NAME="$1"
|
||||
ACTION="$2"
|
||||
|
||||
if [ "$VM_NAME" != "win11" ]; then
|
||||
exit 0
|
||||
fi
|
||||
if [ "$VM_NAME" != "win11" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$ACTION" == "prepare" ]; then
|
||||
${lib.getExe' pkgs.systemd "systemctl"} set-property --runtime -- system.slice AllowedCPUs=0-1,12-19
|
||||
${lib.getExe' pkgs.systemd "systemctl"} set-property --runtime -- user.slice AllowedCPUs=0-1,12-19
|
||||
${lib.getExe' pkgs.systemd "systemctl"} set-property --runtime -- init.scope AllowedCPUs=0-1,12-19
|
||||
elif [ "$ACTION" == "release" ]; then
|
||||
${lib.getExe' pkgs.systemd "systemctl"} set-property --runtime -- system.slice AllowedCPUs=0-19
|
||||
${lib.getExe' pkgs.systemd "systemctl"} set-property --runtime -- user.slice AllowedCPUs=0-19
|
||||
${lib.getExe' pkgs.systemd "systemctl"} set-property --runtime -- init.scope AllowedCPUs=0-19
|
||||
fi
|
||||
'';
|
||||
if [ "$ACTION" == "prepare" ]; then
|
||||
${lib.getExe' pkgs.systemd "systemctl"} set-property --runtime -- system.slice AllowedCPUs=0-1,12-19
|
||||
${lib.getExe' pkgs.systemd "systemctl"} set-property --runtime -- user.slice AllowedCPUs=0-1,12-19
|
||||
${lib.getExe' pkgs.systemd "systemctl"} set-property --runtime -- init.scope AllowedCPUs=0-1,12-19
|
||||
elif [ "$ACTION" == "release" ]; then
|
||||
${lib.getExe' pkgs.systemd "systemctl"} set-property --runtime -- system.slice AllowedCPUs=0-19
|
||||
${lib.getExe' pkgs.systemd "systemctl"} set-property --runtime -- user.slice AllowedCPUs=0-19
|
||||
${lib.getExe' pkgs.systemd "systemctl"} set-property --runtime -- init.scope AllowedCPUs=0-19
|
||||
fi
|
||||
'';
|
||||
};
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
services = {
|
||||
|
|
@ -39,13 +40,13 @@
|
|||
};
|
||||
nix = {
|
||||
settings = {
|
||||
system-features = ["gccarch-alderlake"];
|
||||
system-features = [ "gccarch-alderlake" ];
|
||||
};
|
||||
};
|
||||
hardware = {
|
||||
openrazer = {
|
||||
enable = true;
|
||||
users = ["david"];
|
||||
users = [ "david" ];
|
||||
};
|
||||
graphics.package = pkgs.mesa;
|
||||
intelgpu = {
|
||||
|
|
@ -66,7 +67,7 @@
|
|||
# };
|
||||
};
|
||||
boot = {
|
||||
extraModulePackages = with config.boot.kernelPackages; [ddcci-driver];
|
||||
extraModulePackages = with config.boot.kernelPackages; [ ddcci-driver ];
|
||||
kernelParams = [
|
||||
"intel_iommu=on"
|
||||
"iommu=pt"
|
||||
|
|
@ -106,36 +107,38 @@
|
|||
};
|
||||
systemd.services."ddcci@" = {
|
||||
description = "ddcci handler";
|
||||
after = ["graphical.target"];
|
||||
before = ["shutdown.target"];
|
||||
conflicts = ["shutdown.target"];
|
||||
after = [ "graphical.target" ];
|
||||
before = [ "shutdown.target" ];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = let
|
||||
script = pkgs.writeShellApplication {
|
||||
name = "ddcci-handler";
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils
|
||||
ddcutil
|
||||
];
|
||||
text = ''
|
||||
echo Trying to attach ddcci to "$1"
|
||||
success=0
|
||||
i=0
|
||||
id=$(echo "$1" | cut -d "-" -f 2)
|
||||
while ((success < 1)) && ((i++ < 5)); do
|
||||
if ddcutil getvcp 10 -b "$id"; then
|
||||
if echo ddcci 0x37 > "/sys/bus/i2c/devices/$1/new_device"; then
|
||||
success=1
|
||||
echo ddcci attached to "$1"
|
||||
ExecStart =
|
||||
let
|
||||
script = pkgs.writeShellApplication {
|
||||
name = "ddcci-handler";
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils
|
||||
ddcutil
|
||||
];
|
||||
text = ''
|
||||
echo Trying to attach ddcci to "$1"
|
||||
success=0
|
||||
i=0
|
||||
id=$(echo "$1" | cut -d "-" -f 2)
|
||||
while ((success < 1)) && ((i++ < 5)); do
|
||||
if ddcutil getvcp 10 -b "$id"; then
|
||||
if echo ddcci 0x37 > "/sys/bus/i2c/devices/$1/new_device"; then
|
||||
success=1
|
||||
echo ddcci attached to "$1"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
echo "Try $i"
|
||||
sleep 1;
|
||||
done
|
||||
'';
|
||||
};
|
||||
in "${lib.getExe' script "ddcci-handler"} %i";
|
||||
echo "Try $i"
|
||||
sleep 1;
|
||||
done
|
||||
'';
|
||||
};
|
||||
in
|
||||
"${lib.getExe' script "ddcci-handler"} %i";
|
||||
};
|
||||
};
|
||||
services.udev.extraRules = ''
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }: {
|
||||
youthlic.programs.kanata.enable = true;
|
||||
services = {
|
||||
udev.extraRules = ''
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{...}: {
|
||||
{ ... }: {
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
wait-online.enable = false;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }: {
|
||||
config.specialisation.cosmic = {
|
||||
inheritParentConfig = true;
|
||||
configuration = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }: {
|
||||
config.specialisation.kde = {
|
||||
inheritParentConfig = true;
|
||||
configuration = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{inputs, ...}: {
|
||||
{ inputs, ... }: {
|
||||
# config.specialisation.niri-dgpu = {
|
||||
# inheritParentConfig = true;
|
||||
# configuration = {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
pkgs,
|
||||
rootPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = rootPath + "/assets/wallpaper/01.png";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
users.users.david = {
|
||||
initialHashedPassword = "$y$j9T$eS5zCi4W.4IPpf3P8Tb/o1$xhumXY1.PJKmTguNi/zlljLbLemNGiubWoUEc878S36";
|
||||
isNormalUser = true;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.containers;
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = lib.youthlic.loadImports ./.;
|
||||
options = {
|
||||
youthlic.containers = {
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.containers.forgejo;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.containers.forgejo = {
|
||||
enable = lib.mkEnableOption "forgejo container";
|
||||
|
|
@ -54,7 +56,7 @@ in {
|
|||
}
|
||||
];
|
||||
|
||||
config = {lib, ...}: {
|
||||
config = { lib, ... }: {
|
||||
imports = [
|
||||
./../programs/forgejo.nix
|
||||
./../programs/postgresql.nix
|
||||
|
|
@ -86,10 +88,10 @@ in {
|
|||
};
|
||||
|
||||
systemd.services.forgejo = {
|
||||
wants = ["postgresql.service"];
|
||||
requires = ["postgresql.service"];
|
||||
after = ["postgresql.service"];
|
||||
wantedBy = ["default.target"];
|
||||
wants = [ "postgresql.service" ];
|
||||
requires = [ "postgresql.service" ];
|
||||
after = [ "postgresql.service" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
networking = {
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.containers.miniflux;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.containers.miniflux = {
|
||||
enable = lib.mkEnableOption "miniflux container";
|
||||
|
|
@ -36,7 +38,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
config = {lib, ...}: {
|
||||
config = { lib, ... }: {
|
||||
imports = [
|
||||
./../programs/miniflux.nix
|
||||
./../programs/postgresql.nix
|
||||
|
|
@ -67,18 +69,18 @@ in {
|
|||
};
|
||||
|
||||
systemd.services.miniflux = {
|
||||
wants = ["postgresql.service"];
|
||||
requires = ["postgresql.service"];
|
||||
after = ["postgresql.service"];
|
||||
wantedBy = ["default.target"];
|
||||
wants = [ "postgresql.service" ];
|
||||
requires = [ "postgresql.service" ];
|
||||
after = [ "postgresql.service" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
networking = {
|
||||
defaultGateway = "192.168.111.1";
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [8485];
|
||||
allowedUDPPorts = [8485];
|
||||
allowedTCPPorts = [ 8485 ];
|
||||
allowedUDPPorts = [ 8485 ];
|
||||
};
|
||||
useHostResolvConf = lib.mkForce false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{lib, ...}: {
|
||||
imports = with lib;
|
||||
{ lib, ... }: {
|
||||
imports =
|
||||
with lib;
|
||||
youthlic.loadImports' ./. (filter (name: !hasSuffix "/top-level" (toString name)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.users.deploy;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.users.deploy = {
|
||||
enable = lib.mkEnableOption "deploy";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }: {
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
man-pages
|
||||
man-pages-posix
|
||||
;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.gui;
|
||||
in {
|
||||
in
|
||||
{
|
||||
config = lib.mkIf (cfg.enabled == "cosmic") {
|
||||
services = {
|
||||
desktopManager.cosmic = {
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@
|
|||
pkgs,
|
||||
rootPath,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.gui;
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = with lib; youthlic.loadImports ./.;
|
||||
options = {
|
||||
youthlic.gui = {
|
||||
|
|
@ -28,8 +30,9 @@ in {
|
|||
fontconfig
|
||||
];
|
||||
|
||||
sops.secrets = with lib;
|
||||
with builtins;
|
||||
sops.secrets =
|
||||
with lib;
|
||||
with builtins;
|
||||
pipe (rootPath + "/secrets/dummy_font") [
|
||||
readDir
|
||||
attrNames
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.gui;
|
||||
in {
|
||||
in
|
||||
{
|
||||
config = lib.mkIf (cfg.enabled == "kde") {
|
||||
services = {
|
||||
desktopManager.plasma6.enable = true;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.gui;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.gui.niri = {
|
||||
};
|
||||
|
|
@ -14,10 +16,11 @@ in {
|
|||
# Enabled to support trash of nautilus
|
||||
services.gvfs.enable = true;
|
||||
|
||||
systemd.user.services.niri-flake-polkit.serviceConfig.ExecStart = lib.mkForce "${pkgs.mate-polkit}/libexec/polkit-mate-authentication-agent-1";
|
||||
systemd.user.services.niri-flake-polkit.serviceConfig.ExecStart =
|
||||
lib.mkForce "${pkgs.mate-polkit}/libexec/polkit-mate-authentication-agent-1";
|
||||
|
||||
environment = {
|
||||
pathsToLink = ["share/thumbnailers"];
|
||||
pathsToLink = [ "share/thumbnailers" ];
|
||||
systemPackages = with pkgs; [
|
||||
nautilus
|
||||
nautilus-open-any-terminal
|
||||
|
|
@ -38,45 +41,47 @@ in {
|
|||
terminal-exec = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default = ["com.mitchellh.ghostty.desktop"];
|
||||
default = [ "com.mitchellh.ghostty.desktop" ];
|
||||
};
|
||||
};
|
||||
mime = let
|
||||
browsers = [
|
||||
"zen-twilight.desktop"
|
||||
"chromium-browser.desktop"
|
||||
];
|
||||
in {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"application/pdf" = [
|
||||
"org.gnome.Evince.desktop"
|
||||
];
|
||||
"inode/directory" = [
|
||||
"org.gnome.Nautilus.desktop"
|
||||
];
|
||||
"text/html" = browsers;
|
||||
"x-scheme-handler/about" = browsers;
|
||||
"x-scheme-handler/ftp" = browsers;
|
||||
"x-scheme-handler/http" = browsers;
|
||||
"x-scheme-handler/https" = browsers;
|
||||
"x-scheme-handler/mailto" = browsers;
|
||||
"x-scheme-handler/tg" = ["telegramdesktop.desktop"];
|
||||
"x-scheme-handler/unknown" = browsers;
|
||||
"image/gif" = [
|
||||
"swayimg.desktop"
|
||||
];
|
||||
"image/jpeg" = [
|
||||
"swayimg.desktop"
|
||||
];
|
||||
"image/png" = [
|
||||
"swayimg.desktop"
|
||||
];
|
||||
"image/webp" = [
|
||||
"swayimg.desktop"
|
||||
mime =
|
||||
let
|
||||
browsers = [
|
||||
"zen-twilight.desktop"
|
||||
"chromium-browser.desktop"
|
||||
];
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"application/pdf" = [
|
||||
"org.gnome.Evince.desktop"
|
||||
];
|
||||
"inode/directory" = [
|
||||
"org.gnome.Nautilus.desktop"
|
||||
];
|
||||
"text/html" = browsers;
|
||||
"x-scheme-handler/about" = browsers;
|
||||
"x-scheme-handler/ftp" = browsers;
|
||||
"x-scheme-handler/http" = browsers;
|
||||
"x-scheme-handler/https" = browsers;
|
||||
"x-scheme-handler/mailto" = browsers;
|
||||
"x-scheme-handler/tg" = [ "telegramdesktop.desktop" ];
|
||||
"x-scheme-handler/unknown" = browsers;
|
||||
"image/gif" = [
|
||||
"swayimg.desktop"
|
||||
];
|
||||
"image/jpeg" = [
|
||||
"swayimg.desktop"
|
||||
];
|
||||
"image/png" = [
|
||||
"swayimg.desktop"
|
||||
];
|
||||
"image/webp" = [
|
||||
"swayimg.desktop"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue