remove some cruft
This commit is contained in:
parent
575896cbe5
commit
5be487f49e
|
@ -4,10 +4,10 @@
|
|||
[ -z "$PS1" ] && return
|
||||
|
||||
# some housekeeping
|
||||
alias ls="ls --color=auto"
|
||||
alias ll="ls -lah --color=auto"
|
||||
alias ls="ls --color=auto --group-directories-first"
|
||||
|
||||
function cd() {
|
||||
builtin cd "$@" && ls --color=auto
|
||||
builtin cd "$@" && ls --color=auto --group-directories-first
|
||||
}
|
||||
|
||||
# history
|
||||
|
@ -45,9 +45,6 @@ case "$HOSTNAME" in
|
|||
"copernicus")
|
||||
PS1="$USER_PREFIX\[\033[97;1m\]${NIX_SHELL_PS1}coper:$PS1\[\033[0;0m\]"
|
||||
;;
|
||||
"x230t")
|
||||
PS1="$USER_PREFIX\[\033[93;1m\]${NIX_SHELL_PS1}x230t:$PS1\[\033[0;0m\]"
|
||||
;;
|
||||
"mlg")
|
||||
PS1="$USER_PREFIX\[\033[94;1m\]${NIX_SHELL_PS1}mlg:$PS1\[\033[0;0m\]"
|
||||
;;
|
||||
|
@ -58,45 +55,3 @@ case "$HOSTNAME" in
|
|||
PS1="$USER_PREFIX\[\033[96;1m\]${NIX_SHELL_PS1}unk:$PS1\[\033[0;0m\]"
|
||||
;;
|
||||
esac
|
||||
|
||||
repos() {
|
||||
sel="$(ls ~/git | fzy | awk '{print "/home/usr/git/"$1}')"
|
||||
[ "$?" -eq 1 ] && exit
|
||||
|
||||
cd "$sel"
|
||||
}
|
||||
|
||||
hist() {
|
||||
res=$(cat ~/.config/bash/hist | \
|
||||
sort | \
|
||||
uniq | \
|
||||
shuf | \
|
||||
fzy)
|
||||
|
||||
[ -n "$res" ] && $($res)
|
||||
}
|
||||
|
||||
search() {
|
||||
if [ "$1" = '-a' ]; then
|
||||
res=$(find /home/usr/ /home/usr/doc/ \
|
||||
-mindepth 1 \
|
||||
-not -path '*/.*' \
|
||||
-not -path './Mail/*' \
|
||||
-not -path './vdir/*' \
|
||||
-not -path '*venv*' \
|
||||
-not -path '*node_modules*' \
|
||||
-not -path '*__pycache__*' \
|
||||
-type d | cut -c 11- | fzy)
|
||||
else
|
||||
res=$(find $(pwd) \
|
||||
-mindepth 1 \
|
||||
-not -path '*/.*' \
|
||||
-not -path './Mail/*' \
|
||||
-not -path './vdir/*' \
|
||||
-not -path '*venv*' \
|
||||
-not -path '*node_modules*' \
|
||||
-not -path '*__pycache__*' \
|
||||
-type d | cut -c 11- | fzy)
|
||||
fi
|
||||
[ -n "$res" ] && cd /home/usr/"$res"
|
||||
}
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
./hardware-configuration.nix
|
||||
./nvidia.nix
|
||||
./services
|
||||
../x230t/special-ssh-magic.nix
|
||||
../../modules/ssh-phone-home.nix
|
||||
../../modules/hosts.nix
|
||||
../../modules/bootstrap.nix
|
||||
../../modules/common.nix
|
||||
|
@ -14,10 +12,7 @@
|
|||
../../modules/rbw.nix
|
||||
];
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
users.users.usr.extraGroups = [
|
||||
"docker"
|
||||
"adbusers"
|
||||
];
|
||||
|
||||
|
@ -28,7 +23,6 @@
|
|||
qemu
|
||||
virt-manager
|
||||
libreoffice
|
||||
nomacs
|
||||
vscodium
|
||||
thunderbird
|
||||
libreoffice
|
||||
|
@ -53,6 +47,7 @@
|
|||
mdadm
|
||||
git-annex
|
||||
tigervnc
|
||||
input-leap
|
||||
|
||||
(pkgs.callPackage ../../builds/archutils.nix {})
|
||||
(pkgs.callPackage ../../builds/sssg.nix {})
|
||||
|
@ -63,9 +58,9 @@
|
|||
enable = true;
|
||||
settings = {
|
||||
General = {
|
||||
AutoEnable = true;
|
||||
# AutoEnable = true;
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
ControllerMode = "bredr";
|
||||
# ControllerMode = "bredr";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -136,7 +131,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
programs.kdeconnect.enable = true;
|
||||
services.getty.autologinUser = "usr";
|
||||
|
||||
system.stateVersion = "24.05"; # don't change this, lol
|
||||
}
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
{ lib, config, pkgs, ...}:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/ssh-phone-home.nix
|
||||
../../modules/bootstrap.nix
|
||||
../../modules/hosts.nix
|
||||
../../modules/common.nix
|
||||
];
|
||||
|
||||
# nix optimization
|
||||
nix.optimise = {
|
||||
automatic = true;
|
||||
dates = [ "03:45" ];
|
||||
};
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
|
||||
networking.hostName = "mainsail";
|
||||
|
||||
services.getty.greetingLine = "
|
||||
welcome to mainsail |`-:_
|
||||
,----....____ | `+.
|
||||
( ````----....|___ |
|
||||
\\ _ ````----....____
|
||||
\\ _) ```---.._
|
||||
\\ \\
|
||||
)`.\\ )`. )`. )`. )`. )`. )`. )`. )`. )`. )`.
|
||||
-' `-' `-' `-' `-' `-' `-' `-' `-' `-' `-' `
|
||||
";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
curl
|
||||
];
|
||||
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
extraComponents = [
|
||||
# Components required to complete the onboarding
|
||||
"netgear"
|
||||
"hue"
|
||||
"nest"
|
||||
"esphome"
|
||||
"met"
|
||||
"radio_browser"
|
||||
];
|
||||
config = {
|
||||
# Includes dependencies for a basic setup
|
||||
# https://www.home-assistant.io/integrations/default_config/
|
||||
default_config = {};
|
||||
};
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
services.ssh-phone-home = {
|
||||
enable = true;
|
||||
localUser = "usr";
|
||||
remoteHostname = "beepboop.systems";
|
||||
remotePort = 443;
|
||||
remoteUser = "ryan";
|
||||
bindPort = 55554;
|
||||
};
|
||||
|
||||
users.users.usr.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbhM3wj0oqjR3pUaZgpfX4Xo4dlzvBTbQ48zHyg7Pwx usr" # x230t
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB2xUbQw9+RCPVw7qCFm4NNCP/MpS2BIArcwMv0KdKOI usr" # mlg
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHZw5bg0TrvSkW/XQa4c+2iLbIKOxfMGbjy5Nb3HSfBv usr" # phone
|
||||
];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
|
@ -1,32 +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" "ehci_pci" "ahci" "usbhid" "usb_storage" "ums_realtek" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/948aeaf8-cb7e-4f85-ae3e-1bc6a25ec156";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/617cb1ae-a788-429a-b0d4-63d46d8a4e1b";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/d82ae76c-68f4-4e70-9162-5dab5f84375b"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
|
@ -4,14 +4,11 @@
|
|||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./nvidia.nix
|
||||
../../modules/ssh-phone-home.nix
|
||||
../../modules/hosts.nix
|
||||
../../modules/bootstrap.nix
|
||||
../../modules/common.nix
|
||||
../../modules/x11.nix
|
||||
../../modules/pulse.nix
|
||||
../../modules/discord.nix
|
||||
# ../../modules/gaming.nix
|
||||
../../modules/rbw.nix
|
||||
];
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./bootstrap.nix
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
backupFileExtension = "hm-bak";
|
||||
useGlobalPkgs = true;
|
||||
|
||||
config = ./home.nix;
|
||||
};
|
||||
|
||||
environment.packages = with pkgs; [
|
||||
tigervnc
|
||||
git
|
||||
tmux
|
||||
hostname
|
||||
tigervnc
|
||||
xorg.xinit
|
||||
# tar
|
||||
# awk
|
||||
# sed
|
||||
elinks
|
||||
];
|
||||
|
||||
environment.etcBackupExtension = ".bak";
|
||||
system.stateVersion = "23.05";
|
||||
time.timeZone = "America/Chicago";
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{ lib, pkgs, home, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../home/nvim
|
||||
../../home/ssh
|
||||
../../home/git # needed for flakes
|
||||
../../home/vdirsyncer
|
||||
../../home/isync
|
||||
../../home/khal
|
||||
../../home/todoman
|
||||
../../home/msmtp
|
||||
../../home/neomutt
|
||||
../../home/rbw
|
||||
( import ../../home/bash { isRoot = true; } )
|
||||
];
|
||||
|
||||
home.stateVersion = "23.05";
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{ lib, config, pkgs, ...}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/bootstrap.nix
|
||||
../../modules/hosts.nix
|
||||
../../modules/common.nix
|
||||
../../modules/x11.nix
|
||||
../../modules/pulse.nix
|
||||
../../modules/discord.nix
|
||||
];
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
|
||||
networking.hostName = "virtbox";
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
|
@ -1,31 +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 + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/7b70ab88-296c-4737-90b2-267cb2432dc1";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
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.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{ lib, inputs, config, pkgs, home, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../home/x11.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
{ lib, config, pkgs, ...}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./special-ssh-magic.nix
|
||||
../../modules/bootstrap.nix
|
||||
../../modules/common.nix
|
||||
../../modules/x11.nix
|
||||
../../modules/pulse.nix
|
||||
../../modules/hosts.nix
|
||||
../../modules/tlp.nix
|
||||
../../modules/media.nix
|
||||
../../modules/anki.nix
|
||||
../../modules/power-control.nix
|
||||
../../modules/adb.nix
|
||||
../../modules/rbw.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
xscreensaver
|
||||
texliveFull
|
||||
libreoffice
|
||||
|
||||
ecryptfs
|
||||
ffmpeg
|
||||
thunderbird
|
||||
ledger
|
||||
ranger
|
||||
];
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.printing.enable = true;
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="input", KERNEL=="event[0-20]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", MODE:="0666" GROUP="usr", SYMLINK+="input/touchscreen"
|
||||
'';
|
||||
|
||||
users.users.usr.extraGroups = [ "input" ];
|
||||
|
||||
services.getty.autologinUser = "usr";
|
||||
|
||||
boot.loader = {
|
||||
grub = {
|
||||
timeoutStyle = "hidden";
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
splashImage = null;
|
||||
};
|
||||
timeout = 1;
|
||||
};
|
||||
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
networking.hostName = "x230t";
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
|
@ -1,33 +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" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/772f67d6-9434-42f1-aa3e-153e41affe4c";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
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.enp0s25.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;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ lib, inputs, config, pkgs, home, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../home/x11.nix
|
||||
../../home/chromium
|
||||
];
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{ lib, config, pkgs, ...}:
|
||||
|
||||
{
|
||||
services.sshd.enable = true;
|
||||
systemd.services.sshd.wantedBy = lib.mkForce [];
|
||||
}
|
166
flake.lock
166
flake.lock
|
@ -41,11 +41,11 @@
|
|||
},
|
||||
"locked": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
"lastModified": 1731038603,
|
||||
"narHash": "sha256-4eJQfKZnMwy7Y2bFHqw/mpZjsPWrXfITmgTLPGmfl/w=",
|
||||
"lastModified": 1732852996,
|
||||
"narHash": "sha256-0LD4nyz/Z2bDNjVj6p8O85uGtOmDCC9PdX5hh8Z3rSM=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "674763b3eb6f0bdfa1f987984711bd3f33efc7bf",
|
||||
"rev": "0c855b6e0c58aef81f66c52f987f4c5ce8d48af0",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
|
@ -107,27 +107,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager-phone": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"phone-nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716729631,
|
||||
"narHash": "sha256-IerjU5GUeKc0eW9FPOdlPveSGJ2ZrO+lIfuHPUmUF2I=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "fc4492181833eaaa7a26a8081c0615d95792d825",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-colors": {
|
||||
"inputs": {
|
||||
"base16-schemes": "base16-schemes",
|
||||
|
@ -147,63 +126,13 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-formatter-pack": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nix-on-droid",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nmd": "nmd",
|
||||
"nmt": "nmt"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1666720474,
|
||||
"narHash": "sha256-iWojjDS1D19zpeZXbBdjWb9MiKmVVFQCqtJmtTXgPx8=",
|
||||
"owner": "Gerschtli",
|
||||
"repo": "nix-formatter-pack",
|
||||
"rev": "14876cc8fe94a3d329964ecb073b4c988c7b61f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Gerschtli",
|
||||
"repo": "nix-formatter-pack",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-on-droid": {
|
||||
"inputs": {
|
||||
"home-manager": [
|
||||
"home-manager-phone"
|
||||
],
|
||||
"nix-formatter-pack": "nix-formatter-pack",
|
||||
"nixpkgs": [
|
||||
"phone-nixpkgs"
|
||||
],
|
||||
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap",
|
||||
"nmd": "nmd_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1688144254,
|
||||
"narHash": "sha256-8KL1l/7eP2Zm1aJjdVaSOk0W5kTnJo9kcgW03gqWuiI=",
|
||||
"owner": "t184256",
|
||||
"repo": "nix-on-droid",
|
||||
"rev": "2301e01d48c90b60751005317de7a84a51a87eb6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "t184256",
|
||||
"ref": "release-23.05",
|
||||
"repo": "nix-on-droid",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1730883749,
|
||||
"narHash": "sha256-mwrFF0vElHJP8X3pFCByJR365Q2463ATp2qGIrDUdlE=",
|
||||
"lastModified": 1732749044,
|
||||
"narHash": "sha256-T38FQOg0BV5M8FN1712fovzNakSOENEYs+CSkg31C9Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dba414932936fde69f0606b4f1d87c5bc0003ede",
|
||||
"rev": "0c5b4ecbed5b155b705336aa96d878e55acd8685",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -228,22 +157,6 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-for-bootstrap": {
|
||||
"locked": {
|
||||
"lastModified": 1686921029,
|
||||
"narHash": "sha256-J1bX9plPCFhTSh6E3TWn9XSxggBh/zDD4xigyaIQBy8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1697935651,
|
||||
|
@ -274,79 +187,12 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nmd": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1666190571,
|
||||
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
|
||||
"owner": "rycee",
|
||||
"repo": "nmd",
|
||||
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rycee",
|
||||
"repo": "nmd",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"nmd_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1666190571,
|
||||
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
|
||||
"owner": "rycee",
|
||||
"repo": "nmd",
|
||||
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rycee",
|
||||
"repo": "nmd",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"nmt": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1648075362,
|
||||
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
|
||||
"owner": "rycee",
|
||||
"repo": "nmt",
|
||||
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rycee",
|
||||
"repo": "nmt",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"phone-nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1704290814,
|
||||
"narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"firefox-addons": "firefox-addons",
|
||||
"home-manager": "home-manager",
|
||||
"home-manager-phone": "home-manager-phone",
|
||||
"nix-colors": "nix-colors",
|
||||
"nix-on-droid": "nix-on-droid",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"phone-nixpkgs": "phone-nixpkgs",
|
||||
"simple-nixos-mailserver": "simple-nixos-mailserver"
|
||||
}
|
||||
},
|
||||
|
|
59
flake.nix
59
flake.nix
|
@ -18,18 +18,6 @@
|
|||
nix-colors = {
|
||||
url = "github:misterio77/nix-colors";
|
||||
};
|
||||
|
||||
# nix-on-droid inputs
|
||||
phone-nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
home-manager-phone = {
|
||||
url = "github:nix-community/home-manager/release-23.05";
|
||||
inputs.nixpkgs.follows = "phone-nixpkgs";
|
||||
};
|
||||
nix-on-droid = {
|
||||
url = "github:t184256/nix-on-droid/release-23.05";
|
||||
inputs.nixpkgs.follows = "phone-nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager-phone";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
@ -38,20 +26,8 @@
|
|||
home-manager,
|
||||
firefox-addons,
|
||||
simple-nixos-mailserver,
|
||||
|
||||
phone-nixpkgs,
|
||||
home-manager-phone,
|
||||
nix-on-droid,
|
||||
...
|
||||
}@inputs: {
|
||||
nixOnDroidConfigurations = {
|
||||
phone = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
modules = [
|
||||
./boxes/phone
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
netbox = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
|
@ -111,34 +87,6 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
virtbox = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./boxes/virtbox
|
||||
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
home-manager.users.usr = import ./boxes/virtbox/home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
x230t = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./boxes/x230t
|
||||
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
home-manager.users.usr = import ./boxes/x230t/home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
aristotle = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
|
@ -153,13 +101,6 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
mainsail = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./boxes/mainsail
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
{ lib, config, pkgs, ...}:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
discord
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
"discord"
|
||||
];
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
(prismlauncher.override { jdks = [ zulu8 zulu17 ]; })
|
||||
xonotic
|
||||
minetest
|
||||
];
|
||||
}
|
|
@ -1,105 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
# with thanks to
|
||||
# https://www.auntieneo.net/2014/12/14/reverse-ssh-tunnel-on-nixos-with-systemd/
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (pkgs) openssh;
|
||||
cfg = config.services.ssh-phone-home;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
services.ssh-phone-home = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable a "phone home" reverse SSH proxy.
|
||||
'';
|
||||
};
|
||||
|
||||
persist = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
When this is set to true, the service will persistently attempt to
|
||||
reconnect at intervals whenever the port forwarding operation fails.
|
||||
This is the recommended behavior for reliable operation. If one finds
|
||||
oneself in an environment where this kind of behavior might draw the
|
||||
suspicion of a network administrator, it might be a good idea to
|
||||
set this option to false (or not use <literal>ssh-phone-home</literal>
|
||||
at all).
|
||||
'';
|
||||
};
|
||||
|
||||
localUser = mkOption {
|
||||
description = ''
|
||||
Local user to connect as (i.e. the user with password-less SSH keys).
|
||||
'';
|
||||
};
|
||||
|
||||
remoteHostname = mkOption {
|
||||
description = ''
|
||||
The remote host to connect to. This should be the host outside of the
|
||||
firewall or NAT.
|
||||
'';
|
||||
};
|
||||
|
||||
remotePort = mkOption {
|
||||
default = 22;
|
||||
description = ''
|
||||
The port on which to connect to the remote host via SSH protocol.
|
||||
'';
|
||||
};
|
||||
|
||||
remoteUser = mkOption {
|
||||
description = ''
|
||||
The username to connect to the remote host as.
|
||||
'';
|
||||
};
|
||||
|
||||
bindPort = mkOption {
|
||||
default = 2222;
|
||||
description = ''
|
||||
The port to bind and listen to on the remote host.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.ssh-phone-home =
|
||||
{
|
||||
description = ''
|
||||
Reverse SSH tunnel as a service
|
||||
'';
|
||||
|
||||
# FIXME: This isn't triggered until a reboot, and probably won't work between suspends.
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = with cfg; {
|
||||
User = cfg.localUser;
|
||||
} // (if cfg.persist then
|
||||
{
|
||||
# Restart every 10 seconds on failure
|
||||
RestartSec = 10;
|
||||
Restart = "on-failure";
|
||||
}
|
||||
else {}
|
||||
);
|
||||
|
||||
script = with cfg; ''
|
||||
${openssh}/bin/ssh -NTC -o ServerAliveInterval=30 -o ExitOnForwardFailure=yes -R ${toString bindPort}:localhost:22 -l ${remoteUser} -p ${toString remotePort} ${remoteHostname}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue