Compare commits
7 Commits
54744cee49
...
8c4700ef14
Author | SHA1 | Date | |
---|---|---|---|
8c4700ef14 | |||
e691f57878 | |||
b60a833fe4 | |||
d880599c2d | |||
d2ee3bd961 | |||
5cadb58c81 | |||
e00a52d660 |
@@ -1,6 +1,10 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot = {
|
||||
enable = 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
|
||||
@@ -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?
|
||||
|
||||
}
|
||||
|
10
flake.nix
10
flake.nix
@@ -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
|
||||
nixosConfigurations = {
|
||||
anzu = nixpkgs.lib.nixosSystem {
|
||||
|
@@ -1,6 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./plasma.nix
|
||||
];
|
||||
@@ -168,13 +170,21 @@
|
||||
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"];
|
||||
};
|
||||
@@ -347,5 +357,4 @@
|
||||
enable = true;
|
||||
mpd.useLocal = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
33
home/scripts/nixswitch
Executable file
33
home/scripts/nixswitch
Executable 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
|
@@ -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
|
||||
|
@@ -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 ###
|
||||
@@ -21,19 +25,19 @@
|
||||
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"];
|
||||
};
|
||||
|
||||
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"];
|
||||
};
|
||||
|
||||
|
@@ -1,11 +1,15 @@
|
||||
# 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 ###
|
||||
@@ -16,8 +20,8 @@
|
||||
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"];
|
||||
};
|
||||
|
||||
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"];
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user