Compare commits
7 Commits
58b5e233b9
...
223545ba1d
Author | SHA1 | Date | |
---|---|---|---|
223545ba1d | |||
7a992161a0 | |||
0825b293a1 | |||
f47ab5481a | |||
0b0d93cf41 | |||
b50fce54a7 | |||
830b76bcb6 |
19
README.md
19
README.md
@ -12,7 +12,7 @@ My NixOS configurations with dotfiles for my desktop
|
|||||||
| Shell | Fish |
|
| Shell | Fish |
|
||||||
| Prompt | Starship |
|
| Prompt | Starship |
|
||||||
| Theme | Catppuccin |
|
| Theme | Catppuccin |
|
||||||
| GPU | NVidia |
|
| GPU | Nvidia |
|
||||||
| Panel | Hyprpanel |
|
| Panel | Hyprpanel |
|
||||||
| Runner | Rofi |
|
| Runner | Rofi |
|
||||||
| Fetch | Fastfetch |
|
| Fetch | Fastfetch |
|
||||||
@ -21,12 +21,19 @@ Requires Nix-channel with [NixOS 24.11](https://nixos.org/)
|
|||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
Scripts will not run unless the necessary packages have been added to the path, either in a shell or by running nixos-rebuild
|
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
|
||||||
|
|
||||||
Format all .nix files
|
Format all .nix files
|
||||||
|
|
||||||
```Shell
|
```Shell
|
||||||
./fmt
|
just fmt
|
||||||
```
|
```
|
||||||
|
|
||||||
Rebuild and test Nix configuration
|
Rebuild and test Nix configuration
|
||||||
@ -34,7 +41,7 @@ Rebuild and test Nix configuration
|
|||||||
- Will add all new files to git and format all nix-files
|
- Will add all new files to git and format all nix-files
|
||||||
|
|
||||||
```Shell
|
```Shell
|
||||||
./test
|
just test
|
||||||
```
|
```
|
||||||
|
|
||||||
Rebuild and switch Nix configuration
|
Rebuild and switch Nix configuration
|
||||||
@ -42,7 +49,7 @@ Rebuild and switch Nix configuration
|
|||||||
- Will add all new files to git and format all nix-files
|
- Will add all new files to git and format all nix-files
|
||||||
|
|
||||||
```Shell
|
```Shell
|
||||||
./rebuild
|
just switch
|
||||||
```
|
```
|
||||||
|
|
||||||
Update and switch
|
Update and switch
|
||||||
@ -50,5 +57,5 @@ Update and switch
|
|||||||
- Will update the flakes and nix-channel, then switch if there are no errors
|
- Will update the flakes and nix-channel, then switch if there are no errors
|
||||||
|
|
||||||
```Shell
|
```Shell
|
||||||
./update
|
just update
|
||||||
```
|
```
|
||||||
|
@ -20,7 +20,8 @@ rec {
|
|||||||
options = "grp:alt_shift_toggle"; # Toggle using ALT + SHIFT
|
options = "grp:alt_shift_toggle"; # Toggle using ALT + SHIFT
|
||||||
};
|
};
|
||||||
|
|
||||||
monitor1 = ""; # Empty matches all
|
# Empty matches all
|
||||||
|
monitor1 = "";
|
||||||
|
|
||||||
username = "martin";
|
username = "martin";
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ in
|
|||||||
vdhcoapp
|
vdhcoapp
|
||||||
fortune
|
fortune
|
||||||
cowsay
|
cowsay
|
||||||
inputs.zen-browser.packages."${system}".default # beta
|
inputs.zen-browser.packages.${system}.default # beta
|
||||||
onlyoffice-desktopeditors
|
onlyoffice-desktopeditors
|
||||||
];
|
];
|
||||||
|
|
||||||
|
16
flake.nix
16
flake.nix
@ -37,17 +37,25 @@
|
|||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
hostname = "thinkpad";
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
common = import ./common.nix;
|
common = import ./common.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
defaultPackages.${system} = home-manager.defaultPackage.${system};
|
defaultPackages.${system} = home-manager.defaultPackage.${system};
|
||||||
|
|
||||||
# Adds the nix fmt command to format nix files
|
# The minimum amount of dependencies in order to run 'just switch-now'
|
||||||
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
just
|
||||||
|
nh
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem {
|
# Adds the nix fmt command to format nix files
|
||||||
|
formatter.${system} = pkgs.nixfmt-rfc-style;
|
||||||
|
|
||||||
|
nixosConfigurations.${common.hostname} = nixpkgs.lib.nixosSystem {
|
||||||
system = system;
|
system = system;
|
||||||
specialArgs = { inherit outputs inputs; }; # Pass args to modules
|
specialArgs = { inherit outputs inputs; }; # Pass args to modules
|
||||||
modules = [
|
modules = [
|
||||||
|
5
fmt
5
fmt
@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
# Format all files matched by treefmt.toml
|
|
||||||
|
|
||||||
treefmt --on-unmatched info
|
|
@ -6,6 +6,7 @@
|
|||||||
let
|
let
|
||||||
browser = "zen.desktop";
|
browser = "zen.desktop";
|
||||||
imageViewer = "org.gnome.Loupe.desktop";
|
imageViewer = "org.gnome.Loupe.desktop";
|
||||||
|
pdfReader = "org.gnome.Papers.desktop";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"text/html" = browser;
|
"text/html" = browser;
|
||||||
@ -17,6 +18,7 @@
|
|||||||
"image/jpeg" = imageViewer;
|
"image/jpeg" = imageViewer;
|
||||||
"image/png" = imageViewer;
|
"image/png" = imageViewer;
|
||||||
"image/gif" = imageViewer;
|
"image/gif" = imageViewer;
|
||||||
|
"application/pdf" = pdfReader;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
userEmail = "git@martials.no";
|
userEmail = "git@martials.no";
|
||||||
|
|
||||||
aliases = {
|
aliases = {
|
||||||
|
amend = "commit --amend";
|
||||||
cm = "commit";
|
cm = "commit";
|
||||||
s = "status";
|
s = "status";
|
||||||
};
|
};
|
||||||
|
@ -7,9 +7,11 @@
|
|||||||
extensions = [
|
extensions = [
|
||||||
"html"
|
"html"
|
||||||
"catppuccin"
|
"catppuccin"
|
||||||
|
"catppuccin-icons"
|
||||||
"toml"
|
"toml"
|
||||||
"nix"
|
"nix"
|
||||||
"git_firefly"
|
"git-firefly"
|
||||||
|
"just"
|
||||||
];
|
];
|
||||||
userSettings =
|
userSettings =
|
||||||
let
|
let
|
||||||
@ -20,10 +22,15 @@
|
|||||||
{
|
{
|
||||||
autosave = "on_focus_change";
|
autosave = "on_focus_change";
|
||||||
base_keymap = "JetBrains";
|
base_keymap = "JetBrains";
|
||||||
ui_font_family = font;
|
|
||||||
buffer_font_family = font;
|
buffer_font_family = font;
|
||||||
|
icon-theme = "Catppuccin Mocha"; # TODO doesn't work?
|
||||||
|
ui_font_family = font;
|
||||||
ui_font_size = fontSize;
|
ui_font_size = fontSize;
|
||||||
buffer_font_size = fontSize;
|
buffer_font_size = fontSize;
|
||||||
|
tabs = {
|
||||||
|
file_icons = true;
|
||||||
|
git_status = true;
|
||||||
|
};
|
||||||
theme = {
|
theme = {
|
||||||
mode = theme.mode;
|
mode = theme.mode;
|
||||||
light = "Catppuccin Latte";
|
light = "Catppuccin Latte";
|
||||||
|
@ -5,7 +5,6 @@ let
|
|||||||
suspendAfter = 7200;
|
suspendAfter = 7200;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
wayland.windowManager.hyprland.settings.exec-once = [ "hypridle" ];
|
|
||||||
services.hypridle = {
|
services.hypridle = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@ -35,4 +34,5 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
wayland.windowManager.hyprland.settings.exec-once = [ "hypridle" ];
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
let
|
let
|
||||||
common = import ../../common.nix;
|
common = import ../../common.nix;
|
||||||
app = common.default;
|
|
||||||
theme = import ../../theme.nix;
|
theme = import ../../theme.nix;
|
||||||
|
app = common.default;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
|
24
justfile
Normal file
24
justfile
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
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
|
@ -1,3 +1,6 @@
|
|||||||
{
|
{
|
||||||
services.upower.enable = true;
|
services = {
|
||||||
|
upower.enable = true;
|
||||||
|
power-profiles-daemon.enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
rustup
|
rustup
|
||||||
nodejs_22
|
nodejs_22
|
||||||
pnpm
|
pnpm
|
||||||
|
just
|
||||||
gcc # Required for C, Rust and others
|
gcc # Required for C, Rust and others
|
||||||
# Language servers
|
# Language servers
|
||||||
nixd
|
nixd
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
gnome-calculator
|
gnome-calculator
|
||||||
gnome-disk-utility
|
gnome-disk-utility
|
||||||
gnome-clocks
|
gnome-clocks
|
||||||
|
papers # PDFReader
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.dconf.enable = true; # Required for some gnome applications
|
programs.dconf.enable = true; # Required for some gnome applications
|
||||||
|
@ -7,7 +7,9 @@
|
|||||||
hyprpolkitagent # Auth deamon providing modals for password auth
|
hyprpolkitagent # Auth deamon providing modals for password auth
|
||||||
hyprshot # Screenshots
|
hyprshot # Screenshots
|
||||||
hyprsunset # Blue light filter
|
hyprsunset # Blue light filter
|
||||||
# unstable.hyprsysteminfo TODO requires flake update
|
unstable.hyprsysteminfo
|
||||||
|
unstable.hyprland-qtutils
|
||||||
|
unstable.hyprland-qt-support
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
9
switch
9
switch
@ -1,9 +0,0 @@
|
|||||||
#!/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
6
test
@ -1,6 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
# Rebuild and switch the environment if successful
|
|
||||||
git add .
|
|
||||||
./fmt
|
|
||||||
nh os test . "$@"
|
|
Loading…
x
Reference in New Issue
Block a user