nix fmt
This commit is contained in:
parent
a9218a80e6
commit
7137e93805
49 changed files with 2034 additions and 2002 deletions
File diff suppressed because it is too large
Load diff
|
@ -19,7 +19,6 @@
|
|||
|
||||
bpir3.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
|
||||
nixos-nftables-firewall.url = "github:thelegy/nixos-nftables-firewall";
|
||||
nixos-nftables-firewall.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
|
@ -60,13 +59,17 @@
|
|||
nixpkgs.lib.attrsets.recursiveUpdate
|
||||
attrs
|
||||
{
|
||||
specialArgs = (import ./default.nix {
|
||||
system = nativeSystem;
|
||||
inherit nodeName;
|
||||
specialArgs =
|
||||
(import ./default.nix {
|
||||
system = nativeSystem;
|
||||
inherit nodeName;
|
||||
|
||||
repoFlake = get-flake ../../../..;
|
||||
nodeFlake = self;
|
||||
}).meta.nodeSpecialArgs.${nodeName};
|
||||
repoFlake = get-flake ../../../..;
|
||||
nodeFlake = self;
|
||||
})
|
||||
.meta
|
||||
.nodeSpecialArgs
|
||||
.${nodeName};
|
||||
|
||||
modules =
|
||||
[
|
||||
|
@ -88,7 +91,6 @@
|
|||
linuxPackages_bpir3_latest
|
||||
;
|
||||
})
|
||||
|
||||
];
|
||||
}
|
||||
]
|
||||
|
@ -112,19 +114,22 @@
|
|||
};
|
||||
|
||||
packages = let
|
||||
mkPatchedHostapd = pkgs: pkgs.hostapd.overrideDerivation(attrs: {
|
||||
patches = attrs.patches ++ [
|
||||
"${self.inputs.openwrt}/package/network/services/hostapd/patches/710-vlan_no_bridge.patch"
|
||||
];
|
||||
});
|
||||
mkPatchedHostapd = pkgs:
|
||||
pkgs.hostapd.overrideDerivation (attrs: {
|
||||
patches =
|
||||
attrs.patches
|
||||
++ [
|
||||
"${self.inputs.openwrt}/package/network/services/hostapd/patches/710-vlan_no_bridge.patch"
|
||||
];
|
||||
});
|
||||
in {
|
||||
"${nativeSystem}" = {
|
||||
hostapd_patched = mkPatchedHostapd pkgs;
|
||||
};
|
||||
"${nativeSystem}" = {
|
||||
hostapd_patched = mkPatchedHostapd pkgs;
|
||||
};
|
||||
|
||||
cross = {
|
||||
hostapd_patched = mkPatchedHostapd pkgsCross;
|
||||
};
|
||||
cross = {
|
||||
hostapd_patched = mkPatchedHostapd pkgsCross;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{ modulesPath
|
||||
, repoFlake
|
||||
, packages'
|
||||
, pkgs
|
||||
, lib
|
||||
, config
|
||||
, nodeFlake
|
||||
, nodeName
|
||||
, system
|
||||
, ...
|
||||
{
|
||||
modulesPath,
|
||||
repoFlake,
|
||||
packages',
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
nodeFlake,
|
||||
nodeName,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
disabledModules = [
|
||||
];
|
||||
|
@ -34,7 +35,7 @@
|
|||
inherit pkgs;
|
||||
};
|
||||
|
||||
home-manager.users.steveej = { pkgs, ... }: {
|
||||
home-manager.users.steveej = {pkgs, ...}: {
|
||||
imports = [
|
||||
../../../home-manager/configuration/text-minimal.nix
|
||||
];
|
||||
|
@ -51,7 +52,7 @@
|
|||
|
||||
programs.zsh.enable = true;
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
environment.pathsToLink = ["/share/zsh"];
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -82,54 +83,52 @@
|
|||
firewall.enable = false;
|
||||
};
|
||||
|
||||
disko.devices =
|
||||
let
|
||||
disk = id: {
|
||||
type = "disk";
|
||||
device = "/dev/${id}";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "1M";
|
||||
type = "EF02"; # for grub MBR
|
||||
};
|
||||
mdadm = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "mdraid";
|
||||
name = "raid0";
|
||||
};
|
||||
disko.devices = let
|
||||
disk = id: {
|
||||
type = "disk";
|
||||
device = "/dev/${id}";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "1M";
|
||||
type = "EF02"; # for grub MBR
|
||||
};
|
||||
mdadm = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "mdraid";
|
||||
name = "raid0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
disk = {
|
||||
sda = disk "sda";
|
||||
sdb = disk "sdb";
|
||||
};
|
||||
mdadm = {
|
||||
raid0 = {
|
||||
type = "mdadm";
|
||||
level = 0;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
primary = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "btrfs";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
in {
|
||||
disk = {
|
||||
sda = disk "sda";
|
||||
sdb = disk "sdb";
|
||||
};
|
||||
mdadm = {
|
||||
raid0 = {
|
||||
type = "mdadm";
|
||||
level = 0;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
primary = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "btrfs";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{ nodeName
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
{
|
||||
nodeName,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
disabledModules = [ ];
|
||||
disabledModules = [];
|
||||
imports = [
|
||||
../../profiles/common/configuration.nix
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ in {
|
|||
enable = true;
|
||||
encrypted = false;
|
||||
diskId = "virtio-virtio-paeNi8Fof9Oe";
|
||||
earlyDiskIdOverride = "ata-INTEL_SSDSC2KB019TZ_PHYI315001FW1P9DGN";
|
||||
earlyDiskIdOverride = "ata-INTEL_SSDSC2KB019TZ_PHYI315001FW1P9DGN";
|
||||
};
|
||||
|
||||
boot.initrd.kernelModules = stage1Modules;
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, repoFlake
|
||||
, nodeName
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
repoFlake,
|
||||
nodeName,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../snippets/systemd-resolved.nix
|
||||
];
|
||||
|
@ -28,52 +27,50 @@
|
|||
|
||||
networking.nat = {
|
||||
enable = true;
|
||||
internalInterfaces = [ "ve-*" ];
|
||||
internalInterfaces = ["ve-*"];
|
||||
externalInterface = "eth0";
|
||||
};
|
||||
|
||||
# virtualization
|
||||
virtualisation = { docker.enable = false; };
|
||||
virtualisation = {docker.enable = false;};
|
||||
|
||||
nix.gc = { automatic = true; };
|
||||
nix.gc = {automatic = true;};
|
||||
|
||||
sops.secrets.restic-password.sopsFile = ../../../../secrets/${nodeName}/secrets.yaml;
|
||||
|
||||
# adapted from https://github.com/lilyinstarlight/foosteros/blob/5c75ded111878970fd4f600c7adc013f971d5e71/config/restic.nix
|
||||
services.restic.backups.${nodeName} =
|
||||
let
|
||||
btrfs = "${pkgs.btrfs-progs}/bin/btrfs";
|
||||
in
|
||||
{
|
||||
initialize = true;
|
||||
repository = "sftp://u217879-sub3@u217879-sub3.your-storagebox.de:23/restic/${nodeName}";
|
||||
services.restic.backups.${nodeName} = let
|
||||
btrfs = "${pkgs.btrfs-progs}/bin/btrfs";
|
||||
in {
|
||||
initialize = true;
|
||||
repository = "sftp://u217879-sub3@u217879-sub3.your-storagebox.de:23/restic/${nodeName}";
|
||||
|
||||
paths = [
|
||||
"/backup"
|
||||
];
|
||||
paths = [
|
||||
"/backup"
|
||||
];
|
||||
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 5"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 2"
|
||||
];
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 5"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 2"
|
||||
];
|
||||
|
||||
timerConfig = {
|
||||
OnCalendar = lib.mkDefault "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
|
||||
passwordFile = config.sops.secrets.restic-password.path;
|
||||
|
||||
backupPrepareCommand = ''
|
||||
${btrfs} su snapshot -r /var/lib/container-volumes /backup/container-volumes
|
||||
'';
|
||||
backupCleanupCommand = ''
|
||||
${btrfs} su delete /backup/container-volumes
|
||||
'';
|
||||
timerConfig = {
|
||||
OnCalendar = lib.mkDefault "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
|
||||
passwordFile = config.sops.secrets.restic-password.path;
|
||||
|
||||
backupPrepareCommand = ''
|
||||
${btrfs} su snapshot -r /var/lib/container-volumes /backup/container-volumes
|
||||
'';
|
||||
backupCleanupCommand = ''
|
||||
${btrfs} su delete /backup/container-volumes
|
||||
'';
|
||||
};
|
||||
|
||||
containers = {
|
||||
mailserver = import ../../containers/mailserver.nix {
|
||||
inherit repoFlake;
|
||||
|
@ -89,17 +86,17 @@
|
|||
|
||||
webserver =
|
||||
import ../../containers/webserver.nix
|
||||
{
|
||||
inherit repoFlake;
|
||||
{
|
||||
inherit repoFlake;
|
||||
|
||||
autoStart = true;
|
||||
autoStart = true;
|
||||
|
||||
hostAddress = "192.168.100.12";
|
||||
localAddress = "192.168.100.13";
|
||||
hostAddress = "192.168.100.12";
|
||||
localAddress = "192.168.100.13";
|
||||
|
||||
httpPort = 80;
|
||||
httpsPort = 443;
|
||||
};
|
||||
httpPort = 80;
|
||||
httpsPort = 443;
|
||||
};
|
||||
|
||||
syncthing = import ../../containers/syncthing.nix {
|
||||
autoStart = true;
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, repoFlake
|
||||
, nodeName
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
wireguardPort = 51820;
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
repoFlake,
|
||||
nodeName,
|
||||
...
|
||||
}: let
|
||||
wireguardPort = 51820;
|
||||
in {
|
||||
imports = [
|
||||
../../snippets/systemd-resolved.nix
|
||||
];
|
||||
|
@ -39,7 +38,7 @@ in
|
|||
"prefixLength" = 29;
|
||||
}
|
||||
];
|
||||
ipv6.addresses = [ ];
|
||||
ipv6.addresses = [];
|
||||
};
|
||||
|
||||
networking.defaultGateway = {
|
||||
|
@ -54,7 +53,7 @@ in
|
|||
|
||||
networking.nat = {
|
||||
enable = true;
|
||||
internalInterfaces = [ "ve-*" "wg*" ];
|
||||
internalInterfaces = ["ve-*" "wg*"];
|
||||
externalInterface = "eth0";
|
||||
};
|
||||
|
||||
|
@ -79,7 +78,7 @@ in
|
|||
privateKeyFile = config.sops.secrets.wg0-private.path;
|
||||
peers = [
|
||||
{
|
||||
allowedIPs = [ "192.168.99.2/32" ];
|
||||
allowedIPs = ["192.168.99.2/32"];
|
||||
publicKey = "O3k4jEdX6jkV1fHP/J8KSH5tvi+n1VvnBTD5na6Naw0=";
|
||||
presharedKeyFile = config.sops.secrets.wg0-psk-steveej-psk.path;
|
||||
}
|
||||
|
@ -87,15 +86,14 @@ in
|
|||
};
|
||||
|
||||
# virtualization
|
||||
virtualisation = { docker.enable = false; };
|
||||
virtualisation = {docker.enable = false;};
|
||||
|
||||
services.spice-vdagentd.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
nix.gc = { automatic = true; };
|
||||
nix.gc = {automatic = true;};
|
||||
|
||||
containers = {
|
||||
|
||||
};
|
||||
|
||||
home-manager.users.steveej = import ../../../home-manager/configuration/text-minimal.nix {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }: {
|
||||
{...}: {
|
||||
imports = [
|
||||
../../snippets/home-manager-with-zsh.nix
|
||||
../../snippets/nix-settings-holo-chain.nix
|
||||
|
@ -19,8 +19,7 @@
|
|||
./boot.nix
|
||||
|
||||
# samba seerver
|
||||
({ lib, ... }: {
|
||||
|
||||
({lib, ...}: {
|
||||
# networking.firewall.enable = lib.mkForce false;
|
||||
services.samba-wsdd.enable = true; # make shares visible for windows 10 clients
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
{ nodeName
|
||||
, repoFlake
|
||||
, repoFlakeWithSystem
|
||||
, nodeFlake
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
in
|
||||
{
|
||||
nodeName,
|
||||
repoFlake,
|
||||
repoFlakeWithSystem,
|
||||
nodeFlake,
|
||||
...
|
||||
}: let
|
||||
system = "x86_64-linux";
|
||||
in {
|
||||
meta.nodeSpecialArgs.${nodeName} = {
|
||||
inherit repoFlake nodeName nodeFlake;
|
||||
packages' = repoFlake.packages.${system};
|
||||
repoFlakeInputs' = repoFlakeWithSystem system ({ inputs', ... }: inputs');
|
||||
repoFlakeInputs' = repoFlakeWithSystem system ({inputs', ...}: inputs');
|
||||
};
|
||||
|
||||
meta.nodeNixpkgs.${nodeName} = import nodeFlake.inputs.nixpkgs.outPath {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
in
|
||||
{
|
||||
{lib, ...}: let
|
||||
in {
|
||||
# TASK: new device
|
||||
hardware.opinionatedDisk = {
|
||||
enable = true;
|
||||
|
@ -68,16 +66,16 @@ in
|
|||
enable = false;
|
||||
levels = [
|
||||
# ["level auto" 0 60]
|
||||
[ 0 0 60 ]
|
||||
[ 1 60 65 ]
|
||||
[ 1 65 75 ]
|
||||
[ 2 75 78 ]
|
||||
[ 3 78 80 ]
|
||||
[ 4 80 82 ]
|
||||
[ 5 82 84 ]
|
||||
[ 6 84 86 ]
|
||||
[ 7 86 88 ]
|
||||
[ "level full-speed" 88 999 ]
|
||||
[0 0 60]
|
||||
[1 60 65]
|
||||
[1 65 75]
|
||||
[2 75 78]
|
||||
[3 78 80]
|
||||
[4 80 82]
|
||||
[5 82 84]
|
||||
[6 84 86]
|
||||
[7 86 88]
|
||||
["level full-speed" 88 999]
|
||||
];
|
||||
|
||||
extraArgs = [
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, repoFlake
|
||||
, nodeFlake
|
||||
, ...
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
repoFlake,
|
||||
nodeFlake,
|
||||
...
|
||||
}: {
|
||||
system.stateVersion = "23.05";
|
||||
home-manager.users.root = _: {
|
||||
|
@ -20,7 +21,7 @@
|
|||
})
|
||||
];
|
||||
|
||||
home.sessionVariables = { };
|
||||
home.sessionVariables = {};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
];
|
||||
|
@ -37,28 +38,26 @@
|
|||
#
|
||||
# (regreet:505614): Gtk-WARNING **: 10:31:42.532: Theme parser warning: <data>:6:17-18: Empty declaration
|
||||
# Failed to create /var/empty/.cache for shader cache (Operation not permitted)---disabling.
|
||||
services.greetd =
|
||||
let
|
||||
# exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit"
|
||||
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
||||
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
|
||||
exec "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK; ${pkgs.greetd.regreet}/bin/regreet; swaymsg exit"
|
||||
bindsym Mod4+shift+e exec swaynag \
|
||||
-t warning \
|
||||
-m 'What do you want to do?' \
|
||||
-b 'Poweroff' 'systemctl poweroff' \
|
||||
-b 'Reboot' 'systemctl reboot'
|
||||
'';
|
||||
in
|
||||
{
|
||||
enable = false;
|
||||
settings = {
|
||||
vt = 1;
|
||||
default_session = {
|
||||
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
|
||||
};
|
||||
services.greetd = let
|
||||
# exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit"
|
||||
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
||||
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
|
||||
exec "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK; ${pkgs.greetd.regreet}/bin/regreet; swaymsg exit"
|
||||
bindsym Mod4+shift+e exec swaynag \
|
||||
-t warning \
|
||||
-m 'What do you want to do?' \
|
||||
-b 'Poweroff' 'systemctl poweroff' \
|
||||
-b 'Reboot' 'systemctl reboot'
|
||||
'';
|
||||
in {
|
||||
enable = false;
|
||||
settings = {
|
||||
vt = 1;
|
||||
default_session = {
|
||||
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."greetd/environments".text = ''
|
||||
sway
|
||||
|
@ -107,5 +106,4 @@
|
|||
# # };
|
||||
# # };
|
||||
# };
|
||||
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, nodeName
|
||||
, repoFlake
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
nodeName,
|
||||
repoFlake,
|
||||
...
|
||||
}: let
|
||||
localTcpPorts = [
|
||||
22
|
||||
|
||||
|
@ -21,9 +21,7 @@ let
|
|||
22000
|
||||
21027
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
in {
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
];
|
||||
|
@ -41,7 +39,7 @@ in
|
|||
system = "x86_64-linux";
|
||||
maxJobs = 32;
|
||||
speedFactor = 100;
|
||||
supportedFeatures = repoFlake.nixosConfigurations.steveej-t14.config.nix.settings.system-features ++ [ ];
|
||||
supportedFeatures = repoFlake.nixosConfigurations.steveej-t14.config.nix.settings.system-features ++ [];
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -52,7 +50,7 @@ in
|
|||
system = "aarch64-linux";
|
||||
maxJobs = 32;
|
||||
speedFactor = 100;
|
||||
supportedFeatures = repoFlake.nixosConfigurations.router0-dmz0.config.nix.settings.system-features ++ [ ];
|
||||
supportedFeatures = repoFlake.nixosConfigurations.router0-dmz0.config.nix.settings.system-features ++ [];
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -61,7 +59,7 @@ in
|
|||
networking.extraHosts = ''
|
||||
'';
|
||||
|
||||
networking.bridges."virbr1".interfaces = [ ];
|
||||
networking.bridges."virbr1".interfaces = [];
|
||||
networking.interfaces."virbr1".ipv4.addresses = [
|
||||
{
|
||||
address = "10.254.254.254";
|
||||
|
@ -94,7 +92,7 @@ in
|
|||
|
||||
# virtualization
|
||||
virtualisation = {
|
||||
libvirtd = { enable = true; };
|
||||
libvirtd = {enable = true;};
|
||||
|
||||
virtualbox.host = {
|
||||
enable = false;
|
||||
|
@ -112,9 +110,9 @@ in
|
|||
# client min protocol = NT1
|
||||
'';
|
||||
|
||||
security.pki.certificateFiles = [ "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" ];
|
||||
security.pki.certificateFiles = ["${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"];
|
||||
|
||||
services.xserver.videoDrivers = lib.mkForce [ "amdgpu" ];
|
||||
services.xserver.videoDrivers = lib.mkForce ["amdgpu"];
|
||||
|
||||
hardware.ledger.enable = true;
|
||||
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
keys = import ../../../variables/keys.nix;
|
||||
inherit (pkgs.callPackage ../../lib/default.nix { }) mkUser;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
keys = import ../../../variables/keys.nix;
|
||||
inherit (pkgs.callPackage ../../lib/default.nix {}) mkUser;
|
||||
in {
|
||||
users.users.steveej2 = mkUser {
|
||||
uid = 1001;
|
||||
openssh.authorizedKeys.keys = keys.users.steveej.openssh;
|
||||
hashedPasswordFile = config.sops.secrets.sharedUsers-steveej.path;
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = [ "steveej" ];
|
||||
nix.settings.trusted-users = ["steveej"];
|
||||
|
||||
security.pam.u2f.enable = true;
|
||||
security.pam.services.steveej.u2fAuth = true;
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
{ repoFlake
|
||||
, nodeFlake
|
||||
, pkgs
|
||||
, lib
|
||||
, config
|
||||
, nodeName
|
||||
, localDomainName
|
||||
, system
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
repoFlake,
|
||||
nodeFlake,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
nodeName,
|
||||
localDomainName,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
nixos-x13s = {
|
||||
enable = true;
|
||||
# TODO: use hardware address
|
||||
|
@ -42,8 +41,8 @@
|
|||
echo $?
|
||||
)
|
||||
'';
|
||||
requiredBy = [ "bluetooth.service" ];
|
||||
before = [ "bluetooth.service" ];
|
||||
requiredBy = ["bluetooth.service"];
|
||||
before = ["bluetooth.service"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
|
@ -80,7 +79,6 @@
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
../../snippets/home-manager-with-zsh.nix
|
||||
../../snippets/sway-desktop.nix
|
||||
../../snippets/bluetooth.nix
|
||||
|
@ -115,7 +113,7 @@
|
|||
../../../home-manager/configuration/graphical-fullblown.nix
|
||||
];
|
||||
|
||||
home.sessionVariables = { };
|
||||
home.sessionVariables = {};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
];
|
||||
|
@ -129,7 +127,7 @@
|
|||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = lib.mkForce false;
|
||||
loader.efi.efiSysMountPoint = "/boot";
|
||||
blacklistedKernelModules = [ "wwan" ];
|
||||
blacklistedKernelModules = ["wwan"];
|
||||
|
||||
initrd.kernelModules = [
|
||||
"phy_qcom_qmp_usb"
|
||||
|
|
|
@ -1,25 +1,26 @@
|
|||
{ system ? "aarch64-linux"
|
||||
, nodeName
|
||||
, repoFlake
|
||||
, repoFlakeWithSystem
|
||||
, nodeFlake
|
||||
, localDomainName ? "internal"
|
||||
, ...
|
||||
{
|
||||
system ? "aarch64-linux",
|
||||
nodeName,
|
||||
repoFlake,
|
||||
repoFlakeWithSystem,
|
||||
nodeFlake,
|
||||
localDomainName ? "internal",
|
||||
...
|
||||
}: {
|
||||
meta.nodeSpecialArgs.${nodeName} = {
|
||||
inherit repoFlake nodeName nodeFlake system;
|
||||
packages' = repoFlake.packages.${system};
|
||||
nodePackages' = nodeFlake.packages.${system};
|
||||
repoFlakeInputs' = repoFlakeWithSystem system ({ inputs', ... }: inputs');
|
||||
repoFlakeInputs' = repoFlakeWithSystem system ({inputs', ...}: inputs');
|
||||
|
||||
inherit localDomainName;
|
||||
};
|
||||
|
||||
meta.nodeNixpkgs.${nodeName} =
|
||||
import nodeFlake.inputs.nixpkgs.outPath
|
||||
{
|
||||
inherit system;
|
||||
};
|
||||
{
|
||||
inherit system;
|
||||
};
|
||||
|
||||
${nodeName} = {
|
||||
deployment.targetHost = "${nodeName}.${localDomainName}";
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "x13s-usb-crypt";
|
||||
extraOpenArgs = [ ];
|
||||
extraOpenArgs = [];
|
||||
# disable settings.keyFile if you want to use interactive password entry
|
||||
#passwordFile = "/tmp/secret.key"; # Interactive
|
||||
settings = {
|
||||
|
@ -36,19 +36,19 @@
|
|||
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
};
|
||||
"/home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
};
|
||||
"/swap" = {
|
||||
mountpoint = "/.swapvol";
|
||||
|
|
|
@ -1,89 +1,92 @@
|
|||
{
|
||||
inputs =
|
||||
{
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
# required for home-manager modules
|
||||
nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
||||
nixpkgs-2211.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||
# required for home-manager modules
|
||||
nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
||||
nixpkgs-2211.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||
|
||||
get-flake.url = "github:ursi/get-flake";
|
||||
get-flake.url = "github:ursi/get-flake";
|
||||
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
mobile-nixos.url = "github:NixOS/mobile-nixos";
|
||||
mobile-nixos.flake = false;
|
||||
mobile-nixos.url = "github:NixOS/mobile-nixos";
|
||||
mobile-nixos.flake = false;
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixos-x13s.url = "git+https://codeberg.org/steveej/nixos-x13s";
|
||||
nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, get-flake
|
||||
, nixpkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
system = "aarch64-linux";
|
||||
buildPlatform = "x86_64-linux";
|
||||
repoFlake = get-flake ../../../..;
|
||||
in
|
||||
{
|
||||
lib = {
|
||||
mkNixosConfiguration = { nodeName, extraModules ? [ ], ... } @ attrs:
|
||||
nixpkgs.lib.nixosSystem (
|
||||
nixpkgs.lib.attrsets.recursiveUpdate
|
||||
attrs
|
||||
{
|
||||
specialArgs = (import ./default.nix {
|
||||
inherit system;
|
||||
inherit nodeName repoFlake;
|
||||
nixos-x13s.url = "git+https://codeberg.org/steveej/nixos-x13s";
|
||||
nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nodeFlake = self;
|
||||
}).meta.nodeSpecialArgs.${nodeName};
|
||||
outputs = {
|
||||
self,
|
||||
get-flake,
|
||||
nixpkgs,
|
||||
...
|
||||
}: let
|
||||
system = "aarch64-linux";
|
||||
buildPlatform = "x86_64-linux";
|
||||
repoFlake = get-flake ../../../..;
|
||||
in {
|
||||
lib = {
|
||||
mkNixosConfiguration = {
|
||||
nodeName,
|
||||
extraModules ? [],
|
||||
...
|
||||
} @ attrs:
|
||||
nixpkgs.lib.nixosSystem (
|
||||
nixpkgs.lib.attrsets.recursiveUpdate
|
||||
attrs
|
||||
{
|
||||
specialArgs =
|
||||
(import ./default.nix {
|
||||
inherit system;
|
||||
inherit nodeName repoFlake;
|
||||
|
||||
modules =
|
||||
[
|
||||
# repoFlake.nixosModules.hardware-x13s
|
||||
]
|
||||
++ extraModules;
|
||||
}
|
||||
);
|
||||
nodeFlake = self;
|
||||
})
|
||||
.meta
|
||||
.nodeSpecialArgs
|
||||
.${nodeName};
|
||||
|
||||
modules =
|
||||
[
|
||||
# repoFlake.nixosModules.hardware-x13s
|
||||
]
|
||||
++ extraModules;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
nixosConfigurations = let
|
||||
nodeName = "steveej-x13s-rmvbl";
|
||||
in {
|
||||
native = self.lib.mkNixosConfiguration {
|
||||
inherit system nodeName;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
|
||||
{
|
||||
users.commonUsers.installPassword = "install";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations =
|
||||
let
|
||||
nodeName = "steveej-x13s-rmvbl";
|
||||
in
|
||||
{
|
||||
native = self.lib.mkNixosConfiguration {
|
||||
inherit system nodeName;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
cross = self.lib.mkNixosConfiguration {
|
||||
inherit nodeName;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
|
||||
{
|
||||
users.commonUsers.installPassword = "install";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
cross = self.lib.mkNixosConfiguration {
|
||||
inherit nodeName;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
|
||||
{
|
||||
nixpkgs.buildPlatform.system = buildPlatform;
|
||||
nixpkgs.hostPlatform.system = system;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
{
|
||||
nixpkgs.buildPlatform.system = buildPlatform;
|
||||
nixpkgs.hostPlatform.system = system;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
{ repoFlake
|
||||
, nodeFlake
|
||||
, pkgs
|
||||
, lib
|
||||
, config
|
||||
, nodeName
|
||||
, localDomainName
|
||||
, system
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
repoFlake,
|
||||
nodeFlake,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
nodeName,
|
||||
localDomainName,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
nixos-x13s = {
|
||||
enable = true;
|
||||
# TODO: use hardware address
|
||||
|
@ -44,8 +43,8 @@
|
|||
echo $?
|
||||
)
|
||||
'';
|
||||
requiredBy = [ "bluetooth.service" ];
|
||||
before = [ "bluetooth.service" ];
|
||||
requiredBy = ["bluetooth.service"];
|
||||
before = ["bluetooth.service"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
|
@ -82,7 +81,6 @@
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
../../snippets/home-manager-with-zsh.nix
|
||||
../../snippets/sway-desktop.nix
|
||||
../../snippets/bluetooth.nix
|
||||
|
@ -117,7 +115,7 @@
|
|||
../../../home-manager/configuration/graphical-fullblown.nix
|
||||
];
|
||||
|
||||
home.sessionVariables = { };
|
||||
home.sessionVariables = {};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
];
|
||||
|
@ -131,7 +129,7 @@
|
|||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = lib.mkForce false;
|
||||
loader.efi.efiSysMountPoint = "/boot";
|
||||
blacklistedKernelModules = [ "wwan" ];
|
||||
blacklistedKernelModules = ["wwan"];
|
||||
};
|
||||
|
||||
# see https://linrunner.de/tlp/
|
||||
|
|
|
@ -1,25 +1,26 @@
|
|||
{ system ? "aarch64-linux"
|
||||
, nodeName
|
||||
, repoFlake
|
||||
, repoFlakeWithSystem
|
||||
, nodeFlake
|
||||
, localDomainName ? "internal"
|
||||
, ...
|
||||
{
|
||||
system ? "aarch64-linux",
|
||||
nodeName,
|
||||
repoFlake,
|
||||
repoFlakeWithSystem,
|
||||
nodeFlake,
|
||||
localDomainName ? "internal",
|
||||
...
|
||||
}: {
|
||||
meta.nodeSpecialArgs.${nodeName} = {
|
||||
inherit repoFlake nodeName nodeFlake system;
|
||||
packages' = repoFlake.packages.${system};
|
||||
nodePackages' = nodeFlake.packages.${system};
|
||||
repoFlakeInputs' = repoFlakeWithSystem system ({ inputs', ... }: inputs');
|
||||
repoFlakeInputs' = repoFlakeWithSystem system ({inputs', ...}: inputs');
|
||||
|
||||
inherit localDomainName;
|
||||
};
|
||||
|
||||
meta.nodeNixpkgs.${nodeName} =
|
||||
import nodeFlake.inputs.nixpkgs.outPath
|
||||
{
|
||||
inherit system;
|
||||
};
|
||||
{
|
||||
inherit system;
|
||||
};
|
||||
|
||||
${nodeName} = {
|
||||
deployment.targetHost = "${nodeName}.${localDomainName}";
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "x13s-nvme-crypt";
|
||||
extraOpenArgs = [ ];
|
||||
extraOpenArgs = [];
|
||||
# disable settings.keyFile if you want to use interactive password entry
|
||||
#passwordFile = "/tmp/secret.key"; # Interactive
|
||||
settings = {
|
||||
|
@ -36,19 +36,19 @@
|
|||
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
};
|
||||
"/home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
};
|
||||
"/swap" = {
|
||||
mountpoint = "/.swapvol";
|
||||
|
|
|
@ -1,89 +1,92 @@
|
|||
{
|
||||
inputs =
|
||||
{
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
# required for home-manager modules
|
||||
nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
||||
nixpkgs-2211.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||
# required for home-manager modules
|
||||
nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
||||
nixpkgs-2211.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||
|
||||
get-flake.url = "github:ursi/get-flake";
|
||||
get-flake.url = "github:ursi/get-flake";
|
||||
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
mobile-nixos.url = "github:NixOS/mobile-nixos";
|
||||
mobile-nixos.flake = false;
|
||||
mobile-nixos.url = "github:NixOS/mobile-nixos";
|
||||
mobile-nixos.flake = false;
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s?rev=5044811f7804e7cf83923908d1b35322f34fb3fc"; # 6.7.0-1
|
||||
nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s";
|
||||
nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, get-flake
|
||||
, nixpkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
targetPlatform = "aarch64-linux";
|
||||
buildPlatform = "x86_64-linux";
|
||||
repoFlake = get-flake ../../../..;
|
||||
# nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s?rev=5044811f7804e7cf83923908d1b35322f34fb3fc"; # 6.7.0-1
|
||||
nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s";
|
||||
nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
mkNixosConfiguration = { nodeName, extraModules ? [ ], ... } @ attrs:
|
||||
nixpkgs.lib.nixosSystem (
|
||||
nixpkgs.lib.attrsets.recursiveUpdate
|
||||
attrs
|
||||
{
|
||||
specialArgs = (import ./default.nix {
|
||||
system = targetPlatform;
|
||||
inherit nodeName repoFlake;
|
||||
outputs = {
|
||||
self,
|
||||
get-flake,
|
||||
nixpkgs,
|
||||
...
|
||||
}: let
|
||||
targetPlatform = "aarch64-linux";
|
||||
buildPlatform = "x86_64-linux";
|
||||
repoFlake = get-flake ../../../..;
|
||||
|
||||
nodeFlake = self;
|
||||
}).meta.nodeSpecialArgs.${nodeName};
|
||||
|
||||
modules =
|
||||
[
|
||||
# repoFlake.nixosModules.hardware-x13s
|
||||
]
|
||||
++ extraModules;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
lib = {
|
||||
inherit mkNixosConfiguration;
|
||||
};
|
||||
|
||||
nixosConfigurations =
|
||||
let
|
||||
nodeName = "steveej-x13s";
|
||||
in
|
||||
mkNixosConfiguration = {
|
||||
nodeName,
|
||||
extraModules ? [],
|
||||
...
|
||||
} @ attrs:
|
||||
nixpkgs.lib.nixosSystem (
|
||||
nixpkgs.lib.attrsets.recursiveUpdate
|
||||
attrs
|
||||
{
|
||||
native = mkNixosConfiguration {
|
||||
inherit nodeName;
|
||||
system = targetPlatform;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
specialArgs =
|
||||
(import ./default.nix {
|
||||
system = targetPlatform;
|
||||
inherit nodeName repoFlake;
|
||||
|
||||
cross = mkNixosConfiguration {
|
||||
inherit nodeName;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
nodeFlake = self;
|
||||
})
|
||||
.meta
|
||||
.nodeSpecialArgs
|
||||
.${nodeName};
|
||||
|
||||
{
|
||||
nixpkgs.buildPlatform.system = buildPlatform;
|
||||
nixpkgs.hostPlatform.system = targetPlatform;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
modules =
|
||||
[
|
||||
# repoFlake.nixosModules.hardware-x13s
|
||||
]
|
||||
++ extraModules;
|
||||
}
|
||||
);
|
||||
in {
|
||||
lib = {
|
||||
inherit mkNixosConfiguration;
|
||||
};
|
||||
|
||||
nixosConfigurations = let
|
||||
nodeName = "steveej-x13s";
|
||||
in {
|
||||
native = mkNixosConfiguration {
|
||||
inherit nodeName;
|
||||
system = targetPlatform;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
cross = mkNixosConfiguration {
|
||||
inherit nodeName;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
|
||||
{
|
||||
nixpkgs.buildPlatform.system = buildPlatform;
|
||||
nixpkgs.hostPlatform.system = targetPlatform;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -32,13 +32,17 @@
|
|||
nixpkgs.lib.attrsets.recursiveUpdate
|
||||
attrs
|
||||
{
|
||||
specialArgs = (import ./default.nix {
|
||||
system = targetPlatform;
|
||||
inherit nodeName;
|
||||
specialArgs =
|
||||
(import ./default.nix {
|
||||
system = targetPlatform;
|
||||
inherit nodeName;
|
||||
|
||||
repoFlake = get-flake ../../../..;
|
||||
nodeFlake = self;
|
||||
}).meta.nodeSpecialArgs.${nodeName};
|
||||
repoFlake = get-flake ../../../..;
|
||||
nodeFlake = self;
|
||||
})
|
||||
.meta
|
||||
.nodeSpecialArgs
|
||||
.${nodeName};
|
||||
|
||||
modules =
|
||||
[
|
||||
|
@ -51,10 +55,8 @@
|
|||
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(final: previous:
|
||||
{
|
||||
(final: previous: {
|
||||
})
|
||||
|
||||
];
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue