chore: hack hack hack
This commit is contained in:
parent
e5311a77b4
commit
3416303a07
11 changed files with 116 additions and 26 deletions
|
@ -107,7 +107,6 @@
|
|||
];
|
||||
profileModules = [
|
||||
./nixos/profiles/role-worstation.nix
|
||||
|
||||
];
|
||||
|
||||
};
|
||||
|
@ -165,6 +164,8 @@
|
|||
in
|
||||
{
|
||||
dns01 = mkDeployConfig "10.8.10.11" self.nixosConfigurations.dns01;
|
||||
rickenbacker = mkDeployConfig "rickenbacker" self.nixosConfigurations.rickenbacker;
|
||||
|
||||
# dns02 = mkDeployConfig "dns02.natallan.com" self.nixosConfigurations.dns02;
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
imports = [
|
||||
|
||||
# Common imports
|
||||
../common/nixos/users/truxnell
|
||||
../common/optional/fish.nix
|
||||
../common/optional/gnome.nix
|
||||
../common/optional/editors/vscode
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
imports = [
|
||||
|
||||
# Common imports
|
||||
../common/nixos/users/truxnell
|
||||
../common/optional/fish.nix
|
||||
../common/optional/gnome.nix
|
||||
../common/optional/editors/vscode
|
||||
|
|
|
@ -6,4 +6,4 @@ The main goal is to build up a `mySystem` options key which is easy to read and
|
|||
|
||||
This option key will largely be manipulated by a profile to build up a host to a base, then toggle specific options from there.
|
||||
|
||||
I will _try_ and only do modules for things I want to be able to configure, and just use nixos config directly for some simple static things.
|
||||
I will _try_ and only do modules for things I want to be able to configure, and just use nixos config directly for some simple static things.
|
26
nixos/modules/nixos/system/systempackages.nix
Normal file
26
nixos/modules/nixos/system/systempackages.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ lib
|
||||
, config
|
||||
, self
|
||||
, ...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mySystem.system;
|
||||
in
|
||||
{
|
||||
options.mySystem.system.packages = {
|
||||
autoOptimiseStore = mkOption
|
||||
{
|
||||
type = lib.types.list;
|
||||
description = "List of system level package installs";
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
# System packages deployed globally.
|
||||
# This is NixOS so lets keep this liiight?
|
||||
# Ideally i'd keep most of it to home-manager user only stuff
|
||||
# and keep server role as light as possible
|
||||
config.environment.system.packages = cfg.packages;
|
||||
|
||||
}
|
|
@ -14,6 +14,10 @@ with lib;
|
|||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix") # Generated by nixos-config-generate
|
||||
./global/nix.nix
|
||||
./global/users.nix
|
||||
./global/sops.nix
|
||||
./global/nixpkgs.nix
|
||||
./global/system.nix
|
||||
];
|
||||
|
||||
mySystem = {
|
||||
|
@ -32,26 +36,12 @@ with lib;
|
|||
# SOPS settings
|
||||
# https://github.com/Mic92/sops-nix
|
||||
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
|
||||
|
||||
nixpkgs = {
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
system = {
|
||||
# Enable printing changes on nix build etc with nvd
|
||||
activationScripts.report-changes = ''
|
||||
PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]}
|
||||
nvd diff $(ls -dv /nix/var/nix/profiles/system-*-link | tail -2)
|
||||
'';
|
||||
# Do not change unless you know what you are doing
|
||||
stateVersion = "23.11"; # THERE BE DRAGONS
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
|
|
|
@ -1,8 +1,23 @@
|
|||
{ lib, config, ... }:
|
||||
{ lib, config, pkgs, nixpkgs, ... }:
|
||||
{
|
||||
|
||||
## Below is to align shell/system to flake's nixpkgs
|
||||
## ref: https://nixos-and-flakes.thiscute.world/best-practices/nix-path-and-flake-registry
|
||||
|
||||
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
nix.channel.enable = false; # remove nix-channel related tools & configs, we use flakes instead.
|
||||
|
||||
# but NIX_PATH is still used by many useful tools, so we set it to the same value as the one used by this flake.
|
||||
# Make `nix repl '<nixpkgs>'` use the same nixpkgs as the one used by this flake.
|
||||
environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}";
|
||||
# https://github.com/NixOS/nix/issues/9574
|
||||
nix.settings.nix-path = lib.mkForce "nixpkgs=/etc/nix/inputs/nixpkgs";
|
||||
|
||||
###
|
||||
|
||||
nix.settings = {
|
||||
|
||||
# Enable flakes
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
|
@ -35,7 +50,4 @@
|
|||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
10
nixos/profiles/global/nixpkgs.nix
Normal file
10
nixos/profiles/global/nixpkgs.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
nixpkgs = {
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
}
|
6
nixos/profiles/global/sops.nix
Normal file
6
nixos/profiles/global/sops.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
|
||||
}
|
47
nixos/profiles/global/system.nix
Normal file
47
nixos/profiles/global/system.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
{
|
||||
system = {
|
||||
# Enable printing changes on nix build etc with nvd
|
||||
activationScripts.report-changes = ''
|
||||
PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]}
|
||||
nvd diff $(ls -dv /nix/var/nix/profiles/system-*-link | tail -2)
|
||||
'';
|
||||
|
||||
# Do not change unless you know what you are doing
|
||||
stateVersion = "23.11"; # THERE BE DRAGONS
|
||||
|
||||
# (This one comes in the niiiiight) :::
|
||||
# :: :::.
|
||||
# \/, .:::::
|
||||
# \), \`-._ :::888
|
||||
# /\ \ `-. ::88888
|
||||
# / \ | .( ::88
|
||||
# /,. \ ; ( ` .:8888
|
||||
# ), \ / ;`` :::888
|
||||
# /_ \ __/_(_ :88
|
||||
# `. ,`..-' `-._ \ / :8
|
||||
# )__ `. `._ .\/.
|
||||
# / `. ` `-._______m _,
|
||||
# ,-=====-.-;' , ___________/ _,-_,'"`/__,-.
|
||||
# C =-- ; `.`._ V V V -=-'"#==-._
|
||||
# :, \ ,| UuUu _,......__ `-.__A_A_ -. ._ ,--._ ",`` `-
|
||||
# || |`---' : uUuUu,' `'--...____/ `" `". `
|
||||
# |` : \ UuUu:
|
||||
# : / \ UuUu`-._
|
||||
# \(_ `._ uUuUu `-.
|
||||
# (_3 `._ uUu `._
|
||||
# ``-._ `.
|
||||
# `-._ `.
|
||||
# `. \
|
||||
# ) ;
|
||||
# / /
|
||||
# `. |\ ,' /
|
||||
# ",_A_/\-| ` ,'
|
||||
# `--..,_|_,-'\
|
||||
# | \
|
||||
# | \__
|
||||
# |__
|
||||
|
||||
};
|
||||
}
|
|
@ -25,7 +25,7 @@ in
|
|||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMZS9J1ydflZ4iJdJgO8+vnN8nNSlEwyn9tbWU9OcysW truxnell@home"
|
||||
];
|
||||
|
||||
packages = [ pkgs.home-manager ];
|
||||
# packages = [ pkgs.home-manager ];
|
||||
};
|
||||
|
||||
# home-manager.users.taylor = import ../../../../../home-manager/taylor_${config.networking.hostName}.nix; TODO home-manager?
|
Reference in a new issue