Tuning/refactoring/etc
This commit is contained in:
parent
cdfcbf76e3
commit
73482423ee
28 changed files with 189 additions and 211 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
imports = [ ./bash_complition.nix ];
|
imports = [ ./bash_complition.nix ];
|
||||||
|
|
||||||
home.file.".bash_local".source = files/bash/bash_local;
|
home.file.".bash_local".source = files/bash/bash_local;
|
||||||
home.file.".bash_aliases".source = files/bash/bash_aliases;
|
home.file.".bash_aliases".source = files/bash/bash_aliases;
|
||||||
home.file.".bash_functions".source = files/bash/bash_functions;
|
home.file.".bash_functions".source = files/bash/bash_functions;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,5 @@
|
||||||
|
{ config, pkgs, lib, inputs, osConfig ? null, ... }:
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
osConfig,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
imports = [
|
||||||
./aerc.nix
|
./aerc.nix
|
||||||
./bash.nix
|
./bash.nix
|
||||||
|
|
@ -29,6 +24,7 @@
|
||||||
# ./tui.nix
|
# ./tui.nix
|
||||||
./vifm.nix
|
./vifm.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
inputs.naviterm.packages.${pkgs.stdenv.hostPlatform.system}.default
|
inputs.naviterm.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||||
bc
|
bc
|
||||||
|
|
@ -111,7 +107,7 @@
|
||||||
syncthing = {
|
syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
guiAddress =
|
guiAddress =
|
||||||
if osConfig.variables ? address
|
if osConfig != null && osConfig.variables ? address
|
||||||
then "${osConfig.variables.address}:8384"
|
then "${osConfig.variables.address}:8384"
|
||||||
else "127.0.0.1:8384";
|
else "127.0.0.1:8384";
|
||||||
overrideDevices = false;
|
overrideDevices = false;
|
||||||
|
|
@ -133,7 +129,7 @@
|
||||||
# enableBashIntegration = true;
|
# enableBashIntegration = true;
|
||||||
# keys = "id_aur id_dsa id_ed25519 git C7E41C9F79C846984163693FCCD8E76F07EA701B";
|
# keys = "id_aur id_dsa id_ed25519 git C7E41C9F79C846984163693FCCD8E76F07EA701B";
|
||||||
# };
|
# };
|
||||||
home.file.".links/links.cfg".source = files/links.cfg;
|
home.file.".links/links.cfg".source = ./files/links.cfg;
|
||||||
xdg.configFile."nix/nix.conf".text = ''
|
xdg.configFile."nix/nix.conf".text = ''
|
||||||
extra-experimental-features = flakes nix-command
|
extra-experimental-features = flakes nix-command
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./bufferline.nix ];
|
||||||
|
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = false;
|
defaultEditor = false;
|
||||||
|
|
@ -59,5 +62,4 @@
|
||||||
vimux
|
vimux
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
imports = [ ./bufferline.nix ];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
osConfig,
|
osConfig ? null,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./bash.nix
|
./bash.nix
|
||||||
./btop.nix
|
./btop.nix
|
||||||
|
|
@ -13,6 +16,7 @@
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./topgrade.nix
|
./topgrade.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
figlet
|
figlet
|
||||||
file
|
file
|
||||||
|
|
@ -49,7 +53,7 @@
|
||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.file.".links/links.cfg".source = files/links.cfg;
|
home.file.".links/links.cfg".source = ./files/links.cfg;
|
||||||
xdg.configFile."nix/nix.conf".text = ''
|
xdg.configFile."nix/nix.conf".text = ''
|
||||||
extra-experimental-features = flakes nix-command
|
extra-experimental-features = flakes nix-command
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@
|
||||||
# inputs.nvf.homeManagerModules.default
|
# inputs.nvf.homeManagerModules.default
|
||||||
inputs.nixvim.homeModules.nixvim
|
inputs.nixvim.homeModules.nixvim
|
||||||
./common
|
./common
|
||||||
|
./gui
|
||||||
|
./work
|
||||||
];
|
];
|
||||||
home = {
|
home = {
|
||||||
username = "don";
|
username = "don";
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,30 @@
|
||||||
|
{ pkgs, inputs, config, lib, osConfig ? null, ... }:
|
||||||
|
with lib;
|
||||||
{
|
{
|
||||||
pkgs,
|
imports = [
|
||||||
inputs,
|
./alacritty.nix
|
||||||
config,
|
./autostart.nix
|
||||||
lib,
|
# ./kde.nix
|
||||||
...
|
./librewolf.nix
|
||||||
}:
|
./mpv.nix
|
||||||
with lib; let
|
./qutebrowser.nix
|
||||||
cfg = config.roles.gui;
|
./services.nix
|
||||||
in {
|
./sway.nix
|
||||||
options.roles.gui = {enable = mkEnableOption "roles gui";};
|
./terminals.nix
|
||||||
config = mkIf cfg.enable {
|
./gnome-calendar.nix
|
||||||
home-manager.users.don = {
|
];
|
||||||
imports = [
|
|
||||||
./alacritty.nix
|
config = mkIf (osConfig != null && osConfig ? roles && osConfig.roles ? gui && osConfig.roles.gui.enable) {
|
||||||
./autostart.nix
|
fonts = { fontconfig = { enable = true; }; };
|
||||||
# ./kde.nix
|
nixpkgs.config.allowUnfree = true;
|
||||||
./librewolf.nix
|
nixpkgs.overlays = [
|
||||||
./mpv.nix
|
(final: prev: {
|
||||||
./qutebrowser.nix
|
qutebrowser = prev.qutebrowser.override {
|
||||||
./services.nix
|
enableWideVine = true;
|
||||||
./sway.nix
|
};
|
||||||
./terminals.nix
|
})
|
||||||
];
|
];
|
||||||
fonts = {fontconfig = {enable = true;};};
|
home.packages = with pkgs; [
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
qutebrowser = prev.qutebrowser.override {
|
|
||||||
enableWideVine = true;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# cura
|
# cura
|
||||||
# poweralertd
|
# poweralertd
|
||||||
# prusa-slicer
|
# prusa-slicer
|
||||||
|
|
@ -159,6 +152,5 @@ in {
|
||||||
};
|
};
|
||||||
configFile = {"shikane/config.toml".source = files/shikane.toml;};
|
configFile = {"shikane/config.toml".source = files/shikane.toml;};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
{ lib, config, pkgs, inputs, outputs, home-manager, ... }:
|
|
||||||
with lib;
|
|
||||||
let cfg = config.roles.gnome-calendar;
|
|
||||||
in {
|
|
||||||
options.roles.gnome-calendar = {
|
|
||||||
enable = lib.mkEnableOption "gnome calendar";
|
|
||||||
};
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
home-manager.users.don.home.packages = with pkgs; [
|
|
||||||
gnome-calendar
|
|
||||||
gnome-control-center
|
|
||||||
];
|
|
||||||
services = {
|
|
||||||
gnome = {
|
|
||||||
evolution-data-server = { enable = true; };
|
|
||||||
gnome-online-accounts = { enable = true; };
|
|
||||||
gnome-keyring = { enable = true; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
17
home/gui/gnome-calendar.nix
Normal file
17
home/gui/gnome-calendar.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ lib, config, pkgs, inputs, outputs, home-manager, osConfig ? null, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
osConfigValue = if osConfig != null then osConfig else {};
|
||||||
|
cfg = if osConfigValue ? roles && builtins.hasAttr "gnome-calendar" osConfigValue.roles then osConfigValue.roles."gnome-calendar" else { enable = false; };
|
||||||
|
in {
|
||||||
|
# options.roles.gnome-calendar = { enable = lib.mkEnableOption "gnome calendar"; };
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gnome-calendar
|
||||||
|
gnome-control-center
|
||||||
|
evolution
|
||||||
|
evolution-data-server
|
||||||
|
gnome-keyring
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -4,11 +4,10 @@
|
||||||
hostname,
|
hostname,
|
||||||
outputs,
|
outputs,
|
||||||
config,
|
config,
|
||||||
osConfig,
|
|
||||||
...
|
...
|
||||||
}: {
|
} @args: {
|
||||||
xdg.configFile."sway/config".text = ''
|
xdg.configFile."sway/config".text = ''
|
||||||
# For ${osConfig.networking.hostName}
|
# For ${(if args ? osConfig then args.osConfig else args.config).networking.hostName}
|
||||||
set $mod Mod1
|
set $mod Mod1
|
||||||
set $terminal_path /home/don/bin/mynewterm
|
set $terminal_path /home/don/bin/mynewterm
|
||||||
set $snd_sink alsa_output.usb-Corsair_CORSAIR_VOID_ELITE_Wireless_Gaming_Dongle-00.iec958-stereo
|
set $snd_sink alsa_output.usb-Corsair_CORSAIR_VOID_ELITE_Wireless_Gaming_Dongle-00.iec958-stereo
|
||||||
|
|
@ -30,7 +29,7 @@
|
||||||
workspace_auto_back_and_forth yes
|
workspace_auto_back_and_forth yes
|
||||||
|
|
||||||
set $laptop eDP-1
|
set $laptop eDP-1
|
||||||
output $laptop scale ${osConfig.variables.swayScale}
|
output $laptop scale ${(if args ? osConfig then args.osConfig else args.config).variables.swayScale}
|
||||||
output * bg /home/don/nixos/hosts/fan-table-device-box-wallpaper.jpg fill
|
output * bg /home/don/nixos/hosts/fan-table-device-box-wallpaper.jpg fill
|
||||||
bindswitch --reload --locked lid:on output $laptop disable
|
bindswitch --reload --locked lid:on output $laptop disable
|
||||||
bindswitch --reload --locked lid:off output $laptop enable
|
bindswitch --reload --locked lid:off output $laptop enable
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{ lib, config, pkgs, inputs, outputs, home-manager, ... }:
|
{ lib, config, pkgs, inputs, outputs, home-manager, ... }@args:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.roles.citrix;
|
osConfig = if args ? osConfig then args.osConfig else args.config;
|
||||||
|
cfg = if osConfig ? roles && osConfig.roles ? citrix then osConfig.roles.citrix else {enable = false;};
|
||||||
citrixPkgs = import inputs.nixpkgs {
|
citrixPkgs = import inputs.nixpkgs {
|
||||||
system = pkgs.system;
|
system = pkgs.system;
|
||||||
config = pkgs.config // {
|
config = pkgs.config // {
|
||||||
|
|
@ -9,14 +10,13 @@ with lib; let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
options.roles.citrix = {enable = lib.mkEnableOption "citrix tools";};
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.don.home.packages = with citrixPkgs; [ citrix_workspace ];
|
home.packages = with citrixPkgs; [ citrix_workspace ];
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
allowInsecure = true;
|
allowInsecure = true;
|
||||||
};
|
};
|
||||||
home-manager.users.don.home.file."ICAClient" = {
|
home.file."ICAClient" = {
|
||||||
recursive = true;
|
recursive = true;
|
||||||
source = ./files/citrix;
|
source = ./files/citrix;
|
||||||
target = ".ICAClient";
|
target = ".ICAClient";
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ with lib; let
|
||||||
|
|
||||||
citrix_workspace_overlay = pkgs.citrix_workspace; # DELME
|
citrix_workspace_overlay = pkgs.citrix_workspace; # DELME
|
||||||
in {
|
in {
|
||||||
options.roles.citrix = {enable = lib.mkEnableOption "citrix tools";};
|
# options.roles.citrix = {enable = lib.mkEnableOption "citrix tools";};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# FIXME : remove when new version of Citrix is released
|
# FIXME : remove when new version of Citrix is released
|
||||||
# home-manager.users.don.home.packages = with pkgs; [citrix_workspace];
|
# home-manager.users.don.home.packages = with pkgs; [citrix_workspace];
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
{ pkgs, inputs, lib, config, home-manager, outputs, ... }: {
|
{ pkgs, inputs, lib, config, home-manager, outputs, ... }:
|
||||||
|
{
|
||||||
imports = [ ./citrix.nix ./zoom.nix ];
|
imports = [ ./citrix.nix ./zoom.nix ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
{ lib, config, pkgs, pkgs-stable, inputs, outputs, home-manager, ... }:
|
{ lib, config, pkgs, pkgs-stable, inputs, outputs, home-manager, ... }@args:
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.roles.zoom;
|
let
|
||||||
|
osConfig = if args ? osConfig then args.osConfig else args.config;
|
||||||
|
cfg = if osConfig ? roles && osConfig.roles ? zoom then osConfig.roles.zoom else { enable = false; };
|
||||||
in {
|
in {
|
||||||
options.roles.zoom = { enable = lib.mkEnableOption "citrix tools"; };
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.don.home.packages = [ pkgs.zoom-us ];
|
home.packages = [ pkgs.zoom-us ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.roles.zoom;
|
let cfg = config.roles.zoom;
|
||||||
in {
|
in {
|
||||||
options.roles.zoom = { enable = lib.mkEnableOption "citrix tools"; };
|
# options.roles.zoom = { enable = lib.mkEnableOption "citrix tools"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.don.home.packages = with pkgs;
|
home-manager.users.don.home.packages = with pkgs;
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,29 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, ... }: {
|
||||||
# Common boot configuration
|
# Common boot configuration
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
binfmt.emulatedSystems = lib.optionals (pkgs.stdenv.hostPlatform.system != "aarch64-linux") [ "aarch64-linux" ];
|
||||||
systemd-boot = {
|
loader =
|
||||||
enable = true;
|
if config.system != "aarch64-linux"
|
||||||
configurationLimit = 10;
|
then {
|
||||||
|
systemd-boot = {enable = true;};
|
||||||
|
efi = {
|
||||||
|
canTouchEfiVariables = true;
|
||||||
|
efiSysMountPoint = "/boot";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
grub.enable = false;
|
||||||
|
generic-extlinux-compatible.enable = true;
|
||||||
};
|
};
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
timeout = 3;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Plymouth for boot splash
|
# Plymouth for boot splash
|
||||||
plymouth.enable = true;
|
plymouth.enable = true;
|
||||||
|
|
||||||
# Kernel parameters
|
# Kernel parameters
|
||||||
kernelParams = ["quiet" "splash"];
|
kernel = {sysctl = {"vm.swappiness" = 10;};};
|
||||||
|
|
||||||
# Console settings
|
# Console settings
|
||||||
consoleLogLevel = 0;
|
consoleLogLevel = 0;
|
||||||
initrd.verbose = false;
|
initrd.verbose = false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
15
hosts/common/default.nix
Normal file
15
hosts/common/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
osConfig,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./boot.nix
|
||||||
|
./networking.nix
|
||||||
|
# ./tailscale.nix
|
||||||
|
./upgrade-diff.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -5,17 +5,30 @@
|
||||||
enableIPv6 = true;
|
enableIPv6 = true;
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
dhcpcd.enable = false;
|
dhcpcd.enable = false;
|
||||||
};
|
firewall = {
|
||||||
|
enable = true;
|
||||||
# Firewall
|
trustedInterfaces = ["tailscale0"];
|
||||||
networking.firewall = {
|
checkReversePath = "loose";
|
||||||
enable = true;
|
allowedUDPPorts = [config.services.tailscale.port];
|
||||||
allowPing = true;
|
allowedTCPPortRanges = [
|
||||||
|
{
|
||||||
|
from = 1714;
|
||||||
|
to = 1764;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
allowedUDPPortRanges = [
|
||||||
|
{
|
||||||
|
from = 1714;
|
||||||
|
to = 1764;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
allowedTCPPorts = [22 80 443];
|
||||||
|
};
|
||||||
|
nameservers = [
|
||||||
|
"1.1.1.1"
|
||||||
|
"8.8.8.8"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# DNS
|
# DNS
|
||||||
networking.nameservers = [
|
}
|
||||||
"1.1.1.1"
|
|
||||||
"8.8.8.8"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,17 @@
|
||||||
{ lib, ... }: {
|
{ lib, ... }: {
|
||||||
options.roles = {
|
options.roles = {
|
||||||
# Window manager selection
|
# Window manager selection
|
||||||
|
citrix = { enable = lib.mkEnableOption "Citrix Workspace client"; };
|
||||||
|
zoom = { enable = lib.mkEnableOption "Zoom client"; };
|
||||||
|
gui = { enable = lib.mkEnableOption "GUI environment"; };
|
||||||
|
games = { enable = lib.mkEnableOption "Gaming packages and Steam"; };
|
||||||
|
kvm = { enable = lib.mkEnableOption "Virtualization support (libvirtd, waydroid)"; };
|
||||||
|
kmscon = { enable = lib.mkEnableOption "Console improvements"; };
|
||||||
|
auto-cpufreq = { enable = lib.mkEnableOption "CPU power management"; };
|
||||||
|
gnome-calendar = { enable = lib.mkEnableOption "GNOME Calendar integration"; };
|
||||||
|
tlp = { enable = lib.mkEnableOption "TLP power management"; };
|
||||||
|
wine = { enable = lib.mkEnableOption "Wine for Windows compatibility"; };
|
||||||
|
|
||||||
wm = lib.mkOption {
|
wm = lib.mkOption {
|
||||||
type = lib.types.enum ["sway" "gnome" "none"];
|
type = lib.types.enum ["sway" "gnome" "none"];
|
||||||
default = "none";
|
default = "none";
|
||||||
|
|
@ -12,4 +23,4 @@
|
||||||
lmstudio = { enable = lib.mkEnableOption "LM Studio AI tools"; };
|
lmstudio = { enable = lib.mkEnableOption "LM Studio AI tools"; };
|
||||||
ollama = { enable = lib.mkEnableOption "Ollama AI server"; };
|
ollama = { enable = lib.mkEnableOption "Ollama AI server"; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,20 +33,14 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
imports = [
|
imports = [
|
||||||
../../home
|
|
||||||
../vars.nix
|
../vars.nix
|
||||||
|
../../home
|
||||||
./systemd.nix
|
./systemd.nix
|
||||||
../systemd-primary.nix
|
../systemd-primary.nix
|
||||||
# ../comon/tailscale.nix
|
../common
|
||||||
../common/upgrade-diff.nix
|
|
||||||
../../modules/beszel-agent.nix
|
../../modules/beszel-agent.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable networking
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
networking.enableIPv6 = true;
|
|
||||||
networking.useDHCP = false;
|
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time = {
|
time = {
|
||||||
timeZone = "America/Chicago";
|
timeZone = "America/Chicago";
|
||||||
|
|
@ -65,20 +59,8 @@ in {
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot = {
|
boot = {
|
||||||
binfmt.emulatedSystems = lib.optionals (pkgs.stdenv.hostPlatform.system != "aarch64-linux") [ "aarch64-linux" ];
|
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
kernelParams = ["consoleblank=60"];
|
kernelParams = ["consoleblank=60" "quiet" "splash"];
|
||||||
#loader = {
|
|
||||||
#systemd-boot = {
|
|
||||||
#enable = true;
|
|
||||||
#};
|
|
||||||
#efi = {
|
|
||||||
#canTouchEfiVariables = true;
|
|
||||||
#efiSysMountPoint = "/boot";
|
|
||||||
#};
|
|
||||||
#};
|
|
||||||
plymouth = {enable = true;};
|
|
||||||
kernel = {sysctl = {"vm.swappiness" = 10;};};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
|
|
@ -254,25 +236,25 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
networking.firewall = {
|
# networking.firewall = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
trustedInterfaces = ["tailscale0"];
|
# trustedInterfaces = ["tailscale0"];
|
||||||
checkReversePath = "loose";
|
# checkReversePath = "loose";
|
||||||
allowedUDPPorts = [config.services.tailscale.port];
|
# allowedUDPPorts = [config.services.tailscale.port];
|
||||||
allowedTCPPortRanges = [
|
# allowedTCPPortRanges = [
|
||||||
{
|
# {
|
||||||
from = 1714;
|
# from = 1714;
|
||||||
to = 1764;
|
# to = 1764;
|
||||||
}
|
# }
|
||||||
];
|
# ];
|
||||||
allowedUDPPortRanges = [
|
# allowedUDPPortRanges = [
|
||||||
{
|
# {
|
||||||
from = 1714;
|
# from = 1714;
|
||||||
to = 1764;
|
# to = 1764;
|
||||||
}
|
# }
|
||||||
];
|
# ];
|
||||||
allowedTCPPorts = [22 80 443];
|
# allowedTCPPorts = [22 80 443];
|
||||||
};
|
# };
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,19 @@
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
../roles/default.nix
|
../roles/default.nix
|
||||||
../workstation
|
../workstation
|
||||||
../common/boot.nix
|
../common
|
||||||
../common/networking.nix
|
|
||||||
../common/tailscale.nix
|
|
||||||
../../home
|
|
||||||
../../home/gui
|
|
||||||
../wm/sway
|
../wm/sway
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
# Common workstation setup
|
# Common workstation setup
|
||||||
nix.settings.trusted-users = ["root" "don"];
|
nix.settings.trusted-users = ["root" "don"];
|
||||||
|
|
||||||
|
# Server-specific Nix settings
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "daily";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{ pkgs, ... }: { imports = [ ./sway ]; }
|
{ pkgs, ... }: { imports = [ ./sway ./greetd ]; }
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.roles.auto-cpufreq;
|
let cfg = config.roles.auto-cpufreq;
|
||||||
in {
|
in {
|
||||||
options.roles.auto-cpufreq = {
|
# options.roles.auto-cpufreq = { enable = mkEnableOption "roles auto-cpufreq"; };
|
||||||
enable = mkEnableOption "roles auto-cpufreq";
|
|
||||||
};
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.auto-cpufreq = {
|
services.auto-cpufreq = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -34,16 +34,12 @@ in {
|
||||||
};
|
};
|
||||||
imports = [
|
imports = [
|
||||||
inputs.catppuccin.nixosModules.catppuccin
|
inputs.catppuccin.nixosModules.catppuccin
|
||||||
# ../comon/tailscale.nix
|
|
||||||
../../home
|
|
||||||
../../home/gui
|
|
||||||
../../home/gui/gnome-calenar.nix
|
|
||||||
../../home/work
|
|
||||||
../vars.nix
|
../vars.nix
|
||||||
|
../common
|
||||||
|
../../home
|
||||||
../wm
|
../wm
|
||||||
../wm/greetd
|
./games
|
||||||
../workstation/games
|
./kvm.nix
|
||||||
../workstation/kvm.nix
|
|
||||||
../themes.nix
|
../themes.nix
|
||||||
./detect-reboot-needed.nix
|
./detect-reboot-needed.nix
|
||||||
./kmscon.nix
|
./kmscon.nix
|
||||||
|
|
@ -53,7 +49,6 @@ in {
|
||||||
../systemd-primary.nix
|
../systemd-primary.nix
|
||||||
./auto-cpufreq.nix
|
./auto-cpufreq.nix
|
||||||
./tlp.nix
|
./tlp.nix
|
||||||
../common/upgrade-diff.nix
|
|
||||||
./wine.nix
|
./wine.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -104,9 +99,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
enableIPv6 = true;
|
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
|
||||||
wifi = {powersave = true;};
|
wifi = {powersave = true;};
|
||||||
dispatcherScripts = [
|
dispatcherScripts = [
|
||||||
{
|
{
|
||||||
|
|
@ -124,26 +117,6 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
useDHCP = false;
|
|
||||||
firewall = {
|
|
||||||
enable = true;
|
|
||||||
trustedInterfaces = ["tailscale0"]; # always allow traffic from your Tailscale network
|
|
||||||
checkReversePath = "loose";
|
|
||||||
allowedUDPPorts = [config.services.tailscale.port];
|
|
||||||
allowedTCPPortRanges = [
|
|
||||||
{
|
|
||||||
from = 1714;
|
|
||||||
to = 1764;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
allowedUDPPortRanges = [
|
|
||||||
{
|
|
||||||
from = 1714;
|
|
||||||
to = 1764;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
allowedTCPPorts = [22];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
|
|
@ -165,26 +138,8 @@ in {
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot = {
|
boot = {
|
||||||
binfmt.emulatedSystems = lib.optionals (pkgs.stdenv.hostPlatform.system != "aarch64-linux") [ "aarch64-linux" ];
|
binfmt.emulatedSystems = lib.optionals (pkgs.stdenv.hostPlatform.system != "aarch64-linux") [ "aarch64-linux" ];
|
||||||
# kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
kernelPackages = pkgs.linuxPackages_zen;
|
kernelPackages = pkgs.linuxPackages_zen;
|
||||||
kernelParams = ["consoleblank=60" "mem_sleep_default=deep"];
|
kernelParams = ["consoleblank=60" "mem_sleep_default=deep" "quiet" "splash"];
|
||||||
# extraModulePackages = [config.boot.kernelPackages.ddcci-driver];
|
|
||||||
# kernelModules = ["i2c-dev" "ddcci_backlight"];
|
|
||||||
loader =
|
|
||||||
if config.system != "aarch64-linux"
|
|
||||||
then {
|
|
||||||
systemd-boot = {enable = true;};
|
|
||||||
efi = {
|
|
||||||
canTouchEfiVariables = true;
|
|
||||||
efiSysMountPoint = "/boot";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
grub.enable = false;
|
|
||||||
generic-extlinux-compatible.enable = true;
|
|
||||||
};
|
|
||||||
plymouth = {enable = true;};
|
|
||||||
kernel = {sysctl = {"vm.swappiness" = 10;};};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.roles.games;
|
let cfg = config.roles.games;
|
||||||
in {
|
in {
|
||||||
options.roles.games = { enable = mkEnableOption "roles games"; };
|
# options.roles.games = { enable = mkEnableOption "roles games"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs = {
|
programs = {
|
||||||
steam = {
|
steam = {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.roles.kmscon;
|
let cfg = config.roles.kmscon;
|
||||||
in {
|
in {
|
||||||
options.roles.kmscon = { enable = mkEnableOption "roles kmscon"; };
|
# options.roles.kmscon = { enable = mkEnableOption "roles kmscon"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services = {
|
services = {
|
||||||
kmscon = {
|
kmscon = {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.roles.kvm;
|
cfg = config.roles.kvm;
|
||||||
in {
|
in {
|
||||||
options.roles.kvm = {enable = mkEnableOption "roles kvm";};
|
# options.roles.kvm = {enable = mkEnableOption "roles kvm";};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
libvirtd = {
|
libvirtd = {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.roles.tlp;
|
let cfg = config.roles.tlp;
|
||||||
in {
|
in {
|
||||||
options.roles.tlp = { enable = mkEnableOption "roles tlp"; };
|
# options.roles.tlp = { enable = mkEnableOption "roles tlp"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.tlp = {
|
services.tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.roles.wine;
|
let cfg = config.roles.wine;
|
||||||
in {
|
in {
|
||||||
options.roles.wine = { enable = mkEnableOption "roles wine"; };
|
# options.roles.wine = { enable = mkEnableOption "roles wine"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.don.home.packages = with pkgs; [
|
home-manager.users.don.home.packages = with pkgs; [
|
||||||
# wineWowPackages.stable
|
# wineWowPackages.stable
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue