formatting
This commit is contained in:
parent
7ce780986b
commit
415715a4f9
58 changed files with 398 additions and 229 deletions
123
flake.nix
123
flake.nix
|
|
@ -41,67 +41,74 @@
|
|||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nix-on-droid,
|
||||
deploy-rs,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (self) outputs;
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
|
||||
makePkgs = system: import nixpkgs { inherit system; };
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
tartarus = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [./hosts/tartarus/configuration.nix];
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nix-on-droid,
|
||||
deploy-rs,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
|
||||
makePkgs = system: import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
tartarus = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./hosts/tartarus/configuration.nix ];
|
||||
};
|
||||
ymir = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./hosts/ymir/configuration.nix ];
|
||||
};
|
||||
harmonica = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./hosts/harmonica/configuration.nix ];
|
||||
};
|
||||
harmonica-sd = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./hosts/harmonica-sd/configuration.nix ];
|
||||
};
|
||||
pochita = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./hosts/pochita/configuration.nix ];
|
||||
};
|
||||
pochita-sd = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./hosts/pochita-sd/configuration.nix ];
|
||||
};
|
||||
myISO = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
./hosts/iso/configuration.nix
|
||||
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix"
|
||||
];
|
||||
};
|
||||
wallfacer = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./hosts/wallfacer/configuration.nix ];
|
||||
};
|
||||
};
|
||||
ymir = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [./hosts/ymir/configuration.nix];
|
||||
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
pkgs = import nixpkgs { system = "aarch64-linux"; };
|
||||
modules = [ ./hosts/atreus/configuration.nix ];
|
||||
};
|
||||
harmonica = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [./hosts/harmonica/configuration.nix];
|
||||
};
|
||||
harmonica-sd = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [./hosts/harmonica-sd/configuration.nix];
|
||||
};
|
||||
pochita = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [./hosts/pochita/configuration.nix];
|
||||
};
|
||||
pochita-sd = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [./hosts/pochita-sd/configuration.nix];
|
||||
};
|
||||
myISO = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
./hosts/iso/configuration.nix
|
||||
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix"
|
||||
];
|
||||
};
|
||||
wallfacer = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [./hosts/wallfacer/configuration.nix];
|
||||
};
|
||||
};
|
||||
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
extraSpecialArgs = {inherit inputs outputs;};
|
||||
pkgs = import nixpkgs {system = "aarch64-linux";};
|
||||
modules = [./hosts/atreus/configuration.nix];
|
||||
};
|
||||
|
||||
formatter = forAllSystems (system: (makePkgs system).nixfmt-rfc-style);
|
||||
deploy.nodes.harmonica = {
|
||||
hostname = "192.168.0.11";
|
||||
profiles.system = {
|
||||
user = "osbm";
|
||||
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.harmonica;
|
||||
formatter = forAllSystems (system: (makePkgs system).nixfmt-rfc-style);
|
||||
deploy.nodes.harmonica = {
|
||||
hostname = "192.168.0.11";
|
||||
profiles.system = {
|
||||
user = "osbm";
|
||||
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.harmonica;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.enableAlacritty = lib.mkEnableOption "Alacritty terminal emulator";
|
||||
config = {
|
||||
programs.alacritty = {
|
||||
|
|
@ -14,7 +15,12 @@
|
|||
normal.family = "Cascadia Code";
|
||||
};
|
||||
terminal.shell = {
|
||||
args = ["new-session" "-A" "-s" "general"];
|
||||
args = [
|
||||
"new-session"
|
||||
"-A"
|
||||
"-s"
|
||||
"general"
|
||||
];
|
||||
program = lib.getExe pkgs.tmux;
|
||||
};
|
||||
window = {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.enableFirefox = lib.mkEnableOption "enableFirefox";
|
||||
config = {
|
||||
programs.firefox = {
|
||||
|
|
@ -32,15 +33,17 @@
|
|||
DisplayBookmarksToolbar = "always"; # alternatives: "never" or "newtab"
|
||||
# DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
|
||||
# SearchBar = "unified"; # alternat
|
||||
ExtensionSettings = with builtins; let
|
||||
extension = shortId: uuid: {
|
||||
name = uuid;
|
||||
value = {
|
||||
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
||||
installation_mode = "normal_installed";
|
||||
ExtensionSettings =
|
||||
with builtins;
|
||||
let
|
||||
extension = shortId: uuid: {
|
||||
name = uuid;
|
||||
value = {
|
||||
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
||||
installation_mode = "normal_installed";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
in
|
||||
listToAttrs [
|
||||
(extension "tree-style-tab" "treestyletab@piro.sakura.ne.jp")
|
||||
(extension "ublock-origin" "uBlock0@raymondhill.net")
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.enableGhostty = lib.mkEnableOption "Ghostty terminal emulator";
|
||||
config = {
|
||||
programs.ghostty = {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
# Enable the GTK theme
|
||||
enableGTK = lib.mkEnableOption "enableGTK";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./alacritty.nix
|
||||
./tmux
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: let
|
||||
{ ... }:
|
||||
let
|
||||
# define a block that just takes a hostname and returns attrset to not repeat the same fields
|
||||
sshBlock = hostname: {
|
||||
hostname = hostname;
|
||||
|
|
@ -18,7 +19,8 @@
|
|||
port = 8022;
|
||||
# fish not found error ???
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
hashKnownHosts = true;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
}:
|
||||
# stolen from https://github.com/dmarcoux/dotfiles
|
||||
{
|
||||
home.packages = [pkgs.tlrc];
|
||||
home.packages = [ pkgs.tlrc ];
|
||||
xdg.configFile."tlrc/config.toml".text = ''
|
||||
[cache]
|
||||
dir = "${config.xdg.cacheHome}/tlrc"
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
wanikani-current-reviews-script = builtins.path {path = ./wanikani-current-reviews.sh;};
|
||||
wanikani-level-script = builtins.path {path = ./wanikani-level.sh;};
|
||||
wanikani-progression-script = builtins.path {path = ./wanikani-progression.sh;};
|
||||
}:
|
||||
let
|
||||
wanikani-current-reviews-script = builtins.path { path = ./wanikani-current-reviews.sh; };
|
||||
wanikani-level-script = builtins.path { path = ./wanikani-level.sh; };
|
||||
wanikani-progression-script = builtins.path { path = ./wanikani-progression.sh; };
|
||||
tmux-dracula = pkgs.tmuxPlugins.mkTmuxPlugin rec {
|
||||
pluginName = "dracula";
|
||||
version = "3.0.0";
|
||||
|
|
@ -26,10 +27,11 @@
|
|||
description = "Feature packed Dracula theme for tmux!";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ethancedwards8];
|
||||
maintainers = with maintainers; [ ethancedwards8 ];
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
historyLimit = 100000;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.enableWezterm = lib.mkEnableOption "Wezterm terminal emulator";
|
||||
config = {
|
||||
programs.wezterm = {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
user.userName = lib.mkForce "osbm"; # fuck i hate unmaintained projects
|
||||
environment.packages = with pkgs; [
|
||||
vim # or some other editor, e.g. nano or neovim
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./sd-image.nix
|
||||
"${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
|
||||
|
|
@ -28,7 +29,7 @@
|
|||
interfaces."wlan0".useDHCP = true;
|
||||
wireless = {
|
||||
enable = true;
|
||||
interfaces = ["wlan0"];
|
||||
interfaces = [ "wlan0" ];
|
||||
networks = {
|
||||
"House_Bayram" = {
|
||||
psk = "PASSWORD";
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# Some packages (ahci fail... this bypasses that) https://discourse.nixos.org/t/does-pkgs-linuxpackages-rpi3-build-all-required-kernel-modules/42509
|
||||
nixpkgs.overlays = [
|
||||
(final: super: {
|
||||
makeModulesClosure = x:
|
||||
super.makeModulesClosure (x // {allowMissing = true;});
|
||||
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
|
||||
})
|
||||
];
|
||||
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
hardware = {
|
||||
enableRedistributableFirmware = lib.mkForce false;
|
||||
firmware = [pkgs.raspberrypiWirelessFirmware]; # Keep this to make sure wifi works
|
||||
firmware = [ pkgs.raspberrypiWirelessFirmware ]; # Keep this to make sure wifi works
|
||||
i2c.enable = true;
|
||||
deviceTree.filter = "bcm2837-rpi-zero*.dtb";
|
||||
deviceTree.overlays = [
|
||||
|
|
@ -63,7 +63,11 @@
|
|||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_rpi02w;
|
||||
|
||||
initrd.availableKernelModules = ["xhci_pci" "usbhid" "usb_storage"];
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
];
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.sdImage = with lib; {
|
||||
extraFirmwareConfig = mkOption {
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
default = { };
|
||||
description = lib.mdDoc ''
|
||||
Extra configuration to be added to config.txt.
|
||||
'';
|
||||
|
|
@ -18,15 +19,14 @@
|
|||
config = {
|
||||
sdImage.populateFirmwareCommands =
|
||||
lib.mkIf ((lib.length (lib.attrValues config.sdImage.extraFirmwareConfig)) > 0)
|
||||
(
|
||||
let
|
||||
# Convert the set into a string of lines of "key=value" pairs.
|
||||
keyValueMap = name: value: name + "=" + toString value;
|
||||
keyValueList = lib.mapAttrsToList keyValueMap config.sdImage.extraFirmwareConfig;
|
||||
extraFirmwareConfigString = lib.concatStringsSep "\n" keyValueList;
|
||||
in
|
||||
lib.mkAfter
|
||||
''
|
||||
(
|
||||
let
|
||||
# Convert the set into a string of lines of "key=value" pairs.
|
||||
keyValueMap = name: value: name + "=" + toString value;
|
||||
keyValueList = lib.mapAttrsToList keyValueMap config.sdImage.extraFirmwareConfig;
|
||||
extraFirmwareConfigString = lib.concatStringsSep "\n" keyValueList;
|
||||
in
|
||||
lib.mkAfter ''
|
||||
config=firmware/config.txt
|
||||
# The initial file has just been created without write permissions. Add them to be able to append the file.
|
||||
chmod u+w $config
|
||||
|
|
@ -34,6 +34,6 @@
|
|||
echo "${extraFirmwareConfigString}" >> $config
|
||||
chmod u-w $config
|
||||
''
|
||||
);
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# Some packages (ahci fail... this bypasses that) https://discourse.nixos.org/t/does-pkgs-linuxpackages-rpi3-build-all-required-kernel-modules/42509
|
||||
nixpkgs.overlays = [
|
||||
(final: super: {
|
||||
makeModulesClosure = x:
|
||||
super.makeModulesClosure (x // {allowMissing = true;});
|
||||
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
|
||||
})
|
||||
];
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
hardware = {
|
||||
enableRedistributableFirmware = lib.mkForce false;
|
||||
firmware = [pkgs.raspberrypiWirelessFirmware]; # Keep this to make sure wifi works
|
||||
firmware = [ pkgs.raspberrypiWirelessFirmware ]; # Keep this to make sure wifi works
|
||||
i2c.enable = true;
|
||||
deviceTree.filter = "bcm2837-rpi-zero*.dtb";
|
||||
deviceTree.overlays = [
|
||||
|
|
@ -49,7 +49,11 @@
|
|||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_rpi02w;
|
||||
|
||||
initrd.availableKernelModules = ["xhci_pci" "usbhid" "usb_storage"];
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
];
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
pkgs,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.raspberry-pi-nix.nixosModules.raspberry-pi
|
||||
inputs.raspberry-pi-nix.nixosModules.sd-image
|
||||
|
|
@ -19,7 +20,7 @@
|
|||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.osbm = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel"]; # Enable ‘sudo’ for the user.
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
initialPassword = "changeme";
|
||||
};
|
||||
|
||||
|
|
@ -37,9 +38,15 @@
|
|||
wget
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
nix.settings.trusted-users = ["root" "osbm"];
|
||||
nix.settings.trusted-users = [
|
||||
"root"
|
||||
"osbm"
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "aarch64-linux";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
|
|
|
|||
|
|
@ -5,15 +5,16 @@
|
|||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [ ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
||||
|
|
@ -23,10 +24,13 @@
|
|||
fileSystems."/boot/firmware" = {
|
||||
device = "/dev/disk/by-uuid/2178-694E";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0022" "dmask=0022"];
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
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
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
|
|
@ -19,7 +20,7 @@
|
|||
};
|
||||
|
||||
virtualisation.virtualbox.host.enable = true;
|
||||
users.extraGroups.vboxusers.members = ["osbm"];
|
||||
users.extraGroups.vboxusers.members = [ "osbm" ];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
|
|||
|
|
@ -7,15 +7,22 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/246d3df7-3578-44b2-8aee-c1ed33581184";
|
||||
|
|
@ -25,11 +32,14 @@
|
|||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/33D0-6524";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/b74b04db-c7ea-44e7-b3fe-15cd6d0cd851";}
|
||||
{ device = "/dev/disk/by-uuid/b74b04db-c7ea-44e7-b3fe-15cd6d0cd851"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
|
|
|
|||
|
|
@ -7,15 +7,24 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["ahci" "ehci_pci" "megaraid_sas" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ahci"
|
||||
"ehci_pci"
|
||||
"megaraid_sas"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/8270dba5-6d89-438a-90bd-d9f29b20cb5b";
|
||||
|
|
@ -25,11 +34,14 @@
|
|||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/A1EB-43F8";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/534ea30c-2664-498b-915f-41b037eba01b";}
|
||||
{ device = "/dev/disk/by-uuid/534ea30c-2664-498b-915f-41b037eba01b"; }
|
||||
];
|
||||
|
||||
# 2 tb mini hdd
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
|
|
@ -29,7 +30,10 @@
|
|||
|
||||
networking.hostName = "ymir"; # Define your hostname.
|
||||
|
||||
networking.firewall.allowedTCPPorts = [8889 8000];
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
8889
|
||||
8000
|
||||
];
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
|
@ -47,7 +51,7 @@
|
|||
virtualisation.waydroid.enable = true;
|
||||
|
||||
# Load nvidia driver for Xorg and Wayland
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
# Modesetting is required.
|
||||
|
|
|
|||
|
|
@ -7,15 +7,23 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/fd6792b4-d1ec-493c-a686-64dbeaac3371";
|
||||
|
|
@ -25,11 +33,14 @@
|
|||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/383D-1E8A";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/33c6277d-eb0a-487d-8be0-829829a8a308";}
|
||||
{ device = "/dev/disk/by-uuid/33c6277d-eb0a-487d-8be0-829829a8a308"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
importList = lib.mapAttrsToList (name: _path: ./. + "/${name}")
|
||||
(lib.filterAttrs (filename: kind:
|
||||
filename != "default.nix" && (kind == "regular" || kind == "directory"))
|
||||
(builtins.readDir ./.));
|
||||
importList = lib.mapAttrsToList (name: _path: ./. + "/${name}") (
|
||||
lib.filterAttrs (
|
||||
filename: kind: filename != "default.nix" && (kind == "regular" || kind == "directory")
|
||||
) (builtins.readDir ./.)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.enableADB = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
@ -14,7 +15,7 @@
|
|||
config = lib.mkMerge [
|
||||
(lib.mkIf config.myModules.enableADB {
|
||||
programs.adb.enable = true;
|
||||
users.users.osbm.extraGroups = ["adbusers"];
|
||||
users.users.osbm.extraGroups = [ "adbusers" ];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.arduinoSetup = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.osbm-nvim.packages."${pkgs.stdenv.hostPlatform.system}".default
|
||||
wget
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules = {
|
||||
blockYoutube = lib.mkOption {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.disableHibernation = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.enableAarch64Emulation = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
@ -13,7 +14,7 @@
|
|||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.myModules.enableAarch64Emulation {
|
||||
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
nix.settings.extra-platforms = config.boot.binfmt.emulatedSystems;
|
||||
})
|
||||
];
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.enableFonts = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
@ -43,10 +44,23 @@
|
|||
# defaultFonts.emoji = ["Noto Color Emoji"];
|
||||
# };
|
||||
fonts.fontconfig.defaultFonts = {
|
||||
serif = ["Source Han Serif SC" "Source Han Serif TC" "Noto Color Emoji"];
|
||||
sansSerif = ["Source Han Sans SC" "Source Han Sans TC" "Noto Color Emoji"];
|
||||
monospace = ["Droid Sans Mono" "DejaVu Sans Mono" "Source Han Mono" "Cascadia Code"];
|
||||
emoji = ["Noto Color Emoji"];
|
||||
serif = [
|
||||
"Source Han Serif SC"
|
||||
"Source Han Serif TC"
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
sansSerif = [
|
||||
"Source Han Sans SC"
|
||||
"Source Han Sans TC"
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
monospace = [
|
||||
"Droid Sans Mono"
|
||||
"DejaVu Sans Mono"
|
||||
"Source Han Mono"
|
||||
"Cascadia Code"
|
||||
];
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
})
|
||||
];
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.enableKDE = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
@ -93,7 +94,7 @@
|
|||
# Open ports in the firewall for Steam Local Network Game Transfers
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [51513];
|
||||
networking.firewall.allowedTCPPorts = [ 51513 ];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
time.timeZone = "Europe/Istanbul";
|
||||
|
||||
# Select internationalisation properties.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# imports = [
|
||||
# inputs.minegrub-theme.nixosModules.default
|
||||
# ];
|
||||
|
|
@ -24,14 +25,12 @@
|
|||
# background = "background_options/1.8 - [Classic Minecraft].png";
|
||||
# boot-options-count = 4;
|
||||
# };
|
||||
theme =
|
||||
pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "Lxtharia";
|
||||
repo = "minegrub-theme";
|
||||
rev = "193b3a7c3d432f8c6af10adfb465b781091f56b3";
|
||||
sha256 = "1bvkfmjzbk7pfisvmyw5gjmcqj9dab7gwd5nmvi8gs4vk72bl2ap";
|
||||
};
|
||||
theme = pkgs.fetchFromGitHub {
|
||||
owner = "Lxtharia";
|
||||
repo = "minegrub-theme";
|
||||
rev = "193b3a7c3d432f8c6af10adfb465b781091f56b3";
|
||||
sha256 = "1bvkfmjzbk7pfisvmyw5gjmcqj9dab7gwd5nmvi8gs4vk72bl2ap";
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
|
|
|||
|
|
@ -2,13 +2,15 @@
|
|||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.nix-index-database.nixosModules.nix-index
|
||||
];
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
nixpkgs.config.allowUnfreePredicate =
|
||||
pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"vscode" # TODO: remove this
|
||||
"discord"
|
||||
|
|
@ -30,7 +32,10 @@
|
|||
];
|
||||
|
||||
# enable nix flakes
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||
|
||||
|
|
@ -57,7 +62,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = ["root" "osbm"];
|
||||
nix.settings.trusted-users = [
|
||||
"root"
|
||||
"osbm"
|
||||
];
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
# config,
|
||||
# outputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# nix.distributedBuilds = true;
|
||||
# nix.settings.builders-use-substitutes = true;
|
||||
# nix.buildMachines = [
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.agenix.nixosModules.default
|
||||
];
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.enableCaddy = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
@ -19,7 +20,7 @@
|
|||
package = pkgs.caddy.withPlugins {
|
||||
# update time to time
|
||||
# last update: 2025-03-02
|
||||
plugins = ["github.com/caddy-dns/cloudflare@v0.0.0-20250228175314-1fb64108d4de"];
|
||||
plugins = [ "github.com/caddy-dns/cloudflare@v0.0.0-20250228175314-1fb64108d4de" ];
|
||||
hash = "sha256-YYpsf8HMONR1teMiSymo2y+HrKoxuJMKIea5/NEykGc=";
|
||||
};
|
||||
email = "contact@osbm.dev";
|
||||
|
|
@ -58,7 +59,11 @@
|
|||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [80 443 3000];
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
3000
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nssTools
|
||||
|
|
|
|||
|
|
@ -3,10 +3,13 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
# https://github.com/NixOS/nixpkgs/pull/394352
|
||||
cloudflare-dyndns-5-3 = pkgs.cloudflare-dyndns.overridePythonAttrs rec {
|
||||
version = lib.warnIfNot (pkgs.cloudflare-dyndns.version == "5.0") "The cloudflare-dyndns package is updated, you should remove this override" "5.3";
|
||||
version = lib.warnIfNot (
|
||||
pkgs.cloudflare-dyndns.version == "5.0"
|
||||
) "The cloudflare-dyndns package is updated, you should remove this override" "5.3";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "kissgyorgy";
|
||||
repo = "cloudflare-dyndns";
|
||||
|
|
@ -23,7 +26,8 @@
|
|||
truststore
|
||||
];
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
myModules.enableCloudflareDyndns = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.enableCloudflared = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.enableForgejo = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.enableJellyfin = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
@ -21,7 +22,7 @@
|
|||
dataDir = "/home/osbm/.local/share/jellyfin";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [8096];
|
||||
networking.firewall.allowedTCPPorts = [ 8096 ];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.enableNextcloud = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules = {
|
||||
enableOllama = lib.mkOption {
|
||||
|
|
@ -18,7 +19,10 @@
|
|||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "cuda";
|
||||
loadModels = ["deepseek-r1:7b" "deepseek-r1:14b"];
|
||||
loadModels = [
|
||||
"deepseek-r1:7b"
|
||||
"deepseek-r1:14b"
|
||||
];
|
||||
};
|
||||
|
||||
services.open-webui = {
|
||||
|
|
|
|||
|
|
@ -3,13 +3,21 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
system-logger = pkgs.writeShellApplication {
|
||||
name = "system-logger";
|
||||
runtimeInputs = with pkgs; [curl jq zip gawk systemd];
|
||||
runtimeInputs = with pkgs; [
|
||||
curl
|
||||
jq
|
||||
zip
|
||||
gawk
|
||||
systemd
|
||||
];
|
||||
text = builtins.readFile ./system-logger.sh;
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.services.system-logger = {
|
||||
enable = lib.mkEnableOption {
|
||||
description = "Enable System Logger Service";
|
||||
|
|
@ -38,7 +46,7 @@ in {
|
|||
config = lib.mkIf config.services.system-logger.enable {
|
||||
systemd.timers.system-logger = {
|
||||
description = "System Logger Timer";
|
||||
wantedBy = ["timers.target"];
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.enableTailscale = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
@ -25,8 +26,8 @@
|
|||
port = 51513;
|
||||
};
|
||||
|
||||
networking.firewall.allowedUDPPorts = [config.services.tailscale.port];
|
||||
environment.systemPackages = [pkgs.tailscale];
|
||||
networking.firewall.allowedUDPPorts = [ config.services.tailscale.port ];
|
||||
environment.systemPackages = [ pkgs.tailscale ];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.enableVaultwarden = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
services.code-server = {
|
||||
# only true if the machine is not pochita
|
||||
enable = config.networking.hostName != "pochita";
|
||||
|
|
@ -16,7 +17,8 @@
|
|||
hashedPassword = "$argon2i$v=19$m=4096,t=3,p=1$dGc0TStGMDNzSS9JRkJYUFp3d091Q2p0bXlzPQ$zvdE9BkclkJmyFaenzPy2E99SEqsyDMt4IQNZfcfFFQ";
|
||||
package = pkgs.vscode-with-extensions.override {
|
||||
vscode = pkgs.code-server;
|
||||
vscodeExtensions = with pkgs.vscode-extensions;
|
||||
vscodeExtensions =
|
||||
with pkgs.vscode-extensions;
|
||||
[
|
||||
bbenoist.nix
|
||||
catppuccin.catppuccin-vsc
|
||||
|
|
@ -47,5 +49,5 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [config.services.code-server.port];
|
||||
networking.firewall.allowedTCPPorts = [ config.services.code-server.port ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,14 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
waniKani-bypass-lessons = pkgs.writeShellApplication {
|
||||
name = "wanikani-bypass-lessons";
|
||||
runtimeInputs = with pkgs; [curl jq];
|
||||
runtimeInputs = with pkgs; [
|
||||
curl
|
||||
jq
|
||||
];
|
||||
text = ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
|
@ -44,7 +48,8 @@
|
|||
sleep 3600
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.services.wanikani-bypass-lessons.enable = lib.mkEnableOption {
|
||||
description = "Enable WaniKani Bypass Lessons";
|
||||
default = false;
|
||||
|
|
@ -53,7 +58,7 @@ in {
|
|||
config = lib.mkIf config.services.wanikani-bypass-lessons.enable {
|
||||
systemd.services.wanikani-bypass-lessons = {
|
||||
description = "WaniKani Bypass Lessons";
|
||||
wantedBy = ["multi-user.target"];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${lib.getExe waniKani-bypass-lessons}";
|
||||
|
|
|
|||
|
|
@ -3,13 +3,19 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
wanikani-fetcher = pkgs.writeShellApplication {
|
||||
name = "wanikani-fetcher";
|
||||
runtimeInputs = with pkgs; [curl jq zip];
|
||||
runtimeInputs = with pkgs; [
|
||||
curl
|
||||
jq
|
||||
zip
|
||||
];
|
||||
text = builtins.readFile ./wanikani-fetcher.sh;
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.services.wanikani-fetch-data.enable = lib.mkEnableOption {
|
||||
description = "Enable WaniKani Fetch Data";
|
||||
default = false;
|
||||
|
|
@ -18,7 +24,7 @@ in {
|
|||
config = lib.mkIf config.services.wanikani-fetch-data.enable {
|
||||
systemd.timers.wanikani-fetch-data = {
|
||||
description = "WaniKani Fetch Data";
|
||||
wantedBy = ["timers.target"];
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "02:00";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.enableSound = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,15 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
users.users = {
|
||||
osbm = {
|
||||
isNormalUser = true;
|
||||
description = "osbm";
|
||||
initialHashedPassword = "$6$IamAbigfailure$irfkAsWev8CMAr78wUwUggclplXL98sbI21fpGY9nMDz47bU88RZWFLO7FcN5SdRA18ZSidkMqS76uLCMH68f.";
|
||||
extraGroups = ["networkmanager" "wheel" "docker"];
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"docker"
|
||||
];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPfnV+qqUCJf92npNW4Jy0hIiepCJFBDJHXBHnUlNX0k"
|
||||
];
|
||||
|
|
@ -15,7 +20,7 @@
|
|||
isNormalUser = true;
|
||||
description = "bayram";
|
||||
initialHashedPassword = "$6$IamAbigfailure$3BP231DVwbqUtZ.mq33nM/JitBrT2u26Y25VpsfBwhZbezMHz4XbySrOMnaMcCYdsb3wZFL3Ppcp0L.R8nonT.";
|
||||
extraGroups = ["networkmanager"];
|
||||
extraGroups = [ "networkmanager" ];
|
||||
packages = [
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myModules.enableWakeOnLan = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
@ -19,13 +20,13 @@
|
|||
# see https://github.com/NixOS/nixpkgs/issues/91352
|
||||
systemd.services.wakeonlan = {
|
||||
description = "Reenable wake on lan every boot";
|
||||
after = ["network.target"];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
RemainAfterExit = "true";
|
||||
ExecStart = "${pkgs.ethtool}/sbin/ethtool -s enp3s0 wol g";
|
||||
};
|
||||
wantedBy = ["default.target"];
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
})
|
||||
];
|
||||
|
|
|
|||
|
|
@ -12,9 +12,10 @@ let
|
|||
pochita
|
||||
wallfacer
|
||||
];
|
||||
in {
|
||||
"network-manager.age".publicKeys = machines ++ [osbm];
|
||||
"ssh-key-private.age".publicKeys = machines ++ [osbm];
|
||||
"ssh-key-public.age".publicKeys = machines ++ [osbm];
|
||||
"cloudflare.age".publicKeys = machines ++ [osbm];
|
||||
in
|
||||
{
|
||||
"network-manager.age".publicKeys = machines ++ [ osbm ];
|
||||
"ssh-key-private.age".publicKeys = machines ++ [ osbm ];
|
||||
"ssh-key-public.age".publicKeys = machines ++ [ osbm ];
|
||||
"cloudflare.age".publicKeys = machines ++ [ osbm ];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue