From 4d1a550da9b46d4919ace650bf04aacb00b72cb3 Mon Sep 17 00:00:00 2001 From: bad Date: Mon, 19 Sep 2022 12:38:27 +0200 Subject: [PATCH] Work config --- flake.lock | 56 ++++++++++++++++++++++++++-- flake.nix | 8 ++-- users/maekasza/default.nix | 41 ++++++++++++++++++++ users/profiles/alacritty/default.nix | 5 +++ users/profiles/sway/default.nix | 4 +- users/profiles/zsh/default.nix | 2 + 6 files changed, 108 insertions(+), 8 deletions(-) create mode 100644 users/maekasza/default.nix diff --git a/flake.lock b/flake.lock index 3d754bd..d25995a 100644 --- a/flake.lock +++ b/flake.lock @@ -311,6 +311,21 @@ } }, "flake-utils_4": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { "locked": { "lastModified": 1634851050, "narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=", @@ -325,7 +340,7 @@ "type": "github" } }, - "flake-utils_5": { + "flake-utils_6": { "locked": { "lastModified": 1644229661, "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", @@ -413,6 +428,25 @@ "type": "github" } }, + "nixgl": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1661367362, + "narHash": "sha256-Qc8MXcV+YCPREu8kk6oggk23ZBKLqeQRAIsLbHEviPE=", + "owner": "guibou", + "repo": "nixGL", + "rev": "7165ffbccbd2cf4379b6cd6d2edd1620a427e5ae", + "type": "github" + }, + "original": { + "owner": "guibou", + "repo": "nixGL", + "type": "github" + } + }, "nixos": { "locked": { "lastModified": 1662739455, @@ -460,6 +494,21 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1660551188, + "narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, "nvfetcher": { "inputs": { "flake-compat": "flake-compat_3", @@ -487,7 +536,7 @@ "peerix": { "inputs": { "flake-compat": "flake-compat_4", - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_5", "nixpkgs": [ "nixos" ] @@ -509,7 +558,7 @@ }, "pwnix": { "inputs": { - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_6", "jwt-tool": "jwt-tool", "nixpkgs": [ "nixos" @@ -557,6 +606,7 @@ "home": "home", "latest": "latest", "naersk": "naersk", + "nixgl": "nixgl", "nixos": "nixos", "nixos-hardware": "nixos-hardware", "nvfetcher": "nvfetcher", diff --git a/flake.nix b/flake.nix index 9a32059..6bfc266 100644 --- a/flake.nix +++ b/flake.nix @@ -49,6 +49,8 @@ pwnix.url = "git+https://im.badat.dev/bad/pwnix.git"; pwnix.inputs.nixpkgs.follows = "nixos"; + + nixgl.url = "github:guibou/nixGL"; }; outputs = @@ -62,6 +64,7 @@ , nvfetcher , deploy , peerix + , nixgl , ... } @ inputs: digga.lib.mkFlake @@ -81,6 +84,7 @@ ./pkgs/default.nix peerix.overlay + nixgl.overlay ]; }; latest = { }; @@ -134,9 +138,7 @@ base = [ direnv git ]; }; }; - users = { - nixos = { suites, ... }: { imports = suites.base; }; - }; # digga.lib.importers.rakeLeaves ./users/hm; + users = digga.lib.rakeLeaves ./users; }; homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; diff --git a/users/maekasza/default.nix b/users/maekasza/default.nix new file mode 100644 index 0000000..6f6a706 --- /dev/null +++ b/users/maekasza/default.nix @@ -0,0 +1,41 @@ +{ pkgs, ... }: { + imports = [ ../profiles/direnv ../profiles/git ../profiles/zsh ../profiles/neovim ../profiles/syncthing ../profiles/kdeconnect ../profiles/podman ../profiles/alacritty ../profiles/tmux ../profiles/mpv ../profiles/sway ]; + targets.genericLinux.enable = true; + programs.alacritty.package = pkgs.symlinkJoin { + name = "alacritty-nixgl"; + paths = [ + (pkgs.writeShellScriptBin + "alacritty" + '' + ${pkgs.nixgl.nixGLIntel}/bin/nixGLIntel ${pkgs.alacritty}/bin/alacritty "$@" + '') + pkgs.alacritty + ]; + }; + home.packages = [ pkgs.home-manager ]; + wayland.windowManager.sway.extraSessionCommands = '' + export WLR_NO_HARDWARE_CURSORS=1 + ''; + + home.sessionVariables = { + XDG_DATA_DIRS = "$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share"; + EDITOR = "${pkgs.neovim}/bin/nvim"; + MOZ_ENABLE_WAYLAND = 1; + }; + gtk = { + enable = true; + + theme = { + name = "Arc-Dark"; + package = pkgs.arc-theme; + }; + + gtk3.extraConfig = { + gtk-application-prefer-dark-theme = true; + }; + }; + programs.go = { + enable = true; + goPath = ".local/go"; + }; +} diff --git a/users/profiles/alacritty/default.nix b/users/profiles/alacritty/default.nix index 2023611..c15ae93 100644 --- a/users/profiles/alacritty/default.nix +++ b/users/profiles/alacritty/default.nix @@ -1,4 +1,9 @@ +{ pkgs, ... }: { + fonts.fontconfig.enable = true; + home.packages = [ + (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) + ]; programs.alacritty = { enable = true; settings = { diff --git a/users/profiles/sway/default.nix b/users/profiles/sway/default.nix index c26ef63..01b76ce 100644 --- a/users/profiles/sway/default.nix +++ b/users/profiles/sway/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }@inputs: +{ pkgs, lib, config, ... }@inputs: let rofi = pkgs.rofi.override { plugins = [ pkgs.rofi-emoji ]; }; scripts = ((import ./scripts.nix) inputs); @@ -8,7 +8,7 @@ in wayland.windowManager.sway = rec { enable = true; config = { - terminal = "${pkgs.alacritty}/bin/alacritty"; + terminal = "alacritty"; menu = "${rofi}/bin/rofi -show combi"; modifier = "Mod4"; output = { diff --git a/users/profiles/zsh/default.nix b/users/profiles/zsh/default.nix index a98e6b9..1f0758e 100644 --- a/users/profiles/zsh/default.nix +++ b/users/profiles/zsh/default.nix @@ -28,6 +28,8 @@ ${builtins.readFile ./p10k.zsh} ''; + }; programs.direnv.enableZshIntegration = true; + home.packages = [ pkgs.fzf ]; }