Watch
1
0
Fork
You've already forked chitin
0

shared system constants

This commit is contained in:
asnev 2026-10-27 07:19:04 +07:00
commit 85533a786f
Signed by: asnev
SSH key fingerprint: SHA256:8hagYq9hDUuS5clQ78FKhIoQDvg5crdkYMHX+3g7wB4
39 changed files with 164 additions and 142 deletions

View file

@ -1,25 +0,0 @@
{
flake.modules.nixos.base = {
programs = {
fish.enable = true;
atuin = {
enable = true;
settings = {
sync_address = "https://api.atuin.sh";
enter_accept = true;
};
};
git = {
enable = true;
config = {
init.defaultBranch = "main";
advice.defaultBranchName = false;
gpg.format = "ssh";
commit.gpgSign = true;
};
};
};
};
}

View file

@ -1,21 +0,0 @@
{
flake.modules.nixos.base = {
services = {
fwupd.enable = true;
locate.enable = true;
openssh.enable = false;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
security.rtkit.enable = true;
# ssh-agent user service (SSH_AUTH_SOCK=%t/ssh-agent)
programs.ssh.startAgent = true;
};
}

17
modules/fish.nix Normal file
View file

@ -0,0 +1,17 @@
{
flake.modules.nixos.fish = {pkgs, ...}: {
users.defaultUserShell = pkgs.fish;
programs.fish = {
enable = true;
shellAbbrs = {
l = "eza --grid --all";
ll = "eza --long --all";
ls = "eza";
".." = "cd ..";
"..." = "cd ../..";
cat = "bat";
};
};
};
}

View file

@ -0,0 +1,8 @@
{inputs, ...}: {
imports = with inputs.flake-parts.flakeModules; [
modules
easyOverlay
];
systems = [];
}

View file

@ -0,0 +1,11 @@
{inputs, ...}: {
flake.modules.nixos.homeManagerModule = {
imports = [inputs.home-manager.nixosModules.home-manager];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
};
};
}

View file

@ -2,29 +2,27 @@
self, self,
inputs, inputs,
... ...
}: let }: {
stateVersion = "26.05"; # i don't read comments! flake.modules.nixos.phostron = {config, lib, ...}: {
in { networking.hostName = config.systemConstants.phostronHostname;
flake.modules.nixos.phostron = {lib, ...}: { nixpkgs.hostPlatform = lib.mkDefault config.systemConstants.phostronHostPlatform;
networking.hostName = "phostron"; system.stateVersion = config.systemConstants.phostronStateVersion;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
system = {inherit stateVersion;};
}; };
flake.modules.homeManager.coyote = { flake.modules.homeManager.primaryUser = {config, ...}: {
home = {inherit stateVersion;}; home.stateVersion = config.systemConstants.phostronStateVersion;
}; };
flake.nixosConfigurations.phostron = inputs.nixpkgs.lib.nixosSystem { flake.nixosConfigurations.phostron = inputs.nixpkgs.lib.nixosSystem {
modules = with self.modules.nixos; [ modules = with self.modules.nixos; [
base base
phostron phostron
fish
sddm sddm
kdePlasma kdePlasma
homeManagerModule homeManagerModule
coyote
fish
primaryUser
]; ];
}; };
} }

18
modules/nix.nix Normal file
View file

@ -0,0 +1,18 @@
{
flake.modules.nixos.base = {
nix = {
settings = {
experimental-features = ["nix-command" "flakes"];
auto-optimise-store = true;
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
optimise.automatic = true;
};
};
}

11
modules/nixos/audio.nix Normal file
View file

@ -0,0 +1,11 @@
{
flake.modules.nixos.base = {
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
}

View file

@ -0,0 +1,5 @@
{
flake.modules.nixos.base = {
hardware.bluetooth.enable = true;
};
}

17
modules/nixos/boot.nix Normal file
View file

@ -0,0 +1,17 @@
{
flake.modules.nixos.base = {pkgs, ...}: {
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
timeout = 2;
};
kernelPackages = pkgs.linuxPackages_latest;
};
};
}

View file

@ -0,0 +1,7 @@
{
flake.modules.nixos.base = {modulesPath, ...}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
};
}

View file

@ -0,0 +1,24 @@
{
flake.modules.nixos.kdePlasma = {pkgs, ...}: {
services.desktopManager.plasma6.enable = true;
environment = {
plasma6.excludePackages = with pkgs.kdePackages; [
discover
];
systemPackages = with pkgs.kdePackages; [
kate
elisa
bluez-qt
kalk
filelight
kamoso
konversation
kmail
ktorrent
kclock
];
};
};
}

View file

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

18
modules/nixos/doas.nix Normal file
View file

@ -0,0 +1,18 @@
{
flake.modules.nixos.base = {
security = {
doas = {
enable = true;
extraRules = [
{
groups = ["wheel"];
keepEnv = true;
persist = true;
}
];
};
sudo.enable = false;
};
};
}

45
modules/nixos/fonts.nix Normal file
View file

@ -0,0 +1,45 @@
{
flake.modules.nixos.base = {pkgs, ...}: {
fonts = {
packages = with pkgs; [
# GUI
inter
corefonts
roboto
cantarell-fonts
# internationalisation
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-color-emoji
noto-fonts-monochrome-emoji
unifont
unifont_upper
unifont-csur
# terminal
nerd-fonts.iosevka
];
fontconfig = {
antialias = true;
subpixel.rgba = "rgb";
hinting.enable = true;
defaultFonts = {
serif = ["Noto Serif"];
sansSerif = ["Cantarell"];
monospace = ["Iosevka Nerd Font"];
emoji = ["Noto Color Emoji"];
};
};
};
};
flake.modules.nixos.kdePlasma = {
config,
lib,
...
}: {
services.displayManager.sddm.settings.Theme.Font =
lib.concatStrings config.fonts.fontconfig.defaultFonts.sansSerif;
};
}

7
modules/nixos/locale.nix Normal file
View file

@ -0,0 +1,7 @@
{
flake.modules.nixos.base = {
time.timeZone = "Asia/Jakarta";
i18n.defaultLocale = "en_GB.UTF-8";
services.xserver.xkb.layout = "us";
};
}

View file

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

View file

@ -0,0 +1,17 @@
{
flake.modules.nixos.base = {pkgs, ...}: {
services.printing = {
enable = true;
drivers = with pkgs; [
epson-escpr
];
};
hardware.sane = {
enable = true;
extraBackends = with pkgs; [
epsonscan2
];
};
};
}

View file

@ -0,0 +1,11 @@
{
flake.modules.nixos.base = {
programs.atuin = {
enable = true;
settings = {
sync_address = "https://api.atuin.sh";
enter_accept = true;
};
};
};
}

View file

@ -0,0 +1,13 @@
{
flake.modules.nixos.base = {
programs.git = {
enable = true;
config = {
init.defaultBranch = "main";
advice.defaultBranchName = false;
gpg.format = "ssh";
commit.gpgSign = true;
};
};
};
}

Some files were not shown because too many files have changed in this diff Show more