Compare commits

..

7 Commits

8 changed files with 383 additions and 327 deletions

View File

@@ -1,6 +1,10 @@
{ config, pkgs, lib, inputs, ... }:
{
config,
pkgs,
lib,
inputs,
...
}: {
# Bootloader.
boot.loader.systemd-boot = {
enable = true;
@@ -55,7 +59,7 @@
services.xserver.enable = true;
services.displayManager.sddm = {
enable = true;
extraPackages = [ pkgs.kdePackages.sddm-kcm ];
extraPackages = [pkgs.kdePackages.sddm-kcm];
wayland.enable = true;
enableHidpi = true;
};
@@ -140,7 +144,7 @@
};
# Enable Flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = ["nix-command" "flakes"];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
@@ -154,13 +158,13 @@
users.users.chase = {
isNormalUser = true;
description = "Chase";
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = ["networkmanager" "wheel"];
};
# Install firefox
programs.firefox = {
enable = true;
nativeMessagingHosts.packages = [ pkgs.firefoxpwa ];
nativeMessagingHosts.packages = [pkgs.firefoxpwa];
policies = {
DisableTelemetry = true;
DisableFirefoxAccounts = true;
@@ -194,7 +198,7 @@
colorscheme catppuccin-mocha
'';
packages.myVimPackage = with pkgs.vimPlugins; {
start = [ catppuccin-nvim ];
start = [catppuccin-nvim];
};
};
viAlias = true;
@@ -209,13 +213,21 @@
localNetworkGameTransfers.openFirewall = true;
};
# List packages installed in system profile. To search, run:
# $ nix search wget
# List packages installed in system profile.
environment.systemPackages = with pkgs; [
alejandra
bitwarden-cli
bitwarden-desktop
catppuccin-kde
(catppuccin-kde.override {
flavour = ["mocha"];
accents = [
"blue"
"lavender"
"pink"
"sapphire"
];
winDecStyles = ["classic"];
})
cifs-utils
firefoxpwa
flashrom
@@ -229,7 +241,7 @@
wget
];
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
# ssh agent
# programs.mtr.enable = true;
@@ -268,5 +280,4 @@
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
}

View File

@@ -21,12 +21,20 @@
};
};
outputs = { self, nixpkgs, catppuccin, nur, home-manager, plasma-manager, ... }@inputs: {
outputs = {
self,
nixpkgs,
catppuccin,
nur,
home-manager,
plasma-manager,
...
} @ inputs: {
# Please replace my-nixos with your hostname
nixosConfigurations = {
anzu = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
specialArgs = {inherit inputs;};
modules = [
# Import the previous configuration.nix we used,
# so the old configuration file still takes effect
@@ -41,7 +49,7 @@
{
home-manager.backupFileExtension = "backup";
home-manager.useGlobalPkgs = true;
home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
home-manager.sharedModules = [plasma-manager.homeManagerModules.plasma-manager];
home-manager.users.chase = {
imports = [
./home/home.nix
@@ -53,7 +61,7 @@
};
ichigo = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
specialArgs = {inherit inputs;};
modules = [
./configuration.nix
./hosts/ichigo/hardware-configuration.nix
@@ -63,7 +71,7 @@
{
home-manager.backupFileExtension = "backup";
home-manager.useGlobalPkgs = true;
home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
home-manager.sharedModules = [plasma-manager.homeManagerModules.plasma-manager];
home-manager.users.chase = {
imports = [
./home/home.nix

View File

@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
imports = [
./plasma.nix
];
@@ -113,7 +115,7 @@
programs.firefox = {
enable = true;
nativeMessagingHosts = [ pkgs.firefoxpwa ];
nativeMessagingHosts = [pkgs.firefoxpwa];
profiles = {
default = {
id = 0;
@@ -165,22 +167,30 @@
search = {
force = true;
default = "SearX";
order = [ "SearX" "google" ];
order = ["SearX" "google"];
engines = {
"Nix Packages" = {
urls = [{
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
}];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
definedAliases = ["@np"];
};
"SearX" = {
urls = [{ template = "https://searx.traphouse.cathoderaytube.net/?q={searchTerms}"; }];
definedAliases = [ "@searx" ];
urls = [{template = "https://searx.traphouse.cathoderaytube.net/?q={searchTerms}";}];
definedAliases = ["@searx"];
};
"bing".metaData.hidden = true;
};
@@ -334,7 +344,7 @@
services.mpd-discord-rpc = {
enable = true;
settings = {
hosts = [ "localhost:6600" ];
hosts = ["localhost:6600"];
format = {
details = "$track - $title [$duration]";
state = "$artist / $album ($date)";
@@ -347,5 +357,4 @@
enable = true;
mpd.useLocal = true;
};
}

View File

@@ -2,9 +2,9 @@
programs.plasma = {
enable = true;
shortcuts = {
"ActivityManager"."switch-to-activity-0fb1d4a1-96e6-4dfd-909a-04b78f1e3845" = [ ];
"KDE Keyboard Layout Switcher"."Switch keyboard layout to English (US)" = [ ];
"KDE Keyboard Layout Switcher"."Switch keyboard layout to Japanese" = [ ];
"ActivityManager"."switch-to-activity-0fb1d4a1-96e6-4dfd-909a-04b78f1e3845" = [];
"KDE Keyboard Layout Switcher"."Switch keyboard layout to English (US)" = [];
"KDE Keyboard Layout Switcher"."Switch keyboard layout to Japanese" = [];
"KDE Keyboard Layout Switcher"."Switch to Last-Used Keyboard Layout" = "Meta+Alt+L";
"KDE Keyboard Layout Switcher"."Switch to Next Keyboard Layout" = "Meta+Alt+K";
"kaccess"."Toggle Screen Reader On and Off" = "Meta+Alt+S";
@@ -28,24 +28,24 @@
"ksmserver"."Reboot Without Confirmation" = "none,,Reboot Without Confirmation";
"ksmserver"."Shut Down" = "none,,Shut Down";
"kwin"."Activate Window Demanding Attention" = "Meta+Ctrl+A";
"kwin"."Cycle Overview" = [ ];
"kwin"."Cycle Overview Opposite" = [ ];
"kwin"."Cycle Overview" = [];
"kwin"."Cycle Overview Opposite" = [];
"kwin"."Decrease Opacity" = "none,,Decrease Opacity of Active Window by 5%";
"kwin"."Edit Tiles" = "Meta+T";
"kwin"."Expose" = "Ctrl+F9";
"kwin"."ExposeAll" = ["Ctrl+F10" "Launch (C),Ctrl+F10" "Launch (C),Toggle Present Windows (All desktops)"];
"kwin"."ExposeClass" = "Ctrl+F7";
"kwin"."ExposeClassCurrentDesktop" = [ ];
"kwin"."ExposeClassCurrentDesktop" = [];
"kwin"."Grid View" = "Meta+G";
"kwin"."Increase Opacity" = "none,,Increase Opacity of Active Window by 5%";
"kwin"."Kill Window" = "Meta+Ctrl+Esc";
"kwin"."Move Tablet to Next Output" = [ ];
"kwin"."Move Tablet to Next Output" = [];
"kwin"."MoveMouseToCenter" = "Meta+F6";
"kwin"."MoveMouseToFocus" = "Meta+F5";
"kwin"."MoveZoomDown" = [ ];
"kwin"."MoveZoomLeft" = [ ];
"kwin"."MoveZoomRight" = [ ];
"kwin"."MoveZoomUp" = [ ];
"kwin"."MoveZoomDown" = [];
"kwin"."MoveZoomLeft" = [];
"kwin"."MoveZoomRight" = [];
"kwin"."MoveZoomUp" = [];
"kwin"."Overview" = "Meta+W";
"kwin"."Setup Window Shortcut" = "none,,Setup Window Shortcut";
"kwin"."Show Desktop" = "Meta+D";
@@ -93,7 +93,7 @@
"kwin"."Switch to Screen Below" = "none,,Switch to Screen Below";
"kwin"."Switch to Screen to the Left" = "none,,Switch to Screen to the Left";
"kwin"."Switch to Screen to the Right" = "none,,Switch to Screen to the Right";
"kwin"."Toggle Night Color" = [ ];
"kwin"."Toggle Night Color" = [];
"kwin"."Toggle Window Raise/Lower" = "none,,Toggle Window Raise/Lower";
"kwin"."Walk Through Windows" = "Alt+Tab";
"kwin"."Walk Through Windows (Reverse)" = "Alt+Shift+Tab";
@@ -203,7 +203,7 @@
"org_kde_powerdevil"."PowerOff" = "Power Off";
"org_kde_powerdevil"."Sleep" = "Sleep";
"org_kde_powerdevil"."Toggle Keyboard Backlight" = "Keyboard Light On/Off";
"org_kde_powerdevil"."Turn Off Screen" = [ ];
"org_kde_powerdevil"."Turn Off Screen" = [];
"org_kde_powerdevil"."powerProfile" = ["Battery" "Meta+B,Battery" "Meta+B,Switch Power Profile"];
"plasmashell"."activate application launcher" = ["Meta" "Alt+F1,Meta" "Alt+F1,Activate Application Launcher"];
"plasmashell"."activate task manager entry 1" = "Meta+1";

33
home/scripts/nixswitch Executable file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
#
# NixOS rebuild script
#
# original by 0atman: https://gist.github.com/0atman/1a5133b842f929ba4c1e195ee67599d5
set -e
pushd ~/nixos-config
if git diff --quiet; then
echo "No changes detected, exiting."
popd
exit 0
fi
alejandra . &>/dev/null \
|| ( alejandra . ; echo "formatting failed!" && exit 1)
git diff -U0
echo "NixOS rebuilding..."
sudo nixos-rebuild switch --flake . &>nixos-switch.log \
|| (cat nixos-switch.log | grep --color error && exit 1)
current=$(nixos-rebuild list-generations | grep current)
git commit -am "$current"
popd
notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env bash
cd ~/nixos-config
sudo nixos-rebuild switch --flake . &>nixos-switch.log || (cat nixos-switch.log | grep --color error && exit 1)
current=$(nixos-rebuild list-generations | grep current)
git commit -am "$current"
notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available

View File

@@ -1,8 +1,12 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
### this machine ###
@@ -16,24 +20,24 @@
# encrypted swap
boot.initrd.luks.devices."luks-9527937d-2d02-4feb-9a16-c9c417b33d0d".device = "/dev/disk/by-uuid/9527937d-2d02-4feb-9a16-c9c417b33d0d";
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/1518dbe1-8322-48d3-9fc9-cd0478ccbf43";
fileSystems."/" = {
device = "/dev/disk/by-uuid/1518dbe1-8322-48d3-9fc9-cd0478ccbf43";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/1FCD-5A26";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/1FCD-5A26";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
options = ["fmask=0077" "dmask=0077"];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/dd48a14e-2c90-465b-81a3-661d31ebf39f"; }
swapDevices = [
{device = "/dev/disk/by-uuid/dd48a14e-2c90-465b-81a3-661d31ebf39f";}
];
# Mount SMB share
@@ -42,7 +46,6 @@
fsType = "cifs";
options = let
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
};

View File

@@ -1,23 +1,27 @@
# 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, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
### this machine ###
networking.hostName = "ichigo";
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
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/d248b616-bdb7-463d-94a6-9718de8dc85a";
fileSystems."/" = {
device = "/dev/disk/by-uuid/d248b616-bdb7-463d-94a6-9718de8dc85a";
fsType = "ext4";
};
@@ -25,14 +29,14 @@
boot.initrd.luks.devices."luks-877310a4-b495-4060-9ee6-e7a841862f22".device = "/dev/disk/by-uuid/877310a4-b495-4060-9ee6-e7a841862f22";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/AA5A-18AD";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/AA5A-18AD";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
options = ["fmask=0077" "dmask=0077"];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/752114b2-c304-4670-aba8-7288954605bc"; }
swapDevices = [
{device = "/dev/disk/by-uuid/752114b2-c304-4670-aba8-7288954605bc";}
];
# Mount SMB share
@@ -41,7 +45,6 @@
fsType = "cifs";
options = let
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
};