shared system constants
This commit is contained in:
parent
f23070e414
commit
d14ead68a0
39 changed files with 167 additions and 142 deletions
|
|
@ -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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -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
17
modules/fish.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
modules/flake/flake-parts.nix
Normal file
8
modules/flake/flake-parts.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{inputs, ...}: {
|
||||||
|
imports = with inputs.flake-parts.flakeModules; [
|
||||||
|
modules
|
||||||
|
easyOverlay
|
||||||
|
];
|
||||||
|
|
||||||
|
systems = [];
|
||||||
|
}
|
||||||
11
modules/flake/hm-nixos-module.nix
Normal file
11
modules/flake/hm-nixos-module.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -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
18
modules/nix.nix
Normal 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
11
modules/nixos/audio.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
5
modules/nixos/bluetooth.nix
Normal file
5
modules/nixos/bluetooth.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
flake.modules.nixos.base = {
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
17
modules/nixos/boot.nix
Normal file
17
modules/nixos/boot.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
modules/nixos/configuration.nix
Normal file
7
modules/nixos/configuration.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
flake.modules.nixos.base = {modulesPath, ...}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
24
modules/nixos/desktop-manager/kde-plasma.nix
Normal file
24
modules/nixos/desktop-manager/kde-plasma.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
5
modules/nixos/display-manager/sddm.nix
Normal file
5
modules/nixos/display-manager/sddm.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
flake.modules.nixos.sddm = {
|
||||||
|
services.displayManager.sddm.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
18
modules/nixos/doas.nix
Normal file
18
modules/nixos/doas.nix
Normal 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
45
modules/nixos/fonts.nix
Normal 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
7
modules/nixos/locale.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
flake.modules.nixos.base = {
|
||||||
|
time.timeZone = "Asia/Jakarta";
|
||||||
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
|
services.xserver.xkb.layout = "us";
|
||||||
|
};
|
||||||
|
}
|
||||||
8
modules/nixos/networking.nix
Normal file
8
modules/nixos/networking.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
flake.modules.nixos.base = {
|
||||||
|
networking = {
|
||||||
|
networkmanager.enable = true;
|
||||||
|
firewall.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
17
modules/nixos/printing.nix
Normal file
17
modules/nixos/printing.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/nixos/programs/atuin.nix
Normal file
11
modules/nixos/programs/atuin.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
flake.modules.nixos.base = {
|
||||||
|
programs.atuin = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
sync_address = "https://api.atuin.sh";
|
||||||
|
enter_accept = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
modules/nixos/programs/git.nix
Normal file
13
modules/nixos/programs/git.nix
Normal 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
Loading…
Reference in a new issue