cleanup
This commit is contained in:
@@ -4,9 +4,9 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (inputs) git-hooks-nix;
|
inherit (inputs) pre-commit-hooks-nix;
|
||||||
in
|
in
|
||||||
git-hooks-nix.lib.${pkgs.system}.run {
|
pre-commit-hooks-nix.lib.${pkgs.system}.run {
|
||||||
src = ../..;
|
src = ../..;
|
||||||
hooks = {
|
hooks = {
|
||||||
pre-commit-hook-ensure-sops.enable = true;
|
pre-commit-hook-ensure-sops.enable = true;
|
||||||
|
|||||||
317
flake.nix
317
flake.nix
@@ -85,183 +85,178 @@
|
|||||||
|
|
||||||
# We will handle this in the next section.
|
# We will handle this in the next section.
|
||||||
outputs = inputs:
|
outputs = inputs:
|
||||||
let
|
inputs.snowfall-lib.mkFlake {
|
||||||
snowfall = inputs.snowfall-lib.mkFlake {
|
# You must provide our flake inputs to Snowfall Lib.
|
||||||
# You must provide our flake inputs to Snowfall Lib.
|
inherit inputs;
|
||||||
inherit inputs;
|
|
||||||
|
|
||||||
# The `src` must be the root of the flake. See configuration
|
# The `src` must be the root of the flake. See configuration
|
||||||
# in the next section for information on how you can move your
|
# in the next section for information on how you can move your
|
||||||
# Nix files to a separate directory.
|
# Nix files to a separate directory.
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
# Add a module to a specific host.
|
# Add a module to a specific host.
|
||||||
systems = {
|
systems = {
|
||||||
# common modules
|
# common modules
|
||||||
modules.nixos = with inputs; [
|
modules.nixos = with inputs; [
|
||||||
authentik-nix.nixosModules.default
|
authentik-nix.nixosModules.default
|
||||||
chaotic.nixosModules.default
|
chaotic.nixosModules.default
|
||||||
crowdsec.nixosModules.crowdsec
|
crowdsec.nixosModules.crowdsec
|
||||||
crowdsec.nixosModules.crowdsec-firewall-bouncer
|
crowdsec.nixosModules.crowdsec-firewall-bouncer
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
impermanence.nixosModules.impermanence
|
impermanence.nixosModules.impermanence
|
||||||
lanzaboote.nixosModules.lanzaboote
|
lanzaboote.nixosModules.lanzaboote
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
];
|
];
|
||||||
|
|
||||||
# common darwin modules
|
# common darwin modules
|
||||||
modules.darwin = with inputs; [
|
modules.darwin = with inputs; [
|
||||||
nix-homebrew.darwinModules.nix-homebrew
|
nix-homebrew.darwinModules.nix-homebrew
|
||||||
home-manager.darwinModules.home-manager
|
home-manager.darwinModules.home-manager
|
||||||
];
|
];
|
||||||
|
|
||||||
# Host config
|
# Host config
|
||||||
hosts = {
|
hosts = {
|
||||||
# ######################################################
|
# ######################################################
|
||||||
# Desktop #
|
# Desktop #
|
||||||
# ######################################################
|
# ######################################################
|
||||||
desktop = {
|
desktop = {
|
||||||
modules = with inputs; [
|
|
||||||
nixos-hardware.nixosModules.common-cpu-amd
|
|
||||||
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
|
||||||
nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
|
||||||
nixos-hardware.nixosModules.common-gpu-amd
|
|
||||||
nixos-hardware.nixosModules.common-hidpi
|
|
||||||
nixos-hardware.nixosModules.common-pc
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# ######################################################
|
|
||||||
# NAS #
|
|
||||||
# ######################################################
|
|
||||||
nas = {
|
|
||||||
modules = with inputs; [
|
|
||||||
nixos-hardware.nixosModules.common-pc
|
|
||||||
nixos-hardware.nixosModules.common-cpu-amd
|
|
||||||
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
|
||||||
nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
|
||||||
nixos-hardware.nixosModules.common-hidpi
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
];
|
|
||||||
# overlays = with inputs; [ crowdsec.overlays.default ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# ######################################################
|
|
||||||
# Steamdeck #
|
|
||||||
# ######################################################
|
|
||||||
deck = {
|
|
||||||
modules = with inputs; [
|
|
||||||
disko.nixosModules.disko
|
|
||||||
jovian.nixosModules.jovian
|
|
||||||
nixos-hardware.nixosModules.common-cpu-amd
|
|
||||||
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
|
||||||
nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
|
||||||
nixos-hardware.nixosModules.common-gpu-amd
|
|
||||||
nixos-hardware.nixosModules.common-hidpi
|
|
||||||
nixos-hardware.nixosModules.common-pc
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# ######################################################
|
|
||||||
# NUC #
|
|
||||||
# ######################################################
|
|
||||||
nuc = {
|
|
||||||
modules = with inputs; [
|
|
||||||
disko.nixosModules.disko
|
|
||||||
nixos-hardware.nixosModules.common-cpu-amd
|
|
||||||
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
|
||||||
nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
|
||||||
nixos-hardware.nixosModules.common-gpu-amd
|
|
||||||
nixos-hardware.nixosModules.common-hidpi
|
|
||||||
nixos-hardware.nixosModules.common-pc
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# ######################################################
|
|
||||||
# Pi4 #
|
|
||||||
# ######################################################
|
|
||||||
pi4 = {
|
|
||||||
modules = with inputs; [
|
|
||||||
disko.nixosModules.disko
|
|
||||||
nixos-raspberrypi.nixosModules.raspberry-pi-4.base
|
|
||||||
nixos-raspberrypi.nixosModules.raspberry-pi-4.display-vc4
|
|
||||||
nixos-raspberrypi.lib.inject-overlays
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# ######################################################
|
|
||||||
# Pi5 #
|
|
||||||
# ######################################################
|
|
||||||
pi5 = {
|
|
||||||
modules = with inputs; [
|
|
||||||
disko.nixosModules.disko
|
|
||||||
nixos-raspberrypi.nixosModules.raspberry-pi-5.base
|
|
||||||
nixos-raspberrypi.nixosModules.raspberry-pi-5.display-vc4
|
|
||||||
nixos-raspberrypi.nixosModules.raspberry-pi-5.bluetooth
|
|
||||||
nixos-raspberrypi.lib.inject-overlays
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# ######################################################
|
|
||||||
# Mac #
|
|
||||||
# ######################################################
|
|
||||||
macbook-pro-nixos = {
|
|
||||||
modules = with inputs; [
|
|
||||||
nixos-apple-silicon.nixosModules.default
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
overlays = with inputs; [ nix-vscode-extensions.overlays.default ];
|
|
||||||
|
|
||||||
homes = {
|
|
||||||
modules = with inputs; [
|
modules = with inputs; [
|
||||||
nix-index-database.homeModules.nix-index
|
nixos-hardware.nixosModules.common-cpu-amd
|
||||||
sops-nix.homeManagerModules.sops
|
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||||
|
nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||||
|
nixos-hardware.nixosModules.common-gpu-amd
|
||||||
|
nixos-hardware.nixosModules.common-hidpi
|
||||||
|
nixos-hardware.nixosModules.common-pc
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
overlays = with inputs; [
|
# ######################################################
|
||||||
nix-vscode-extensions.overlays.default
|
# NAS #
|
||||||
|
# ######################################################
|
||||||
|
nas = {
|
||||||
|
modules = with inputs; [
|
||||||
|
nixos-hardware.nixosModules.common-pc
|
||||||
|
nixos-hardware.nixosModules.common-cpu-amd
|
||||||
|
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||||
|
nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||||
|
nixos-hardware.nixosModules.common-hidpi
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
];
|
];
|
||||||
|
# overlays = with inputs; [ crowdsec.overlays.default ];
|
||||||
|
};
|
||||||
|
|
||||||
users = {
|
# ######################################################
|
||||||
# "matt@desktop" = {
|
# Steamdeck #
|
||||||
# modules = with inputs; [
|
# ######################################################
|
||||||
# sops-nix.homeManagerModules.sops
|
steamdeck = {
|
||||||
# ];
|
modules = with inputs; [
|
||||||
# };
|
disko.nixosModules.disko
|
||||||
"deck@deck" = {
|
jovian.nixosModules.jovian
|
||||||
modules = with inputs; [
|
nixos-hardware.nixosModules.common-cpu-amd
|
||||||
steam-rom-manager.homeManagerModules.default
|
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||||
];
|
nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||||
};
|
nixos-hardware.nixosModules.common-gpu-amd
|
||||||
|
nixos-hardware.nixosModules.common-hidpi
|
||||||
|
nixos-hardware.nixosModules.common-pc
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# ######################################################
|
||||||
|
# NUC #
|
||||||
|
# ######################################################
|
||||||
|
nuc = {
|
||||||
|
modules = with inputs; [
|
||||||
|
disko.nixosModules.disko
|
||||||
|
nixos-hardware.nixosModules.common-cpu-amd
|
||||||
|
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||||
|
nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||||
|
nixos-hardware.nixosModules.common-gpu-amd
|
||||||
|
nixos-hardware.nixosModules.common-hidpi
|
||||||
|
nixos-hardware.nixosModules.common-pc
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# ######################################################
|
||||||
|
# Pi4 #
|
||||||
|
# ######################################################
|
||||||
|
pi4 = {
|
||||||
|
modules = with inputs; [
|
||||||
|
disko.nixosModules.disko
|
||||||
|
nixos-raspberrypi.nixosModules.raspberry-pi-4.base
|
||||||
|
nixos-raspberrypi.nixosModules.raspberry-pi-4.display-vc4
|
||||||
|
nixos-raspberrypi.lib.inject-overlays
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# ######################################################
|
||||||
|
# Pi5 #
|
||||||
|
# ######################################################
|
||||||
|
pi5 = {
|
||||||
|
modules = with inputs; [
|
||||||
|
disko.nixosModules.disko
|
||||||
|
nixos-raspberrypi.nixosModules.raspberry-pi-5.base
|
||||||
|
nixos-raspberrypi.nixosModules.raspberry-pi-5.display-vc4
|
||||||
|
nixos-raspberrypi.nixosModules.raspberry-pi-5.bluetooth
|
||||||
|
nixos-raspberrypi.lib.inject-overlays
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# ######################################################
|
||||||
|
# Mac #
|
||||||
|
# ######################################################
|
||||||
|
macbook-pro-nixos = {
|
||||||
|
modules = with inputs; [
|
||||||
|
nixos-apple-silicon.nixosModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
overlays = with inputs; [ nix-vscode-extensions.overlays.default ];
|
||||||
|
|
||||||
|
homes = {
|
||||||
|
modules = with inputs; [
|
||||||
|
nix-index-database.homeModules.nix-index
|
||||||
|
sops-nix.homeManagerModules.sops
|
||||||
|
];
|
||||||
|
|
||||||
|
overlays = with inputs; [
|
||||||
|
nix-vscode-extensions.overlays.default
|
||||||
|
];
|
||||||
|
|
||||||
|
users = {
|
||||||
|
# "matt@desktop" = {
|
||||||
|
# modules = with inputs; [
|
||||||
|
# sops-nix.homeManagerModules.sops
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
"deck@steamdeck" = {
|
||||||
|
modules = with inputs; [
|
||||||
|
steam-rom-manager.homeManagerModules.default
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Configure Snowfall Lib, all of these settings are optional.
|
# Configure Snowfall Lib, all of these settings are optional.
|
||||||
snowfall = {
|
snowfall = {
|
||||||
# Choose a namespace to use for your flake's packages, library,
|
# Choose a namespace to use for your flake's packages, library,
|
||||||
# and overlays.
|
# and overlays.
|
||||||
namespace = "mjallen";
|
namespace = "mjallen";
|
||||||
|
|
||||||
# Add flake metadata that can be processed by tools like Snowfall Frost.
|
# Add flake metadata that can be processed by tools like Snowfall Frost.
|
||||||
meta = {
|
meta = {
|
||||||
# A slug to use in documentation when displaying things like file paths.
|
# A slug to use in documentation when displaying things like file paths.
|
||||||
name = "mjallen";
|
name = "mjallen";
|
||||||
|
|
||||||
# A title to show for your flake, typically the name.
|
# A title to show for your flake, typically the name.
|
||||||
title = "mjallen Flake";
|
title = "mjallen Flake";
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs-builder = channels: {
|
|
||||||
formatter = inputs.treefmt-nix.lib.mkWrapper channels.nixpkgs ./treefmt.nix;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
|
||||||
snowfall // {
|
outputs-builder = channels: {
|
||||||
nixosConfigurations = snowfall.nixosConfigurations;
|
formatter = inputs.treefmt-nix.lib.mkWrapper channels.nixpkgs ./treefmt.nix;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@@ -372,7 +372,7 @@ in
|
|||||||
${defaultBorderRadius}
|
${defaultBorderRadius}
|
||||||
${defaultCenterOptions}
|
${defaultCenterOptions}
|
||||||
margin-left: 4rem;
|
margin-left: 4rem;
|
||||||
margin-right: ${cfg.css.window.margin-right}rem;
|
margin-right: 400rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make window module transparent when no windows present */
|
/* make window module transparent when no windows present */
|
||||||
|
|||||||
@@ -4,8 +4,12 @@
|
|||||||
options,
|
options,
|
||||||
namespace,
|
namespace,
|
||||||
inputs,
|
inputs,
|
||||||
|
system,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
isArm = ("aarch64-linux" == system);
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
options.${namespace}.home = with lib.types; {
|
options.${namespace}.home = with lib.types; {
|
||||||
@@ -49,9 +53,8 @@
|
|||||||
# Make ALL external HM modules available globally
|
# Make ALL external HM modules available globally
|
||||||
sharedModules = with inputs; [
|
sharedModules = with inputs; [
|
||||||
sops-nix.homeManagerModules.sops
|
sops-nix.homeManagerModules.sops
|
||||||
steam-rom-manager.homeManagerModules.default
|
|
||||||
# Add any other external HM modules here
|
# Add any other external HM modules here
|
||||||
];
|
] ++ (if (!isArm) then with inputs; [ steam-rom-manager.homeManagerModules.default ] else [ ]);
|
||||||
|
|
||||||
users.${config.${namespace}.user.name} = lib.mkAliasDefinitions options.${namespace}.home.extraOptions;
|
users.${config.${namespace}.user.name} = lib.mkAliasDefinitions options.${namespace}.home.extraOptions;
|
||||||
# users.admin = lib.mkAliasDefinitions options.${namespace}.home.extraOptions;
|
# users.admin = lib.mkAliasDefinitions options.${namespace}.home.extraOptions;
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ in
|
|||||||
"${user}" = {
|
"${user}" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
# hashedPasswordFile = password;
|
# hashedPasswordFile = password;
|
||||||
password = "BogieDudie1";
|
password = lib.mkForce "BogieDudie1";
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
"docker"
|
"docker"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
user = "matt";
|
user = "matt";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
sops = {
|
sops = {
|
||||||
defaultSopsFile = ../../../secrets/pi4-secrets.yaml;
|
defaultSopsFile = lib.mkForce ../../../secrets/pi4-secrets.yaml;
|
||||||
# age = {
|
# age = {
|
||||||
# generateKey = true;
|
# generateKey = true;
|
||||||
# sshKeyPaths = [ "/etc/ssd/ssh_host_ed25519_key" ];
|
# sshKeyPaths = [ "/etc/ssd/ssh_host_ed25519_key" ];
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ in
|
|||||||
users."${user}" = {
|
users."${user}" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
# hashedPasswordFile = password;
|
# hashedPasswordFile = password;
|
||||||
password = "BogieDudie1";
|
password = lib.mkForce "BogieDudie1";
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
"docker"
|
"docker"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
user = "matt";
|
user = "matt";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
sops = {
|
sops = {
|
||||||
defaultSopsFile = ../../../secrets/pi5-secrets.yaml;
|
defaultSopsFile = lib.mkForce ../../../secrets/pi5-secrets.yaml;
|
||||||
# age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
# age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
age.keyFile = "/home/matt/.config/sops/age/keys.txt";
|
age.keyFile = "/home/matt/.config/sops/age/keys.txt";
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ in
|
|||||||
# Either the group id or group name representation of the secret group
|
# Either the group id or group name representation of the secret group
|
||||||
# It is recommended to get the group name from `config.users.users.<?name>.group` to avoid misconfiguration
|
# It is recommended to get the group name from `config.users.users.<?name>.group` to avoid misconfiguration
|
||||||
sops = {
|
sops = {
|
||||||
defaultSopsFile = desktopSopsFile;
|
defaultSopsFile = lib.mkForce desktopSopsFile; # todo
|
||||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{ config, namespace, ... }:
|
{ config, namespace, lib, ... }:
|
||||||
let
|
let
|
||||||
passwordFile = config.sops.secrets."desktop/matt_password".path;
|
passwordFile = config.sops.secrets."desktop/matt_password".path;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
${namespace}.user = {
|
${namespace}.user = {
|
||||||
passwordFile = passwordFile;
|
passwordFile = lib.mkForce passwordFile;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
user = "nix-apps";
|
user = "nix-apps";
|
||||||
in
|
in
|
||||||
@@ -18,7 +18,7 @@ in
|
|||||||
# Either the group id or group name representation of the secret group
|
# Either the group id or group name representation of the secret group
|
||||||
# It is recommended to get the group name from `config.users.users.<?name>.group` to avoid misconfiguration
|
# It is recommended to get the group name from `config.users.users.<?name>.group` to avoid misconfiguration
|
||||||
sops = {
|
sops = {
|
||||||
defaultSopsFile = ../../../secrets/nas-secrets.yaml;
|
defaultSopsFile = lib.mkForce ../../../secrets/nas-secrets.yaml;
|
||||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, config, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
let
|
let
|
||||||
user = "admin";
|
user = "admin";
|
||||||
passwordFile = config.sops.secrets."jallen-nas/admin_password".path;
|
passwordFile = config.sops.secrets."jallen-nas/admin_password".path;
|
||||||
@@ -31,7 +31,7 @@ in
|
|||||||
"62900"
|
"62900"
|
||||||
"1001"
|
"1001"
|
||||||
];
|
];
|
||||||
hashedPasswordFile = passwordFile;
|
hashedPasswordFile = lib.mkForce passwordFile;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
cachix
|
cachix
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
user = "nix-apps";
|
user = "nix-apps";
|
||||||
in
|
in
|
||||||
@@ -18,7 +18,7 @@ in
|
|||||||
# Either the group id or group name representation of the secret group
|
# Either the group id or group name representation of the secret group
|
||||||
# It is recommended to get the group name from `config.users.users.<?name>.group` to avoid misconfiguration
|
# It is recommended to get the group name from `config.users.users.<?name>.group` to avoid misconfiguration
|
||||||
sops = {
|
sops = {
|
||||||
defaultSopsFile = ../../../secrets/nuc-secrets.yaml;
|
defaultSopsFile = lib.mkForce ../../../secrets/nuc-secrets.yaml;
|
||||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, config, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
user = "admin";
|
user = "admin";
|
||||||
# passwordFile = config.sops.secrets."jallen-nas/admin_password".path;
|
# passwordFile = config.sops.secrets."jallen-nas/admin_password".path;
|
||||||
@@ -22,7 +22,7 @@ in
|
|||||||
"libvirtd"
|
"libvirtd"
|
||||||
];
|
];
|
||||||
# hashedPasswordFile = passwordFile;
|
# hashedPasswordFile = passwordFile;
|
||||||
password = "BogieDudie1";
|
password = lib.mkForce "BogieDudie1";
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -30,9 +30,7 @@
|
|||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.users = {
|
users.users = {
|
||||||
deck = {
|
deck = {
|
||||||
hashedPasswordFile = config.sops.secrets."steamdeck/deck-password".path;
|
hashedPasswordFile = lib.mkForce config.sops.secrets."steamdeck/deck-password".path;
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
# macBook
|
# macBook
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCw9zq8DLGByI5v2gAn95hKNyOsm3g61a2buxu2BBMFysQJgmZPCCLUqRJKhSM5Vm/JOgsAmdpRBRZQoHD+6S844CJHb4v4VIbjkyQgYCuM7Rst2IOZ5QybvsA2/D0nwytZ+HXQqDj2AagUYDbz0gyyIHkDQ5YGBMkvkWz/h1Vci6aoBM7VihEDM4KlWoTVuPeASGM8r5IZ2FS83Djbqo4ov6AYvLMrKB9Z7hmFgH6R3LE0gxOkzbGVXtSuvJyrjvgytoT22UhATjjxSQ9D+YJXXkQoB3lUdg8OoIquUPjMZpl4mR8ffvseWPfcvD1XlD5t+TOHFqKpESO547tlOBYhdpew+NSgAXpamCU6oyV8tDCywLQu2ucxHRn78u6WXzWHkDtffdhzmk6TZaPhWqVHuTGjR4higBgGqUfSaKOMszt+FDRZAr3HtuQ2+zJ8bowK9fW5OqilTtK2HtQqroD9ApegDNbqOz6kGy5IycSXvqPURy/M4lxZxbtBPuemcJs= mattjallen@MacBook-Pro.local"
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCw9zq8DLGByI5v2gAn95hKNyOsm3g61a2buxu2BBMFysQJgmZPCCLUqRJKhSM5Vm/JOgsAmdpRBRZQoHD+6S844CJHb4v4VIbjkyQgYCuM7Rst2IOZ5QybvsA2/D0nwytZ+HXQqDj2AagUYDbz0gyyIHkDQ5YGBMkvkWz/h1Vci6aoBM7VihEDM4KlWoTVuPeASGM8r5IZ2FS83Djbqo4ov6AYvLMrKB9Z7hmFgH6R3LE0gxOkzbGVXtSuvJyrjvgytoT22UhATjjxSQ9D+YJXXkQoB3lUdg8OoIquUPjMZpl4mR8ffvseWPfcvD1XlD5t+TOHFqKpESO547tlOBYhdpew+NSgAXpamCU6oyV8tDCywLQu2ucxHRn78u6WXzWHkDtffdhzmk6TZaPhWqVHuTGjR4higBgGqUfSaKOMszt+FDRZAr3HtuQ2+zJ8bowK9fW5OqilTtK2HtQqroD9ApegDNbqOz6kGy5IycSXvqPURy/M4lxZxbtBPuemcJs= mattjallen@MacBook-Pro.local"
|
||||||
@@ -41,11 +39,6 @@
|
|||||||
# desktop nixos
|
# desktop nixos
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPTBMydhOc6SnOdB5WrEd7X07DrboAtagCUgXiOJjLov matt@matt-nixos"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPTBMydhOc6SnOdB5WrEd7X07DrboAtagCUgXiOJjLov matt@matt-nixos"
|
||||||
];
|
];
|
||||||
packages = with pkgs; [
|
|
||||||
firefox
|
|
||||||
tree
|
|
||||||
];
|
|
||||||
shell = lib.mkForce pkgs.zsh;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -34,5 +34,6 @@
|
|||||||
user = {
|
user = {
|
||||||
name = "deck";
|
name = "deck";
|
||||||
};
|
};
|
||||||
|
network.hostName = "steamdeck";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -18,7 +18,7 @@ in
|
|||||||
# Either the group id or group name representation of the secret group
|
# Either the group id or group name representation of the secret group
|
||||||
# It is recommended to get the group name from `config.users.users.<?name>.group` to avoid misconfiguration
|
# It is recommended to get the group name from `config.users.users.<?name>.group` to avoid misconfiguration
|
||||||
sops = {
|
sops = {
|
||||||
defaultSopsFile = (lib.snowfall.fs.get-file "secrets/steamdeck-secrets.yaml");
|
defaultSopsFile = lib.mkForce (lib.snowfall.fs.get-file "secrets/steamdeck-secrets.yaml");
|
||||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
{
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
namespace,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
inherit (inputs) pre-commit-hooks-nix;
|
|
||||||
in
|
|
||||||
pre-commit-hooks-nix.lib.${pkgs.system}.run {
|
|
||||||
src = ./.;
|
|
||||||
hooks =
|
|
||||||
let
|
|
||||||
excludes = [
|
|
||||||
"flake.lock"
|
|
||||||
"*.md"
|
|
||||||
];
|
|
||||||
fail_fast = true;
|
|
||||||
verbose = true;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
deadnix = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
edit = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nixfmt = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.nixfmt-rfc-style;
|
|
||||||
};
|
|
||||||
|
|
||||||
pre-commit-hook-ensure-sops.enable = true;
|
|
||||||
|
|
||||||
prettier = {
|
|
||||||
enable = true;
|
|
||||||
inherit excludes fail_fast verbose;
|
|
||||||
|
|
||||||
description = "pre-commit hook for prettier";
|
|
||||||
settings = {
|
|
||||||
binPath = "${lib.getExe pkgs.prettierd}";
|
|
||||||
write = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
gofmt.enable = true;
|
gofmt.enable = true;
|
||||||
isort.enable = true;
|
isort.enable = true;
|
||||||
nixfmt.enable = true;
|
nixfmt.enable = true;
|
||||||
nufmt.enable = true;
|
# nufmt.enable = true;
|
||||||
ruff-check.enable = true;
|
ruff-check.enable = true;
|
||||||
ruff-format.enable = true;
|
ruff-format.enable = true;
|
||||||
rustfmt.enable = true;
|
rustfmt.enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user