+1
.gitignore
+1
.gitignore
···
1
+
result
+163
belaf/configuration.nix
+163
belaf/configuration.nix
···
1
+
{
2
+
config,
3
+
pkgs,
4
+
ghostty,
5
+
...
6
+
}: {
7
+
nix.settings = {
8
+
trusted-users = ["root" "kar"];
9
+
experimental-features = ["nix-command" "flakes"];
10
+
auto-optimise-store = true;
11
+
};
12
+
nix.gc = {
13
+
automatic = true;
14
+
dates = "weekly";
15
+
options = "--delete-older-than 14d";
16
+
};
17
+
# Allow unfree packages
18
+
nixpkgs.config = {
19
+
allowUnfree = true;
20
+
input-fonts.acceptLicense = true;
21
+
};
22
+
23
+
fonts.packages = with pkgs; [
24
+
victor-mono
25
+
input-fonts
26
+
nerdfonts
27
+
meslo-lgs-nf
28
+
];
29
+
30
+
# Bootloader.
31
+
boot.supportedFilesystems = ["bcachefs"];
32
+
boot.kernelPackages = pkgs.linuxPackages_latest;
33
+
34
+
boot.loader.systemd-boot.enable = true;
35
+
boot.loader.systemd-boot.configurationLimit = 10;
36
+
37
+
networking.hostName = "belaf"; # Define your hostname.
38
+
networking.networkmanager.enable = true;
39
+
40
+
# Set your time zone.
41
+
time.timeZone = "Europe/Paris";
42
+
i18n.defaultLocale = "en_US.utf8";
43
+
i18n.extraLocaleSettings = {
44
+
LC_ADDRESS = "fr_FR.utf8";
45
+
LC_IDENTIFICATION = "fr_FR.utf8";
46
+
LC_MEASUREMENT = "fr_FR.utf8";
47
+
LC_MONETARY = "fr_FR.utf8";
48
+
LC_NAME = "fr_FR.utf8";
49
+
LC_NUMERIC = "fr_FR.utf8";
50
+
LC_PAPER = "fr_FR.utf8";
51
+
LC_TELEPHONE = "fr_FR.utf8";
52
+
LC_TIME = "fr_FR.utf8";
53
+
};
54
+
55
+
# disable pulse because pipewire handles it
56
+
hardware.pulseaudio.enable = false;
57
+
hardware.bluetooth.enable = true; # enables support for Bluetooth
58
+
hardware.bluetooth.powerOnBoot =
59
+
true; # powers up the default Bluetooth controller on boot
60
+
61
+
services = {
62
+
# sound
63
+
pipewire = {
64
+
enable = true;
65
+
alsa.enable = true;
66
+
alsa.support32Bit = true;
67
+
pulse.enable = true;
68
+
wireplumber.enable = true;
69
+
};
70
+
71
+
tailscale.enable = true;
72
+
tailscale.useRoutingFeatures = "client";
73
+
74
+
# touchpad
75
+
touchegg.enable = true;
76
+
77
+
# bluetooth
78
+
blueman.enable = true;
79
+
80
+
# udev
81
+
udev.packages = [pkgs.via];
82
+
};
83
+
84
+
hardware.keyboard.qmk.enable = true;
85
+
86
+
security = {
87
+
sudo.wheelNeedsPassword = false;
88
+
rtkit.enable = true;
89
+
};
90
+
91
+
# Define a user account. Don't forget to set a password with ‘passwd’.
92
+
users = {
93
+
defaultUserShell = pkgs.zsh;
94
+
users.kar = {
95
+
isNormalUser = true;
96
+
description = "kar";
97
+
extraGroups = ["networkmanager" "wheel" "docker"];
98
+
home = "/home/kar";
99
+
};
100
+
};
101
+
102
+
# shell setup
103
+
programs.zsh = {
104
+
enable = true;
105
+
shellInit = "export PATH=${config.users.users.kar.home}/go/bin:$PATH";
106
+
ohMyZsh = {
107
+
enable = true;
108
+
plugins = ["sudo" "zsh-navigation-tools" "zoxide"];
109
+
};
110
+
};
111
+
112
+
programs.ssh.startAgent = true;
113
+
# List packages installed in system profile. To search, run:
114
+
# $ nix search wget
115
+
environment = with pkgs; {
116
+
shells = [zsh];
117
+
118
+
systemPackages = [
119
+
ghostty.packages."${system}".default
120
+
armcord
121
+
vscode
122
+
spotify
123
+
spicetify-cli
124
+
tailscale
125
+
helix
126
+
fzf
127
+
difftastic
128
+
firefox
129
+
chromium
130
+
zsh
131
+
zoxide
132
+
vim
133
+
curl
134
+
wget
135
+
ripgrep
136
+
jq
137
+
eza
138
+
alejandra
139
+
mpv
140
+
moreutils
141
+
age
142
+
nix-output-monitor
143
+
];
144
+
etc = {
145
+
"xdg/gtk-3.0/settings.ini".text = ''
146
+
[Settings]
147
+
gtk-application-prefer-dark-theme=1
148
+
'';
149
+
"xdg/gtk-4.0/settings.ini".text = ''
150
+
[Settings]
151
+
gtk-application-prefer-dark-theme=1
152
+
'';
153
+
};
154
+
};
155
+
156
+
virtualisation.docker.enable = true;
157
+
virtualisation.docker.daemon.settings = {
158
+
data-root = "/docker";
159
+
};
160
+
virtualisation.docker.daemon.settings = {
161
+
shutdown-timeout = 2;
162
+
};
163
+
}
+34
belaf/default.nix
+34
belaf/default.nix
···
1
+
{
2
+
hyprland,
3
+
home-manager,
4
+
knixpkgs,
5
+
catppuccin,
6
+
...
7
+
}: {
8
+
nix.registry = {
9
+
k.flake = knixpkgs;
10
+
};
11
+
catppuccin.enable = true;
12
+
catppuccin.flavor = "macchiato";
13
+
system = {stateVersion = "24.05";};
14
+
imports = [
15
+
./hardware.nix
16
+
./desktop.nix
17
+
./configuration.nix
18
+
./fabric.nix
19
+
catppuccin.nixosModules.catppuccin
20
+
home-manager.nixosModules.home-manager
21
+
{
22
+
home-manager.useGlobalPkgs = true;
23
+
home-manager.useUserPackages = true;
24
+
home-manager.users.kar = {
25
+
imports = [./home catppuccin.homeManagerModules.catppuccin];
26
+
catppuccin.enable = true;
27
+
catppuccin.flavor = "macchiato";
28
+
};
29
+
}
30
+
hyprland.nixosModules.default
31
+
{programs.hyprland.enable = true;}
32
+
./greetd.nix
33
+
];
34
+
}
+20
belaf/desktop.nix
+20
belaf/desktop.nix
···
1
+
{pkgs, ...}: {
2
+
services.upower.enable = true;
3
+
environment = with pkgs; {
4
+
systemPackages = [
5
+
wl-clipboard
6
+
waybar
7
+
wlroots
8
+
dunst
9
+
xdg-utils
10
+
xdg-desktop-portal-hyprland
11
+
pavucontrol
12
+
killall
13
+
playerctl
14
+
brightnessctl
15
+
upower
16
+
pulseaudio
17
+
gnome-themes-extra
18
+
];
19
+
};
20
+
}
+36
belaf/fabric.nix
+36
belaf/fabric.nix
···
1
+
{
2
+
config,
3
+
pkgs,
4
+
...
5
+
}: let
6
+
ik = pkgs.buildGoModule {
7
+
name = "ik";
8
+
modRoot = "./go";
9
+
10
+
src = pkgs.fetchFromGitHub {
11
+
owner = "devguardio";
12
+
repo = "identity";
13
+
rev = "60af40a194bc38b27a02986012ee721219e068e1";
14
+
sha256 = "sha256-IuoTS3wvK4vQIJAAsrBmLjkiBC/wQuGOOxjtPPJpE8g=";
15
+
};
16
+
17
+
subPackages = ["ik"];
18
+
vendorHash = "sha256-Ow7Hctv4UNAYQN/IwsV4o4xIUcJz3fJuO4yasj6+lH8=";
19
+
};
20
+
in {
21
+
environment.systemPackages = [ik pkgs.wireguard-tools];
22
+
environment.etc = {
23
+
"fabric/config.json".text = ''{"consume_bgp":false}'';
24
+
};
25
+
systemd.services.fabric = {
26
+
enable = true;
27
+
unitConfig = {StartLimitIntervalSec = 1;};
28
+
serviceConfig = {
29
+
WorkingDirectory = "${config.users.users.kar.home}/.fab";
30
+
ExecStart = "${config.users.users.kar.home}/.fab/fabric run";
31
+
Restart = "always";
32
+
};
33
+
path = with pkgs; [ik sysctl nftables];
34
+
wantedBy = ["multi-user.target"];
35
+
};
36
+
}
+18
belaf/greetd.nix
+18
belaf/greetd.nix
···
1
+
{pkgs, ...}: {
2
+
services.greetd = {
3
+
enable = true;
4
+
settings = {
5
+
default_session.command = ''
6
+
${pkgs.greetd.tuigreet}/bin/tuigreet \
7
+
--time \
8
+
--asterisks \
9
+
--user-menu \
10
+
--cmd Hyprland
11
+
'';
12
+
};
13
+
};
14
+
15
+
environment.etc."greetd/environments".text = ''
16
+
hyprland
17
+
'';
18
+
}
+55
belaf/hardware.nix
+55
belaf/hardware.nix
···
1
+
# Do not modify this file! It was generated by ‘nixos-generate-config’
2
+
# and may be overwritten by future invocations. Please make changes
3
+
# to /etc/nixos/configuration.nix instead.
4
+
{
5
+
config,
6
+
lib,
7
+
modulesPath,
8
+
...
9
+
}: {
10
+
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
11
+
12
+
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod"];
13
+
boot.initrd.kernelModules = [];
14
+
boot.kernelModules = ["kvm-intel"];
15
+
boot.extraModulePackages = [];
16
+
17
+
fileSystems."/" = {
18
+
device = "UUID=d584e71f-2c5d-41e2-95e7-ed41f0833e25";
19
+
fsType = "bcachefs";
20
+
};
21
+
22
+
fileSystems."/boot" = {
23
+
device = "/dev/disk/by-uuid/8841-1618";
24
+
fsType = "vfat";
25
+
};
26
+
27
+
fileSystems."/docker" = {
28
+
device = "/dev/disk/by-uuid/d7c1613f-24dc-434a-bbb0-0051ea4524ca";
29
+
fsType = "ext4";
30
+
};
31
+
32
+
swapDevices = [];
33
+
34
+
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
35
+
# (the default) this is the recommended approach. When using systemd-networkd it's
36
+
# still possible to use this option, but it's recommended to use it in conjunction
37
+
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
38
+
networking.useDHCP = lib.mkDefault true;
39
+
# networking.interfaces.br-0ea29a46a357.useDHCP = lib.mkDefault true;
40
+
# networking.interfaces.br-0ea50d01088e.useDHCP = lib.mkDefault true;
41
+
# networking.interfaces.br-0fea806a6c5c.useDHCP = lib.mkDefault true;
42
+
# networking.interfaces.br-3ae328ad2eb5.useDHCP = lib.mkDefault true;
43
+
# networking.interfaces.br-3f16f478984d.useDHCP = lib.mkDefault true;
44
+
# networking.interfaces.br-63f977221584.useDHCP = lib.mkDefault true;
45
+
# networking.interfaces.br-806c86214a4b.useDHCP = lib.mkDefault true;
46
+
# networking.interfaces.br-efef802f9a95.useDHCP = lib.mkDefault true;
47
+
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
48
+
# networking.interfaces.fabric.useDHCP = lib.mkDefault true;
49
+
# networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
50
+
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
51
+
52
+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
53
+
hardware.cpu.intel.updateMicrocode =
54
+
lib.mkDefault config.hardware.enableRedistributableFirmware;
55
+
}
+48
belaf/home/default.nix
+48
belaf/home/default.nix
···
1
+
{...}: {
2
+
programs.home-manager.enable = true;
3
+
home.username = "kar";
4
+
home.homeDirectory = "/home/kar";
5
+
home.stateVersion = "24.05";
6
+
7
+
xdg.mimeApps = {
8
+
enable = true;
9
+
associations.added = {
10
+
"x-scheme-handler/http" = ["firefox.desktop"];
11
+
"x-scheme-handler/https" = ["firefox.desktop"];
12
+
"x-scheme-handler/chrome" = ["firefox.desktop"];
13
+
"text/html" = ["firefox.desktop"];
14
+
"application/x-extension-htm" = ["firefox.desktop"];
15
+
"application/x-extension-html" = ["firefox.desktop"];
16
+
"application/x-extension-shtml" = ["firefox.desktop"];
17
+
"application/xhtml+xml" = ["firefox.desktop"];
18
+
"application/x-extension-xhtml" = ["firefox.desktop"];
19
+
"application/x-extension-xht" = ["firefox.desktop"];
20
+
};
21
+
defaultApplications = {
22
+
"x-scheme-handler/http" = ["firefox.desktop"];
23
+
"x-scheme-handler/https" = ["firefox.desktop"];
24
+
"x-scheme-handler/chrome" = ["firefox.desktop"];
25
+
"text/html" = ["firefox.desktop"];
26
+
"application/x-extension-htm" = ["firefox.desktop"];
27
+
"application/x-extension-html" = ["firefox.desktop"];
28
+
"application/x-extension-shtml" = ["firefox.desktop"];
29
+
"application/xhtml+xml" = ["firefox.desktop"];
30
+
"application/x-extension-xhtml" = ["firefox.desktop"];
31
+
"application/x-extension-xht" = ["firefox.desktop"];
32
+
};
33
+
};
34
+
35
+
imports = [
36
+
./hyprland.nix
37
+
./waybar.nix
38
+
./rofi.nix
39
+
../../common/home/git.nix
40
+
../../common/home/shell.nix
41
+
../../common/home/helix.nix
42
+
];
43
+
44
+
services.dunst.enable = true;
45
+
xdg.configFile = {
46
+
"ghostty/config".source = ./dotfiles/ghostty;
47
+
};
48
+
}
+36
belaf/home/dotfiles/ghostty
+36
belaf/home/dotfiles/ghostty
···
1
+
# Scheme: Catppuccin Macchiato
2
+
# Generated by Ghostty Base16 Converter
3
+
background = 24273a
4
+
foreground = cad3f5
5
+
6
+
selection-background = 363a4f
7
+
selection-foreground = 24273a
8
+
9
+
palette = 0=#24273a
10
+
palette = 1=#ed8796
11
+
palette = 2=#a6da95
12
+
palette = 3=#eed49f
13
+
palette = 4=#8aadf4
14
+
palette = 5=#c6a0f6
15
+
palette = 6=#8bd5ca
16
+
palette = 7=#cad3f5
17
+
palette = 8=#494d64
18
+
palette = 9=#ed8796
19
+
palette = 10=#a6da95
20
+
palette = 11=#eed49f
21
+
palette = 12=#8aadf4
22
+
palette = 13=#c6a0f6
23
+
palette = 14=#8bd5ca
24
+
palette = 15=#b7bdf8
25
+
palette = 16=#f5a97f
26
+
palette = 17=#f0c6c6
27
+
palette = 18=#1e2030
28
+
palette = 19=#363a4f
29
+
palette = 20=#5b6078
30
+
palette = 21=#f4dbd6
31
+
32
+
keybind = ctrl+alt+v=new_split:right
33
+
font-family=VictorMono NFP SemiBold
34
+
35
+
window-decoration = true
36
+
gtk-titlebar = false
+162
belaf/home/hyprland.nix
+162
belaf/home/hyprland.nix
···
1
+
{pkgs, ...}: {
2
+
wayland.windowManager.hyprland = let
3
+
getExe = name: "${pkgs."${name}"}/bin/${name}";
4
+
in {
5
+
enable = true;
6
+
systemd.enable = true;
7
+
settings = {
8
+
exec-once = [
9
+
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
10
+
];
11
+
monitor = ",preferred,auto,auto";
12
+
13
+
env = [
14
+
"XCURSOR_SIZE,24"
15
+
"QT_QPA_PLATFORMTHEME,qt5ct" # change to qt6ct if you have that
16
+
];
17
+
18
+
"$powermenu" = "${./dotfiles/powermenu.sh}";
19
+
"$menu" = "${pkgs.rofi-wayland-unwrapped}/bin/rofi -show drun";
20
+
21
+
input = {
22
+
kb_layout = "us";
23
+
kb_variant = "intl";
24
+
follow_mouse = "1";
25
+
26
+
touchpad = {
27
+
natural_scroll = "no";
28
+
};
29
+
30
+
accel_profile = "flat";
31
+
sensitivity = "0";
32
+
};
33
+
34
+
general = {
35
+
gaps_in = "5";
36
+
gaps_out = "20";
37
+
border_size = "2";
38
+
layout = "dwindle";
39
+
allow_tearing = "false";
40
+
};
41
+
42
+
decoration = {
43
+
rounding = "10";
44
+
45
+
blur = {
46
+
enabled = "true";
47
+
size = "3";
48
+
passes = "1";
49
+
};
50
+
51
+
drop_shadow = "yes";
52
+
shadow_range = "4";
53
+
shadow_render_power = "3";
54
+
};
55
+
56
+
animations = {
57
+
enabled = "yes";
58
+
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
59
+
animation = [
60
+
"windows, 1, 7, myBezier"
61
+
"windowsOut, 1, 7, default, popin 80%"
62
+
"border, 1, 10, default"
63
+
"borderangle, 1, 8, default"
64
+
"fade, 1, 7, default"
65
+
"workspaces, 1, 6, default"
66
+
];
67
+
};
68
+
69
+
dwindle = {
70
+
pseudotile = "yes";
71
+
preserve_split = "yes";
72
+
};
73
+
74
+
master = {
75
+
new_status = "master";
76
+
};
77
+
78
+
gestures = {
79
+
workspace_swipe = "off";
80
+
};
81
+
82
+
misc = {
83
+
force_default_wallpaper = "-1";
84
+
};
85
+
86
+
windowrulev2 = [
87
+
# Make pavucontrol float
88
+
"float,class:^(pavucontrol)$"
89
+
"opacity 0.0 override,class:^(xwaylandvideobridge)$"
90
+
"noanim,class:^(xwaylandvideobridge)$"
91
+
"noinitialfocus,class:^(xwaylandvideobridge)$"
92
+
"noblur,class:^(xwaylandvideobridge)$"
93
+
];
94
+
95
+
"$mainMod" = "SUPER";
96
+
97
+
bind = let
98
+
generateBindings = keyBind: workspacePrefix: i: "${keyBind}, ${toString i}, ${workspacePrefix}, ${toString i}";
99
+
screenshot = "${getExe "grim"} -g \"$(${getExe "slurp"} -d)\" -";
100
+
in
101
+
[
102
+
"$mainMod, Q, exec, ghostty"
103
+
"$mainMod SHIFT, Q, exec, [float] ghostty --background-opacity=0.85"
104
+
"$mainMod, C, killactive"
105
+
"$mainMod, M, exit"
106
+
"$mainMod, V, togglefloating"
107
+
"$mainMod, R, exec, $menu"
108
+
"$mainMod, L, exec, $powermenu"
109
+
"$mainMod, P, pseudo"
110
+
"$mainMod, J, togglesplit"
111
+
"$mainMod, left, movefocus, l"
112
+
"$mainMod, right, movefocus, r"
113
+
"$mainMod, up, movefocus, u"
114
+
"$mainMod, down, movefocus, d"
115
+
116
+
# Screenshot
117
+
"$mainMod, S, exec, ${screenshot} | wl-copy"
118
+
"$mainMod SHIFT, S, exec, ${screenshot} | ${getExe "swappy"} -f - -o - | wl-copy"
119
+
120
+
# Scroll through worskpaces
121
+
"$mainMod, mouse_down, workspace, e+1"
122
+
"$mainMod, mouse_up, workspace, e-1"
123
+
124
+
# Move workspace to another screen
125
+
"$mainMod CTRL, left, movecurrentworkspacetomonitor, l"
126
+
"$mainMod CTRL, right, movecurrentworkspacetomonitor, r"
127
+
"$mainMod CTRL, up, movecurrentworkspacetomonitor, u"
128
+
"$mainMod CTRL, down, movecurrentworkspacetomonitor, d"
129
+
"$mainMod CTRL, h, movecurrentworkspacetomonitor, l"
130
+
"$mainMod CTRL, l, movecurrentworkspacetomonitor, r"
131
+
"$mainMod CTRL, k, movecurrentworkspacetomonitor, u"
132
+
"$mainMod CTRL, j, movecurrentworkspacetomonitor, d"
133
+
]
134
+
++ map
135
+
(i: generateBindings "$mainMod" "workspace" i)
136
+
(pkgs.lib.range 1 9)
137
+
++ map
138
+
(i: generateBindings "$mainMod SHIFT" "movetoworkspace" i)
139
+
(pkgs.lib.range 1 9);
140
+
141
+
bindm = [
142
+
"$mainMod, mouse:272, movewindow"
143
+
"$mainMod, mouse:273, resizewindow"
144
+
];
145
+
146
+
bindle = [
147
+
",XF86MonBrightnessUp, exec, ${getExe "brightnessctl"} set +5%"
148
+
",XF86MonBrightnessDown, exec, ${getExe "brightnessctl"} set 5%-"
149
+
",XF86KbdBrightnessUp, exec, ${getExe "brightnessctl"} -d asus::kbd_backlight set +1"
150
+
",XF86KbdBrightnessDown, exec, ${getExe "brightnessctl"} -d asus::kbd_backlight set 1-"
151
+
];
152
+
153
+
bindl = [
154
+
",XF86AudioPlay, exec, ${getExe "playerctl"} play-pause"
155
+
",XF86AudioStop, exec, ${getExe "playerctl"} pause"
156
+
",XF86AudioPause, exec, ${getExe "playerctl"} pause"
157
+
",XF86AudioPrev, exec, ${getExe "playerctl"} previous"
158
+
",XF86AudioNext, exec, ${getExe "playerctl"} next"
159
+
];
160
+
};
161
+
};
162
+
}
+116
belaf/home/rofi.nix
+116
belaf/home/rofi.nix
···
1
+
{
2
+
pkgs,
3
+
config,
4
+
...
5
+
}: let
6
+
inherit (config.lib.formats.rasi) mkLiteral;
7
+
in {
8
+
programs.rofi.enable = true;
9
+
programs.rofi.package = pkgs.rofi-wayland-unwrapped;
10
+
programs.rofi.theme = {
11
+
"*" = {
12
+
bg-col = mkLiteral "#232634";
13
+
bg-col-light = mkLiteral "#303446";
14
+
border-col = mkLiteral "#303446";
15
+
selected-col = mkLiteral "#303446";
16
+
blue = mkLiteral "#7DC4E4";
17
+
fg-col = mkLiteral "#C5CFF5";
18
+
fg-col2 = mkLiteral "#F7768E";
19
+
grey = mkLiteral "#B7BDF8";
20
+
width = mkLiteral "550";
21
+
};
22
+
23
+
"element-text" = {
24
+
"background-color" = mkLiteral "inherit";
25
+
"text-color" = mkLiteral "inherit";
26
+
};
27
+
"element-icon" = {
28
+
"background-color" = mkLiteral "inherit";
29
+
};
30
+
"mode-switcher" = {
31
+
"background-color" = mkLiteral "inherit";
32
+
};
33
+
window = {
34
+
"border-radius" = 12;
35
+
height = 360;
36
+
border = 3;
37
+
"border-color" = mkLiteral "@border-col";
38
+
"background-color" = mkLiteral "@bg-col";
39
+
};
40
+
mainbox = {
41
+
"background-color" = mkLiteral "@bg-col";
42
+
};
43
+
inputbar = {
44
+
children = map mkLiteral ["prompt" "entry"];
45
+
"background-color" = mkLiteral "@bg-col";
46
+
"border-radius" = 5;
47
+
padding = 2;
48
+
};
49
+
prompt = {
50
+
"background-color" = mkLiteral "@blue";
51
+
padding = 6;
52
+
"text-color" = mkLiteral "@bg-col";
53
+
"border-radius" = 3;
54
+
margin = mkLiteral "20px 0px 0px 20px";
55
+
};
56
+
"textbox-prompt-colon" = {
57
+
expand = false;
58
+
str = ":";
59
+
};
60
+
entry = {
61
+
padding = 6;
62
+
margin = mkLiteral "20px 0px 0px 10px";
63
+
"text-color" = mkLiteral "@fg-col";
64
+
"background-color" = mkLiteral "@bg-col";
65
+
};
66
+
listview = {
67
+
border = mkLiteral "0px 0px 0px";
68
+
padding = mkLiteral "6px 0px 0px";
69
+
margin = mkLiteral "10px 0px 0px 20px";
70
+
columns = 2;
71
+
"background-color" = mkLiteral "@bg-col";
72
+
};
73
+
element = {
74
+
padding = 5;
75
+
"background-color" = mkLiteral "@bg-col";
76
+
"text-color" = mkLiteral "@fg-col";
77
+
};
78
+
"element-icon" = {
79
+
size = 25;
80
+
};
81
+
"element selected" = {
82
+
"background-color" = mkLiteral "@selected-col";
83
+
"text-color" = mkLiteral "@fg-col2";
84
+
};
85
+
"mode-switcher" = {
86
+
spacing = 0;
87
+
};
88
+
button = {
89
+
padding = 10;
90
+
"background-color" = mkLiteral "@bg-col-light";
91
+
"text-color" = mkLiteral "@grey";
92
+
"vertical-align" = mkLiteral "0.5";
93
+
"horizontal-align" = mkLiteral "0.5";
94
+
};
95
+
"button selected" = {
96
+
"background-color" = mkLiteral "@bg-col";
97
+
"text-color" = mkLiteral "@blue";
98
+
};
99
+
};
100
+
programs.rofi.extraConfig = {
101
+
modi = "run,drun,window";
102
+
lines = 8;
103
+
font = "Iosevka 10.5";
104
+
show-icons = true;
105
+
icon-theme = "Papirus-Dark";
106
+
terminal = "ghostty";
107
+
drun-display-format = "{icon} {name}";
108
+
location = 0;
109
+
disable-history = false;
110
+
hide-scrollbar = true;
111
+
display-drun = " Apps ";
112
+
display-run = " Run ";
113
+
display-window = " window";
114
+
sidebar-mode = true;
115
+
};
116
+
}
+288
belaf/home/waybar.nix
+288
belaf/home/waybar.nix
···
1
+
{pkgs, ...}: let
2
+
getExe = name: "${pkgs.${name}}/bin/${name}";
3
+
in {
4
+
programs.waybar = {
5
+
enable = true;
6
+
systemd.enable = true;
7
+
systemd.target = "hyprland-session.target";
8
+
settings.mainBar = let
9
+
hctl = "${pkgs.hyprland}/bin/hyprctl";
10
+
in {
11
+
font = "VictorMono NFP SemiBold";
12
+
height = 50;
13
+
layer = "top";
14
+
position = "top";
15
+
output = "eDP-1";
16
+
spacing = 7;
17
+
modules-left = ["custom/launcher" "cpu" "temperature" "backlight"];
18
+
modules-center = ["hyprland/workspaces"];
19
+
modules-right = ["pulseaudio" "network" "battery" "clock" "custom/powermenu"];
20
+
21
+
"hyprland/workspaces" = {
22
+
disable-scroll = true;
23
+
all-outputs = true;
24
+
on-click = "activate";
25
+
on-scroll-up = "${hctl} dispatch workspace e+1";
26
+
on-scroll-down = "${hctl} dispatch workspace e-1";
27
+
};
28
+
29
+
"custom/launcher" = {
30
+
interval = "once";
31
+
format = "";
32
+
on-click = "${hctl} keyword exec '$menu'";
33
+
tooltip = false;
34
+
};
35
+
36
+
cpu = {
37
+
interval = 10;
38
+
format = " {usage}%";
39
+
max-length = 10;
40
+
};
41
+
42
+
temperature = {
43
+
hwmon-path-abs = "/sys/devices/platform/coretemp.0/hwmon";
44
+
input-filename = "tem1_input";
45
+
format = " {temperatureC}°C";
46
+
on-click = "psensor";
47
+
};
48
+
49
+
backlight = let
50
+
bctl = getExe "brightnessctl";
51
+
in {
52
+
device = "eDP-1";
53
+
max-length = "4";
54
+
format = "{icon} {percent}%";
55
+
format-icons = ["" "" "" "" "" "" "" "" ""];
56
+
on-scroll-up = pkgs.writeShellScript "brightness.sh" ''
57
+
MIN_BRIGHTNESS=5
58
+
current_brightness=$(${bctl} g)
59
+
max_brightness=$(${bctl} m)
60
+
min_brightness_raw=$((max_brightness * MIN_BRIGHTNESS / 100))
61
+
scaling_factor=30
62
+
decrement=$((max_brightness / scaling_factor))
63
+
new_brightness_raw=$((current_brightness - decrement))
64
+
if [ "$new_brightness_raw" -lt "$min_brightness_raw" ]; then
65
+
new_brightness_raw=$min_brightness_raw
66
+
fi
67
+
${bctl} set "$new_brightness_raw"
68
+
'';
69
+
on-scroll-down = "${bctl} set +5%";
70
+
};
71
+
72
+
pulseaudio = {
73
+
format = "{icon} {volume}%";
74
+
format-bluetooth = "{icon} {volume}% {format_source}";
75
+
format-bluetooth-muted = " {icon} {format_source}";
76
+
format-muted = "婢";
77
+
format-icons = {
78
+
headphone = "";
79
+
hands-free = "";
80
+
headset = "";
81
+
phone = "";
82
+
portable = "";
83
+
car = "";
84
+
default = ["" "" ""];
85
+
};
86
+
on-click = "${getExe "pavucontrol"}";
87
+
};
88
+
89
+
network = {
90
+
format-wifi = "直 {signalStrength}%";
91
+
format-ethernet = " wired";
92
+
format-disconnected = "睊 ";
93
+
};
94
+
95
+
battery = {
96
+
bat = "CMB0";
97
+
adapter = "ADP0";
98
+
interval = 60;
99
+
states = {
100
+
warning = 30;
101
+
critical = 15;
102
+
};
103
+
max-length = 20;
104
+
format = "{icon} {capacity}%";
105
+
format-warning = "{icon} {capacity}%";
106
+
format-critical = "{icon} {capacity}%";
107
+
format-charging = " {capacity}%";
108
+
format-plugged = " {capacity}%";
109
+
format-alt = "{icon} {time}";
110
+
format-full = " {capacity}%";
111
+
format-icons = [" " " " " " " " " "];
112
+
};
113
+
114
+
clock = {
115
+
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
116
+
format = " {:%H:%M:%S}";
117
+
};
118
+
119
+
"custom/powermenu" = {
120
+
format = "";
121
+
on-click = "${hctl} keyword exec '$powermenu'";
122
+
tooltip = false;
123
+
};
124
+
};
125
+
126
+
style = ''
127
+
@define-color base #1e1e2e;
128
+
@define-color mantle #181825;
129
+
@define-color crust #11111b;
130
+
131
+
@define-color text #cdd6f4;
132
+
@define-color subtext0 #a6adc8;
133
+
@define-color subtext1 #bac2de;
134
+
135
+
@define-color surface0 #313244;
136
+
@define-color surface1 #45475a;
137
+
@define-color surface2 #585b70;
138
+
139
+
@define-color overlay0 #6c7086;
140
+
@define-color overlay1 #7f849c;
141
+
@define-color overlay2 #9399b2;
142
+
143
+
@define-color blue #89b4fa;
144
+
@define-color lavender #b4befe;
145
+
@define-color sapphire #74c7ec;
146
+
@define-color sky #89dceb;
147
+
@define-color teal #94e2d5;
148
+
@define-color green #a6e3a1;
149
+
@define-color yellow #f9e2af;
150
+
@define-color peach #fab387;
151
+
@define-color maroon #eba0ac;
152
+
@define-color red #f38ba8;
153
+
@define-color mauve #cba6f7;
154
+
@define-color pink #f5c2e7;
155
+
@define-color flamingo #f2cdcd;
156
+
@define-color rosewater #f5e0dc;
157
+
158
+
/* margin: top right bottom left */
159
+
/* Spacing outside the element */
160
+
161
+
/* padding: top right bottom left */
162
+
/* Spacing inside the element */
163
+
164
+
* {
165
+
font-family: "JetBrainsMonoNL NFM Bold";
166
+
font-size: 17px;
167
+
}
168
+
169
+
window#waybar {
170
+
background-color: @crust;
171
+
color: @text;
172
+
transition-property: background-color;
173
+
transition-duration: 0.5s;
174
+
border-radius: 0px;
175
+
transition-duration: 0.5s;
176
+
margin: 16px 16px;
177
+
}
178
+
179
+
window#waybar.hidden {
180
+
opacity: 0.2;
181
+
}
182
+
183
+
#workspaces button {
184
+
color: @text;
185
+
background: @background3;
186
+
border-radius: 8px;
187
+
padding: 0px 10px 0px 10px;
188
+
margin: 7px 5px 10px 5px;
189
+
border: 1px solid @subtext1;
190
+
}
191
+
192
+
#workspaces button:hover {
193
+
background: @surface0;
194
+
color: @text;
195
+
}
196
+
197
+
#workspaces button.active {
198
+
color: @crust;
199
+
background: @overlay2;
200
+
border: none;
201
+
}
202
+
203
+
#custom-launcher,
204
+
#clock,
205
+
#battery,
206
+
#cpu,
207
+
#temperature,
208
+
#backlight,
209
+
#network,
210
+
#pulseaudio,
211
+
#custom-dunst,
212
+
#custom-powermenu {
213
+
padding: 0px 20px;
214
+
margin: 7px 0px 10px 0px;
215
+
border-radius: 8px;
216
+
color: @crust;
217
+
}
218
+
219
+
#window,
220
+
#custom-launcher {
221
+
padding: 0px 25px 0px 20px;
222
+
margin: 7px 0px 10px 20px;
223
+
background-color: @mauve;
224
+
}
225
+
226
+
#cpu {
227
+
background-color: @lavender;
228
+
}
229
+
230
+
#temperature {
231
+
background-color: @blue;
232
+
}
233
+
234
+
#backlight {
235
+
background-color: @sapphire;
236
+
}
237
+
238
+
#custom-dunst {
239
+
padding: 0px 20px 0px 13px;
240
+
background-color: @sky;
241
+
}
242
+
243
+
#pulseaudio {
244
+
padding: 0px 20px 0px 17px;
245
+
background-color: @teal;
246
+
}
247
+
248
+
#network {
249
+
padding: 0px 15px 0px 20px;
250
+
background-color: @green;
251
+
}
252
+
253
+
#battery {
254
+
background-color: @yellow;
255
+
}
256
+
257
+
#clock {
258
+
background-color: @peach;
259
+
}
260
+
261
+
#custom-powermenu {
262
+
padding: 0px 25px 0px 20px;
263
+
margin: 7px 20px 10px 0px;
264
+
background-color: @maroon;
265
+
}
266
+
267
+
@keyframes blink {
268
+
to {
269
+
background-color: rgba(30, 34, 42, 0.5);
270
+
color: #abb2bf;
271
+
}
272
+
}
273
+
274
+
#battery.critical:not(.charging) {
275
+
color: #f53c3c;
276
+
animation-name: blink;
277
+
animation-duration: 0.5s;
278
+
animation-timing-function: linear;
279
+
animation-iteration-count: infinite;
280
+
animation-direction: alternate;
281
+
}
282
+
283
+
label:focus {
284
+
background-color: #000000;
285
+
}
286
+
'';
287
+
};
288
+
}
+35
common/home/git.nix
+35
common/home/git.nix
···
1
+
{pkgs, ...}: {
2
+
programs.git = {
3
+
enable = true;
4
+
userName = "Karitham";
5
+
userEmail = "kar@karitham.dev";
6
+
signing = {
7
+
key = "~/.ssh/id_ed25519.pub";
8
+
signByDefault = true;
9
+
};
10
+
aliases = {
11
+
co = "checkout";
12
+
ci = "commit";
13
+
st = "status";
14
+
br = "branch";
15
+
hist = "log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short";
16
+
type = "cat-file -t";
17
+
dump = "cat-file -p";
18
+
dft = "difftool";
19
+
};
20
+
extraConfig = {
21
+
init.defaultBranch = "main";
22
+
pull.rebase = true;
23
+
push.autoSetupRemote = true;
24
+
url."git@github.com:".insteadOf = "https://github.com/";
25
+
gpg.format = "ssh";
26
+
gpg.ssh.defaultKeyCommand = "ssh-add -L";
27
+
core.excludesfile = "~/.gitignore";
28
+
core.editor = "hx";
29
+
pager.difftool = true;
30
+
diff.tool = "difftastic";
31
+
difftool.prompt = false;
32
+
difftool.difftastic.cmd = "${pkgs.difftastic}/bin/difft --color auto --background light --display side-by-side \"$LOCAL\" \"$REMOTE\"";
33
+
};
34
+
};
35
+
}
+49
common/home/helix.nix
+49
common/home/helix.nix
···
1
+
{...}: {
2
+
programs.helix = {
3
+
enable = true;
4
+
defaultEditor = true;
5
+
6
+
languages.auto-format = true;
7
+
languages.language = [
8
+
{
9
+
name = "nix";
10
+
formatter.command = "alejandra";
11
+
}
12
+
];
13
+
14
+
settings = {
15
+
# theme = "base16_transparent";
16
+
17
+
editor = {
18
+
line-number = "relative";
19
+
completion-trigger-len = 1;
20
+
bufferline = "multiple";
21
+
color-modes = true;
22
+
statusline = {
23
+
left = [
24
+
"mode"
25
+
"spacer"
26
+
"diagnostics"
27
+
"version-control"
28
+
"file-name"
29
+
"read-only-indicator"
30
+
"file-modification-indicator"
31
+
"spinner"
32
+
];
33
+
right = [
34
+
"file-encoding"
35
+
"file-type"
36
+
"selections"
37
+
"position"
38
+
];
39
+
};
40
+
cursor-shape.insert = "bar";
41
+
whitespace.render.tab = "all";
42
+
indent-guides = {
43
+
render = true;
44
+
character = "┊";
45
+
};
46
+
};
47
+
};
48
+
};
49
+
}
+44
common/home/shell.nix
+44
common/home/shell.nix
···
1
+
{...}: {
2
+
programs = {
3
+
zsh = {
4
+
enable = true;
5
+
enableCompletion = true;
6
+
autosuggestion.enable = true;
7
+
syntaxHighlighting.enable = true;
8
+
shellAliases = {
9
+
gs = "git status";
10
+
ls = "eza --git";
11
+
update = "sudo nixos-rebuild switch --accept-flake-config --flake";
12
+
k = "kubectl";
13
+
kall = "kubectl get $(kubectl api-resources --namespaced=true --no-headers -o name | egrep -v 'events|nodes' | paste -s -d, - ) --no-headers";
14
+
};
15
+
};
16
+
17
+
starship.enable = true;
18
+
starship.settings = {
19
+
kubernetes = {
20
+
disabled = false;
21
+
};
22
+
};
23
+
24
+
direnv = {
25
+
enable = true;
26
+
nix-direnv.enable = true;
27
+
stdlib = ''
28
+
alias() {
29
+
mkdir -p .direnv/bin
30
+
echo "#!/usr/bin/env sh
31
+
$(which $2) \$@" >.direnv/bin/$1
32
+
chmod +x .direnv/bin/$1
33
+
}
34
+
use_wg() {
35
+
if [[ $1 ]] ; then
36
+
wg-quick up $1
37
+
else
38
+
wg-quick up ./*.conf
39
+
fi
40
+
}
41
+
'';
42
+
};
43
+
};
44
+
}
+38
common/seedbox.nix
+38
common/seedbox.nix
···
1
+
{pkgs, ...}: {
2
+
nixpkgs.config = {
3
+
allowUnfree = true;
4
+
};
5
+
6
+
services.plex.openFirewall = true;
7
+
services.plex.enable = true;
8
+
services.plex.user = "rtorrent";
9
+
10
+
services.radarr.openFirewall = true;
11
+
services.radarr.enable = true;
12
+
13
+
services.sonarr.openFirewall = true;
14
+
services.sonarr.enable = true;
15
+
16
+
services.rtorrent.openFirewall = true;
17
+
services.rtorrent.enable = true;
18
+
19
+
# jesec-flood for ui
20
+
systemd.services.flood = {
21
+
enable = true;
22
+
description = "flood";
23
+
after = [
24
+
"network.target"
25
+
];
26
+
wantedBy = [
27
+
"multi-user.target"
28
+
];
29
+
30
+
serviceConfig = {
31
+
Type = "simple";
32
+
User = "rtorrent";
33
+
ExecStart = "${pkgs.flood}/bin/flood --port=2323 --host=0.0.0.0";
34
+
Restart = "on-failure";
35
+
RestartSec = 3;
36
+
};
37
+
};
38
+
}
+42
faputa/default.nix
+42
faputa/default.nix
···
1
+
{pkgs, ...}: {
2
+
imports = [
3
+
./hardware-configuration.nix
4
+
../common/seedbox.nix
5
+
];
6
+
7
+
nix.settings = {
8
+
experimental-features = ["nix-command" "flakes"];
9
+
auto-optimise-store = true;
10
+
};
11
+
nix.gc = {
12
+
automatic = true;
13
+
dates = "weekly";
14
+
options = "--delete-older-than 14d";
15
+
};
16
+
# Allow unfree packages
17
+
nixpkgs.config = {
18
+
allowUnfree = true;
19
+
};
20
+
21
+
boot.loader.systemd-boot.enable = true;
22
+
boot.loader.efi.canTouchEfiVariables = true;
23
+
boot.supportedFilesystems = ["bcachefs"];
24
+
boot.kernelPackages = pkgs.linuxPackages_latest;
25
+
26
+
networking.hostName = "faputa"; # Define your hostname.
27
+
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
28
+
29
+
time.timeZone = "Europe/Paris";
30
+
services = {
31
+
tailscale.enable = true;
32
+
tailscale.useRoutingFeatures = "server";
33
+
openssh.enable = true;
34
+
};
35
+
environment.systemPackages = with pkgs; [
36
+
helix
37
+
git
38
+
tailscale
39
+
];
40
+
41
+
system.stateVersion = "23.11"; # Did you read the comment?
42
+
}
+47
faputa/hardware-configuration.nix
+47
faputa/hardware-configuration.nix
···
1
+
# Do not modify this file! It was generated by ‘nixos-generate-config’
2
+
# and may be overwritten by future invocations. Please make changes
3
+
# to /etc/nixos/configuration.nix instead.
4
+
{
5
+
config,
6
+
lib,
7
+
modulesPath,
8
+
...
9
+
}: {
10
+
imports = [
11
+
(modulesPath + "/installer/scan/not-detected.nix")
12
+
];
13
+
14
+
boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "sd_mod" "rtsx_usb_sdmmc"];
15
+
boot.initrd.kernelModules = [];
16
+
boot.kernelModules = ["kvm-intel"];
17
+
boot.extraModulePackages = [];
18
+
19
+
fileSystems."/" = {
20
+
device = "/dev/disk/by-uuid/c662460c-2d64-4821-9a8e-00bd30b393d5";
21
+
fsType = "ext4";
22
+
};
23
+
24
+
fileSystems."/boot" = {
25
+
device = "/dev/disk/by-uuid/12CE-A600";
26
+
fsType = "vfat";
27
+
};
28
+
29
+
fileSystems."/media" = {
30
+
device = "UUID=5fac4140-d0e4-410d-8652-f15fb4701c9d";
31
+
fsType = "bcachefs";
32
+
};
33
+
34
+
swapDevices = [];
35
+
36
+
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
37
+
# (the default) this is the recommended approach. When using systemd-networkd it's
38
+
# still possible to use this option, but it's recommended to use it in conjunction
39
+
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
40
+
networking.useDHCP = lib.mkDefault true;
41
+
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
42
+
# networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
43
+
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
44
+
45
+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
46
+
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
47
+
}
+604
flake.lock
+604
flake.lock
···
1
+
{
2
+
"nodes": {
3
+
"aquamarine": {
4
+
"inputs": {
5
+
"hyprutils": [
6
+
"hyprland",
7
+
"hyprutils"
8
+
],
9
+
"hyprwayland-scanner": [
10
+
"hyprland",
11
+
"hyprwayland-scanner"
12
+
],
13
+
"nixpkgs": [
14
+
"hyprland",
15
+
"nixpkgs"
16
+
],
17
+
"systems": [
18
+
"hyprland",
19
+
"systems"
20
+
]
21
+
},
22
+
"locked": {
23
+
"lastModified": 1723405438,
24
+
"narHash": "sha256-bpmC2m7OhlDvqgQZdZ2jBLyeIkq/Jld3X4bqRAxBSp8=",
25
+
"owner": "hyprwm",
26
+
"repo": "aquamarine",
27
+
"rev": "9312aa28271c91e5d67ecb9def527b2bbcff0e66",
28
+
"type": "github"
29
+
},
30
+
"original": {
31
+
"owner": "hyprwm",
32
+
"repo": "aquamarine",
33
+
"type": "github"
34
+
}
35
+
},
36
+
"catppuccin": {
37
+
"locked": {
38
+
"lastModified": 1722997334,
39
+
"narHash": "sha256-vE5FcKVQ3E0txJKt5w3vOlfcN1XoTAlxK9PnQ/CJavA=",
40
+
"owner": "catppuccin",
41
+
"repo": "nix",
42
+
"rev": "66f4ea170093b62f319f41cebd2337a51b225c5a",
43
+
"type": "github"
44
+
},
45
+
"original": {
46
+
"owner": "catppuccin",
47
+
"repo": "nix",
48
+
"type": "github"
49
+
}
50
+
},
51
+
"flake-compat": {
52
+
"flake": false,
53
+
"locked": {
54
+
"lastModified": 1696426674,
55
+
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
56
+
"owner": "edolstra",
57
+
"repo": "flake-compat",
58
+
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
59
+
"type": "github"
60
+
},
61
+
"original": {
62
+
"owner": "edolstra",
63
+
"repo": "flake-compat",
64
+
"type": "github"
65
+
}
66
+
},
67
+
"flake-utils": {
68
+
"inputs": {
69
+
"systems": "systems"
70
+
},
71
+
"locked": {
72
+
"lastModified": 1705309234,
73
+
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
74
+
"owner": "numtide",
75
+
"repo": "flake-utils",
76
+
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
77
+
"type": "github"
78
+
},
79
+
"original": {
80
+
"owner": "numtide",
81
+
"repo": "flake-utils",
82
+
"type": "github"
83
+
}
84
+
},
85
+
"flake-utils_2": {
86
+
"inputs": {
87
+
"systems": "systems_2"
88
+
},
89
+
"locked": {
90
+
"lastModified": 1710146030,
91
+
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
92
+
"owner": "numtide",
93
+
"repo": "flake-utils",
94
+
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
95
+
"type": "github"
96
+
},
97
+
"original": {
98
+
"owner": "numtide",
99
+
"repo": "flake-utils",
100
+
"type": "github"
101
+
}
102
+
},
103
+
"flake-utils_3": {
104
+
"inputs": {
105
+
"systems": "systems_3"
106
+
},
107
+
"locked": {
108
+
"lastModified": 1705309234,
109
+
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
110
+
"owner": "numtide",
111
+
"repo": "flake-utils",
112
+
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
113
+
"type": "github"
114
+
},
115
+
"original": {
116
+
"owner": "numtide",
117
+
"repo": "flake-utils",
118
+
"type": "github"
119
+
}
120
+
},
121
+
"ghostty": {
122
+
"inputs": {
123
+
"nixpkgs-stable": [
124
+
"nixpkgs"
125
+
],
126
+
"nixpkgs-unstable": [
127
+
"nixpkgs"
128
+
],
129
+
"zig": "zig",
130
+
"zls": "zls"
131
+
},
132
+
"locked": {
133
+
"lastModified": 1723481173,
134
+
"narHash": "sha256-4gQy/B8PEdoU8BgrADdBlqZEZ8pY+UW2qOoVRtkvO3g=",
135
+
"ref": "refs/heads/main",
136
+
"rev": "3e0a5d3a73a433cd5840165abd0a51c433505045",
137
+
"revCount": 6898,
138
+
"type": "git",
139
+
"url": "ssh://git@github.com/ghostty-org/ghostty"
140
+
},
141
+
"original": {
142
+
"type": "git",
143
+
"url": "ssh://git@github.com/ghostty-org/ghostty"
144
+
}
145
+
},
146
+
"gitignore": {
147
+
"inputs": {
148
+
"nixpkgs": [
149
+
"ghostty",
150
+
"zls",
151
+
"nixpkgs"
152
+
]
153
+
},
154
+
"locked": {
155
+
"lastModified": 1709087332,
156
+
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
157
+
"owner": "hercules-ci",
158
+
"repo": "gitignore.nix",
159
+
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
160
+
"type": "github"
161
+
},
162
+
"original": {
163
+
"owner": "hercules-ci",
164
+
"repo": "gitignore.nix",
165
+
"type": "github"
166
+
}
167
+
},
168
+
"home-manager": {
169
+
"inputs": {
170
+
"nixpkgs": [
171
+
"nixpkgs"
172
+
]
173
+
},
174
+
"locked": {
175
+
"lastModified": 1723399884,
176
+
"narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=",
177
+
"owner": "nix-community",
178
+
"repo": "home-manager",
179
+
"rev": "086f619dd991a4d355c07837448244029fc2d9ab",
180
+
"type": "github"
181
+
},
182
+
"original": {
183
+
"owner": "nix-community",
184
+
"repo": "home-manager",
185
+
"type": "github"
186
+
}
187
+
},
188
+
"hyprcursor": {
189
+
"inputs": {
190
+
"hyprlang": [
191
+
"hyprland",
192
+
"hyprlang"
193
+
],
194
+
"nixpkgs": [
195
+
"hyprland",
196
+
"nixpkgs"
197
+
],
198
+
"systems": [
199
+
"hyprland",
200
+
"systems"
201
+
]
202
+
},
203
+
"locked": {
204
+
"lastModified": 1722623071,
205
+
"narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=",
206
+
"owner": "hyprwm",
207
+
"repo": "hyprcursor",
208
+
"rev": "912d56025f03d41b1ad29510c423757b4379eb1c",
209
+
"type": "github"
210
+
},
211
+
"original": {
212
+
"owner": "hyprwm",
213
+
"repo": "hyprcursor",
214
+
"type": "github"
215
+
}
216
+
},
217
+
"hyprland": {
218
+
"inputs": {
219
+
"aquamarine": "aquamarine",
220
+
"hyprcursor": "hyprcursor",
221
+
"hyprlang": "hyprlang",
222
+
"hyprutils": "hyprutils",
223
+
"hyprwayland-scanner": "hyprwayland-scanner",
224
+
"nixpkgs": "nixpkgs",
225
+
"systems": "systems_4",
226
+
"xdph": "xdph"
227
+
},
228
+
"locked": {
229
+
"lastModified": 1723579231,
230
+
"narHash": "sha256-PL9C3aOetj+TS+vXvNhh7q5bm3g70oakg+iSu5eQBUQ=",
231
+
"ref": "refs/heads/main",
232
+
"rev": "3b4aabe04c7756fb0a70d78b6f0e701228f46345",
233
+
"revCount": 5087,
234
+
"submodules": true,
235
+
"type": "git",
236
+
"url": "https://github.com/hyprwm/Hyprland"
237
+
},
238
+
"original": {
239
+
"submodules": true,
240
+
"type": "git",
241
+
"url": "https://github.com/hyprwm/Hyprland"
242
+
}
243
+
},
244
+
"hyprland-protocols": {
245
+
"inputs": {
246
+
"nixpkgs": [
247
+
"hyprland",
248
+
"xdph",
249
+
"nixpkgs"
250
+
],
251
+
"systems": [
252
+
"hyprland",
253
+
"xdph",
254
+
"systems"
255
+
]
256
+
},
257
+
"locked": {
258
+
"lastModified": 1721326555,
259
+
"narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=",
260
+
"owner": "hyprwm",
261
+
"repo": "hyprland-protocols",
262
+
"rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84",
263
+
"type": "github"
264
+
},
265
+
"original": {
266
+
"owner": "hyprwm",
267
+
"repo": "hyprland-protocols",
268
+
"type": "github"
269
+
}
270
+
},
271
+
"hyprlang": {
272
+
"inputs": {
273
+
"hyprutils": [
274
+
"hyprland",
275
+
"hyprutils"
276
+
],
277
+
"nixpkgs": [
278
+
"hyprland",
279
+
"nixpkgs"
280
+
],
281
+
"systems": [
282
+
"hyprland",
283
+
"systems"
284
+
]
285
+
},
286
+
"locked": {
287
+
"lastModified": 1721324361,
288
+
"narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=",
289
+
"owner": "hyprwm",
290
+
"repo": "hyprlang",
291
+
"rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086",
292
+
"type": "github"
293
+
},
294
+
"original": {
295
+
"owner": "hyprwm",
296
+
"repo": "hyprlang",
297
+
"type": "github"
298
+
}
299
+
},
300
+
"hyprutils": {
301
+
"inputs": {
302
+
"nixpkgs": [
303
+
"hyprland",
304
+
"nixpkgs"
305
+
],
306
+
"systems": [
307
+
"hyprland",
308
+
"systems"
309
+
]
310
+
},
311
+
"locked": {
312
+
"lastModified": 1722869141,
313
+
"narHash": "sha256-0KU4qhyMp441qfwbirNg3+wbm489KnEjXOz2I/RbeFs=",
314
+
"owner": "hyprwm",
315
+
"repo": "hyprutils",
316
+
"rev": "0252fd13e78e60fb0da512a212e56007515a49f7",
317
+
"type": "github"
318
+
},
319
+
"original": {
320
+
"owner": "hyprwm",
321
+
"repo": "hyprutils",
322
+
"type": "github"
323
+
}
324
+
},
325
+
"hyprwayland-scanner": {
326
+
"inputs": {
327
+
"nixpkgs": [
328
+
"hyprland",
329
+
"nixpkgs"
330
+
],
331
+
"systems": [
332
+
"hyprland",
333
+
"systems"
334
+
]
335
+
},
336
+
"locked": {
337
+
"lastModified": 1721324119,
338
+
"narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=",
339
+
"owner": "hyprwm",
340
+
"repo": "hyprwayland-scanner",
341
+
"rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30",
342
+
"type": "github"
343
+
},
344
+
"original": {
345
+
"owner": "hyprwm",
346
+
"repo": "hyprwayland-scanner",
347
+
"type": "github"
348
+
}
349
+
},
350
+
"knixpkgs": {
351
+
"inputs": {
352
+
"nixpkgs": [
353
+
"nixpkgs"
354
+
]
355
+
},
356
+
"locked": {
357
+
"lastModified": 1719992425,
358
+
"narHash": "sha256-/Dii+4WPa91xXi/ABApQiE/bv5Ugd/oCa8cMZrC7X0I=",
359
+
"rev": "3751fcb6bff8cb9ed51770ba61418323e66515a3",
360
+
"revCount": 15,
361
+
"type": "tarball",
362
+
"url": "https://api.flakehub.com/f/pinned/karitham/knixpkgs/0.1.15%2Brev-3751fcb6bff8cb9ed51770ba61418323e66515a3/0190778a-b90d-7b3a-8eb6-bc964036ace1/source.tar.gz"
363
+
},
364
+
"original": {
365
+
"type": "tarball",
366
+
"url": "https://flakehub.com/f/karitham/knixpkgs/0.1.%2A.tar.gz"
367
+
}
368
+
},
369
+
"langref": {
370
+
"flake": false,
371
+
"locked": {
372
+
"narHash": "sha256-O6p2tiKD8ZMhSX+DeA/o5hhAvcPkU2J9lFys/r11peY=",
373
+
"type": "file",
374
+
"url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
375
+
},
376
+
"original": {
377
+
"type": "file",
378
+
"url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
379
+
}
380
+
},
381
+
"nixpkgs": {
382
+
"locked": {
383
+
"lastModified": 1723175592,
384
+
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
385
+
"owner": "NixOS",
386
+
"repo": "nixpkgs",
387
+
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
388
+
"type": "github"
389
+
},
390
+
"original": {
391
+
"owner": "NixOS",
392
+
"ref": "nixos-unstable",
393
+
"repo": "nixpkgs",
394
+
"type": "github"
395
+
}
396
+
},
397
+
"nixpkgs_2": {
398
+
"locked": {
399
+
"lastModified": 1723362943,
400
+
"narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=",
401
+
"owner": "NixOS",
402
+
"repo": "nixpkgs",
403
+
"rev": "a58bc8ad779655e790115244571758e8de055e3d",
404
+
"type": "github"
405
+
},
406
+
"original": {
407
+
"owner": "NixOS",
408
+
"ref": "nixos-unstable",
409
+
"repo": "nixpkgs",
410
+
"type": "github"
411
+
}
412
+
},
413
+
"root": {
414
+
"inputs": {
415
+
"catppuccin": "catppuccin",
416
+
"ghostty": "ghostty",
417
+
"home-manager": "home-manager",
418
+
"hyprland": "hyprland",
419
+
"knixpkgs": "knixpkgs",
420
+
"nixpkgs": "nixpkgs_2",
421
+
"ssh-keys": "ssh-keys"
422
+
}
423
+
},
424
+
"ssh-keys": {
425
+
"flake": false,
426
+
"locked": {
427
+
"narHash": "sha256-LYOLBzL07XIEesZ+oPw+BIzrMAzNH5ve594v+cz05/4=",
428
+
"type": "file",
429
+
"url": "https://github.com/karitham.keys"
430
+
},
431
+
"original": {
432
+
"type": "file",
433
+
"url": "https://github.com/karitham.keys"
434
+
}
435
+
},
436
+
"systems": {
437
+
"locked": {
438
+
"lastModified": 1681028828,
439
+
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
440
+
"owner": "nix-systems",
441
+
"repo": "default",
442
+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
443
+
"type": "github"
444
+
},
445
+
"original": {
446
+
"owner": "nix-systems",
447
+
"repo": "default",
448
+
"type": "github"
449
+
}
450
+
},
451
+
"systems_2": {
452
+
"locked": {
453
+
"lastModified": 1681028828,
454
+
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
455
+
"owner": "nix-systems",
456
+
"repo": "default",
457
+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
458
+
"type": "github"
459
+
},
460
+
"original": {
461
+
"owner": "nix-systems",
462
+
"repo": "default",
463
+
"type": "github"
464
+
}
465
+
},
466
+
"systems_3": {
467
+
"locked": {
468
+
"lastModified": 1681028828,
469
+
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
470
+
"owner": "nix-systems",
471
+
"repo": "default",
472
+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
473
+
"type": "github"
474
+
},
475
+
"original": {
476
+
"owner": "nix-systems",
477
+
"repo": "default",
478
+
"type": "github"
479
+
}
480
+
},
481
+
"systems_4": {
482
+
"locked": {
483
+
"lastModified": 1689347949,
484
+
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
485
+
"owner": "nix-systems",
486
+
"repo": "default-linux",
487
+
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
488
+
"type": "github"
489
+
},
490
+
"original": {
491
+
"owner": "nix-systems",
492
+
"repo": "default-linux",
493
+
"type": "github"
494
+
}
495
+
},
496
+
"xdph": {
497
+
"inputs": {
498
+
"hyprland-protocols": "hyprland-protocols",
499
+
"hyprlang": [
500
+
"hyprland",
501
+
"hyprlang"
502
+
],
503
+
"nixpkgs": [
504
+
"hyprland",
505
+
"nixpkgs"
506
+
],
507
+
"systems": [
508
+
"hyprland",
509
+
"systems"
510
+
]
511
+
},
512
+
"locked": {
513
+
"lastModified": 1722365976,
514
+
"narHash": "sha256-Khdm+mDzYA//XaU0M+hftod+rKr5q9SSHSEuiQ0/9ow=",
515
+
"owner": "hyprwm",
516
+
"repo": "xdg-desktop-portal-hyprland",
517
+
"rev": "7f2a77ddf60390248e2a3de2261d7102a13e5341",
518
+
"type": "github"
519
+
},
520
+
"original": {
521
+
"owner": "hyprwm",
522
+
"repo": "xdg-desktop-portal-hyprland",
523
+
"type": "github"
524
+
}
525
+
},
526
+
"zig": {
527
+
"inputs": {
528
+
"flake-compat": [
529
+
"ghostty"
530
+
],
531
+
"flake-utils": "flake-utils",
532
+
"nixpkgs": [
533
+
"ghostty",
534
+
"nixpkgs-stable"
535
+
]
536
+
},
537
+
"locked": {
538
+
"lastModified": 1717848532,
539
+
"narHash": "sha256-d+xIUvSTreHl8pAmU1fnmkfDTGQYCn2Rb/zOwByxS2M=",
540
+
"owner": "mitchellh",
541
+
"repo": "zig-overlay",
542
+
"rev": "02fc5cc555fc14fda40c42d7c3250efa43812b43",
543
+
"type": "github"
544
+
},
545
+
"original": {
546
+
"owner": "mitchellh",
547
+
"repo": "zig-overlay",
548
+
"type": "github"
549
+
}
550
+
},
551
+
"zig-overlay": {
552
+
"inputs": {
553
+
"flake-compat": "flake-compat",
554
+
"flake-utils": "flake-utils_3",
555
+
"nixpkgs": [
556
+
"ghostty",
557
+
"zls",
558
+
"nixpkgs"
559
+
]
560
+
},
561
+
"locked": {
562
+
"lastModified": 1718539737,
563
+
"narHash": "sha256-hvQ900gSqzGnJWMRQwv65TixciIbC44iX0Nh5ENRwCU=",
564
+
"owner": "mitchellh",
565
+
"repo": "zig-overlay",
566
+
"rev": "6eb42ce6f85d247b1aecf854c45d80902821d0ad",
567
+
"type": "github"
568
+
},
569
+
"original": {
570
+
"owner": "mitchellh",
571
+
"repo": "zig-overlay",
572
+
"type": "github"
573
+
}
574
+
},
575
+
"zls": {
576
+
"inputs": {
577
+
"flake-utils": "flake-utils_2",
578
+
"gitignore": "gitignore",
579
+
"langref": "langref",
580
+
"nixpkgs": [
581
+
"ghostty",
582
+
"nixpkgs-stable"
583
+
],
584
+
"zig-overlay": "zig-overlay"
585
+
},
586
+
"locked": {
587
+
"lastModified": 1718930611,
588
+
"narHash": "sha256-FtfVhs6XHNfSQRQorrrz03nD0LCNp2FCnGllRntHBts=",
589
+
"owner": "zigtools",
590
+
"repo": "zls",
591
+
"rev": "0b9746b60c2020ab948f6556f1c729858b82a0f0",
592
+
"type": "github"
593
+
},
594
+
"original": {
595
+
"owner": "zigtools",
596
+
"ref": "master",
597
+
"repo": "zls",
598
+
"type": "github"
599
+
}
600
+
}
601
+
},
602
+
"root": "root",
603
+
"version": 7
604
+
}
+98
flake.nix
+98
flake.nix
···
1
+
{
2
+
inputs = {
3
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
4
+
home-manager.url = "github:nix-community/home-manager";
5
+
home-manager.inputs.nixpkgs.follows = "nixpkgs";
6
+
catppuccin.url = "github:catppuccin/nix";
7
+
ghostty = {
8
+
url = "git+ssh://git@github.com/ghostty-org/ghostty";
9
+
inputs.nixpkgs-stable.follows = "nixpkgs";
10
+
inputs.nixpkgs-unstable.follows = "nixpkgs";
11
+
};
12
+
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
13
+
knixpkgs.url = "https://flakehub.com/f/karitham/knixpkgs/0.1.*.tar.gz";
14
+
knixpkgs.inputs.nixpkgs.follows = "nixpkgs";
15
+
ssh-keys = {
16
+
url = "https://github.com/karitham.keys";
17
+
flake = false;
18
+
};
19
+
};
20
+
outputs = {
21
+
nixpkgs,
22
+
home-manager,
23
+
ghostty,
24
+
hyprland,
25
+
ssh-keys,
26
+
knixpkgs,
27
+
catppuccin,
28
+
...
29
+
} @ inputs: rec {
30
+
forAllSystems = nixpkgs.lib.genAttrs [
31
+
"aarch64-linux"
32
+
"i686-linux"
33
+
"x86_64-linux"
34
+
"aarch64-darwin"
35
+
"x86_64-darwin"
36
+
];
37
+
38
+
defaultPackage."x86_64-linux" = home-manager.defaultPackage."x86_64-linux";
39
+
homeConfigurations = {
40
+
kar = home-manager.lib.homeManagerConfiguration {
41
+
pkgs = import nixpkgs {system = "x86_64-linux";};
42
+
specialArgs = {
43
+
inherit inputs;
44
+
home-manager = home-manager;
45
+
catppuccin = catppuccin;
46
+
};
47
+
modules = [./belaf/home.nix];
48
+
};
49
+
};
50
+
51
+
# NixOS configuration entrypoint
52
+
# Available through 'nixos-rebuild --flake .#'
53
+
nixosConfigurations = {
54
+
belaf = nixpkgs.lib.nixosSystem {
55
+
system = "x86_64-linux";
56
+
specialArgs = {
57
+
inherit inputs;
58
+
home-manager = home-manager;
59
+
ghostty = ghostty;
60
+
hyprland = hyprland;
61
+
knixpkgs = knixpkgs;
62
+
catppuccin = catppuccin;
63
+
};
64
+
65
+
modules = [
66
+
./belaf
67
+
];
68
+
};
69
+
70
+
reg = nixpkgs.lib.nixosSystem {
71
+
system = "x86_64-linux";
72
+
specialArgs = {
73
+
inherit inputs;
74
+
ssh-keys = ssh-keys;
75
+
};
76
+
77
+
modules = [./reg];
78
+
};
79
+
80
+
faputa = nixpkgs.lib.nixosSystem {
81
+
system = "x86_64-linux";
82
+
specialArgs = {
83
+
inherit inputs;
84
+
ssh-keys = ssh-keys;
85
+
};
86
+
87
+
modules = [./faputa];
88
+
};
89
+
};
90
+
91
+
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
92
+
};
93
+
nixConfig = {
94
+
extra-substituters = ["https://hyprland.cachix.org" "https://ghostty.cachix.org"];
95
+
extra-trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns="];
96
+
extra-experimental-features = ["nix-command" "flakes"];
97
+
};
98
+
}
+40
reg/default.nix
+40
reg/default.nix
···
1
+
{
2
+
pkgs,
3
+
ssh-keys,
4
+
...
5
+
}: {
6
+
nix.settings = {
7
+
trusted-users = ["root"];
8
+
experimental-features = ["nix-command" "flakes"];
9
+
auto-optimise-store = true;
10
+
};
11
+
imports = [./hardware.nix];
12
+
13
+
boot.tmp.cleanOnBoot = true;
14
+
zramSwap.enable = true;
15
+
networking.hostName = "reg";
16
+
17
+
services = {
18
+
tailscale.enable = true;
19
+
tailscale.useRoutingFeatures = "server";
20
+
openssh.enable = true;
21
+
};
22
+
23
+
nixpkgs = {
24
+
hostPlatform = "x86_64-linux";
25
+
config = {allowUnfree = true;};
26
+
};
27
+
28
+
users.users = {
29
+
root.openssh.authorizedKeys.keyFiles = [ssh-keys];
30
+
};
31
+
environment.systemPackages = with pkgs; [
32
+
tailscale
33
+
helix
34
+
curl
35
+
wget
36
+
jq
37
+
];
38
+
39
+
system = {stateVersion = "24.05";};
40
+
}
+20
reg/hardware.nix
+20
reg/hardware.nix
···
1
+
{modulesPath, ...}: {
2
+
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
3
+
boot.loader.grub = {
4
+
efiSupport = true;
5
+
efiInstallAsRemovable = true;
6
+
device = "nodev";
7
+
};
8
+
fileSystems."/boot" = {
9
+
device = "/dev/disk/by-uuid/1FC5-9E05";
10
+
fsType = "vfat";
11
+
};
12
+
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"];
13
+
boot.initrd.kernelModules = ["nvme"];
14
+
fileSystems."/" = {
15
+
device = "/dev/sda1";
16
+
fsType = "ext4";
17
+
};
18
+
boot.tmp.cleanOnBoot = true;
19
+
zramSwap.enable = true;
20
+
}