Compare commits

5 Commits

Author SHA1 Message Date
Sparky
7867cb1809 Move root from /home/root to /root
idiot!
2025-10-29 12:53:09 +01:00
Sparky
b25ab16bd7 Hallucinate some kinda flake business 2025-10-29 12:52:59 +01:00
Sparky
02b5b0779c Try and force no hibernate no sleep 2025-10-29 12:42:59 +01:00
Sparky
0100a58cf1 Sort packages 2025-10-29 12:41:33 +01:00
Sparky
053e998ea1 Have cursor remove the grub config
Now it works??
2025-10-28 20:39:17 +01:00
3 changed files with 60 additions and 24 deletions

View File

@@ -2,11 +2,11 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running 'nixos-help').
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, inputs, ... }:
with lib;
let
unstable = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz") { config = { allowUnfree = true; }; };
unstable = import inputs.nixpkgs-unstable { inherit (config.nixpkgs) config; };
in
{
@@ -19,16 +19,8 @@ in
kernelPackages = mkDefault pkgs.linuxPackages_latest;
loader = {
efi.canTouchEfiVariables = mkDefault true;
grub = {
enable = mkDefault true;
default = mkDefault "saved";
device = mkDefault "nodev";
extraEntries = mkDefault "GRUB_SAVEDEFAULT=true";
efiSupport = mkDefault true;
useOSProber = mkDefault true;
theme = mkDefault "${pkgs.kdePackages.breeze-grub}/grub/themes/breeze";
};
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
supportedFilesystems = mkDefault [ "ntfs" ];
};
@@ -190,6 +182,25 @@ in
openFirewall = true;
};
systemd.sleep.extraConfig = ''
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
'';
services.logind = {
lidSwitch = "ignore";
lidSwitchExternalPower = "ignore";
extraConfig = ''
HandlePowerKey=ignore
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
'';
};
programs.firefox.enable = true;
programs.steam.enable = true;
@@ -199,19 +210,20 @@ in
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim
git
lazygit
lazydocker
tmux
nixfmt-rfc-style
btop
nodejs_20
uv
code-cursor
unstable.cursor-cli
deskflow
docker
docker-compose
git
lazydocker
lazygit
nixfmt-rfc-style
nodejs_20
tmux
unstable.cursor-cli
uv
vim
];
# Some programs need SUID wrappers, can be configured further or are
@@ -245,4 +257,7 @@ in
# 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 = "25.05"; # Did you read the comment?
# Enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
}

18
flake.nix Normal file
View File

@@ -0,0 +1,18 @@
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = { self, nixpkgs, nixpkgs-unstable, ... }@inputs: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./configuration.nix
];
};
};
}

View File

@@ -1,12 +1,12 @@
- source: lazygit
target: /home/root/.config/lazygit
target: /root/.config/lazygit
delete: true
- source: lazygit
target: /home/dave/.config/lazygit
delete: true
- source: .tmux.conf
target: /home/root/.tmux.conf
target: /root/.tmux.conf
delete: true
- source: .tmux.conf
target: /home/dave/.tmux.conf
@@ -15,12 +15,15 @@
- source: configuration.nix
target: /etc/nixos/configuration.nix
delete: true
- source: flake.nix
target: /etc/nixos/flake.nix
delete: true
- source: sparky.gitconfig
target: /home/dave/.gitconfig
delete: true
- source: sparky.gitconfig
target: /home/root/.gitconfig
target: /root/.gitconfig
delete: true
- source: prometheus.yml