use namespace for my options
This commit is contained in:
parent
64fcba43f0
commit
1b1e7f792f
9 changed files with 49 additions and 50 deletions
|
|
@ -131,7 +131,5 @@
|
|||
};
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||
formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.alejandra;
|
||||
|
||||
description = "My system configuration";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,14 +21,13 @@ in {
|
|||
sshUser = "osbm";
|
||||
}
|
||||
];
|
||||
|
||||
myModules = {
|
||||
enableKDE = false;
|
||||
enableFonts = false;
|
||||
|
||||
blockYoutube = false;
|
||||
blockTwitter = false;
|
||||
|
||||
enableTailscale = true;
|
||||
};
|
||||
|
||||
i18n.inputMethod.enable = lib.mkForce false; # no need for japanese input method
|
||||
programs.firefox.enable = lib.mkForce false; # no need for firefox
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ in {
|
|||
../../modules
|
||||
];
|
||||
|
||||
myModules = {
|
||||
blockYoutube = false;
|
||||
blockTwitter = true;
|
||||
blockBluesky = false;
|
||||
|
||||
enableKDE = true;
|
||||
|
||||
enableTailscale = true;
|
||||
};
|
||||
|
||||
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
nix.settings.extra-platforms = config.boot.binfmt.emulatedSystems;
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@ in {
|
|||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
myModules = {
|
||||
blockYoutube = false;
|
||||
blockTwitter = true;
|
||||
blockBluesky = false;
|
||||
|
||||
enableKDE = true;
|
||||
|
||||
enableTailscale = true;
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}: {
|
||||
options = {
|
||||
arduinoSetup = lib.mkOption {
|
||||
myModules.arduinoSetup = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Installs arduino-ide and adafruit-nrfutil and sets udev rules";
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.arduinoSetup {
|
||||
(lib.mkIf config.myModules.arduinoSetup {
|
||||
environment.systemPackages = with pkgs; [
|
||||
arduino-ide
|
||||
adafruit-nrfutil
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
...
|
||||
}: {
|
||||
options = {
|
||||
myModules = {
|
||||
blockYoutube = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
|
|
@ -21,9 +22,10 @@
|
|||
description = "Disables bluesky using /etc/hosts file";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.blockYoutube {
|
||||
(lib.mkIf config.myModules.blockYoutube {
|
||||
networking.extraHosts = ''
|
||||
0.0.0.0 youtube.com
|
||||
::0 youtube.com
|
||||
|
|
@ -32,7 +34,7 @@
|
|||
::0 www.youtube.com
|
||||
'';
|
||||
})
|
||||
(lib.mkIf config.blockTwitter {
|
||||
(lib.mkIf config.myModules.blockTwitter {
|
||||
networking.extraHosts = ''
|
||||
0.0.0.0 twitter.com
|
||||
::0 twitter.com
|
||||
|
|
@ -41,7 +43,7 @@
|
|||
::0 www.twitter.com
|
||||
'';
|
||||
})
|
||||
(lib.mkIf config.blockBluesky {
|
||||
(lib.mkIf config.myModules.blockBluesky {
|
||||
networking.extraHosts = ''
|
||||
0.0.0.0 bsky.app
|
||||
::0 bsky.app
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}: {
|
||||
options = {
|
||||
enableFonts = lib.mkOption {
|
||||
myModules.enableFonts = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable my favorite fonts";
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.enableFonts {
|
||||
(lib.mkIf config.myModules.enableFonts {
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}: {
|
||||
options = {
|
||||
enableKDE = lib.mkOption {
|
||||
myModules.enableKDE = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable KDE Plasma Desktop Environment with my favorite packages";
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.enableKDE {
|
||||
(lib.mkIf config.myModules.enableKDE {
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = true;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}: {
|
||||
options = {
|
||||
enableTailscale = lib.mkOption {
|
||||
myModules.enableTailscale = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Tailscale VPN";
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
# and i have a laptop named tartarus
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.enableTailscale {
|
||||
(lib.mkIf config.myModules.enableTailscale {
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
port = 51513;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue