mirror of
https://git.feal.no/felixalb/nixos-config.git
synced 2025-01-15 14:34:48 +01:00
Compare commits
1 Commits
b32bc2f8b5
...
1ade601ce9
Author | SHA1 | Date | |
---|---|---|---|
1ade601ce9 |
@ -1,7 +1,5 @@
|
||||
## Felixalbs nixos config
|
||||
|
||||
![](https://github.com/NixOS/nixos-artwork/blob/master/releases/24.05-uakari/uakari.png?raw=true)
|
||||
|
||||
Contains configurations for some nixos servers, some nixos desktops and a [nix-darwin](https://github.com/LnL7/nix-darwin) host.
|
||||
Secrets are managed with [sops-nix](https://github.com/Mic92/sops-nix).
|
||||
|
||||
|
13
flake.lock
generated
13
flake.lock
generated
@ -60,16 +60,15 @@
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717234745,
|
||||
"narHash": "sha256-MFyKRdw4WQD6V3vRGbP6MYbtJhZp712zwzjW6YiOBYM=",
|
||||
"lastModified": 1710311999,
|
||||
"narHash": "sha256-s0pT1NyrMgeolUojXXcnXQDymN7m80GTF7itCv0ZH20=",
|
||||
"owner": "dali99",
|
||||
"repo": "nixos-matrix-modules",
|
||||
"rev": "d7dc42c9bbb155c5e4aa2f0985d0df75ce978456",
|
||||
"rev": "6c9b67974b839740e2a738958512c7a704481157",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "dali99",
|
||||
"ref": "v0.6.0",
|
||||
"repo": "nixos-matrix-modules",
|
||||
"type": "github"
|
||||
}
|
||||
@ -228,11 +227,11 @@
|
||||
},
|
||||
"unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1716948383,
|
||||
"narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=",
|
||||
"lastModified": 1710631334,
|
||||
"narHash": "sha256-rL5LSYd85kplL5othxK5lmAtjyMOBg390sGBTb3LRMM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ad57eef4ef0659193044870c731987a6df5cf56b",
|
||||
"rev": "c75037bbf9093a2acb617804ee46320d6d1fea5a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
25
flake.nix
25
flake.nix
@ -11,7 +11,7 @@
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
matrix-synapse-next.url = "github:dali99/nixos-matrix-modules/v0.6.0";
|
||||
matrix-synapse-next.url = "github:dali99/nixos-matrix-modules";
|
||||
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||
|
||||
# voyager-addons.url = "git+ssh://git@git.feal.no:2222/felixalb/voyager-addons.git";
|
||||
@ -33,17 +33,8 @@
|
||||
, voyager-addons
|
||||
, ... }@inputs:
|
||||
let
|
||||
pkgs-overlay = final: prev: {
|
||||
overlay-unstable = final: prev: {
|
||||
unstable = unstable.legacyPackages.${prev.system};
|
||||
|
||||
python311 = prev.python311.override {
|
||||
packageOverrides = self: super: {
|
||||
# k5test is broken on darwin, as of 24.05
|
||||
gssapi = super.gssapi.overrideAttrs (old: {
|
||||
doInstallCheck = false;
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
@ -55,7 +46,7 @@
|
||||
};
|
||||
modules = [
|
||||
# Overlays-module makes "pkgs.unstable" available in configuration.nix
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
||||
|
||||
./hosts/voyager/configuration.nix
|
||||
voyager-addons.nixosModules.default
|
||||
@ -74,7 +65,7 @@
|
||||
};
|
||||
modules = [
|
||||
# Overlays-module makes "pkgs.unstable" available in configuration.nix
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
||||
|
||||
./hosts/defiant/configuration.nix
|
||||
sops-nix.nixosModules.sops
|
||||
@ -93,7 +84,7 @@
|
||||
};
|
||||
modules = [
|
||||
# Overlays-module makes "pkgs.unstable" available in configuration.nix
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
||||
|
||||
./hosts/edison/configuration.nix
|
||||
sops-nix.nixosModules.sops
|
||||
@ -111,7 +102,7 @@
|
||||
};
|
||||
modules = [
|
||||
# Overlays-module makes "pkgs.unstable" available in configuration.nix
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
||||
|
||||
./hosts/burnham/configuration.nix
|
||||
sops-nix.nixosModules.sops
|
||||
@ -129,7 +120,7 @@
|
||||
};
|
||||
modules = [
|
||||
./hosts/redshirt/configuration.nix
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
||||
sops-nix.nixosModules.sops
|
||||
];
|
||||
};
|
||||
@ -142,7 +133,7 @@
|
||||
};
|
||||
modules = [
|
||||
./hosts/worf/configuration.nix
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
||||
home-manager.darwinModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
@ -14,7 +14,6 @@
|
||||
};
|
||||
|
||||
dynamic_padding = true;
|
||||
dynamic_title = true;
|
||||
|
||||
decorations = "none"; # full/none/transparent/buttonless
|
||||
|
||||
@ -47,9 +46,9 @@
|
||||
size = 14;
|
||||
};
|
||||
|
||||
draw_bold_text_with_bright_colors = true;
|
||||
|
||||
colors = {
|
||||
draw_bold_text_with_bright_colors = true;
|
||||
# # Tomorrow Night Bright
|
||||
# primary = {
|
||||
# background = "0x141414";
|
||||
@ -151,10 +150,10 @@
|
||||
# indexed_colors: []
|
||||
};
|
||||
|
||||
bell = {
|
||||
animation = "Ease";
|
||||
visual_bell = {
|
||||
animation = "EaseOutExpo";
|
||||
color = "0xffffff";
|
||||
duration = 100;
|
||||
duration = 200;
|
||||
};
|
||||
|
||||
# Key bindings
|
||||
@ -309,19 +308,29 @@
|
||||
# - { key: Delete, chars: "\x1b[3~" }
|
||||
|
||||
|
||||
|
||||
mouse = {
|
||||
double_click = { threshold = 300; };
|
||||
triple_click = { threshold = 300; };
|
||||
hide_when_typing = false;
|
||||
};
|
||||
|
||||
selection = {
|
||||
semantic_escape_chars = ",│`|:\"' ()[]{}<>";
|
||||
save_to_clipboard = false;
|
||||
};
|
||||
|
||||
mouse_bindings = [
|
||||
{ mouse = "Middle"; action = "PasteSelection"; }
|
||||
];
|
||||
|
||||
cursor = {
|
||||
style = {
|
||||
shape = "Block";
|
||||
blinking = "on";
|
||||
};
|
||||
style = "Block";
|
||||
blinking = true;
|
||||
unfocused_hollow = true;
|
||||
};
|
||||
|
||||
dynamic_title = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ in {
|
||||
boltdb_shipper = {
|
||||
active_index_directory = "${saveDirectory}/boltdb-shipper-index";
|
||||
cache_location = "${saveDirectory}/boltdb-shipper-cache";
|
||||
shared_store = "filesystem";
|
||||
cache_ttl = "24h";
|
||||
};
|
||||
filesystem = {
|
||||
@ -59,13 +60,14 @@ in {
|
||||
};
|
||||
|
||||
limits_config = {
|
||||
allow_structured_metadata = false;
|
||||
enforce_metric_name = false;
|
||||
reject_old_samples = true;
|
||||
reject_old_samples_max_age = "72h";
|
||||
};
|
||||
|
||||
compactor = {
|
||||
working_directory = "${saveDirectory}/compactor";
|
||||
shared_store = "filesystem";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,9 +1,20 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.prometheus.exporters.snmp = {
|
||||
environment.systemPackages = [
|
||||
pkgs.prometheus-snmp-exporter
|
||||
];
|
||||
|
||||
systemd.services.prometheus-snmp-exporter = {
|
||||
enable = true;
|
||||
configurationPath = "/tank/services/metrics/prometheus/snmp.yml";
|
||||
# snmp.yml = https://github.com/prometheus/snmp_exporter/blob/main/snmp.yml + https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/All/enu/Synology_DiskStation_MIB_Guide.pdf
|
||||
description = "Gather data from SNMP devices and expose them as Prometheus metrics";
|
||||
unitConfig = {
|
||||
Type = "simple";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.prometheus-snmp-exporter}/bin/snmp_exporter --config.file='/tank/services/metrics/prometheus/snmp.yml'";
|
||||
# snmp.yml = https://github.com/prometheus/snmp_exporter/blob/main/snmp.yml + https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/All/enu/Synology_DiskStation_MIB_Guide.pdf
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
}
|
||||
|
@ -7,9 +7,14 @@ let
|
||||
maxUploadSize = "256M";
|
||||
in {
|
||||
options.services.snappymail = {
|
||||
enable = mkEnableOption "Snappymail";
|
||||
enable = mkEnableOption (lib.mdDoc "Snappymail");
|
||||
|
||||
package = mkPackageOption pkgs "snappymail" { };
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.snappymail;
|
||||
defaultText = lib.mdDoc "pkgs.snappymail";
|
||||
description = lib.mdDoc "Which snappymail package to use.";
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
type = types.str;
|
||||
@ -18,8 +23,8 @@ in {
|
||||
};
|
||||
|
||||
hostname = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
type = types.str;
|
||||
/* default = null; */
|
||||
example = "mail.example.com";
|
||||
description = "Enable nginx with this hostname, null disables nginx";
|
||||
};
|
||||
@ -27,13 +32,13 @@ in {
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "snappymail";
|
||||
description = "System user under which snappymail runs";
|
||||
description = lib.mdDoc "System user under which snappymail runs";
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = types.str;
|
||||
default = "snappymail";
|
||||
description = "System group under which snappymail runs";
|
||||
description = lib.mdDoc "System group under which snappymail runs";
|
||||
};
|
||||
};
|
||||
|
||||
@ -43,6 +48,8 @@ in {
|
||||
description = "Snappymail service";
|
||||
group = cfg.group;
|
||||
home = cfg.dataDir;
|
||||
useDefaultShell = true;
|
||||
createHome = true;
|
||||
isSystemUser = true;
|
||||
};
|
||||
};
|
||||
@ -81,9 +88,8 @@ in {
|
||||
locations."^~ /data".extraConfig = ''
|
||||
deny all;
|
||||
'';
|
||||
locations."~ \\.php$".extraConfig = ''
|
||||
include ${config.services.nginx.package}/conf/fastcgi_params;
|
||||
|
||||
locations."~ \.php$".extraConfig = ''
|
||||
include ${pkgs.nginx}/conf/fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_pass unix:${config.services.phpfpm.pools.snappymail.socket};
|
||||
'';
|
||||
|
@ -11,9 +11,11 @@
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# alacritty
|
||||
emacs-macport
|
||||
iterm2
|
||||
# prismlauncher
|
||||
prismlauncher
|
||||
ripes
|
||||
spotify
|
||||
|
||||
borgbackup
|
||||
@ -21,11 +23,20 @@
|
||||
gnutar
|
||||
nix-index
|
||||
nodejs
|
||||
pinentry
|
||||
rbw
|
||||
tldr
|
||||
unstable.snicat
|
||||
zellij
|
||||
|
||||
|
||||
(python311.withPackages (ps: with ps; [
|
||||
pygments
|
||||
|
||||
jupyter
|
||||
numpy
|
||||
scipy
|
||||
|
||||
pwntools
|
||||
pycryptodome
|
||||
requests
|
||||
|
Loading…
Reference in New Issue
Block a user