This commit is contained in:
Tasia Iso 2024-04-17 20:39:12 +02:00
parent b86ae0dcb6
commit b48972e264
29 changed files with 400 additions and 300 deletions

8
common/allow-unfree.nix Normal file
View file

@ -0,0 +1,8 @@
{ pkgs,... }: {
# Allows non-free packages to be installed
nixpkgs = {
config = {
allowUnfree = true;
};
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

View file

@ -1,4 +1,4 @@
{ {
# Not working on my hardware for some reason # Not working on phoenix for some reason
programs.hyprland.enable = true; programs.hyprland.enable = true;
} }

View file

@ -0,0 +1,16 @@
{ pkgs, ...}: {
environment.systemPackages = with pkgs; [
# See ./plasma6.nix
ksshaskpass
libreoffice
kleopatra
kate
partition-manager
gparted
librewolf
vscodium
vlc
filelight
];
}

View file

@ -1,8 +1,22 @@
{ { pkgs, ...}: {
imports = [
./plasma-packages.nix
];
# Enable Xorg/Plasma5
services.xserver = { services.xserver = {
enable = true; enable = true;
displayManager.sddm.enable = true; displayManager.sddm.enable = true;
desktopManager.plasma5.enable = true; desktopManager.plasma5.enable = true;
}; };
# Use ksshaskpass to access stored secrets
environment.sessionVariables = rec {
GIT_ASKPASS=ksshaskpass
};
programs.kdeconnect = {
enable = true;
};
} }

View file

@ -1,11 +1,9 @@
{ { pkgs, ...}: {
services.desktopManager.plasma6.enable = true; imports = [
./plasma-packages.nix
services.xserver = { ];
enable = false;
libinput.enable = true;
};
# Enable Wayland/Plasma6
services.displayManager = { services.displayManager = {
sddm = { sddm = {
enable = true; enable = true;
@ -14,4 +12,15 @@
defaultSession = "plasma"; defaultSession = "plasma";
}; };
services.desktopManager.plasma6.enable = true;
# Use ksshaskpass to access stored secrets
environment.sessionVariables = rec {
GIT_ASKPASS = "ksshaskpass";
};
programs.kdeconnect = {
enable = true;
};
} }

View file

@ -1,107 +0,0 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [
# ./packages/neovim.nix
];
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
};
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome!
nix.nixPath = ["/etc/nix/path"];
environment.etc =
lib.mapAttrs'
(name: value: {
name = "nix/path/${name}";
value.source = value.flake;
})
config.nix.registry;
nix.settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Deduplicate and optimize nix store
auto-optimise-store = true;
};
# boot.loader = {
# systemd-boot = {
# enable = true;
# editor = true; # todo
# # memtest86.enable = true;
# };
# efi.canTouchEfiVariables = true;
# grub = {
# #theme = pkgs.sleek-grub-theme;
# #splashImage = ./boot-logo.png;
# };
# };
# Set your time zone.
time.timeZone = "Europe/Paris";
services.fwupd.enable = true;
networking = {
networkmanager.enable = true;
firewall.enable = true;
};
nix.settings.allowed-users = ["@wheel"];
security.sudo.execWheelOnly = true;
services.tailscale.enable = true;
environment.systemPackages = with pkgs; [
wget
dig
nmap
btop
gitFull
smartmontools
lm_sensors
pciutils
gcc
gnumake
sysstat
file
];
}

View file

@ -28,11 +28,6 @@
# }); # });
# }) # })
]; ];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
}; };
# This will add each flake input as a registry # This will add each flake input as a registry
@ -58,59 +53,14 @@
}; };
boot.loader = { boot.loader = {
systemd-boot = { systemd-boot.enable = true;
enable = true;
editor = true; # todo
# memtest86.enable = true;
};
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
grub = {
#theme = pkgs.sleek-grub-theme;
#splashImage = ./boot-logo.png;
};
}; };
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
users.defaultUserShell = pkgs.zsh;
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
ll = "ls -al";
};
ohMyZsh = {
enable = true;
plugins = [
"git"
];
theme = "robbyrussell";
};
};
services.fwupd.enable = true; services.fwupd.enable = true;
networking = { networking = {
@ -120,7 +70,6 @@
}; };
nix.settings.allowed-users = ["@wheel"]; nix.settings.allowed-users = ["@wheel"];
security.sudo.execWheelOnly = true; security.sudo.execWheelOnly = true;
services.tailscale.enable = true; services.tailscale.enable = true;
@ -143,6 +92,7 @@
dig dig
nmap nmap
btop btop
gitFull
smartmontools smartmontools
lm_sensors lm_sensors
pciutils pciutils
@ -151,15 +101,5 @@
sysstat sysstat
file file
ffmpeg ffmpeg
syncthing
kate
partition-manager
gparted
librewolf
vscodium
vlc
filelight
libreoffice
]; ];
} }

43
common/full-install.nix Normal file
View file

@ -0,0 +1,43 @@
{
pkgs,
...
}: {
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Z Shell
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
ll = "ls -al";
};
ohMyZsh = {
enable = true;
plugins = [
"git"
];
theme = "robbyrussell";
};
};
users.defaultUserShell = pkgs.zsh;
environment.systemPackages = with pkgs; [
#
];
}

View file

@ -0,0 +1,16 @@
{pkgs, ...}: {
# Disable systemd-boot
boot.loader = {
systemd-boot = {
enable = false;
};
efi.canTouchEfiVariables = false;
};
# Enables the generation of /boot/extlinux/extlinux.conf
boot.loader.generic-extlinux-compatible.enable = true;
# firmware
hardware.enableRedistributableFirmware = true;
}

View file

@ -1,6 +1,4 @@
{ {
# console.keyMap = "en";
services.xserver.xkb = { services.xserver.xkb = {
layout = "us"; layout = "us";
}; };

View file

@ -1,5 +1,6 @@
{ {
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";
i18n = { i18n = {
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";
extraLocaleSettings = { extraLocaleSettings = {

View file

@ -1,5 +1,6 @@
{ {
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";
i18n = { i18n = {
defaultLocale = "fr_FR.UTF-8"; defaultLocale = "fr_FR.UTF-8";
extraLocaleSettings = { extraLocaleSettings = {

View file

@ -1,4 +1,5 @@
{ {
# Ad-blocking DNS server
services.adguardhome.enable = true; services.adguardhome.enable = true;
networking.nameservers = ["127.0.0.1"]; networking.nameservers = ["127.0.0.1"];

View file

@ -1,4 +1,5 @@
{ {
# File sync service
services.syncthing = { services.syncthing = {
enable = true; enable = true;
user = "user"; user = "user";

View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1712791164, "lastModified": 1713248628,
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=", "narHash": "sha256-NLznXB5AOnniUtZsyy/aPWOk8ussTuePp2acb9U+ISA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5", "rev": "5672bc9dbf9d88246ddab5ac454e82318d094bb8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -25,11 +25,11 @@
}, },
"stable": { "stable": {
"locked": { "locked": {
"lastModified": 1712867921, "lastModified": 1713145326,
"narHash": "sha256-edTFV4KldkCMdViC/rmpJa7oLIU8SE/S35lh/ukC7bg=", "narHash": "sha256-m7+IWM6mkWOg22EC5kRUFCycXsXLSU7hWmHdmBfmC3s=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "51651a540816273b67bc4dedea2d37d116c5f7fe", "rev": "53a2c32bc66f5ae41a28d7a9a49d321172af621e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -41,11 +41,11 @@
}, },
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1712791164, "lastModified": 1713248628,
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=", "narHash": "sha256-NLznXB5AOnniUtZsyy/aPWOk8ussTuePp2acb9U+ISA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5", "rev": "5672bc9dbf9d88246ddab5ac454e82318d094bb8",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -59,6 +59,14 @@
]; ];
}; };
new-phoenix = stable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs outputs;};
modules = [
./hosts/new-phoenix/configuration.nix
];
};
pc = unstable.lib.nixosSystem { pc = unstable.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = {inherit inputs outputs;}; specialArgs = {inherit inputs outputs;};

View file

@ -5,22 +5,12 @@
}: { }: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../common/default-minimal.nix ../../common/default.nix
../../common/hardware/raspberry-pi.nix
# ../../common/packages/syncthing.nix ../../modules/nixos/vedirect-reader.nix
# If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
]; ];
boot.loader.grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
boot.loader.generic-extlinux-compatible.enable = true;
networking = { networking = {
hostName = "enry"; hostName = "enry";
@ -29,48 +19,30 @@
# firewall.allowedUDPPorts = [8080]; # firewall.allowedUDPPorts = [8080];
}; };
# services.vedirect-reader.enable = true;
users.users.user = { users.users.user = {
isNormalUser = true; isNormalUser = true;
description = "User"; description = "User";
extraGroups = ["networkmanager" "wheel" "dialout" "syncthing"]; extraGroups = ["networkmanager" "wheel" "dialout"];
initialPassword = "correcthorsebatterystaple"; initialPassword = "correcthorsebatterystaple";
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"SHA256:RrcbPCE9BPVLAEhERm81NwXA28OKpn9U6irR2vG7K5I user@phoenix" "SHA256:RrcbPCE9BPVLAEhERm81NwXA28OKpn9U6irR2vG7K5I user@phoenix"
]; ];
}; };
# services.btrfs.autoScrub = {
# enable = true;
# interval = "weekly";
# fileSystems = ["/" "/data"];
# };
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# This setups a SSH server. Very important if you're setting up a headless system.
# Feel free to remove if you don't need it.
services.openssh = { services.openssh = {
enable = true; enable = true;
settings = { settings = {
# Forbid root login through SSH. PermitRootLogin = "no";
PermitRootLogin = "yes"; PasswordAuthentication = false;
# Use keys only. Remove if you want to SSH using password (not recommended)
PasswordAuthentication = true;
}; };
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
#
]; ];
hardware.enableRedistributableFirmware = true;
# networking.wireless.enable = true;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

View file

@ -0,0 +1,69 @@
{
pkgs,
lib,
...
}: {
imports = [
./hardware-configuration.nix
../../common/default.nix
# ../../common/full-install.nix
../../common/locales/en.nix
../../common/locales/fr-keymap.nix
../../common/hardware/intelcpu.nix
# ../../common/hardware/amdgpu.nix
../../common/packages/syncthing.nix
../../common/packages/adguardhome.nix
];
networking = {
hostName = "phoenix";
firewall.enable = true;
firewall.allowedTCPPorts = [
12345 # tildefriends
13378 # audiobookshelf
];
firewall.allowedUDPPorts = [
12345 # tildefriends
];
};
users.users.user = {
isNormalUser = true;
description = "User";
extraGroups = ["networkmanager" "wheel" "syncthing"];
initialPassword = "correcthorsebatterystaple";
openssh.authorizedKeys.keys = [
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
];
};
services.btrfs.autoScrub = {
enable = true;
interval = "weekly";
fileSystems = ["/" "/data"];
};
virtualisation.docker.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
services.syncthing = {
dataDir = lib.mkForce "/home/user";
configDir = lib.mkForce "/data/sync/configuration/";
};
# Needed to build enry
boot.binfmt.emulatedSystems = ["aarch64-linux"];
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.05";
}

View file

@ -0,0 +1,55 @@
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/469da268-3ac1-4591-9209-26c89afb2e59";
fsType = "btrfs";
options = ["subvol=@"];
};
boot.initrd.luks.devices."luks-06613ddd-abd6-409e-9a33-889cb9d15d11".device = "/dev/disk/by-uuid/06613ddd-abd6-409e-9a33-889cb9d15d11";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/E398-A9BF";
fsType = "vfat";
};
fileSystems."/data" = {
device = "/dev/disk/by-uuid/648ae2f4-bd2e-4315-b12f-72733f92d2e0";
fsType = "btrfs";
};
boot.initrd.luks.devices."539c1a57-e6d0-4ff0-927a-8f0d4aa4c9c7".device = "/dev/disk/by-uuid/539c1a57-e6d0-4ff0-927a-8f0d4aa4c9c7";
fileSystems."/home" = {
device = "/dev/disk/by-uuid/469da268-3ac1-4591-9209-26c89afb2e59";
fsType = "btrfs";
options = ["subvol=@home"];
};
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.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -6,6 +6,8 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../common/default.nix ../../common/default.nix
../../common/full-install.nix
../../common/allow-unfree.nix
../../common/locales/en.nix ../../common/locales/en.nix
../../common/locales/en-keymap.nix ../../common/locales/en-keymap.nix
@ -35,14 +37,12 @@
hostName = "pc"; hostName = "pc";
firewall.enable = true; firewall.enable = true;
firewall.allowedTCPPorts = [8080 12345 13378];
firewall.allowedUDPPorts = [8080];
}; };
users.users.user = { users.users.user = {
isNormalUser = true; isNormalUser = true;
description = "User"; description = "User";
extraGroups = ["networkmanager" "wheel" "dialout" "syncthing"]; extraGroups = ["networkmanager" "wheel" "syncthing"];
initialPassword = "correcthorsebatterystaple"; initialPassword = "correcthorsebatterystaple";
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect # TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
@ -78,63 +78,13 @@
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# bitwarden bitwarden
libreoffice-fresh
nextdns nextdns
android-tools
gocryptfs
#endless-sky
#gnucash
obs-studio obs-studio
kdenlive kdenlive
rustc
cargo
nodejs
rpi-imager rpi-imager
wireshark
appimage-run
#ssb-patchwork
simplex-chat-desktop
#android-studio
#swig
picard
kleopatra kleopatra
qbittorrent
tor-browser
protonvpn-gui
# radicle-cli
# opensnitch-ui
yarn
nodePackages.node-gyp
nodePackages.node-pre-gyp
superTuxKart
openssl
xonotic xonotic
# qgis
helix
holehe
smartmontools
cheat
lazygit
ripgrep
jq
yq
neofetch
tldr
bat
dust
powertop
fzf
atuin
zellij
eza
lapce
gotty
gping
yazi
tildefriends
]; ];
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion

View file

@ -6,6 +6,8 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../common/default.nix ../../common/default.nix
../../common/full-install.nix
../../common/allow-unfree.nix
../../common/locales/en.nix ../../common/locales/en.nix
../../common/locales/fr-keymap.nix ../../common/locales/fr-keymap.nix
@ -21,6 +23,8 @@
# If you want to use modules your own flake exports (from modules/nixos): # If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example # outputs.nixosModules.example
../../modules/nixos/vedirect-reader.nix
# Or modules from other flakes (such as nixos-hardware): # Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd # inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd # inputs.hardware.nixosModules.common-ssd
@ -34,15 +38,23 @@
networking = { networking = {
hostName = "phoenix"; hostName = "phoenix";
firewall.enable = true; firewall = {
firewall.allowedTCPPorts = [8080 12345 13378]; enable = true;
firewall.allowedUDPPorts = [8080]; allowedTCPPorts = [
8080 # ?
12345 # tildefriends
13378 # audiobookshelf
];
allowedUDPPorts = [
8080 # ?
];
};
}; };
users.users.user = { users.users.user = {
isNormalUser = true; isNormalUser = true;
description = "User"; description = "User";
extraGroups = ["networkmanager" "wheel" "dialout" "syncthing"]; extraGroups = ["networkmanager" "wheel" "syncthing"];
initialPassword = "correcthorsebatterystaple"; initialPassword = "correcthorsebatterystaple";
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect # TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
@ -55,8 +67,10 @@
fileSystems = ["/" "/data"]; fileSystems = ["/" "/data"];
}; };
# services.vedirect-reader.enable = true;
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
services.flatpak.enable = true; services.flatpak.enable = false;
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
@ -77,24 +91,24 @@
configDir = lib.mkForce "/data/sync/configuration/"; configDir = lib.mkForce "/data/sync/configuration/";
}; };
# Needed to build enry
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
bitwarden bitwarden
libreoffice-fresh
nextdns nextdns
android-tools # android-tools
gocryptfs gocryptfs
#endless-sky #endless-sky
#gnucash #gnucash
obs-studio # obs-studio
kdenlive # kdenlive
rustc rustc
cargo cargo
nodejs nodejs
rpi-imager rpi-imager
wireshark # wireshark
appimage-run # appimage-run
#ssb-patchwork #ssb-patchwork
simplex-chat-desktop simplex-chat-desktop
#android-studio #android-studio
@ -109,7 +123,7 @@
yarn yarn
nodePackages.node-gyp nodePackages.node-gyp
nodePackages.node-pre-gyp nodePackages.node-pre-gyp
superTuxKart # superTuxKart
openssl openssl
# qgis # qgis

View file

@ -16,7 +16,7 @@
users.users.user = { users.users.user = {
isNormalUser = true; isNormalUser = true;
description = "User"; description = "User";
extraGroups = ["networkmanager" "wheel" "dialout" "syncthing"]; extraGroups = ["networkmanager" "wheel" "syncthing"];
initialPassword = "correcthorsebatterystaple"; initialPassword = "correcthorsebatterystaple";
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect # TODO: Add your SSH public key(s) here, if you plan on using SSH to connect

View file

@ -1,6 +0,0 @@
# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations.
{
# List your module files here
# my-module = import ./my-module.nix;
}

View file

@ -2,5 +2,6 @@
# These should be stuff you would like to share with others, not your personal configurations. # These should be stuff you would like to share with others, not your personal configurations.
{ {
# List your module files here # List your module files here
# my-module = import ./my-module.nix; tildefriends = import ./tildefriends.nix;
vedirect-reader = import ./vedirect-reader.nix;
} }

View file

@ -0,0 +1,34 @@
{
lib,
pkgs,
config,
...
}:
with lib; let
# WORK IN PROGRESS
# WORK IN PROGRESS
# WORK IN PROGRESS
# Shorter name to access final settings a
# user of hello.nix module HAS ACTUALLY SET.
# cfg is a typical convention.
cfg = config.services.hello;
in {
# Declare what settings a user of this "hello.nix" module CAN SET.
options.services.hello = {
enable = mkEnableOption "hello service";
greeter = mkOption {
type = types.str;
default = "world";
};
};
# Define what other settings, services and resources should be active IF
# a user of this "hello.nix" module ENABLED this module
# by setting "services.hello.enable = true;".
config = mkIf cfg.enable {
systemd.services.hello = {
wantedBy = ["multi-user.target"];
serviceConfig.ExecStart = "${pkgs.hello}/bin/hello -g'Hello, ${escapeShellArg cfg.greeter}!'";
};
};
}

View file

@ -0,0 +1,30 @@
{
lib,
pkgs,
config,
...
}:
with lib; let
# WORK IN PROGRESS
# WORK IN PROGRESS
# WORK IN PROGRESS
# Shorter name to access final settings a
# user of hello.nix module HAS ACTUALLY SET.
# cfg is a typical convention.
cfg = config.services.vedirect-reader;
in {
# Declare what settings a user of this "hello.nix" module CAN SET.
options.services.vedirect-reader = {
enable = mkEnableOption "vedirect-reader";
};
# Define what other settings, services and resources should be active IF
# a user of this "hello.nix" module ENABLED this module
# by setting "services.hello.enable = true;".
config = mkIf cfg.enable {
systemd.services.vedirect-reader = {
wantedBy = ["multi-user.target"];
serviceConfig.ExecStart = "node ${pkgs.vedirect-reader}/lib/node_modules/vedirect-reader/main.js";
};
};
}

View file

@ -2,4 +2,5 @@
# You can build them using 'nix build .#example' # You can build them using 'nix build .#example'
{pkgs, ...}: { {pkgs, ...}: {
tildefriends = pkgs.callPackage ./tildefriends/default.nix {}; tildefriends = pkgs.callPackage ./tildefriends/default.nix {};
vedirect-reader = pkgs.callPackage ./vedirect-reader/default.nix {};
} }

View file

@ -0,0 +1,31 @@
{
lib,
buildNpmPackage,
fetchFromGitea,
}:
buildNpmPackage rec {
pname = "vedirect-reader";
version = "0.0.0";
src = fetchFromGitea {
domain = "gitea.com";
owner = "tasiaiso";
repo = "vedirect-reader";
rev = "1c0497872f3ef9418bb4a1f2cd08d00b86af8f65";
hash = "sha256-M27lk04Mwwvgu8fjV+tAAbCkzcB3QJuplOt5k/NQ00I=";
};
npmDepsHash = "sha256-oUFinl22QvMZutAY+FwQiAQqrQevObbsLLCNzWnAVxA=";
dontNpmBuild = true;
# doCheck = false;
# meta = {
# homepage = "https://tildefriends.net";
# description = "Make apps and friends from the comfort of your web browser.";
# mainProgram = "tildefriends";
# license = with lib.licenses; [mit];
# maintainers = with lib.maintainers; [tasiaiso];
# platforms = lib.platforms.all;
# };
}