mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2026-09-20 00:59:04 +05:30
Compare commits
6 Commits
49a341d6b3
...
bd977c0941
| Author | SHA1 | Date | |
|---|---|---|---|
|
bd977c0941
|
|||
|
e6ffe8698f
|
|||
|
ac3a0404bc
|
|||
|
cba375a888
|
|||
|
acb825e1db
|
|||
|
344d8bdd4a
|
@@ -1,13 +1,14 @@
|
|||||||
{ inputs, config, ... }:
|
|
||||||
{
|
|
||||||
flake.modules.nixOnDroid.core =
|
|
||||||
{
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.modules.nixOnDroid.core = {
|
||||||
hostName,
|
hostName,
|
||||||
userName,
|
userName,
|
||||||
userEmail,
|
userEmail,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
backupFileExtension = "bak";
|
backupFileExtension = "bak";
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixOnDroid.networking =
|
flake.modules.nixOnDroid.networking = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
# utility functions
|
# utility functions
|
||||||
concatLines = list: builtins.concatStringsSep "\n" list;
|
concatLines = list: builtins.concatStringsSep "\n" list;
|
||||||
|
|
||||||
@@ -57,8 +55,7 @@
|
|||||||
-f "/etc/${configPath}" \
|
-f "/etc/${configPath}" \
|
||||||
-D # don't detach into a daemon process
|
-D # don't detach into a daemon process
|
||||||
'';
|
'';
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.networking.openssh = {
|
options.tnix.networking.openssh = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption ''
|
||||||
Whether to enable the OpenSSH secure shell daemon, which
|
Whether to enable the OpenSSH secure shell daemon, which
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
|
||||||
imports = [inputs.flake-parts.flakeModules.modules];
|
imports = [inputs.flake-parts.flakeModules.modules];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,18 +3,17 @@
|
|||||||
inputs,
|
inputs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
mkNixOSHost = hostName: {
|
||||||
mkNixOSHost =
|
|
||||||
hostName:
|
|
||||||
{
|
|
||||||
userName ? "tux",
|
userName ? "tux",
|
||||||
userEmail ? "t@tux.rs",
|
userEmail ? "t@tux.rs",
|
||||||
system ? "x86_64-linux",
|
system ? "x86_64-linux",
|
||||||
unstable ? true,
|
unstable ? true,
|
||||||
}:
|
}: let
|
||||||
let
|
nixpkgs =
|
||||||
nixpkgs = if unstable then inputs.nixpkgs else inputs.nixpkgs-stable;
|
if unstable
|
||||||
|
then inputs.nixpkgs
|
||||||
|
else inputs.nixpkgs-stable;
|
||||||
in
|
in
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
@@ -32,16 +31,16 @@ let
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mkDroidHost =
|
mkDroidHost = hostName: {
|
||||||
hostName:
|
|
||||||
{
|
|
||||||
userName ? "nix-on-droid",
|
userName ? "nix-on-droid",
|
||||||
userEmail ? "t@tux.rs",
|
userEmail ? "t@tux.rs",
|
||||||
system ? "aarch64-linux",
|
system ? "aarch64-linux",
|
||||||
unstable ? true,
|
unstable ? true,
|
||||||
}:
|
}: let
|
||||||
let
|
nixpkgs =
|
||||||
nixpkgs = if unstable then inputs.nixpkgs else inputs.nixpkgs-stable;
|
if unstable
|
||||||
|
then inputs.nixpkgs
|
||||||
|
else inputs.nixpkgs-stable;
|
||||||
in
|
in
|
||||||
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
@@ -65,12 +64,7 @@ let
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mkNixOSNode =
|
mkNixOSNode = hostName: {system ? "x86_64-linux"}: {
|
||||||
hostName:
|
|
||||||
{
|
|
||||||
system ? "x86_64-linux",
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
hostname = hostName;
|
hostname = hostName;
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
user = "root";
|
user = "root";
|
||||||
@@ -78,17 +72,11 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
activateNixOnDroid =
|
activateNixOnDroid = system: configuration:
|
||||||
system: configuration:
|
|
||||||
inputs.deploy-rs.lib.${system}.activate.custom configuration.activationPackage
|
inputs.deploy-rs.lib.${system}.activate.custom configuration.activationPackage
|
||||||
"${configuration.activationPackage}/activate";
|
"${configuration.activationPackage}/activate";
|
||||||
|
|
||||||
mkDroidNode =
|
mkDroidNode = hostName: {system ? "aarch64-linux"}: {
|
||||||
hostName:
|
|
||||||
{
|
|
||||||
system ? "aarch64-linux",
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
hostname = hostName;
|
hostname = hostName;
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
sshUser = "nix-on-droid";
|
sshUser = "nix-on-droid";
|
||||||
@@ -101,9 +89,7 @@ let
|
|||||||
path = activateNixOnDroid system self.nixOnDroidConfigurations.${hostName};
|
path = activateNixOnDroid system self.nixOnDroidConfigurations.${hostName};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
flake = {
|
flake = {
|
||||||
nixosConfigurations = builtins.mapAttrs mkNixOSHost {
|
nixosConfigurations = builtins.mapAttrs mkNixOSHost {
|
||||||
sirius = {};
|
sirius = {};
|
||||||
@@ -123,8 +109,10 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
perSystem = {
|
perSystem = {
|
||||||
checks = builtins.mapAttrs (
|
checks =
|
||||||
|
builtins.mapAttrs (
|
||||||
_: hostConfig: hostConfig.config.system.build.toplevel
|
_: hostConfig: hostConfig.config.system.build.toplevel
|
||||||
) self.nixosConfigurations;
|
)
|
||||||
|
self.nixosConfigurations;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{inputs, ...}: {
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
flake.overlays = {
|
flake.overlays = {
|
||||||
modifications = final: prev: {
|
modifications = final: prev: {
|
||||||
tnvim = inputs.tnvim.packages.${prev.stdenv.hostPlatform.system}.default;
|
tnvim = inputs.tnvim.packages.${prev.stdenv.hostPlatform.system}.default;
|
||||||
@@ -31,9 +27,7 @@
|
|||||||
copyparty = inputs.copyparty.overlays.default;
|
copyparty = inputs.copyparty.overlays.default;
|
||||||
};
|
};
|
||||||
|
|
||||||
perSystem =
|
perSystem = {system, ...}: {
|
||||||
{ system, ... }:
|
|
||||||
{
|
|
||||||
_module.args.pkgs = import inputs.nixpkgs {
|
_module.args.pkgs = import inputs.nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = builtins.attrValues inputs.self.overlays;
|
overlays = builtins.attrValues inputs.self.overlays;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.treefmt-nix.flakeModule
|
inputs.treefmt-nix.flakeModule
|
||||||
];
|
];
|
||||||
@@ -9,7 +8,7 @@
|
|||||||
projectRootFile = "flake.nix";
|
projectRootFile = "flake.nix";
|
||||||
flakeCheck = true;
|
flakeCheck = true;
|
||||||
programs = {
|
programs = {
|
||||||
nixfmt.enable = true;
|
alejandra.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.core =
|
flake.modules.homeManager.core = {userName, ...}: {
|
||||||
{ userName, ... }:
|
|
||||||
{
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
systemd.user.startServices = "sd-switch";
|
systemd.user.startServices = "sd-switch";
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
flake.modules.homeManager.core = {
|
||||||
flake.modules.homeManager.core =
|
|
||||||
{
|
|
||||||
lib,
|
lib,
|
||||||
osConfig ? {},
|
osConfig ? {},
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
nixpkgs = lib.mkIf (!(osConfig.home-manager.useGlobalPkgs or false)) {
|
nixpkgs = lib.mkIf (!(osConfig.home-manager.useGlobalPkgs or false)) {
|
||||||
config = {
|
config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.desktop =
|
flake.modules.homeManager.desktop = {
|
||||||
{
|
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
configDir = "${config.xdg.configHome}/BraveSoftware/Brave-Browser";
|
configDir = "${config.xdg.configHome}/BraveSoftware/Brave-Browser";
|
||||||
|
|
||||||
extensionJson = ext: {
|
extensionJson = ext: {
|
||||||
@@ -22,8 +20,7 @@
|
|||||||
{id = "bfnaelmomeimhlpmgjnjophhpkkoljpa";} # Phantom
|
{id = "bfnaelmomeimhlpmgjnjophhpkkoljpa";} # Phantom
|
||||||
{id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";} # DarkReader
|
{id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";} # DarkReader
|
||||||
];
|
];
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
programs.chromium = {
|
programs.chromium = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.brave;
|
package = pkgs.brave;
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.desktop =
|
flake.modules.homeManager.desktop = {
|
||||||
{ inputs, userName, ... }:
|
inputs,
|
||||||
{
|
userName,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixcord.homeModules.nixcord
|
inputs.nixcord.homeModules.nixcord
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.desktop =
|
flake.modules.homeManager.desktop = {
|
||||||
{
|
|
||||||
pkgs,
|
pkgs,
|
||||||
userName,
|
userName,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.desktop =
|
flake.modules.homeManager.desktop = {
|
||||||
{ config, pkgs, ... }:
|
config,
|
||||||
{
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# TODO: Hyprland 0.55 switched to Lua-based configuration.
|
# TODO: Hyprland 0.55 switched to Lua-based configuration.
|
||||||
# HM module is updated but I'm too lazy at this point so we symlink our config instead.
|
# HM module is updated but I'm too lazy at this point so we symlink our config instead.
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
flake.modules.homeManager.desktop = {
|
||||||
flake.modules.homeManager.desktop =
|
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.services.lan-mouse;
|
cfg = config.tnix.services.lan-mouse;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [inputs.lan-mouse.homeManagerModules.default];
|
imports = [inputs.lan-mouse.homeManagerModules.default];
|
||||||
|
|
||||||
options.tnix.services.lan-mouse = {
|
options.tnix.services.lan-mouse = {
|
||||||
@@ -28,7 +24,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
programs.lan-mouse = {
|
programs.lan-mouse = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd = true;
|
systemd = true;
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
flake.modules.homeManager.desktop = {
|
||||||
flake.modules.homeManager.desktop =
|
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.desktop.mangowm;
|
cfg = config.tnix.desktop.mangowm;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.mango.hmModules.mango
|
inputs.mango.hmModules.mango
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.desktop =
|
flake.modules.homeManager.desktop = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
programs.mpv = {
|
programs.mpv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
scripts = (
|
scripts = (
|
||||||
with pkgs.mpvScripts;
|
with pkgs.mpvScripts; [
|
||||||
[
|
|
||||||
modernz
|
modernz
|
||||||
thumbfast
|
thumbfast
|
||||||
mpris
|
mpris
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.desktop =
|
flake.modules.homeManager.desktop = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.bibata-cursors;
|
package = pkgs.bibata-cursors;
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.desktop =
|
flake.modules.homeManager.desktop = {pkgs, ...}: {
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
programs.vicinae = {
|
programs.vicinae = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd = {
|
systemd = {
|
||||||
@@ -14,20 +9,16 @@
|
|||||||
useLayerShell = true;
|
useLayerShell = true;
|
||||||
|
|
||||||
extensions = with pkgs.vicinae-extensions; [
|
extensions = with pkgs.vicinae-extensions; [
|
||||||
# @TODO broken in upstream repo
|
|
||||||
# bluetooth
|
|
||||||
nix
|
nix
|
||||||
ssh
|
ssh
|
||||||
awww-switcher
|
awww-switcher
|
||||||
process-manager
|
process-manager
|
||||||
pulseaudio
|
pulseaudio
|
||||||
wifi-commander
|
|
||||||
port-killer
|
port-killer
|
||||||
silverbullet
|
|
||||||
];
|
];
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
close_on_focus_loss = true;
|
close_on_focus_loss = false;
|
||||||
consider_preedit = true;
|
consider_preedit = true;
|
||||||
pop_to_root_on_close = true;
|
pop_to_root_on_close = true;
|
||||||
favicon_service = "twenty";
|
favicon_service = "twenty";
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.desktop =
|
flake.modules.homeManager.desktop = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
programs.wezterm = {
|
programs.wezterm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.wezterm-git;
|
package = pkgs.wezterm-git;
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.shell =
|
flake.modules.homeManager.shell = {
|
||||||
{
|
|
||||||
userName,
|
userName,
|
||||||
userEmail,
|
userEmail,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
signing = {
|
signing = {
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.shell =
|
flake.modules.homeManager.shell = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
systemctl-tui
|
systemctl-tui
|
||||||
zip
|
zip
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.shell =
|
flake.modules.homeManager.shell = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/nvim" = {
|
".config/nvim" = {
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
|||||||
@@ -1,58 +1,47 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.shell =
|
flake.modules.homeManager.shell = {pkgs, ...}: let
|
||||||
{ pkgs, ... }:
|
|
||||||
let
|
|
||||||
bg = "default";
|
bg = "default";
|
||||||
fg = "default";
|
fg = "default";
|
||||||
bg2 = "brightblack";
|
bg2 = "brightblack";
|
||||||
fg2 = "white";
|
fg2 = "white";
|
||||||
color = c: "#{@${c}}";
|
color = c: "#{@${c}}";
|
||||||
|
|
||||||
indicator =
|
indicator = let
|
||||||
let
|
|
||||||
accent = color "indicator_color";
|
accent = color "indicator_color";
|
||||||
content = " ";
|
content = " ";
|
||||||
in
|
in "#[reverse,fg=${accent}]#{?client_prefix,${content},}";
|
||||||
"#[reverse,fg=${accent}]#{?client_prefix,${content},}";
|
|
||||||
|
|
||||||
current_window =
|
current_window = let
|
||||||
let
|
|
||||||
accent = color "main_accent";
|
accent = color "main_accent";
|
||||||
index = "#[reverse,fg=${accent},bg=${fg}] #I ";
|
index = "#[reverse,fg=${accent},bg=${fg}] #I ";
|
||||||
name = "#[fg=${bg2},bg=${fg2}] #W ";
|
name = "#[fg=${bg2},bg=${fg2}] #W ";
|
||||||
# flags = "#{?window_flags,#{window_flags}, }";
|
# flags = "#{?window_flags,#{window_flags}, }";
|
||||||
in
|
in "${index}${name}";
|
||||||
"${index}${name}";
|
|
||||||
|
|
||||||
window_status =
|
window_status = let
|
||||||
let
|
|
||||||
accent = color "window_color";
|
accent = color "window_color";
|
||||||
index = "#[reverse,fg=${accent},bg=${fg}] #I ";
|
index = "#[reverse,fg=${accent},bg=${fg}] #I ";
|
||||||
name = "#[fg=${bg2},bg=${fg2}] #W ";
|
name = "#[fg=${bg2},bg=${fg2}] #W ";
|
||||||
# flags = "#{?window_flags,#{window_flags}, }";
|
# flags = "#{?window_flags,#{window_flags}, }";
|
||||||
in
|
in "${index}${name}";
|
||||||
"${index}${name}";
|
|
||||||
|
|
||||||
battery =
|
battery = let
|
||||||
let
|
|
||||||
percentage = pkgs.writeShellScript "percentage" (
|
percentage = pkgs.writeShellScript "percentage" (
|
||||||
if pkgs.stdenv.isDarwin then
|
if pkgs.stdenv.isDarwin
|
||||||
''
|
then ''
|
||||||
echo $(pmset -g batt | grep -o "[0-9]\+%" | tr '%' ' ')
|
echo $(pmset -g batt | grep -o "[0-9]\+%" | tr '%' ' ')
|
||||||
''
|
''
|
||||||
else
|
else ''
|
||||||
''
|
|
||||||
path="/org/freedesktop/UPower/devices/DisplayDevice"
|
path="/org/freedesktop/UPower/devices/DisplayDevice"
|
||||||
echo $(${pkgs.upower}/bin/upower -i $path | grep -o "[0-9]\+%" | tr '%' ' ')
|
echo $(${pkgs.upower}/bin/upower -i $path | grep -o "[0-9]\+%" | tr '%' ' ')
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
state = pkgs.writeShellScript "state" (
|
state = pkgs.writeShellScript "state" (
|
||||||
if pkgs.stdenv.isDarwin then
|
if pkgs.stdenv.isDarwin
|
||||||
''
|
then ''
|
||||||
echo $(pmset -g batt | awk '{print $4}')
|
echo $(pmset -g batt | awk '{print $4}')
|
||||||
''
|
''
|
||||||
else
|
else ''
|
||||||
''
|
|
||||||
path="/org/freedesktop/UPower/devices/DisplayDevice"
|
path="/org/freedesktop/UPower/devices/DisplayDevice"
|
||||||
echo $(${pkgs.upower}/bin/upower -i $path | grep state | awk '{print $2}')
|
echo $(${pkgs.upower}/bin/upower -i $path | grep state | awk '{print $2}')
|
||||||
''
|
''
|
||||||
@@ -77,31 +66,25 @@
|
|||||||
elif [ $percentage -ge 0 ]; then echo "red"
|
elif [ $percentage -ge 0 ]; then echo "red"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in
|
in "#[fg=#(${color})]#(${icon}) #[fg=${fg}]#(${percentage})%";
|
||||||
"#[fg=#(${color})]#(${icon}) #[fg=${fg}]#(${percentage})%";
|
|
||||||
|
|
||||||
pwd =
|
pwd = let
|
||||||
let
|
|
||||||
accent = color "main_accent";
|
accent = color "main_accent";
|
||||||
icon = "#[fg=${accent}] ";
|
icon = "#[fg=${accent}] ";
|
||||||
format = "#[fg=${fg}]#{b:pane_current_path}";
|
format = "#[fg=${fg}]#{b:pane_current_path}";
|
||||||
in
|
in "${icon}${format}";
|
||||||
"${icon}${format}";
|
|
||||||
|
|
||||||
git =
|
git = let
|
||||||
let
|
|
||||||
icon = pkgs.writeShellScript "branch" ''
|
icon = pkgs.writeShellScript "branch" ''
|
||||||
git -C "$1" branch && echo " "
|
git -C "$1" branch && echo " "
|
||||||
'';
|
'';
|
||||||
branch = pkgs.writeShellScript "branch" ''
|
branch = pkgs.writeShellScript "branch" ''
|
||||||
git -C "$1" rev-parse --abbrev-ref HEAD
|
git -C "$1" rev-parse --abbrev-ref HEAD
|
||||||
'';
|
'';
|
||||||
in
|
in "#[fg=magenta]#(${icon} #{pane_current_path})#(${branch} #{pane_current_path})";
|
||||||
"#[fg=magenta]#(${icon} #{pane_current_path})#(${branch} #{pane_current_path})";
|
|
||||||
|
|
||||||
separator = "#[fg=${fg}]|";
|
separator = "#[fg=${fg}]|";
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
baseIndex = 1;
|
baseIndex = 1;
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
{ lib, ... }:
|
{lib, ...}: {
|
||||||
{
|
flake.modules.homeManager.shell = {pkgs, ...}: {
|
||||||
flake.modules.homeManager.shell =
|
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
history = {
|
history = {
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
{ inputs, config, ... }:
|
|
||||||
{
|
|
||||||
flake.modules.nixos.alpha =
|
|
||||||
{
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.modules.nixos.alpha = {
|
||||||
hostName,
|
hostName,
|
||||||
userName,
|
userName,
|
||||||
...
|
...
|
||||||
}@innerArgs:
|
} @ innerArgs: {
|
||||||
{
|
imports = with config.flake.modules.nixos;
|
||||||
imports =
|
|
||||||
with config.flake.modules.nixos;
|
|
||||||
[
|
[
|
||||||
boot
|
boot
|
||||||
networking
|
networking
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
flake.modules.nixos.alpha = {
|
||||||
flake.modules.nixos.alpha =
|
config,
|
||||||
{ config, lib, ... }:
|
lib,
|
||||||
let
|
...
|
||||||
|
}: let
|
||||||
hasOptinPersistence = config.tnix.boot.impermanence.enable;
|
hasOptinPersistence = config.tnix.boot.impermanence.enable;
|
||||||
isLegacy = config.tnix.boot.legacy.enable;
|
isLegacy = config.tnix.boot.legacy.enable;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
];
|
];
|
||||||
@@ -16,7 +16,8 @@
|
|||||||
type = "disk";
|
type = "disk";
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions =
|
||||||
|
{
|
||||||
ESP = {
|
ESP = {
|
||||||
size = "1G";
|
size = "1G";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
@@ -36,7 +37,8 @@
|
|||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
# Base subvolumes that always exist
|
# Base subvolumes that always exist
|
||||||
subvolumes = {
|
subvolumes =
|
||||||
|
{
|
||||||
"/root" = {
|
"/root" = {
|
||||||
mountOptions = [
|
mountOptions = [
|
||||||
"compress=zstd"
|
"compress=zstd"
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.alpha =
|
flake.modules.nixos.alpha = {
|
||||||
{
|
|
||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
{config, ...}: {
|
{config, ...}: {
|
||||||
flake.modules.nixos.arcturus =
|
flake.modules.nixos.arcturus = {
|
||||||
{
|
|
||||||
pkgs,
|
pkgs,
|
||||||
hostName,
|
hostName,
|
||||||
userName,
|
userName,
|
||||||
...
|
...
|
||||||
}@innerArgs:
|
} @ innerArgs: {
|
||||||
{
|
|
||||||
imports = with config.flake.modules.nixos; [
|
imports = with config.flake.modules.nixos; [
|
||||||
boot
|
boot
|
||||||
networking
|
networking
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
flake.modules.nixos.arcturus = {
|
||||||
flake.modules.nixos.arcturus =
|
config,
|
||||||
{ config, lib, ... }:
|
lib,
|
||||||
let
|
...
|
||||||
|
}: let
|
||||||
hasOptinPersistence = config.tnix.boot.impermanence.enable;
|
hasOptinPersistence = config.tnix.boot.impermanence.enable;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
];
|
];
|
||||||
@@ -35,7 +35,8 @@
|
|||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
# Base subvolumes that always exist
|
# Base subvolumes that always exist
|
||||||
subvolumes = {
|
subvolumes =
|
||||||
|
{
|
||||||
"/root" = {
|
"/root" = {
|
||||||
mountOptions = [
|
mountOptions = [
|
||||||
"compress=zstd"
|
"compress=zstd"
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
{ config, ... }:
|
{config, ...}: {
|
||||||
{
|
flake.modules.nixos.arcturus = {
|
||||||
flake.modules.nixos.arcturus =
|
|
||||||
{
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}@innerArgs:
|
} @ innerArgs: {
|
||||||
{
|
|
||||||
imports = with config.flake.modules.nixos; [
|
imports = with config.flake.modules.nixos; [
|
||||||
hardware
|
hardware
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
{config, ...}: {
|
{config, ...}: {
|
||||||
flake.modules.nixos.canopus =
|
flake.modules.nixos.canopus = {
|
||||||
{
|
|
||||||
pkgs,
|
pkgs,
|
||||||
hostName,
|
hostName,
|
||||||
userName,
|
userName,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports = with config.flake.modules.nixos; [
|
imports = with config.flake.modules.nixos; [
|
||||||
boot
|
boot
|
||||||
networking
|
networking
|
||||||
@@ -72,6 +70,8 @@
|
|||||||
waydroid.enable = true;
|
waydroid.enable = true;
|
||||||
distrobox.enable = true;
|
distrobox.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
flake.modules.nixos.canopus = {
|
||||||
flake.modules.nixos.canopus =
|
config,
|
||||||
{ config, lib, ... }:
|
lib,
|
||||||
let
|
...
|
||||||
|
}: let
|
||||||
hasOptinPersistence = config.tnix.boot.impermanence.enable;
|
hasOptinPersistence = config.tnix.boot.impermanence.enable;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
];
|
];
|
||||||
@@ -43,7 +43,8 @@
|
|||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
# Base subvolumes that always exist
|
# Base subvolumes that always exist
|
||||||
subvolumes = {
|
subvolumes =
|
||||||
|
{
|
||||||
"/root" = {
|
"/root" = {
|
||||||
mountOptions = [
|
mountOptions = [
|
||||||
"compress=zstd"
|
"compress=zstd"
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
{ inputs, config, ... }:
|
|
||||||
{
|
|
||||||
flake.modules.nixos.canopus =
|
|
||||||
{
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.modules.nixos.canopus = {
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}@innerArgs:
|
} @ innerArgs: {
|
||||||
{
|
imports = with config.flake.modules.nixos;
|
||||||
imports =
|
|
||||||
with config.flake.modules.nixos;
|
|
||||||
[
|
[
|
||||||
hardware
|
hardware
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ config, ... }:
|
{config, ...}: {
|
||||||
{
|
|
||||||
flake.modules.homeManager.canopus = {pkgs, ...}: {
|
flake.modules.homeManager.canopus = {pkgs, ...}: {
|
||||||
imports = with config.flake.modules.homeManager; [
|
imports = with config.flake.modules.homeManager; [
|
||||||
desktop
|
desktop
|
||||||
@@ -27,8 +26,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
authorized_fingerprints = {
|
authorized_fingerprints = {
|
||||||
"f4:4b:17:61:f7:01:a4:a2:e1:c7:8c:1c:7a:f3:8b:87:14:3d:05:3d:a0:8b:cc:e7:88:d8:d8:d2:a4:c2:75:8b" =
|
"f4:4b:17:61:f7:01:a4:a2:e1:c7:8c:1c:7a:f3:8b:87:14:3d:05:3d:a0:8b:cc:e7:88:d8:d8:d2:a4:c2:75:8b" = "sirius";
|
||||||
"sirius";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
{config, ...}: {
|
{config, ...}: {
|
||||||
flake.modules.nixos.sirius =
|
flake.modules.nixos.sirius = {
|
||||||
{
|
|
||||||
pkgs,
|
pkgs,
|
||||||
hostName,
|
hostName,
|
||||||
userName,
|
userName,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports = with config.flake.modules.nixos; [
|
imports = with config.flake.modules.nixos; [
|
||||||
boot
|
boot
|
||||||
networking
|
networking
|
||||||
@@ -72,6 +70,8 @@
|
|||||||
waydroid.enable = true;
|
waydroid.enable = true;
|
||||||
distrobox.enable = true;
|
distrobox.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
flake.modules.nixos.sirius = {
|
||||||
flake.modules.nixos.sirius =
|
config,
|
||||||
{ config, lib, ... }:
|
lib,
|
||||||
let
|
...
|
||||||
|
}: let
|
||||||
hasOptinPersistence = config.tnix.boot.impermanence.enable;
|
hasOptinPersistence = config.tnix.boot.impermanence.enable;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
];
|
];
|
||||||
@@ -43,7 +43,8 @@
|
|||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
# Base subvolumes that always exist
|
# Base subvolumes that always exist
|
||||||
subvolumes = {
|
subvolumes =
|
||||||
|
{
|
||||||
"/root" = {
|
"/root" = {
|
||||||
mountOptions = [
|
mountOptions = [
|
||||||
"compress=zstd"
|
"compress=zstd"
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
{ inputs, config, ... }:
|
|
||||||
{
|
|
||||||
flake.modules.nixos.sirius =
|
|
||||||
{
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.modules.nixos.sirius = {
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}@innerArgs:
|
} @ innerArgs: {
|
||||||
{
|
imports = with config.flake.modules.nixos;
|
||||||
imports =
|
|
||||||
with config.flake.modules.nixos;
|
|
||||||
[
|
[
|
||||||
hardware
|
hardware
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ config, ... }:
|
{config, ...}: {
|
||||||
{
|
|
||||||
flake.modules.homeManager.sirius = {
|
flake.modules.homeManager.sirius = {
|
||||||
imports = with config.flake.modules.homeManager; [
|
imports = with config.flake.modules.homeManager; [
|
||||||
desktop
|
desktop
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
{ config, ... }:
|
{config, ...}: {
|
||||||
{
|
flake.modules.nixOnDroid.vega = {
|
||||||
flake.modules.nixOnDroid.vega =
|
|
||||||
{
|
|
||||||
pkgs,
|
pkgs,
|
||||||
userEmail,
|
userEmail,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports = with config.flake.modules.nixOnDroid; [
|
imports = with config.flake.modules.nixOnDroid; [
|
||||||
networking
|
networking
|
||||||
];
|
];
|
||||||
@@ -18,12 +15,10 @@
|
|||||||
# android-integration.termux-setup-storage.enable = true;
|
# android-integration.termux-setup-storage.enable = true;
|
||||||
# android-integration.termux-reload-settings.enable = true;
|
# android-integration.termux-reload-settings.enable = true;
|
||||||
|
|
||||||
terminal.font =
|
terminal.font = let
|
||||||
let
|
|
||||||
firacode = pkgs.nerd-fonts.fira-code;
|
firacode = pkgs.nerd-fonts.fira-code;
|
||||||
fontPath = "share/fonts/truetype/NerdFonts/FiraCode/FiraCodeNerdFont-Regular.ttf";
|
fontPath = "share/fonts/truetype/NerdFonts/FiraCode/FiraCodeNerdFont-Regular.ttf";
|
||||||
in
|
in "${firacode}/${fontPath}";
|
||||||
"${firacode}/${fontPath}";
|
|
||||||
|
|
||||||
time.timeZone = "Asia/Kolkata";
|
time.timeZone = "Asia/Kolkata";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ lib, ... }:
|
{lib, ...}: {
|
||||||
{
|
|
||||||
flake.modules.homeManager.vega = {
|
flake.modules.homeManager.vega = {
|
||||||
# @TODO: Broken currently - By default it's enabled by neovim module
|
# @TODO: Broken currently - By default it's enabled by neovim module
|
||||||
programs.vim.enable = lib.mkForce false;
|
programs.vim.enable = lib.mkForce false;
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
{ config, ... }:
|
{config, ...}: {
|
||||||
{
|
flake.modules.nixos.vps = {hostName, ...}: {
|
||||||
flake.modules.nixos.vps =
|
|
||||||
{
|
|
||||||
hostName,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = with config.flake.modules.nixos; [
|
imports = with config.flake.modules.nixos; [
|
||||||
boot
|
boot
|
||||||
networking
|
networking
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
flake.modules.nixos.vps = {
|
||||||
flake.modules.nixos.vps =
|
config,
|
||||||
{ config, lib, ... }:
|
lib,
|
||||||
let
|
...
|
||||||
|
}: let
|
||||||
hasOptinPersistence = config.tnix.boot.impermanence.enable;
|
hasOptinPersistence = config.tnix.boot.impermanence.enable;
|
||||||
isLegacy = config.tnix.boot.legacy.enable;
|
isLegacy = config.tnix.boot.legacy.enable;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
];
|
];
|
||||||
@@ -16,7 +16,8 @@
|
|||||||
type = "disk";
|
type = "disk";
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions =
|
||||||
|
{
|
||||||
ESP = {
|
ESP = {
|
||||||
size = "1G";
|
size = "1G";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
@@ -36,7 +37,8 @@
|
|||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
# Base subvolumes that always exist
|
# Base subvolumes that always exist
|
||||||
subvolumes = {
|
subvolumes =
|
||||||
|
{
|
||||||
"/root" = {
|
"/root" = {
|
||||||
mountOptions = [
|
mountOptions = [
|
||||||
"compress=zstd"
|
"compress=zstd"
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.vps =
|
flake.modules.nixos.vps = {
|
||||||
{
|
|
||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
flake.modules.nixos.boot = {
|
||||||
flake.modules.nixos.boot =
|
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
userName,
|
userName,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.tnix.boot;
|
cfg = config.tnix.boot;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.impermanence.nixosModules.impermanence
|
inputs.impermanence.nixosModules.impermanence
|
||||||
];
|
];
|
||||||
@@ -46,14 +42,16 @@
|
|||||||
fileSystems."/persist".neededForBoot = true;
|
fileSystems."/persist".neededForBoot = true;
|
||||||
environment.persistence."/persist" = {
|
environment.persistence."/persist" = {
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
directories = [
|
directories =
|
||||||
|
[
|
||||||
"/var/log"
|
"/var/log"
|
||||||
"/var/lib"
|
"/var/lib"
|
||||||
"/etc/NetworkManager/system-connections"
|
"/etc/NetworkManager/system-connections"
|
||||||
]
|
]
|
||||||
++ cfg.impermanence.directories;
|
++ cfg.impermanence.directories;
|
||||||
|
|
||||||
files = [
|
files =
|
||||||
|
[
|
||||||
"/etc/machine-id"
|
"/etc/machine-id"
|
||||||
"/etc/ssh/ssh_host_ed25519_key"
|
"/etc/ssh/ssh_host_ed25519_key"
|
||||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||||
@@ -65,7 +63,8 @@
|
|||||||
|
|
||||||
home-manager.users.${userName} = {
|
home-manager.users.${userName} = {
|
||||||
home.persistence."/persist" = {
|
home.persistence."/persist" = {
|
||||||
directories = [
|
directories =
|
||||||
|
[
|
||||||
"Downloads"
|
"Downloads"
|
||||||
"Music"
|
"Music"
|
||||||
"Wallpapers"
|
"Wallpapers"
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.boot =
|
flake.modules.nixos.boot = {
|
||||||
{ config, lib, ... }:
|
config,
|
||||||
let
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
cfg = config.tnix.boot;
|
cfg = config.tnix.boot;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.boot.legacy = {
|
options.tnix.boot.legacy = {
|
||||||
enable = lib.mkEnableOption "legacy boot (GRUB) instead of systemd-boot";
|
enable = lib.mkEnableOption "legacy boot (GRUB) instead of systemd-boot";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.boot =
|
flake.modules.nixos.boot = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
boot = {
|
boot = {
|
||||||
consoleLogLevel = 0;
|
consoleLogLevel = 0;
|
||||||
initrd.verbose = false;
|
initrd.verbose = false;
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
flake.modules.nixos.boot = {
|
||||||
flake.modules.nixos.boot =
|
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.tnix.boot;
|
cfg = config.tnix.boot;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [inputs.lanzaboote.nixosModules.lanzaboote];
|
imports = [inputs.lanzaboote.nixosModules.lanzaboote];
|
||||||
|
|
||||||
options.tnix.boot.secure-boot = {
|
options.tnix.boot.secure-boot = {
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
{ inputs, config, ... }:
|
|
||||||
{
|
|
||||||
flake.modules.nixos.core =
|
|
||||||
{
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
flake.modules.nixos.core = {
|
||||||
hostName,
|
hostName,
|
||||||
userName,
|
userName,
|
||||||
userEmail,
|
userEmail,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.core =
|
flake.modules.nixos.core = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
userName,
|
userName,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
programs.nh = {
|
programs.nh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
|
||||||
flake.modules.nixos.core = {pkgs, ...}: {
|
flake.modules.nixos.core = {pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nix-index-database.nixosModules.default
|
inputs.nix-index-database.nixosModules.default
|
||||||
|
|||||||
18
modules/nixos/core/nix-ld.nix
Normal file
18
modules/nixos/core/nix-ld.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{...}: {
|
||||||
|
flake.modules.nixos.core = {
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.tnix.programs.nix-ld;
|
||||||
|
in {
|
||||||
|
options.tnix.programs.nix-ld = {
|
||||||
|
enable = mkEnableOption "nix-ld";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.core =
|
flake.modules.nixos.core = {userName, ...}: {
|
||||||
{ userName, ... }:
|
|
||||||
{
|
|
||||||
nix = {
|
nix = {
|
||||||
channel.enable = false;
|
channel.enable = false;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
|
||||||
flake.modules.nixos.core = {
|
flake.modules.nixos.core = {
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
config = {
|
config = {
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
{
|
flake.modules.nixos.core = {
|
||||||
flake.modules.nixos.core =
|
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
isEd25519 = k: k.type == "ed25519";
|
isEd25519 = k: k.type == "ed25519";
|
||||||
getKeyPath = k: k.path;
|
getKeyPath = k: k.path;
|
||||||
keys = builtins.filter isEd25519 config.services.openssh.hostKeys;
|
keys = builtins.filter isEd25519 config.services.openssh.hostKeys;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [inputs.sops-nix.nixosModules.sops];
|
imports = [inputs.sops-nix.nixosModules.sops];
|
||||||
|
|
||||||
sops.age = {
|
sops.age = {
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.core =
|
flake.modules.nixos.core = {
|
||||||
{
|
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
userName,
|
userName,
|
||||||
userEmail,
|
userEmail,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
hasPasswordSecret = lib.hasAttrByPath ["sops" "secrets" "tux-password"] config;
|
hasPasswordSecret = lib.hasAttrByPath ["sops" "secrets" "tux-password"] config;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
time.timeZone = "Asia/Kolkata";
|
time.timeZone = "Asia/Kolkata";
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.desktop =
|
flake.modules.nixos.desktop = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
fonts.packages = with pkgs.nerd-fonts; [
|
fonts.packages = with pkgs.nerd-fonts; [
|
||||||
fira-code
|
fira-code
|
||||||
jetbrains-mono
|
jetbrains-mono
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.desktop =
|
flake.modules.nixos.desktop = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
programs.gpu-screen-recorder = {
|
programs.gpu-screen-recorder = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.desktop =
|
flake.modules.nixos.desktop = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.hyprland-git.hyprland;
|
package = pkgs.hyprland-git.hyprland;
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
{
|
{inputs, ...}: {
|
||||||
inputs,
|
flake.modules.nixos.desktop = {
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
flake.modules.nixos.desktop =
|
|
||||||
{
|
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.mango.nixosModules.mango
|
inputs.mango.nixosModules.mango
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.desktop =
|
flake.modules.nixos.desktop = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [brightnessctl];
|
environment.systemPackages = with pkgs; [brightnessctl];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.desktop =
|
flake.modules.nixos.desktop = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
programs.obs-studio = {
|
programs.obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableVirtualCamera = true;
|
enableVirtualCamera = true;
|
||||||
@@ -9,6 +7,7 @@
|
|||||||
obs-vaapi
|
obs-vaapi
|
||||||
wlrobs
|
wlrobs
|
||||||
obs-source-record
|
obs-source-record
|
||||||
|
obs-advanced-masks
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.desktop =
|
flake.modules.nixos.desktop = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
services = {
|
services = {
|
||||||
gvfs.enable = true;
|
gvfs.enable = true;
|
||||||
tumbler.enable = true;
|
tumbler.enable = true;
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.desktop =
|
flake.modules.nixos.desktop = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [tshell];
|
environment.systemPackages = with pkgs; [tshell];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.gaming =
|
flake.modules.nixos.gaming = {pkgs, ...}: {
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
programs.steam = {
|
programs.steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
protontricks.enable = true;
|
protontricks.enable = true;
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.networking =
|
flake.modules.nixos.networking = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
hostName,
|
hostName,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.networking.netbird-client;
|
cfg = config.tnix.networking.netbird-client;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.networking.netbird-client = {
|
options.tnix.networking.netbird-client = {
|
||||||
enable = mkEnableOption "Enable netbird client";
|
enable = mkEnableOption "Enable netbird client";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.networking =
|
flake.modules.nixos.networking = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.networking.newt;
|
cfg = config.tnix.networking.newt;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.networking.newt = {
|
options.tnix.networking.newt = {
|
||||||
enable = mkEnableOption "Newt";
|
enable = mkEnableOption "Newt";
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,16 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.networking =
|
flake.modules.nixos.networking = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.networking.openssh;
|
cfg = config.tnix.networking.openssh;
|
||||||
|
|
||||||
# Sops needs acess to the keys before the persist dirs are even mounted; so
|
# Sops needs acess to the keys before the persist dirs are even mounted; so
|
||||||
# just persisting the keys won't work, we must point at /persist
|
# just persisting the keys won't work, we must point at /persist
|
||||||
hasOptinPersistence = config.tnix.boot.impermanence.enable;
|
hasOptinPersistence = config.tnix.boot.impermanence.enable;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.networking.openssh = {
|
options.tnix.networking.openssh = {
|
||||||
enable = mkEnableOption "Enable OpenSSH server";
|
enable = mkEnableOption "Enable OpenSSH server";
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.services =
|
flake.modules.nixos.services = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.services.aiostreams;
|
cfg = config.tnix.services.aiostreams;
|
||||||
port = toString cfg.port;
|
port = toString cfg.port;
|
||||||
acmeHost = config.tnix.services.nginx.domain;
|
acmeHost = config.tnix.services.nginx.domain;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.services.aiostreams = {
|
options.tnix.services.aiostreams = {
|
||||||
enable = mkEnableOption "AIOStreams";
|
enable = mkEnableOption "AIOStreams";
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,16 @@
|
|||||||
{inputs, ...}: {
|
{inputs, ...}: {
|
||||||
flake.modules.nixos.services =
|
flake.modules.nixos.services = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
options,
|
options,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.services.copyparty;
|
cfg = config.tnix.services.copyparty;
|
||||||
port = toString cfg.port;
|
port = toString cfg.port;
|
||||||
acmeHost = config.tnix.services.nginx.domain;
|
acmeHost = config.tnix.services.nginx.domain;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.copyparty.nixosModules.default
|
inputs.copyparty.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.services =
|
flake.modules.nixos.services = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.services.cyber-tux;
|
cfg = config.tnix.services.cyber-tux;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.services.cyber-tux = {
|
options.tnix.services.cyber-tux = {
|
||||||
enable = mkEnableOption "CyberTux Discord bot";
|
enable = mkEnableOption "CyberTux Discord bot";
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.services =
|
flake.modules.nixos.services = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.services.gitea;
|
cfg = config.tnix.services.gitea;
|
||||||
port = toString cfg.port;
|
port = toString cfg.port;
|
||||||
acmeHost = config.tnix.services.nginx.domain;
|
acmeHost = config.tnix.services.nginx.domain;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.services.gitea = {
|
options.tnix.services.gitea = {
|
||||||
enable = mkEnableOption "Gitea";
|
enable = mkEnableOption "Gitea";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{inputs, ...}: {
|
{inputs, ...}: {
|
||||||
flake.modules.nixos.services =
|
flake.modules.nixos.services = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -8,11 +7,9 @@
|
|||||||
userName,
|
userName,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.services.hermes-agent;
|
cfg = config.tnix.services.hermes-agent;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.hermes-agent.nixosModules.default
|
inputs.hermes-agent.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.services =
|
flake.modules.nixos.services = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.services.mediaflow-proxy;
|
cfg = config.tnix.services.mediaflow-proxy;
|
||||||
port = toString cfg.port;
|
port = toString cfg.port;
|
||||||
acmeHost = config.tnix.services.nginx.domain;
|
acmeHost = config.tnix.services.nginx.domain;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.services.mediaflow-proxy = {
|
options.tnix.services.mediaflow-proxy = {
|
||||||
enable = mkEnableOption "MediaFlow Proxy";
|
enable = mkEnableOption "MediaFlow Proxy";
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.services =
|
flake.modules.nixos.services = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
userEmail,
|
userEmail,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.services.nginx;
|
cfg = config.tnix.services.nginx;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.services.nginx = {
|
options.tnix.services.nginx = {
|
||||||
enable = mkEnableOption "Nginx";
|
enable = mkEnableOption "Nginx";
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.services =
|
flake.modules.nixos.services = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
userEmail,
|
userEmail,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.services.pangolin;
|
cfg = config.tnix.services.pangolin;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.services.pangolin = {
|
options.tnix.services.pangolin = {
|
||||||
enable = mkEnableOption "Pangolin";
|
enable = mkEnableOption "Pangolin";
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
{inputs, ...}: {
|
{inputs, ...}: {
|
||||||
flake.modules.nixos.services =
|
flake.modules.nixos.services = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.services.trok;
|
cfg = config.tnix.services.trok;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.trok.nixosModules.default
|
inputs.trok.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.services =
|
flake.modules.nixos.services = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.services.uptime-kuma;
|
cfg = config.tnix.services.uptime-kuma;
|
||||||
port = toString cfg.port;
|
port = toString cfg.port;
|
||||||
acmeHost = config.tnix.services.nginx.domain;
|
acmeHost = config.tnix.services.nginx.domain;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.services.uptime-kuma = {
|
options.tnix.services.uptime-kuma = {
|
||||||
enable = mkEnableOption "Uptime Kuma";
|
enable = mkEnableOption "Uptime Kuma";
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.services =
|
flake.modules.nixos.services = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.tnix.services.vaultwarden;
|
cfg = config.tnix.services.vaultwarden;
|
||||||
port = toString cfg.port;
|
port = toString cfg.port;
|
||||||
acmeHost = config.tnix.services.nginx.domain;
|
acmeHost = config.tnix.services.nginx.domain;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.services.vaultwarden = {
|
options.tnix.services.vaultwarden = {
|
||||||
enable = mkEnableOption "Vaultwarden";
|
enable = mkEnableOption "Vaultwarden";
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,17 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.virtualisation =
|
flake.modules.nixos.virtualisation = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.tnix.virtualisation;
|
cfg = config.tnix.virtualisation;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.virtualisation.distrobox = {
|
options.tnix.virtualisation.distrobox = {
|
||||||
enable = lib.mkEnableOption "Enable DistroBox";
|
enable = lib.mkEnableOption "Enable DistroBox";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.distrobox.enable {
|
config = lib.mkIf cfg.distrobox.enable {
|
||||||
virtualisation.waydroid.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
distrobox
|
distrobox
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.virtualisation =
|
flake.modules.nixos.virtualisation = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
userName,
|
userName,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.tnix.virtualisation;
|
cfg = config.tnix.virtualisation;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.virtualisation.docker = {
|
options.tnix.virtualisation.docker = {
|
||||||
enable = lib.mkEnableOption "Docker container runtime";
|
enable = lib.mkEnableOption "Docker container runtime";
|
||||||
nvidia = {
|
nvidia = {
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.virtualisation =
|
flake.modules.nixos.virtualisation = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
userName,
|
userName,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.tnix.virtualisation;
|
cfg = config.tnix.virtualisation;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.virtualisation.qemu = {
|
options.tnix.virtualisation.qemu = {
|
||||||
enable = lib.mkEnableOption "QEMU/KVM virtualization with libvirtd";
|
enable = lib.mkEnableOption "QEMU/KVM virtualization with libvirtd";
|
||||||
};
|
};
|
||||||
@@ -34,5 +31,4 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
{
|
{
|
||||||
flake.modules.nixos.virtualisation =
|
flake.modules.nixos.virtualisation = {
|
||||||
{
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.tnix.virtualisation;
|
cfg = config.tnix.virtualisation;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.tnix.virtualisation.waydroid = {
|
options.tnix.virtualisation.waydroid = {
|
||||||
enable = lib.mkEnableOption "Waydroid Android container";
|
enable = lib.mkEnableOption "Waydroid Android container";
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user