mirror of
https://github.com/Noratrieb/nixos.git
synced 2026-03-16 09:16:03 +01:00
Compare commits
No commits in common. "a629e9f28c6030e9d01e0c9d4b4096d8c77cd1ea" and "e9cfcd1d2216b387d2364c740c91ceeeb1111535" have entirely different histories.
a629e9f28c
...
e9cfcd1d22
10 changed files with 330 additions and 453 deletions
18
flake.nix
18
flake.nix
|
|
@ -32,27 +32,13 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./nixos/desktop.nix
|
./nixos/configuration.nix
|
||||||
inputs.minegrub-theme.nixosModules.default
|
inputs.minegrub-theme.nixosModules.default
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.nora = import ./home-manager/home.nix;
|
home-manager.users.nora = import ./home-manager/desktop.nix;
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
scrap = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = { inherit inputs; };
|
|
||||||
modules = [
|
|
||||||
./nixos/laptop.nix
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.nora = import ./home-manager/laptop.nix;
|
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{ ... }: {
|
|
||||||
imports = [
|
|
||||||
./home.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
is-laptop = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.is-laptop = lib.mkEnableOption "whether the computer is a laptop";
|
|
||||||
|
|
||||||
config = {
|
|
||||||
home.file."${config.xdg.configHome}/waybar/config.jsonc" = {
|
home.file."${config.xdg.configHome}/waybar/config.jsonc" = {
|
||||||
text =
|
text =
|
||||||
builtins.toJSON {
|
builtins.toJSON {
|
||||||
|
|
@ -26,11 +23,6 @@
|
||||||
"cpu"
|
"cpu"
|
||||||
"memory"
|
"memory"
|
||||||
"tray"
|
"tray"
|
||||||
] ++
|
|
||||||
(if (config.is-laptop) then
|
|
||||||
[ "network" "power-profiles-daemon" "battery" ]
|
|
||||||
else [ ]) ++
|
|
||||||
[
|
|
||||||
"custom/power"
|
"custom/power"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -119,41 +111,6 @@
|
||||||
tray = {
|
tray = {
|
||||||
spacing = 10;
|
spacing = 10;
|
||||||
};
|
};
|
||||||
"network" = {
|
|
||||||
# "interface": "wlp2*", // (Optional) To force the use of this interface
|
|
||||||
"format-wifi" = " ({signalStrength}%)";
|
|
||||||
"format-ethernet" = "{ipaddr}/{cidr} ";
|
|
||||||
"tooltip-format" = "{ifname} via {gwaddr} ({ipaddr}/{cidr})";
|
|
||||||
"format-linked" = "{ifname} (No IP) ";
|
|
||||||
"format-disconnected" = "Disconnected ⚠";
|
|
||||||
"format-alt" = "{ifname}: {ipaddr}/{cidr}";
|
|
||||||
};
|
|
||||||
"power-profiles-daemon" = {
|
|
||||||
"format" = "{icon}";
|
|
||||||
"tooltip-format" = "Power profile: {profile}\nDriver: {driver}";
|
|
||||||
"tooltip" = true;
|
|
||||||
"format-icons" = {
|
|
||||||
"default" = "";
|
|
||||||
"performance" = "";
|
|
||||||
"balanced" = "";
|
|
||||||
"power-saver" = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"battery" = {
|
|
||||||
"states" = {
|
|
||||||
# "good": 95,
|
|
||||||
"warning" = 30;
|
|
||||||
"critical" = 5;
|
|
||||||
};
|
|
||||||
"format" = "{capacity}% {icon}";
|
|
||||||
"format-full" = "{capacity}% {icon}";
|
|
||||||
"format-charging" = "{capacity}% ";
|
|
||||||
"format-plugged" = "{capacity}% ";
|
|
||||||
"format-alt" = "{time} {icon}";
|
|
||||||
# "format-good": "", // An empty format will hide the module
|
|
||||||
# "format-full": "",
|
|
||||||
"format-icons" = [ "" "" "" "" "" ];
|
|
||||||
};
|
|
||||||
"custom/power" =
|
"custom/power" =
|
||||||
let
|
let
|
||||||
power-menu = pkgs.writeText "power_menu.xml" ''
|
power-menu = pkgs.writeText "power_menu.xml" ''
|
||||||
|
|
@ -237,7 +194,7 @@
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#privacy *, #pulseaudio, #cpu, #memory, #tray, #network, #power-profiles-daemon, #battery {
|
#privacy *, #pulseaudio, #cpu, #memory, #tray {
|
||||||
background-color: unset;
|
background-color: unset;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
@ -251,5 +208,4 @@
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,17 @@ in
|
||||||
# inputs.hardware.nixosModules.common-cpu-amd
|
# inputs.hardware.nixosModules.common-cpu-amd
|
||||||
# inputs.hardware.nixosModules.common-ssd
|
# inputs.hardware.nixosModules.common-ssd
|
||||||
|
|
||||||
|
# You can also split up your configuration and import pieces of it here:
|
||||||
|
# ./users.nix
|
||||||
|
|
||||||
inputs.niri.nixosModules.niri
|
inputs.niri.nixosModules.niri
|
||||||
|
|
||||||
|
# Import your generated (nixos-generate-config) hardware configuration
|
||||||
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
|
# You can add overlays here
|
||||||
overlays = [
|
overlays = [
|
||||||
# If you want to use overlays exported from other flakes:
|
# If you want to use overlays exported from other flakes:
|
||||||
# neovim-nightly-overlay.overlays.default
|
# neovim-nightly-overlay.overlays.default
|
||||||
|
|
@ -28,9 +35,14 @@ in
|
||||||
# };
|
# };
|
||||||
# )
|
# )
|
||||||
];
|
];
|
||||||
|
# Configure your nixpkgs instance
|
||||||
config = {
|
config = {
|
||||||
|
# Disable if you don't want unfree packages
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
nvidia.acceptLicense = true;
|
nvidia.acceptLicense = true;
|
||||||
|
permittedInsecurePackages = [
|
||||||
|
"electron-25.9.0" # Temporary fix until the next obsidian release: https://github.com/NixOS/nixpkgs/issues/273611
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -51,21 +63,41 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking = {
|
||||||
|
hostName = "nixos";
|
||||||
|
networkmanager.enable = true;
|
||||||
|
extraHosts =
|
||||||
|
''
|
||||||
|
192.168.122.44 illumos-vm
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
time.timeZone = "Europe/Zurich";
|
time.timeZone = "Europe/Zurich";
|
||||||
|
# Windows sets the hardware clock in local time by default.
|
||||||
|
time.hardwareClockInLocalTime = true;
|
||||||
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
# boot.loader.systemd-boot.enable = true;
|
# boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||||
|
boot.loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
device = "nodev";
|
||||||
|
efiSupport = true;
|
||||||
|
useOSProber = true;
|
||||||
|
minegrub-theme = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
boot.binfmt = {
|
boot.binfmt = {
|
||||||
emulatedSystems = [ "wasm32-wasi" "aarch64-linux" ];
|
emulatedSystems = [ "wasm32-wasi" "aarch64-linux" ];
|
||||||
preferStaticEmulators = true; # required to work with podman (apparently)
|
preferStaticEmulators = true; # required to work with podman (apparently)
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_6_6;
|
||||||
|
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
"net.ipv4.ip_forward" = 1;
|
"net.ipv4.ip_forward" = 1;
|
||||||
|
|
@ -84,6 +116,13 @@ in
|
||||||
"kernel.sysrq" = 340;
|
"kernel.sysrq" = 340;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
boot.supportedFilesystems = [ "ntfs" ];
|
||||||
|
|
||||||
|
fileSystems."/mnt/nas" = {
|
||||||
|
device = "192.168.178.47:/volume1/homes";
|
||||||
|
fsType = "nfs";
|
||||||
|
};
|
||||||
|
|
||||||
# Enable the Wayland windowing system.
|
# Enable the Wayland windowing system.
|
||||||
services.displayManager.gdm.enable = true;
|
services.displayManager.gdm.enable = true;
|
||||||
services.desktopManager = {
|
services.desktopManager = {
|
||||||
|
|
@ -106,6 +145,11 @@ in
|
||||||
variant = "";
|
variant = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ndivia drivers
|
||||||
|
# long story short night light mode is currently broken with nvidia drivers. LMAO
|
||||||
|
# - https://forums.developer.nvidia.com/t/screen-freezes-at-random-intervals-with-rtx-4060-max-q-mobile-multiple-driver-versions-tested/295811/6?u=mirao
|
||||||
|
videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
# mouse settings
|
# mouse settings
|
||||||
# https://unix.stackexchange.com/questions/58900/how-to-scroll-the-screen-using-the-middle-click
|
# https://unix.stackexchange.com/questions/58900/how-to-scroll-the-screen-using-the-middle-click
|
||||||
#libinput.mouse = {
|
#libinput.mouse = {
|
||||||
|
|
@ -115,6 +159,12 @@ in
|
||||||
#};
|
#};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware.nvidia = {
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/299944#issuecomment-2027246826
|
||||||
|
modesetting.enable = true;
|
||||||
|
open = true;
|
||||||
|
};
|
||||||
|
|
||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
|
|
@ -134,6 +184,8 @@ in
|
||||||
};
|
};
|
||||||
programs.waybar.enable = true;
|
programs.waybar.enable = true;
|
||||||
|
|
||||||
|
programs.coolercontrol.enable = true;
|
||||||
|
programs.coolercontrol.nvidiaSupport = true;
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
console.keyMap = "sg";
|
console.keyMap = "sg";
|
||||||
|
|
@ -172,6 +224,11 @@ in
|
||||||
|
|
||||||
services.nixseparatedebuginfod.enable = true;
|
services.nixseparatedebuginfod.enable = true;
|
||||||
|
|
||||||
|
services.tailscale = {
|
||||||
|
enable = true;
|
||||||
|
useRoutingFeatures = "both";
|
||||||
|
};
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
users = {
|
users = {
|
||||||
nora = {
|
nora = {
|
||||||
|
|
@ -216,6 +273,29 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.paperless-ngx-backup = {
|
||||||
|
description = "paperless-ngx data backup to NAS";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "nora";
|
||||||
|
ExecStart = ''
|
||||||
|
${lib.getExe pkgs.rsync} -a -v --delete --exclude=redis /home/nora/.local/share/paperless-ngx/ /mnt/nas/HEY/_Nora/paperless/backup
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.timers.paperless-ngx-backup = {
|
||||||
|
description = "paperless-ngx data backup to NAS";
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
Unit = "paperless-ngx-backup.service";
|
||||||
|
OnCalendar = "daily UTC";
|
||||||
|
RandomizedDelaySec = 1800;
|
||||||
|
FixedRandomDelay = true;
|
||||||
|
Persistent = true; # ensure it still runs if the computer was down at the timer of trigger
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
xdg.mime.defaultApplications = {
|
xdg.mime.defaultApplications = {
|
||||||
"text/html" = "firefox.desktop";
|
"text/html" = "firefox.desktop";
|
||||||
"x-scheme-handler/http" = "firefox.desktop";
|
"x-scheme-handler/http" = "firefox.desktop";
|
||||||
|
|
@ -224,6 +304,28 @@ in
|
||||||
# This is apparently used by Electron? Maybe not anymore.
|
# This is apparently used by Electron? Maybe not anymore.
|
||||||
environment.sessionVariables.DEFAULT_BROWSER = lib.getExe pkgs.firefox;
|
environment.sessionVariables.DEFAULT_BROWSER = lib.getExe pkgs.firefox;
|
||||||
|
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
hostKeys = [
|
||||||
|
{
|
||||||
|
path = "/etc/ssh/ssh_host_ed25519_key";
|
||||||
|
type = "ed25519";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# P256
|
||||||
|
path = "/etc/ssh/ssh_host_ecdsa_key";
|
||||||
|
type = "ecdsa";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
bits = 4096;
|
||||||
|
path = "/etc/ssh/ssh_host_rsa_key";
|
||||||
|
type = "rsa";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
settings.PermitRootLogin = "no";
|
||||||
|
settings.PasswordAuthentication = false;
|
||||||
|
};
|
||||||
|
|
||||||
environment.enableDebugInfo = true;
|
environment.enableDebugInfo = true;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
|
|
@ -232,8 +334,14 @@ in
|
||||||
# for firefox-nightly
|
# for firefox-nightly
|
||||||
# inputs.firefox.packages.${pkgs.system}.firefox-nightly-bin
|
# inputs.firefox.packages.${pkgs.system}.firefox-nightly-bin
|
||||||
firefox
|
firefox
|
||||||
|
os-prober
|
||||||
git
|
git
|
||||||
(linuxKernel.packagesFor linuxKernel.kernels.linux_latest).perf
|
(linuxKernel.packagesFor
|
||||||
|
(linuxKernel.kernels.linux_6_6.override {
|
||||||
|
stdenv = gcc12Stdenv;
|
||||||
|
buildPackages = pkgs.buildPackages // { stdenv = gcc12Stdenv; };
|
||||||
|
})
|
||||||
|
).perf
|
||||||
fish
|
fish
|
||||||
unzip
|
unzip
|
||||||
(steam.override {
|
(steam.override {
|
||||||
|
|
@ -249,6 +357,7 @@ in
|
||||||
man-pages
|
man-pages
|
||||||
man-pages-posix
|
man-pages-posix
|
||||||
bpftrace
|
bpftrace
|
||||||
|
tailscale
|
||||||
file
|
file
|
||||||
comma
|
comma
|
||||||
alacritty
|
alacritty
|
||||||
|
|
@ -294,12 +403,32 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# TODO: ENABLE NVIDIA DRIVERS WHEN THEY STOP BEING READY
|
||||||
|
#hardware.nvidia-container-toolkit.enable = true;
|
||||||
|
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableAllFirmware = true;
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
trustedInterfaces = [ "tailscale0" ];
|
||||||
|
allowedUDPPorts = [ config.services.tailscale.port ];
|
||||||
|
allowedTCPPorts = [ /*SSH*/ 22 ];
|
||||||
|
|
||||||
|
# https://github.com/tailscale/tailscale/issues/4432#issuecomment-1112819111
|
||||||
|
checkReversePath = "loose";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.interfaces.enp39s0.wakeOnLan.enable = true;
|
||||||
|
|
||||||
system.nixos.distroName = "🏳️⚧️";
|
system.nixos.distroName = "🏳️⚧️";
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
|
system.stateVersion = "22.11";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,109 +0,0 @@
|
||||||
{ pkgs, config, ... }: {
|
|
||||||
imports = [
|
|
||||||
./desktop-hardware-configuration.nix
|
|
||||||
./paperless.nix
|
|
||||||
./configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostName = "nixos";
|
|
||||||
extraHosts =
|
|
||||||
''
|
|
||||||
192.168.122.44 illumos-vm
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Windows sets the hardware clock in local time by default.
|
|
||||||
time.hardwareClockInLocalTime = true;
|
|
||||||
|
|
||||||
boot.loader.grub = {
|
|
||||||
enable = true;
|
|
||||||
device = "nodev";
|
|
||||||
efiSupport = true;
|
|
||||||
useOSProber = true;
|
|
||||||
minegrub-theme = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
|
|
||||||
boot.supportedFilesystems = [ "ntfs" ];
|
|
||||||
|
|
||||||
fileSystems."/mnt/nas" = {
|
|
||||||
device = "192.168.178.47:/volume1/homes";
|
|
||||||
fsType = "nfs";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
# ndivia drivers
|
|
||||||
# long story short night light mode is currently broken with nvidia drivers. LMAO
|
|
||||||
# - https://forums.developer.nvidia.com/t/screen-freezes-at-random-intervals-with-rtx-4060-max-q-mobile-multiple-driver-versions-tested/295811/6?u=mirao
|
|
||||||
videoDrivers = [ "nvidia" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.nvidia = {
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/299944#issuecomment-2027246826
|
|
||||||
modesetting.enable = true;
|
|
||||||
open = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.coolercontrol.enable = true;
|
|
||||||
programs.coolercontrol.nvidiaSupport = true;
|
|
||||||
|
|
||||||
services.tailscale = {
|
|
||||||
enable = true;
|
|
||||||
useRoutingFeatures = "both";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
hostKeys = [
|
|
||||||
{
|
|
||||||
path = "/etc/ssh/ssh_host_ed25519_key";
|
|
||||||
type = "ed25519";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
# P256
|
|
||||||
path = "/etc/ssh/ssh_host_ecdsa_key";
|
|
||||||
type = "ecdsa";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
bits = 4096;
|
|
||||||
path = "/etc/ssh/ssh_host_rsa_key";
|
|
||||||
type = "rsa";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
settings.PermitRootLogin = "no";
|
|
||||||
settings.PasswordAuthentication = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
tailscale
|
|
||||||
os-prober
|
|
||||||
];
|
|
||||||
|
|
||||||
networking.firewall = {
|
|
||||||
trustedInterfaces = [ "tailscale0" ];
|
|
||||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
|
||||||
allowedTCPPorts = [ /*SSH*/ 22 ];
|
|
||||||
|
|
||||||
# https://github.com/tailscale/tailscale/issues/4432#issuecomment-1112819111
|
|
||||||
checkReversePath = "loose";
|
|
||||||
};
|
|
||||||
|
|
||||||
# TODO: ENABLE NVIDIA DRIVERS WHEN THEY STOP BEING READY
|
|
||||||
#hardware.nvidia-container-toolkit.enable = true;
|
|
||||||
|
|
||||||
networking.interfaces.enp39s0.wakeOnLan.enable = true;
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
|
||||||
system.stateVersion = "22.11";
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
|
@ -1,40 +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 = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/646dc4c1-53aa-4fce-9328-f7c42a5b5ea8";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-c16da30d-5953-4ce9-995a-f4acd77dcaf7".device = "/dev/disk/by-uuid/c16da30d-5953-4ce9-995a-f4acd77dcaf7";
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/E494-B917";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
{ ... }: {
|
|
||||||
imports = [
|
|
||||||
./laptop-hardware-configuration.nix
|
|
||||||
./configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostName = "scrap";
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
system.stateVersion = "25.11";
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
{ lib, pkgs, ... }: {
|
|
||||||
systemd.services.paperless-ngx-backup = {
|
|
||||||
description = "paperless-ngx data backup to NAS";
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
User = "nora";
|
|
||||||
ExecStart = ''
|
|
||||||
${lib.getExe pkgs.rsync} -a -v --delete --exclude=redis /home/nora/.local/share/paperless-ngx/ /mnt/nas/HEY/_Nora/paperless/backup
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
systemd.timers.paperless-ngx-backup = {
|
|
||||||
description = "paperless-ngx data backup to NAS";
|
|
||||||
wantedBy = [ "timers.target" ];
|
|
||||||
timerConfig = {
|
|
||||||
Unit = "paperless-ngx-backup.service";
|
|
||||||
OnCalendar = "daily UTC";
|
|
||||||
RandomizedDelaySec = 1800;
|
|
||||||
FixedRandomDelay = true;
|
|
||||||
Persistent = true; # ensure it still runs if the computer was down at the timer of trigger
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue