Remove custom lib usage
This commit is contained in:
99
flake.nix
99
flake.nix
@ -20,66 +20,47 @@
|
|||||||
|
|
||||||
outputs = inputs @ { self, nixpkgs, agenix, home-manager, ... }:
|
outputs = inputs @ { self, nixpkgs, agenix, home-manager, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) attrValues;
|
nixpkgsForSystem = system: inputs.nixpkgs;
|
||||||
inherit (lib.my) mapModules mapModulesRec;
|
overlays = [
|
||||||
|
agenix.overlays.default
|
||||||
system = "x86_64-linux";
|
(import ./overlays/gnome.nix)
|
||||||
|
];
|
||||||
mkPkgs = pkgs: extraOverlays:
|
commonModules = [
|
||||||
import pkgs {
|
agenix.nixosModules.age
|
||||||
inherit system;
|
home-manager.nixosModule
|
||||||
config.allowUnfree = true;
|
./modules
|
||||||
overlays = extraOverlays ++ (lib.attrValues self.overlays);
|
];
|
||||||
|
nixosSystem = system: name:
|
||||||
|
let
|
||||||
|
nixpkgs = nixpkgsForSystem system;
|
||||||
|
lib = (import nixpkgs { inherit overlays system; }).lib;
|
||||||
|
in
|
||||||
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
inherit lib system;
|
||||||
|
specialArgs = { modulesPath = toString (nixpkgs + "/nixos/modules"); inherit inputs; };
|
||||||
|
baseModules = import (nixpkgs + "/nixos/modules/module-list.nix");
|
||||||
|
modules = commonModules ++ [
|
||||||
|
({ config, ... }:
|
||||||
|
{
|
||||||
|
nixpkgs.pkgs = import nixpkgs {
|
||||||
|
inherit overlays system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
networking.hostName = name;
|
||||||
|
nix = {
|
||||||
|
extraOptions = "experimental-features = nix-command flakes";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
./hosts/${name}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
pkgs = mkPkgs nixpkgs [];
|
|
||||||
|
|
||||||
lib = nixpkgs.lib.extend (self: super: {
|
|
||||||
my = import ./lib {
|
|
||||||
inherit pkgs inputs;
|
|
||||||
lib = self;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
in {
|
|
||||||
lib = lib.my;
|
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
atlas = nixpkgs.lib.nixosSystem {
|
atlas = nixosSystem "x86_64-linux" "atlas";
|
||||||
modules = [
|
eos = nixosSystem "x86_64-linux" "eos";
|
||||||
home-manager.nixosModules.home-manager
|
helios = nixosSystem "x86_64-linux" "helios";
|
||||||
{ nixpkgs.overlays = [ (import ./overlays/gnome.nix) ]; }
|
odyssey = nixosSystem "x86_64-linux" "odyssey";
|
||||||
(import ./modules)
|
|
||||||
./hosts/atlas
|
|
||||||
];
|
|
||||||
specialArgs = { inherit lib inputs; };
|
|
||||||
};
|
|
||||||
eos = nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{ nixpkgs.overlays = [ (import ./overlays/gnome.nix) ]; }
|
|
||||||
(import ./modules)
|
|
||||||
./hosts/eos
|
|
||||||
];
|
|
||||||
specialArgs = { inherit lib inputs; };
|
|
||||||
};
|
|
||||||
helios = nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{ nixpkgs.overlays = [ (import ./overlays/gnome.nix) ]; }
|
|
||||||
(import ./modules)
|
|
||||||
./hosts/helios
|
|
||||||
];
|
|
||||||
specialArgs = { inherit lib inputs; };
|
|
||||||
};
|
|
||||||
odyssey = nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
agenix.nixosModules.default
|
|
||||||
{ nixpkgs.overlays = [ (import ./overlays/gnome.nix) ]; }
|
|
||||||
(import ./modules)
|
|
||||||
./hosts/odyssey
|
|
||||||
];
|
|
||||||
specialArgs = { inherit lib inputs; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
in
|
||||||
|
{ inherit nixosConfigurations; };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib.my;
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
{
|
{
|
||||||
time.timeZone = "Europe/London";
|
time.timeZone = "Europe/London";
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib.my;
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib.my;
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib.my;
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
{
|
{
|
||||||
time.timeZone = "Europe/London";
|
time.timeZone = "Europe/London";
|
||||||
|
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
{ lib, ... }:
|
|
||||||
|
|
||||||
with builtins;
|
|
||||||
with lib;
|
|
||||||
rec {
|
|
||||||
# attrsToList
|
|
||||||
attrsToList = attrs:
|
|
||||||
mapAttrsToList (name: value: { inherit name value; }) attrs;
|
|
||||||
|
|
||||||
# mapFilterAttrs ::
|
|
||||||
# (name -> value -> bool)
|
|
||||||
# (name -> value -> { name = any; value = any; })
|
|
||||||
# attrs
|
|
||||||
mapFilterAttrs = pred: f: attrs: filterAttrs pred (mapAttrs' f attrs);
|
|
||||||
|
|
||||||
# Generate an attribute set by mapping a function over a list of values.
|
|
||||||
genAttrs' = values: f: listToAttrs (map f values);
|
|
||||||
|
|
||||||
# anyAttrs :: (name -> value -> bool) attrs
|
|
||||||
anyAttrs = pred: attrs:
|
|
||||||
any (attr: pred attr.name attr.value) (attrsToList attrs);
|
|
||||||
|
|
||||||
# countAttrs :: (name -> value -> bool) attrs
|
|
||||||
countAttrs = pred: attrs:
|
|
||||||
count (attr: pred attr.name attr.value) (attrsToList attrs);
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
|
|
||||||
{ inputs, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) makeExtensible attrValues foldr;
|
|
||||||
inherit (modules) mapModules;
|
|
||||||
|
|
||||||
modules = import ./modules.nix {
|
|
||||||
inherit lib;
|
|
||||||
self.attrs = import ./attrs.nix { inherit lib; self = {}; };
|
|
||||||
};
|
|
||||||
|
|
||||||
mylib = makeExtensible (self:
|
|
||||||
with self; mapModules ./.
|
|
||||||
(file: import file { inherit self lib pkgs inputs; }));
|
|
||||||
in
|
|
||||||
mylib.extend
|
|
||||||
(self: super:
|
|
||||||
foldr (a: b: a // b) {} (attrValues super))
|
|
@ -1,53 +0,0 @@
|
|||||||
{ self, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (builtins) attrValues readDir pathExists concatLists;
|
|
||||||
inherit (lib) id mapAttrsToList filterAttrs hasPrefix hasSuffix nameValuePair removeSuffix;
|
|
||||||
inherit (self.attrs) mapFilterAttrs;
|
|
||||||
in
|
|
||||||
rec {
|
|
||||||
mapModules = dir: fn:
|
|
||||||
mapFilterAttrs
|
|
||||||
(n: v:
|
|
||||||
v != null &&
|
|
||||||
!(hasPrefix "_" n))
|
|
||||||
(n: v:
|
|
||||||
let path = "${toString dir}/${n}"; in
|
|
||||||
if v == "directory" && pathExists "${path}/default.nix"
|
|
||||||
then nameValuePair n (fn path)
|
|
||||||
else if v == "regular" &&
|
|
||||||
n != "default.nix" &&
|
|
||||||
hasSuffix ".nix" n
|
|
||||||
then nameValuePair (removeSuffix ".nix" n) (fn path)
|
|
||||||
else nameValuePair "" null)
|
|
||||||
(readDir dir);
|
|
||||||
|
|
||||||
mapModules' = dir: fn:
|
|
||||||
attrValues (mapModules dir fn);
|
|
||||||
|
|
||||||
mapModulesRec = dir: fn:
|
|
||||||
mapFilterAttrs
|
|
||||||
(n: v:
|
|
||||||
v != null &&
|
|
||||||
!(hasPrefix "_" n))
|
|
||||||
(n: v:
|
|
||||||
let path = "${toString dir}/${n}"; in
|
|
||||||
if v == "directory"
|
|
||||||
then nameValuePair n (mapModulesRec path fn)
|
|
||||||
else if v == "regular" && n != "default.nix" && hasSuffix ".nix" n
|
|
||||||
then nameValuePair (removeSuffix ".nix" n) (fn path)
|
|
||||||
else nameValuePair "" null)
|
|
||||||
(readDir dir);
|
|
||||||
|
|
||||||
mapModulesRec' = dir: fn:
|
|
||||||
let
|
|
||||||
dirs =
|
|
||||||
mapAttrsToList
|
|
||||||
(k: _: "${dir}/${k}")
|
|
||||||
(filterAttrs
|
|
||||||
(n: v: v == "directory" && !(hasPrefix "_" n))
|
|
||||||
(readDir dir));
|
|
||||||
files = attrValues (mapModules dir id);
|
|
||||||
paths = files ++ concatLists (map (d: mapModulesRec' d id) dirs);
|
|
||||||
in map fn paths;
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
{ inputs, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let sys = "x86_64-linux";
|
|
||||||
in {
|
|
||||||
mkHost = path: attrs @ { system ? sys, ... }:
|
|
||||||
nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
specialArgs = { inherit lib inputs system; };
|
|
||||||
modules = [
|
|
||||||
{
|
|
||||||
nixpkgs.pkgs = pkgs;
|
|
||||||
networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path));
|
|
||||||
}
|
|
||||||
(filterAttrs (n: v: !elem n [ "system" ]) attrs)
|
|
||||||
../. # /default.nix
|
|
||||||
(import path)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
mapHosts = dir: attrs @ { system ? system, ... }:
|
|
||||||
mapModules dir
|
|
||||||
(hostPath: mkHost hostPath attrs);
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
{ lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkOption types;
|
|
||||||
in
|
|
||||||
rec {
|
|
||||||
mkOpt = type: default:
|
|
||||||
mkOption { inherit type default; };
|
|
||||||
|
|
||||||
mkOpt' = type: default: description:
|
|
||||||
mkOption { inherit type default description; };
|
|
||||||
|
|
||||||
mkBoolOpt = default: mkOption {
|
|
||||||
inherit default;
|
|
||||||
type = types.bool;
|
|
||||||
example = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
mkStringOpt = default: mkOption {
|
|
||||||
inherit default;
|
|
||||||
type = types.lines;
|
|
||||||
example = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
mkListOfStringOpt = default: mkOption {
|
|
||||||
inherit default;
|
|
||||||
type = types.listOf types.lines;
|
|
||||||
example = [ "a" "b" "c" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
mkPath = path:
|
|
||||||
if path != null
|
|
||||||
then toString path
|
|
||||||
else "";
|
|
||||||
}
|
|
@ -1,16 +1,17 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.desktop.apps.qbittorrent;
|
let cfg = config.modules.desktop.apps.qbittorrent;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.apps.qbittorrent = {
|
options.modules.desktop.apps.qbittorrent = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
qbittorrent
|
qbittorrent
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.desktop.apps.slack;
|
let cfg = config.modules.desktop.apps.slack;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.apps.slack = {
|
options.modules.desktop.apps.slack = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
slack
|
slack
|
||||||
];
|
];
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.desktop.apps.thunderbird;
|
let cfg = config.modules.desktop.apps.thunderbird;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.apps.thunderbird = {
|
options.modules.desktop.apps.thunderbird = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source = inputs.thunderbird-gnome-theme;
|
home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source = inputs.thunderbird-gnome-theme;
|
||||||
|
|
||||||
home.programs.thunderbird = {
|
home.programs.thunderbird = {
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.desktop.apps.zoom;
|
let cfg = config.modules.desktop.apps.zoom;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.apps.zoom = {
|
options.modules.desktop.apps.zoom = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
zoom-us
|
zoom-us
|
||||||
];
|
];
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.desktop.browsers.firefox;
|
let cfg = config.modules.desktop.browsers.firefox;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.browsers.firefox = {
|
options.modules.desktop.browsers.firefox = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source = inputs.firefox-gnome-theme;
|
home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source = inputs.firefox-gnome-theme;
|
||||||
|
|
||||||
home.programs.firefox = {
|
home.programs.firefox = {
|
||||||
|
@ -1,34 +1,59 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.desktop.gaming.emulators;
|
let cfg = config.modules.desktop.gaming.emulators;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.gaming.emulators = {
|
options.modules.desktop.gaming.emulators = {
|
||||||
ds.enable = mkBoolOpt false;
|
ds.enable = lib.mkOption {
|
||||||
gb.enable = mkBoolOpt false;
|
default = false;
|
||||||
gba.enable = mkBoolOpt false;
|
example = true;
|
||||||
gamecube.enable = mkBoolOpt false;
|
};
|
||||||
ps2.enable = mkBoolOpt false;
|
gb.enable = lib.mkOption {
|
||||||
ps3.enable = mkBoolOpt false;
|
default = false;
|
||||||
psp.enable = mkBoolOpt false;
|
example = true;
|
||||||
snes.enable = mkBoolOpt false;
|
};
|
||||||
wii.enable = mkBoolOpt false;
|
gba.enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
|
gamecube.enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
|
ps2.enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
|
ps3.enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
|
psp.enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
|
snes.enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
|
wii.enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
(mkIf cfg.ps2.enable pcsx2)
|
(lib.mkIf cfg.ps2.enable pcsx2)
|
||||||
(mkIf cfg.ps3.enable rpcs3)
|
(lib.mkIf cfg.ps3.enable rpcs3)
|
||||||
(mkIf cfg.psp.enable ppsspp)
|
(lib.mkIf cfg.psp.enable ppsspp)
|
||||||
(mkIf cfg.ds.enable desmume)
|
(lib.mkIf cfg.ds.enable desmume)
|
||||||
(mkIf (cfg.gba.enable ||
|
(lib.mkIf (cfg.gba.enable ||
|
||||||
cfg.gb.enable ||
|
cfg.gb.enable ||
|
||||||
cfg.snes.enable)
|
cfg.snes.enable)
|
||||||
higan)
|
higan)
|
||||||
(mkIf (cfg.wii.enable ||
|
(lib.mkIf (cfg.wii.enable ||
|
||||||
cfg.gamecube.enable)
|
cfg.gamecube.enable)
|
||||||
dolphin-emu)
|
dolphin-emu)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.desktop.gaming.lutris;
|
let cfg = config.modules.desktop.gaming.lutris;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.gaming.lutris = {
|
options.modules.desktop.gaming.lutris = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
lutris
|
lutris
|
||||||
vulkan-loader
|
vulkan-loader
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.desktop.gaming.steam;
|
let cfg = config.modules.desktop.gaming.steam;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.gaming.steam = {
|
options.modules.desktop.gaming.steam = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.steam.enable = true;
|
programs.steam.enable = true;
|
||||||
|
|
||||||
systemd.extraConfig = "DefaultLimitNOFILE=1048576";
|
systemd.extraConfig = "DefaultLimitNOFILE=1048576";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.desktop.gnome;
|
let cfg = config.modules.desktop.gnome;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.gnome = {
|
options.modules.desktop.gnome = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
displayManager.gdm.enable = true;
|
displayManager.gdm.enable = true;
|
||||||
|
@ -1,21 +1,28 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.desktop.media.graphics;
|
let cfg = config.modules.desktop.media.graphics;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.media.graphics = {
|
options.modules.desktop.media.graphics = {
|
||||||
modeling.enable = mkBoolOpt false;
|
modeling.enable = lib.mkOption {
|
||||||
raster.enable = mkBoolOpt false;
|
default = false;
|
||||||
vector.enable = mkBoolOpt false;
|
example = true;
|
||||||
|
};
|
||||||
|
raster.enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
|
vector.enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
(mkIf cfg.modeling.enable blender)
|
(lib.mkIf cfg.modeling.enable blender)
|
||||||
(mkIf cfg.raster.enable gimp)
|
(lib.mkIf cfg.raster.enable gimp)
|
||||||
(mkIf cfg.raster.enable krita)
|
(lib.mkIf cfg.raster.enable krita)
|
||||||
(mkIf cfg.vector.enable inkscape)
|
(lib.mkIf cfg.vector.enable inkscape)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.desktop.media.recording;
|
let cfg = config.modules.desktop.media.recording;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.media.recording = {
|
options.modules.desktop.media.recording = {
|
||||||
audio.enable = mkBoolOpt false;
|
audio.enable = lib.mkOption {
|
||||||
video.enable = mkBoolOpt false;
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
|
video.enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@ -21,4 +25,4 @@ in {
|
|||||||
obs-studio
|
obs-studio
|
||||||
] else []);
|
] else []);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.desktop.mimeapps;
|
cfg = config.modules.desktop.mimeapps;
|
||||||
avApp = "io.github.celluloid_player.Celluloid.desktop";
|
avApp = "io.github.celluloid_player.Celluloid.desktop";
|
||||||
imageApp = "org.gnome.eog.desktop";
|
imageApp = "org.gnome.eog.desktop";
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.mimeapps = {
|
options.modules.desktop.mimeapps = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
xdg.mime.defaultApplications = {
|
xdg.mime.defaultApplications = {
|
||||||
# Audio/video
|
# Audio/video
|
||||||
"audio/x-vorbis+ogg" = avApp;
|
"audio/x-vorbis+ogg" = avApp;
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.desktop.office.libreoffice;
|
let cfg = config.modules.desktop.office.libreoffice;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.office.libreoffice = {
|
options.modules.desktop.office.libreoffice = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
libreoffice
|
libreoffice
|
||||||
];
|
];
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.dev.cc;
|
let cfg = config.modules.dev.cc;
|
||||||
in {
|
in {
|
||||||
options.modules.dev.cc = {
|
options.modules.dev.cc = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
clang
|
clang
|
||||||
gcc
|
gcc
|
||||||
@ -17,4 +18,4 @@ in {
|
|||||||
llvmPackages.libcxx
|
llvmPackages.libcxx
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.dev.java;
|
let cfg = config.modules.dev.java;
|
||||||
in {
|
in {
|
||||||
options.modules.dev.java = {
|
options.modules.dev.java = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
jdk
|
jdk
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.dev.lua;
|
let cfg = config.modules.dev.lua;
|
||||||
in {
|
in {
|
||||||
options.modules.dev.lua = {
|
options.modules.dev.lua = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
lua
|
lua
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.dev.node;
|
let cfg = config.modules.dev.node;
|
||||||
in {
|
in {
|
||||||
options.modules.dev.node = {
|
options.modules.dev.node = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
nodejs_latest
|
nodejs_latest
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.dev.python;
|
let cfg = config.modules.dev.python;
|
||||||
in {
|
in {
|
||||||
options.modules.dev.python = {
|
options.modules.dev.python = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
python310
|
python310
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.dev.rust;
|
let cfg = config.modules.dev.rust;
|
||||||
in {
|
in {
|
||||||
options.modules.dev.rust = {
|
options.modules.dev.rust = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
rustc
|
rustc
|
||||||
rustup
|
rustup
|
||||||
@ -16,4 +17,4 @@ in {
|
|||||||
rust-bindgen
|
rust-bindgen
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.dev.scala;
|
let cfg = config.modules.dev.scala;
|
||||||
in {
|
in {
|
||||||
options.modules.dev.scala = {
|
options.modules.dev.scala = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
jdk
|
jdk
|
||||||
sbt
|
sbt
|
||||||
scala
|
scala
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.dev.shell;
|
let cfg = config.modules.dev.shell;
|
||||||
in {
|
in {
|
||||||
options.modules.dev.shell = {
|
options.modules.dev.shell = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
shellcheck
|
shellcheck
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.dev.zig;
|
let cfg = config.modules.dev.zig;
|
||||||
in {
|
in {
|
||||||
options.modules.dev.zig = {
|
options.modules.dev.zig = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
zig
|
zig
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.editors.neovim;
|
cfg = config.modules.editors.neovim;
|
||||||
dev = config.modules.dev;
|
dev = config.modules.dev;
|
||||||
in {
|
in {
|
||||||
options.modules.editors.neovim = {
|
options.modules.editors.neovim = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
(neovim.override {
|
(neovim.override {
|
||||||
configure = {
|
configure = {
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.editors.vscode;
|
let cfg = config.modules.editors.vscode;
|
||||||
in {
|
in {
|
||||||
options.modules.editors.vscode = {
|
options.modules.editors.vscode = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
|
|
||||||
home.programs.vscode = {
|
home.programs.vscode = {
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.networking.tailscale;
|
let cfg = config.modules.networking.tailscale;
|
||||||
in {
|
in {
|
||||||
options.modules.networking.tailscale = {
|
options.modules.networking.tailscale = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
restrictSSH = mkBoolOpt true;
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
|
restrictSSH = lib.mkOption {
|
||||||
|
default = true;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
services.openssh.openFirewall = !cfg.restrictSSH;
|
services.openssh.openFirewall = !cfg.restrictSSH;
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
{ config, options, lib, home-manager, ... }:
|
{ config, options, lib, home-manager, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
with lib.my;
|
|
||||||
{
|
{
|
||||||
options = with types; {
|
options = with types; {
|
||||||
user = mkOpt attrs { };
|
user = mkOption { type = attrs; default = { }; };
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
configFile = mkOpt' attrs { } "Files to place in $XDG_CONFIG_HOME";
|
configFile = mkOption { type = attrs; default = { }; description = "Files to place in $XDG_CONFIG_HOME"; };
|
||||||
dataFile = mkOpt' attrs { } "Files to place in $XDG_DATA_HOME";
|
dataFile = mkOption { type = attrs; default = { }; description = "Files to place in $XDG_DATA_HOME"; };
|
||||||
file = mkOpt' attrs { } "Files to place directly in $HOME";
|
file = mkOption { type = attrs; default = { }; description = "Files to place directly in $HOME"; };
|
||||||
packages = mkOpt' attrs { } "User-level installed packages";
|
packages = mkOption { type = attrs; default = { }; description = "User-level installed packages"; };
|
||||||
programs = mkOpt' attrs { } "Programs managed directly from home-manager";
|
programs = mkOption { type = attrs; default = { }; description = "Programs managed directly from home-manager"; };
|
||||||
services = mkOpt' attrs { } "Services managed directly from home-manager";
|
services = mkOption { type = attrs; default = { }; description = "Services managed directly from home-manager"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
dconf.settings = mkOpt' attrs { } "dconf settings to enable";
|
dconf.settings = mkOption { type = attrs; default = { }; description = "dconf settings to enable"; };
|
||||||
|
|
||||||
env = mkOption {
|
env = mkOption {
|
||||||
type = attrsOf (oneOf [ str path (listOf (either str path)) ]);
|
type = attrsOf (oneOf [ str path (listOf (either str path)) ]);
|
||||||
@ -69,8 +68,6 @@ with lib.my;
|
|||||||
|
|
||||||
users.users.${config.user.name} = mkAliasDefinitions options.user;
|
users.users.${config.user.name} = mkAliasDefinitions options.user;
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
environment.extraInit =
|
environment.extraInit =
|
||||||
concatStringsSep "\n"
|
concatStringsSep "\n"
|
||||||
(mapAttrsToList (n: v: "export ${n}=\"${v}\"") config.env);
|
(mapAttrsToList (n: v: "export ${n}=\"${v}\"") config.env);
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.security.gpg;
|
let cfg = config.modules.security.gpg;
|
||||||
in {
|
in {
|
||||||
options.modules.security.gpg = {
|
options.modules.security.gpg = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.programs.gpg = {
|
home.programs.gpg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
@ -18,4 +19,4 @@ in {
|
|||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.security.pass;
|
let cfg = config.modules.security.pass;
|
||||||
in {
|
in {
|
||||||
options.modules.security.pass = {
|
options.modules.security.pass = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.programs.password-store = {
|
home.programs.password-store = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
|
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.shell.git;
|
let cfg = config.modules.shell.git;
|
||||||
in {
|
in {
|
||||||
options.modules.shell.git = {
|
options.modules.shell.git = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.programs.git = {
|
home.programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
aliases = {
|
aliases = {
|
||||||
@ -35,4 +36,4 @@ in {
|
|||||||
"git/ignore".source = ./ignore;
|
"git/ignore".source = ./ignore;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with lib.my;
|
|
||||||
let cfg = config.modules.shell.zsh;
|
let cfg = config.modules.shell.zsh;
|
||||||
in {
|
in {
|
||||||
options.modules.shell.zsh = {
|
options.modules.shell.zsh = {
|
||||||
enable = mkBoolOpt false;
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
|
Reference in New Issue
Block a user