l001 upgraded to new flake modules
This commit is contained in:
parent
49afd98290
commit
f633888c3a
3 changed files with 86 additions and 293 deletions
|
|
@ -3,20 +3,29 @@
|
|||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||
home-manager.url = "github:rycee/home-manager/release-24.11";
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?rev=39edfefa5871d07c9f88ce92a55995eb347d9b09";
|
||||
common.inputs.home-manager.follows = "home-manager";
|
||||
|
||||
# common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?rev=39edfefa5871d07c9f88ce92a55995eb347d9b09";
|
||||
# common.inputs.home-manager.follows = "home-manager";
|
||||
|
||||
# Use relative to get current version for testing
|
||||
# common.url = "path:../../flakes/common";
|
||||
common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/common";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
common,
|
||||
deploy-rs,
|
||||
...
|
||||
}:
|
||||
}@inputs:
|
||||
let
|
||||
configuration_name = "l001";
|
||||
system = "x86_64-linux";
|
||||
stateVersion = "24.11";
|
||||
primaryUser = "root";
|
||||
lib = nixpkgs.lib;
|
||||
in
|
||||
{
|
||||
|
|
@ -38,51 +47,59 @@
|
|||
nixosConfigurations = {
|
||||
"${configuration_name}" = (
|
||||
lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
common.nixosModules.default
|
||||
./configuration.nix
|
||||
home-manager.nixosModules.default
|
||||
|
||||
common.nixosModules.essentials
|
||||
common.nixosModules.git
|
||||
common.nixosModules.hardening
|
||||
common.nixosModules.nix_options
|
||||
common.nixosModules.zsh
|
||||
|
||||
./hardware-configuration.nix
|
||||
./linode.nix
|
||||
./nginx.nix
|
||||
./headscale.nix
|
||||
(
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
ringofstorms_common = {
|
||||
systemName = configuration_name;
|
||||
general = {
|
||||
disableRemoteBuildsOnLio = true;
|
||||
readWindowsDrives = false;
|
||||
jetbrainsMonoFont = false;
|
||||
ttyCapsEscape = false;
|
||||
};
|
||||
programs = {
|
||||
ssh.enable = true;
|
||||
};
|
||||
users = {
|
||||
users = {
|
||||
root = {
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJuo6L6V52AzdQIK6fWW9s0aX1yKUUTXbPd8v8IU9p2o nix2linode"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
};
|
||||
};
|
||||
homeManager = {
|
||||
users = {
|
||||
root = {
|
||||
imports = with common.homeManagerModules; [
|
||||
tmux
|
||||
atuin
|
||||
git
|
||||
postgres
|
||||
starship
|
||||
zoxide
|
||||
zsh
|
||||
];
|
||||
};
|
||||
};
|
||||
rec {
|
||||
# Home Manager
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
backupFileExtension = "bak";
|
||||
# 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);
|
||||
|
||||
sharedModules = [
|
||||
common.homeManagerModules.tmux
|
||||
common.homeManagerModules.atuin
|
||||
common.homeManagerModules.git
|
||||
common.homeManagerModules.postgres_cli_options
|
||||
common.homeManagerModules.starship
|
||||
common.homeManagerModules.zoxide
|
||||
common.homeManagerModules.zsh
|
||||
];
|
||||
};
|
||||
|
||||
# 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}" = {
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJuo6L6V52AzdQIK6fWW9s0aX1yKUUTXbPd8v8IU9p2o nix2linode"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue