diff --git a/flake.nix b/flake.nix index 24251bf..e4a932b 100644 --- a/flake.nix +++ b/flake.nix @@ -32,27 +32,13 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ - ./nixos/desktop.nix + ./nixos/configuration.nix inputs.minegrub-theme.nixosModules.default home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.nora = import ./home-manager/home.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.users.nora = import ./home-manager/desktop.nix; home-manager.extraSpecialArgs = { inherit inputs; }; } ]; diff --git a/home-manager/home.nix b/home-manager/desktop.nix similarity index 100% rename from home-manager/home.nix rename to home-manager/desktop.nix diff --git a/home-manager/laptop.nix b/home-manager/laptop.nix deleted file mode 100644 index 6f59d51..0000000 --- a/home-manager/laptop.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: { - imports = [ - ./home.nix - ]; - - is-laptop = true; -} diff --git a/home-manager/waybar.nix b/home-manager/waybar.nix index 64ac3da..7d2be0d 100644 --- a/home-manager/waybar.nix +++ b/home-manager/waybar.nix @@ -1,255 +1,211 @@ { config, pkgs, lib, ... }: { - options.is-laptop = lib.mkEnableOption "whether the computer is a laptop"; + home.file."${config.xdg.configHome}/waybar/config.jsonc" = { + text = + builtins.toJSON { + height = 35; + spacing = 4; - config = { - home.file."${config.xdg.configHome}/waybar/config.jsonc" = { - text = - builtins.toJSON { - height = 35; - spacing = 4; + modules-left = [ + "systemd-failed-units" + "custom/music-back" + "mpris" + "custom/music-next" + ]; + modules-center = [ + "clock" + ]; + modules-right = [ + "bluetooth" + "privacy" + "pulseaudio" + "cpu" + "memory" + "tray" + "custom/power" + ]; - modules-left = [ - "systemd-failed-units" - "custom/music-back" - "mpris" - "custom/music-next" - ]; - modules-center = [ - "clock" - ]; - modules-right = [ - "bluetooth" - "privacy" - "pulseaudio" - "cpu" - "memory" - "tray" - ] ++ - (if (config.is-laptop) then - [ "network" "power-profiles-daemon" "battery" ] - else [ ]) ++ - [ - "custom/power" - ]; - - systemd-failed-units = { - hide-on-ok = true; # Hide if there are zero failed units. - format = "✗ {nr_failed}"; - format-ok = "✓ systemd is ok but waybar is not"; - system = true; # monitor sytem units - user = true; # monitor user units - }; - "custom/music-back" = { - format = "⏴"; - tooltip = true; - tooltip-format = "Play previous song"; - on-click = "${lib.getExe pkgs.playerctl} previous"; - }; - mpris = { - format = "{status_icon} {dynamic}"; - dynamic-order = [ "title" "artist" ]; - status-icons = { - paused = "⏸"; - }; - }; - "custom/music-next" = { - format = "⏵"; - tooltip = true; - tooltip-format = "Play next song"; - on-click = "${lib.getExe pkgs.playerctl} next"; - }; - clock = { - interval = 1; - format = "{:%a %F %H:%M:%S}"; - tooltip-format = "{calendar}"; - calendar = { - mode = "year"; - mode-mon-col = 3; - weeks-pos = "right"; - on-scroll = 1; - format = { - months = "{}"; - days = "{}"; - weeks = "W{}"; - weekdays = "{}"; - today = "{}"; - }; - }; - actions = { - on-click-right = "mode"; - on-scroll-up = "shift_up"; - on-scroll-down = "shift_down"; - }; - }; - - bluetooth = { - format = " {status}"; - format-disabled = ""; # an empty format will hide the module - format-connected = " {num_connections} connected"; - on-click = lib.getExe pkgs.overskride; - }; - pulseaudio = { - # "scroll-step": 1, // %, can be a float - "format" = "{volume}% {icon} {format_source}"; - "format-bluetooth" = "{volume}% {icon} {format_source}"; - "format-bluetooth-muted" = " {icon} {format_source}"; - "format-muted" = " {format_source}"; - "format-source" = "{volume}% "; - "format-source-muted" = ""; - "format-icons" = { - "headphone" = ""; - "hands-free" = ""; - "headset" = ""; - "phone" = ""; - "portable" = ""; - "car" = ""; - "default" = [ "" "" "" ]; - }; - "on-click" = lib.getExe pkgs.pavucontrol; - }; - cpu = { - format = "{usage}% "; - tooltip = false; - }; - memory = { - format = "{}% "; - }; - tray = { - 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" = - let - power-menu = pkgs.writeText "power_menu.xml" '' - - - - - - Lock 🔒 - - - - - - - - Reboot ♻️ - - - - - Poweroff 💤 - - - - - ''; - in - { - "format" = "⏻"; - "tooltip" = false; - "menu" = "on-click"; - "menu-file" = power-menu; - "menu-actions" = { - "lock" = "${lib.getExe pkgs.swaylock}"; - "reboot" = "reboot"; - "poweroff" = "poweroff"; - }; - }; + systemd-failed-units = { + hide-on-ok = true; # Hide if there are zero failed units. + format = "✗ {nr_failed}"; + format-ok = "✓ systemd is ok but waybar is not"; + system = true; # monitor sytem units + user = true; # monitor user units + }; + "custom/music-back" = { + format = "⏴"; + tooltip = true; + tooltip-format = "Play previous song"; + on-click = "${lib.getExe pkgs.playerctl} previous"; + }; + mpris = { + format = "{status_icon} {dynamic}"; + dynamic-order = [ "title" "artist" ]; + status-icons = { + paused = "⏸"; + }; + }; + "custom/music-next" = { + format = "⏵"; + tooltip = true; + tooltip-format = "Play next song"; + on-click = "${lib.getExe pkgs.playerctl} next"; + }; + clock = { + interval = 1; + format = "{:%a %F %H:%M:%S}"; + tooltip-format = "{calendar}"; + calendar = { + mode = "year"; + mode-mon-col = 3; + weeks-pos = "right"; + on-scroll = 1; + format = { + months = "{}"; + days = "{}"; + weeks = "W{}"; + weekdays = "{}"; + today = "{}"; + }; + }; + actions = { + on-click-right = "mode"; + on-scroll-up = "shift_up"; + on-scroll-down = "shift_down"; + }; }; - }; - home.file."${config.xdg.configHome}/waybar/style.css" = { - text = '' - ${builtins.readFile ./default-waybar-style.css} - window#waybar { - background: linear-gradient( - to right, - rgb(131, 80, 117) 15%, - rgb(158, 103, 143) 30%, - rgb(131, 80, 117) 45%, - #db88c5 - ); - color: black; - } + bluetooth = { + format = " {status}"; + format-disabled = ""; # an empty format will hide the module + format-connected = " {num_connections} connected"; + on-click = lib.getExe pkgs.overskride; + }; + pulseaudio = { + # "scroll-step": 1, // %, can be a float + "format" = "{volume}% {icon} {format_source}"; + "format-bluetooth" = "{volume}% {icon} {format_source}"; + "format-bluetooth-muted" = " {icon} {format_source}"; + "format-muted" = " {format_source}"; + "format-source" = "{volume}% "; + "format-source-muted" = ""; + "format-icons" = { + "headphone" = ""; + "hands-free" = ""; + "headset" = ""; + "phone" = ""; + "portable" = ""; + "car" = ""; + "default" = [ "" "" "" ]; + }; + "on-click" = lib.getExe pkgs.pavucontrol; + }; + cpu = { + format = "{usage}% "; + tooltip = false; + }; + memory = { + format = "{}% "; + }; + tray = { + spacing = 10; + }; + "custom/power" = + let + power-menu = pkgs.writeText "power_menu.xml" '' + + + + + + Lock 🔒 + + + + + + + + Reboot ♻️ + + + + + Poweroff 💤 + + + + + ''; + in + { + "format" = "⏻"; + "tooltip" = false; + "menu" = "on-click"; + "menu-file" = power-menu; + "menu-actions" = { + "lock" = "${lib.getExe pkgs.swaylock}"; + "reboot" = "reboot"; + "poweroff" = "poweroff"; + }; + }; + }; + }; + home.file."${config.xdg.configHome}/waybar/style.css" = { + text = '' + ${builtins.readFile ./default-waybar-style.css} - #systemd-failed-units { - padding-left: 30px; - padding-right: 30px; - background-color: red; - } + window#waybar { + background: linear-gradient( + to right, + rgb(131, 80, 117) 15%, + rgb(158, 103, 143) 30%, + rgb(131, 80, 117) 45%, + #db88c5 + ); + color: black; + } - #mpris { - color: white; - } + #systemd-failed-units { + padding-left: 30px; + padding-right: 30px; + background-color: red; + } - #custom-music-back, #custom-music-next { - font-size: 20px; - color: white; - } + #mpris { + color: white; + } - #custom-music-back { - padding: 0 10px 0 15px; - } - #custom-music-next { - padding: 0 10px; - } + #custom-music-back, #custom-music-next { + font-size: 20px; + color: white; + } - #clock { - background: unset; - color: white; - } + #custom-music-back { + padding: 0 10px 0 15px; + } + #custom-music-next { + padding: 0 10px; + } - #privacy *, #pulseaudio, #cpu, #memory, #tray, #network, #power-profiles-daemon, #battery { - background-color: unset; - color: black; - } + #clock { + background: unset; + color: white; + } - #custom-power { - padding-left: 15px; - padding-right: 15px; - font-size: 30px; - background-color: rebeccapurple; - color: white; - } - ''; - }; + #privacy *, #pulseaudio, #cpu, #memory, #tray { + background-color: unset; + color: black; + } + + #custom-power { + padding-left: 15px; + padding-right: 15px; + font-size: 30px; + background-color: rebeccapurple; + color: white; + } + ''; }; } diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 1a497d0..1053a72 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -12,10 +12,17 @@ in # inputs.hardware.nixosModules.common-cpu-amd # inputs.hardware.nixosModules.common-ssd + # You can also split up your configuration and import pieces of it here: + # ./users.nix + inputs.niri.nixosModules.niri + + # Import your generated (nixos-generate-config) hardware configuration + ./hardware-configuration.nix ]; nixpkgs = { + # You can add overlays here overlays = [ # If you want to use overlays exported from other flakes: # neovim-nightly-overlay.overlays.default @@ -28,9 +35,14 @@ in # }; # ) ]; + # Configure your nixpkgs instance config = { + # Disable if you don't want unfree packages allowUnfree = 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"; + # Windows sets the hardware clock in local time by default. + time.hardwareClockInLocalTime = true; i18n.defaultLocale = "en_US.UTF-8"; # Bootloader. # 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 = { emulatedSystems = [ "wasm32-wasi" "aarch64-linux" ]; preferStaticEmulators = true; # required to work with podman (apparently) }; - boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackages_6_6; boot.kernel.sysctl = { "net.ipv4.ip_forward" = 1; @@ -84,6 +116,13 @@ in "kernel.sysrq" = 340; }; + boot.supportedFilesystems = [ "ntfs" ]; + + fileSystems."/mnt/nas" = { + device = "192.168.178.47:/volume1/homes"; + fsType = "nfs"; + }; + # Enable the Wayland windowing system. services.displayManager.gdm.enable = true; services.desktopManager = { @@ -106,6 +145,11 @@ in 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 # https://unix.stackexchange.com/questions/58900/how-to-scroll-the-screen-using-the-middle-click #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 = { enable = true; extraPackages = with pkgs; [ @@ -134,6 +184,8 @@ in }; programs.waybar.enable = true; + programs.coolercontrol.enable = true; + programs.coolercontrol.nvidiaSupport = true; services.flatpak.enable = true; console.keyMap = "sg"; @@ -172,6 +224,11 @@ in services.nixseparatedebuginfod.enable = true; + services.tailscale = { + enable = true; + useRoutingFeatures = "both"; + }; + users = { users = { 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 = { "text/html" = "firefox.desktop"; "x-scheme-handler/http" = "firefox.desktop"; @@ -224,6 +304,28 @@ in # This is apparently used by Electron? Maybe not anymore. 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.systemPackages = with pkgs; [ vim @@ -232,8 +334,14 @@ in # for firefox-nightly # inputs.firefox.packages.${pkgs.system}.firefox-nightly-bin firefox + os-prober 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 unzip (steam.override { @@ -249,6 +357,7 @@ in man-pages man-pages-posix bpftrace + tailscale file comma alacritty @@ -294,12 +403,32 @@ in }; }; + # TODO: ENABLE NVIDIA DRIVERS WHEN THEY STOP BEING READY + #hardware.nvidia-container-toolkit.enable = true; + hardware.enableAllFirmware = true; # Open ports in the firewall. networking.firewall = { 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 = "🏳️‍⚧️"; + + # 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"; } diff --git a/nixos/desktop.nix b/nixos/desktop.nix deleted file mode 100644 index d638775..0000000 --- a/nixos/desktop.nix +++ /dev/null @@ -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"; -} diff --git a/nixos/desktop-hardware-configuration.nix b/nixos/hardware-configuration.nix similarity index 97% rename from nixos/desktop-hardware-configuration.nix rename to nixos/hardware-configuration.nix index 06b2a8d..f24461a 100644 --- a/nixos/desktop-hardware-configuration.nix +++ b/nixos/hardware-configuration.nix @@ -1,7 +1,7 @@ # 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, modulesPath, ... }: +{ config, lib, pkgs, modulesPath, ... }: { imports = diff --git a/nixos/laptop-hardware-configuration.nix b/nixos/laptop-hardware-configuration.nix deleted file mode 100644 index 1e5aca7..0000000 --- a/nixos/laptop-hardware-configuration.nix +++ /dev/null @@ -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..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; -} diff --git a/nixos/laptop.nix b/nixos/laptop.nix deleted file mode 100644 index 39681b6..0000000 --- a/nixos/laptop.nix +++ /dev/null @@ -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"; -} diff --git a/nixos/paperless.nix b/nixos/paperless.nix deleted file mode 100644 index 53fc995..0000000 --- a/nixos/paperless.nix +++ /dev/null @@ -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 - }; - }; -}