Compare commits

...

14 Commits

Author SHA1 Message Date
7410e0e0a2 hosts/tux: Add preliminary configuration for tux
Welcome to the team <3
2026-03-17 00:15:19 +01:00
22a1b19301 nixos/sytemd-boot: Add systemd-boot 2026-03-17 00:14:43 +01:00
0167bb1ab5 nixos/intel-gpu: Add support for intel iGPUs
Might need to be adapted if used on ARC or really old iGPUs. See nixos
documentation
2026-03-17 00:13:56 +01:00
905aace59e nixos/upower: Add upower battery management service 2026-03-17 00:13:47 +01:00
2337629578 nixos/tailscale: Add tailscale module 2026-03-17 00:13:07 +01:00
a55644e77c nixos+home: Add homemanager and nm-applet for easy network management 2026-03-17 00:12:16 +01:00
b5ee65626a nixos/backlight: Add backlight 2026-03-17 00:11:58 +01:00
d3531dfd9e WIP home/obsidian: Add obsidian 2026-03-17 00:11:15 +01:00
820e4b1cce home/ashell: Add ashell for a nice low maintenance bar on hyprland 2026-03-17 00:10:31 +01:00
dd0ddd7834 home/wpaperd: Add wpaperd for automatic wallpaper cycling 2026-03-17 00:09:42 +01:00
b23ebe640d WIP home/borgmatic: correctly deduce system hostname from os config
Also add some TODOs for future me :^)
2026-03-17 00:08:29 +01:00
ef35e06dfd nixos/development-tools: Add direnv and nix-direnv 2026-03-17 00:07:41 +01:00
bac5ee7534 home/btop: Use programs.btop for automatic catppuccin goodness 2026-03-17 00:07:01 +01:00
e4f1e92d2a nixos/mount-cifs: Automatically add cifs-utils whenever this module is included 2026-03-17 00:05:57 +01:00
26 changed files with 310 additions and 5 deletions

17
flake.lock generated
View File

@@ -25,6 +25,22 @@
"type": "github" "type": "github"
} }
}, },
"aghpb": {
"flake": false,
"locked": {
"lastModified": 1773167124,
"narHash": "sha256-ELnpKMODHKZcsXZ9/6XyTo17u3j2bUs9nplyULz6uFI=",
"owner": "cat-milk",
"repo": "Anime-Girls-Holding-Programming-Books",
"rev": "c04a6e18f474965b731b65e539ad69a94123c444",
"type": "github"
},
"original": {
"owner": "cat-milk",
"repo": "Anime-Girls-Holding-Programming-Books",
"type": "github"
}
},
"assets": { "assets": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -313,6 +329,7 @@
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"aghpb": "aghpb",
"assets": "assets", "assets": "assets",
"catppuccin": "catppuccin", "catppuccin": "catppuccin",
"flake-file": "flake-file", "flake-file": "flake-file",

View File

@@ -11,6 +11,10 @@
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
}; };
}; };
aghpb = {
url = "github:cat-milk/Anime-Girls-Holding-Programming-Books";
flake = false;
};
assets = { assets = {
url = "path:./assets"; url = "path:./assets";
flake = false; flake = false;

View File

@@ -7,7 +7,10 @@
, UID , UID
, GID , GID
, ,
}: { }: { pkgs, ... }: {
environment.systemPackages = with pkgs; [
cifs-utils
];
fileSystems."${destination}" = { fileSystems."${destination}" = {
device = "//${host}/${resource}"; device = "//${host}/${resource}";
fsType = "cifs"; fsType = "cifs";

View File

@@ -0,0 +1,8 @@
{
config.flake.factory.wpaperd = config: {
services.wpaperd = {
enable = true;
settings = config;
};
};
}

View File

@@ -0,0 +1,20 @@
{
flake.modules.nixos.tux = {
fileSystems."/" =
{ device = "/dev/disk/by-uuid/39bb2139-7d71-4f3d-9c11-2cf3fe26ad7d";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6514-61C0";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/ac1606de-34d3-4036-baf6-2ed17e54bfc3"; }
];
};
}

View File

@@ -0,0 +1,3 @@
{ inputs, ...}: {
flake.nixosConfigurations = inputs.self.lib.mkNixos "x86_64-linux" "tux";
}

View File

@@ -0,0 +1,15 @@
{inputs, ...}: {
flake.modules.nixos.tux = {
imports = with inputs.self.modules.nixos; [
intel-gpu
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
nixpkgs.hostPlatform = "x86_64-linux";
hardware.enableRedistributableFirmware = true;
hardware.cpu.intel.updateMicrocode = true;
};
}

View File

@@ -0,0 +1,8 @@
{inputs, ...}: {
flake.modules.nixos.tux = {
imports = with inputs.self.modules.nixos; [
networkmanager
];
networking.hostName = "tux";
};
}

17
modules/hosts/tux/tux.nix Normal file
View File

@@ -0,0 +1,17 @@
{ inputs, ... }: {
flake.modules.nixos.tux = {
imports = with inputs.self.modules.nixos;
with inputs.self.factory; [
system-desktop
systemd-boot
(autologin "weckyy702")
development-tools
i18n-de
tailscale
#TODO: laptop specific aspects like powertop
];
};
}

View File

@@ -0,0 +1,8 @@
{ inputs, ... }: {
flake.modules.nixos.tux = {
imports = with inputs.self.modules.nixos; [
backlight
];
users.users.weckyy702.extraGroups = [ "video" ];
};
}

View File

@@ -0,0 +1,19 @@
{ inputs, ... }: {
flake-file.inputs = {
aghpb = {
url = "github:cat-milk/Anime-Girls-Holding-Programming-Books";
flake = false;
};
};
flake.modules.homeManager.tux-hyprland = {
imports = with inputs.self.modules.homeManager; [
ashell
];
wayland.windowManager.hyprland.settings = {
monitor = [
"eDP-1,preferred,0x0,1.066666667"
];
};
};
}

View File

@@ -0,0 +1,16 @@
{ inputs, ... }: {
flake.modules.nixos.tux = { config, ... }: {
age.secrets."nas-creds".file = "${inputs.secrets}/nas-creds.age";
imports = with inputs.self.factory; [
(mount-cifs {
host = "duke.veltnet";
resource = "smb-share";
destination = "/home/weckyy702/duke";
credentials_path = "${config.age.secrets.nas-creds.path}";
UID = "weckyy702";
GID = "users";
})
];
};
}

View File

@@ -0,0 +1,14 @@
{ inputs, ... }: {
flake.modules.homeManager.randomized-aghpb-wallpaper = {
imports = with inputs.self.factory; [
(wpaperd {
default = {
path = inputs.aghpb;
recursive = true;
mode = "stretch";
duration = "5m";
};
})
];
};
}

View File

@@ -0,0 +1,20 @@
{ inputs, ... }: {
flake.modules.nixos.tux = {
imports = with inputs.self.modules.nixos; [
weckyy702
upower
];
home-manager.users.weckyy702 = {
imports = with inputs.self.modules.homeManager;
with inputs.self.factory; [
borgmatic
obsidian
vesktop
tux-hyprland
randomized-aghpb-wallpaper
nm-applet
];
};
};
}

View File

@@ -0,0 +1,48 @@
{
flake.modules.homeManager.ashell =
{ config
, lib
, ...
}: {
programs.ashell = {
enable = true;
systemd.enable = true;
settings = {
modules = {
left = [ "Workspaces" ];
center = [ "Clock" ];
right = [ "Tray" [ "SystemInfo" "Settings" ] ];
};
system_info.indicators = [ "Cpu" "Memory" "Temperature" "DownloadSpeed" "UploadSpeed" ];
settings.indicators = [ "Battery" ];
appearance = lib.mkIf config.catppuccin.enable {
success_color = "#a6e3a1";
text_color = "#cdd6f4";
workspace_colors = [ "#fab387" "#b4befe" "#cba6f7" ];
primary_color = {
base = "#fab387";
text = "#1e1e2e";
};
danger_color = {
base = "#f38ba8";
weak = "#f9e2af";
};
background_color = {
base = "#1e1e2e";
weak = "#313244";
strong = "#45475a";
};
secondary_color = {
base = "#11111b";
strong = "#1b1b25";
};
};
};
};
};
}

View File

@@ -1,7 +1,12 @@
{ {
flake.modules.homeManager.btop = { pkgs, ... }: { flake.modules.homeManager.btop = { pkgs, ... }: {
home.packages = with pkgs; [ programs.btop = {
btop enable = true;
]; settings = {
vim_keys = true;
proc_tree = true;
proc_aggregate = true;
};
};
}; };
} }

View File

@@ -10,5 +10,12 @@
clang clang
gcc gcc
]; ];
programs.direnv = {
enable = true;
enableZshIntegration = true;
silent = true;
nix-direnv.enable = true;
};
}; };
} }

View File

@@ -0,0 +1,13 @@
{
flake.modules.homeManager.obsidian = {
programs.obsidian = {
enable = true;
defaultSettings = {
communityPlugins = [
"excalidraw"
];
themes = [ ];
};
};
};
}

View File

@@ -0,0 +1,8 @@
{
flake.modules.nixos.backlight = {
programs.light = {
enable = true;
brightnessKeys.enable = true;
};
};
}

View File

@@ -1,19 +1,23 @@
{ {
flake.modules.homeManager.borgmatic = flake.modules.homeManager.borgmatic =
{ config { config
, osConfig
, pkgs , pkgs
, lib
, ... , ...
}: }:
let let
hostname = config.networking.hostname; hostname = osConfig.networking.hostName;
username = config.home.username; username = config.home.username;
in in
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
libnotify libnotify
borgmatic
]; ];
programs.borgmatic = { programs.borgmatic = {
enable = true;
backups.default = { backups.default = {
location = { location = {
repositories = [ repositories = [
@@ -25,6 +29,7 @@
excludeHomeManagerSymlinks = true; excludeHomeManagerSymlinks = true;
patterns = [ patterns = [
#TODO: home.homeDirectory might be usable here #TODO: home.homeDirectory might be usable here
#TODO: should be user and machine specific
"R /home/${username}/Documents" "R /home/${username}/Documents"
"R /home/${username}/.ssh" "R /home/${username}/.ssh"
"- /home/${username}/Documents/SteamLibrary" "- /home/${username}/Documents/SteamLibrary"
@@ -50,6 +55,8 @@
}; };
}; };
#TODO: there is a services.borgmatic
systemd.user.services.borgmatic = { systemd.user.services.borgmatic = {
Unit.Description = "Create a backup using borgmatic"; Unit.Description = "Create a backup using borgmatic";
Service.ExecStart = "${pkgs.borgmatic}/bin/borgmatic create --stats"; Service.ExecStart = "${pkgs.borgmatic}/bin/borgmatic create --stats";

View File

@@ -0,0 +1,7 @@
{
flake.modules.nixos.networkmanager = {
networking.networkmanager = {
enable = true;
};
};
}

View File

@@ -0,0 +1,5 @@
{
flake.modules.homeManager.nm-applet = {
services.network-manager-applet.enable = true;
};
}

View File

@@ -0,0 +1,7 @@
{
flake.modules.nixos.tailscale = {
services.tailscale = {
enable = true;
};
};
}

View File

@@ -0,0 +1,5 @@
{
flake.modules.nixos.upower = {
services.upower.enable = true;
};
}

View File

@@ -0,0 +1,15 @@
{
flake.modules.nixos.intel-gpu = {pkgs, ...}: {
boot.kernelModules = [ "kvm-intel" ];
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
intel-compute-runtime
];
};
environment.sessionVariables.LIBVA_DRIVER_NAME = "iHD";
};
}

View File

@@ -0,0 +1,6 @@
{
flake.modules.nixos.systemd-boot = {
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
};
}