Tidying
This commit is contained in:
parent
2667732682
commit
d8743f1549
|
@ -117,11 +117,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714430505,
|
||||
"narHash": "sha256-SSJQ/KOy8uISnoZgqDoRha7g7PFLSFP/BtMWm0wUz8Q=",
|
||||
"lastModified": 1714515075,
|
||||
"narHash": "sha256-azMK7aWH0eUc3IqU4Fg5rwZdB9WZBvimOGG3piqvtsY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f8e6694edabe4aaa7a85aac47b43ea5d978b116d",
|
||||
"rev": "6d3b6dc9222c12b951169becdf4b0592ee9576ef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
kdeconnect.enable = true;
|
||||
media.enable = true;
|
||||
office.enable = true;
|
||||
pandoc.enable = true;
|
||||
writing.enable = true;
|
||||
};
|
||||
ui = {
|
||||
flatpak.enable = true;
|
||||
|
|
|
@ -32,8 +32,8 @@ in
|
|||
kdeconnect.enable = true;
|
||||
media.enable = true;
|
||||
office.enable = true;
|
||||
pandoc.enable = true;
|
||||
recording.enable = true;
|
||||
writing.enable = true;
|
||||
};
|
||||
ui = {
|
||||
flatpak.enable = true;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
./kdeconnect.nix
|
||||
./media.nix
|
||||
./office.nix
|
||||
./pandoc.nix
|
||||
./recording.nix
|
||||
./writing.nix
|
||||
];
|
||||
}
|
|
@ -26,6 +26,7 @@ with lib;
|
|||
kubectl
|
||||
kubernetes-helm
|
||||
kubevirt # Virtctl command-line tool
|
||||
statix # Nix linting tool
|
||||
];
|
||||
})
|
||||
];
|
||||
|
|
|
@ -16,13 +16,5 @@ with lib;
|
|||
"org.libreoffice.LibreOffice"
|
||||
"us.zoom.Zoom"
|
||||
];
|
||||
|
||||
# Spelling and grammer checking: hosted on localhost:8081
|
||||
services.languagetool = {
|
||||
enable = true;
|
||||
port = 8090;
|
||||
public = false;
|
||||
allowOrigin = "*";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.host.apps.pandoc;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
host.apps.pandoc.enable = mkEnableOption (mdDoc "Enables pandoc");
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
haskellPackages.pandoc
|
||||
haskellPackages.pandoc-cli
|
||||
haskellPackages.pandoc-crossref
|
||||
texliveSmall
|
||||
];
|
||||
};
|
||||
}
|
29
modules/apps/writing.nix
Normal file
29
modules/apps/writing.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.host.apps.writing;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
host.apps.writing.enable = mkEnableOption (mdDoc "Enables writing and editing tools");
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Install packages for building ebooks
|
||||
environment.systemPackages = with pkgs; [
|
||||
haskellPackages.pandoc
|
||||
haskellPackages.pandoc-cli
|
||||
haskellPackages.pandoc-crossref
|
||||
texliveSmall
|
||||
];
|
||||
|
||||
# Spelling and grammer checking: hosted on localhost:8081
|
||||
services.languagetool = {
|
||||
enable = true;
|
||||
port = 8090;
|
||||
public = false;
|
||||
allowOrigin = "*";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -4,6 +4,7 @@
|
|||
./bootloader.nix
|
||||
./network.nix
|
||||
./nix.nix
|
||||
./programs.nix
|
||||
./shell.nix
|
||||
./system.nix
|
||||
];
|
||||
|
|
|
@ -5,8 +5,6 @@ _: {
|
|||
|
||||
# Enable firewall
|
||||
nftables.enable = true;
|
||||
firewall = {
|
||||
enable = true;
|
||||
};
|
||||
firewall.enable = true;
|
||||
};
|
||||
}
|
29
modules/base/programs.nix
Normal file
29
modules/base/programs.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Set up program defaults
|
||||
{ config, ... }: {
|
||||
# Set up base apps
|
||||
programs = {
|
||||
direnv.enable = true;
|
||||
|
||||
nano = {
|
||||
enable = true;
|
||||
syntaxHighlight = true;
|
||||
nanorc = ''
|
||||
set linenumbers
|
||||
set tabsize 4
|
||||
set softwrap
|
||||
'';
|
||||
};
|
||||
|
||||
nh = {
|
||||
enable = true;
|
||||
flake = "${config.users.users.aires.home}/Development/nix-configuration";
|
||||
|
||||
# Alternative garbage collection system to nix.gc.automatic
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "daily";
|
||||
extraArgs = "--keep-since 7d --keep 10"; # Keep the last 10 entries
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,121 +1,54 @@
|
|||
{ pkgs, config, lib, inputs, ... }:
|
||||
|
||||
# System options
|
||||
let
|
||||
cfg = config.host.system;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
config = {
|
||||
# Set up the environment
|
||||
environment = {
|
||||
# Install base packages
|
||||
systemPackages = with pkgs; [
|
||||
bash
|
||||
dconf # Needed to fix an issue with Home-manager. See https://github.com/nix-community/home-manager/issues/3113
|
||||
git
|
||||
home-manager
|
||||
nano
|
||||
p7zip
|
||||
fastfetch
|
||||
nh # Nix Helper: https://github.com/viperML/nh
|
||||
];
|
||||
{ pkgs, config, ... }: {
|
||||
# Set up the environment
|
||||
environment = {
|
||||
# Install base packages
|
||||
systemPackages = with pkgs; [
|
||||
bash
|
||||
dconf # Needed to fix an issue with Home-manager. See https://github.com/nix-community/home-manager/issues/3113
|
||||
direnv
|
||||
git
|
||||
home-manager
|
||||
nano
|
||||
p7zip
|
||||
fastfetch
|
||||
nh # Nix Helper: https://github.com/viperML/nh
|
||||
];
|
||||
|
||||
variables = {
|
||||
EDITOR = "nano"; # Set default editor to nano
|
||||
};
|
||||
|
||||
# System configuration file overrides
|
||||
etc = {
|
||||
# Reduce systemd logout time to 30s
|
||||
"systemd/system.conf.d/10-reduce-logout-wait-time.conf" = {
|
||||
text = ''
|
||||
[Manager]
|
||||
DefaultTimeoutStopSec=30s
|
||||
'';
|
||||
};
|
||||
};
|
||||
variables = {
|
||||
EDITOR = "nano"; # Set default editor to nano
|
||||
};
|
||||
};
|
||||
|
||||
# Configure automatic updates
|
||||
system = {
|
||||
# Enable automatic updates
|
||||
autoUpgrade = {
|
||||
enable = true;
|
||||
flake = "${config.users.users.aires.home}/Development/nix-configuration";
|
||||
dates = "daily";
|
||||
allowReboot = false;
|
||||
operation = "boot"; # Don't switch, just create a boot entry
|
||||
};
|
||||
# Configure automatic updates
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
flake = "${config.users.users.aires.home}/Development/nix-configuration";
|
||||
dates = "daily";
|
||||
allowReboot = false;
|
||||
operation = "boot"; # Don't switch, just create a boot entry
|
||||
};
|
||||
|
||||
# Enable fwupd (firmware updater)
|
||||
services.fwupd.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
};
|
||||
|
||||
# Set up base apps
|
||||
programs = {
|
||||
direnv.enable = true;
|
||||
|
||||
nano = {
|
||||
enable = true;
|
||||
syntaxHighlight = true;
|
||||
nanorc = ''
|
||||
set linenumbers
|
||||
set tabsize 4
|
||||
set softwrap
|
||||
'';
|
||||
};
|
||||
|
||||
nh = {
|
||||
enable = true;
|
||||
flake = "/home/aires/Development/nix-configuration";
|
||||
|
||||
# Alternative garbage collection system to nix.gc.automatic
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "daily";
|
||||
extraArgs = "--keep-since 7d --keep 10"; # Keep the last 10 entries
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
# Scrub BTRFS partitions if the root partition is btrfs
|
||||
btrfs.autoScrub = lib.mkIf (config.fileSystems."/".fsType == "btrfs") {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
fileSystems = [ "/" ];
|
||||
};
|
||||
|
||||
# Enable fwupd (firmware updater)
|
||||
fwupd.enable = true;
|
||||
|
||||
# Allow systemd user services to keep running after the user has logged out
|
||||
logind.killUserProcesses = false;
|
||||
|
||||
# Enable SMART monitoring
|
||||
smartd = {
|
||||
enable = true;
|
||||
autodetect = true;
|
||||
notifications.wall.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ in
|
|||
|
||||
config = mkIf (role == "server") {
|
||||
environment.systemPackages = with pkgs; [
|
||||
direnv
|
||||
htop
|
||||
];
|
||||
};
|
||||
|
|
|
@ -14,11 +14,6 @@ in
|
|||
flatpak.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
direnv
|
||||
statix # Nix linting tool
|
||||
];
|
||||
|
||||
boot = {
|
||||
# Enable Plymouth
|
||||
plymouth.enable = true;
|
||||
|
|
9
modules/services/btrfs.nix
Normal file
9
modules/services/btrfs.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Services to run on BTRFS filesystems.
|
||||
# Only run if the root partition is BTRFS.
|
||||
{ config, lib, ... }: {
|
||||
services.btrfs.autoScrub = lib.mkIf (config.fileSystems."/".fsType == "btrfs") {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
fileSystems = [ "/" ];
|
||||
};
|
||||
}
|
|
@ -1,8 +1,11 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./apcupsd.nix
|
||||
./btrfs.nix
|
||||
./duplicacy-web.nix
|
||||
./k3s.nix
|
||||
./msmtp.nix
|
||||
./smartd.nix
|
||||
./systemd.nix
|
||||
];
|
||||
}
|
8
modules/services/smartd.nix
Normal file
8
modules/services/smartd.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Configure SMART monitoring
|
||||
_: {
|
||||
services.smartd = {
|
||||
enable = true;
|
||||
autodetect = true;
|
||||
notifications.wall.enable = true;
|
||||
};
|
||||
}
|
17
modules/services/systemd.nix
Normal file
17
modules/services/systemd.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Configure systemD
|
||||
_: {
|
||||
services = {
|
||||
# Allow systemd user services to keep running after the user has logged out
|
||||
logind.killUserProcesses = false;
|
||||
};
|
||||
|
||||
# Reduce systemd logout time to 30s
|
||||
environment.etc = {
|
||||
"systemd/system.conf.d/10-reduce-logout-wait-time.conf" = {
|
||||
text = ''
|
||||
[Manager]
|
||||
DefaultTimeoutStopSec=30s
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue