This commit is contained in:
LunarAkai 2025-03-16 19:45:20 +01:00
commit 3bfebb286d
14 changed files with 235 additions and 34 deletions

65
flake.lock generated
View file

@ -80,11 +80,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1731533236,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -95,7 +95,7 @@
}, },
"flake-utils-plus": { "flake-utils-plus": {
"inputs": { "inputs": {
"flake-utils": "flake-utils" "flake-utils": "flake-utils_2"
}, },
"locked": { "locked": {
"lastModified": 1696331477, "lastModified": 1696331477,
@ -111,6 +111,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakeCompat": { "flakeCompat": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -167,6 +185,27 @@
"type": "github" "type": "github"
} }
}, },
"nix-vscode-extensions": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1742090119,
"narHash": "sha256-I+NlLtHpTsItYkHo4fFdM6moBHF156wM11TPWLcwdic=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "adcb8b54d64484bb74f1480acefc3c686f318917",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"type": "github"
}
},
"nixos-appstream-data": { "nixos-appstream-data": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": [
@ -282,10 +321,11 @@
"alejandra": "alejandra", "alejandra": "alejandra",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-software-center": "nix-software-center", "nix-software-center": "nix-software-center",
"nix-vscode-extensions": "nix-vscode-extensions",
"nixos-conf-editor": "nixos-conf-editor", "nixos-conf-editor": "nixos-conf-editor",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"systems": "systems_3" "systems": "systems_4"
} }
}, },
"rust-analyzer-src": { "rust-analyzer-src": {
@ -359,6 +399,21 @@
} }
}, },
"systems_3": { "systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_4": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",

View file

@ -11,6 +11,11 @@
nix-software-center.url = "github:snowfallorg/nix-software-center"; nix-software-center.url = "github:snowfallorg/nix-software-center";
nixos-conf-editor.url = "github:snowfallorg/nixos-conf-editor"; nixos-conf-editor.url = "github:snowfallorg/nixos-conf-editor";
nix-vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -39,11 +44,12 @@
in { in {
inherit lib; inherit lib;
formatter = forEachSystem (pkgs: pkgs.alejandra);
homeManagerModules.default = ./modules/home-manager; homeManagerModules.default = ./modules/home-manager;
nixosModules.default = ./modules/nixos; nixosModules.default = ./modules/nixos;
overlays = import ./overlays {inherit inputs outputs;};
formatter = forEachSystem (pkgs: pkgs.alejandra);
nixosConfigurations = { nixosConfigurations = {
# Yes, my computers are named after the Earthbound Immortals from Yu-Gi-Oh! 5D's :3 # Yes, my computers are named after the Earthbound Immortals from Yu-Gi-Oh! 5D's :3

View file

@ -1,7 +1,10 @@
{pkgs, ...}: { {pkgs, ...}: {
imports = [ imports = [
./zsh ./zsh
./gh.nix
./git.nix
./oh-my-posh.nix ./oh-my-posh.nix
./tmux.nix
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -0,0 +1,8 @@
{
programs.gh = {
enable = true;
settings = {
git_protocol = "ssh";
};
};
}

View file

@ -0,0 +1,11 @@
{lib, ...}: {
programs.git = {
enable = true;
userName = lib.mkDefault "LunarAkai";
userEmail = lib.mkDefault "akai@lunarakai.de";
extraConfig = {
init.defaultBranch = "main";
};
lfs.enable = true;
};
}

View file

@ -0,0 +1,31 @@
{pkgs, ...}: {
programs.tmux = {
enable = true;
prefix = "C-Space";
baseIndex = 1;
newSession = true;
mouse = true;
clock24 = true;
escapeTime = 0;
shell = "${pkgs.zsh} /bin/zsh";
plugins = with pkgs; [
tmuxPlugins.yank
tmuxPlugins.sensible
tmuxPlugins.catppuccin
];
extraConfig = ''
# set true color
set-option -sa terminal-overrides ",xterm*:Tc"
# open panes in current directory
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# easy reloads
bind M-r source-file ~/.config/tmux/tmux.conf
'';
};
}

View file

@ -7,6 +7,10 @@
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
plugins = [
"gh"
"rust"
];
}; };
history.size = 10000; history.size = 10000;
}; };

View file

@ -0,0 +1,38 @@
{pkgs, ...}: {
programs.vscode = {
enable = true;
extensions = with pkgs.vscode-marketplace; [
golang.go
redhat.java
redhat.ansible
redhat.vscode-yaml
rust-lang.rust-analyzer
ritwickdey.liveserver
ecmel.vscode-html-css
mhutchie.git-graph
pixl-garden.bongocat
# theme
catppuccin.catppuccin-vsc
catppuccin.catppuccin-vsc-icons
];
profiles.default.userSettings = {
# pls stop adding generative "AI" to everything :c
"chat.agent.enabled" = false;
"chat.commandCenter.enabled" = false;
"editor.semanticHighlighting.enabled" = true;
"terminal.integrated.minimumContrastRatio" = 1;
"window.titleBarStyle" = "custom";
"workbench.colorTheme" = "Catppuccin Macchiato";
"catppuccin.accentColor" = "mauve";
"catppuccin.customUIColors"."mauve"."statusBar.foreground" = "accent";
"workbench.iconTheme" = "catppuccin-macchiato";
"[nix]"."editor.tabSize" = 2;
};
};
}

View file

@ -4,5 +4,6 @@
./categories/cli ./categories/cli
./categories/desktop/common ./categories/desktop/common
./categories/desktop/coding/vscode
]; ];
} }

View file

@ -0,0 +1,5 @@
{
virtualisation.docker = {
enable = true;
};
}

View file

@ -2,23 +2,25 @@
pkgs, pkgs,
config, config,
... ...
}: { }: let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.luna = { users.users.luna = {
isNormalUser = true; isNormalUser = true;
description = "luna"; description = "luna";
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = [ extraGroups = ifTheyExist [
"audio"
"docker"
"networkmanager" "networkmanager"
"wheel" "wheel"
]; ];
packages = with pkgs; [ packages = with pkgs; [
# thunderbird # thunderbird
gnome-software gnome-software
git
neovim neovim
rustup rustup
vscode.fhs
protonvpn-gui protonvpn-gui
]; ];
}; };

View file

@ -17,6 +17,7 @@
../common/optional/pipewire.nix ../common/optional/pipewire.nix
../common/optional/flatpak.nix ../common/optional/flatpak.nix
../common/optional/ckb-next.nix ../common/optional/ckb-next.nix
../common/optional/docker.nix
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -67,4 +68,7 @@
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
}; };
nixpkgs.overlays = [
inputs.nix-vscode-extensions.overlays.default
];
} }

View file

@ -1,35 +1,38 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
]; modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/951f8c69-070f-4e2c-9af9-b52e43a72577"; device = "/dev/disk/by-uuid/951f8c69-070f-4e2c-9af9-b52e43a72577";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/BF5F-3F1E"; device = "/dev/disk/by-uuid/BF5F-3F1E";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = ["fmask=0077" "dmask=0077"];
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "/dev/disk/by-uuid/8bf53e75-628e-4a1b-a19f-1ac55be2af35"; device = "/dev/disk/by-uuid/8bf53e75-628e-4a1b-a19f-1ac55be2af35";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = [ ]; swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

30
overlays/default.nix Normal file
View file

@ -0,0 +1,30 @@
{
outputs,
inputs,
}: let
addPatches = pkg: patches:
pkg.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or []) ++ patches;
});
in {
# For every flake input, aliases 'pkgs.inputs.${flake}' to
# 'inputs.${flake}.packages.${pkgs.system}' or
# 'inputs.${flake}.legacyPackages.${pkgs.system}'
flake-inputs = final: _: {
inputs =
builtins.mapAttrs (
_: flake: let
legacyPackages = (flake.legacyPackages or {}).${final.system} or {};
packages = (flake.packages or {}).${final.system} or {};
in
if legacyPackages != {}
then legacyPackages
else packages
)
inputs;
};
nixpkgs.overlays = [
nix-vscode-extensions.overlays.default
];
}