update h003 to latest module based mode
This commit is contained in:
parent
ca60f182e3
commit
c0ed047bae
2 changed files with 85 additions and 62 deletions
|
|
@ -10,7 +10,7 @@
|
||||||
oauth2-proxy-nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
oauth2-proxy-nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
pinchflat-nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
pinchflat-nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
# Use relative to get current version for testin
|
# Use relative to get current version for testing
|
||||||
# common.url = "path:../../flakes/common";
|
# common.url = "path:../../flakes/common";
|
||||||
common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/common";
|
common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/common";
|
||||||
# secrets.url = "path:../../flakes/secrets";
|
# secrets.url = "path:../../flakes/secrets";
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||||
|
home-manager.url = "github:rycee/home-manager/release-25.05";
|
||||||
|
|
||||||
# Use relative to get current version for testing
|
# Use relative to get current version for testing
|
||||||
# common.url = "path:../../common";
|
# common.url = "path:../../flakes/common";
|
||||||
common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles";
|
common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/common";
|
||||||
|
# secrets.url = "path:../../flakes/secrets";
|
||||||
|
secrets.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/secrets";
|
||||||
|
|
||||||
ros_neovim.url = "git+https://git.joshuabell.xyz/ringofstorms/nvim";
|
ros_neovim.url = "git+https://git.joshuabell.xyz/ringofstorms/nvim";
|
||||||
};
|
};
|
||||||
|
|
@ -12,89 +15,109 @@
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
home-manager,
|
||||||
common,
|
common,
|
||||||
|
secrets,
|
||||||
ros_neovim,
|
ros_neovim,
|
||||||
...
|
...
|
||||||
}:
|
}@inputs:
|
||||||
let
|
let
|
||||||
configuration_name = "h003";
|
configuration_name = "h003";
|
||||||
|
system = "x86_64-linux";
|
||||||
|
stateVersion = "24.11";
|
||||||
|
primaryUser = "luser";
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
"${configuration_name}" = (
|
"${configuration_name}" = (
|
||||||
lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
common.nixosModules.default
|
home-manager.nixosModules.default
|
||||||
|
|
||||||
|
secrets.nixosModules.default
|
||||||
ros_neovim.nixosModules.default
|
ros_neovim.nixosModules.default
|
||||||
|
|
||||||
|
common.nixosModules.essentials
|
||||||
|
common.nixosModules.git
|
||||||
|
common.nixosModules.boot_systemd
|
||||||
|
common.nixosModules.hardening
|
||||||
|
common.nixosModules.nix_options
|
||||||
|
common.nixosModules.podman
|
||||||
|
common.nixosModules.tailnet
|
||||||
|
common.nixosModules.timezone_auto
|
||||||
|
common.nixosModules.tty_caps_esc
|
||||||
|
common.nixosModules.zsh
|
||||||
|
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./mods
|
./mods
|
||||||
(
|
(
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
rec {
|
||||||
environment.systemPackages = with pkgs; [
|
# Home Manager
|
||||||
lua
|
home-manager = {
|
||||||
sqlite
|
useUserPackages = true;
|
||||||
# networking tools
|
useGlobalPkgs = true;
|
||||||
tcpdump
|
backupFileExtension = "bak";
|
||||||
dig
|
# add all normal users to home manager so it applies to them
|
||||||
];
|
users = lib.mapAttrs (name: user: {
|
||||||
|
home.stateVersion = stateVersion;
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}) (lib.filterAttrs (name: user: user.isNormalUser or false) users.users);
|
||||||
|
|
||||||
ringofstorms_common = {
|
sharedModules = [
|
||||||
systemName = configuration_name;
|
common.homeManagerModules.tmux
|
||||||
boot.systemd.enable = true;
|
common.homeManagerModules.atuin
|
||||||
secrets.enable = true;
|
common.homeManagerModules.direnv
|
||||||
general = {
|
common.homeManagerModules.git
|
||||||
reporting.enable = true;
|
common.homeManagerModules.postgres_cli_options
|
||||||
};
|
common.homeManagerModules.ssh
|
||||||
programs = {
|
common.homeManagerModules.starship
|
||||||
tailnet.enable = true;
|
common.homeManagerModules.zoxide
|
||||||
ssh.enable = true;
|
common.homeManagerModules.zsh
|
||||||
podman.enable = true;
|
|
||||||
};
|
|
||||||
users = {
|
|
||||||
admins = [ "luser" ]; # First admin is also the primary user owning nix config
|
|
||||||
users = {
|
|
||||||
root = {
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA3riAQ8RP5JXj2eO87JpjbM/9SrfFHcN5pEJwQpRcOl nix2h003"
|
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# System configuration
|
||||||
|
system.stateVersion = stateVersion;
|
||||||
|
networking.hostName = configuration_name;
|
||||||
|
programs.nh.flake = "/home/${primaryUser}/.config/nixos-config/hosts/${configuration_name}";
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
users.users = {
|
||||||
|
"${primaryUser}" = {
|
||||||
|
isNormalUser = true;
|
||||||
|
initialPassword = "password1";
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
|
||||||
luser = {
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA3riAQ8RP5JXj2eO87JpjbM/9SrfFHcN5pEJwQpRcOl nix2h003"
|
|
||||||
];
|
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"video"
|
"video"
|
||||||
"input"
|
"input"
|
||||||
];
|
];
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA3riAQ8RP5JXj2eO87JpjbM/9SrfFHcN5pEJwQpRcOl nix2h003"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
root = {
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
openssh.authorizedKeys.keys = [
|
||||||
};
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA3riAQ8RP5JXj2eO87JpjbM/9SrfFHcN5pEJwQpRcOl nix2h003"
|
||||||
};
|
|
||||||
homeManager = {
|
|
||||||
users = {
|
|
||||||
luser = {
|
|
||||||
imports = with common.homeManagerModules; [
|
|
||||||
kitty
|
|
||||||
tmux
|
|
||||||
atuin
|
|
||||||
direnv
|
|
||||||
git
|
|
||||||
nix_deprecations
|
|
||||||
postgres
|
|
||||||
ssh
|
|
||||||
starship
|
|
||||||
zoxide
|
|
||||||
zsh
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
environment.systemPackages = with pkgs; [
|
||||||
|
lua
|
||||||
|
sqlite
|
||||||
|
ttyd
|
||||||
|
tcpdump
|
||||||
|
dig
|
||||||
|
];
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue