Compare commits

..

5 Commits

Author SHA1 Message Date
f5b3a04378 Added amd driver, rocm 2025-08-31 20:23:43 -04:00
a4c5a10c4f Forgot these.. 2025-08-31 16:52:04 -04:00
b8a8e1bdce Still trying to fix secret keys... 2025-08-31 16:50:26 -04:00
40a48eb605 Rekey the secret 2025-08-31 16:30:07 -04:00
266f563c2f Fixed host ssh key 2025-08-31 16:19:39 -04:00
11 changed files with 21 additions and 121 deletions

3
.gitmodules vendored
View File

@@ -1,6 +1,3 @@
[submodule "assets/compose"]
path = assets/compose
url = ssh://git@code.lazyworkhorse.net:2222/gortium/compose.git
[submodule "assets/dotfiles"]
path = assets/dotfiles
url = ssh://git@code.lazyworkhorse.net:2222/gortium/dotfiles.git

21
flake.lock generated
View File

@@ -44,26 +44,6 @@
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1755625756,
"narHash": "sha256-t57ayMEdV9g1aCfHzoQjHj1Fh3LDeyblceADm2hsLHM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "dd026d86420781e84d0732f2fa28e1c051117b59",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1755615617,
@@ -83,7 +63,6 @@
"root": {
"inputs": {
"agenix": "agenix",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs"
}
},

View File

@@ -8,14 +8,10 @@
inputs.darwin.follows = "";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
self.submodules = true;
};
outputs = { self, nixpkgs, agenix, home-manager, ... }@inputs:
outputs = { self, nixpkgs, agenix, ... }@inputs:
let
system = "x86_64-linux";
keys = import ./lib/keys.nix;
@@ -43,11 +39,10 @@
modules = [
{ nixpkgs.overlays = overlays; }
agenix.nixosModules.default
home-manager.nixosModules.default
./hosts/lazyworkhorse/configuration.nix
./hosts/lazyworkhorse/hardware-configuration.nix
./modules/default.nix
./users/gortium
./users/gortium.nix
];
};
};

View File

@@ -153,8 +153,6 @@
};
};
fileSystems."/".neededForBoot = true;
# Public host ssh key (kept in sync with the private one)
environment.etc."ssh/ssh_host_ed25519_key.pub".text =
"${keys.hosts.lazyworkhorse.main}";
@@ -164,6 +162,19 @@
services.zfs.autoSnapshot.enable = true;
services.zfs.autoScrub.enable = true;
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
rocmPackages.clr
rocmPackages.rocblas
rocmPackages.rocrand
rocmPackages.rocminfo
rocmPackages.hipcc
rocmPackages.hiprt
];
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];

View File

@@ -9,7 +9,7 @@
hosts = {
lazyworkhorse = {
main = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINmXqD+bBveCYf4khmARA0uaCzkBOUIE077ZrInLNs1O";
main = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBmPv4JssvhHGIx85UwFxDSrL5anR4eXB/cd9V2i9wdW";
github = "";
gitea = "";
bootstrap = "age1r796v2uldtspawyh863pks74sd2pwcan8j4e4pjzsvkmr3vjja9qpz5ste";

View File

@@ -1,6 +1,6 @@
{
imports = [
./dotfiles.nix
./systemd
];
{ pkgs, lib, config, ... }: {
imports =
[
./systemd
];
}

View File

@@ -1,69 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.dotfiles;
stowDir = cfg.stowDir;
# Function to recursively find all files in a directory
findFiles = dir:
let
files = builtins.attrNames (builtins.readDir dir);
in
concatMap (name:
let
path = dir + "/${name}";
in
if (builtins.typeOf (builtins.readDir path) == "set")
then findFiles path
else [ path ]
) files;
# Get a list of all packages (directories) in the stow directory
stowPackages = builtins.attrNames (builtins.readDir stowDir);
# Create an attribute set where each attribute is a package name
# and the value is a list of files to be linked.
homeManagerLinks = listToAttrs (map (pkg:
let
pkgPath = stowDir + "/${pkg}";
files = findFiles pkgPath;
in
nameValuePair pkg (map (file: {
source = file;
target = removePrefix (pkgPath + "/") file;
}) files)
) stowPackages);
in
{
options.services.dotfiles = {
enable = mkEnableOption "Enable dotfiles management";
stowDir = mkOption {
type = types.path;
description = "The directory where your stow packages are located.";
};
user = mkOption {
type = types.str;
description = "The user to manage dotfiles for.";
};
};
config = mkIf cfg.enable {
home-manager.users.${cfg.user} = {
home.file =
let
allFiles = concatLists (attrValues homeManagerLinks);
in
listToAttrs (map (file:
nameValuePair file.target {
source = file.source;
}
) allFiles);
};
};
}

Binary file not shown.

View File

@@ -1,5 +1,4 @@
{ pkgs, inputs, config, keys, ... }: {
home-manager.users.gortium = import ./home.nix;
users.users.gortium = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ]; # Enable sudo for the user.

View File

@@ -1,12 +0,0 @@
{ pkgs, ... }: {
services.dotfiles = {
enable = true;
stowDir = ../../../assets/dotfiles;
user = "gortium";
};
home.username = "gortium";
home.homeDirectory = "/home/gortium";
home.stateVersion = "23.11"; # Please change this to your version.
programs.home-manager.enable = true;
}