diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..13e48af --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "nixEnvSelector.nixShellConfig": "${workspaceRoot}/shell.nix" +} \ No newline at end of file diff --git a/flake.lock b/flake.lock index 55c8a61..efa632f 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "cachix": { + "locked": { + "lastModified": 1610779893, + "narHash": "sha256-dAKlewu9L3C4ZCWgS1UVtk2gYJI42ZeUdcezfbXvSdw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1eff582e7ea6dcb208127ad369e231eaaf6fa378", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-20.09", + "repo": "nixpkgs", + "type": "github" + } + }, "home": { "inputs": { "nixpkgs": [ @@ -7,11 +23,11 @@ ] }, "locked": { - "lastModified": 1609573857, - "narHash": "sha256-AlCR2ffY5ZOwwazzhM3BuQ5Z82JiNV4mur6p7RMoR6g=", + "lastModified": 1610791052, + "narHash": "sha256-2sqrLo1O0OmutNyPZTg5lXDNPDgjcrlvAkQbo7pFUUY=", "owner": "nix-community", "repo": "home-manager", - "rev": "73506f947c3a2f63306233358231b069865d1d56", + "rev": "8127799f79ee96129b295d78294f40a54078131f", "type": "github" }, "original": { @@ -58,17 +74,42 @@ }, "nixpkgs": { "locked": { - "lastModified": 1609337051, - "narHash": "sha256-Rzo2IFMZKuMJ6waaGgIRMpbt2eHUjx3iByFdjG23buA=", + "lastModified": 1610839077, + "narHash": "sha256-iM6M2IBHJjCScOLCAfrPPQ4855J3sn8teXmShJuPjH0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ac02f26980ffc6a84844943cb2c303662225543a", + "rev": "aa4a14b7ad268ad423e2a4bac065fa9acd02d652", "type": "github" }, "original": { - "id": "nixpkgs", + "owner": "NixOS", "ref": "nixos-unstable-small", - "type": "indirect" + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgsWayland": { + "inputs": { + "cachix": "cachix", + "nixpkgs": [ + "nixpkgs" + ], + "unstableSmall": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1610885247, + "narHash": "sha256-DHdp0ROpthzwzADUvKG9fwOhMHdESF2g9hSnNwyTf2Q=", + "owner": "colemickens", + "repo": "nixpkgs-wayland", + "rev": "b93d657098161d7b9335330139d7148c578a41b8", + "type": "github" + }, + "original": { + "owner": "colemickens", + "repo": "nixpkgs-wayland", + "type": "github" } }, "root": { @@ -76,7 +117,8 @@ "home": "home", "impermanence": "impermanence", "mynex": "mynex", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgsWayland": "nixpkgsWayland" } } }, diff --git a/hosts/default.nix b/hosts/default.nix index f7f06db..0d70e33 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -24,14 +24,24 @@ let global = { networking.hostName = hostName; - nix.nixPath = [ - "nixpkgs=${nixpkgs}" - "nixos-config=/etc/nixos/configuration.nix" - "nixpkgs-overlays=/etc/nixos/overlays" - ]; + nix = { + nixPath = [ + "nixpkgs=${nixpkgs}" + "nixos-config=/etc/nixos/configuration.nix" + "nixpkgs-overlays=/etc/nixos/overlays" + ]; + + binaryCachePublicKeys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" + ]; + binaryCaches = [ + "https://cache.nixos.org" + "https://nixpkgs-wayland.cachix.org" + ]; + }; nixpkgs = { inherit pkgs; }; - nixpkgs.overlays = [ mynex.overlay ]; }; local = import "${toString ./.}/${hostName}.nix"; diff --git a/hosts/lungmen.nix b/hosts/lungmen.nix index 01296a0..f43c7ff 100644 --- a/hosts/lungmen.nix +++ b/hosts/lungmen.nix @@ -42,6 +42,7 @@ in nixosPersistence ]; + systemd.additionalUpstreamSystemUnits = [ "tmp.mount" ]; boot = { loader = { efi.canTouchEfiVariables = true; @@ -153,7 +154,7 @@ in }; environment = { - systemPackages = [ btrfsDiff pkgs.docker-compose ]; + systemPackages = [ btrfsDiff ]; pathsToLink = [ "/share/zsh" ]; persistence."/persist" = { directories = [ "/etc/nixos" ]; @@ -162,13 +163,12 @@ in }; networking.interfaces.enp6s0.useDHCP = true; - # services.xserver = { - # enable = true; - # videoDrivers = [ "amdgpu" ]; - # }; + services.xserver = { + videoDrivers = [ "amdgpu" ]; + }; virtualisation.docker.enable = true; services.postgresql = { - enable = true; + enable = false; enableTCPIP = true; authentication = pkgs.lib.mkOverride 10 '' local all all trust diff --git a/overlays/hikari.nix b/overlays/hikari.nix index 368d75f..5383b2e 100644 --- a/overlays/hikari.nix +++ b/overlays/hikari.nix @@ -2,7 +2,7 @@ final: prev: { hikari = prev.hikari.overrideAttrs (old: rec { src = prev.fetchzip { url = "https://hub.darcs.net/raichoo/hikari/dist/hikari.zip"; - sha256 = "sha256-wguyND2LDyWtIoFibuxfFf9fi2D/0v7/fnGXy3JGjgM="; + sha256 = "sha256-oVqn8rd9ajF0eS1D+L2Fw9n1MGuRzQbyWPYFueWF+hk="; }; buildInputs = old.buildInputs ++ [ prev.pandoc ]; }); diff --git a/users/patriot/default.nix b/users/patriot/default.nix index ddaec94..40f3aec 100644 --- a/users/patriot/default.nix +++ b/users/patriot/default.nix @@ -29,4 +29,19 @@ package = pkgs.jre8; }; }; + + /*services = { + xserver = { + enable = true; + desktopManager.plasma5.enable = true; + displayManager = { + autoLogin = { + enable = true; + user = "patriot"; + }; + sddm.enable = true; + }; + }; + }; + environment.systemPackages = [ pkgs.kde-gtk-config ];*/ } diff --git a/users/patriot/home.nix b/users/patriot/home.nix index 1bdf786..1981f4b 100644 --- a/users/patriot/home.nix +++ b/users/patriot/home.nix @@ -33,6 +33,31 @@ let xclip ]; + chromiumWayland = pkgs.writeScriptBin "chromium-wayland" '' + #!${pkgs.stdenv.shell} + chromium --enable-features=UseOzonePlatform --ozone-platform=wayland + ''; + chromiumWaylandPkg = with pkgs; stdenv.mkDerivation { + name = "chromium-wayland"; + version = chromium.version; + + nativeBuildInputs = [ copyDesktopItems ]; + desktopItems = [ + (makeDesktopItem rec { + name = "chromium-wayland"; + exec = name; + desktopName = "Chromium Wayland"; + genericName = "Web Browser"; + }) + ]; + + phases = [ "installPhase" ]; + installPhase = '' + mkdir -p $out/bin + ln -s ${chromiumWayland}/bin/chromium-wayland $out/bin/chromium-wayland + ''; + }; + colorSchemeLight = { primary = { normal = { @@ -155,26 +180,26 @@ in home-manager.users.patriot = { config, pkgs, ... }: { imports = [ ../profiles/hikari.nix ]; - gtk = { - # enable = true; - font = { - package = pkgs.dejavu_fonts; - name = "DejaVu Sans 12"; - }; - iconTheme = { - package = pkgs.papirus-icon-theme; - name = "Papirus Dark"; - }; - theme = { - package = pkgs.numix-gtk-theme; - name = "Numix Dark"; - }; - }; + # gtk = { + # # enable = true; + # font = { + # package = pkgs.dejavu_fonts; + # name = "DejaVu Sans 12"; + # }; + # iconTheme = { + # package = pkgs.papirus-icon-theme; + # name = "Papirus Dark"; + # }; + # theme = { + # package = pkgs.numix-gtk-theme; + # name = "Numix Dark"; + # }; + # }; - qt = { - # enable = true; - platformTheme = "gtk"; - }; + # qt = { + # # enable = true; + # platformTheme = "gtk"; + # }; fonts.fontconfig.enable = true; home = { @@ -188,6 +213,10 @@ in font-awesome (nerdfonts.override { fonts = [ "Iosevka" ]; }) # Programs + wine-staging + cachix + plasma5.plasma-browser-integration + chromiumWaylandPkg appimage-run bitwarden pfetch @@ -203,6 +232,7 @@ in steam-run lutris xdg_utils + discord # xdg-user-dirs tagref # gnome3.zenity @@ -219,7 +249,7 @@ in wayland.windowManager = { hikari = { - # enable = true; + enable = false; inherit font; }; sway = { @@ -297,11 +327,11 @@ in accel_profile = "flat"; }; }; - output = { - "*" = { - bg = config.home.homeDirectory + "/wallpaper.png" + " fill"; - }; - }; + # output = { + # "*" = { + # bg = config.home.homeDirectory + "/wallpaper.png" + " fill"; + # }; + # }; }; }; }; @@ -318,7 +348,7 @@ in }; }; tmux = { - enable = true; + enable = false; newSession = true; secureSocket = true; baseIndex = 1; @@ -333,7 +363,6 @@ in }; chromium = { enable = true; - # package = pkgs.ungoogled-chromium; extensions = [ "gcbommkclmclpchllfjekcdonpmejbdp" # https everywhere "cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock @@ -345,7 +374,7 @@ in ]; }; qutebrowser = { - # enable = true; + enable = false; settings = { content.javascript.enabled = false; colors.webpage.darkmode.enabled = true; @@ -407,7 +436,7 @@ in compression = true; hashKnownHosts = true; userKnownHostsFile = "~/.local/share/ssh/known-hosts"; - # Only needed for darcs + # Only needed for darcs hub # extraConfig = '' # Host hub.darcs.net # ControlMaster no @@ -465,6 +494,10 @@ in bindkey "$terminfo[kRIT5]" forward-word bindkey "$terminfo[kLFT5]" backward-word zstyle ':completion:*' menu select + + function project() { + cd "$HOME/Belgeler/projects/$1" + } ''; shellAliases = nixosConfig.environment.shellAliases // { rember = '' @@ -523,7 +556,7 @@ in swayEnabled = config.wayland.windowManager.sway.enable; in { - enable = true; + enable = config.wayland.windowManager.sway.enable || config.wayland.windowManager.hikari.enable; settings = [{ layer = "top"; position = "top"; @@ -676,7 +709,7 @@ in in pkgs.vscode-utils.extensionsFromVscodeMarketplace [ # Rust - (mkExt "rust-analyzer" "0.2.432" "matklad" "sha256-XsJlfbvxVzI0wdwIvswLUWnmczCrpT+MtedmjxVOvso=") + (mkExt "rust-analyzer" "0.2.441" "matklad" "sha256-aUX2HMMhS9bgTOmGgqZIgs0GBxmbJdr7J6loqwQTZeM=") (mkExt "even-better-toml" "0.10.0" "tamasfe" "sha256-miJ7gXYavLyJneKOSs+4GaFG4v6ocem2YOWyAUrOfs8=") (mkExt "vscode-ron" "0.9.0" "a5huynh" "sha256-J30hxEYCkr4xhaJ+DfffjwRJZx9NGCOrA6VcDCsodzQ=") (mkExt "crates" "0.5.3" "serayuzgur" "sha256-TpzeEPBE75Ov2qDPa22k7e0pTDLQX8z0qBqCVLZXZ/Y=") @@ -688,10 +721,15 @@ in # Flutter and dart (mkExt "flutter" "3.18.0" "Dart-Code" "sha256-nvKBPSe0+WQ8m88WrQqhzVrqYBjcBhiz6EuJ38gTFhQ=") (mkExt "dart-code" "3.18.0" "Dart-Code" "sha256-E+qrY7wOvengOs2yKqhh+5dRLu3dUu6yWxGcwD7QHuI=") + # protobuf + (mkExt "vscode-proto3" "0.5.3" "zxh404" "sha256-oUSih+YdAXYkTNejZBJjcXewQewgQFMGhAFdJ/CBMd4=") + # git + (mkExt "gitlens" "11.1.3" "eamodio" "sha256-hqJg3jP4bbXU4qSJOjeKfjkPx61yPDMsQdSUVZObK/U=") + (mkExt "vscode-commitizen" "0.9.3" "KnisterPeter" "sha256-q9u3oSwFjDHwLsIUwMZ8huv9uXc1GWFfEOEMXWx3w/o=") # Customization - (mkExt "dance" "0.3.2" "gregoire" "sha256-+g8EXeCkPOPvZ60JoXkGTeSXYWrXmKrcbUaEfDppdgA=") + # (mkExt "dance" "0.3.2" "gregoire" "sha256-+g8EXeCkPOPvZ60JoXkGTeSXYWrXmKrcbUaEfDppdgA=") (mkExt "material-icon-theme" "4.4.0" "PKief" "sha256-yiM+jtc7UW8PQTwmHmXHSSmvYC73GLh/cLYnmYqONdU=") - (mkExt "noctis" "10.39.1" "liviuschera" "sha256-Ak1DcfyK0RdPx81flWBXJxtDsZmulQXeOWFH0b2AoCQ=") + (mkExt "github-vscode-theme" "1.1.5" "github" "sha256-EPAJjM4CbR8MhV+3pm6mC12KzSt2Em6pT+c2HknNntI=") ]; }; }; @@ -713,6 +751,13 @@ in xdg = { enable = true; configFile = { + # "oguri/config".text = '' + # [output *] + # image=/home/patriot/wallpaper.gif + # filter=nearest + # scaling-mode=fill + # anchor=center + # ''; "kak/user/kakrc".text = '' source "%val{config}/user/color/colorscheme.kak" '';