Skip to content

Commit

Permalink
fuck it we ball
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed Dec 2, 2024
1 parent 7e9929b commit b88c3e7
Show file tree
Hide file tree
Showing 18 changed files with 203 additions and 117 deletions.
22 changes: 18 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 3 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
description = "Consequence of allowing autistic people on the internet. Stay mad one-proper-config-structure purists :3";

outputs = inputs @ {nixpkgs, ...}: let
theme = import ./theme;
user = import ./user theme;
user = import ./user;

forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
Expand All @@ -15,8 +14,7 @@
packages = forAllSystems (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in
user.packages pkgs
in (user.packages pkgs)
);

formatter = forAllSystems (
Expand Down Expand Up @@ -48,9 +46,6 @@

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
apple-silicon-support = {
url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs";
};
apple-silicon-support.url = "github:tpwrules/nixos-apple-silicon";
};
}
2 changes: 1 addition & 1 deletion hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# from nixos modules, so it's a little bit cleaner
specialArgs = {
inherit inputs;
theme = import ../theme;
theme = (import ../user).theme nixpkgs.legacyPackages.${system};
flake = self;
};
};
Expand Down
1 change: 1 addition & 0 deletions system/security/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{pkgs, ...}: {
hardware.ledger.enable = true;
services = {
networkd-dispatcher.enable = true;
pcscd.enable = true;
Expand Down
11 changes: 7 additions & 4 deletions system/users/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
flake,
pkgs,
config,
...
}: {
users = {
Expand Down Expand Up @@ -54,17 +55,19 @@
enable = true;
settings.authfile = builtins.toFile "pamu2cfg" "sioodmy:O38Cg9cbBLEdYUTi8NGDamjrrMsXwB+HGvJeit2AmOa5EyBsdBuSTtwh+/z5TNkv9UgaWBjSGNlJh1vsbhiLPA==,5A49VpssDYhzK98R4Sy8GKFn1gR/4feJT9l+sPMLjgiyweeLJHOqcwn49U4AFT2qb8EBwxQ1Ma8sAHQqtXyN5g==,es256,+presence";
};
services = {
services = let
fprint = ! config.hardware.asahi.enable;
in {
login = {
enableGnomeKeyring = true;
fprintAuth = true;
fprintAuth = fprint;
u2fAuth = true;
};
sudo = {
fprintAuth = true;
fprintAuth = fprint;
u2fAuth = true;
};
hyprlock.fprintAuth = true;
hyprlock.fprintAuth = fprint;
};

loginLimits = [
Expand Down
26 changes: 13 additions & 13 deletions user/default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
theme: rec
rec
{
theme = import ./theme;
packages = pkgs: let
inherit (pkgs) callPackage;
in
{
nvim = callPackage ./nvim {inherit theme;};
zsh = callPackage ./zsh {};
foot = callPackage ./foot {inherit theme;};
tofi = callPackage ./tofi {inherit theme;};
anyrun = callPackage ./anyrun {inherit theme;};
waybar = callPackage ./waybar {inherit theme;};
mako = callPackage ./mako {inherit theme;};
}
// (import ./misc-scripts {inherit pkgs;});
theme = import ./theme pkgs;
in {
nvim = callPackage ./wrapped/nvim {inherit theme;};
zsh = callPackage ./wrapped/zsh {};
foot = callPackage ./wrapped/foot {inherit theme;};
tofi = callPackage ./wrapped/tofi {inherit theme;};
anyrun = callPackage ./wrapped/anyrun {inherit theme;};
waybar = callPackage ./wrapped/waybar {inherit theme;};
mako = callPackage ./wrapped/mako {inherit theme;};
};

shell = pkgs:
pkgs.mkShell {
Expand All @@ -28,10 +28,10 @@ theme: rec
module = {pkgs, ...}: {
config = {
environment.systemPackages = builtins.attrValues (packages pkgs);
programs.hyprland.enable = true;
};
imports = [
./packages.nix
./hyprland
./git
./gtk
];
Expand Down
45 changes: 29 additions & 16 deletions user/gtk/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
pkgs,
theme,
lib,
...
}: let
inherit (builtins) toString isBool;
inherit (pkgs.lib) boolToString escape generators;
inherit (lib) boolToString escape generators optionalAttrs;

toGtk3Ini = generators.toINI {
mkKeyValue = key: value: let
Expand All @@ -14,41 +15,53 @@
else toString value;
in "${escape ["="] key}=${value'}";
};
gtk-theme-name =
if theme.gtk.enable
then theme.gtk.name
else "adw-gtk3";
in {
homix = let
css = import ./colors.nix {inherit theme;};
gtkINI = {
inherit gtk-theme-name;
gtk-application-prefer-dark-theme = 1;
gtk-font-name = "Lexend 11";
gtk-icon-theme-name = "Papirus";
gtk-theme-name = "adw-gtk3";
gtk-xft-antialias = 1;
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintslight";
gtk-xft-rgba = "rgb";
};
in {
".config/gtk-3.0/gtk.css".text = css;
".config/gtk-4.0/gtk.css".text = css;
".config/gtk-3.0/settings.ini".text = toGtk3Ini {
Settings = gtkINI;
in
{
".config/gtk-3.0/settings.ini".text = toGtk3Ini {
Settings = gtkINI;
};
".config/gtk-4.0/settings.ini".text = toGtk3Ini {
Settings =
gtkINI
// {
gtk-application-prefer-dark-theme = 1;
};
};
}
// optionalAttrs theme.gtk.enable {
".config/gtk-3.0/gtk.css".text = css;
".config/gtk-4.0/gtk.css".text = css;
};
".config/gtk-4.0/settings.ini".text = toGtk3Ini {
Settings =
gtkINI
// {
gtk-application-prefer-dark-theme = 1;
};
};
};

environment = {
systemPackages = [
pkgs.bibata-cursors
(
if theme.gtk.enable
then theme.gtk.package
else pkgs.adw-gtk3
)
pkgs.adw-gtk3
];
variables = {
GTK_THEME = "adw-gtk3";
GTK_THEME = gtk-theme-name;
};
};
}
1 change: 1 addition & 0 deletions user/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ in {
# for hyprland

swaybg
hyprsunset
grimblast
##

Expand Down
4 changes: 2 additions & 2 deletions user/theme/_sources/generated.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"nord-nvim": {
"theme": {
"cargoLocks": null,
"date": "2024-06-16",
"extract": null,
"name": "nord-nvim",
"name": "theme",
"passthru": null,
"pinned": false,
"src": {
Expand Down
10 changes: 7 additions & 3 deletions user/theme/_sources/generated.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# This file was generated by nvfetcher, please do not modify it manually.
{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }:
{
nord-nvim = {
pname = "nord-nvim";
fetchgit,
fetchurl,
fetchFromGitHub,
dockerTools,
}: {
theme = {
pname = "theme";
version = "c88388b2a5f6e621df2718c316b856d4971bb89d";
src = fetchFromGitHub {
owner = "andersevenrud";
Expand Down
81 changes: 62 additions & 19 deletions user/theme/default.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,64 @@
{
base00 = "232136";
base01 = "2a273f";
base02 = "393552";
base03 = "6e6a86";
base04 = "908caa";
base05 = "e0def4";
base06 = "e0def4";
base07 = "56526e";
base0D = "c4a7e7";
base0E = "f6c177";
base0C = "9ccfd8";
base0A = "ea9a97";
base09 = "f6c177";
base0B = "3e8fb0";
base08 = "eb6f92";
base0F = "56526e";

accent = "ea9a97";
pkgs: rec {
background = "2e3440";

text = "d8dee9";

regular = {
background = "3b4252";

red = "bf616a";
green = "a3be8c";
yellow = "ebcb8b";
blue = "81a1c1";
purple = "b48ead";
cyan = "88c0d0";
white = "e5e9f0";
};

bright = {
background = "4c566a";
white = "eceff4";
cyan = "8fbcbb";
purple = "b48ead";
blue = "81a1c1";
yellow = "ebcb8b";
green = "a3be8c";
red = "bf616a";
};

base00 = "2E3440";
base01 = "3B4252";
base02 = "434C5E";
base03 = "4C566A";
base04 = "D8DEE9";
base05 = "E5E9F0";
base06 = "ECEFF4";
base07 = "8FBCBB";
base08 = "88C0D0";
base09 = "81A1C1";
base0A = "5E81AC";
base0B = "BF616A";
base0C = "D08770";
base0D = "EBCB8B";
base0E = "A3BE8C";
base0F = "B48EAD";

accent = regular.blue;
wallpaper = ./wall.jpg;

nvim = {
enable = true;
# uses generated base16 them if set to false

package = pkgs.vimPlugins.nord-nvim;
name = "nord";
};

gtk = {
enable = true;
# uses generated base16 theme if set to false

package = pkgs.nordic;
name = "Nordic";
};
}
2 changes: 1 addition & 1 deletion user/theme/nvfetcher.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[nord-nvim]
[theme]
src.git = "https://github.com/andersevenrud/nordic.nvim"
fetch.github = "andersevenrud/nordic.nvim"
Binary file added user/theme/wall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b88c3e7

Please sign in to comment.