feat: stuff

This commit is contained in:
dusk 2021-01-17 17:25:54 +03:00
parent b64e939886
commit 9038d13256
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
7 changed files with 170 additions and 55 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"nixEnvSelector.nixShellConfig": "${workspaceRoot}/shell.nix"
}

View File

@ -1,5 +1,21 @@
{ {
"nodes": { "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": { "home": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -7,11 +23,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1609573857, "lastModified": 1610791052,
"narHash": "sha256-AlCR2ffY5ZOwwazzhM3BuQ5Z82JiNV4mur6p7RMoR6g=", "narHash": "sha256-2sqrLo1O0OmutNyPZTg5lXDNPDgjcrlvAkQbo7pFUUY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "73506f947c3a2f63306233358231b069865d1d56", "rev": "8127799f79ee96129b295d78294f40a54078131f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -58,17 +74,42 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1609337051, "lastModified": 1610839077,
"narHash": "sha256-Rzo2IFMZKuMJ6waaGgIRMpbt2eHUjx3iByFdjG23buA=", "narHash": "sha256-iM6M2IBHJjCScOLCAfrPPQ4855J3sn8teXmShJuPjH0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ac02f26980ffc6a84844943cb2c303662225543a", "rev": "aa4a14b7ad268ad423e2a4bac065fa9acd02d652",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "owner": "NixOS",
"ref": "nixos-unstable-small", "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": { "root": {
@ -76,7 +117,8 @@
"home": "home", "home": "home",
"impermanence": "impermanence", "impermanence": "impermanence",
"mynex": "mynex", "mynex": "mynex",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"nixpkgsWayland": "nixpkgsWayland"
} }
} }
}, },

View File

@ -24,14 +24,24 @@ let
global = { global = {
networking.hostName = hostName; networking.hostName = hostName;
nix.nixPath = [ nix = {
"nixpkgs=${nixpkgs}" nixPath = [
"nixos-config=/etc/nixos/configuration.nix" "nixpkgs=${nixpkgs}"
"nixpkgs-overlays=/etc/nixos/overlays" "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 = { inherit pkgs; };
nixpkgs.overlays = [ mynex.overlay ];
}; };
local = import "${toString ./.}/${hostName}.nix"; local = import "${toString ./.}/${hostName}.nix";

View File

@ -42,6 +42,7 @@ in
nixosPersistence nixosPersistence
]; ];
systemd.additionalUpstreamSystemUnits = [ "tmp.mount" ];
boot = { boot = {
loader = { loader = {
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
@ -153,7 +154,7 @@ in
}; };
environment = { environment = {
systemPackages = [ btrfsDiff pkgs.docker-compose ]; systemPackages = [ btrfsDiff ];
pathsToLink = [ "/share/zsh" ]; pathsToLink = [ "/share/zsh" ];
persistence."/persist" = { persistence."/persist" = {
directories = [ "/etc/nixos" ]; directories = [ "/etc/nixos" ];
@ -162,13 +163,12 @@ in
}; };
networking.interfaces.enp6s0.useDHCP = true; networking.interfaces.enp6s0.useDHCP = true;
# services.xserver = { services.xserver = {
# enable = true; videoDrivers = [ "amdgpu" ];
# videoDrivers = [ "amdgpu" ]; };
# };
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
services.postgresql = { services.postgresql = {
enable = true; enable = false;
enableTCPIP = true; enableTCPIP = true;
authentication = pkgs.lib.mkOverride 10 '' authentication = pkgs.lib.mkOverride 10 ''
local all all trust local all all trust

View File

@ -2,7 +2,7 @@ final: prev: {
hikari = prev.hikari.overrideAttrs (old: rec { hikari = prev.hikari.overrideAttrs (old: rec {
src = prev.fetchzip { src = prev.fetchzip {
url = "https://hub.darcs.net/raichoo/hikari/dist/hikari.zip"; 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 ]; buildInputs = old.buildInputs ++ [ prev.pandoc ];
}); });

View File

@ -29,4 +29,19 @@
package = pkgs.jre8; 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 ];*/
} }

View File

@ -33,6 +33,31 @@ let
xclip 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 = { colorSchemeLight = {
primary = { primary = {
normal = { normal = {
@ -155,26 +180,26 @@ in
home-manager.users.patriot = { config, pkgs, ... }: { home-manager.users.patriot = { config, pkgs, ... }: {
imports = [ ../profiles/hikari.nix ]; imports = [ ../profiles/hikari.nix ];
gtk = { # gtk = {
# enable = true; # # enable = true;
font = { # font = {
package = pkgs.dejavu_fonts; # package = pkgs.dejavu_fonts;
name = "DejaVu Sans 12"; # name = "DejaVu Sans 12";
}; # };
iconTheme = { # iconTheme = {
package = pkgs.papirus-icon-theme; # package = pkgs.papirus-icon-theme;
name = "Papirus Dark"; # name = "Papirus Dark";
}; # };
theme = { # theme = {
package = pkgs.numix-gtk-theme; # package = pkgs.numix-gtk-theme;
name = "Numix Dark"; # name = "Numix Dark";
}; # };
}; # };
qt = { # qt = {
# enable = true; # # enable = true;
platformTheme = "gtk"; # platformTheme = "gtk";
}; # };
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
home = { home = {
@ -188,6 +213,10 @@ in
font-awesome font-awesome
(nerdfonts.override { fonts = [ "Iosevka" ]; }) (nerdfonts.override { fonts = [ "Iosevka" ]; })
# Programs # Programs
wine-staging
cachix
plasma5.plasma-browser-integration
chromiumWaylandPkg
appimage-run appimage-run
bitwarden bitwarden
pfetch pfetch
@ -203,6 +232,7 @@ in
steam-run steam-run
lutris lutris
xdg_utils xdg_utils
discord
# xdg-user-dirs # xdg-user-dirs
tagref tagref
# gnome3.zenity # gnome3.zenity
@ -219,7 +249,7 @@ in
wayland.windowManager = { wayland.windowManager = {
hikari = { hikari = {
# enable = true; enable = false;
inherit font; inherit font;
}; };
sway = { sway = {
@ -297,11 +327,11 @@ in
accel_profile = "flat"; accel_profile = "flat";
}; };
}; };
output = { # output = {
"*" = { # "*" = {
bg = config.home.homeDirectory + "/wallpaper.png" + " fill"; # bg = config.home.homeDirectory + "/wallpaper.png" + " fill";
}; # };
}; # };
}; };
}; };
}; };
@ -318,7 +348,7 @@ in
}; };
}; };
tmux = { tmux = {
enable = true; enable = false;
newSession = true; newSession = true;
secureSocket = true; secureSocket = true;
baseIndex = 1; baseIndex = 1;
@ -333,7 +363,6 @@ in
}; };
chromium = { chromium = {
enable = true; enable = true;
# package = pkgs.ungoogled-chromium;
extensions = [ extensions = [
"gcbommkclmclpchllfjekcdonpmejbdp" # https everywhere "gcbommkclmclpchllfjekcdonpmejbdp" # https everywhere
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock "cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock
@ -345,7 +374,7 @@ in
]; ];
}; };
qutebrowser = { qutebrowser = {
# enable = true; enable = false;
settings = { settings = {
content.javascript.enabled = false; content.javascript.enabled = false;
colors.webpage.darkmode.enabled = true; colors.webpage.darkmode.enabled = true;
@ -407,7 +436,7 @@ in
compression = true; compression = true;
hashKnownHosts = true; hashKnownHosts = true;
userKnownHostsFile = "~/.local/share/ssh/known-hosts"; userKnownHostsFile = "~/.local/share/ssh/known-hosts";
# Only needed for darcs # Only needed for darcs hub
# extraConfig = '' # extraConfig = ''
# Host hub.darcs.net # Host hub.darcs.net
# ControlMaster no # ControlMaster no
@ -465,6 +494,10 @@ in
bindkey "$terminfo[kRIT5]" forward-word bindkey "$terminfo[kRIT5]" forward-word
bindkey "$terminfo[kLFT5]" backward-word bindkey "$terminfo[kLFT5]" backward-word
zstyle ':completion:*' menu select zstyle ':completion:*' menu select
function project() {
cd "$HOME/Belgeler/projects/$1"
}
''; '';
shellAliases = nixosConfig.environment.shellAliases // { shellAliases = nixosConfig.environment.shellAliases // {
rember = '' rember = ''
@ -523,7 +556,7 @@ in
swayEnabled = config.wayland.windowManager.sway.enable; swayEnabled = config.wayland.windowManager.sway.enable;
in in
{ {
enable = true; enable = config.wayland.windowManager.sway.enable || config.wayland.windowManager.hikari.enable;
settings = [{ settings = [{
layer = "top"; layer = "top";
position = "top"; position = "top";
@ -676,7 +709,7 @@ in
in in
pkgs.vscode-utils.extensionsFromVscodeMarketplace [ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
# Rust # 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 "even-better-toml" "0.10.0" "tamasfe" "sha256-miJ7gXYavLyJneKOSs+4GaFG4v6ocem2YOWyAUrOfs8=")
(mkExt "vscode-ron" "0.9.0" "a5huynh" "sha256-J30hxEYCkr4xhaJ+DfffjwRJZx9NGCOrA6VcDCsodzQ=") (mkExt "vscode-ron" "0.9.0" "a5huynh" "sha256-J30hxEYCkr4xhaJ+DfffjwRJZx9NGCOrA6VcDCsodzQ=")
(mkExt "crates" "0.5.3" "serayuzgur" "sha256-TpzeEPBE75Ov2qDPa22k7e0pTDLQX8z0qBqCVLZXZ/Y=") (mkExt "crates" "0.5.3" "serayuzgur" "sha256-TpzeEPBE75Ov2qDPa22k7e0pTDLQX8z0qBqCVLZXZ/Y=")
@ -688,10 +721,15 @@ in
# Flutter and dart # Flutter and dart
(mkExt "flutter" "3.18.0" "Dart-Code" "sha256-nvKBPSe0+WQ8m88WrQqhzVrqYBjcBhiz6EuJ38gTFhQ=") (mkExt "flutter" "3.18.0" "Dart-Code" "sha256-nvKBPSe0+WQ8m88WrQqhzVrqYBjcBhiz6EuJ38gTFhQ=")
(mkExt "dart-code" "3.18.0" "Dart-Code" "sha256-E+qrY7wOvengOs2yKqhh+5dRLu3dUu6yWxGcwD7QHuI=") (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 # 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 "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 = { xdg = {
enable = true; enable = true;
configFile = { configFile = {
# "oguri/config".text = ''
# [output *]
# image=/home/patriot/wallpaper.gif
# filter=nearest
# scaling-mode=fill
# anchor=center
# '';
"kak/user/kakrc".text = '' "kak/user/kakrc".text = ''
source "%val{config}/user/color/colorscheme.kak" source "%val{config}/user/color/colorscheme.kak"
''; '';