[feat] Add nil for *.nix

This commit is contained in:
uttarayan21
2024-02-20 18:57:18 +05:30
parent 9983668d75
commit 3622d00200
7 changed files with 44 additions and 15 deletions

View File

@@ -11,6 +11,9 @@ in {
home.packages = with pkgs; home.packages = with pkgs;
[ [
jq
tldr
spotify-player
htop-vim htop-vim
qmk qmk
nodejs nodejs
@@ -32,10 +35,13 @@ in {
(nerdfonts.override { fonts = [ "Hasklig" ]; }) (nerdfonts.override { fonts = [ "Hasklig" ]; })
mpv mpv
] ++ (if device.isLinux then [ ] ++ (if device.isLinux then [
swaynotificationcenter
openocd-rp2040
usbutils
picotool
handlr-regex handlr-regex
webcord-vencord webcord-vencord
spotify spotify
spotify-player
lsof lsof
wl-clipboard wl-clipboard
ncpamixer ncpamixer
@@ -73,6 +79,7 @@ in {
set fish_greeting set fish_greeting
''; '';
interactiveShellInit = '' interactiveShellInit = ''
${pkgs.spotify-player}/bin/spotify_player generate fish | source
${pkgs.macchina.outPath}/bin/macchina ${pkgs.macchina.outPath}/bin/macchina
''; '';
}; };

24
config/nix/flake.lock generated
View File

@@ -139,11 +139,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1696343447, "lastModified": 1706830856,
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -330,11 +330,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1708031129, "lastModified": 1708294481,
"narHash": "sha256-EH20hJfNnc1/ODdDVat9B7aKm0B95L3YtkIRwKLvQG8=", "narHash": "sha256-DZtxmeb4OR7iCaKUUuq05ADV2rX8WReZEF7Tq//W0+Y=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "3d6791b3897b526c82920a2ab5f61d71985b3cf8", "rev": "a54e05bc12d88ff2df941d0dc1183cb5235fa438",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -353,11 +353,11 @@
"rust-overlay": "rust-overlay_3" "rust-overlay": "rust-overlay_3"
}, },
"locked": { "locked": {
"lastModified": 1708270612, "lastModified": 1708355784,
"narHash": "sha256-T5aQ/lnW7wlIDpg7QEb32eYswAFSndFM+kfRk8uNHwQ=", "narHash": "sha256-Pf95nr82DUDSVnUpzRERtnopjiLC7Zi7QuKtJtoc+XE=",
"owner": "JakeStanger", "owner": "JakeStanger",
"repo": "ironbar", "repo": "ironbar",
"rev": "180a5205b9eb316e4b2916ae2ed0b2198912b9cd", "rev": "18e8244580ccffc3eee086becb62800fc6854c61",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -519,11 +519,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1708118438, "lastModified": 1708296515,
"narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=", "narHash": "sha256-FyF489fYNAUy7b6dkYV6rGPyzp+4tThhr80KNAaF/yY=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80", "rev": "b98a4e1746acceb92c509bc496ef3d0e5ad8d4aa",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -41,6 +41,7 @@
url = "github:JakeStanger/ironbar"; url = "github:JakeStanger/ironbar";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = { nixpkgs, outputs = { nixpkgs,

View File

@@ -7,4 +7,16 @@
../linux/ironbar.nix ../linux/ironbar.nix
../linux/foot.nix ../linux/foot.nix
]; ];
systemd.user.services.spotify-player = {
Install = { WantedBy = [ "graphical-session.target" ]; };
Unit = {
Description = "Spotify Player Daemon";
After = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs.spotify-player}/bin/spotify_player -d";
Restart = "on-failure";
RestartSec = "5";
};
};
} }

View File

@@ -16,7 +16,7 @@
kb_options = "ctrl:nocaps"; kb_options = "ctrl:nocaps";
# kb_rules = ""; # kb_rules = "";
follow_mouse = 1; follow_mouse = 0;
touchpad = { touchpad = {
natural_scroll = true; natural_scroll = true;

View File

@@ -23,6 +23,7 @@
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.bootspec.enable = true;
networking.hostName = "ryu"; # Define your hostname. networking.hostName = "ryu"; # Define your hostname.
networking.nameservers = [ "1.1.1.1" "8.8.8.8" ]; networking.nameservers = [ "1.1.1.1" "8.8.8.8" ];

View File

@@ -15,5 +15,13 @@ end)
local lua_opts = lsp_zero.nvim_lua_ls() local lua_opts = lsp_zero.nvim_lua_ls()
lspconfig.lua_ls.setup(lua_opts) lspconfig.lua_ls.setup(lua_opts)
lspconfig.nil_ls.setup({}) lspconfig.nil_ls.setup({
settings = {
['nil'] = {
formatting = {
command = { "nixfmt" },
},
},
},
})
lspconfig.clangd.setup({}) lspconfig.clangd.setup({})