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. # Bootloader.
boot.loader.systemd-boot = { boot.loader.systemd-boot = {
enable = true; enable = true;
@@ -209,13 +213,21 @@
localNetworkGameTransfers.openFirewall = true; localNetworkGameTransfers.openFirewall = true;
}; };
# List packages installed in system profile. To search, run: # List packages installed in system profile.
# $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
alejandra alejandra
bitwarden-cli bitwarden-cli
bitwarden-desktop bitwarden-desktop
catppuccin-kde (catppuccin-kde.override {
flavour = ["mocha"];
accents = [
"blue"
"lavender"
"pink"
"sapphire"
];
winDecStyles = ["classic"];
})
cifs-utils cifs-utils
firefoxpwa firefoxpwa
flashrom flashrom
@@ -268,5 +280,4 @@
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment? system.stateVersion = "24.11"; # Did you read the comment?
} }

View File

@@ -21,7 +21,15 @@
}; };
}; };
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 # Please replace my-nixos with your hostname
nixosConfigurations = { nixosConfigurations = {
anzu = nixpkgs.lib.nixosSystem { anzu = nixpkgs.lib.nixosSystem {

View File

@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
imports = [ imports = [
./plasma.nix ./plasma.nix
]; ];
@@ -168,13 +170,21 @@
order = ["SearX" "google"]; order = ["SearX" "google"];
engines = { engines = {
"Nix Packages" = { "Nix Packages" = {
urls = [{ urls = [
{
template = "https://search.nixos.org/packages"; template = "https://search.nixos.org/packages";
params = [ 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"; icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@np"]; definedAliases = ["@np"];
}; };
@@ -347,5 +357,4 @@
enable = true; enable = true;
mpd.useLocal = true; mpd.useLocal = true;
}; };
} }

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 = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
### this machine ### ### this machine ###
@@ -21,19 +25,19 @@
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/1518dbe1-8322-48d3-9fc9-cd0478ccbf43"; device = "/dev/disk/by-uuid/1518dbe1-8322-48d3-9fc9-cd0478ccbf43";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/1FCD-5A26"; device = "/dev/disk/by-uuid/1FCD-5A26";
fsType = "vfat"; fsType = "vfat";
options = ["fmask=0077" "dmask=0077"]; options = ["fmask=0077" "dmask=0077"];
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-uuid/dd48a14e-2c90-465b-81a3-661d31ebf39f"; } {device = "/dev/disk/by-uuid/dd48a14e-2c90-465b-81a3-661d31ebf39f";}
]; ];
# Mount SMB share # Mount SMB share
@@ -42,7 +46,6 @@
fsType = "cifs"; fsType = "cifs";
options = let 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"; 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"]; in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
}; };

View File

@@ -1,11 +1,15 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
### this machine ### ### this machine ###
@@ -16,8 +20,8 @@
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/d248b616-bdb7-463d-94a6-9718de8dc85a"; device = "/dev/disk/by-uuid/d248b616-bdb7-463d-94a6-9718de8dc85a";
fsType = "ext4"; 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"; boot.initrd.luks.devices."luks-877310a4-b495-4060-9ee6-e7a841862f22".device = "/dev/disk/by-uuid/877310a4-b495-4060-9ee6-e7a841862f22";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/AA5A-18AD"; device = "/dev/disk/by-uuid/AA5A-18AD";
fsType = "vfat"; fsType = "vfat";
options = ["fmask=0077" "dmask=0077"]; options = ["fmask=0077" "dmask=0077"];
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-uuid/752114b2-c304-4670-aba8-7288954605bc"; } {device = "/dev/disk/by-uuid/752114b2-c304-4670-aba8-7288954605bc";}
]; ];
# Mount SMB share # Mount SMB share
@@ -41,7 +45,6 @@
fsType = "cifs"; fsType = "cifs";
options = let 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"; 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"]; in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
}; };