restructuring

This commit is contained in:
cnst
2024-06-23 13:18:58 +02:00
parent b2aec1af0d
commit cdf2b9771c
22 changed files with 300 additions and 893 deletions

View File

@@ -8,7 +8,8 @@
pkgs,
system,
...
}: {
}:
{
# You can import other NixOS modules here
imports = [
inputs.home-manager.nixosModules.home-manager
@@ -24,7 +25,9 @@
];
home-manager = {
extraSpecialArgs = {inherit inputs outputs;};
extraSpecialArgs = {
inherit inputs outputs;
};
users = {
# Import your home-manager configuration
cnst = import ../home-manager/home.nix;
@@ -51,47 +54,73 @@
};
};
nix = let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in {
settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Opinionated: disable global registry
flake-registry = "";
# Workaround for https://github.com/NixOS/nix/issues/9574
nix-path = config.nix.nixPath;
};
# Opinionated: disable channels
channel.enable = false;
nix =
let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in
{
settings = {
warn-dirty = false;
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Opinionated: disable global registry
flake-registry = "";
# Workaround for https://github.com/NixOS/nix/issues/9574
nix-path = config.nix.nixPath;
};
# Opinionated: disable channels
channel.enable = false;
# Opinionated: make flake registry and nix path match flake inputs
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
};
# Opinionated: make flake registry and nix path match flake inputs
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
};
# System packages
environment = {
systemPackages = [
inputs.nixvim.packages.${pkgs.system}.default
# Dev
pkgs.git
pkgs.pyright
pkgs.python3
pkgs.gcc
pkgs.nodejs_22
pkgs.go
pkgs.nodePackages_latest.npm
pkgs.nodePackages_latest.nodejs
pkgs.nodePackages.prettier
pkgs.nodePackages.prettier-plugin-toml
pkgs.lua-language-server
pkgs.stylua
pkgs.prettierd
pkgs.cargo
pkgs.gnumake
pkgs.hyprlang
pkgs.nixd
pkgs.nil
pkgs.black
pkgs.python312Packages.jedi-language-server
pkgs.isort
pkgs.bacon
pkgs.clang
pkgs.clang-tools
pkgs.alejandra
# Util
pkgs.stow
pkgs.gnumake
pkgs.wget
pkgs.curl
pkgs.ripgrep
pkgs.nixd
pkgs.python312Packages.oauth2
pkgs.python312Packages.httplib2
pkgs.python312Packages.pip
pkgs.killall
pkgs.alejandra
pkgs.tree-sitter
pkgs.lazygit
pkgs.tmux
pkgs.tmuxifier
pkgs.unzip
pkgs.p7zip
pkgs.unrar
];
localBinInPath = true;
};
@@ -103,7 +132,15 @@
fira-code-symbols
font-awesome
jetbrains-mono
(nerdfonts.override {fonts = ["JetBrainsMono" "FiraCode" "Iosevka" "3270" "DroidSansMono"];})
(nerdfonts.override {
fonts = [
"JetBrainsMono"
"FiraCode"
"Iosevka"
"3270"
"DroidSansMono"
];
})
]; # Bootloader
boot.loader = {
systemd-boot.enable = true;
@@ -123,6 +160,11 @@
};
graphics = {
enable = true;
extraPackages = with pkgs; [
libva
vaapiVdpau
libvdpau-va-gl
];
};
};
@@ -134,6 +176,12 @@
solaar.enable = true;
nix-ld.enable = true;
adb.enable = true;
nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/cnst/.nix-config";
};
neovim = {
enable = true;
defaultEditor = true;
@@ -177,7 +225,12 @@
isNormalUser = true;
shell = pkgs.zsh;
# openssh.authorizedKeys.keys = [];
extraGroups = ["wheel" "networkmanager" "audio" "video"];
extraGroups = [
"wheel"
"networkmanager"
"audio"
"video"
];
};
};
@@ -218,7 +271,7 @@
xkb = {
extraLayouts.hhkbse = {
description = "HHKBse by cnst";
languages = ["se"];
languages = [ "se" ];
symbolsFile = /home/cnst/.nix-config/nixos/xkb/symbols/hhkbse;
};
layout = "hhkbse";

View File

@@ -1,30 +1,54 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/de372c64-89a2-4bbe-ad57-926cdd98e97d";
fsType = "ext4";
boot = {
initrd = {
availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
kernelModules = [ ];
};
kernelModules = [ "kvm-amd" ];
kernelPackages = pkgs.linuxPackages_latest;
consoleLogLevel = 3;
kernelParams = [
"quiet"
"splash"
];
extraModulePackages = [ ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/de372c64-89a2-4bbe-ad57-926cdd98e97d";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-60ba815c-481b-4932-94d2-b8d29465d3eb".device = "/dev/disk/by-uuid/60ba815c-481b-4932-94d2-b8d29465d3eb";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0954-2370";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0954-2370";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ ];

View File

@@ -2,8 +2,6 @@
default partial alphanumeric_keys
xkb_symbols "hhkbse" {
include "latin(type2)"
include "se(se)"
name[Group1]="Sweden - HHKBse";
@@ -56,5 +54,4 @@ xkb_symbols "hhkbse" {
key <AB08> {[ comma, semicolon ]};
key <AB09> {[ period, colon ]};
key <AB10> {[ minus, underscore, endash ]};
};