Refactor modules style
This commit is contained in:
parent
ed2a7f94cf
commit
cc95386f1a
44 changed files with 455 additions and 297 deletions
|
|
@ -16,7 +16,7 @@
|
|||
specialArgs = { inherit inputs; };
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./systems/shared
|
||||
./nixosModules
|
||||
] ++ extraModules;
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
alsa.enable = false;
|
||||
alsa.support32Bit = false;
|
||||
pulse.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ inputs, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ inputs.aagl.nixosModules.default ];
|
||||
nix.settings = inputs.aagl.nixConfig;
|
||||
|
||||
programs.honkers-railway-launcher.enable = true;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
services.input-remapper.enable = true;
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Enable OpenGL
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
];
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
package = pkgs.greetd.tuigreet;
|
||||
settings = {
|
||||
terminal = {
|
||||
vt = 2;
|
||||
};
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
|
||||
user = "pan";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
security.polkit.enable = true;
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
services.blueman.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
blueman
|
||||
];
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
environment.variables.WEBBROWSER = "librewolf";
|
||||
environment.systemPackages = with pkgs; [ librewolf ];
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
networking.wireless = {
|
||||
enable = true;
|
||||
userControlled = {
|
||||
enable = true;
|
||||
group = "network";
|
||||
};
|
||||
networks = {
|
||||
"The Kabal 2.4" = {
|
||||
pskRaw = "56302c1b1c7499f4a4f0e01cefe14b4393c5092420ebf71c68336cd084acd357";
|
||||
priority = 1;
|
||||
};
|
||||
"WWUwireless-Secure" = {
|
||||
auth = ''
|
||||
key_mgmt=WPA-EAP
|
||||
eap=PEAP
|
||||
identity="langed@wwu.edu"
|
||||
password="Slashed-Tidy4-Cubbyhole"
|
||||
'';
|
||||
priority = 1;
|
||||
};
|
||||
"Yellowsticky" = {
|
||||
pskRaw = "8984d7e1e2f5bd9c3ccf92e429886bc64d40d42d4771ed5946556227afa4abf0";
|
||||
priority = 1;
|
||||
};
|
||||
"Lange" = {
|
||||
pskRaw = "bbbbf63e23747bc0ff36aed4c20dcee0221a6ccb2d2db07e4c64058e645e5f1e";
|
||||
priority = 1;
|
||||
};
|
||||
"foofoo2" = {
|
||||
pskRaw = "1269f8db0aec9d9c30bff6de9951f0ab2d18d7cea4dacd8bd253ebc237e73e2d";
|
||||
priority = 1;
|
||||
};
|
||||
"OrbiWanKenobe" = {
|
||||
pskRaw = "0128447a146d359c1224e558b0f4e3fc0a53b0b4a178334075b50f8d07e179d2";
|
||||
priority = 1;
|
||||
};
|
||||
"Homura" = {
|
||||
pskRaw = "dd77456e1df3f2c17bccc917a0e609684fa6d2ccb6a2e0fb122d50d243e0c87e";
|
||||
priority = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
networking.enableIPv6 = false;
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "pan";
|
||||
dataDir = "/home/pan/dox/Sync";
|
||||
configDir = "/home/pan/.config/syncthing";
|
||||
overrideFolders = true;
|
||||
overrideDevices = true;
|
||||
|
||||
settings = {
|
||||
gui = {
|
||||
user = "pan";
|
||||
password = "password";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{ inputs, pkgs, lib, ... }:
|
||||
let rootPath = ./.; in
|
||||
{
|
||||
imports = [ inputs.sops-nix.nixosModules.sops ];
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = rootPath + "secrets.yaml";
|
||||
defaultSopsFormat = "yaml";
|
||||
age.keyFile = "/home/pan/.config/sops/age/keys.txt";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.fish.enable = true;
|
||||
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
|
||||
environment.shells = with pkgs; [ fish ];
|
||||
|
||||
# environment.variables.NIX_BUILD_SHELL = "fish";
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.xonsh.enable = true;
|
||||
|
||||
users.defaultUserShell = pkgs.xonsh;
|
||||
|
||||
environment.shells = with pkgs; [ xonsh ];
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.timeout = 1;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
security.polkit.enable = true;
|
||||
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# "Essential" Packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
neovim
|
||||
nnn
|
||||
xdg-user-dirs
|
||||
];
|
||||
|
||||
# XDG Compliance
|
||||
xdg.portal.config.common.default = "*";
|
||||
environment.sessionVariables = rec {
|
||||
XDG_CONFIG_HOME = "\${HOME}/.config";
|
||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
||||
XDG_STATE_HOME = "\${HOME}/.local/state";
|
||||
XDG_DATA_HOME = "\${HOME}/.local/share";
|
||||
XDG_BIN_HOME = "\${HOME}/.local/bin";
|
||||
PATH = [
|
||||
"\${HOME}/prog/scripts"
|
||||
];
|
||||
};
|
||||
|
||||
users.groups = {
|
||||
wheel = { };
|
||||
network = { };
|
||||
};
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
cascadia-code
|
||||
source-han-sans # Pan-CJK font
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
users.users.pan = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "network" ];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{ inputs, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ inputs.hyprland.nixosModules.default ];
|
||||
programs.hyprland.enable = true;
|
||||
nix.settings = {
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
}
|
||||
11
nixosModules/apps/default.nix
Normal file
11
nixosModules/apps/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
import = [
|
||||
./games
|
||||
./input-remapper
|
||||
./librewolf
|
||||
./shells
|
||||
./syncthing
|
||||
];
|
||||
}
|
||||
26
nixosModules/apps/games/anime-launcher/default.nix
Normal file
26
nixosModules/apps/games/anime-launcher/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ config, inputs, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
aagl.enable = lib.mkEnableOption
|
||||
"Enables another anime game launcher settings";
|
||||
aagl.honkai-rail = lib.mkEnableOption
|
||||
"Enables honkai star rail";
|
||||
aagl.genshin = lib.mkEnableOption
|
||||
"Enables genshin impact";
|
||||
aagl.honkai-3rd = lib.mkEnableOption
|
||||
"Enables honkai 3rd impact";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.aagl.enable {
|
||||
imports = [ inputs.aagl.nixosModules.default ];
|
||||
nix.settings = inputs.aagl.nixConfig;
|
||||
|
||||
programs.honkers-railway-launcher.enable =
|
||||
lib.mkIf config.aagl.honkai-rail true;
|
||||
programs.anime-game-launcher.enable =
|
||||
lib.mkIf config.aagl.genshin true;
|
||||
programs.honkers-launcher.enable =
|
||||
lib.mkIf config.aagl.honkai-3rd true;
|
||||
};
|
||||
}
|
||||
8
nixosModules/apps/games/default.nix
Normal file
8
nixosModules/apps/games/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
import = [
|
||||
./anime-launcher
|
||||
./steam
|
||||
];
|
||||
}
|
||||
15
nixosModules/apps/games/steam/default.nix
Normal file
15
nixosModules/apps/games/steam/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
steam.enable = lib.mkEnableOption "Enables steam";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.steam.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
11
nixosModules/apps/input-remapper/default.nix
Normal file
11
nixosModules/apps/input-remapper/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
input-remapper.enable = lib.mkEnableOption "Enables input-remapper";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.input-remapper.enable {
|
||||
services.input-remapper.enable = true;
|
||||
};
|
||||
}
|
||||
12
nixosModules/apps/librewolf/default.nix
Normal file
12
nixosModules/apps/librewolf/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
librewolf.enable = lib.mkEnableOption "Enables librewolf";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.librewolf.enable {
|
||||
environment.variables.BROWSER = "librewolf";
|
||||
environment.systemPackages = with pkgs; [ librewolf ];
|
||||
};
|
||||
}
|
||||
15
nixosModules/apps/shells/fish/default.nix
Normal file
15
nixosModules/apps/shells/fish/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
fish.enable = lib.mkEnableOption "Enables fish";
|
||||
fish.setDefault = lib.mkEnableOption
|
||||
"Sets fish as the default user's shell";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.fish.enable {
|
||||
programs.fish.enable = true;
|
||||
users.users.defaultUser.shell = lib.mkIf config.fish.setDefault pkgs.fish;
|
||||
environment.shells = with pkgs; [ fish ];
|
||||
};
|
||||
}
|
||||
15
nixosModules/apps/shells/xonsh/default.nix
Normal file
15
nixosModules/apps/shells/xonsh/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
xonsh.enable = lib.mkEnableOption "Enables xonsh";
|
||||
xonsh.setDefault = lib.mkEnableOption
|
||||
"Sets xonsh as the default user's shell";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.xonsh.enable {
|
||||
programs.xonsh.enable = true;
|
||||
users.users.defaultUser.shell = lib.mkIf config.fish.setDefault pkgs.xonsh;
|
||||
environment.shells = with pkgs; [ xonsh ];
|
||||
};
|
||||
}
|
||||
25
nixosModules/apps/syncthing/default.nix
Normal file
25
nixosModules/apps/syncthing/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
syncthing.enable = lib.mkEnableOption "Enables syncthing";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.syncthing.enable {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = config.user.name;
|
||||
dataDir = "/home/" + config.user.name + "/dox/Sync";
|
||||
configDir = "/home/" + config.user.name + "/.config/syncthing";
|
||||
overrideFolders = true;
|
||||
overrideDevices = true;
|
||||
|
||||
settings = {
|
||||
gui = {
|
||||
user = config.user.name;
|
||||
password = "password";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
8
nixosModules/default.nix
Normal file
8
nixosModules/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
import = [
|
||||
./apps
|
||||
./services
|
||||
];
|
||||
}
|
||||
12
nixosModules/services/default.nix
Normal file
12
nixosModules/services/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
import = [
|
||||
./graphics
|
||||
./networking
|
||||
./pipewire
|
||||
./polkit
|
||||
./sops-nix
|
||||
./system
|
||||
];
|
||||
}
|
||||
9
nixosModules/services/graphics/default.nix
Normal file
9
nixosModules/services/graphics/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./display_manager
|
||||
./nvidia
|
||||
./wayland_compositors
|
||||
];
|
||||
}
|
||||
23
nixosModules/services/graphics/display_manager/default.nix
Normal file
23
nixosModules/services/graphics/display_manager/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
tuigreet.enable = lib.mkEnableOption "enables tuigreet with greetd";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.tuigreet.enable {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
package = pkgs.greetd.tuigreet;
|
||||
settings = {
|
||||
terminal = {
|
||||
vt = 2;
|
||||
};
|
||||
default_session = lib.mkIf config.hyprland.enable {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
|
||||
user = config.user.name;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
28
nixosModules/services/graphics/nvidia/default.nix
Normal file
28
nixosModules/services/graphics/nvidia/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
nvidia.enable = lib.mkEnableOption
|
||||
"Enables nvidia with proprietary drivers";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.nvidia.enable {
|
||||
# Enable OpenGL
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{ inputs, config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
hyprland.enable = lib.mkEnableOption "Enables hyprland";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.hyprland.enable {
|
||||
imports = [ inputs.hyprland.nixosModules.default ];
|
||||
programs.hyprland.enable = true;
|
||||
nix.settings = {
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
16
nixosModules/services/networking/bluetooth/default.nix
Normal file
16
nixosModules/services/networking/bluetooth/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
bluetooth.enable = lib.mkEnableOption "Enables Bluetooth with blueman";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.bluetooth.enable {
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
services.blueman.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
blueman
|
||||
];
|
||||
};
|
||||
}
|
||||
8
nixosModules/services/networking/default.nix
Normal file
8
nixosModules/services/networking/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
import = [
|
||||
./bluetooth
|
||||
./wireless
|
||||
];
|
||||
}
|
||||
33
nixosModules/services/networking/wireless/default.nix
Normal file
33
nixosModules/services/networking/wireless/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
wireless.enable = lib.mkEnableOption "Enables wireless";
|
||||
};
|
||||
|
||||
config = lib.mkIf confi.wireless.enable {
|
||||
networking.wireless = {
|
||||
enable = true;
|
||||
userControlled = {
|
||||
enable = true;
|
||||
group = "network";
|
||||
};
|
||||
networks = {
|
||||
"foofoo2" = {
|
||||
pskRaw = "1269f8db0aec9d9c30bff6de9951f0ab2d18d7cea4dacd8bd253ebc237e73e2d";
|
||||
priority = 1;
|
||||
};
|
||||
"OrbiWanKenobe" = {
|
||||
pskRaw = "0128447a146d359c1224e558b0f4e3fc0a53b0b4a178334075b50f8d07e179d2";
|
||||
priority = 1;
|
||||
};
|
||||
"Homura" = {
|
||||
pskRaw = "dd77456e1df3f2c17bccc917a0e609684fa6d2ccb6a2e0fb122d50d243e0c87e";
|
||||
priority = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.enableIPv6 = false;
|
||||
};
|
||||
}
|
||||
21
nixosModules/services/pipewire/default.nix
Normal file
21
nixosModules/services/pipewire/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
pipewire.enable = lib.mkEnableOption "Enables pipewire and pulsemixer";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.pipewire.enable {
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
alsa.enable = false;
|
||||
alsa.support32Bit = false;
|
||||
pulse.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
pulsemixer
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
14
nixosModules/services/polkit/default.nix
Normal file
14
nixosModules/services/polkit/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
polkit.enable = lib.mkEnableOption "Enables polkit with kde handler";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.polkit.enable {
|
||||
security.polkit.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
polkit-kde-agent
|
||||
];
|
||||
}
|
||||
}
|
||||
20
nixosModules/services/sops-nix/default.nix
Normal file
20
nixosModules/services/sops-nix/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ inputs, config, pkgs, lib, ... }:
|
||||
let rootPath = ./.; in
|
||||
{
|
||||
options = {
|
||||
sops-nix.enable = lib.mkEnableOption "Enables nix-sops for secret management";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sops-nix.enable {
|
||||
imports = [ inputs.sops-nix.nixosModules.sops ];
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = rootPath + "secrets.yaml";
|
||||
defaultSopsFormat = "yaml";
|
||||
age.keyFile = "/home/" + config.user.name + ".config/sops/age/keys.txt";
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
sops
|
||||
];
|
||||
};
|
||||
}
|
||||
61
nixosModules/services/system/default.nix
Normal file
61
nixosModules/services/system/default.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
user.name = lib.mkOption { default = "pan"; };
|
||||
user.timezone = lib.mkOption { default = "America/Los_Angeles"; };
|
||||
font.extraFonts = lib.mkOption { default = []; };
|
||||
};
|
||||
|
||||
config = {
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.timeout = 1;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
time.timeZone = config.user.timezone;
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# "Essential" Packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
neovim
|
||||
nnn
|
||||
xdg-user-dirs
|
||||
];
|
||||
|
||||
# XDG Compliance
|
||||
xdg.portal.config.common.default = "*";
|
||||
environment.sessionVariables = rec {
|
||||
XDG_CONFIG_HOME = "\${HOME}/.config";
|
||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
||||
XDG_STATE_HOME = "\${HOME}/.local/state";
|
||||
XDG_DATA_HOME = "\${HOME}/.local/share";
|
||||
XDG_BIN_HOME = "\${HOME}/.local/bin";
|
||||
PATH = [
|
||||
"\${HOME}/prog/scripts"
|
||||
];
|
||||
};
|
||||
|
||||
users.groups = {
|
||||
wheel = { };
|
||||
network = { };
|
||||
};
|
||||
|
||||
users.users.defaultUser = {
|
||||
name = config.user.name;
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "network" ];
|
||||
};
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
cascadia-code
|
||||
source-han-sans # Pan-CJK font
|
||||
] ++ config.system.extraFonts;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,11 +1,28 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
networking.hostName = "jibril";
|
||||
imports = [
|
||||
./hardware.nix
|
||||
|
||||
../../modules/network/bluetooth
|
||||
../../modules/network/networking
|
||||
];
|
||||
networking.hostName = "jibril";
|
||||
nix.package = pkgs.nixUnstable;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
config = {
|
||||
pipewire.enable = true;
|
||||
polkit.enable = true;
|
||||
bluetooth.enable = true;
|
||||
wireless.enable = true;
|
||||
|
||||
user.name = "pan";
|
||||
user.timezone = "America/Los_Angeles";
|
||||
|
||||
tuigreet.enable = true;
|
||||
hyprland.enable = true;
|
||||
|
||||
librewolf.enable = true;
|
||||
xonsh.enable = true;
|
||||
syncthing.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,32 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
networking.hostName = "onizuka";
|
||||
imports = [
|
||||
./hardware.nix
|
||||
../../modules/graphics/nvidia
|
||||
../../modules/etc/steam
|
||||
../../modules/etc/anime-launcher
|
||||
../../modules/etc/input-remapper
|
||||
];
|
||||
networking.hostName = "onizuka";
|
||||
nix.package = pkgs.nixUnstable;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
config = {
|
||||
nvidia.enable = true;
|
||||
pipewire.enable = true;
|
||||
polkit.enable = true;
|
||||
|
||||
user.name = "pan";
|
||||
user.timezone = "America/Los_Angeles";
|
||||
|
||||
tuigreet.enable = true;
|
||||
hyprland.enable = true;
|
||||
|
||||
librewolf.enable = true;
|
||||
xonsh.enable = true;
|
||||
syncthing.enable = true;
|
||||
|
||||
steam.enable = true;
|
||||
aagl.enable = true;
|
||||
aagl.honkai-rail = true;
|
||||
input-remapper.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
nix.package = pkgs.nixUnstable;
|
||||
imports =
|
||||
[
|
||||
# System essentials (boot, lang, hostname, ...)
|
||||
../../modules/audio/pipewire
|
||||
../../modules/login/polkit
|
||||
../../modules/system
|
||||
../../modules/user
|
||||
|
||||
../../modules/shell/xonsh
|
||||
../../modules/network/browsers/librewolf
|
||||
../../modules/network/syncthing
|
||||
|
||||
../../modules/themeing
|
||||
../../modules/login/greetd
|
||||
../../modules/window_managers/hyprland
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue