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