Compare commits

..

No commits in common. "223545ba1d154fd7ed0bce13ac48f3c0c0246b17" and "58b5e233b9e3d4c7d8f89cf7f3fe791186e69353" have entirely different histories.

18 changed files with 43 additions and 74 deletions

View File

@ -12,7 +12,7 @@ My NixOS configurations with dotfiles for my desktop
| Shell | Fish |
| Prompt | Starship |
| Theme | Catppuccin |
| GPU | Nvidia |
| GPU | NVidia |
| Panel | Hyprpanel |
| Runner | Rofi |
| Fetch | Fastfetch |
@ -21,19 +21,12 @@ Requires Nix-channel with [NixOS 24.11](https://nixos.org/)
## Commands
First time run, will create a shell with the minimum dependencies in order to download the rest
```Shell
nix develop . --experimental-features 'nix-command flakes'
just switch-now
```
Scripts below will not run unless the necessary packages have been added to the path, either in a shell or by running nixos-rebuild
Scripts will not run unless the necessary packages have been added to the path, either in a shell or by running nixos-rebuild
Format all .nix files
```Shell
just fmt
./fmt
```
Rebuild and test Nix configuration
@ -41,7 +34,7 @@ Rebuild and test Nix configuration
- Will add all new files to git and format all nix-files
```Shell
just test
./test
```
Rebuild and switch Nix configuration
@ -49,7 +42,7 @@ Rebuild and switch Nix configuration
- Will add all new files to git and format all nix-files
```Shell
just switch
./rebuild
```
Update and switch
@ -57,5 +50,5 @@ Update and switch
- Will update the flakes and nix-channel, then switch if there are no errors
```Shell
just update
./update
```

View File

@ -20,8 +20,7 @@ rec {
options = "grp:alt_shift_toggle"; # Toggle using ALT + SHIFT
};
# Empty matches all
monitor1 = "";
monitor1 = ""; # Empty matches all
username = "martin";

View File

@ -54,7 +54,7 @@ in
vdhcoapp
fortune
cowsay
inputs.zen-browser.packages.${system}.default # beta
inputs.zen-browser.packages."${system}".default # beta
onlyoffice-desktopeditors
];

View File

@ -37,25 +37,17 @@
}:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
hostname = "thinkpad";
inherit (self) outputs;
common = import ./common.nix;
in
{
defaultPackages.${system} = home-manager.defaultPackage.${system};
# The minimum amount of dependencies in order to run 'just switch-now'
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
just
nh
];
};
# Adds the nix fmt command to format nix files
formatter.${system} = pkgs.nixfmt-rfc-style;
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
nixosConfigurations.${common.hostname} = nixpkgs.lib.nixosSystem {
nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem {
system = system;
specialArgs = { inherit outputs inputs; }; # Pass args to modules
modules = [

5
fmt Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env sh
# Format all files matched by treefmt.toml
treefmt --on-unmatched info

View File

@ -6,7 +6,6 @@
let
browser = "zen.desktop";
imageViewer = "org.gnome.Loupe.desktop";
pdfReader = "org.gnome.Papers.desktop";
in
{
"text/html" = browser;
@ -18,7 +17,6 @@
"image/jpeg" = imageViewer;
"image/png" = imageViewer;
"image/gif" = imageViewer;
"application/pdf" = pdfReader;
};
};
}

View File

@ -5,7 +5,6 @@
userEmail = "git@martials.no";
aliases = {
amend = "commit --amend";
cm = "commit";
s = "status";
};

View File

@ -7,11 +7,9 @@
extensions = [
"html"
"catppuccin"
"catppuccin-icons"
"toml"
"nix"
"git-firefly"
"just"
"git_firefly"
];
userSettings =
let
@ -22,15 +20,10 @@
{
autosave = "on_focus_change";
base_keymap = "JetBrains";
buffer_font_family = font;
icon-theme = "Catppuccin Mocha"; # TODO doesn't work?
ui_font_family = font;
buffer_font_family = font;
ui_font_size = fontSize;
buffer_font_size = fontSize;
tabs = {
file_icons = true;
git_status = true;
};
theme = {
mode = theme.mode;
light = "Catppuccin Latte";

View File

@ -5,6 +5,7 @@ let
suspendAfter = 7200;
in
{
wayland.windowManager.hyprland.settings.exec-once = [ "hypridle" ];
services.hypridle = {
enable = true;
settings = {
@ -34,5 +35,4 @@ in
];
};
};
wayland.windowManager.hyprland.settings.exec-once = [ "hypridle" ];
}

View File

@ -1,8 +1,8 @@
{ lib, ... }:
let
common = import ../../common.nix;
theme = import ../../theme.nix;
app = common.default;
theme = import ../../theme.nix;
in
{
wayland.windowManager.hyprland.settings = {

View File

@ -1,24 +0,0 @@
default:
@just --list
fmt:
treefmt --on-unmatched info
test *FLAGS:
git add .
just fmt
nh os test . {{FLAGS}}
switch *FLAGS:
git add .
just fmt
nh os switch . {{FLAGS}}
switch-now *FLAGS:
nh os switch . {{FLAGS}}
update:
nix-channel --update
nix flake update
just switch

View File

@ -1,6 +1,3 @@
{
services = {
upower.enable = true;
power-profiles-daemon.enable = true;
};
services.upower.enable = true;
}

View File

@ -14,7 +14,6 @@
rustup
nodejs_22
pnpm
just
gcc # Required for C, Rust and others
# Language servers
nixd

View File

@ -15,7 +15,6 @@
gnome-calculator
gnome-disk-utility
gnome-clocks
papers # PDFReader
];
programs.dconf.enable = true; # Required for some gnome applications

View File

@ -7,9 +7,7 @@
hyprpolkitagent # Auth deamon providing modals for password auth
hyprshot # Screenshots
hyprsunset # Blue light filter
unstable.hyprsysteminfo
unstable.hyprland-qtutils
unstable.hyprland-qt-support
# unstable.hyprsysteminfo TODO requires flake update
];
programs = {

9
switch Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env sh
# Accepts all arguments to nh os switch
# For example --ask to prompt if the user want to switch configs
# Rebuild and switch the environment if successful
git add .
./fmt
nh os switch . "$@"

6
test Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env sh
# Rebuild and switch the environment if successful
git add .
./fmt
nh os test . "$@"

6
update Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env sh
nix-channel --update
nix flake update
./switch