Compare commits

..

196 commits

Author SHA1 Message Date
6ea4799042
programs/terminal/emulators/ghostty: goodbye ghosttyd 💔 2025-01-31 04:52:05 +01:00
c8f87c05dc
programs/fastfetch: update logo 2025-01-31 01:58:23 +01:00
d4c8a0e93d
programs/hypr/land/binds: switch back to ghostty 2025-01-30 19:42:02 +01:00
ada02bd3ef
programs: add fastfetch config 2025-01-30 19:41:55 +01:00
c9419c8f9c
flake: only support x86_64-linux 2025-01-30 18:04:42 +01:00
30ed3a55e7
README: update README 2025-01-30 18:03:14 +01:00
056968f086
treewide: move shared/lib to lib 2025-01-30 18:02:39 +01:00
62a748d571
flake: remove unused inputs 2025-01-30 18:02:27 +01:00
84eeb6ef6c
README: update README 2025-01-30 17:56:20 +01:00
b2f958e681
services/greetd: remove regreet (unused), hide default hyprland stuff 2025-01-30 17:34:05 +01:00
38c387aade
programs: update hyprland binds (use ghostty and add calculator) 2025-01-30 15:39:46 +01:00
fb5ed25b58
services/ssh: add keys to agent automatically 2025-01-30 15:05:48 +01:00
080e3fb0db
programs/terminal/shell/nushell: remove indicator chars for vi mode 2025-01-29 11:24:57 +01:00
774b73ecfd
treewide: replace nautilus with thunar 2025-01-29 11:24:47 +01:00
5b40018e66
programs/terminal/programs/misc: add comma 2025-01-28 23:51:22 +01:00
02ae326468
programs/hyprland: switch from ghostty to foot again 2025-01-28 23:43:40 +01:00
93d12da62b
treewide: move FLAKE env variable to core/nix 2025-01-28 23:43:25 +01:00
f1353b550c
programs/terminal/emulators/ghostty: add programs to service path (avoid x not found) 2025-01-28 23:32:21 +01:00
c2566571ab
core/security: add polkit 2025-01-28 22:42:13 +01:00
a9a07fea6d
programs/hyprland: disable Unknown-1 ghost monitor, move env variables to environment.d, add nvidia env variables 2025-01-28 19:52:19 +01:00
d0242089e2
programs: fix environment.d syntax being wrong 2025-01-28 19:51:41 +01:00
01520df7ab
programs/anyrun: remove desktop actions
I JUST WANNA LAUNCH PROGRAMS!!
2025-01-28 19:51:25 +01:00
250b8b0694
core/boot: use stable linux kernel 2025-01-28 19:51:14 +01:00
a28174f516
treewide: hosts/solaire/config/nvidia -> core/hardware/nvidia 2025-01-28 19:51:01 +01:00
00b3302880
options/modules: add local.modules.nvidia 2025-01-28 19:50:33 +01:00
71d3ad25df
flake:: update inputs 2025-01-28 13:05:02 +01:00
439a837c9a
programs/misc remove cinny 2025-01-28 13:04:58 +01:00
feed3b7561
terminal/shell/nushell: add carapace and zoxide to ghostty's service path 2025-01-28 13:04:54 +01:00
8df739598c
programs/editors/neovim: add back indent for nix files 2025-01-28 13:04:32 +01:00
6ab835555c
treewide: remove home-manager (switch to hjem)
As my NixOS configuration kept growing, I noticed that I don't need
home-manager as much as I did before. A lot of what I need is just a way
to map nix attrsets to the program's respective configuration format,
which is something that I can now do myself, as my nix knowledge got
more extensive. After all of this, I decided to completely get rid of
home-manager, and switch to a simpler solution called hjem, which just
lets me write files to my home directory that are automatically
symlinked using `systemd-tmpfiles`.

This allows me to simplify my configuration, remove the separation
between NixOS and home-manager modules, and cut my eval times by quite a
lot (which allows for faster `nixos-rebuild switch`!).
2025-01-27 23:57:47 +01:00
7822c4ae84
hm/programs/discord: update colors according to base16 2025-01-27 02:34:55 +01:00
5ab8b16b44
hm/services/gammastep: enable on desktop 2025-01-27 02:34:34 +01:00
017b3dae83
hm/programs/terminal/emulators/ghostty: update keybinds 2025-01-27 02:21:22 +01:00
4c86300a0a
hm/programs/anyrun: increase width 2025-01-24 23:13:47 +01:00
62440fa449
hm/programs/terminal/emulators/ghostty: add keybinds and fix crashes 2025-01-24 23:05:27 +01:00
25b23ee693
modules/hm/programs/terminal/emulators/ghostty: add service for faster startups 2025-01-24 13:03:35 +01:00
21ae70eb72
modules/hm/services/gtk: remove deprecated gtk4 config 2025-01-24 13:03:16 +01:00
b51043c7bc
modules/nix/core/fonts: update monospace to use 0xProto (not NF) 2025-01-24 13:02:54 +01:00
c058aca6e7
treewide: switch to ghostty 2025-01-24 00:11:51 +01:00
263376cf4d
modules/hm/programs/anyrun: remove desktop actions 2025-01-23 14:39:18 +01:00
5a9da3f777
treewide: replace walker with anyrun 2025-01-23 14:17:28 +01:00
861c658590
treewide: move styling to their respective modules
As a first step towards getting rid of home-manager and going towards a
cleaner, more concise configuration, I decided to move back the styling
to their respective home-manager modules. Since I'm not planning to
share my styling module anymore, as it is very specific to my config, I
just decided to merge everything together.

commit 078334af48
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Sun Jan 19 20:41:14 2025 +0100

    treewide: finish moving rest of styling to their respective hm modules

commit 57432a9655
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 12:13:54 2025 +0100

    treewide: move regreet styling out of module

commit 6fef9e0a76
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 12:10:33 2025 +0100

    treewide: move swaync styling out of module

commit 2f4a8433c7
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 12:06:33 2025 +0100

    treewide: move nvf styling out of module

commit a315915298
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 12:02:58 2025 +0100

    treewide: move hyprlock styling out of module

commit 0fe6f67b20
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 12:02:49 2025 +0100

    modules/nix/core/home-manager: import lib' in extraSpecialArgs

commit e09569b921
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 11:55:05 2025 +0100

    treewide: move hyprland styling out of module

commit eb25ce0c43
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 11:43:35 2025 +0100

    modules/nix/style/modules: remove styling for unused programs

commit efb6b91ce1
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 11:00:54 2025 +0100

    treewide: move foot styling out of module

commit 4c06a66b5e
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 10:56:05 2025 +0100

    treewide: move fish styling out of module

commit b3a03e5e9b
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Jan 17 10:47:43 2025 +0100

    treewide: move discord styling out of module
2025-01-19 20:42:47 +01:00
89f8637d03
modules/hm/programs/hyprland: disable hardware cursors
This made the cursor invisible on some apps on my Nvidia desktop.
2025-01-17 10:48:30 +01:00
9c74203ac1
modules/nix/programs/hyprland: remove NIXOS_OZONE_WL (caused problems) 2025-01-16 14:36:22 +01:00
2461a8a2c4
modules/hm/programs/editors/neovim: add leap 2025-01-16 14:35:52 +01:00
de6052693e
treewide: huge refactor, move everything into modules
As my configuration was getting more and more complex, I thought it was
time to switch to a completely modular approach. A local module system
has been created, containing profiles (some will be added later, as I
went with as generic as I could, but I would like to make them more
specialized).

NixOS and home-manager modules have also been separated, which I don't
like too much, and will switch to a cleaner implementation of home
management systems.

commit 09a07b15da
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Jan 15 22:56:32 2025 +0100

    treewide: config/home-manager -> modules/hm

    Moved every remaining home-manager piece of configuration to its own
hm
    module.

commit d7356d3fde
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Jan 15 14:55:03 2025 +0100

    modules/nix/services: add keyd

commit c846cc95ae
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 21:41:13 2025 +0100

    flake: update inputs

commit 94d59b47b3
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 21:41:09 2025 +0100

    modules/nix/services: remove kanata

commit 4429b604dd
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 21:41:01 2025 +0100

    config/home-manager: remove services/udiskie.nix

commit 376024d4a5
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 20:06:31 2025 +0100

    treewide: config/home-manager/services -> modules/hm/services

commit b808281674
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 19:33:31 2025 +0100

    treewide: config/home-manager -> modules/hm

    Started moving HM config to the new local modules system.
Conditionally
    toggling based on profiles and modules.

commit 2b77ac239e
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 15:10:49 2025 +0100

    treewide: config/nixos/services -> modules/nix/services

    Moved every service in their own module, and conditionally enable
them
    based on profiles.

commit 7aadc0c8fe
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 14:44:38 2025 +0100

    modules/nix/programs/hyprland: make chromium/electron apps run on
Wayland

commit ec285bcc52
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 13:58:52 2025 +0100

    treewide: config/nixos/programs -> modules/nix/programs

    Here, we also use the option we just added,
`local.modules.hyprland.enable` to toggle Hyprland, as well as the
profiles. Also removed other unused configuration, such as KDE/Gnome.

commit 76a2caa9c7
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 14:07:41 2025 +0100

    options/modules: add options for Hyprland

commit 9f3d6ae768
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 13:56:56 2025 +0100

    config/nix/programs: cleanup unused files

commit f3c08b8431
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 13:55:17 2025 +0100

    treewide: config/nixos/programs/fonts -> modules/nix/core/fonts

commit c37f00205b
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 13:49:29 2025 +0100

    treewide: config/nixos/nix -> modules/nix/core/nix.nix

commit a734372732
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 13:43:23 2025 +0100

    treewide: config/nixos/network -> modules/nix/core/networking

commit 07a9c5f510
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 12:34:01 2025 +0100

    treewide: move hardware into modules

commit 7d1baf7eb5
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 12:33:21 2025 +0100

    options: use mkIf for assertions

commit 9b01b40253
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 12:33:00 2025 +0100

    hosts: set profiles

    We set profiles before moving the config so nothing breaks and we
keep a
    working commit history :)

commit 65ea8beba0
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 12:22:06 2025 +0100

    options: remove isServer since we have server profile

commit 7906864ae1
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 12:21:49 2025 +0100

    options/profiles: add laptop profile

commit 99b6b41de3
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 12:01:33 2025 +0100

    treewide: migrate config/system/core to modules

    Moved everything from core into modules. I want to get all the NixOS
    stuff moved first, and do home-manager after. I used the different
    profiles to disable configuration that might break my server, as it
has
    its own configuration already. This will need to be refactored
later, as
    I want to ultimately only use the local module system.

commit b89a42ef13
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 11:59:59 2025 +0100

    modules/options: add profiles

    The next step in the refactoring is to add different profiles, so
that
    we may toggle them easily in our hosts. Here's the profiles I went
for:

    - desktop: enables everything a desktop computer needs (graphics,
    productivity apps, base apps such as browsers...)
    - gaming: enables gaming configurations (steam, gamescope...)
    - server: enables server configurations (website hosting, git
forge...)

    I made sure the server profile can not be enabled if desktop/gaming
are
    enabled, as it would not make sense to have desktop applications and
    configurations on a server.

commit 851024052d
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 11:02:13 2025 +0100

    modules: move style to nix/style

    This is temporary, as we're going to get rid of that awkward style
    module that was meant to be shared, but ended up being too specific
to
    my use-case. We just put it in a nix directory for now, as we will
with
    everything else. This will be refactored later to be mixed with the
    relevant program's configuration.

commit bb55875491
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 10:56:34 2025 +0100

    treewide: move shared/nixosModules to modules

    The idea of this refactor is, as the configuration is getting bigger
and
    more complex, to move everything into a local modules system. The
idea
    is to simplify hosts declaration and add a new layer of abstraction
to
    avoid the long and redundant imports in hosts/default.nix, that I am
    currently using.

    First, we're going to move everything to the modules directory, and
    split options from the proper configuration. That allows us to have
an
    easier time understanding how the options are structured, as they
will
    follow the directory structure and won't be mixed with the module
    configuration.
2025-01-15 23:00:13 +01:00
acf42ca5e7
home-manager/terminal/programs/tmux: simplify config 2025-01-14 10:36:18 +01:00
2603bf2b6f
config: remove proton-ge from steam, add proton-plus 2025-01-14 10:35:49 +01:00
81c56877e6
home-manager/programs/hyprland: dont toggle app launcher 2025-01-10 21:41:27 +01:00
e6cebabb48
flake: update website 2025-01-10 21:41:06 +01:00
7871b52a2f
flake: update website 2025-01-10 19:43:38 +01:00
5344331bd4
flake: update nezia_dev 2025-01-10 18:15:57 +01:00
8e156427d3
flake: rename website to valid name 2025-01-10 18:08:16 +01:00
3a8435a8e3
nixosModules/style/modules/walker: update walker style 2025-01-10 17:52:06 +01:00
5d1025644a
home-manager/programs/games: add lutris and qbittorrent 2025-01-10 17:35:20 +01:00
957c49ef33
home-manager/programs/hyprland: bind app launcher to Mod key 2025-01-10 17:35:20 +01:00
c168c8260a
flake: rename website to nezia.dev 2025-01-10 14:16:32 +01:00
2919138fdf
flake: update website 2025-01-10 13:59:08 +01:00
7828a1256b
home-manager/programs/walker: update service to work with uwsm 2025-01-10 12:58:56 +01:00
76862fbfdd
treewide: remove fuzzel 2025-01-10 12:58:39 +01:00
3c1c71dce8
flake: update inputs 2025-01-10 12:04:44 +01:00
c32efcce18
README: add nix logo 2025-01-10 12:04:39 +01:00
0ecde1fc3c
home-manager/programs/hyprland: add emojis bind 2025-01-10 11:59:55 +01:00
9fc5686078
nixosModules/style/modules/walker: add walker styling 2025-01-10 10:41:39 +01:00
b1dc9b3bdb
treewide: switch to walker 2025-01-07 22:29:50 +01:00
f65911a876
hosts: add uni-sync 2025-01-07 21:21:34 +01:00
1b25c927fb
repo: remove envrc 2025-01-07 18:55:53 +01:00
c1871c4310
flake: update inputs 2025-01-07 14:09:55 +01:00
7f9715af40
home-manager/programs/editors/neovim: add typst support 2025-01-07 14:09:24 +01:00
82d7029260
nixos/services/pipewire: switch to nix-gaming low latency 2025-01-07 14:09:24 +01:00
6af72ca39e
flake: add nix-gaming 2025-01-07 14:09:16 +01:00
2b89ed8b73
hosts/vamos/config/theme: update wallpaper 2025-01-06 16:01:58 +01:00
2d9df00fae
treewide: rename portfolio to website 2025-01-06 09:00:28 +01:00
edcf8e5010
nixos/programs/hyprland: fix links not opening in browser 2025-01-04 22:40:10 +01:00
f4507bc88d
hardware/mcuxpresso: fix mcuxpresso not being at correct output 2025-01-04 22:39:56 +01:00
dc70f42c87
shared/pkgs/mcuxpresso: switch to regular nixpkgs 2025-01-04 22:38:02 +01:00
23c19987a3
programs/xdg: setup system-wide portals 2025-01-04 22:36:39 +01:00
8967b25c80
hosts: remove shared/nixosModules from mkSystem function 2025-01-04 22:36:19 +01:00
e0c277bf1e
services/searx: update secret path 2025-01-04 22:35:59 +01:00
4576b30efa
services/gnome: remove unused services 2025-01-04 22:35:50 +01:00
065266ee3a
shared/pkgs: move mcuxpresso to its own file 2025-01-04 22:35:37 +01:00
4ccd29cb9d
home-manager/terminal/shell: remove abbreviations (use shellAliases instead) 2025-01-04 22:35:06 +01:00
af13f204ad
shared/pkgs/mcuxpresso: use autoelf manually, switch to buildPhase 2025-01-02 13:09:15 +01:00
5f1221d85b
shared/pkgs/mcuxpresso: get rid of buildFHSEnv 2025-01-01 18:21:51 +01:00
e02d77a025
shared/pkgs/mcuxpresso: fix more dependencies in FHSEnv 2025-01-01 15:58:08 +01:00
0bc8a83fd3
shared/pkgs/mcuxpresso: fix LinkServer not being found 2025-01-01 13:51:40 +01:00
8136d53ad7
home-manager/programs/hyprland: remove autostart 2025-01-01 13:51:12 +01:00
cd4cc631a4
home-manager/programs/hyprland/autostart: autostart vesktop 2024-12-31 10:01:49 +01:00
1e3d9b2f75
home-manager/programs/editors/neovim: add nvim-surround 2024-12-30 23:44:24 +01:00
b5986f0c33
hosts: simplify imports with self 2024-12-30 23:44:07 +01:00
944c99f873
flake: update inputs 2024-12-30 22:46:05 +01:00
678a0c007d
nixos/nix/nixpkgs: update segger-link 2024-12-30 22:45:56 +01:00
7a9d641995
treewide: go back to vesktop 2024-12-30 22:08:51 +01:00
9e5f6d2c85
home-manager/programs/games: remove unneeded programs 2024-12-30 22:08:51 +01:00
4efda26046
config/home-manager/hypr: add paper to imports 2024-12-30 20:30:15 +01:00
ebfa07b72a
hosts: move logind stuff to graphical 2024-12-30 19:32:09 +01:00
d83faa96c4
hosts: group shared modules under hosts/default.nix 2024-12-30 19:28:59 +01:00
fe83d5f557
treewide: move hm config to config/nixos/core/home-manager 2024-12-29 23:22:25 +01:00
1dc4024973
home-manager/programs/hypridle: set systemd service correctly for uwsm 2024-12-27 23:15:57 +01:00
c06597fe7f
treewide: add gammastep 2024-12-27 23:15:38 +01:00
408750a151
nixos/services/greetd: add conditional greetd/environments 2024-12-27 17:13:46 +01:00
46542a2c19
nixos/services/greetd: fix formatting 2024-12-27 16:12:49 +01:00
210ed38295
nixos/services/greetd: switch back to gtkgreet, conditionally toggle compositors in greetd/environments 2024-12-27 16:11:25 +01:00
10d313f33a
hosts: switch to hyprpaper 2024-12-27 11:48:15 +01:00
c9b19c3b5f
treewide: add hyprpaper 2024-12-27 11:48:04 +01:00
9293020602
home-manager/programs/waybar: setup service to standard locations 2024-12-27 11:47:48 +01:00
b84157c771
flake: update inputs 2024-12-26 18:05:50 +01:00
077ec7b242
nixos/programs/hyprland: add hyprland-qtutils 2024-12-26 18:05:50 +01:00
4430c88d43
home-manager/programs/hypr: use flake 2024-12-26 18:05:50 +01:00
b10f86de80
nixos/core: disable unnecessary flags, use latest kernel 2024-12-26 18:05:50 +01:00
7ff03271d7
hosts/solaire: fix wake-up issues with nvidia 2024-12-26 18:05:50 +01:00
5348e741e8
home-manager/programs/hyprland: use loginctl for session termination 2024-12-26 15:38:58 +01:00
cbf2ed3b10
home-manager/programs/hyprland: add xdg-autostart programs 2024-12-26 15:38:39 +01:00
73c25e55e9
nixos/services/greetd: use regreet 2024-12-26 14:29:10 +01:00
d212c13635
nixosModules/style: add regreet config 2024-12-26 14:28:43 +01:00
21d45256fe
hosts/vamos: change wallpaper 2024-12-26 14:28:32 +01:00
fdefee324e
config: use uwsm for Hyprland 2024-12-25 10:29:38 +01:00
61bc1ea56d
mcuxpresso: add feature flag for udev rules only 2024-12-25 10:28:53 +01:00
0eab12a13f
hosts: remove duplicated imports 2024-12-20 18:12:50 +01:00
089a3363ba
home-manager/programs: add shared programs to default.nix 2024-12-20 18:12:29 +01:00
69dac78c20
home-manager/programs/gnome: hide buttons 2024-12-20 18:12:12 +01:00
52e584ee0b
home-manager/programs/waybar: open gnome-control-center on network click 2024-12-20 14:14:55 +01:00
c5c201ec38
nixosModules/style/hyprlock: update text color in input 2024-12-20 14:14:15 +01:00
e71cf34700
nixosModules/style/waybar: update tooltip text to purple 2024-12-20 12:51:15 +01:00
852b3e1f78
home-manager/programs/waybar: update icons 2024-12-20 12:44:46 +01:00
9f0cdf9f98
nixosModules/style: use with cfg.scheme.palette; when declaring colors 2024-12-20 09:20:19 +01:00
ec2bce3b55
home-manager/programs/waybar: update icons for cpu and memory 2024-12-19 20:51:51 +01:00
ae60854247
nixos/programs/games: add proton-ge declaratively 2024-12-19 19:12:01 +01:00
26845938e7
treewide: update waybar 2024-12-19 18:59:03 +01:00
cc7eec6a81
home-manager/terminal/programs/bat: update MANPAGER to work with --help 2024-12-19 17:49:08 +01:00
fb51921f26
home-manager/programs/browser: add BROWSER variable 2024-12-19 17:48:43 +01:00
c7d09bcd5b
home-manager/programs: switch from loupe to gthumb 2024-12-19 17:08:19 +01:00
bc7de34c43
nixosModules/style: update hyprlock colors 2024-12-19 15:51:05 +01:00
1f1183fa4d
shared/lib: update rgba colors 2024-12-19 15:51:05 +01:00
e2bcffa79e
config: fix gnome-control-center bind, disable unused panels 2024-12-19 13:51:23 +01:00
1b4b665b2b
config/home-manager/programs/hyprland: inhibit idle on fullscreen apps (except games) 2024-12-19 13:15:12 +01:00
c4897af672
flake: update inputs 2024-12-18 19:30:42 +01:00
390691be57
treewide: refactor structure
I have decided to refactor the entire structure of my repository, as the
old one was getting quite cluttered and I needed something that made
more sense. I've decided to go with the following, which will be
explained in the README when I find the time to do it. The gist of it
is:
- Put everything shared into its shared directory
- Rewrite the theme module (now style) to be more split, as it is
  theming a lot of different apps
- Merge nixos and home-manager configurations back into a singular
  config directory

Thanks a lot to llakala for the massive help she was with my Nix code.

commit 66ff9820f8
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 19:23:28 2024 +0100

    shared/nixosModules/style: use sharedModules

commit 1271294049
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 19:23:13 2024 +0100

    treewide: remove unused nvidia file

commit ab18a42418
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 19:02:34 2024 +0100

    flake: remove uneeded directory for nodes

commit f8afc9f461
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 18:43:19 2024 +0100

    shared/nixosModules/style: split everything into its file

commit 851a4d0d32
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 11:15:40 2024 +0100

    repo: update README

commit e01237d59a
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 11:00:56 2024 +0100

    hosts/solaire: delete unused modules directory

commit 1c3665ec1c
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 11:00:24 2024 +0100

    pkgs: move to shared/pkgs

commit 587e8d321b
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 10:57:03 2024 +0100

    treewide: split up options from theming module, rename to style

    As an initial step towards refactoring the theming module, the options
    have been split up from the configuration itself. This will allow to
    find available options quicker, and separate concerns nicely. It was
    also renamed to style, to avoid confusion with its own options (eg.
    gtk.theme).

commit 87bb04f065
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 10:19:59 2024 +0100

    config/nixos/core/boot: remove unused arguments

commit 8e7c0584ef
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 10:19:46 2024 +0100

    hosts: move host-specific configuration to hosts/{host}/config

commit a600143e8a
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 10:19:24 2024 +0100

    nvidia: move to hosts/solaire

commit 7174a33a44
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 10:14:06 2024 +0100

    treewide: reorganize general structure

commit b86f1470ed
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 10:03:08 2024 +0100

    hosts/solaire: set global vars

commit de6ea242c0
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 09:24:59 2024 +0100

    system/network: replace hard-coded values with global vars

commit 5acf11adca
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 09:24:51 2024 +0100

    system/core/users: replace hard-coded values with global vars

commit 96425172a0
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 09:24:30 2024 +0100

    hosts/vamos: set global vars

commit 8338818b7d
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 09:24:23 2024 +0100

    hosts: import local modules by default

commit ffb60ac869
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 09:23:54 2024 +0100

    flake: update eachSystem to use lib.systems.flakeExposed

commit e98a15db1d
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Dec 18 09:23:33 2024 +0100

    modules: create modules to hold global variables
2024-12-18 19:24:59 +01:00
0e6ec0157b
modules/theme: add base16 tidal theme 2024-12-16 15:48:52 +01:00
7d3c2669ea
modules/theme: update accent color to be purple 2024-12-16 15:24:46 +01:00
4bae02f24a
modules/theme: add equicord base16 theme based on midnight 2024-12-16 15:10:16 +01:00
4bb5458008
home/programs: switch to equibop 2024-12-16 15:10:00 +01:00
318b4f3bfa
flake: update inputs 2024-12-16 00:14:05 +01:00
11126aed45
modules/theme/gtk: switch to papirus dark icons 2024-12-16 00:13:46 +01:00
6774a216d7
treewide: rename images to assets 2024-12-16 00:00:54 +01:00
37ef1e9875
system/services/kmscon: fix font name being incorrect 2024-12-15 19:40:37 +01:00
98b1beb3f8
home/terminal/programs: add alias for lazygit 2024-12-15 19:40:37 +01:00
f93928f9bf
home/programs/media: add tidal 2024-12-15 19:40:37 +01:00
613a2318fb
home/programs/editors/neovim: add neovide 2024-12-15 19:40:37 +01:00
727fe87eca
home/programs/hyprland: reset GDK_SCALE, add more touchpad configuration 2024-12-15 16:47:36 +01:00
43eed67a86
home/programs/hyprland add lock bind 2024-12-15 16:47:12 +01:00
25f6c41bc1
treewide: theme hyprlock
This is the catppuccin hyprlock theme, with base16 colors so that it may
work with my theming configuration.
2024-12-15 16:47:01 +01:00
1303ad9df0
modules/theme: use purple accent for catppuccin gtk 2024-12-13 23:23:49 +01:00
02ab15aad4
home/programs/wlogout: add wlogout 2024-12-13 23:23:35 +01:00
24dbf5a72f
home/programs/hyprland: add more binds 2024-12-13 23:23:20 +01:00
e42966f263
home/programs/hyprland: scale laptop monitor down 2024-12-13 23:07:14 +01:00
a0e7e87d77
system/programs/hyprland: add pam behavior for fingerprint machines 2024-12-13 23:03:28 +01:00
057adf1d27
home/programs/hyprland: disable xwayland scaling 2024-12-13 22:57:56 +01:00
7e240b97b6
modules/theme: add XCURSOR_SIZE 2024-12-13 22:57:42 +01:00
251adf60ca
home/programs/hyprland: setup laptop display 2024-12-13 19:32:30 +01:00
ff6557f878
hosts/vamos: switch to hyprland 2024-12-13 19:05:02 +01:00
a3c356c3c6
treewide: switch to hyprland
I've decided to switch to Hyprland again, after having issues with Niri,
especially with XWayland apps. It also has better and more widespread integration with other pieces of software that I use/plan to use.

commit 5a42498391
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Dec 13 16:59:37 2024 +0100

    modules/theme: update fuzzel selection colors

commit f3386f5b0a
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Dec 13 16:53:57 2024 +0100

    system/services/greetd: enable gnome keyring

commit c1caf6d844
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Dec 13 16:51:24 2024 +0100

    modules/themes: switch to phinger-cursors, update border colors

commit aa7a00d330
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Dec 13 14:54:43 2024 +0100

    hosts/solaire: switch to hyprland

commit 7c7a332a3e
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Dec 13 14:54:34 2024 +0100

    modules/theme: set default theme to catppuccin (again)

commit 471c6b5503
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Dec 13 14:54:24 2024 +0100

    flake: add hyprwm-contrib for grimslurp

commit 04914eab73
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Dec 13 14:54:09 2024 +0100

    system/services/greetd: switch to hyprland as compositor (thanks jacekpoz)

commit d185864012
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Dec 13 14:52:56 2024 +0100

    home/services/swaync: remove unused variables

commit 75ff00b2e2
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Dec 13 14:52:43 2024 +0100

    home/programs/waybar: add hyprland workspaces

commit b36b3abf53
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Dec 13 14:52:31 2024 +0100

    home/programs/hypr: add basic hyprland configuration

commit cdda6bf2bc
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Dec 13 12:03:53 2024 +0100

    system/programs: add hyprland module

commit ef36f7be36
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Dec 13 12:03:43 2024 +0100

    flake: add hyprland and cachix

commit cdbcd8d1bd
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Dec 13 12:03:37 2024 +0100

    system/nix: add wheel to trusted users
2024-12-13 19:02:53 +01:00
2ae9ccda39
flake: update inputs 2024-12-13 11:52:30 +01:00
1fd5815f18
modules/theme: update icon theme 2024-12-10 18:39:09 +01:00
3017dfc76c
treewide: bring regreet theme config to theme module 2024-12-10 08:36:24 +01:00
7d6515ed93
home/programs/browsers/firefox: force search engines rebuild 2024-12-10 08:16:26 +01:00
3cbde4886f
modules/theme: update fish colors 2024-12-09 20:30:03 +01:00
d0b4e758b9
treewide: use ankama-launcher from nixpkgs 2024-12-09 20:29:36 +01:00
b17e84fbef
modules/theme: update starship colors 2024-12-08 21:22:12 +01:00
e17d48779a
home/terminal/programs: switch bat theme to base16 2024-12-08 20:58:04 +01:00
60eacee9fe
modules/theme: remove kitty, update fuzzel for base16 2024-12-08 20:55:16 +01:00
6cc4b19328
home/programs/games: add ankama-launcher 2024-12-06 18:28:07 +01:00
a53d97e6b3
pkgs: package ankama-launcher 2024-12-06 18:27:57 +01:00
4f6df51bf9
flake: remove neovim-flake 2024-12-06 17:02:15 +01:00
cb9e8b93fc
hosts/solaire: import nvf config 2024-12-06 17:02:15 +01:00
8ae716604e
home/programs/games: remove lutris 2024-12-06 17:02:14 +01:00
a545d1401f
modules/theme: update starship prompt symbols 2024-12-06 15:00:28 +01:00
252ecaff8b
modules/theme: update some swaylock colors 2024-12-06 14:50:30 +01:00
5027580f06
modules/theme: update default gtk themes 2024-12-06 13:06:35 +01:00
56bc4f35ed
modules/theme: update swaylock colors 2024-12-06 12:48:14 +01:00
7eb21ee481
terminal/programs/git: update default branch to main 2024-12-06 12:48:06 +01:00
c24ff33ed6
terminal/shell: add transient fish integration 2024-12-06 08:55:33 +01:00
09c34d14a3
modules/theme: add fish colors 2024-12-06 08:55:20 +01:00
79df41ae2e
treewide: update theming defaults to rose-pine (including cursor) 2024-12-06 00:19:53 +01:00
8671bf2816
modules/theme: add nvf import 2024-12-05 18:31:30 +01:00
6c8626dd18
modules/theme: update border color 2024-12-05 18:29:49 +01:00
68a619879c
treewide: add flatpak for sober 2024-12-05 16:01:07 +01:00
ef474ea4b2
hosts/solaire: update theme to rose-pine 2024-12-05 15:57:34 +01:00
8c39008df5
modules/theme: update foot colors, remove gtk configuration 2024-12-05 15:55:09 +01:00
a09777fc90
modules/theme/gtk: enable gtk 2024-12-05 15:54:53 +01:00
bd58cf8dd7
hosts/vamos: switch from rose-pine-moon to rose-pine 2024-12-05 00:05:42 +01:00
e363f7160e
modules/theme: remove unused variable 2024-12-05 00:05:28 +01:00
5f6d4a5ad8
home/programs/waybar: change active button color 2024-12-05 00:03:14 +01:00
56e4085c73
treewide: add nvf base16 theming 2024-12-05 00:02:59 +01:00
44f2dd55d5
modules/theme: enable gtk theming if global theming enabled by default 2024-12-04 23:42:19 +01:00
7e5a0442ec
treewide: move nvf back to repo, switch theme on vamos to rose-pine 2024-12-04 22:22:45 +01:00
197 changed files with 6707 additions and 3789 deletions

1
.envrc
View file

@ -1 +0,0 @@
use flake .

View file

@ -1,36 +1,29 @@
# ❄️ flocon <h1 id="header" align="center">
<img src="assets/nix-snowflake-colors.svg" width="128px" height="128px" />
<br>
flocon
</h1>
My NixOS configurations, using flakes. My NixOS configurations, using flakes.
# </> Software I use
- Wayland compositor: [niri](https://github.com/YaLTeR/niri)
- Text editor: [neovim](https://github.com/neovim/neovim)
- Shell: [fish](https://github.com/fish-shell/fish-shell)
- Colors: [Catppuccin](https://github.com/catppuccin/catppuccin)
- Font: [Intel One Mono](https://github.com/intel/intel-one-mono)
Additionally using a lot of other software you can find in the configuration files.
# 🛠️ Structure # 🛠️ Structure
| Name | Description | | Name | Description |
| ------------------- | -------------------------- | | ------------------- | ---------------------------------------------------------------- |
| [home](home/) | Home manager configuration | | [assets](assets/) | Resources used throughout the system (images etc.) |
| [hosts](hosts/) | Host-specific | | [hosts](hosts/) | Host-specific |
| [lib](lib/) | Helper functions | | [modules](modules/) | Local module system (where the bulk of the configurations lives) |
| [modules](modules/) | NixOS modules | | [shared](shared/) | Exported components (so far only packages) |
| [pkgs](pkgs/) | Custom packages |
| [system](system/) | NixOS configuration |
My configuration is structured based on the following principles: My configuration is structured based on the following principles:
1. Hosts should be the main entry points and outputs. 1. Hosts should be the main entry points and outputs.
2. Abstractions should be avoided as much as possible. 2. Abstractions should be avoided as much as possible.
3. Setting up theming should be as simple as changing one or two options.
The bulk of the configuration can be found either in [home](home/) or [system](system/), which declares most of my programs, with some extra Nix code in [lib](lib/) and custom [modules](modules/), mostly for convenience and to provide a way to globally set styles and themes for now. The main configuration can be found in [modules](modules/), which declares most of my programs and services.
My hosts can then pick and choose the programs and configurations that they need from the other directories. If the need arises for a more modular setup for a specific piece of software (ie. having different flavors of Firefox per host), I will write a custom module for it. This helps to avoid unnecessarily abstracting my configuration, as I don't find it necessary for the most part, and I would also like it to remain as simple as possible. My hosts can then pick and choose the programs and configurations that they need from the local module system, which have its options declared in [modules/options](modules/options/) for easy reference.
# 👥 Credits # 👥 Credits
@ -39,5 +32,7 @@ People / repositories I have copied / learned from:
- [fufexan/dotfiles](https://github.com/fufexan/dotfiles) for the configuration structure - [fufexan/dotfiles](https://github.com/fufexan/dotfiles) for the configuration structure
- [jacekpoz/nixos](https://git.jacekpoz.pl/poz/niksos) for learning how NixOS modules work - [jacekpoz/nixos](https://git.jacekpoz.pl/poz/niksos) for learning how NixOS modules work
- [sodiboo](https://github.com/sodiboo) for helping me a whole lot with Niri-specific issues - [sodiboo](https://github.com/sodiboo) for helping me a whole lot with Niri-specific issues
- [llakala](https://github.com/llakala) for being very thorough and helpful when cleaning up my code and general structure.
- [Lunarnovaa](https://github.com/Lunarnovaa) for her [hjem](https://github.com/feel-co/hjem) configuration and functions, that I used when switching away from home-manager.
Some bits have also been borrowed from within the configuration, and credit has been given where its due. Some bits have also been borrowed from within the configuration, and credit has been given where its due.

BIN
assets/avatar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View file

@ -0,0 +1,187 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="535"
height="535"
viewBox="0 0 501.56251 501.56249"
id="svg2"
version="1.1"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
sodipodi:docname="nix-snowflake-colours.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
id="linearGradient5562">
<stop
style="stop-color:#699ad7;stop-opacity:1"
offset="0"
id="stop5564" />
<stop
id="stop5566"
offset="0.24345198"
style="stop-color:#7eb1dd;stop-opacity:1" />
<stop
style="stop-color:#7ebae4;stop-opacity:1"
offset="1"
id="stop5568" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5053">
<stop
style="stop-color:#415e9a;stop-opacity:1"
offset="0"
id="stop5055" />
<stop
id="stop5057"
offset="0.23168644"
style="stop-color:#4a6baf;stop-opacity:1" />
<stop
style="stop-color:#5277c3;stop-opacity:1"
offset="1"
id="stop5059" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5562"
id="linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(70.650339,-1055.1511)"
x1="200.59668"
y1="351.41116"
x2="290.08701"
y2="506.18814" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5053"
id="linearGradient4330"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(864.69589,-1491.3405)"
x1="-584.19934"
y1="782.33563"
x2="-496.29703"
y2="937.71399" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.70904368"
inkscape:cx="99.429699"
inkscape:cy="195.33352"
inkscape:document-units="px"
inkscape:current-layer="layer3"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1050"
inkscape:window-x="1920"
inkscape:window-y="30"
inkscape:window-maximized="1"
inkscape:snap-global="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:showpageshadow="2"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="gradient-logo"
style="display:inline;opacity:1"
transform="translate(-156.41121,933.30685)">
<g
id="g2"
transform="matrix(0.99994059,0,0,0.99994059,-0.06321798,33.188377)"
style="stroke-width:1.00006">
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="path3336-6"
d="m 309.54892,-710.38827 122.19683,211.67512 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4901 -33.22946,-57.8257 z"
style="opacity:1;fill:url(#linearGradient4328);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.00018;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<use
height="100%"
width="100%"
transform="rotate(60,407.11155,-715.78724)"
id="use3439-6"
inkscape:transform-center-y="151.59082"
inkscape:transform-center-x="124.43045"
xlink:href="#path3336-6"
y="0"
x="0"
style="stroke-width:1.00006" />
<use
height="100%"
width="100%"
transform="rotate(-60,407.31177,-715.70016)"
id="use3445-0"
inkscape:transform-center-y="75.573958"
inkscape:transform-center-x="-168.20651"
xlink:href="#path3336-6"
y="0"
x="0"
style="stroke-width:1.00006" />
<use
height="100%"
width="100%"
transform="rotate(180,407.41868,-715.7565)"
id="use3449-5"
inkscape:transform-center-y="-139.94592"
inkscape:transform-center-x="59.669705"
xlink:href="#path3336-6"
y="0"
x="0"
style="stroke-width:1.00006" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4330);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.00018;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 309.54892,-710.38827 122.19683,211.67512 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4901 -33.22946,-57.8256 z"
id="path4260-0"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<use
height="100%"
width="100%"
transform="rotate(120,407.33916,-716.08356)"
id="use4354-5"
xlink:href="#path4260-0"
y="0"
x="0"
style="display:inline;stroke-width:1.00006" />
<use
height="100%"
width="100%"
transform="rotate(-120,407.28823,-715.86995)"
id="use4362-2"
xlink:href="#path4260-0"
y="0"
x="0"
style="display:inline;stroke-width:1.00006" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 MiB

3138
flake.lock

File diff suppressed because it is too large Load diff

103
flake.nix
View file

@ -4,51 +4,39 @@
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
systems,
agenix, agenix,
ags,
deploy-rs, deploy-rs,
treefmt-nix, treefmt-nix,
... ...
} @ inputs: let } @ inputs: let
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); supportedSystems = nixpkgs.lib.singleton "x86_64-linux";
treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
forAllSystems = function:
nixpkgs.lib.genAttrs
supportedSystems
(system: function nixpkgs.legacyPackages.${system});
treefmtEval = forAllSystems (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
in { in {
devShells = eachSystem (pkgs: { devShells = forAllSystems (pkgs: {
default = pkgs.mkShell { default = pkgs.mkShell {
packages = [ packages = [
pkgs.alejandra pkgs.alejandra
pkgs.git pkgs.git
deploy-rs.packages.${pkgs.system}.default deploy-rs.packages.${pkgs.system}.default
agenix.packages.${pkgs.system}.default agenix.packages.${pkgs.system}.default
(ags.packages.${pkgs.system}.default.override {
extraPackages = [
ags.packages.${pkgs.system}.astal3
ags.packages.${pkgs.system}.battery
];
})
]; ];
}; };
}); });
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper); formatter = forAllSystems (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
nixosConfigurations = import ./hosts {inherit inputs;}; nixosConfigurations = import ./hosts {inherit self inputs;};
packages = eachSystem (pkgs: import ./pkgs {inherit inputs pkgs;}); packages = forAllSystems (pkgs: import ./shared/pkgs {inherit inputs pkgs;});
deploy.nodes = import ./nodes {inherit inputs;}; deploy.nodes = import ./nodes.nix {inherit inputs;};
checks = builtins.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; checks = builtins.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
}; };
inputs = { inputs = {
# nix related # nix related
nixpkgs.url = "nixpkgs/nixos-unstable"; nixpkgs.url = "nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default-linux";
nixos-hardware.url = "github:NixOS/nixos-hardware"; nixos-hardware.url = "github:NixOS/nixos-hardware";
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-db = { nix-index-db = {
url = "github:nix-community/nix-index-database"; url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -59,27 +47,72 @@
url = "github:ryantm/agenix"; url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
ags = { anyrun = {
url = "github:aylur/ags"; url = "github:anyrun-org/anyrun";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
basix.url = "github:notashelf/basix"; basix.url = "github:notashelf/basix";
deploy-rs.url = "github:serokell/deploy-rs"; deploy-rs.url = "github:serokell/deploy-rs";
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; hyprland.url = "github:hyprwm/Hyprland";
hyprland-qtutils = {
url = "github:hyprwm/hyprland-qtutils";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
niri.url = "github:sodiboo/niri-flake"; hypridle = {
neovim-flake = { url = "github:hyprwm/hypridle";
url = "git+https://git.nezia.dev/nezia/neovim-flake"; inputs = {
hyprlang.follows = "hyprland/hyprlang";
hyprutils.follows = "hyprland/hyprutils";
nixpkgs.follows = "hyprland/nixpkgs";
systems.follows = "hyprland/systems";
};
};
hyprlock = {
url = "github:hyprwm/hyprlock";
inputs = {
hyprlang.follows = "hyprland/hyprlang";
hyprutils.follows = "hyprland/hyprutils";
nixpkgs.follows = "hyprland/nixpkgs";
systems.follows = "hyprland/systems";
};
};
hyprpaper = {
url = "github:hyprwm/hyprpaper";
inputs = {
hyprlang.follows = "hyprland/hyprlang";
hyprutils.follows = "hyprland/hyprutils";
nixpkgs.follows = "hyprland/nixpkgs";
systems.follows = "hyprland/systems";
};
};
hyprwm-contrib = {
url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
portfolio.url = "github:nezia1/portfolio"; hjem = {
plasma-manager = { url = "github:feel-co/hjem";
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
}; };
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.5.0";
nix-gaming.url = "github:fufexan/nix-gaming";
nvf.url = "github:notashelf/nvf";
treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.url = "github:numtide/treefmt-nix";
nezia_dev.url = "github:nezia1/nezia.dev";
};
nixConfig = {
extra-substituters = [
# use nixos cache first
"https://cache.nixos.org?priority=10"
"https://hyprland.cachix.org"
"https://nix-gaming.cachix.org"
"https://anyrun.cachix.org"
];
extra-trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
];
}; };
} }

View file

@ -1,14 +0,0 @@
{
imports = [
./services/udiskie.nix
./terminal
./programs
];
home = {
username = "nezia";
homeDirectory = "/home/nezia";
stateVersion = "24.05";
};
programs.home-manager.enable = true;
}

View file

@ -1,3 +0,0 @@
{
imports = [./firefox.nix];
}

View file

@ -1,171 +0,0 @@
{
inputs,
pkgs,
...
}: let
betterfox = pkgs.fetchFromGitHub {
owner = "yokoffing";
repo = "betterfox";
rev = "e026ed7d3a763c5d3f96c2680d7bc3340831af4f";
hash = "sha256-hpkEO5BhMVtINQG8HN4xqfas/R6q5pYPZiFK8bilIDs=";
};
in {
programs.firefox = {
enable = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies = {
DisableTelemetry = true;
DisablePocket = true;
DisableFeedbackCommands = true;
DisableFirefoxStudies = true;
OfferToSaveLogins = false;
OffertosaveloginsDefault = false;
PasswordManagerEnabled = false;
SearchSuggestEnabled = true;
# https://github.com/Sly-Harvey/NixOS/blob/f9da2691ea46565256ad757959cfc26ec6cee10d/modules/programs/browser/firefox/default.nix#L58-L163
"3rdparty".Extensions = {
"addon@darkreader.org" = {
permissions = ["internal:privateBrowsingAllowed"];
enabled = true;
automation = {
enabled = true;
behavior = "OnOff";
mode = "system";
};
detectDarkTheme = true;
enabledByDefault = true;
changeBrowserTheme = false;
enableForProtectedPages = true;
fetchNews = false;
previewNewDesign = true;
};
"uBlock0@raymondhill.net" = {
permissions = ["internal:privateBrowsingAllowed"];
advancedSettings = [
[
"userResourcesLocation"
"https://raw.githubusercontent.com/pixeltris/TwitchAdSolutions/master/video-swap-new/video-swap-new-ublock-origin.js"
]
];
adminSettings = {
userSettings = {
uiTheme = "dark";
advancedUserEnabled = true;
userFiltersTrusted = true;
importedLists = [
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
];
selectedFilterLists = [
"FRA-0"
"adguard-cookies"
"adguard-mobile-app-banners"
"adguard-other-annoyances"
"adguard-popup-overlays"
"adguard-social"
"adguard-spyware-url"
"adguard-widgets"
"easylist"
"easylist-annoyances"
"easylist-chat"
"easylist-newsletters"
"easylist-notifications"
"easyprivacy"
"fanboy-cookiemonster"
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
"https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
"plowe-0"
"ublock-annoyances"
"ublock-badware"
"ublock-cookies-adguard"
"ublock-cookies-easylist"
"ublock-filters"
"ublock-privacy"
"ublock-quick-fixes"
"ublock-unbreak"
"urlhaus-1"
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
];
};
};
};
};
};
};
profiles = {
nezia = {
settings = {
"browser.search.suggest.enabled" = true;
"ui.key.menuAccessKeyFocuses" = false;
};
extensions = with inputs.firefox-addons.packages.${pkgs.system}; [
darkreader
proton-pass
shinigami-eyes
stylus
ublock-origin
violentmonkey
];
# https://git.jacekpoz.pl/poz/niksos/src/commit/a48647a1c5bc6877a1100a65f4dc169b2fc11ed7/hosts/hape/firefox.nix
search = {
default = "SearxNG";
engines = {
"SearxNG" = {
urls = [
{
rels = ["results"];
template = "https://search.nezia.dev/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
{
rels = ["suggestions"];
template = "https://search.nezia.dev/autocompleter";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
"type" = "application/x-suggestions+json";
}
];
};
"MyNixOS" = {
urls = [{template = "https://mynixos.com/search?q={searchTerms}";}];
iconUpdateURL = "https://mynixos.com/favicon.ico";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = ["@nx"];
};
"Noogle" = {
urls = [{template = "https://noogle.dev/q?term={searchTerms}";}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@ng"];
};
"GitHub Nix" = {
# https://github.com/search?q=language%3Anix+NOT+is%3Afork+programs.neovim&type=code
urls = [{template = "https://github.com/search?q=language:nix NOT is:fork {searchTerms}&type=code";}];
iconUpdateURL = "https://github.com/favicon.ico";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = ["@ghn"];
};
"Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
};
};
# https://github.com/oddlama/nix-config/blob/main/users/myuser/graphical/firefox.nix#L53-L57
extraConfig = builtins.concatStringsSep "\n" [
(builtins.readFile "${betterfox}/user.js")
(builtins.readFile "${betterfox}/Securefox.js")
(builtins.readFile "${betterfox}/Fastfox.js")
(builtins.readFile "${betterfox}/Peskyfox.js")
(builtins.readFile "${betterfox}/Smoothfox.js")
];
};
};
};
}

View file

@ -1,51 +0,0 @@
{
inputs,
pkgs,
...
}: {
imports = [
./browsers
./media
./xdg.nix
./gtk.nix
./editors/helix.nix
];
# idk where to put this
programs = {
fzf.enable = true;
fastfetch.enable = true;
hyfetch = {
enable = true;
settings = {
preset = "nonbinary";
mode = "rgb";
backend = "fastfetch";
color_align.mode = "horizontal";
};
};
};
# miscellaneous programs that do not need to be configured
home.packages = with pkgs; [
cinny-desktop
entr
fractal
geary
gnome-control-center
gns3-gui
gns3-server
imhex
logisim-evolution
mission-center
nautilus
obsidian
playerctl
proton-pass
simple-scan
vesktop
wl-clipboard
inputs.neovim-flake.packages.${pkgs.system}.default
];
}

View file

@ -1,61 +0,0 @@
{
lib,
pkgs,
...
}: {
programs.helix = {
enable = true;
settings = {
theme = "catppuccin_macchiato";
editor = {
line-number = "relative";
lsp.display-messages = true;
auto-format = true;
auto-completion = true;
completion-timeout = 5;
color-modes = true;
completion-trigger-len = 1;
completion-replace = true;
cursorline = true;
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
indent-guides.render = true;
lsp.display-inlay-hints = true;
statusline.center = ["position-percentage"];
true-color = true;
whitespace.characters = {
newline = "";
tab = "";
};
};
keys.normal = {
space = {
space = "file_picker";
w = ":w";
q = ":q";
};
esc = ["collapse_selection" "keep_primary_selection"];
};
};
languages = {
language = [
{
name = "nix";
auto-format = true;
}
];
language-server = {
nil = {
command = lib.getExe pkgs.nil;
config.nil.formatting.command = ["${lib.getExe pkgs.alejandra}" "-q"];
};
};
};
};
}

View file

@ -1,15 +0,0 @@
{
pkgs,
lib,
...
}: {
programs.fuzzel = {
enable = true;
settings = {
main = {
terminal = lib.getExe pkgs.foot;
layer = "overlay";
};
};
};
}

View file

@ -1,23 +0,0 @@
{
pkgs,
inputs,
...
}: {
home.packages = [
pkgs.bottles
pkgs.lutris
pkgs.mangohud
pkgs.protonplus
# steamtinkerlaunch dependencies
pkgs.wget
pkgs.xdotool
pkgs.xorg.xrandr
pkgs.xorg.xprop
pkgs.xorg.xwininfo
pkgs.xxd
pkgs.yad
inputs.self.packages.${pkgs.system}.bolt-launcher
];
}

View file

@ -1,67 +0,0 @@
{
pkgs,
osConfig,
config,
...
}: {
dconf = {
enable = true;
settings = {
"org/gnome/shell" = {
disable-user-extensions = false; # enables user extensions
enabled-extensions = [
pkgs.gnomeExtensions.appindicator.extensionUuid
pkgs.gnomeExtensions.blur-my-shell.extensionUuid
pkgs.gnomeExtensions.emoji-copy.extensionUuid
pkgs.gnomeExtensions.clipboard-history.extensionUuid
];
};
"org/gnome/desktop/input-sources" = {
xkb-options = ["compose:ralt"];
};
"org/gnome/desktop/interface" = {
enable-hot-corners = false;
color-scheme = "prefer-dark";
};
"org/gnome/desktop/background" = {
picture-uri-dark = "file://" + builtins.toString osConfig.theme.wallpaper;
};
"org/gnome/desktop/search-providers" = {
disabled = [
"org.gnome.Terminal.desktop"
"org.gnome.Software.desktop"
"org.gnome.seahorse.Application.desktop"
"org.gnome.clocks.desktop"
"org.gnome.Characters.desktop"
"org.gnome.Calendar.desktop"
"org.gnome.Calculator.desktop"
];
enabled = [
"org.gnome.Nautilus.desktop"
"org.gnome.Settings.desktop"
];
};
"org/freedesktop/tracker/mine/files" = {
index-recursive-directories = [
"&DESKTOP"
"&DOCUMENTS"
"&MUSIC"
"&PICTURES"
"&VIDEOS"
"${config.home.homeDirectory}/Notes"
"${config.home.homeDirectory}/Projects"
];
};
};
};
home.packages = with pkgs.gnomeExtensions; [
appindicator
blur-my-shell
clipboard-history
emoji-copy
];
}

View file

@ -1,25 +0,0 @@
{
pkgs,
config,
...
}: {
gtk = {
enable = true;
font = {
name = "Inter";
package = pkgs.inter;
size = 11;
};
gtk3.extraConfig = {
gtk-decoration-layout = ":menu";
};
gtk4.extraConfig = {
gtk-decoration-layout = ":menu";
};
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
};
}

View file

@ -1,11 +0,0 @@
{pkgs, ...}: {
imports = [./zathura.nix];
programs.mpv.enable = true;
home.packages = [
pkgs.gnome-calculator
pkgs.loupe
pkgs.spotify
pkgs.stremio
pkgs.celluloid
];
}

View file

@ -1,17 +0,0 @@
_: {
programs.zathura = {
enable = true;
options = {
font = "Inter 12";
selection-notification = true;
selection-clipboard = "clipboard";
adjust-open = "best-fit";
pages-per-row = "1";
scroll-page-aware = "true";
scroll-full-overlap = "0.01";
scroll-step = "100";
zoom-min = "10";
};
};
}

View file

@ -1,168 +0,0 @@
{
config,
pkgs,
lib,
...
}: let
appLauncher = "fuzzel";
terminal = "foot";
browser = "firefox";
prefix = "Mod";
guiFileManager = "nautilus";
cliFileManager = "yazi";
in {
programs.niri.settings.binds = {
"${prefix}+D".action.spawn = appLauncher;
"${prefix}+Return".action.spawn = terminal;
"${prefix}+W".action.spawn = browser;
"${prefix}+E".action.spawn = guiFileManager;
"${prefix}+Shift+E".action.spawn = [terminal "-e" cliFileManager];
"${prefix}+Shift+Slash".action = config.lib.niri.actions.show-hotkey-overlay;
"${prefix}+Q".action = config.lib.niri.actions.close-window;
"${prefix}+Shift+Q".action.quit.skip-confirmation = true;
"${prefix}+F".action = config.lib.niri.actions.maximize-column;
"${prefix}+Shift+F".action = config.lib.niri.actions.fullscreen-window;
"${prefix}+C".action = config.lib.niri.actions.center-column;
# Focus
"${prefix}+Left".action = config.lib.niri.actions.focus-column-left;
"${prefix}+Down".action = config.lib.niri.actions.focus-window-down;
"${prefix}+Up".action = config.lib.niri.actions.focus-window-up;
"${prefix}+Right".action = config.lib.niri.actions.focus-column-right;
"${prefix}+H".action = config.lib.niri.actions.focus-column-left;
"${prefix}+J".action = config.lib.niri.actions.focus-window-down;
"${prefix}+K".action = config.lib.niri.actions.focus-window-up;
"${prefix}+L".action = config.lib.niri.actions.focus-column-right;
"${prefix}+Home".action = config.lib.niri.actions.focus-column-first;
"${prefix}+End".action = config.lib.niri.actions.focus-column-last;
# Move
"${prefix}+Ctrl+Left".action = config.lib.niri.actions.move-column-left;
"${prefix}+Ctrl+Down".action = config.lib.niri.actions.move-window-down;
"${prefix}+Ctrl+Up".action = config.lib.niri.actions.move-window-up;
"${prefix}+Ctrl+Right".action = config.lib.niri.actions.move-column-right;
"${prefix}+Ctrl+H".action = config.lib.niri.actions.move-column-left;
"${prefix}+Ctrl+J".action = config.lib.niri.actions.move-window-down;
"${prefix}+Ctrl+K".action = config.lib.niri.actions.move-window-up;
"${prefix}+Ctrl+L".action = config.lib.niri.actions.move-column-right;
"${prefix}+Ctrl+Home".action = config.lib.niri.actions.move-column-to-first;
"${prefix}+Ctrl+End".action = config.lib.niri.actions.move-column-to-last;
# Monitor focus
"${prefix}+Shift+Left".action = config.lib.niri.actions.focus-monitor-left;
"${prefix}+Shift+Down".action = config.lib.niri.actions.focus-monitor-down;
"${prefix}+Shift+Up".action = config.lib.niri.actions.focus-monitor-up;
"${prefix}+Shift+Right".action = config.lib.niri.actions.focus-monitor-right;
"${prefix}+Shift+H".action = config.lib.niri.actions.focus-monitor-left;
"${prefix}+Shift+J".action = config.lib.niri.actions.focus-monitor-down;
"${prefix}+Shift+K".action = config.lib.niri.actions.focus-monitor-up;
"${prefix}+Shift+L".action = config.lib.niri.actions.focus-monitor-right;
# Move to monitor
"${prefix}+Shift+Ctrl+Left".action = config.lib.niri.actions.move-column-to-monitor-left;
"${prefix}+Shift+Ctrl+Down".action = config.lib.niri.actions.move-column-to-monitor-down;
"${prefix}+Shift+Ctrl+Up".action = config.lib.niri.actions.move-column-to-monitor-up;
"${prefix}+Shift+Ctrl+Right".action = config.lib.niri.actions.move-column-to-monitor-right;
"${prefix}+Shift+Ctrl+H".action = config.lib.niri.actions.move-column-to-monitor-left;
"${prefix}+Shift+Ctrl+J".action = config.lib.niri.actions.move-column-to-monitor-down;
"${prefix}+Shift+Ctrl+K".action = config.lib.niri.actions.move-column-to-monitor-up;
"${prefix}+Shift+Ctrl+L".action = config.lib.niri.actions.move-column-to-monitor-right;
# Workspace navigation
"${prefix}+Page_Down".action = config.lib.niri.actions.focus-workspace-down;
"${prefix}+Page_Up".action = config.lib.niri.actions.focus-workspace-up;
"${prefix}+U".action = config.lib.niri.actions.focus-workspace-down;
"${prefix}+I".action = config.lib.niri.actions.focus-workspace-up;
"${prefix}+Ctrl+Page_Down".action = config.lib.niri.actions.move-column-to-workspace-down;
"${prefix}+Ctrl+Page_Up".action = config.lib.niri.actions.move-column-to-workspace-up;
"${prefix}+Ctrl+U".action = config.lib.niri.actions.move-column-to-workspace-down;
"${prefix}+Ctrl+I".action = config.lib.niri.actions.move-column-to-workspace-up;
"${prefix}+Shift+Page_Down".action = config.lib.niri.actions.move-workspace-down;
"${prefix}+Shift+Page_Up".action = config.lib.niri.actions.move-workspace-up;
"${prefix}+Shift+U".action = config.lib.niri.actions.move-workspace-down;
# Workspace focus
"${prefix}+1".action.focus-workspace = 1;
"${prefix}+2".action.focus-workspace = 2;
"${prefix}+3".action.focus-workspace = 3;
"${prefix}+4".action.focus-workspace = 4;
"${prefix}+5".action.focus-workspace = 5;
"${prefix}+6".action.focus-workspace = 6;
"${prefix}+7".action.focus-workspace = 7;
"${prefix}+8".action.focus-workspace = 8;
"${prefix}+9".action.focus-workspace = 9;
# Move to workspace
"${prefix}+Ctrl+1".action.move-column-to-workspace = 1;
"${prefix}+Ctrl+2".action.move-column-to-workspace = 2;
"${prefix}+Ctrl+3".action.move-column-to-workspace = 3;
"${prefix}+Ctrl+4".action.move-column-to-workspace = 4;
"${prefix}+Ctrl+5".action.move-column-to-workspace = 5;
"${prefix}+Ctrl+6".action.move-column-to-workspace = 6;
"${prefix}+Ctrl+7".action.move-column-to-workspace = 7;
"${prefix}+Ctrl+8".action.move-column-to-workspace = 8;
"${prefix}+Ctrl+9".action.move-column-to-workspace = 9;
"${prefix}+Shift+I".action = config.lib.niri.actions.move-workspace-up;
# Window management
"${prefix}+Comma".action = config.lib.niri.actions.consume-window-into-column;
"${prefix}+Period".action = config.lib.niri.actions.expel-window-from-column;
"${prefix}+BracketLeft".action = config.lib.niri.actions.consume-or-expel-window-left;
"${prefix}+BracketRight".action = config.lib.niri.actions.consume-or-expel-window-right;
# Column management
"${prefix}+R".action = config.lib.niri.actions.switch-preset-column-width;
"${prefix}+Shift+R".action = config.lib.niri.actions.switch-preset-window-height;
"${prefix}+Ctrl+R".action = config.lib.niri.actions.reset-window-height;
"${prefix}+Minus".action = config.lib.niri.actions.set-column-width "-10%";
"${prefix}+Equal".action = config.lib.niri.actions.set-column-width "+10%";
"${prefix}+Shift+Minus".action = config.lib.niri.actions.set-window-height "-10%";
"${prefix}+Shift+Equal".action = config.lib.niri.actions.set-window-height "+10%";
# Screenshots
"Print".action = config.lib.niri.actions.screenshot-screen;
"Ctrl+Print".action = config.lib.niri.actions.screenshot;
# System
"${prefix}+Alt+L".action.spawn = [
"${lib.getExe' pkgs.systemd "loginctl"}"
"lock-session"
];
# Media keys
"XF86AudioRaiseVolume" = {
action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"];
allow-when-locked = true;
};
"XF86AudioLowerVolume" = {
action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"];
allow-when-locked = true;
};
"XF86AudioMute" = {
action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"];
allow-when-locked = true;
};
"XF86AudioMicMute" = {
action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"];
allow-when-locked = true;
};
"XF86AudioPlay" = {
action.spawn = ["playerctl" "play-pause"];
};
"XF86MonBrightnessUp" = {
action.spawn = ["brillo" "-q" "-u 300000" "-A 5"];
allow-when-locked = true;
};
"XF86MonBrightnessDown" = {
action.spawn = ["brillo" "-q" "-u 300000" "-U 5"];
allow-when-locked = true;
};
# set on media key since framework laptops have a gear as the button label
"XF86AudioMedia" = {
action.spawn = ["sh" "-c" "env XDG_CURRENT_DESKTOP=gnome gnome-control-center"];
};
"XF86PowerOff".action.spawn = "wlogout";
};
}

View file

@ -1,173 +0,0 @@
{
lib,
pkgs,
config,
...
}: {
imports = [./binds.nix];
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gnome pkgs.gnome-keyring];
config = {
common = {
default = ["gtk"];
"org.freedesktop.impl.portal.ScreenCast" = ["gnome"];
"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
};
};
};
programs.niri = {
settings = {
input = {
power-key-handling.enable = false;
keyboard.xkb = {
layout = "us";
options = "compose:ralt";
};
};
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
layout = {
focus-ring = {
enable = true;
};
always-center-single-column = true;
};
# https://github.com/sodiboo/system/blob/2978f4d79c51a5bd7e38a9cd75e3ec9046aa7e75/niri.mod.nix#L418-L434
outputs = let
cfg = config.programs.niri.settings.outputs;
in {
"HDMI-A-1" = {
mode = {
width = 1920;
height = 1080;
refresh = 60.0;
};
position.x = -cfg."HDMI-A-1".mode.width;
position.y = 0;
};
"DP-1" = {
mode = {
width = 2560;
height = 1440;
refresh = 144.0;
};
position.x = 0;
position.y = 0;
};
};
window-rules = [
{
draw-border-with-background = false;
geometry-corner-radius = let
r = 8.0;
in {
top-left = r;
top-right = r;
bottom-left = r;
bottom-right = r;
};
clip-to-geometry = true;
}
{
matches = [
{app-id = "foot";}
];
default-column-width = {proportion = 0.5;};
}
];
environment = {
"NIXOS_OZONE_WL" = "1";
"DISPLAY" = ":0";
"_JAVA_AWT_WM_NONREPARENTING" = "1"; # https://wiki.archlinux.org/title/Sway#Java_applications
};
};
};
# copied from https://github.com/linyinfeng/dotfiles/blob/c00fe3b1562ad947672863a43e455bc2f01a56b6/home-manager/profiles/niri/default.nix#L594-L611
systemd.user.services.xwayland-satellite = {
Unit = {
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
Requisite = ["graphical-session.target"];
};
Install = {
WantedBy = ["niri.service"];
};
Service = {
Type = "simple";
ExecStart = "${lib.getExe pkgs.xwayland-satellite} :0";
NotifyAccess = "all";
StandardOutput = "journal";
Restart = "on-failure";
};
};
programs.wlogout = {
enable = true;
layout = let
systemd = let
systemd = lib.getExe' pkgs.systemd;
in {
loginctl = systemd "loginctl";
systemctl = systemd "systemctl";
};
in [
{
action = "${systemd.loginctl} lock-session";
keybind = "l";
label = "lock";
text = "Lock";
}
{
action = "${systemd.systemctl} hibernate";
keybind = "h";
label = "hibernate";
text = "Hibernate";
}
{
action = "${
systemd.loginctl
} terminate-user ${
config.home.username
}";
keybind = "q";
label = "logout";
text = "Logout";
}
{
action = "${systemd.systemctl} poweroff";
keybind = "p";
label = "shutdown";
text = "Shutdown";
}
{
action = "${systemd.systemctl} suspend";
keybind = "s";
label = "suspend";
text = "Suspend";
}
{
action = "${systemd.systemctl} reboot";
keybind = "r";
label = "reboot";
text = "Reboot";
}
];
};
}

View file

@ -1,19 +0,0 @@
# stolen from https://raw.githubusercontent.com/carlsvelz/dotfiles/a7a109b2e19f73062b4961e7be75836e6d13408c/home/wayland/swaybg.nix
{
pkgs,
lib,
osConfig,
...
}: {
systemd.user.services.swaybg = {
Unit = {
Description = "Wayland wallpaper daemon";
PartOf = ["graphical-session.target"];
};
Service = {
ExecStart = "${lib.getExe pkgs.swaybg} -i ${osConfig.theme.wallpaper} -m fill";
Restart = "on-failure";
};
Install.WantedBy = ["graphical-session.target"];
};
}

View file

@ -1,20 +0,0 @@
{
lib,
config,
...
}: {
services.swayidle = {
enable = true;
events = [
{
event = "lock";
command = "${lib.getExe config.programs.swaylock.package} --daemonize";
}
{
event = "before-sleep";
command = "${lib.getExe config.programs.swaylock.package} --daemonize";
}
];
};
systemd.user.services.swayidle.Unit.After = lib.mkForce ["graphical-session.target"];
}

View file

@ -1,24 +0,0 @@
{pkgs, ...}: {
# requires `security.pam.services.swaylock = { };` at the system level or else
# unlock will not work.
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
clock = true;
timestr = "%H:%M";
indicator = true;
indicator-radius = 111;
indicator-thickness = 9;
screenshots = true;
effect-blur = "7x5";
effect-vignette = "0.75:0.75";
effect-pixelate = 5;
ignore-empty-password = false; # needed for PAM to work with fprintd / password
};
};
}

View file

@ -1,186 +0,0 @@
{
pkgs,
lib,
osConfig,
config,
...
}: let
inherit (lib) getExe mkMerge mkIf;
inherit (builtins) readFile;
in {
programs.waybar = {
enable = true;
systemd.enable = true;
style = readFile ./style.css;
settings = {
mainBar = mkMerge [
{
layer = "top";
position = "top";
height = 30;
margin-top = 6;
margin-left = 6;
margin-right = 6;
margin-bottom = 0;
modules-left = ["niri/workspaces" "niri/window"];
modules-center = ["group/clock"];
modules-right =
["tray" "group/status" "group/power"]
++ lib.optional config.services.swaync.enable "custom/swaync";
tray = {
icon-size = 16;
spacing = 12;
};
battery = {
interval = 10;
states = {
warning = 30;
critical = 15;
};
format = "{icon} {capacity}%";
format-charging = " {capacity}% - {time}";
format-full = " {capacity}% - Full";
format-icons = [
""
""
""
""
""
];
max-length = 25;
};
"pulseaudio" = {
format = "{icon} {volume}%";
format-bluetooth = "{icon} {volume}%";
format-muted = " ";
format-icons = {
"alsa_output.pci-0000_00_1f.3.analog-stereo" = "";
"alsa_output.pci-0000_00_1f.3.analog-stereo-muted" = "";
headphone = "";
hands-free = "";
headset = "";
phone = "";
phone-muted = "";
portable = "";
car = "";
default = [
""
""
];
};
scroll-step = 1;
on-click = "pavucontrol";
ignored-sinks = [
"Easy Effects Sink"
];
};
"power-profiles-daemon" = {
format-icons = {
default = "";
performance = "";
balanced = "";
power-saver = "";
};
};
"group/status" = {
orientation = "inherit";
modules = [
"pulseaudio"
"power-profiles-daemon"
"network"
"battery"
];
};
"group/power" = {
orientation = "inherit";
modules = [
"custom/power"
];
};
"group/clock" = {
orientation = "inherit";
modules = [
"clock#time"
"clock#date"
];
};
"custom/power" = {
format = "";
tooltip = false;
on-click = getExe pkgs.wlogout;
};
"clock#date" = {
format = "{:%D}";
tooltip-format = "<tt><big>{calendar}</big></tt>";
};
"clock#time" = {
format = "{:%H:%M}";
tooltip-format = "{tz_list}";
timezones = [
osConfig.time.timeZone
"US/Eastern"
];
};
network = {
interface = "wlp1s0";
format = "{ifname}";
format-wifi = "{icon}";
format-ethernet = "{ipaddr}/{cidr} 󰊗";
format-disconnected = "";
tooltip-format = "{ifname} via {gwaddr} 󰊗";
tooltip-format-wifi = "{essid} ({signalStrength}%)";
tooltip-format-ethernet = "{ifname} ";
tooltip-format-disconnected = "Disconnected";
max-length = 50;
format-icons = [
"󰤟"
"󰤢"
"󰤥"
"󰤨"
];
};
}
(mkIf osConfig.programs.niri.enable {
"niri/window" = {
icon = true;
};
})
(mkIf config.services.swaync.enable {
"custom/swaync" = {
format = "<big>{icon}</big>";
format-icons = {
notification = "󱥁";
none = "󰍥";
dnd-notification = "󱅮";
dnd-none = "󱅯";
};
max-length = 3;
return-type = "json";
escape = true;
exec-if = "which ${pkgs.swaynotificationcenter}/bin/swaync-client";
exec = "${pkgs.swaynotificationcenter}/bin/swaync-client --subscribe-waybar";
on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel --skip-wait";
on-click-middle = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-dnd --skip-wait";
tooltip-format = "󰵚 {} notification(s)";
};
})
];
};
};
home.packages = [
pkgs.pavucontrol
];
}

View file

@ -1,91 +0,0 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
border: none;
border-radius: 0px;
min-height: 0;
}
window#waybar {
border-radius: 2em;
font-family: "Symbols Nerd Font", Inter, sans-serif;
font-size: 16px;
font-style: normal;
background: alpha(
@base00,
0.9999999
); /* niri issue workaround, thanks https://github.com/oatmealine/nix-config/blob/bfdddd2cb36ef659bcddc28e0dbb542b6db8b3bc/modules/desktop/themes/catppuccin/waybar.css#L14 */
color: @base05;
}
#workspaces,
.modules-right box {
background: @base02;
padding: 0.15em 0.25em;
border-radius: 1em;
margin: 0 0.25em;
}
#workspaces {
padding: 0;
background: @base02;
}
#workspaces button:nth-child(1) {
border-top-left-radius: 1em;
border-bottom-left-radius: 1em;
}
#workspaces button:nth-last-child(1) {
border-top-right-radius: 1em;
border-bottom-right-radius: 1em;
}
#workspaces button {
padding: 0 0.5em;
background-color: transparent;
}
#workspaces button:hover {
background: rgba(255, 255, 255, 0.1);
box-shadow: none;
}
#workspaces button.active {
background: @base0E;
color: @base02;
}
#workspaces button.urgent {
background: @base08;
}
#window {
margin-left: 1em;
}
.modules-left,
.modules-right {
margin: 0.4em 0.5em;
}
#battery,
#clock,
#network,
#pulseaudio,
#tray,
#power-profiles-daemon {
padding: 0 0.5em;
}
.modules-left,
.modules-right {
margin: 0.4em 0.5em;
}
#custom-power {
padding: 0 1.2em;
color: @base08;
}
#custom-swaync {
padding: 0 1.2em;
}

View file

@ -1,35 +0,0 @@
{config, ...}: {
xdg = {
enable = true;
cacheHome = config.home.homeDirectory + "/.local/cache";
mimeApps = {
enable = true;
defaultApplications = {
"default-web-browser" = ["firefox.desktop"];
"text/html" = ["firefox.desktop"];
"x-scheme-handler/http" = ["firefox.desktop"];
"x-scheme-handler/https" = ["firefox.desktop"];
"x-scheme-handler/about" = ["firefox.desktop"];
"x-scheme-handler/unknown" = ["firefox.desktop"];
"x-scheme-handler/chrome" = ["chromium-browser.desktop"];
"inode/directory" = ["yazi.desktop"];
"application/pdf" = ["org.pwmt.zathura-pdf-mupdf.desktop"];
"image/png" = ["org.gnome.Loupe.desktop"];
"image/svg" = [" org.gnome.Loupe.desktop"];
"image/jpeg" = ["org.gnome.Loupe.desktop"];
"image/gif" = [" org.gnome.Loupe.desktop"];
"video/mp4" = ["io.github.celluloid_player.Celluloid.desktop"];
"video/avi" = ["io.github.celluloid_player.Celluloid.desktop"];
"video/mkv" = ["io.github.celluloid_player.Celluloid.desktop"];
};
};
userDirs = {
enable = true;
createDirectories = true;
extraConfig = {
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
};
};
};
}

View file

@ -1,33 +0,0 @@
{
osConfig,
lib,
lib',
...
}: let
inherit (lib) optionalString;
inherit (builtins) readFile;
in {
services.swaync = {
enable = true;
style = readFile ./style.css;
settings = {
positionX = "right";
positionY = "top";
layer = "overlay";
control-center-layer = "top";
layer-shell = true;
cssPriority = "application";
control-center-margin-top = 0;
control-center-margin-bottom = 0;
control-center-margin-right = 0;
control-center-margin-left = 0;
notification-2fa-action = true;
notification-inline-replies = false;
notification-icon-size = 64;
notification-body-image-height = 100;
notification-body-image-width = 200;
};
};
# systemd.user.services.swaync.Service.Environment = "WAYLAND_DISPLAY=wayland-1";
systemd.user.services.swaync.Unit.ConditionEnvironment = lib.mkForce "";
}

View file

@ -1,5 +0,0 @@
_: {
services.syncthing = {
enable = true;
};
}

View file

@ -1,3 +0,0 @@
{
services.udiskie.enable = true;
}

View file

@ -1,10 +0,0 @@
_: {
imports = [
./programs
./shell
];
home.sessionVariables = {
EDITOR = "nvim";
};
}

View file

@ -1,18 +0,0 @@
{
osConfig,
config,
lib,
...
}: let
in {
programs.foot = {
enable = true;
settings = {
main = {
term = "xterm-256color";
font = "monospace:size=14";
shell = "${lib.getExe config.programs.fish.package}";
};
};
};
}

View file

@ -1,16 +0,0 @@
_: {
programs.gnome-terminal = {
enable = true;
showMenubar = true;
profile = {
"4621184a-b921-42cf-80a0-7784516606f2" = {
default = true;
audibleBell = false;
allowBold = true;
boldIsBright = true;
visibleName = "default";
font = "Intel One Mono 14";
};
};
};
}

View file

@ -1,71 +0,0 @@
{
programs.wezterm = {
enable = true;
# package = inputs.wezterm.packages.${pkgs.system}.default;
extraConfig = ''
local w = require('wezterm')
local function is_vim(pane)
return pane:get_user_vars().IS_NVIM == 'true'
end
local direction_keys = {
h = 'Left',
j = 'Down',
k = 'Up',
l = 'Right',
}
local function split_nav(resize_or_move, key)
return {
key = key,
mods = resize_or_move == 'resize' and 'META' or 'CTRL',
action = w.action_callback(function(win, pane)
if is_vim(pane) then
win:perform_action({
SendKey = { key = key, mods = resize_or_move == 'resize' and 'META' or 'CTRL' },
}, pane)
else
if resize_or_move == 'resize' then
win:perform_action({ AdjustPaneSize = { direction_keys[key], 3 } }, pane)
else
win:perform_action({ ActivatePaneDirection = direction_keys[key] }, pane)
end
end
end),
}
end
return {
enable_wayland = false,
front_end = "WebGpu",
hide_tab_bar_if_only_one_tab = true,
show_new_tab_button_in_tab_bar = false,
harfbuzz_features = { "ss01", "ss03" },
leader = { key = " ", mods = "CTRL", timeout_milliseconds = 1000 },
keys = {
{
mods = "LEADER",
key = "-",
action = wezterm.action.SplitVertical { domain = "CurrentPaneDomain" }
},
{
mods = "LEADER",
key = "=",
action = wezterm.action.SplitHorizontal { domain = "CurrentPaneDomain" }
},
split_nav('move', 'h'),
split_nav('move', 'j'),
split_nav('move', 'k'),
split_nav('move', 'l'),
split_nav('resize', 'h'),
split_nav('resize', 'j'),
split_nav('resize', 'k'),
split_nav('resize', 'l'),
},
}
'';
};
}

View file

@ -1,9 +0,0 @@
_: {
programs.bat = {
enable = true;
config.theme = "ansi";
};
home.sessionVariables = {
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
};
}

View file

@ -1,23 +0,0 @@
{pkgs, ...}: {
imports = [
./bat.nix
./git.nix
./gnupg.nix
./tmux.nix
./direnv.nix
./nix-index.nix
./yazi.nix
];
home.packages = with pkgs; [
# archives
zip
unzip
unrar
# utils
fd
file
ripgrep
];
}

View file

@ -1,8 +0,0 @@
{
programs = {
direnv = {
enable = true;
nix-direnv.enable = true;
};
};
}

View file

@ -1,50 +0,0 @@
{
programs.git = {
enable = true;
userName = "Anthony Rodriguez";
userEmail = "anthony@nezia.dev";
signing = {
signByDefault = true;
key = "EE3BE97C040A86CE";
};
extraConfig = {
push.autoSetupRemote = true;
};
};
programs.lazygit = {
enable = true;
};
home.shellAliases = {
g = "git";
gs = "git status";
gsh = "git show HEAD";
gshs = "DELTA_FEATURES=+side-by-side git show HEAD";
ga = "git add";
gaa = "git add :/";
gap = "git add -p";
gc = "git commit";
gca = "git commit --amend";
gcm = "git commit --message";
gcf = "git commit --fixup";
gk = "git checkout";
gkp = "git checkout -p";
gd = "git diff";
gds = "DELTA_FEATURES=+side-by-side git diff";
gdc = "git diff --cached";
gdcs = "DELTA_FEATURES=+side-by-side git diff --cached";
gf = "git fetch";
gl = "git log";
glp = "git log -p";
glps = "DELTA_FEATURES=+side-by-side git log -p";
gp = "git push";
gpf = "git push --force-with-lease";
gr = "git reset";
gra = "git reset :/";
grp = "git reset -p";
gt = "git stash";
gtp = "git stash pop";
gu = "git pull";
};
}

View file

@ -1,8 +0,0 @@
{
programs.gpg.enable = true;
services.gpg-agent = {
enable = true;
enableBashIntegration = true;
enableFishIntegration = true;
};
}

View file

@ -1,11 +0,0 @@
{inputs, ...}: {
imports = [inputs.nix-index-db.hmModules.nix-index];
programs = {
nix-index = {
enable = true;
symlinkToCacheHome = true; # needed for comma
};
command-not-found.enable = false;
nix-index-database.comma.enable = true;
};
}

View file

@ -1,44 +0,0 @@
{pkgs, ...}: {
programs.tmux = {
enable = true;
prefix = "C-space";
escapeTime = 10;
clock24 = true;
keyMode = "vi";
mouse = true;
baseIndex = 1;
extraConfig = ''
set-option -a terminal-features "''${TERM}:RGB"
'';
plugins = with pkgs; [
{
plugin = tmuxPlugins.catppuccin;
extraConfig = ''
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_status_modules_right "directory user host session"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{pane_current_path}"
set -g @catppuccin_flavor 'frappe'
'';
}
tmuxPlugins.vim-tmux-navigator
tmuxPlugins.yank
];
};
programs.fzf.tmux.enableShellIntegration = true;
}

View file

@ -1,26 +0,0 @@
{pkgs, ...}: {
programs.yazi = let
# https://github.com/iynaix/dotfiles/blob/8bb1568019ea26f034ac1af9c499b3ff102391a5/home-manager/shell/yazi.nix#L9-L11
mkYaziPlugin = name: text: {
"${name}" = toString (pkgs.writeTextDir "${name}.yazi/init.lua" text) + "/${name}.yazi";
};
in {
enable = true;
enableFishIntegration = true;
plugins = mkYaziPlugin "smart-enter" ''
return {
entry = function()
local h = cx.active.current.hovered
ya.manager_emit(h and h.cha.is_dir and "enter" or "open", { hovered = true })
end,
}
'';
keymap.manager.prepend_keymap = [
{
on = "l";
run = "plugin --sync smart-enter";
desc = "Enter the child directory, or open the file";
}
];
};
}

View file

@ -1,34 +0,0 @@
{pkgs, ...}: {
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting # Disable greeting
fish_vi_key_bindings # Enable Vi mode
'';
shellAbbrs = {
cd = "z";
ngc = "sudo nix-collect-garbage -d";
};
plugins = [
{
name = "fzf";
inherit (pkgs.fishPlugins.fzf) src;
}
{
name = "autopair";
inherit (pkgs.fishPlugins.autopair) src;
}
];
};
programs.bash = {
enable = true;
initExtra = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
}

View file

@ -1,30 +0,0 @@
{
programs.nushell = {
enable = true;
extraConfig = ''
let carapace_completer = {|spans|
carapace $spans.0 nushell ...$spans | from json
}
$env.config = {
show_banner: false,
completions: {
case_sensitive: false # case-sensitive completions
quick: true # set to false to prevent auto-selecting completions
partial: true # set to false to prevent partial filling of the prompt
algorithm: "fuzzy" # prefix or fuzzy
external: {
# set to false to prevent nushell looking into $env.PATH to find more suggestions
enable: true
# set to lower can improve completion performance at the cost of omitting some options
max_results: 100
completer: $carapace_completer # check 'carapace_completer'
}
}
}
'';
};
programs.carapace = {
enable = true;
};
}

View file

@ -1,6 +0,0 @@
{
programs.starship = {
enable = true;
enableTransience = true;
};
}

View file

@ -1,6 +0,0 @@
{
programs.zoxide = {
enable = true;
enableBashIntegration = false;
};
}

View file

@ -6,20 +6,23 @@ in {
./networking.nix # generated at runtime by nixos-infect ./networking.nix # generated at runtime by nixos-infect
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
"${system}/services/forgejo.nix"
"${system}/services/searx.nix"
"${system}/services/portfolio.nix"
]; ];
local = {
systemVars = {
hostName = "anastacia";
};
profiles.server.enable = true;
};
boot.tmp.cleanOnBoot = true; boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
networking.hostName = "anastacia";
networking.domain = ""; networking.domain = "";
services.openssh.enable = true; services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEzs7SQH0Vjt9JHoXXmWy9fPU1I3rrRWV5magZFrI5al" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEzs7SQH0Vjt9JHoXXmWy9fPU1I3rrRWV5magZFrI5al"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHKEPlN/GU9nJZPleA77HH5NA+6vyhhM84fTSjEwnEgq" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHKEPlN/GU9nJZPleA77HH5NA+6vyhhM84fTSjEwnEgq"
]; ];
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

View file

@ -1,29 +1,27 @@
{inputs, ...}: let {inputs, ...}: let
lib' = import ../lib; lib' = import ../lib inputs.nixpkgs.lib;
mkSystem = args: mkSystem = args:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs lib';}; specialArgs = {inherit inputs lib';};
modules = args.modules or []; modules = (args.modules or []) ++ [../modules];
}; };
in { in {
vamos = mkSystem { vamos = mkSystem {
modules = [ modules = [
./vamos ./vamos
../modules
inputs.nixos-hardware.nixosModules.framework-13-7040-amd inputs.nixos-hardware.nixosModules.framework-13-7040-amd
inputs.hjem.nixosModules.default
]; ];
}; };
solaire = mkSystem { solaire = mkSystem {
modules = [ modules = [
./solaire ./solaire
../modules inputs.hjem.nixosModules.default
]; ];
}; };
anastacia = mkSystem { anastacia = mkSystem {
modules = [ modules = [./anastacia];
./anastacia
];
}; };
} }

View file

@ -0,0 +1,6 @@
_: {
local.style = {
enable = true;
wallpaper = ../../../assets/wallpapers/lucy-edgerunners-wallpaper.jpg;
};
}

View file

@ -1,51 +1,25 @@
{ _: {
inputs, imports = [./hardware-configuration.nix ./config/theme.nix];
specialArgs,
...
}: let
system = "${inputs.self}/system";
home = "${inputs.self}/home";
in {
imports = [
./hardware-configuration.nix
./modules
system local = {
"${system}/hardware/uni-sync.nix" systemVars = {
hostName = "solaire";
username = "nezia";
};
homeVars = {
fullName = "Anthony Rodriguez";
email = "anthony@nezia.dev";
signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEzs7SQH0Vjt9JHoXXmWy9fPU1I3rrRWV5magZFrI5al nezia@solaire";
};
"${system}/programs/games.nix" profiles = {
"${system}/hardware/nvidia.nix" desktop.enable = true;
gaming.enable = true;
};
"${system}/services/logind.nix" modules = {
"${system}/services/greetd.nix" hyprland.enable = true;
nvidia.enable = true;
"${system}/programs/niri" };
"${system}/services/gnome.nix"
"${system}/services/documentation.nix"
];
home-manager = {
users.nezia.imports = [
"${home}"
"${home}/services/udiskie.nix"
"${home}/programs/games"
"${home}/programs/niri"
"${home}/programs/waybar"
"${home}/programs/fuzzel.nix"
"${home}/services/swaync"
"${home}/programs/swaybg.nix"
"${home}/programs/swaylock.nix"
"${home}/programs/swayidle.nix"
"${home}/terminal/emulators/foot.nix"
"${home}/services/syncthing.nix"
];
extraSpecialArgs = specialArgs;
}; };
networking.hostName = "solaire";
environment.variables.FLAKE = "/home/nezia/.dotfiles";
} }

View file

@ -1,3 +0,0 @@
{
imports = [./theme.nix];
}

View file

@ -1,8 +0,0 @@
{
theme = {
wallpaper = ../../../wallpapers/lucy-edgerunners-wallpaper.jpg;
schemeName = "catppuccin-macchiato";
enable = true;
gtk.enable = false;
};
}

View file

@ -0,0 +1,9 @@
{pkgs, ...}: {
local.style = {
enable = true;
wallpaper = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/wallpapers/nix-wallpaper-simple-dark-gray.png";
hash = "sha256-JaLHdBxwrphKVherDVe5fgh+3zqUtpcwuNbjwrBlAok=";
};
};
}

View file

@ -1,54 +1,28 @@
{ _: {
inputs,
specialArgs,
...
}: let
system = "${inputs.self}/system";
home = "${inputs.self}/home";
in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./modules ./config/theme.nix
"${system}"
"${system}/core/lanzaboote.nix"
"${system}/hardware/fprintd.nix"
"${system}/services/power.nix"
"${system}/services/brightness.nix"
"${system}/services/logind.nix"
"${system}/services/greetd.nix"
"${system}/services/kanata.nix"
"${system}/programs/niri"
"${system}/services/gnome.nix"
"${system}/services/mail.nix"
"${system}/services/documentation.nix"
]; ];
home-manager = { local = {
users.nezia.imports = [ systemVars = {
"${home}" hostName = "vamos";
"${home}/services/udiskie.nix" username = "nezia";
};
"${home}/programs/niri" homeVars = {
"${home}/programs/waybar" fullName = "Anthony Rodriguez";
"${home}/programs/fuzzel.nix" email = "anthony@nezia.dev";
signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHKEPlN/GU9nJZPleA77HH5NA+6vyhhM84fTSjEwnEgq nezia@vamos";
};
"${home}/services/swaync" profiles = {
"${home}/programs/swaybg.nix" desktop.enable = true;
"${home}/programs/swaylock.nix" laptop.enable = true;
"${home}/programs/swayidle.nix" };
"${home}/terminal/emulators/foot.nix" modules = {
hyprland.enable = true;
"${home}/services/syncthing.nix" };
];
extraSpecialArgs = specialArgs;
}; };
networking.hostName = "vamos";
environment.variables.FLAKE = "/home/nezia/.dotfiles";
} }

View file

@ -1,3 +0,0 @@
{
imports = [./theme.nix];
}

View file

@ -1,9 +0,0 @@
{pkgs, ...}: {
theme = {
enable = true;
wallpaper = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/e0cf0eb237dc5baba86661a3572b20a6183c1876/wallpapers/nix-wallpaper-nineish-catppuccin-frappe.png?raw=true";
hash = "sha256-/HAtpGwLxjNfJvX5/4YZfM8jPNStaM3gisK8+ImRmQ4=";
};
};
}

View file

@ -1,13 +1,27 @@
let lib:
# convert rrggbb hex to rgba(r, g, b, a) with lib; let
rgba = lib: color: opacity: let # thanks fufexan https://github.com/fufexan/dotfiles/blob/2947f27791e97ea33c48af4ee2d0188fe03f80dd/lib/colors/default.nix#L8-L66
r = toString (hexToDec lib (builtins.substring 0 2 color)); # convert rrggbb hex to rgba(r, g, b, a) css
g = toString (hexToDec lib (builtins.substring 2 2 color)); rgba = c: alpha: let
b = toString (hexToDec lib (builtins.substring 4 2 color)); color = removePrefix "#" c;
in "rgba(${r}, ${g}, ${b}, ${opacity})"; r = toString (hexToDec (__substring 0 2 color));
g = toString (hexToDec (__substring 2 2 color));
b = toString (hexToDec (__substring 4 2 color));
a = toString alpha;
res = "rgba(${r}, ${g}, ${b}, ${a})";
in
res;
hexToDec = lib: v: let blurImage = pkgs: path:
# Map of hex characters to their decimal values pkgs.runCommand "${builtins.baseNameOf path}-blurred" {
buildInputs = [pkgs.imagemagick];
}
''
magick ${path} -gaussian-blur 0x12 "$out"
'';
# functions copied from https://gist.github.com/corpix/f761c82c9d6fdbc1b3846b37e1020e11
# convert a hex value to an integer
hexToDec = v: let
hexToInt = { hexToInt = {
"0" = 0; "0" = 0;
"1" = 1; "1" = 1;
@ -32,29 +46,32 @@ let
"E" = 14; "E" = 14;
"F" = 15; "F" = 15;
}; };
# Remove any leading `#` from the input chars = stringToCharacters v;
cleanHex = charsLen = length chars;
if lib.strings.substring 0 1 v == "#"
then lib.strings.substring 1 (builtins.stringLength v - 1) v
else v;
# Convert the cleaned string into characters
chars = lib.strings.stringToCharacters cleanHex;
in in
# Fold over the characters to calculate the decimal value foldl
builtins.foldl' (acc: char: acc * 16 + hexToInt."${char}") 0 chars; (a: v: a + v)
0
(imap0
(k: v: hexToInt."${v}" * (pow 16 (charsLen - k - 1)))
chars);
blurImage = pkgs: path: pow = let
pkgs.runCommand "${builtins.baseNameOf path}-blurred" { pow' = base: exponent: value:
buildInputs = [pkgs.imagemagick]; # FIXME: It will silently overflow on values > 2**62 :(
} # The value will become negative or zero in this case
'' if exponent == 0
magick ${path} -gaussian-blur 0x12 "$out" then 1
''; else if exponent <= 1
then value
generateGtkColors = lib: palette: (lib.concatLines else (pow' base (exponent - 1) (value * base));
(lib.mapAttrsToList in
base: exponent: pow' base exponent base;
generateGtkColors = palette: (concatLines
(mapAttrsToList
(name: color: "@define-color ${name} ${color};") (name: color: "@define-color ${name} ${color};")
palette)); palette));
in { in {
inherit blurImage generateGtkColors rgba; inherit blurImage generateGtkColors rgba;
generators = import ./generators lib;
} }

View file

@ -0,0 +1,4 @@
lib: {
toHyprConf = import ./tohyprconf.nix lib;
gtk = import ./gtk.nix lib;
}

31
lib/generators/gtk.nix Normal file
View file

@ -0,0 +1,31 @@
lib: let
# toGtk3Ini , formatGtk2Option , and finalGtk2Text are all taken from https://github.com/nix-community/home-manager, with some minor modifications to their function.
# All of the gtk generator functions are available under the MIT License.
inherit (lib) generators isBool boolToString mapAttrsToList concatMapStrings isString escape;
formatGtk2Option = n: v: let
v' =
if isBool v
then boolToString v
else if isString v
then ''"${v}"''
else toString v;
in "${escape ["="] n} = ${v'}";
in {
toGtk3Ini = generators.toINI {
mkKeyValue = key: value: let
value' =
if isBool value
then boolToString value
else toString value;
in "${escape ["="] key}=${value'}";
};
formatGtk2Option = n: v: let
v' =
if isBool v
then boolToString v
else if isString v
then ''"${v}"''
else toString v;
in "${escape ["="] n} = ${v'}";
finalGtk2Text = {attrs}: concatMapStrings (l: l + "\n") (mapAttrsToList formatGtk2Option attrs);
}

View file

@ -0,0 +1,63 @@
lib: {
attrs,
indentLevel ? 0,
importantPrefixes ? ["$" "bezier" "name"],
}: let
inherit
(lib)
all
concatMapStringsSep
concatStrings
concatStringsSep
filterAttrs
foldl
generators
hasPrefix
isAttrs
isList
mapAttrsToList
replicate
;
initialIndent = concatStrings (replicate indentLevel " ");
toHyprconf' = indent: attrs: let
sections =
filterAttrs (_: v: isAttrs v || (isList v && all isAttrs v)) attrs;
mkSection = n: attrs:
if lib.isList attrs
then (concatMapStringsSep "\n" (a: mkSection n a) attrs)
else ''
${indent}${n} {
${toHyprconf' " ${indent}" attrs}${indent}}
'';
mkFields = generators.toKeyValue {
listsAsDuplicateKeys = true;
inherit indent;
};
allFields =
filterAttrs (_: v: !(isAttrs v || (isList v && all isAttrs v)))
attrs;
isImportantField = n: _:
foldl (acc: prev:
if hasPrefix prev n
then true
else acc)
false
importantPrefixes;
importantFields = filterAttrs isImportantField allFields;
fields =
builtins.removeAttrs allFields
(mapAttrsToList (n: _: n) importantFields);
in
mkFields importantFields
+ concatStringsSep "\n" (mapAttrsToList mkSection sections)
+ mkFields fields;
in
toHyprconf' initialIndent attrs

View file

@ -23,12 +23,8 @@
kernelParams = [ kernelParams = [
"quiet" "quiet"
"splash" "systemd.show_status=auto"
"boot.shell_on_fail"
"loglevel=3"
"rd.systemd.show_status=false"
"rd.udev.log_level=3" "rd.udev.log_level=3"
"udev.log_priority=3"
]; ];
}; };
} }

15
modules/core/default.nix Normal file
View file

@ -0,0 +1,15 @@
{lib, ...}: {
imports = [
./hardware
./boot.nix
./fonts.nix
./locales.nix
./networking.nix
./nix.nix
./users.nix
./security.nix
];
system.stateVersion = lib.mkDefault "24.05";
zramSwap.enable = true;
}

31
modules/core/fonts.nix Normal file
View file

@ -0,0 +1,31 @@
{
lib,
pkgs,
config,
...
}: {
config = lib.mkIf config.local.profiles.desktop.enable {
fonts = {
enableDefaultPackages = false;
packages = [
pkgs._0xproto
pkgs.noto-fonts-color-emoji
pkgs.nerd-fonts.symbols-only
pkgs.noto-fonts
pkgs.noto-fonts-cjk-sans
pkgs.noto-fonts-extra
];
fontconfig = {
enable = true;
defaultFonts = {
serif = ["Noto Serif"];
sansSerif = ["Inter Medium"];
monospace = ["0xProto"];
emoji = ["Noto Color Emoji"];
};
};
};
};
}

View file

@ -0,0 +1,10 @@
{
imports = [
./fprintd.nix
./fwupd.nix
./nvidia.nix
./printing.nix
./uni-sync.nix
./via.nix
];
}

View file

@ -0,0 +1,9 @@
{
lib,
config,
...
}: {
config = lib.mkIf config.local.profiles.laptop.enable {
services.fprintd.enable = true;
};
}

View file

@ -0,0 +1,9 @@
{
lib,
config,
...
}: {
config = lib.mkIf config.local.profiles.desktop.enable {
services.fwupd.enable = true;
};
}

View file

@ -0,0 +1,22 @@
{
lib,
config,
...
}: let
inherit (lib) mkIf;
in {
config = mkIf config.local.modules.nvidia.enable {
hardware.graphics.enable = true;
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
open = false;
modesetting.enable = true;
powerManagement.enable = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
};
# https://wiki.hyprland.org/Nvidia/#suspendwakeup-issues
boot.kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"];
};
}

View file

@ -0,0 +1,36 @@
{
lib,
pkgs,
config,
...
}: {
config = lib.mkIf config.local.profiles.desktop.enable {
services = {
# setup printing service
printing.enable = true;
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
printing.drivers = [
pkgs.gutenprint
pkgs.hplip
];
udev.packages = [
pkgs.sane-airscan
pkgs.utsushi
];
};
hardware.sane.enable = true; # enables support for SANE scanners
hardware.sane.extraBackends = [
pkgs.sane-airscan # generic
pkgs.hplip # HP
pkgs.utsushi # other printers
];
};
}

View file

@ -0,0 +1,44 @@
{
lib,
pkgs,
config,
...
}: {
config = lib.mkIf config.local.profiles.gaming.enable {
hardware.uni-sync = {
enable = true;
devices = [
{
device_id = "VID:3314/PID:41218/SN:6243168001";
sync_rgb = true;
channels = [
{
mode = "Manual";
speed = 60;
}
{
mode = "Manual";
speed = 60;
}
{
mode = "Manual";
speed = 60;
}
{
mode = "Manual";
speed = 60;
}
];
}
];
};
systemd.services.uni-sync = {
enable = true;
serviceConfig = {
ExecStart = "${pkgs.uni-sync}/bin/uni-sync";
};
wantedBy = ["multi-user.target"];
};
};
}

View file

@ -0,0 +1,14 @@
{
lib,
pkgs,
config,
...
}: {
config = lib.mkIf config.local.profiles.gaming.enable {
hardware.keyboard.qmk.enable = true;
environment.systemPackages = with pkgs; [
via
];
services.udev.packages = [pkgs.via];
};
}

View file

@ -1,10 +1,4 @@
{lib, ...}: { {lib, ...}: {
imports = [
./boot.nix
./users.nix
./security.nix
./networking.nix
];
i18n = { i18n = {
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";
extraLocaleSettings = { extraLocaleSettings = {
@ -20,7 +14,5 @@
}; };
}; };
system.stateVersion = lib.mkDefault "24.05";
time.timeZone = lib.mkDefault "Europe/Paris"; time.timeZone = lib.mkDefault "Europe/Paris";
zramSwap.enable = true;
} }

View file

@ -0,0 +1,21 @@
{
lib,
config,
...
}: {
config = lib.mkIf (!config.local.profiles.server.enable) {
networking = {
inherit (config.local.systemVars) hostName;
nameservers = ["1.1.1.1" "1.0.0.1"];
networkmanager = {
enable = true;
dns = "systemd-resolved";
wifi.powersave = true;
};
};
services.resolved = {
enable = true;
dnsovertls = "opportunistic";
};
};
}

49
modules/core/nix.nix Normal file
View file

@ -0,0 +1,49 @@
{
lib,
pkgs,
config,
...
}: let
inherit (lib) mkIf;
inherit (config.local.systemVars) username;
in {
nix = {
package = pkgs.lix;
settings = {
accept-flake-config = true;
warn-dirty = false;
auto-optimise-store = true;
trusted-users = ["root" "@wheel"];
experimental-features = [
"nix-command"
"flakes"
];
};
};
programs.nh = {
enable = true;
clean = {
enable = true;
extraArgs = "--keep-since 30d --keep 3";
};
};
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [
"cinny-4.2.3"
"cinny-unwrapped-4.2.3"
"segger-jlink-qt4-810"
];
segger-jlink.acceptLicense = true;
};
};
hjem.users.${username} = {
files.".config/environment.d/${config.local.homeVars.userEnvFile}.conf".text = ''
FLAKE="${config.hjem.users.${username}.directory}/.dotfiles"
'';
};
}

43
modules/core/security.nix Normal file
View file

@ -0,0 +1,43 @@
{
lib,
pkgs,
config,
...
}: {
config = lib.mkIf config.local.profiles.desktop.enable {
security = {
polkit.enable = true;
polkit = {
extraConfig = ''
polkit.addRule(function(action, subject) {
if (
subject.isInGroup("users")
&& (
action.id == "org.freedesktop.login1.reboot" ||
action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
action.id == "org.freedesktop.login1.power-off" ||
action.id == "org.freedesktop.login1.power-off-multiple-sessions"
)
)
{
return polkit.Result.YES;
}
});
'';
};
};
systemd.user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = ["graphical-session.target"];
wants = ["graphical-session.target"];
after = ["graphical-session.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
}

30
modules/core/users.nix Normal file
View file

@ -0,0 +1,30 @@
{
lib,
config,
...
}: let
inherit (config.local.systemVars) username;
in {
config = lib.mkIf (!config.local.profiles.server.enable) {
users.users.${config.local.systemVars.username} = {
isNormalUser = true;
description = config.local.homeVars.fullName or "User";
extraGroups = [
"networkmanager"
"audio"
"video"
"wheel"
"plugdev"
];
};
hjem = {
clobberByDefault = true;
users.${username} = {
enable = true;
directory = "/home/${username}";
user = "${username}";
};
};
};
}

View file

@ -1,3 +1,8 @@
{ {
imports = [./theme]; imports = [
./core
./options
./programs
./services
];
} }

View file

@ -0,0 +1,10 @@
{
imports = [
./modules
./profiles
./homeVars.nix
./style.nix
./systemVars.nix
];
}

View file

@ -0,0 +1,48 @@
{
config,
lib,
options,
...
}: let
inherit (lib) mkIf mkOption;
inherit (lib.types) str;
in {
options.local.homeVars = {
fullName = mkOption {
type = str;
description = "your full name (used for git commits and user description)";
default = null;
};
email = mkOption {
type = str;
description = "your email (used for git commits)";
default = null;
};
signingKey = mkOption {
type = str;
description = "your ssh public key (used for signing git commits)";
};
userEnvFile = mkOption {
type = str;
description = "filename where the user environment variables such as EDITOR will be stored, under `$XDG_CONFIG_HOME/environment.d` (needs to be a file name without extension).";
default = "99-user-env";
example = "99-user-env";
};
};
config.assertions = mkIf (!config.local.profiles.server.enable) [
{
assertion = options.local.homeVars.fullName.isDefined;
}
{
assertion = options.local.homeVars.email.isDefined;
}
{
assertion = options.local.homeVars.signingKey.isDefined;
}
{
assertion = options.local.homeVars.userEnvFile.isDefined;
}
];
}

View file

@ -0,0 +1,6 @@
{
imports = [
./hyprland.nix
./nvidia.nix
];
}

View file

@ -0,0 +1,7 @@
{lib, ...}: let
inherit (lib) mkEnableOption;
in {
options.local.modules.hyprland = {
enable = mkEnableOption "Hyprland modules";
};
}

View file

@ -0,0 +1,7 @@
{lib, ...}: let
inherit (lib) mkEnableOption;
in {
options.local.modules.nvidia = {
enable = mkEnableOption "nvidia";
};
}

View file

@ -0,0 +1,8 @@
{
imports = [
./desktop.nix
./gaming.nix
./laptop.nix
./server.nix
];
}

View file

@ -0,0 +1,18 @@
{
lib,
config,
...
}: let
inherit (lib) mkEnableOption;
in {
options = {
local.profiles.desktop.enable = mkEnableOption "the desktop profile";
};
config.assertions = lib.mkIf config.local.profiles.desktop.enable [
{
assertion = !config.local.profiles.server.enable;
message = "The desktop profile cannot be enabled if `local.profiles.server.enable` is set to true.";
}
];
}

View file

@ -0,0 +1,18 @@
{
lib,
config,
...
}: let
inherit (lib) mkEnableOption;
in {
options = {
local.profiles.gaming.enable = mkEnableOption "the gaming profile";
};
config.assertions = lib.mkIf config.local.profiles.gaming.enable [
{
assertion = !config.local.profiles.server.enable;
message = "The gaming profile cannot be enabled if `local.profiles.server.enable` is set to true.";
}
];
}

View file

@ -0,0 +1,18 @@
{
lib,
config,
...
}: let
inherit (lib) mkEnableOption;
in {
options = {
local.profiles.laptop.enable = mkEnableOption "the laptop profile";
};
config.assertions = lib.mkIf config.local.profiles.laptop.enable [
{
assertion = !config.local.profiles.server.enable;
message = "The laptop profile cannot be enabled if `local.profiles.server.enable` is set to true.";
}
];
}

View file

@ -0,0 +1,23 @@
{
lib,
config,
...
}: let
inherit (lib) mkEnableOption;
in {
options = {
local.profiles.server.enable = mkEnableOption "the server profile";
};
config.assertions = lib.mkIf config.local.profiles.server.enable [
{
assertion = !config.local.profiles.desktop.enable;
message = "The server profile cannot be enabled if `local.profiles.desktop.enable` is set to true.";
}
{
assertion = !config.local.profiles.gaming.enable;
message = "The server profile cannot be enabled if `local.profiles.gaming.enable` is set to true.";
}
];
}

138
modules/options/style.nix Normal file
View file

@ -0,0 +1,138 @@
{
lib,
pkgs,
config,
options,
inputs,
...
}: let
inherit (lib) attrNames mkEnableOption mkOption pathExists;
inherit (lib.types) attrs bool enum package path str;
cfg = config.local.style;
in {
options.local.style = {
enable = mkEnableOption "style";
schemeName = mkOption {
description = ''
Name of the tinted-theming color scheme to use.
'';
type = enum (attrNames inputs.basix.schemeData.base16);
example = "catppuccin-mocha";
default = "catppuccin-mocha";
};
scheme = mkOption {
description = ''
Computed scheme from `config.local.style.schemeName`.
'';
type = attrs;
readOnly = true;
};
wallpaper = mkOption {
description = ''
Location of the wallpaper that will be used throughout the system.
'';
type = path;
example = lib.literalExpression "./wallpaper.png";
default = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/e0cf0eb237dc5baba86661a3572b20a6183c1876/wallpapers/nix-wallpaper-nineish-catppuccin-frappe.png?raw=true";
hash = "sha256-/HAtpGwLxjNfJvX5/4YZfM8jPNStaM3gisK8+ImRmQ4=";
};
};
cursorTheme = {
name = mkOption {
description = ''
Name of the cursor theme.
'';
default = "phinger-cursors-dark";
};
package = mkOption {
type = package;
description = ''
Package providing the cursor theme.
'';
default = pkgs.phinger-cursors;
};
size = mkOption {
description = ''
Size of the cursor.
'';
default = 32;
};
};
avatar = mkOption {
description = ''
Path to an avatar image (used for hyprlock).
'';
default = ../../assets/avatar.png; # TODO silly, change this
};
gtk = {
enable = mkOption {
type = bool;
description = "enable GTK theming options";
default = cfg.enable;
};
theme = {
name = mkOption {
type = str;
description = "Name for the GTK theme";
default = "Catppuccin-GTK-Purple-Dark";
};
package = mkOption {
type = package;
description = "Package providing the GTK theme";
default = pkgs.magnetic-catppuccin-gtk.override {
accent = ["purple"];
};
};
};
iconTheme = {
name = mkOption {
type = str;
description = "The name for the icon theme that will be used for GTK programs";
default = "Papirus-Dark";
};
package = mkOption {
type = package;
description = "The GTK icon theme to be used";
default = pkgs.catppuccin-papirus-folders.override {
flavor = "mocha";
accent = "lavender";
};
};
};
};
};
config = lib.mkIf cfg.enable {
assertions = [
(let
themePath = cfg.gtk.theme.package + /share/themes + "/${cfg.gtk.theme.name}";
in {
assertion = cfg.gtk.enable -> pathExists themePath;
message = ''
${toString themePath} set by the GTK module does not exist!
To suppress this message, make sure that
`config.modules.theme.gtk.theme.package` contains
the path `${cfg.theme.name}`
'';
})
{
assertion = cfg.enable -> options.local.systemVars.username.isDefined;
message = ''
When enabling system-wide theming, a username needs to be set in `config.local.systemVars.username`.
'';
}
];
local.style.scheme = inputs.basix.schemeData.base16.${cfg.schemeName};
};
}

View file

@ -0,0 +1,30 @@
{
lib,
options,
...
}: let
inherit (lib) mkOption;
inherit (lib.types) str;
in {
options.local.systemVars = {
hostName = mkOption {
type = str;
description = "hostname for the current host";
default = null;
};
username = mkOption {
type = str;
description = "username for the home directory";
default = null;
};
};
config.assertions = [
{
assertion = options.local.systemVars.hostName.isDefined;
}
{
assertion = options.local.systemVars.username.isDefined;
}
];
}

View file

@ -0,0 +1,38 @@
Config(
// Position/size fields use an enum for the value, it can be either:
// Absolute(n): The absolute value in pixels
// Fraction(n): A fraction of the width or height of the full screen (depends on exclusive zones and the settings related to them) window respectively
// The horizontal position, adjusted so that Relative(0.5) always centers the runner
x: Fraction(0.5),
// The vertical position, works the same as `x`
y: Absolute(0),
// The width of the runner
width: Absolute(800),
// The minimum height of the runner, the runner will expand to fit all the entries
height: Absolute(0),
// Hide match and plugin info icons
hide_icons: false,
// ignore exclusive zones, f.e. Waybar
ignore_exclusive_zones: false,
// Layer shell layer: Background, Bottom, Top, Overlay
layer: Overlay,
// Hide the plugin info panel
hide_plugin_info: false,
// Close window when a click outside the main box is received
close_on_click: false,
// Show search results immediately when Anyrun starts
show_results_immediately: true,
// Limit amount of entries shown in total
max_entries: None,
)

View file

@ -0,0 +1,36 @@
{
lib,
inputs,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config.local.systemVars) username;
in {
config = mkIf config.local.modules.hyprland.enable {
hjem.users.${username} = {
packages = [inputs.anyrun.packages.${pkgs.system}.anyrun-with-all-plugins];
files = {
".config/anyrun/config.ron".source = ./config.ron;
".config/anyrun/applications.ron".text = ''
Config(
// Also show the Desktop Actions defined in the desktop files, e.g. "New Window" from LibreWolf
desktop_actions: false,
max_entries: 5,
// The terminal used for running terminal based desktop entries, if left as `None` a static list of terminals is used
// to determine what terminal to use.
terminal: Some(Terminal(
// The main terminal command
command: "foot",
// What arguments should be passed to the terminal process to run the command correctly
// {} is replaced with the command in the desktop entry
args: "uwsm app -- {}",
)),
)
'';
".config/anyrun/style.css".source = ./style.css;
};
};
};
}

View file

@ -0,0 +1,25 @@
#window {
background-color: rgba(0, 0, 0, 0);
}
box#main {
border-radius: 10px;
background-color: @theme_bg_color;
}
list#main {
background-color: rgba(0, 0, 0, 0);
border-radius: 10px;
}
list#plugin {
background-color: rgba(0, 0, 0, 0);
}
label#match-desc {
font-size: 10px;
}
label#plugin {
font-size: 14px;
}

View file

@ -0,0 +1,19 @@
{
imports = [
./anyrun
./editors
./hypr
./media
./terminal
./discord.nix
./fastfetch.nix
./firefox.nix
./games.nix
./misc.nix
./thunar.nix
./waybar.nix
./wlogout.nix
./xdg.nix
];
}

View file

@ -0,0 +1,118 @@
{
lib,
pkgs,
config,
...
}: let
inherit (lib) mkIf;
inherit (config.local.systemVars) username;
styleCfg = config.local.style;
in {
config = mkIf config.local.profiles.desktop.enable {
hjem.users.${username} = {
packages = [pkgs.vesktop];
files.".config/vesktop/themes/midnight-base16.css".text = with styleCfg.scheme.palette;
mkIf styleCfg.enable ''
/**
* @name Midnight-base16
* @description A dark, rounded discord theme. Updated to use base16 colors.
* @author refact0r
* @version 1.6.2
* @invite nz87hXyvcy
* @website https://github.com/refact0r/midnight-discord
* @source https://github.com/refact0r/midnight-discord/blob/master/midnight.theme.css
* @authorId 508863359777505290
* @authorLink https://www.refact0r.dev
*/
/* IMPORTANT: make sure to enable dark mode in discord settings for the theme to apply properly!!! */
@import url('https://refact0r.github.io/midnight-discord/midnight.css');
/* customize things here */
:root {
/* font, change to 'gg sans' for default discord font*/
--font: 'gg sans';
/* top left corner text */
--corner-text: '${styleCfg.scheme.name}';
/* color of status indicators and window controls */
--online-indicator: ${base0B}; /* change to #23a55a for default green */
--dnd-indicator: ${base08}; /* change to #f13f43 for default red */
--idle-indicator: ${base0A}; /* change to #f0b232 for default yellow */
--streaming-indicator: ${base0E}; /* change to #593695 for default purple */
/* accent colors */
--accent-1: ${base0D}; /* links */
--accent-2: ${base0E}; /* general unread/mention elements, some icons when active */
--accent-3: ${base0E}; /* accent buttons */
--accent-4: ${base03}; /* accent buttons when hovered */
--accent-5: ${base07}; /* accent buttons when clicked */
--mention: ${base00}1a; /* mentions & mention messages */
--mention-hover: ${base00}0d; /* mentions & mention messages when hovered */
/* text colors */
--text-0: var(--bg-4); /* text on colored elements */
--text-1: ${base06}; /* other normally white text */
--text-2: ${base06}; /* headings and important text */
--text-3: ${base05}; /* normal text */
--text-4: ${base05}; /* icon buttons and channels */
--text-5: ${base04}; /* muted channels/chats and timestamps */
/* background and dark colors */
--bg-1: ${base0E}; /* dark buttons when clicked */
--bg-2: ${base02}; /* dark buttons */
--bg-3: ${base01}; /* spacing, secondary elements */
--bg-4: ${base00}; /* main background color */
--hover: ${base03}1a; /* channels and buttons when hovered */
--active: ${base03}33; /* channels and buttons when clicked or selected */
--message-hover: #0000001a; /* messages when hovered */
/* amount of spacing and padding */
--spacing: 12px;
/* animations */
/* ALL ANIMATIONS CAN BE DISABLED WITH REDUCED MOTION IN DISCORD SETTINGS */
--list-item-transition: 0.2s ease; /* channels/members/settings hover transition */
--unread-bar-transition: 0.2s ease; /* unread bar moving into view transition */
--moon-spin-transition: 0.4s ease; /* moon icon spin */
--icon-spin-transition: 1s ease; /* round icon button spin (settings, emoji, etc.) */
/* corner roundness (border-radius) */
--roundness-xl: 22px; /* roundness of big panel outer corners */
--roundness-l: 20px; /* popout panels */
--roundness-m: 16px; /* smaller panels, images, embeds */
--roundness-s: 12px; /* members, settings inputs */
--roundness-xs: 10px; /* channels, buttons */
--roundness-xxs: 8px; /* searchbar, small elements */
/* direct messages moon icon */
/* change to block to show, none to hide */
--discord-icon: none; /* discord icon */
--moon-icon: block; /* moon icon */
--moon-icon-url: url('https://upload.wikimedia.org/wikipedia/commons/c/c4/Font_Awesome_5_solid_moon.svg'); /* custom icon url */
--moon-icon-size: auto;
/* filter uncolorable elements to fit theme */
/* (just set to none, they're too much work to configure) */
--login-bg-filter: saturate(0.3) hue-rotate(-15deg) brightness(0.4); /* login background artwork */
--green-to-accent-3-filter: hue-rotate(56deg) saturate(1.43); /* add friend page explore icon */
--blurple-to-accent-3-filter: hue-rotate(304deg) saturate(0.84) brightness(1.2); /* add friend page school icon */
}
/* Selected chat/friend text */
.selected_f5eb4b,
.selected_f6f816 .link_d8bfb3 {
color: var(--text-0) !important;
background: var(--accent-3) !important;
}
.selected_f6f816 .link_d8bfb3 * {
color: var(--text-0) !important;
fill: var(--text-0) !important;
}
'';
};
};
}

View file

@ -0,0 +1,23 @@
{
config,
lib,
...
}: let
inherit (lib) mkIf;
inherit (config.local.systemVars) username;
inherit (config.local.homeVars) userEnvFile;
in {
imports = [
./neovim.nix
];
config = mkIf config.local.profiles.desktop.enable {
hjem.users.${username} = {
files = {
".config/environment.d/${userEnvFile}.conf".text = ''
EDITOR="nvim"
'';
};
};
};
}

View file

@ -0,0 +1,247 @@
{
lib,
inputs,
pkgs,
config,
...
}: let
inherit (config.local.systemVars) username;
styleCfg = config.local.style;
customNeovim = inputs.nvf.lib.neovimConfiguration {
inherit pkgs;
modules = lib.singleton {
config.vim = lib.mkMerge [
{
viAlias = true;
vimAlias = true;
enableLuaLoader = true;
preventJunkFiles = true;
useSystemClipboard = true;
options = {
tabstop = 4;
autoindent = false;
};
luaConfigPost = ''
vim.opt.formatoptions:remove('c')
vim.opt.formatoptions:remove('r')
vim.opt.formatoptions:remove('o')
vim.api.nvim_create_autocmd("FileType", {
pattern = "nix",
callback = function(opts)
local bo = vim.bo[opts.buf]
bo.tabstop = 2
bo.shiftwidth = 2
end
})
'';
maps = {
normal = {
"<leader>m" = {
silent = true;
action = "<cmd>make<CR>";
}; # Same as nnoremap <leader>m <silent> <cmd>make<CR>
"<leader>t" = {
silent = true;
action = "<cmd>Neotree toggle<CR>";
};
};
};
ui = {
noice.enable = true;
};
notify.nvim-notify.enable = true;
statusline = {
lualine = {
enable = true;
theme = "auto";
componentSeparator = {
left = "";
};
sectionSeparator = {
left = "";
right = "";
};
activeSection = {
a = [
''
{
"mode",
separator = { right = "" },
right_padding = 2
}
''
];
b = [
''
{
"branch",
icon = '',
separator = { right = "" }
}
''
];
c = [
''
"filename"
''
];
x = [
''
{
"diagnostics",
sources = {'nvim_lsp', 'nvim_diagnostic', 'nvim_diagnostic', 'vim_lsp', 'coc'},
symbols = {error = '󰅙 ', warn = ' ', info = ' ', hint = '󰌵 '},
colored = true,
update_in_insert = false,
always_visible = false,
diagnostics_color = {
color_error = { fg = 'red' },
color_warn = { fg = 'yellow' },
color_info = { fg = 'cyan' },
},
}
''
''
"filetype"
''
];
y = [
''
{
"progress",
separator = { left = "" },
}
''
''
''
];
z = [
''
{
"location",
separator = { left = "" },
left_padding = 2
}
''
''
{
"fileformat",
color = {fg='black'},
symbols = {
unix = '', -- e712
dos = '', -- e70f
mac = '', -- e711
},
}
''
];
};
inactiveSection = {
a = [
''
"filename"
''
];
z = [
''
"location"
''
];
};
};
};
git.enable = true;
utility = {
vim-wakatime.enable = true;
surround.enable = true;
motion.leap = {
enable = true;
};
};
lsp = {
enable = true;
lspSignature.enable = true;
lspconfig.enable = true;
formatOnSave = true;
mappings = {
addWorkspaceFolder = "<leader>wa";
codeAction = "<leader>a";
goToDeclaration = "gD";
goToDefinition = "gd";
hover = "K";
listImplementations = "gi";
listReferences = "gr";
listWorkspaceFolders = "<leader>wl";
nextDiagnostic = "<leader>k";
previousDiagnostic = "<leader>j";
openDiagnosticFloat = "<leader>e";
removeWorkspaceFolder = "<leader>wr";
renameSymbol = "<leader>r";
signatureHelp = "<C-k>";
};
};
autocomplete.nvim-cmp = {
enable = true;
};
autopairs.nvim-autopairs.enable = true;
languages = {
enableExtraDiagnostics = true;
enableFormat = true;
enableLSP = true;
enableTreesitter = true;
nix.enable = true;
clang.enable = true;
python.enable = true;
ts.enable = true;
css.enable = true;
typst.enable = true;
};
treesitter = {
enable = true;
fold = true;
context.enable = true;
grammars = [
pkgs.vimPlugins.nvim-treesitter.builtGrammars.nix
pkgs.vimPlugins.nvim-treesitter.builtGrammars.c
pkgs.vimPlugins.nvim-treesitter.builtGrammars.python
];
};
binds.whichKey.enable = true;
filetree.neo-tree.enable = true;
telescope.enable = true;
}
(lib.mkIf styleCfg.enable {
theme = {
enable = true;
name = "base16";
base16-colors = styleCfg.scheme.palette;
};
})
];
};
};
in {
config = lib.mkIf config.local.profiles.desktop.enable {
hjem.users.${username} = {
packages = [customNeovim.neovim];
};
};
}

View file

@ -0,0 +1,123 @@
{
lib,
pkgs,
config,
...
}: let
inherit (config.local.systemVars) username;
logo = builtins.fetchurl {
url = "https://raw.githubusercontent.com/gytis-ivaskevicius/high-quality-nix-content/refs/heads/master/emoji/nix-owo-transparent.png";
sha256 = "137k3i7z4va68v4rvrazy26szc7p2w59h7bc2h8japzjyj6xjs71";
};
in {
config = lib.mkIf config.local.profiles.desktop.enable {
hjem.users.${username} = {
packages = [pkgs.fastfetch];
files = {
".config/fastfetch/config.jsonc".text = builtins.toJSON {
logo = {
source = logo;
type = "kitty";
width = 33;
};
modules = [
{
type = "title";
color = {
user = "35";
host = "36";
};
}
{
type = "separator";
string = "";
}
{
type = "os";
key = " ";
format = "{3} ({12})";
keyColor = "32";
}
{
type = "host";
key = "󰟀 ";
keyColor = "32";
}
{
type = "kernel";
key = "󰒔 ";
format = "{1} {2}";
keyColor = "32";
}
{
type = "shell";
key = "$ ";
format = "{1} {4}";
keyColor = "32";
}
{
type = "packages";
key = " ";
keyColor = "32";
}
{
type = "uptime";
key = "󰔚 ";
keyColor = "32";
}
"break"
{
type = "display";
key = "󰹑 ";
keyColor = "33";
compactType = "original";
}
{
type = "de";
key = "󰧨 ";
keyColor = "33";
}
{
type = "wm";
key = " ";
keyColor = "33";
}
{
type = "theme";
key = "󰉼 ";
keyColor = "33";
}
{
type = "icons";
key = " ";
keyColor = "33";
}
{
type = "cursor";
key = "󰳽 ";
keyColor = "33";
}
{
type = "font";
key = " ";
format = "{2}";
keyColor = "33";
}
{
type = "terminal";
key = " ";
format = "{3}";
keyColor = "33";
}
"break"
{
type = "colors";
symbol = "block";
}
];
};
};
};
};
}

View file

@ -0,0 +1,170 @@
{
lib,
pkgs,
config,
...
}: let
inherit (config.local.systemVars) username;
toINI = lib.generators.toINI {};
betterfox = pkgs.fetchFromGitHub {
owner = "yokoffing";
repo = "betterfox";
rev = "e026ed7d3a763c5d3f96c2680d7bc3340831af4f";
hash = "sha256-hpkEO5BhMVtINQG8HN4xqfas/R6q5pYPZiFK8bilIDs=";
};
firefox = pkgs.wrapFirefox pkgs.firefox-esr-128-unwrapped {
extraPolicies = {
SearchEngines.Default = "SearxNG";
SearchEngines.Add = [
{
Name = "SearxNG";
URLTemplate = "https://search.nezia.dev/search?q={searchTerms}";
Method = "GET";
SuggestURLTemplate = "https://search.nezia.dev/autocompleter?q={searchTerms}";
}
{
Name = "Nix Packages";
Alias = "@np";
URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
Method = "GET";
}
{
Name = "Nix Options";
Alias = "@no";
URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
Method = "GET";
}
{
Name = "NixOS Wiki";
Alias = "@nw";
URLTemplate = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
Method = "GET";
}
{
Name = "Home Manager Options";
Alias = "@hmo";
URLTemplate = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master";
Method = "GET";
}
{
Name = "ProtonDB";
Alias = "@pdb";
URLTemplate = "https://www.protondb.com/search?q={searchTerms}";
Method = "GET";
}
{
Name = "Noogle";
Alias = "@ng";
URLTemplate = "https://noogle.dev/q?term={searchTerms}";
}
{
Name = "GitHub Nix";
Alias = "@ghn";
URLTemplate = "https://github.com/search?q=language:nix NOT is:fork {searchTerms}&type=code";
}
];
DisableTelemetry = true;
DisablePocket = true;
DisableFeedbackCommands = true;
DisableFirefoxStudies = true;
OfferToSaveLogins = false;
OffertosaveloginsDefault = false;
PasswordManagerEnabled = false;
SearchSuggestEnabled = true;
# https://github.com/Sly-Harvey/NixOS/blob/f9da2691ea46565256ad757959cfc26ec6cee10d/modules/programs/browser/firefox/default.nix#L58-L163
"3rdparty".Extensions = {
"addon@darkreader.org" = {
permissions = ["internal:privateBrowsingAllowed"];
enabled = true;
automation = {
enabled = true;
behavior = "OnOff";
mode = "system";
};
detectDarkTheme = true;
enabledByDefault = true;
changeBrowserTheme = false;
enableForProtectedPages = true;
fetchNews = false;
previewNewDesign = true;
};
"uBlock0@raymondhill.net" = {
permissions = ["internal:privateBrowsingAllowed"];
advancedSettings = [
[
"userResourcesLocation"
"https://raw.githubusercontent.com/pixeltris/TwitchAdSolutions/master/video-swap-new/video-swap-new-ublock-origin.js"
]
];
adminSettings = {
userSettings = {
uiTheme = "dark";
advancedUserEnabled = true;
userFiltersTrusted = true;
importedLists = [
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
];
selectedFilterLists = [
"FRA-0"
"adguard-cookies"
"adguard-mobile-app-banners"
"adguard-other-annoyances"
"adguard-popup-overlays"
"adguard-social"
"adguard-spyware-url"
"adguard-widgets"
"easylist"
"easylist-annoyances"
"easylist-chat"
"easylist-newsletters"
"easylist-notifications"
"easyprivacy"
"fanboy-cookiemonster"
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
"https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
"plowe-0"
"ublock-annoyances"
"ublock-badware"
"ublock-cookies-adguard"
"ublock-cookies-easylist"
"ublock-filters"
"ublock-privacy"
"ublock-quick-fixes"
"ublock-unbreak"
"urlhaus-1"
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
];
};
};
};
};
};
};
in {
config = lib.mkIf config.local.profiles.desktop.enable {
hjem.users.${username} = {
packages = [firefox];
files = {
".mozilla/firefox/profiles.ini".text = toINI {
Profile0 = {
# creates lunarnova profile and sets it as default
Name = "${username}";
IsRelative = 1;
Path = "${username}";
Default = 1;
};
};
".mozilla/firefox/${username}/user.js".text = builtins.concatStringsSep "\n" [
(builtins.readFile "${betterfox}/user.js")
(builtins.readFile "${betterfox}/Securefox.js")
(builtins.readFile "${betterfox}/Fastfox.js")
(builtins.readFile "${betterfox}/Peskyfox.js")
(builtins.readFile "${betterfox}/Smoothfox.js")
];
};
};
};
}

View file

@ -0,0 +1,36 @@
{
lib,
pkgs,
config,
...
}: let
inherit (lib) mkIf;
inherit (config.local.systemVars) username;
in {
config = mkIf config.local.profiles.gaming.enable {
hjem.users.${username} = {
packages = [
pkgs.mangohud
pkgs.bolt-launcher
pkgs.ankama-launcher
pkgs.lutris
pkgs.qbittorrent
pkgs.protonplus
];
};
programs = {
steam = {
enable = true;
};
gamemode.enable = true;
gamescope.enable = true;
coolercontrol = {
enable = true;
nvidiaSupport = true;
};
};
};
}

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