basic conf

This commit is contained in:
emily 2024-02-14 19:42:25 +01:00
parent af17bf6993
commit 20995a4f4a
Signed by: emily
GPG key ID: F6F4C66207FCF995
6 changed files with 550 additions and 21 deletions

View file

@ -43,6 +43,17 @@
programs.ripgrep.enable = true; programs.ripgrep.enable = true;
programs.yt-dl.enable = true; programs.yt-dl.enable = true;
programs.eza = {
enable = true;
enableAlias = true;
icons = true;
git = true;
extraOptions = [
"--color-scale=all"
"--color-scale-mode=gradient"
"--group-directories-first"
];
};
programs.git = { programs.git = {
enable = true; enable = true;
signing.key = "B04F01A7A98A13020C39B4A68AB7B773A214ACE5"; signing.key = "B04F01A7A98A13020C39B4A68AB7B773A214ACE5";

View file

@ -1,6 +1,21 @@
{ ... }: { { config, ... }: {
imports = [ imports = [
../../common ../../common
../../profiles/graphical ../../profiles/graphical
./hardware-configuration.nix
]; ];
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
deployment = {
targetHost = "192.168.122.159";
targetUser = "emily";
};
i18n.defaultLocale = "en_GB.UTF-8";
networking.hostName = "ryuuko";
networking.networkmanager.enable = true;
kyouma.machine-type.physical = true;
kyouma.machine-type.portable = true;
services.openssh.enable = true;
} }

View file

@ -0,0 +1,41 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/92cdb49a-4f15-4880-bf25-2ff1de20119c";
fsType = "btrfs";
options = [ "subvol=nixos" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/92cdb49a-4f15-4880-bf25-2ff1de20119c";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/DB0D-757F";
fsType = "vfat";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -1,11 +1,15 @@
{ config, pkgs, lib, inputs, ... }: { { config, pkgs, lib, inputs, ... }: {
imports = [ imports = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.stylix.nixosModules.stylix
inputs.nixvim.homeManagerModules.nixvim
]; ];
kyouma.machine-type.graphical = true; kyouma.machine-type.graphical = true;
deployment.allowLocalDeployment = true;
services.geoclue2.enable = true; services.geoclue2.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
@ -21,7 +25,37 @@
}; };
xdg.portal.wlr.enable = true; xdg.portal.wlr.enable = true;
stylix= {
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml";
fonts = {
sansSerif = {
package = pkgs.noto-fonts;
name = "Noto Sans";
};
serif = config.stylix.fonts.sansSerif;
monospace = {
package = pkgs.jetbrains-mono;
name = "JetBrainsMono-Regular";
};
sizes.terminal = 11;
};
cursor = {
package = pkgs.capitaine-cursors;
name = "capitaine";
size = 24;
};
};
home-manager.users.emily = { home-manager.users.emily = {
stylix.tagets = {
hyprland.enable = false;
kitty.enable = false;
mako.enable = false;
rofi.enable = false;
swaylock.enabke = false;
waybar.enable = false;
nixvim.enable = false;
};
home.keyboard = { home.keyboard = {
layout = "de"; layout = "de";
variant = "neo_qwerty"; variant = "neo_qwerty";
@ -350,6 +384,205 @@
programs.imv.enable = true; programs.imv.enable = true;
programs.nixvim = {
extraPlugins. = [ pkgs.vimPlugins.molokai ];
coloscheme = "molokai";
vimAlias = true;
highlight.Normal = {
ctermbg = "NONE";
guibg = "NONE";
};
options = {
number = true;
autoindent = true;
mouse = false;
encoding = "utf-8";
shiftwidth = 2;
smartindent = true;
tabstop = 2;
ignorecase = true;
incsearch = true;
smartcase = true;
};
keymaps = [
{
action = "<cmd>Neotree toggle<CR>";
key = "<C-n>";
mode = "n";
options.silent = true;
}
{
action = "<C-\\><C-n>";
key = "<esc>";
mode = "t";
}
];
plugins.nvim-cmp = {
enable = true;
sources = [
{ name = "nvim_lsp"; }
{ name = "luasnip"; }
{ name = "buffer"; }
{ name = "nvim_lua"; }
{ name = "path"; }
];
formatting = {
fields = [ "abbr" "kind" "menu" ];
format = ''
function(_, item)
local icons = {
Namespace = "󰌗",
Text = "󰉿",
Method = "󰆧",
Function = "󰆧",
Constructor = "",
Field = "󰜢",
Variable = "󰀫",
Class = "󰠱",
Interface = "",
Module = "",
Property = "󰜢",
Unit = "󰑭",
Value = "󰎠",
Enum = "",
Keyword = "󰌋",
Snippet = "",
Color = "󰏘",
File = "󰈚",
Reference = "󰈇",
Folder = "󰉋",
EnumMember = "",
Constant = "󰏿",
Struct = "󰙅",
Event = "",
Operator = "󰆕",
TypeParameter = "󰊄",
Table = "",
Object = "󰅩",
Tag = "",
Array = "[]",
Boolean = "",
Number = "",
Null = "󰟢",
String = "󰉿",
Calendar = "",
Watch = "󰥔",
Package = "",
Copilot = "",
Codeium = "",
TabNine = "",
}
local icon = icons[item.kind] or ""
item.kind = string.format("%s %s", icon, item.kind or "")
return item
end
'';
};
snippet = { expand = "luasnip"; };
window = {
completion = {
winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel";
scrollbar = false;
sidePadding = 0;
border = [ "" "" "" "" "" "" "" "" ];
};
documentation = {
border = [ "" "" "" "" "" "" "" "" ];
winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel";
};
};
mapping = {
"<C-n>" = "cmp.mapping.select_next_item()";
"<C-p>" = "cmp.mapping.select_prev_item()";
"<C-j>" = "cmp.mapping.select_next_item()";
"<C-k>" = "cmp.mapping.select_prev_item()";
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.close()";
"<CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })";
"<Tab>" = {
modes = [ "i" "s" ];
action = ''
function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif require("luasnip").expand_or_jumpable() then
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "")
else
fallback()
end
end
'';
};
"<S-Tab>" = {
modes = [ "i" "s" ];
action = ''
function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif require("luasnip").jumpable(-1) then
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "")
else
fallback()
end
end
'';
};
};
};
plugins.lsp = {
enable = true;
keymaps.lspBuf = {
"K" = "hover";
"gd" = "definition";
"gD" = "references";
"gt" = "type_definition";
"gi" = "implementation";
};
servers = {
bashls.enable = true;
lua-ls.enable = true;
nixd.enable = true;
ruff-lsp.enable = true;
};
};
plugins.none-ls = {
enable = true;
sources.diagnostics = {
pylint.enable = true;
shellcheck.enable = true;
statix.enable = true;
};
sources.formatting = {
nixfmt.enable = true;
markdownlint.enable = true;
rustfmt.enable = true;
};
};
plugins.neo-tree = {
enable = true;
closeIfLastWindow = true;
};
plugins.treesitter = {
enable = true;
nixGrammars = true;
indent = true;
};
plugins.cmp-buffer.enable = true;
plugins.cmp-emoji.enable = true;
plugins.cmp-nvim-lsp.enable = true;
plugins.cmp-path.enable = true;
plugins.cmp_luasnip.enable = true;
plugins.luasnip.enable = true;
plugins.lightline.enable = true;
plugins.rainbow-delimiters.enable = true;
plugins.rustaceanvim.enable = true;
plugins.treesitter-context.enable = true;
};
programs.wpaperd = { programs.wpaperd = {
enable = true; enable = true;
settings.default = { settings.default = {

View file

@ -1,16 +1,33 @@
{ {
"nodes": { "nodes": {
"communities": {
"flake": false,
"locked": {
"lastModified": 1706695952,
"narHash": "sha256-FlbOBX/+/LLmoqMJLvu59XuHYmiohIhDc1VjkZu4Wzo=",
"owner": "NLNOG",
"repo": "lg.ring.nlnog.net",
"rev": "20f9a9f3da8b1bc9d7046e88c62df4b41b4efb99",
"type": "github"
},
"original": {
"owner": "NLNOG",
"repo": "lg.ring.nlnog.net",
"type": "github"
}
},
"fernglas": { "fernglas": {
"inputs": { "inputs": {
"communities": "communities",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1705593119, "lastModified": 1707317562,
"narHash": "sha256-bax2BqeVfLRILgevpVhT3PMhq/koBB/XzwLGhv6N2LU=", "narHash": "sha256-0wj5AS8RLVr+S/QWWxCsMvmVjmXUWGfR9kPaZimJEss=",
"owner": "wobcom", "owner": "wobcom",
"repo": "fernglas", "repo": "fernglas",
"rev": "2a63e52f6402e3d3ea1fd69091b044dd5b62a960", "rev": "25020466957dbe0e193f7857d827020f5c1aa996",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -19,16 +36,53 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1706830856,
"narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1705309234,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -55,17 +109,98 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixvim",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703887061,
"narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1707919853,
"narHash": "sha256-qxmBGDzutuJ/tsX4gp+Mr7fjxOZBbeT9ixhS5o4iFOw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "043ba285c6dc20f36441d48525402bcb9743c498",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1707467182,
"narHash": "sha256-/Bw/xgCXfj4nXDd8Xq+r1kaorfsYkkomMf5w5MpsDyA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "5b9156fa9a8b8beba917b8f9adbfd27bf63e16af",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"kyouma-www": { "kyouma-www": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1705420537, "lastModified": 1706043676,
"narHash": "sha256-/zPsJsNFQF1xFIDY9np9TAK7JaiFLDcEhErNfcoyvIc=", "narHash": "sha256-yZKOLGKhwAvJl4iKkcTl08bNT4I0ul2w1WoejkeAGdY=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "b908e77c7173c6c425cbf085972f5ebbc7b83522", "rev": "c1e8e9fc90be19ce1f610f0b13082b6066b28f7d",
"revCount": 15, "revCount": 14,
"type": "git", "type": "git",
"url": "ssh://git@git.bsd.gay/snaki/kyouma-net.git" "url": "ssh://git@git.bsd.gay/snaki/kyouma-net.git"
}, },
@ -74,13 +209,34 @@
"url": "ssh://git@git.bsd.gay/snaki/kyouma-net.git" "url": "ssh://git@git.bsd.gay/snaki/kyouma-net.git"
} }
}, },
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1706833576,
"narHash": "sha256-w7BL0EWRts+nD1lbLECIuz6fRzmmV+z8oWwoY7womR0=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "bdbae6ecff8fcc322bf6b9053c0b984912378af7",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1706182238, "lastModified": 1707842204,
"narHash": "sha256-Ti7CerGydU7xyrP/ow85lHsOpf+XMx98kQnPoQCSi1g=", "narHash": "sha256-M+HAq1qWQBi/gywaMZwX0odU+Qb/XeqVeANGKRBDOwU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "f84eaffc35d1a655e84749228cde19922fcf55f1", "rev": "f1b2f71c86a5b1941d20608db0b1e88a07d31303",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -91,11 +247,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1699099776, "lastModified": 1707092692,
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=", "narHash": "sha256-ZbHsm+mGk/izkWtT4xwwqz38fdlwu7nUUKXTOmm4SyE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb", "rev": "faf912b086576fd1a15fca610166c98d47bc667e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -123,11 +279,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1705856552, "lastModified": 1707689078,
"narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", "narHash": "sha256-UUGmRa84ZJHpGZ1WZEBEUOzaPOWG8LZ0yPg1pdDF/yM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d", "rev": "f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -153,12 +309,66 @@
"type": "github" "type": "github"
} }
}, },
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
"home-manager": "home-manager_2",
"nix-darwin": "nix-darwin",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1707905367,
"narHash": "sha256-XqzKBGi8ItHQhnICLB36MHzABGW7JFQDuG0EURjRO0Q=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "f755eeb961a4d13ec72921cb4dbc4f2d6c8a58bb",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_3",
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1707297608,
"narHash": "sha256-ADjo/5VySGlvtCW3qR+vdFF4xM9kJFlRDqcC9ZGI8EA=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "0db2e67ee49910adfa13010e7f012149660af7f0",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"fernglas": "fernglas", "fernglas": "fernglas",
"home-manager": "home-manager",
"kyouma-www": "kyouma-www", "kyouma-www": "kyouma-www",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nixvim": "nixvim",
"secrix": "secrix" "secrix": "secrix"
} }
}, },
@ -209,6 +419,21 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -10,9 +10,13 @@
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, nixos-hardware, fernglas, kyouma-www, secrix, home-manager, ... }@inputs: { outputs = { self, nixpkgs, secrix, ... }@inputs: {
colmena = { colmena = {
meta = { meta = {
allowApplyAll = false; allowApplyAll = false;