Significant progress

This commit is contained in:
Jan Bulthuis committed 2024-07-18 13:48:49 +02:00
1 parent f80047be52
commit 5f66c1c631
28 files changed
+264 -102

No files matched your search

+17 -3
View File
@@ -1,9 +1,23 @@
{ lib, config, pkgs, ... }:
{
with lib; {
imports = [
./greetd/default.nix
./tuigreet/default.nix
# Import modules
./greeter/greetd/default.nix
./greeter/greetd/tuigreet.nix
./locale/default.nix
./neovim/default.nix
./sound/pipewire.nix
./users/default.nix
./unfree/default.nix
./vpn/tailscale.nix
./wifi/wpa_supplicant.nix
];
config.modules = {
# Enable default modules
neovim.enable = mkDefault true;
tuigreet.enable = mkDefault true;
tailscale.enable = mkDefault true;
};
}
File renamed without changes.
File renamed without changes.
+9
View File
@@ -0,0 +1,9 @@
{ lib, config, pkgs, ... }:
{
config = {
time.timeZone = "Europe/Amsterdam";
i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "us";
};
}
+17
View File
@@ -0,0 +1,17 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.neovim;
in {
options.modules.neovim = {
enable = mkEnableOption "neovim";
};
config = mkIf cfg.enable {
programs.neovim = {
enable = true;
defaultEditor = true;
};
};
}
View File
Whitespace-only changes.
+18
View File
@@ -0,0 +1,18 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.pipewire;
in {
options.modules.pipewire = {
enable = mkEnableOption "pipewire";
};
config = mkIf cfg.enable {
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
};
};
}
+18
View File
@@ -0,0 +1,18 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.unfree;
in {
options.modules.unfree = {
enable = mkEnableOption "unfree";
allowedPackages = mkOption {
type = types.listOf types.str;
default = [];
};
};
config = mkIf cfg.enable {
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (getName pkg) cfg.allowedPackages;
};
}
+1 -1
View File
@@ -42,7 +42,7 @@ in {
<home-manager/nixos>
# Import system wide configuration required for user modules
./systemwide/waylock.nix
./modules/systemwide/default.nix
];
options = {
+7 -4
View File
@@ -1,19 +1,22 @@
{ input, pkgs, config, ... }:
{
# Set the state version
home.stateVersion = "24.05";
{
imports = [
# Import all modules
./desktop/default.nix
./discord/default.nix
./feishin/default.nix
./firefox/default.nix
./obsidian/default.nix
./shell/bash.nix
./shell/fish.nix
./steam/default.nix
./theming/default.nix
./vscode/default.nix
./winbox/default.nix
./zathura/default.nix
# Import unfree helper
../../unfree/default.nix
];
}
+18
View File
@@ -0,0 +1,18 @@
{config, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.discord;
in {
options.modules.discord = {
enable = mkEnableOption "discord";
};
config = mkIf cfg.enable {
modules.unfree.allowedPackages = [ "discord" ];
home.packages = with pkgs; [
discord
];
};
}
+5 -2
View File
@@ -1,11 +1,14 @@
{config, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.obsidian;
in {
options.modules.obsidian.enable = lib.mkEnableOption "obsidian";
options.modules.obsidian = {
enable = mkEnableOption "obsidian";
};
config = lib.mkIf cfg.enable {
config = mkIf cfg.enable {
home.packages = with pkgs; [
obsidian
];
+7
View File
@@ -0,0 +1,7 @@
{config, lib, pkgs, ... }:
with lib; {
options.modules.steam = {
enable = mkEnableOption "steam";
};
}
@@ -0,0 +1,10 @@
{ ... }:
{
imports = [
# Import systemwide configuration files.
./river.nix
./steam.nix
./waylock.nix
];
}
@@ -0,0 +1,10 @@
{ lib, config, pkgs, ... }:
with lib;
let
enabled = any (user: user.modules.river.enable) (attrValues config.home-manager.users);
in {
config = mkIf enabled {
programs.river.enable = true;
};
}
@@ -0,0 +1,10 @@
{ lib, config, pkgs, ... }:
with lib;
let
enabled = any (user: user.modules.steam.enable) (attrValues config.home-manager.users);
in {
config = mkIf enabled {
programs.steam.enable = true;
};
}
+2
View File
@@ -6,6 +6,8 @@ in {
options.modules.vscode.enable = lib.mkEnableOption "vscode";
config = lib.mkIf cfg.enable {
modules.unfree.allowedPackages = [ "vscode" ];
home.packages = with pkgs; [
vscode
];
+18
View File
@@ -0,0 +1,18 @@
{config, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.winbox;
in {
options.modules.winbox = {
enable = mkEnableOption "winbox";
};
config = mkIf cfg.enable {
modules.unfree.allowedPackages = [ "winbox" ];
home.packages = with pkgs; [
winbox
];
};
}
+17
View File
@@ -0,0 +1,17 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.tailscale;
in {
options.modules.tailscale = {
enable = mkEnableOption "tailscale";
};
config = mkIf cfg.enable {
services.tailscale = {
enable = true;
useRoutingFeatures = "client";
};
};
}
+18
View File
@@ -0,0 +1,18 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.wpa_supplicant;
in {
options.modules.wpa_supplicant = {
enable = mkEnableOption "wpa_supplicant";
};
config = mkIf cfg.enable {
networking.wireless = {
enable = true;
userControlled.enable = true;
allowAuxiliaryImperativeNetworks = true;
};
};
}