diff --git a/flake.lock b/flake.lock index 85889f9..5de24f1 100644 --- a/flake.lock +++ b/flake.lock @@ -1072,7 +1072,8 @@ "rsRPC": "rsRPC", "sops-nix": "sops-nix", "spicetify-nix": "spicetify-nix", - "stylix": "stylix" + "stylix": "stylix", + "zen-browser": "zen-browser" } }, "rsRPC": { @@ -1379,6 +1380,29 @@ "repo": "xdg-desktop-portal-hyprland", "type": "github" } + }, + "zen-browser": { + "inputs": { + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1766897152, + "narHash": "sha256-mD1GDg1eIHYUwk536j4uJX1IfQArsLQm2SL7rTQwAPI=", + "owner": "0xc000022070", + "repo": "zen-browser-flake", + "rev": "fe8d1a61a904b336f453d7ab5ae7d691a21c5cbf", + "type": "github" + }, + "original": { + "owner": "0xc000022070", + "repo": "zen-browser-flake", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 0ca7596..63d8f98 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,15 @@ url = "git+https://git.scug.io/nikkuss/pkgs"; # inputs.nixpkgs.follows = "nixpkgs"; }; + zen-browser = { + url = "github:0xc000022070/zen-browser-flake"; + inputs = { + # IMPORTANT: we're using "libgbm" and is only available in unstable so ensure + # to have it up-to-date or simply don't specify the nixpkgs input + nixpkgs.follows = "nixpkgs"; + home-manager.follows = "home-manager"; + }; + }; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/doloro-laptop/home.nix b/hosts/doloro-laptop/home.nix index 907c428..0e7f0b8 100644 --- a/hosts/doloro-laptop/home.nix +++ b/hosts/doloro-laptop/home.nix @@ -19,7 +19,11 @@ # chromium.enable = true; wivrn.enable = false; helium.enable = true; + sops.enable = true; + wakatime.enable = false; + # remoteBuild.use-remote-builders = true; nixvim.enable = true; + zen-browser.enable = true; kitty.enable = true; helix.enable = false; stylix.enable = true; diff --git a/hosts/doloro-laptop/nixos.nix b/hosts/doloro-laptop/nixos.nix index d853a01..6b1356d 100644 --- a/hosts/doloro-laptop/nixos.nix +++ b/hosts/doloro-laptop/nixos.nix @@ -24,7 +24,7 @@ in stylix.enable = true; steam.enable = true; Hyprland.enable = true; - remoteBuild.use-remote-builders = true; + # remoteBuild.use-remote-builders = true; wivrn.enable = false; fonts.enable = true; }; @@ -71,19 +71,6 @@ in # intel-compute-runtime # OpenCL (NEO) + Level Zero for Arc/Xe ]; }; - programs.ssh = { - # enable = true; - startAgent = true; - - matchBlocks = { - "*" = { - addKeysToAgent = "yes"; - identityFile = [ - "~/.ssh/id_ed25519" - ]; - }; - }; - }; services.openssh = { enable = true; settings = { diff --git a/hosts/doloro/home.nix b/hosts/doloro/home.nix index 8330936..d4b896f 100644 --- a/hosts/doloro/home.nix +++ b/hosts/doloro/home.nix @@ -6,22 +6,6 @@ ... }: { - # imports = [ - # ../../modules/hyprland/home.nix - # ../../modules/quickshell/home.nix - # ../../modules/chromium/home.nix - # #./modules/neovim/home.nix - # ../../modules/stylix/home.nix - # ../../modules/nixvim/home.nix - # ../../modules/tmux/home.nix - # ../../modules/theme/home.nix - # # ./modules/spicetify/home.nix - # ../../modules/obs/home.nix - # ../../modules/blender/home.nix - # ../../modules/fish/home.nix - # ../../modules/ytm/home.nix - # ../../overlays.nix - # ]; modules = { Hyprland = { enable = true; @@ -30,6 +14,7 @@ quickshell.enable = true; # chromium.enable = true; wivrn.enable = true; + sops.enable = true; helium.enable = true; nixvim.enable = true; helix.enable = false; diff --git a/modules/builder/default.nix b/modules/builder/default.nix index ded4213..6c712f7 100644 --- a/modules/builder/default.nix +++ b/modules/builder/default.nix @@ -1,4 +1,4 @@ _: { - # home = ./home.nix; + home = ./home.nix; nixos = ./nixos.nix; } diff --git a/modules/builder/home.nix b/modules/builder/home.nix index 33951f2..f2911e5 100644 --- a/modules/builder/home.nix +++ b/modules/builder/home.nix @@ -1,48 +1,39 @@ -# { -# config, -# lib, -# pkgs, -# fetchFromGitHub, -# ... -# }: -# let -# cfg = config.modules.fish; -# in -# { -# options.modules.fish = { -# enable = lib.mkEnableOption "Fish"; -# }; -# config = lib.mkIf cfg.enable { -# home.shell.enableFishIntegration = true; -# programs = { -# fish = { -# enable = true; -# shellInit = '' -# set -g theme_nerd_fonts yes -# set -g theme_color_scheme nord -# set -g theme_display_user yes -# set -g fish_color_autosuggestion 6F6578 -# alias nik 'nix' -# ''; -# plugins = [ -# { -# name = "bobthefish"; -# src = pkgs.fetchFromGitHub { -# owner = "oh-my-fish"; -# repo = "theme-bobthefish"; -# rev = "e3b4d4eafc23516e35f162686f08a42edf844e40"; -# sha256 = "sha256-cXOYvdn74H4rkMWSC7G6bT4wa9d3/3vRnKed2ixRnuA="; -# }; -# } -# ]; -# }; -# eza = { -# enable = true; -# enableFishIntegration = true; -# icons = "auto"; -# git = true; -# extraOptions = [ ]; -# }; -# }; -# }; -# } +{ + config, + lib, + pkgs, + fetchFromGitHub, + ... +}: +let + cfg = config.modules.remoteBuild; +in +{ + options.modules.remoteBuild = { + use-remote-builders = lib.mkEnableOption "remoteBuild"; + }; + config = lib.mkIf cfg.use-remote-builders { + nix.package = pkgs.nix; + nix.distributedBuilds = true; + nix.settings.builders-use-substitutes = true; + + # Define every build machine here.. + nix.buildMachines = [ + { + # Main desktop pc + # ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqsFEgtcTDw89GaZJg8P/FE1xngIXmiUZl8j0b+V7n+ root@doloroo-main + hostName = "doloroo-main"; + sshUser = "remotebuild"; + sshKey = "/root/.ssh/remotebuild"; + # protocol = "ssh-ng"; + maxJobs = 8; + speedFactor = 2; + supportedFeatures = [ + "nixos-test" + "big-parallel" + "kvm" + ]; + } + ]; + }; +} diff --git a/modules/builder/nixos.nix b/modules/builder/nixos.nix index aef3f08..4365517 100644 --- a/modules/builder/nixos.nix +++ b/modules/builder/nixos.nix @@ -33,6 +33,7 @@ let nix.settings.builders-use-substitutes = true; # Define every build machine here.. + # also define in home manager (TODO make a single file with all builders) nix.buildMachines = [ { # Main desktop pc diff --git a/modules/quickshell/quickshell/bar/Bar.qml b/modules/quickshell/quickshell/bar/Bar.qml index e45f202..a441f7b 100755 --- a/modules/quickshell/quickshell/bar/Bar.qml +++ b/modules/quickshell/quickshell/bar/Bar.qml @@ -16,7 +16,7 @@ PanelWindow { property var modelData screen: modelData.values[0] - color: Common.Colors.colors.mainBackground + color: Qt.rgba(0, 0, 0, 0) // Fully transparent via zero alpha anchors { top: true left: true @@ -25,6 +25,7 @@ PanelWindow { implicitHeight: 31 RowLayout { + visible: true height: 30 anchors { top: parent.top diff --git a/modules/quickshell/quickshell/bar/widgets/Battery.qml b/modules/quickshell/quickshell/bar/widgets/Battery.qml index 133e676..bc361aa 100644 --- a/modules/quickshell/quickshell/bar/widgets/Battery.qml +++ b/modules/quickshell/quickshell/bar/widgets/Battery.qml @@ -32,7 +32,7 @@ Rectangle { anchors.centerIn: parent Text { // anchors.centerIn: parent - text: UPower.displayDevice.percentage * 100 + "%" + text: Math.round(UPower.displayDevice.percentage * 100) + "%" color: Common.Colors.colors.primary font.weight: Font.DemiBold font.pointSize: 12 diff --git a/modules/quickshell/quickshell/bar/widgets/common/Colors.qml b/modules/quickshell/quickshell/bar/widgets/common/Colors.qml index 340835f..133ae42 100755 --- a/modules/quickshell/quickshell/bar/widgets/common/Colors.qml +++ b/modules/quickshell/quickshell/bar/widgets/common/Colors.qml @@ -6,16 +6,22 @@ import Quickshell.Io Singleton { id: root - // XX (alpha) XXXXXX (color) + // XX (alpha) XXXXXX (color) - // For oled screen that risk burn in, set up these colors as semi-transparent and have a rotating wallpaper (!!) + // For oled screen that risk burn in, set up these colors as semi-transparent and have a rotating wallpaper (!!) readonly property var colors: ({ - primary: "#59b1b2b5", // Icons & Text colors - secondary: "#BF2a2a2a", // Pill container colors - background: "#BF000000", // Background of containers - mainBackground: "#20ffffff", // Color of the main bar - warning: "#E9D502", // (i.e battery nearing low) - critial: "#e53b3c", // (i.e battery is low) - critial2: "#e53b3c", // (Speaker and Mic being off) - }) + primary: "#59b1b2b5" // Icons & Text colors + , + secondary: "#BF2a2a2a" // Pill container colors + , + background: "#BF000000" // Background of containers + , + mainBackground: "#20ffffff" // Color of the main bar + , + warning: "#E9D502" // (i.e battery nearing low) + , + critial: "#e53b3c" // (i.e battery is low) + , + critial2: "#e53b3c" // (Speaker and Mic being off) + }) } diff --git a/modules/sops/default.nix b/modules/sops/default.nix new file mode 100644 index 0000000..1bc3bb6 --- /dev/null +++ b/modules/sops/default.nix @@ -0,0 +1,4 @@ +_: { + nixos = ./nixos.nix; + home = ./home.nix; +} diff --git a/modules/sops/home.nix b/modules/sops/home.nix new file mode 100644 index 0000000..e9e5b1e --- /dev/null +++ b/modules/sops/home.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + inputs, + pkgs, + home, + system, + nix-meow, + ... +}: +let + cfg = config.modules.sops; +in +{ + + imports = [ + inputs.sops-nix.homeManagerModules.sops + ]; + options.modules.sops = { + enable = lib.mkEnableOption "sops configuration module"; + }; + config = lib.mkIf cfg.enable { + sops = { + age.keyFile = "/home/doloro/.config/sops/age/key.txt"; # must have no password! + defaultSopsFile = "${nix-meow.flakeRoot}/secrets/users.yaml"; + secrets."wakatime-scug-io-api-key" = { + }; + }; + }; +} diff --git a/modules/sops/nixos.nix b/modules/sops/nixos.nix new file mode 100644 index 0000000..fccbb4f --- /dev/null +++ b/modules/sops/nixos.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + inputs, + pkgs, + home, + system, + ... +}: +let + cfg = config.modules.sops; +in +{ + options.modules.sops = { + enable = lib.mkEnableOption "sops configuration module"; + }; + config = lib.mkIf cfg.enable { + }; +} diff --git a/modules/zen-browser/default.nix b/modules/zen-browser/default.nix new file mode 100644 index 0000000..d7a90be --- /dev/null +++ b/modules/zen-browser/default.nix @@ -0,0 +1,4 @@ +_: { + home = ./home.nix; + # nixos = ./nixos.nix; +} diff --git a/modules/zen-browser/home.nix b/modules/zen-browser/home.nix new file mode 100644 index 0000000..b14ed14 --- /dev/null +++ b/modules/zen-browser/home.nix @@ -0,0 +1,26 @@ +{ + config, + inputs, + lib, + pkgs, + fetchFromGitHub, + ... +}: +let + cfg = config.modules.zen-browser; +in +{ + imports = [ + # inputs.zen-browser.homeModules.beta + # inputs.zen-browser.homeModules.twilight + inputs.zen-browser.homeModules.twilight-official + ]; + options.modules.zen-browser = { + enable = lib.mkEnableOption "zen"; + }; + config = lib.mkIf cfg.enable { + programs.zen-browser = { + enable = true; + }; + }; +} diff --git a/modules/zen-browser/nixos.nix b/modules/zen-browser/nixos.nix new file mode 100644 index 0000000..c804736 --- /dev/null +++ b/modules/zen-browser/nixos.nix @@ -0,0 +1,17 @@ +# Disabled in default +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.modules.zen-browser; +in +{ + options.modules.zen-browser = { + enable = lib.mkEnableOption "zen"; + }; + config = lib.mkIf cfg.enable { + }; +} diff --git a/result b/result new file mode 120000 index 0000000..405236f --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/fmxnvfib50cwy1jkr8l8jqy0z93k82kz-depotdownloader-2.7.4-unstable-2024-12-01 \ No newline at end of file