nixfmt
This commit is contained in:
@@ -20,4 +20,4 @@
|
||||
'';
|
||||
m1n1CustomLogo = ./NixOS.png;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,6 @@ in
|
||||
"name:steam, monitor:${display.input}, default:false, special, class:(.*[Ss]team.*)"
|
||||
];
|
||||
|
||||
|
||||
windowRule = [
|
||||
"size 2160 3356, tag:horizonrdp"
|
||||
];
|
||||
@@ -78,7 +77,7 @@ in
|
||||
"lp"
|
||||
"video"
|
||||
"i2c"
|
||||
]; # Enable ‘sudo’ for the user.
|
||||
]; # Enable ‘sudo’ for the user.
|
||||
shell = pkgs.zsh;
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
|
||||
@@ -4,61 +4,90 @@
|
||||
{ lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "uas" "sdhci_pci" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"uas"
|
||||
"sdhci_pci"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "none";
|
||||
fsType = "tmpfs";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "none";
|
||||
fsType = "tmpfs";
|
||||
};
|
||||
|
||||
fileSystems."/root" =
|
||||
{ device = "/dev/disk/by-uuid/adcc14fa-8bf7-4b4b-a9e4-b038993b96cc";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd" "noatime" "subvol=root" ];
|
||||
};
|
||||
fileSystems."/root" = {
|
||||
device = "/dev/disk/by-uuid/adcc14fa-8bf7-4b4b-a9e4-b038993b96cc";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"subvol=root"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/etc" =
|
||||
{ device = "/dev/disk/by-uuid/adcc14fa-8bf7-4b4b-a9e4-b038993b96cc";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd" "noatime" "subvol=etc" ];
|
||||
};
|
||||
fileSystems."/etc" = {
|
||||
device = "/dev/disk/by-uuid/adcc14fa-8bf7-4b4b-a9e4-b038993b96cc";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"subvol=etc"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/tmp" =
|
||||
{ device = "/dev/disk/by-uuid/adcc14fa-8bf7-4b4b-a9e4-b038993b96cc";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd" "noatime" "subvol=tmp" ];
|
||||
};
|
||||
fileSystems."/tmp" = {
|
||||
device = "/dev/disk/by-uuid/adcc14fa-8bf7-4b4b-a9e4-b038993b96cc";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"subvol=tmp"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-uuid/adcc14fa-8bf7-4b4b-a9e4-b038993b96cc";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd" "noatime" "subvol=nix" ];
|
||||
};
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/adcc14fa-8bf7-4b4b-a9e4-b038993b96cc";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"subvol=nix"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/var/log" =
|
||||
{ device = "/dev/disk/by-uuid/adcc14fa-8bf7-4b4b-a9e4-b038993b96cc";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd" "noatime" "subvol=log" ];
|
||||
};
|
||||
fileSystems."/var/log" = {
|
||||
device = "/dev/disk/by-uuid/adcc14fa-8bf7-4b4b-a9e4-b038993b96cc";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"subvol=log"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/adcc14fa-8bf7-4b4b-a9e4-b038993b96cc";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd" "subvol=home" ];
|
||||
};
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/adcc14fa-8bf7-4b4b-a9e4-b038993b96cc";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd"
|
||||
"subvol=home"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/23FA-AD3E";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/23FA-AD3E";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
# swapDevices = [
|
||||
# {
|
||||
|
||||
@@ -19,7 +19,7 @@ in
|
||||
monitor = [
|
||||
"${display.input},${display.resolution}@${display.refreshRate},0x0,1.25,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98"
|
||||
];
|
||||
|
||||
|
||||
# monitorv2 = {
|
||||
# output = "eDP-1";
|
||||
# mode = "3456x2234@60.00000";
|
||||
@@ -27,7 +27,7 @@ in
|
||||
# scale = "1.25";
|
||||
# #bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98"
|
||||
# };
|
||||
|
||||
|
||||
workspace = [
|
||||
"name:firefox, monitor:${display.input}, default:false, special, class:(.*firefox.*)"
|
||||
"name:discord, monitor:${display.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)"
|
||||
@@ -79,4 +79,4 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
enable = true;
|
||||
settings = {
|
||||
General = {
|
||||
EnableNetworkConfiguration = true;
|
||||
EnableNetworkConfiguration = true;
|
||||
};
|
||||
Rank = {
|
||||
BandModifier2_4GHz = 1.0;
|
||||
@@ -41,4 +41,4 @@
|
||||
iptables -I INPUT -p udp -m udp --match multiport --dports 1990,2021 -j ACCEPT
|
||||
'';
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# minimum cpu frequency (in kHz)
|
||||
# example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000
|
||||
# Available: 912 MHz, 1284 MHz, 1752 MHz, 2004 MHz, 2256 MHz, 2424 MHz
|
||||
# 702000 948000 1188000 1452000 1704000 1968000 2208000 2400000 2568000 2724000 2868000 3000000 3132000 3264000
|
||||
# 702000 948000 1188000 1452000 1704000 1968000 2208000 2400000 2568000 2724000 2868000 3000000 3132000 3264000
|
||||
# see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html
|
||||
# to use this feature, uncomment the following line and set the value accordingly
|
||||
scaling_min_freq = 912000;
|
||||
@@ -33,7 +33,7 @@
|
||||
# minimum cpu frequency (in kHz)
|
||||
# example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000
|
||||
# Available: 912 MHz, 1284 MHz, 1752 MHz, 2004 MHz, 2256 MHz, 2424 MHz
|
||||
# 702000 948000 1188000 1452000 1704000 1968000 2208000 2400000 2568000 2724000 2868000 3000000 3132000 3264000
|
||||
# 702000 948000 1188000 1452000 1704000 1968000 2208000 2400000 2568000 2724000 2868000 3000000 3132000 3264000
|
||||
# see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html
|
||||
# to use this feature, uncomment the following line and set the value accordingly
|
||||
scaling_min_freq = 912000;
|
||||
@@ -50,7 +50,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
displayManager = {
|
||||
sddm = {
|
||||
enable = lib.mkForce true;
|
||||
@@ -58,7 +58,7 @@
|
||||
};
|
||||
gdm.enable = lib.mkForce false;
|
||||
};
|
||||
|
||||
|
||||
desktopManager = {
|
||||
plasma6.enable = lib.mkForce false;
|
||||
gnome.enable = lib.mkForce false;
|
||||
@@ -93,9 +93,9 @@
|
||||
"`" = "A-f6";
|
||||
|
||||
# App shortcuts
|
||||
c = "C-insert"; # Copy
|
||||
v = "S-insert"; # Paste
|
||||
x = "S-delete"; # Cut
|
||||
c = "C-insert"; # Copy
|
||||
v = "S-insert"; # Paste
|
||||
x = "S-delete"; # Cut
|
||||
|
||||
"1" = "A-1";
|
||||
"2" = "A-2";
|
||||
|
||||
@@ -21,18 +21,25 @@
|
||||
# # cp -r ${uefi_pi4}/share/uefi_rpi4/* /boot/firmware/
|
||||
# # '';
|
||||
# }
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
kernelBundle = pkgs.linuxAndFirmware.latest;
|
||||
in
|
||||
{
|
||||
system.nixos.tags = let
|
||||
cfg = config.boot.loader.raspberry-pi;
|
||||
in [
|
||||
"raspberry-pi-${cfg.variant}"
|
||||
cfg.bootloader
|
||||
config.boot.kernelPackages.kernel.version
|
||||
];
|
||||
system.nixos.tags =
|
||||
let
|
||||
cfg = config.boot.loader.raspberry-pi;
|
||||
in
|
||||
[
|
||||
"raspberry-pi-${cfg.variant}"
|
||||
cfg.bootloader
|
||||
config.boot.kernelPackages.kernel.version
|
||||
];
|
||||
|
||||
boot = lib.mkForce {
|
||||
loader.raspberry-pi = {
|
||||
@@ -41,9 +48,10 @@ in
|
||||
};
|
||||
kernelPackages = kernelBundle.linuxPackages_rpi4;
|
||||
};
|
||||
|
||||
|
||||
hardware.raspberry-pi.config = {
|
||||
all = { # [all] conditional filter, https://www.raspberrypi.com/documentation/computers/config_txt.html#conditional-filters
|
||||
all = {
|
||||
# [all] conditional filter, https://www.raspberrypi.com/documentation/computers/config_txt.html#conditional-filters
|
||||
|
||||
base-dt-params = {
|
||||
i2c_arm = {
|
||||
@@ -63,14 +71,14 @@ in
|
||||
options = {
|
||||
# https://www.raspberrypi.com/documentation/computers/config_txt.html#enable_uart
|
||||
# in conjunction with `console=serial0,115200` in kernel command line (`cmdline.txt`)
|
||||
# creates a serial console, accessible using GPIOs 14 and 15 (pins
|
||||
# creates a serial console, accessible using GPIOs 14 and 15 (pins
|
||||
# 8 and 10 on the 40-pin header)
|
||||
enable_uart = {
|
||||
enable = true;
|
||||
value = true;
|
||||
};
|
||||
# https://www.raspberrypi.com/documentation/computers/config_txt.html#uart_2ndstage
|
||||
# enable debug logging to the UART, also automatically enables
|
||||
# enable debug logging to the UART, also automatically enables
|
||||
# UART logging in `start.elf`
|
||||
uart_2ndstage = {
|
||||
enable = true;
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, namespace, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
user = "matt";
|
||||
# password = config.sops.secrets."pi4/matt-password".path;
|
||||
@@ -37,7 +43,7 @@ in
|
||||
nixpkgs = {
|
||||
overlays = lib.mkAfter [
|
||||
(self: super: {
|
||||
# This is used in (modulesPath + "/hardware/all-firmware.nix") when at least
|
||||
# This is used in (modulesPath + "/hardware/all-firmware.nix") when at least
|
||||
# enableRedistributableFirmware is enabled
|
||||
# I know no easier way to override this package
|
||||
inherit (kernelBundle) raspberrypiWirelessFirmware;
|
||||
|
||||
@@ -24,7 +24,7 @@ in
|
||||
settings.connectivity.uri = lib.mkDefault "http://nmcheck.gnome.org/check_network_status.txt";
|
||||
ensureProfiles = {
|
||||
environmentFiles = [
|
||||
config.sops.secrets.wifi.path
|
||||
config.sops.secrets.wifi.path
|
||||
];
|
||||
|
||||
profiles = {
|
||||
|
||||
@@ -5,10 +5,10 @@ in
|
||||
{
|
||||
sops = {
|
||||
defaultSopsFile = lib.mkForce ../../../secrets/pi4-secrets.yaml;
|
||||
# age = {
|
||||
# generateKey = true;
|
||||
# sshKeyPaths = [ "/etc/ssd/ssh_host_ed25519_key" ];
|
||||
# };
|
||||
# age = {
|
||||
# generateKey = true;
|
||||
# sshKeyPaths = [ "/etc/ssd/ssh_host_ed25519_key" ];
|
||||
# };
|
||||
age.keyFile = "/home/matt/.config/sops/age/keys.txt";
|
||||
validateSopsFiles = false;
|
||||
# ------------------------------
|
||||
|
||||
@@ -7,21 +7,22 @@ in
|
||||
loader.raspberry-pi.firmwarePackage = kernelBundle.raspberrypifw;
|
||||
kernelPackages = kernelBundle.linuxPackages_rpi5;
|
||||
};
|
||||
|
||||
|
||||
hardware.raspberry-pi.config = {
|
||||
all = { # [all] conditional filter, https://www.raspberrypi.com/documentation/computers/config_txt.html#conditional-filters
|
||||
all = {
|
||||
# [all] conditional filter, https://www.raspberrypi.com/documentation/computers/config_txt.html#conditional-filters
|
||||
|
||||
options = {
|
||||
# https://www.raspberrypi.com/documentation/computers/config_txt.html#enable_uart
|
||||
# in conjunction with `console=serial0,115200` in kernel command line (`cmdline.txt`)
|
||||
# creates a serial console, accessible using GPIOs 14 and 15 (pins
|
||||
# creates a serial console, accessible using GPIOs 14 and 15 (pins
|
||||
# 8 and 10 on the 40-pin header)
|
||||
enable_uart = {
|
||||
enable = true;
|
||||
value = true;
|
||||
};
|
||||
# https://www.raspberrypi.com/documentation/computers/config_txt.html#uart_2ndstage
|
||||
# enable debug logging to the UART, also automatically enables
|
||||
# enable debug logging to the UART, also automatically enables
|
||||
# UART logging in `start.elf`
|
||||
uart_2ndstage = {
|
||||
enable = true;
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, namespace, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
user = "matt";
|
||||
password = config.sops.secrets."pi5/matt-password".path;
|
||||
@@ -42,7 +48,7 @@ in
|
||||
nixpkgs = {
|
||||
overlays = lib.mkAfter [
|
||||
(self: super: {
|
||||
# This is used in (modulesPath + "/hardware/all-firmware.nix") when at least
|
||||
# This is used in (modulesPath + "/hardware/all-firmware.nix") when at least
|
||||
# enableRedistributableFirmware is enabled
|
||||
# I know no easier way to override this package
|
||||
inherit (kernelBundle) raspberrypiWirelessFirmware;
|
||||
@@ -53,13 +59,15 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
system.nixos.tags = let
|
||||
cfg = config.boot.loader.raspberry-pi;
|
||||
in [
|
||||
"raspberry-pi-${cfg.variant}"
|
||||
cfg.bootloader
|
||||
config.boot.kernelPackages.kernel.version
|
||||
];
|
||||
system.nixos.tags =
|
||||
let
|
||||
cfg = config.boot.loader.raspberry-pi;
|
||||
in
|
||||
[
|
||||
"raspberry-pi-${cfg.variant}"
|
||||
cfg.bootloader
|
||||
config.boot.kernelPackages.kernel.version
|
||||
];
|
||||
|
||||
systemd.services.btattach = {
|
||||
before = [ "bluetooth.service" ];
|
||||
@@ -90,7 +98,7 @@ in
|
||||
mutableUsers = false;
|
||||
users."${user}" = {
|
||||
isNormalUser = true;
|
||||
# hashedPasswordFile = password;
|
||||
# hashedPasswordFile = password;
|
||||
password = lib.mkForce "BogieDudie1";
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
|
||||
@@ -15,4 +15,4 @@ in
|
||||
allowPing = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user