This commit is contained in:
cnst
2024-08-01 19:11:01 +02:00
parent ec2d61b288
commit a58147df97
17 changed files with 168 additions and 310 deletions

60
flake.lock generated
View File

@@ -80,12 +80,12 @@
"yafas": "yafas"
},
"locked": {
"lastModified": 1722269440,
"narHash": "sha256-eUzqnxgHIfxGcXk0SwXwP011uQ41WOEHX+gg1uPSkcE=",
"rev": "a383380ec33f66ef92c4e815260271f6ad7cf286",
"revCount": 1301,
"lastModified": 1722455255,
"narHash": "sha256-ah/5TUuX/hLRY4sSFApMTva+2mC3GsWNQx3r9+G3GDk=",
"rev": "a531a96131a200374f9482b3de495704c4e3e12e",
"revCount": 1306,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/chaotic-cx/nyx/0.1.1301%2Brev-a383380ec33f66ef92c4e815260271f6ad7cf286/0190ff44-f501-77d4-b90e-b7069baae710/source.tar.gz"
"url": "https://api.flakehub.com/f/pinned/chaotic-cx/nyx/0.1.1306%2Brev-a531a96131a200374f9482b3de495704c4e3e12e/01910a8e-73dd-792a-a321-29ef7c6b0121/source.tar.gz"
},
"original": {
"type": "tarball",
@@ -159,11 +159,11 @@
]
},
"locked": {
"lastModified": 1722424503,
"narHash": "sha256-LnOw7mj4z+LuIM0JOqYT6wzEfXkv9mmTCp6MC72oQgM=",
"lastModified": 1722515345,
"narHash": "sha256-RGUIK0Z9VgZCLQlMOuTX+iy6uVxlkZ9lNUMndy2cQE8=",
"owner": "nix-community",
"repo": "flake-firefox-nightly",
"rev": "e9557b516eb848b88f0bed9675e4b6c9e51df640",
"rev": "030aeb39d0770524ec59cf376b8d74c1281f1703",
"type": "github"
},
"original": {
@@ -533,11 +533,11 @@
]
},
"locked": {
"lastModified": 1722407237,
"narHash": "sha256-wcpVHUc2nBSSgOM7UJSpcRbyus4duREF31xlzHV5T+A=",
"lastModified": 1722462338,
"narHash": "sha256-ss0G8t8RJVDewA3MyqgAlV951cWRK6EtVhVKEZ7J5LU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "58cef3796271aaeabaed98884d4abaab5d9d162d",
"rev": "6e090576c4824b16e8759ebca3958c5b09659ee8",
"type": "github"
},
"original": {
@@ -575,11 +575,11 @@
]
},
"locked": {
"lastModified": 1722119539,
"narHash": "sha256-2kU90liMle0vKR8exJx1XM4hZh9CdNgZGHCTbeA9yzY=",
"lastModified": 1722407237,
"narHash": "sha256-wcpVHUc2nBSSgOM7UJSpcRbyus4duREF31xlzHV5T+A=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d0240a064db3987eb4d5204cf2400bc4452d9922",
"rev": "58cef3796271aaeabaed98884d4abaab5d9d162d",
"type": "github"
},
"original": {
@@ -629,11 +629,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1722441247,
"narHash": "sha256-YHVgiYZoaemwEI1/T0r8Q3iTGY1LPFJkBmLDVoqqea0=",
"lastModified": 1722519799,
"narHash": "sha256-NXeB/KgCbklksgTfHNef0/CfTXmw88YOrh2Q/87S2RM=",
"ref": "refs/heads/main",
"rev": "8a5f9bbb394ddeb4be9a9df6248b41b07d84ea66",
"revCount": 5030,
"rev": "ab0a3268e04f2295ec4455be90ce8d0c2b107b8d",
"revCount": 5040,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@@ -900,11 +900,11 @@
"umu": "umu"
},
"locked": {
"lastModified": 1722388137,
"narHash": "sha256-vIZC9sPCNJCYuT5k9hV7Ag8AnXDyjQfsYUZCnG2y3vs=",
"lastModified": 1722476138,
"narHash": "sha256-37niGfDQ7ecc7OBMvl3Mf4wI1rKrSCUdw4kW07KIuZ0=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "5327de38599220609e99ade12ba53f769bd2fc6f",
"rev": "78f473731e818ae6e4e4cd4f34426855afab735e",
"type": "github"
},
"original": {
@@ -985,11 +985,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1722062969,
"narHash": "sha256-QOS0ykELUmPbrrUGmegAUlpmUFznDQeR4q7rFhl8eQg=",
"lastModified": 1722185531,
"narHash": "sha256-veKR07psFoJjINLC8RK4DiLniGGMgF3QMlS4tb74S6k=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b73c2221a46c13557b1b3be9c2070cc42cf01eb3",
"rev": "52ec9ac3b12395ad677e8b62106f0b98c1f8569d",
"type": "github"
},
"original": {
@@ -1078,11 +1078,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1722431209,
"narHash": "sha256-qBxvnoQuzhCHTej5JMw1EpjavufRgpMNP9klpO7mbI4=",
"lastModified": 1722492816,
"narHash": "sha256-aZe7oSm/+GM1whS6bxZy+DJgbcy8rDIkygBA0owCvmU=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "8945b3b5e336a42972448e2f07ed5bc465a40c83",
"rev": "820f8d58eafd7121989fea3ae9e71f29699d856b",
"type": "github"
},
"original": {
@@ -1315,11 +1315,11 @@
]
},
"locked": {
"lastModified": 1721769617,
"narHash": "sha256-6Pqa0bi5nV74IZcENKYRToRNM5obo1EQ+3ihtunJ014=",
"lastModified": 1722330636,
"narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "8db8970be1fb8be9c845af7ebec53b699fe7e009",
"rev": "768acdb06968e53aa1ee8de207fd955335c754b7",
"type": "github"
},
"original": {

View File

@@ -6,7 +6,7 @@
systems = ["x86_64-linux"];
imports = [
./home/users
./home
./nixos/hosts
./nixos/pkgs
# ./pre-commit-hooks.nix

View File

@@ -11,7 +11,7 @@
./tui/alacritty
./tui/foot
./tui/neovim
./tui/wezterm
# ./tui/wezterm
./tui/yazi
./services/copyq

View File

@@ -6,8 +6,10 @@
home = {
packages = [pkgs.glib]; # gsettings
pointerCursor = {
package = pkgs.catppuccin-cursors.latteDark;
name = "catppuccin-latte-dark-cursors";
# package = pkgs.catppuccin-cursors.latteDark;
# name = "catppuccin-latte-dark-cursors";
package = pkgs.adwaita-icon-theme;
name = "Adwaita";
size = 28;
gtk.enable = true;
x11.enable = true;
@@ -20,16 +22,18 @@
name = "Orchis-Grey-Dark-Compact";
};
iconTheme = {
package = pkgs.gruvbox-plus-icons;
name = "Gruvbox-Plus-Dark";
package = pkgs.adwaita-icon-theme;
name = "Adwaita";
};
font = {
name = "Input Sans Narrow Light";
size = 10;
};
cursorTheme = {
package = pkgs.catppuccin-cursors.latteDark;
name = "catppuccin-latte-dark-cursors";
# package = pkgs.catppuccin-cursors.latteDark;
# name = "catppuccin-latte-dark-cursors";
package = pkgs.adwaita-icon-theme;
name = "Adwaita";
size = 28;
};

View File

@@ -2,23 +2,43 @@
pkgs,
inputs,
...
}: {
}: let
enable_wayland = "true";
# weztermPkg = pkgs.wezterm;
weztermFlake = inputs.wezterm.packages.${pkgs.system}.default;
in {
programs.wezterm = {
enable = true;
package = inputs.wezterm.packages.${pkgs.system}.default;
package = weztermFlake;
extraConfig = ''
return {
font = wezterm.font("Input Mono Compressed"),
font_size = 12,
check_for_updates = false,
color_scheme = 'Gruvbox Material (Gogh)',
default_cursor_style = 'SteadyBar',
enable_scroll_bar = true,
hide_tab_bar_if_only_one_tab = true,
scrollback_lines = 10000,
window_background_opacity = 0.9,
}
local wezterm = require 'wezterm';
local config = {
-- font = wezterm.font("Input Mono Compressed"),
font_size = 12,
check_for_updates = false,
color_scheme = 'Gruvbox Material (Gogh)',
default_cursor_style = 'SteadyBar',
enable_scroll_bar = true,
hide_tab_bar_if_only_one_tab = true,
scrollback_lines = 10000,
window_background_opacity = 0.9,
}
if wezterm.target_triple == "x86_64-pc-windows-msvc" then
config.default_prog = { "powershell.exe" }
else
config.enable_wayland = ${enable_wayland}
-- config.window_decorations = "TITLE"
config.window_close_confirmation = "NeverPrompt"
-- config.freetype_load_target = "Light"
-- config.freetype_render_target = "HorizontalLcd"
local f = wezterm.font_with_fallback({
{family="Input Mono Compressed", weight="Light"},
{family="Input Sans Narrow", weight="Light"},
})
config.font = f;
end
return config
'';
};
}

View File

@@ -0,0 +1,25 @@
{
pkgs,
inputs,
...
}: {
programs.wezterm = {
enable = true;
package = inputs.wezterm.packages.${pkgs.system}.default;
extraConfig = ''
return {
enable_wayland = true,
font = wezterm.font("Input Mono Compressed"),
font_size = 12,
check_for_updates = false,
color_scheme = 'Gruvbox Material (Gogh)',
default_cursor_style = 'SteadyBar',
enable_scroll_bar = true,
hide_tab_bar_if_only_one_tab = true,
scrollback_lines = 10000,
window_background_opacity = 0.9,
}
'';
};
}

View File

@@ -8,16 +8,25 @@
homeImports = {
"cnst@cnix" = [
../core
./cnst
./core/gui/hypr/cnst.nix
./core/tui/git/cnst.nix
./core/tui/shell/cnst.nix
./core
./users/cnst
];
"adam@adampad" = [
../core
./adam
./core/gui/hypr/cnst.nix
./core/tui/git/cnst.nix
./core/tui/shell/cnst.nix
./core
./users/adam
];
"toothpick@toothpc" = [
../core
./toothpick
./core/gui/hypr/toothpick.nix
./core/tui/git/toothpick.nix
./core/tui/shell/toothpick.nix
./core
./users/toothpick
];
};

View File

@@ -1,14 +1,4 @@
{pkgs, ...}: {
imports = [
# core.gui
# ../../core/gui/ags
../../core/gui/hypr/cnst.nix
# core.tui
../../core/tui/git/cnst.nix
../../core/tui/shell/cnst.nix
# core.services
# ../../core/services/power-monitor
];
home = {
username = "cnst";
homeDirectory = "/home/cnst";

View File

@@ -0,0 +1,11 @@
{
environment.variables.FLAKE = "/home/adam/.nix-config";
programs = {
nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/adam/.nix-config";
};
};
}

View File

@@ -14,12 +14,13 @@ let
./services/power
./services/samba
./services/udisks
./services/fwupd
];
laptop =
adampad =
shared
++ [
./services/fwupd
./core/system/adampad-nh.nix
];
cnix =
shared
@@ -32,5 +33,5 @@ let
./core/system/toothpc-nh.nix
];
in {
inherit shared laptop cnix toothpc;
inherit shared adampad cnix toothpc;
}

View File

@@ -34,13 +34,15 @@ in {
./hardware-configuration.nix
];
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos;
boot.kernelParams = [
"amd_pstate=active"
"quiet"
"splash"
];
boot = {
consoleLogLevel = 3;
kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos;
kernelParams = [
"amd_pstate=active"
"quiet"
"splash"
];
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = lib.mkDefault "23.11";

View File

@@ -4,22 +4,26 @@
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = ["amdgpu"];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
boot = {
initrd = {
availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
kernelModules = ["amdgpu"];
};
kernelModules = ["kvm-amd"];
extraModulePackages = [];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/de372c64-89a2-4bbe-ad57-926cdd98e97d";

View File

@@ -10,7 +10,7 @@
mod = "${self}/nixos";
# get the basic config to build on top of
inherit (import "${self}/nixos") laptop cnix toothpc;
inherit (import "${self}/nixos") adampad cnix toothpc;
# get these into the module system
specialArgs = {inherit inputs self;};
@@ -49,7 +49,6 @@
toothpc
++ [
./toothpc
"${mod}/core"
"${mod}/core/lanzaboote.nix"
"${mod}/core/network/toothpc.nix"
@@ -58,8 +57,6 @@
"${mod}/services/xserver/toothpc.nix"
"${mod}/extra/gaming.nix"
"${mod}/extra/android"
"${mod}/extra/workstation"
{
home-manager = {
users.toothpick.imports = homeImports."toothpick@toothpc";
@@ -74,10 +71,9 @@
adampad = nixosSystem {
inherit specialArgs;
modules =
laptop
adampad
++ [
./adampad
"${mod}/core"
"${mod}/core/network/adampad.nix"
"${mod}/hardware/adampad.nix"

View File

@@ -1,10 +1,7 @@
{
inputs,
outputs,
lib,
config,
pkgs,
system,
...
}: let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
@@ -33,54 +30,20 @@ in {
];
};
programs.dconf.enable = true;
imports = [
inputs.home-manager.nixosModules.home-manager
./imports.nix
./system.nix
./hardware-configuration.nix
];
home-manager.users.toothpick = import ../../../home/users/toothpick/home.nix;
nix = let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in {
settings = {
auto-optimise-store = lib.mkDefault true;
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;
};
# Bootloader
boot.loader = {
systemd-boot.enable = lib.mkForce false;
efi.canTouchEfiVariables = true;
};
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
environment.sessionVariables = {
FLAKE = "/home/toothpick/.nix-config";
boot = {
blacklistedKernelModules = ["ucsi_ccg"];
consoleLogLevel = 3;
kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos;
kernelParams = [
"quiet"
"splash"
];
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "24.05";
system.stateVersion = lib.mkDefault "23.11";
}

View File

@@ -20,15 +20,9 @@
"usb_storage"
"sd_mod"
];
kernelModules = [];
kernelModules = ["nvidia"];
};
kernelModules = ["kvm-intel"];
kernelPackages = pkgs.linuxPackages_zen;
consoleLogLevel = 3;
kernelParams = [
"quiet"
"splash"
];
extraModulePackages = [];
};

View File

@@ -1,120 +0,0 @@
{pkgs, ...}: {
imports = [
# core
../../core/fonts.nix
../../core/hyprland.nix
../../core/zsh.nix
../../core/network/toothpc.nix
# hardware
../../hardware/toothpc.nix
# locale
../../locale
# services
#../../services/blueman
../../services/dbus
../../services/gnome-keyring
../../services/greetd
../../services/gvfs
../../services/mullvad
../../services/openssh
../../services/audio
../../services/udisks
../../services/xserver/toothpc.nix
../../services/locate
../../services/samba
# extra
../../extra/gaming.nix
../../extra/android
#../../extra/workstation
#../../extra/nix-ld
];
environment = {
systemPackages = with pkgs; [
# Core
fd
git
niv
nix-output-monitor
nvd
sbctl
python312Packages.nvidia-ml-py
# Util
samba4Full
anyrun
curl
fzf
gnome-disk-utility
lazygit
ntfs3g
p7zip
ripgrep
stow
tmux
tmuxifier
tree-sitter
udiskie
unrar
unzip
wget
xdg-user-dirs
xdg-utils
# Dev
binutils
clang
clang-tools
cargo-edit
cargo-insta
cargo-nextest
gcc
gnumake
cmake
python3
python312Packages.httplib2
python312Packages.oauth2
gtk3
gtk4
# misc.language_servers
typescript-language-server
typescript
nixd
nil
statix
hyprlang
alejandra
nixpkgs-fmt
pyright
isort
rustfmt
rust-analyzer
clippy
lua-language-server
stylua
nodePackages_latest.nodejs
nodePackages.prettier
prettierd
black
vimPlugins.nvim-treesitter-parsers.typescript
# ags_dependencies
bash
coreutils
dart-sass
gawk
imagemagick
procps
util-linux
gnome.gnome-control-center
mission-center
overskride
wlogout
];
};
}

View File

@@ -1,41 +0,0 @@
{
inputs,
outputs,
...
}: {
programs = {
nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/toothpick/.nix-config";
};
};
security = {
rtkit.enable = true;
pam.services.hyprlock = {};
};
environment.localBinInPath = true;
console.useXkbConfig = true;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs outputs;
};
};
nixpkgs = {
overlays = [
(_: prev: {
python312 = prev.python312.override {packageOverrides = _: pysuper: {nose = pysuper.pynose;};};
})
];
config = {
allowUnfree = true;
input-fonts.acceptLicense = true;
};
};
}