common: move to modules, move some files out, modules: adjust dir structure
This commit is contained in:
parent
ed5f8c3ae6
commit
0bc9abc4c0
43 changed files with 86 additions and 83 deletions
12
modules/nixos/system/default.nix
Normal file
12
modules/nixos/system/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./desktop.nix
|
||||
./home-manager.nix
|
||||
./scx.nix
|
||||
./stylix.nix
|
||||
./swap.nix
|
||||
./yubikey.nix
|
||||
];
|
||||
}
|
||||
40
modules/nixos/system/desktop.nix
Executable file
40
modules/nixos/system/desktop.nix
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
hardware = {
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
# mesa graphics library
|
||||
graphics.enable = true;
|
||||
};
|
||||
|
||||
# audio
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
|
||||
# CUPS
|
||||
services.printing.enable = true;
|
||||
|
||||
# enable native wayland in chromium/electron
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bitwarden
|
||||
krita
|
||||
vlc
|
||||
gpu-screen-recorder-gtk
|
||||
];
|
||||
|
||||
# needed alongside the GUI app for promptless recording
|
||||
programs.gpu-screen-recorder.enable = true;
|
||||
}
|
||||
18
modules/nixos/system/home-manager.nix
Executable file
18
modules/nixos/system/home-manager.nix
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
{ inputs, config, ... }:
|
||||
|
||||
{
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "bak";
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
users.wo2w = {
|
||||
home = {
|
||||
username = "wo2w";
|
||||
homeDirectory = "/home/wo2w";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
10
modules/nixos/system/scx.nix
Normal file
10
modules/nixos/system/scx.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.scx = {
|
||||
enable = true;
|
||||
package = pkgs.scx.rustscheds;
|
||||
# use gaming performance scheduler
|
||||
scheduler = "scx_lavd";
|
||||
};
|
||||
}
|
||||
44
modules/nixos/system/stylix.nix
Executable file
44
modules/nixos/system/stylix.nix
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ inputs.stylix.nixosModules.stylix ];
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
|
||||
targets = {
|
||||
fontconfig.enable = false;
|
||||
font-packages.enable = false;
|
||||
};
|
||||
fonts = {
|
||||
sizes = {
|
||||
applications = 12;
|
||||
desktop = 10;
|
||||
popups = 10;
|
||||
terminal = 12;
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.hack;
|
||||
name = "Hack Nerd Font";
|
||||
};
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-color-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.wo2w.stylix = {
|
||||
enable = true;
|
||||
targets = {
|
||||
btop.enable = false;
|
||||
spicetify.enable = false;
|
||||
vesktop.enable = false;
|
||||
vscode.enable = false;
|
||||
fontconfig.enable = false;
|
||||
font-packages.enable = false;
|
||||
librewolf.profileNames = [ "wo2w" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
8
modules/nixos/system/swap.nix
Executable file
8
modules/nixos/system/swap.nix
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
swapDevices = [ {
|
||||
device = "/var/swapfile";
|
||||
size = 16*1024;
|
||||
} ];
|
||||
}
|
||||
9
modules/nixos/system/yubikey.nix
Executable file
9
modules/nixos/system/yubikey.nix
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
# enable yubikey u2f for use with pam
|
||||
security.pam.services = {
|
||||
sudo.u2fAuth = true;
|
||||
polkit-1.u2fAuth = if config.services.desktopManager.plasma6.enable then true else false;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue