Compare commits

..

No commits in common. "08ca7edf699cfbb33237d5f7a8729ce62286547f" and "2c36272339d97377be6c9006e78bfd3c761e1422" have entirely different histories.

21 changed files with 75 additions and 134 deletions

View File

@ -7,7 +7,7 @@
flags = [ flags = [
# Override nixpkgs (only). Notably does not include home-manager, sops or other utility/application flake inputs. # Override nixpkgs (only). Notably does not include home-manager, sops or other utility/application flake inputs.
"--refresh" "--refresh"
"--override-input" "nixpkgs" "github:NixOS/nixpkgs/nixos-25.05" "--override-input" "nixpkgs" "github:NixOS/nixpkgs/nixos-24.11"
"--override-input" "nixpkgs-unstable" "github:nixos/nixpkgs/nixos-unstable" "--override-input" "nixpkgs-unstable" "github:nixos/nixpkgs/nixos-unstable"
"--no-write-lock-file" "--no-write-lock-file"
]; ];

24
flake.lock generated
View File

@ -74,16 +74,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1748665073, "lastModified": 1747688870,
"narHash": "sha256-RMhjnPKWtCoIIHiuR9QKD7xfsKb3agxzMfJY8V9MOew=", "narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "282e1e029cb6ab4811114fc85110613d72771dea", "rev": "d5f1f641b289553927b3801580598d200a501863",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-25.05", "ref": "release-24.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -136,16 +136,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1748373722, "lastModified": 1739553546,
"narHash": "sha256-qi6aDGP2W6GyAUNEhg+slQWEpUiJ8LNIrQkmxHpzadI=", "narHash": "sha256-L4ou3xfOr17EAe836djRoQ7auVkYOREMtiQa82wVGqU=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "75b99daa12b1fffd646d6c3cf13b06f1fa5cef63", "rev": "353846417f985e74fdc060555f17939e4472ea2c",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "lnl7", "owner": "lnl7",
"ref": "nix-darwin-25.05", "ref": "nix-darwin-24.11",
"repo": "nix-darwin", "repo": "nix-darwin",
"type": "github" "type": "github"
} }
@ -243,16 +243,16 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1748889542, "lastModified": 1747676747,
"narHash": "sha256-Hb4iMhIbjX45GcrgOp3b8xnyli+ysRPqAgZ/LZgyT5k=", "narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "10d7f8d34e5eb9c0f9a0485186c1ca691d2c5922", "rev": "72841a4a8761d1aed92ef6169a636872c986c76d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-25.05", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View File

@ -2,14 +2,14 @@
description = "Felixalb System flake"; description = "Felixalb System flake";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; # Remember to update ./common/auto-upgrade.nix nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; # Remember to update ./common/auto-upgrade.nix
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-2211.url = "https://github.com/NixOS/nixpkgs/archive/34bfa9403e42eece93d1a3740e9d8a02fceafbca.tar.gz"; # old nixpgks for e.g. remmina nixpkgs-2211.url = "https://github.com/NixOS/nixpkgs/archive/34bfa9403e42eece93d1a3740e9d8a02fceafbca.tar.gz"; # old nixpgks for e.g. remmina
nix-darwin.url = "github:lnl7/nix-darwin/nix-darwin-25.05"; nix-darwin.url = "github:lnl7/nix-darwin/nix-darwin-24.11";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/release-25.05"; home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; 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/v0.6.0";
@ -104,7 +104,7 @@
felixalbpc = normalSys "felixalbpc" { }; felixalbpc = normalSys "felixalbpc" { };
# Work laptop # Work laptop
fa-t14-2025 = normalSys "fa-t14-2025" { }; felixalbpc = normalSys "fa-t14-2025" { };
# Web host # Web host
malcolm = normalSys "malcolm" { }; malcolm = normalSys "malcolm" { };

View File

@ -34,7 +34,7 @@
]; ];
}; };
initContent = '' initExtra = ''
# Autocomplete ../ # Autocomplete ../
zstyle ':completion:*' special-dirs true zstyle ':completion:*' special-dirs true
export PATH="$HOME/.config/emacs/bin:$HOME/.cargo/bin:$PATH" export PATH="$HOME/.config/emacs/bin:$HOME/.cargo/bin:$PATH"

View File

@ -45,8 +45,6 @@
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
virtualisation.oci-containers.backend = "docker"; virtualisation.oci-containers.backend = "docker";
security.polkit.enable = true; # Required for nextcloud
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"nvidia-x11" "nvidia-x11"
"nvidia-settings" "nvidia-settings"

View File

@ -6,6 +6,10 @@
users.users.${config.services.jellyfin.user}.extraGroups = [ "video" "render" ]; users.users.${config.services.jellyfin.user}.extraGroups = [ "video" "render" ];
systemd.services.jellyfin.serviceConfig = {
DeviceAllow = lib.mkForce [ "/dev/dri/card0" "/dev/dri/card1" ];
};
services.nginx.virtualHosts."jellyfin.home.feal.no" = { services.nginx.virtualHosts."jellyfin.home.feal.no" = {
serverAliases = [ "jf.feal.no" ]; serverAliases = [ "jf.feal.no" ];
locations = { locations = {

View File

@ -1,18 +1,16 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
domain = "komga.home.feal.no"; domain = "komga.home.feal.no";
port = 5001; cfg = config.services.komga;
in { in {
services.komga = { services.komga = {
enable = true; enable = true;
stateDir = "/tank/media/komga"; stateDir = "/tank/media/komga";
settings.server = { port = 5001;
inherit port;
};
}; };
services.nginx.virtualHosts.${domain} = { services.nginx.virtualHosts.${domain} = {
locations."/".proxyPass = "http://127.0.0.1:${toString port}"; locations."/".proxyPass = "http://127.0.0.1:${toString cfg.port}";
extraConfig = '' extraConfig = ''
client_max_body_size 512M; client_max_body_size 512M;

View File

@ -5,7 +5,7 @@ let
in { in {
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
package = pkgs.nextcloud31; package = pkgs.nextcloud30;
inherit hostName; inherit hostName;
home = "/tank/nextcloud"; home = "/tank/nextcloud";
https = true; https = true;
@ -46,9 +46,7 @@ in {
oidc_login_filter_allowed_values = [ "nextcloud-user" ]; oidc_login_filter_allowed_values = [ "nextcloud-user" ];
oidc_login_disable_registration = false; oidc_login_disable_registration = false;
"memories.exiftool" = pkgs.writeShellScript "exiftool-perl" '' "memories.exiftool" = "${cfg.home}/store-apps/memories/bin-ext/exiftool-amd64-glibc";
${lib.getExe pkgs.perl} ${cfg.home}/store-apps/memories/bin-ext/exiftool/exiftool "$@"
'';
"memories.exiftool_no_local" = false; "memories.exiftool_no_local" = false;
"memories.vod.disable" = false; "memories.vod.disable" = false;
"memories.vod.ffmpeg" = "${lib.getExe pkgs.ffmpeg-headless}"; "memories.vod.ffmpeg" = "${lib.getExe pkgs.ffmpeg-headless}";

View File

@ -18,17 +18,17 @@
./services/wireguard.nix ./services/wireguard.nix
# Services # Services
# ./services/flame.nix ./services/flame.nix
./services/gitea.nix ./services/gitea.nix
./services/hedgedoc.nix ./services/hedgedoc.nix
./services/home-assistant.nix ./services/home-assistant.nix
./services/keycloak.nix ./services/keycloak.nix
# ./services/koillection.nix ./services/koillection.nix
./services/matrix ./services/matrix
./services/microbin.nix ./services/microbin.nix
./services/minecraft/home.nix ./services/minecraft/home.nix
./services/monitoring ./services/monitoring
# ./services/rtl-tcp.nix ./services/rtl-tcp.nix
./services/searx.nix ./services/searx.nix
./services/vaultwarden.nix ./services/vaultwarden.nix
]; ];

View File

@ -15,15 +15,13 @@
fileSystems = { fileSystems = {
"/mnt/feal-syn1/backup" = { "/mnt/feal-syn1/backup" = {
device = "192.168.10.162:/volume2/backup"; device = "feal-syn1.home.feal.no:/volume2/backup";
fsType = "nfs"; fsType = "nfs";
options = [ options = [
"defaults" "defaults"
"noatime" "noatime"
"rw" "rw"
"nfsvers=3" "nfsvers=3"
"x-systemd.automount"
"noauto"
]; ];
}; };
}; };

View File

@ -8,7 +8,7 @@ in {
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
homeassistant = { homeassistant = {
image = "ghcr.io/home-assistant/home-assistant:2025.5.3"; image = "ghcr.io/home-assistant/home-assistant:2024.1";
extraOptions = [ extraOptions = [
"--network=host" "--network=host"
"--device=/dev/ttyUSB0" # Sonoff Zigbee 3.0 USB "--device=/dev/ttyUSB0" # Sonoff Zigbee 3.0 USB

View File

@ -23,6 +23,8 @@
pulse.enable = true; pulse.enable = true;
jack.enable = true; jack.enable = true;
}; };
hardware.pulseaudio.enable = false;
# Fonts # Fonts
fonts = { fonts = {
@ -34,7 +36,11 @@
font-awesome font-awesome
fira-code fira-code
hack-font hack-font
nerd-fonts.hack (nerdfonts.override {
fonts = [
"Hack"
];
})
]; ];
}; };

View File

@ -1,37 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/75dd0e39-9411-48c9-822d-bf3c897d0f61";
fsType = "ext4";
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/3ecaedab-415c-4cce-a3a9-9f3782acb682";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0800-59D9";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault false;
# networking.interfaces.enp1s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -25,15 +25,8 @@ in {
virt-manager virt-manager
w3m w3m
(unstable.microsoft-edge.overrideAttrs ({ installPhase ? "", ... }: {
installPhase = installPhase + ''
ln -s $out/bin/microsoft-edge $out/bin/microsoft-edge-stable
'';
}))
# Window Manager Extras # Window Manager Extras
bibata-cursors bibata-cursors
brightnessctl
cliphist cliphist
hyprcursor hyprcursor
hypridle hypridle

View File

@ -10,7 +10,6 @@
./services/mysql.nix ./services/mysql.nix
./services/nginx.nix ./services/nginx.nix
./services/www-ctf-feal-no.nix
./services/www-kinealbrigtsen-no.nix ./services/www-kinealbrigtsen-no.nix
]; ];

View File

@ -1,14 +0,0 @@
{ config, pkgs, lib, ... }:
{
services.nginx.virtualHosts."ctf.feal.no" = {
locations = {
"/".return = "302 https://www.feal.no/";
"/cc/" = {
alias = "${pkgs.cyberchef}/share/cyberchef/";
index = "index.html";
};
"= /cc".return = "302 /cc/";
};
};
}

View File

@ -83,6 +83,7 @@
set_real_ip_from 192.168.11.0/24; set_real_ip_from 192.168.11.0/24;
real_ip_header X-Forwarded-For; real_ip_header X-Forwarded-For;
add_header Content-Security-Policy "script-src 'self'; object-src 'none'; base-uri 'none';" always;
add_header 'Referrer-Policy' 'origin-when-cross-origin'; add_header 'Referrer-Policy' 'origin-when-cross-origin';
add_header X-Frame-Options DENY; add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff; add_header X-Content-Type-Options nosniff;

View File

@ -11,16 +11,15 @@
networking = { networking = {
hostName = "sisko"; hostName = "sisko";
networkmanager.enable = true; defaultGateway = "192.168.10.1";
# defaultGateway = "192.168.10.1"; interfaces.enp14s0 = {
# interfaces.enp14s0 = { ipv4 = {
# ipv4 = { addresses = [
# addresses = [ { address = "192.168.10.172"; prefixLength = 24; }
# { address = "192.168.10.172"; prefixLength = 24; } ];
# ]; };
# }; wakeOnLan.enable = true;
# wakeOnLan.enable = true; };
# };
hostId = "b716d781"; hostId = "b716d781";
}; };
@ -28,7 +27,7 @@
sops.defaultSopsFile = ../../secrets/sisko/sisko.yaml; sops.defaultSopsFile = ../../secrets/sisko/sisko.yaml;
environment.variables = { EDITOR = "vim"; }; environment.variables = { EDITOR = "vim"; };
users.users.felixalb.extraGroups = [ "dialout" "networkmanager" ]; users.users.felixalb.extraGroups = [ "dialout" ];
programs = { programs = {
gamemode.enable = true; gamemode.enable = true;
@ -58,9 +57,6 @@
"steam-unwrapped" "steam-unwrapped"
"tlclient" "tlclient"
]; ];
permittedInsecurePackages = [
"openssl-1.1.1w"
];
}; };

View File

@ -29,13 +29,17 @@
fonts = { fonts = {
fontDir.enable = true; fontDir.enable = true;
packages = with pkgs; [ packages = with pkgs; [
fira-code
font-awesome
hack-font
nerd-fonts.hack
noto-fonts noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji noto-fonts-emoji
noto-fonts-cjk-sans
font-awesome
fira-code
hack-font
(nerdfonts.override {
fonts = [
"Hack"
];
})
]; ];
}; };

View File

@ -8,37 +8,31 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
# GUI Applications # GUI Applications
cantata
chromium chromium
discord discord
easyeffects easyeffects
element-desktop element-desktop
emacs-gtk emacs-gtk
feishin papers
jellyfin-media-player jellyfin-media-player
kitty kitty
libreoffice libreoffice
mpv mpv
mumble mumble
papers
pavucontrol pavucontrol
picard picard
prismlauncher prismlauncher
runelite
spotify
swayimg swayimg
spotify
thunderbird thunderbird
tor-browser
unstable.bolt-launcher
exiftool exiftool
ghidra ghidra
# pwndbg-gdb-alias # Broken in 25.05 pwndbg-gdb-alias
snicat snicat
# Window Manager Extras # Window Manager Extras
bibata-cursors bibata-cursors
cliphist
hyprcursor hyprcursor
hypridle hypridle
hyprlock hyprlock
@ -51,9 +45,9 @@
swaynotificationcenter swaynotificationcenter
waybar waybar
wl-clipboard wl-clipboard
cliphist
# Misc tools # Misc tools
abcde
bc bc
catimg catimg
dante dante

View File

@ -8,8 +8,6 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix = { nix = {
enable = true;
# gc = { # gc = {
# automatic = true; # automatic = true;
# options = "--delete-older-than 2d"; # options = "--delete-older-than 2d";
@ -76,8 +74,6 @@
}; };
}; };
ids.gids.nixbld = 30000;
system.primaryUser = "felixalb";
users.users.felixalb = { users.users.felixalb = {
home = "/Users/felixalb"; home = "/Users/felixalb";
shell = pkgs.zsh; shell = pkgs.zsh;
@ -88,11 +84,16 @@
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
fira-code
font-awesome
hack-font
nerd-fonts.hack
noto-fonts noto-fonts
font-awesome
fira-code
hack-font
(nerdfonts.override {
fonts = [
"Hack"
];
})
]; ];
system.defaults = { system.defaults = {
@ -138,7 +139,9 @@
remapCapsLockToControl = true; remapCapsLockToControl = true;
}; };
# nix.package = pkgs.nix; # Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
system.stateVersion = 5; system.stateVersion = 5;
} }