restructuring

This commit is contained in:
cnst
2024-06-23 13:18:58 +02:00
parent b2aec1af0d
commit cdf2b9771c
22 changed files with 300 additions and 893 deletions

309
flake.lock generated
View File

@@ -1,40 +1,19 @@
{ {
"nodes": { "nodes": {
"devshell": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixvim",
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1717408969,
"narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=",
"owner": "numtide",
"repo": "devshell",
"rev": "1ebbe68d57457c8cae98145410b164b5477761f4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57, "type": "github"
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "owner": "edolstra",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" "repo": "flake-compat",
"type": "github"
} }
}, },
"flake-compat_2": { "flake-compat_2": {
@@ -69,25 +48,12 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": [
"neovim-nightly-overlay",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1717285511, "lastModified": 1717285511,
@@ -106,41 +72,22 @@
"flake-parts_2": { "flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nixvim", "neovim-nightly-overlay",
"nixvim", "hercules-ci-effects",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1717285511, "lastModified": 1712014858,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "hercules-ci", "id": "flake-parts",
"repo": "flake-parts", "type": "indirect"
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
} }
}, },
"git-hooks": { "git-hooks": {
@@ -148,13 +95,11 @@
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"nixvim", "neovim-nightly-overlay",
"nixvim",
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": [ "nixpkgs-stable": [
"nixvim", "neovim-nightly-overlay",
"nixvim",
"nixpkgs" "nixpkgs"
] ]
}, },
@@ -175,8 +120,7 @@
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvim", "neovim-nightly-overlay",
"nixvim",
"git-hooks", "git-hooks",
"nixpkgs" "nixpkgs"
] ]
@@ -195,25 +139,25 @@
"type": "github" "type": "github"
} }
}, },
"gitignore_2": { "hercules-ci-effects": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [ "nixpkgs": [
"nixvim", "neovim-nightly-overlay",
"pre-commit-hooks",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1709087332, "lastModified": 1718018037,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "narHash": "sha256-03rLBd/lKecgaKz0j5ESUf9lDn5R0SJatZTKLL5unWE=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "gitignore.nix", "repo": "hercules-ci-effects",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "rev": "0ab08b23ce3c3f75fe9a5598756b6fb8bcf0b414",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "gitignore.nix", "repo": "hercules-ci-effects",
"type": "github" "type": "github"
} }
}, },
@@ -237,57 +181,54 @@
"type": "github" "type": "github"
} }
}, },
"home-manager_2": { "neovim-nightly-overlay": {
"inputs": { "inputs": {
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"git-hooks": "git-hooks",
"hercules-ci-effects": "hercules-ci-effects",
"neovim-src": "neovim-src",
"nixpkgs": [ "nixpkgs": [
"nixvim",
"nixvim",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1718788307, "lastModified": 1718935491,
"narHash": "sha256-SqiOz0sljM0GjyQEVinPXQxaGcbOXw5OgpCWGPgh/vo=", "narHash": "sha256-Dk+ZTVu3CuVv4UPbif3GmR7eT3zAE/mQ+3UUvFHknKE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "neovim-nightly-overlay",
"rev": "d7830d05421d0ced83a0f007900898bdcaf2a2ca", "rev": "cc2d148e283e05cce751c5cc50ce38bbc0589f61",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "neovim-nightly-overlay",
"type": "github" "type": "github"
} }
}, },
"nix-darwin": { "neovim-src": {
"inputs": { "flake": false,
"nixpkgs": [
"nixvim",
"nixvim",
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1718662658, "lastModified": 1718890629,
"narHash": "sha256-AKG7BsqtVWDlefgzyKz7vjaKTLi4+bmTSBhowbQoZtM=", "narHash": "sha256-TLJ8xTHKgnbsMnlmfQ7eF5+aafjo5PlFQFF3mkrIsBs=",
"owner": "lnl7", "owner": "neovim",
"repo": "nix-darwin", "repo": "neovim",
"rev": "29b3096a6e283d7e6779187244cb2a3942239fdf", "rev": "0e3e1e6b6d8370f1fcc9887d5cb931b131450a1c",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "lnl7", "owner": "neovim",
"repo": "nix-darwin", "repo": "neovim",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1718895438, "lastModified": 1719075281,
"narHash": "sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw+0Bwe5DLU=", "narHash": "sha256-CyyxvOwFf12I91PBWz43iGT1kjsf5oi6ax7CrvaMyAo=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d603719ec6e294f034936c0d0dc06f689d91b6c3", "rev": "a71e967ef3694799d0c418c98332f7ff4cc5f6af",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -297,18 +238,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"lastModified": 1717284937,
"narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1718835956, "lastModified": 1718835956,
@@ -325,110 +254,19 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1718447546,
"narHash": "sha256-JHuXsrC9pr4kA4n7LuuPfWFJUVlDBVJ1TXDVpHEuUgM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "842253bf992c3a7157b67600c2857193f126563a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"nixvim": "nixvim_2",
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1719085595,
"narHash": "sha256-Dvk+5eKgRwrTkx8FF6RceQP3+oEtQ+HYHNuM1MLtYcE=",
"owner": "cnsta",
"repo": "cnixvim",
"rev": "4a3f231c6e979b77ccdae4c6766e231b821a50b1",
"type": "github"
},
"original": {
"owner": "cnsta",
"repo": "cnixvim",
"type": "github"
}
},
"nixvim_2": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks",
"home-manager": "home-manager_2",
"nix-darwin": "nix-darwin",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1719042662,
"narHash": "sha256-xwj8hxu02myIPkNsch/v2NbxuRmuvlcphrbYPECE49c=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "49452662b7b4dd2467cbac19e0f9820d570d8976",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_3",
"gitignore": "gitignore_2",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1718879355,
"narHash": "sha256-RTyqP4fBX2MdhNuMP+fnR3lIwbdtXhyj7w7fwtvgspc=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "8cd35b9496d21a6c55164d8547d9d5280162b07a",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"neovim-nightly-overlay": "neovim-nightly-overlay",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"nixvim": "nixvim",
"solaar": "solaar", "solaar": "solaar",
"systems": "systems_2" "systems": "systems"
} }
}, },
"solaar": { "solaar": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_3",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@@ -447,21 +285,6 @@
} }
}, },
"systems": { "systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -473,28 +296,6 @@
"id": "systems", "id": "systems",
"type": "indirect" "type": "indirect"
} }
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1718522839,
"narHash": "sha256-ULzoKzEaBOiLRtjeY3YoGFJMwWSKRYOic6VNw2UyTls=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "68eb1dc333ce82d0ab0c0357363ea17c31ea1f81",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@@ -21,14 +21,16 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = { outputs =
{
self, self,
nixpkgs, nixpkgs,
home-manager, home-manager,
systems, systems,
solaar, solaar,
... ...
} @ inputs: let }@inputs:
let
inherit (self) outputs; inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib; lib = nixpkgs.lib // home-manager.lib;
forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system}); forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system});
@@ -39,12 +41,15 @@
config.allowUnfree = true; config.allowUnfree = true;
} }
); );
in { in
{
# NixOS configuration entrypoint # NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname' # Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = { nixosConfigurations = {
cnix = nixpkgs.lib.nixosSystem { cnix = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;}; specialArgs = {
inherit inputs outputs;
};
# > Our main nixos configuration file < # > Our main nixos configuration file <
modules = [ modules = [
solaar.nixosModules.default solaar.nixosModules.default

View File

@@ -0,0 +1,7 @@
{
programs.git = {
enable = true;
userName = "cnst";
userEmail = "cnst@cana.st";
};
}

View File

@@ -0,0 +1,18 @@
{ pkgs, ... }:
{
gtk = {
enable = true;
theme = {
package = pkgs.orchis-theme;
name = "Orchis-Grey-Dark-Compact";
};
iconTheme = {
package = pkgs.gruvbox-plus-icons;
name = "Gruvbox-Plus-Dark";
};
font = {
name = "FiraCode Nerd Font Light";
size = 11;
};
};
}

View File

@@ -6,10 +6,14 @@
config, config,
pkgs, pkgs,
... ...
}: { }:
{
# You can import other home-manager modules here # You can import other home-manager modules here
imports = [ imports = [
./neovim ./neovim
./git
./gtk
./shell
]; ];
nixpkgs = { nixpkgs = {
@@ -92,8 +96,19 @@
systemd.enable = true; systemd.enable = true;
}; };
xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk]; xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
config = {
common.default = [ "gtk" ];
hyprland.default = [
"gtk"
"hyprland"
];
};
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
home.sessionVariables = { home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1; MOZ_ENABLE_WAYLAND = 1;
NIXOS_OZONE_WL = 1; NIXOS_OZONE_WL = 1;
@@ -102,52 +117,8 @@
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
}; };
gtk = { programs.home-manager.enable = true;
enable = true;
theme = {
package = pkgs.orchis-theme;
name = "Orchis-Grey-Dark-Compact";
};
iconTheme = {
package = pkgs.gruvbox-plus-icons;
name = "Gruvbox-Plus-Dark";
};
font = {
name = "FiraCode Nerd Font Light";
size = 11;
};
};
programs = {
home-manager.enable = true;
git = {
enable = true;
userName = "cnst";
userEmail = "cnst@cana.st";
};
zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
nixconfig = "cd /home/cnst/.nix-config/";
ll = "ls -l";
nixupdate = "sudo nixos-rebuild switch --flake .#cnix";
flakeupdate = "nix flake update";
};
history = {
size = 10000;
path = "${config.xdg.dataHome}/zsh/history";
};
oh-my-zsh = {
enable = true;
plugins = ["git" "thefuck"];
theme = "robbyrussell";
};
};
};
# Nicely reload system units when changing configs # Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch"; systemd.user.startServices = "sd-switch";

View File

@@ -1,18 +0,0 @@
$lock_cmd = pidof hyprlock || hyprlock
$suspend_cmd = pidof steam || systemctl suspend || loginctl suspend # fuck nvidia
general {
lock_cmd = $lock_cmd
before_sleep_cmd = $lock_cmd
}
listener {
timeout = 900 # 15mins
on-timeout = $lock_cmd
}
listener {
timeout = 1200 # 20mins
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}

View File

@@ -1,112 +0,0 @@
# $text_color = rgba(F6DECEFF)
# $entry_background_color = rgba(1C110811)
# $entry_border_color = rgba(A48C7B55)
# $entry_color = rgba(DDC1AEFF)
$text_color = rgba(FFFFFFFF)
$entry_background_color = rgba(33333311)
$entry_border_color = rgba(3B3B3B55)
$entry_color = rgba(FFFFFFFF)
$font_family = JetBrains Mono
#$font_family_clock = DSEG14 Classic Mini
$font_family_clock = JetBrains Mono
# font_material_symbols = FontAwesome
background {
# color = rgba(170C04FF)
color = rgba(000000FF)
path = ~/Images/lockscreen.png
# path = screenshot
blur_size = 3
blur_passes = 2
}
input-field {
monitor =
size = 200, 50
outline_thickness = 2
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
outer_color = rgba(3B3B3B55)
inner_color = rgba(33333311)
font_color = rgba(FFFFFFFF)
fade_on_empty = true
fade_timeout = 5000 # Milliseconds before fade_on_empty is triggered.
placeholder_text = # Text rendered in the input box when it's empty.
hide_input = false
rounding = -1 # -1 means complete rounding (circle/oval)
check_color = rgb(204, 136, 34)
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
capslock_color = -1
numlock_color = -1
bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above)
invert_numlock = false # change color if numlock is off
swap_font_color = false # see below
position = 0, -20
halign = center
valign = center
shadow_passes =
shadow_size =
shadow_color = rgb(0,0,0)
shadow_boost =
}
label { # Clock
monitor =
text = cmd[update:1000] echo "$TIME"
shadow_passes = 1
shadow_boost = 0.5
color = $text_color
font_size = 85
font_family = $font_family_clock
position = 0, 300
halign = center
valign = center
}
label { # Date
monitor =
text = cmd[update:1000] echo "$(date -I)"
shadow_passes = 1
shadow_boost = 0.5
color = $text_color
font_size = 25
font_family = $font_family_clock
position = 0, 280
halign = center
valign = center
}
label { # "locked" text
monitor =
text = locked
shadow_passes = 1
shadow_boost = 0.5
color = $text_color
font_size = 14
font_family = $font_family
position = 0, 45
halign = center
valign = bottom
}
label { # Status
monitor =
text = cmd[update:5000] ~/.config/hypr/hyprlock/status.sh
shadow_passes = 1
shadow_boost = 0.5
color = $text_color
font_size = 14
font_family = $font_family
position = 30, 30
halign = left
valign = top
}

View File

@@ -1,29 +0,0 @@
#!/usr/bin/env bash
############ Variables ############
enable_battery=false
battery_charging=false
####### Check availability ########
for battery in /sys/class/power_supply/*BAT*; do
if [[ -f "$battery/uevent" ]]; then
enable_battery=true
if [[ $(cat /sys/class/power_supply/*/status | head -1) == "Charging" ]]; then
battery_charging=true
fi
break
fi
done
############# Output #############
if [[ $enable_battery == true ]]; then
if [[ $battery_charging == true ]]; then
echo -n "(+) "
fi
echo -n "$(cat /sys/class/power_supply/*/capacity | head -1)"%
if [[ $battery_charging == false ]]; then
echo -n " remaining"
fi
fi
echo ''

View File

@@ -1,16 +0,0 @@
preload = /home/cnst/Pictures/wallhaven-gpxl97.jpg
#if more than one preload is desired then continue to preload other backgrounds
#preload = /path/to/next_image.png
# .. more preloads
#set the default wallpaper(s) seen on initial workspace(s) --depending on the number of monitors used
wallpaper = DP-3,/home/cnst/Pictures/wallhaven-gpxl97.jpg
#if more than one monitor in use, can load a 2nd image
#wallpaper = monitor2,/path/to/next_image.png
# .. more monitors
#enable splash text rendering over the wallpaper
splash = false
#fully disable ipc
# ipc = off

View File

@@ -1,49 +0,0 @@
# APPEARANCE
general {
gaps_in = 3
gaps_out = 6
border_size = 2
#col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
#col.inactive_border = rgba(595959aa)
col.active_border = rgb(689d6a) # rgba(b16286ee) 45deg
col.inactive_border = rgb(504945)
layout = dwindle
}
decoration {
rounding = 0
blur {
enabled = true
size = 8
passes = 1
vibrancy = 0.1696
}
drop_shadow = true
shadow_range = 4
shadow_render_power = 3
# col.shadow = rgba(1a1a1aee)
}
animations {
enabled = true
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 3, myBezier
animation = windowsOut, 1, 3, default, popin 80%
animation = border, 1, 3, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 3, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
}

View File

@@ -1,53 +0,0 @@
# INPUTS
monitor=DP-3,2560x1440@143.86,0x0,1
monitor=eDP-1,1920x1200@60.02,0x0,1
# Some default env vars.
env = XCURSOR_SIZE,24
# env = QT_QPA_PLATFORMTHEME,qt6ct # change to qt6ct if you have that
# env = GTK_THEME,Orchis-Orange-Dark
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
follow_mouse = 1
accel_profile = flat
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
touchpad {
natural_scroll = true
disable_while_typing = true
clickfinger_behavior = true
scroll_factor = 0.5
}
}
# Desktop keyboard
device {
name = pfu-limited-hhkb-hybrid
kb_layout = hhkbse
kb_options = lv3:rwin_switch
}
# Laptop keyboard
device {
name = at-translated-set-2-keyboard
kb_layout = se
kb_options = ctrl:swapcaps
}
gestures {
workspace_swipe = true
workspace_swipe_distance = 400
workspace_swipe_fingers = 3
workspace_swipe_cancel_ratio = 0.2
workspace_swipe_min_speed_to_force = 5
workspace_swipe_direction_lock = true
workspace_swipe_direction_lock_threshold = 10
workspace_swipe_create_new = true
}
misc {
vrr = 0
mouse_move_enables_dpms = 1
key_press_enables_dpms = 0
force_default_wallpaper = 0
disable_hyprland_logo = true
disable_splash_rendering = true
}

View File

@@ -1,92 +0,0 @@
# KEYBINDS
$terminal = alacritty
$fileManager = thunar
$passwordManager = keepassxc
$menu = pkill tofi-run || tofi-run | xargs hyprctl dispatch exec --
$browser = firefox
$browserinc = firefox --private-window
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Custom binds
bind = SUPER SHIFT, B, exec, killall -SIGUSR2 waybar # Reload waybar
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = SUPER, A, exec, pkill -SIGUSR1 waybar
bind = SUPER, T, exec, $terminal
bind = SUPER, W, exec, $browser
bind = SUPER, K, exec, $passwordManager
bind = SUPER SHIFT, W, exec, $browserinc
bind = SUPER, Q, killactive,
bind = SUPER, M, exec, hyprctl dispatch exit
#bind = SUPER, E, exec, $fileManager
bind = SUPER, E, exec, hyprctl dispatch togglespecialworkspace fm | hyprctl dispatch rangerscript &
bind = SUPER SHIFT, E, exec, $fileManager
bind = SUPER, F, fullscreen,
bind = SUPER SHIFT, F, togglefloating,
bind = SUPER, SPACE, exec, $menu
bind = SUPER, P, pseudo, # dwindle
bind = SUPER, J, togglesplit, # dwindle
bind = SUPER, C, exec, hyprctl dispatch exec copyq toggle
# Move focus with mainMod + arrow keys
bind = SUPER, left, movefocus, l
bind = SUPER, right, movefocus, r
bind = SUPER, up, movefocus, u
bind = SUPER, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = SUPER, 1, workspace, 1
bind = SUPER, 2, workspace, 2
bind = SUPER, 3, workspace, 3
bind = SUPER, 4, workspace, 4
bind = SUPER, 5, workspace, 5
bind = SUPER, 6, workspace, 6
bind = SUPER, 7, workspace, 7
bind = SUPER, 8, workspace, 8
bind = SUPER, 9, workspace, 9
bind = SUPER, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = SUPER SHIFT, 1, movetoworkspace, 1
bind = SUPER SHIFT, 2, movetoworkspace, 2
bind = SUPER SHIFT, 3, movetoworkspace, 3
bind = SUPER SHIFT, 4, movetoworkspace, 4
bind = SUPER SHIFT, 5, movetoworkspace, 5
bind = SUPER SHIFT, 6, movetoworkspace, 6
bind = SUPER SHIFT, 7, movetoworkspace, 7
bind = SUPER SHIFT, 8, movetoworkspace, 8
bind = SUPER SHIFT, 9, movetoworkspace, 9
bind = SUPER SHIFT, 0, movetoworkspace, 10
# Laptop controls
bind = ,XF86AudioLowerVolume, exec, pactl -- set-sink-volume 0 -5%
bind = ,XF86AudioRaiseVolume, exec, pactl -- set-sink-volume 0 +5%
bind = ,XF86AudioMute, exec, pactl -- set-sink-mute 0 toggle
bind = ,XF86AudioMicMute, exec, pactl -- set-source-mute 0 toggle
bind = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-
bind = ,XF86MonBrightnessUp, exec, brightnessctl s +10%
bind = SUPER, XF86MonBrightnessUp, exec, hyprctl dispatch dpms on
bind = SUPER, XF86MonBrightnessDown, exec, hyprctl dispatch dpms off
# Screenshot a window
bind = SUPER, F10, exec, hyprshot -m window
# Screenshot a monitor
bind = , F10, exec, hyprshot -m output
# Screenshot a region
bind = SUPER SHIFT, F10, exec, hyprshot -m region
# Example special workspace (scratchpad)
bind = SUPER, S, togglespecialworkspace, magic
bind = SUPER SHIFT, S, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = SUPER, mouse_down, workspace, e+1
bind = SUPER, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow

View File

@@ -1,35 +0,0 @@
# RULES
# CALCURSE SETTINGS
windowrulev2 = float,class:(floatcal)
windowrulev2 = size 843 650,class:(floatcal)
windowrulev2 = move 100%-w-20 40,class:(floatcal)
#windowrulev2 = move 1708 32,class:(floatcal)
# RANGER/NNN SETTINGS
windowrulev2 = float,class:(floatranger)
windowrulev2 = float,class:(floatnnn)
#windowrulev2 = size 843 650,class:(floatranger)
#windowrulev2 = move 1708 32,class:(floatranger)
#windowrulev2 = move 1708 32;size 843 650;dimaround;float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
#windowrulev2 = noshadow, floating:0
windowrulev2 = float,class:^(org.keepassxc.KeePassXC)$
windowrulev2 = center,class:^(org.keepassxc.KeePassXC)$
windowrule = float, ^(xarchiver)$
windowrulev2 = float,class:^(imv)$
windowrulev2 = float,class:^(com.github.hluk.copyq)$
windowrule = center, ^(xarchiver)$
windowrulev2 = float,class:^(blueman-manager)$
windowrulev2 = center,class:^(nwg-look)$
windowrulev2 = float,class:^(nwg-look)$
windowrulev2 = float,class:^(Lxappearance)$
windowrulev2 = float,class:^(org.pulseaudio.pavucontrol)$
windowrule = move 1813 33,^(org.pulseaudio.pavucontrol)$
windowrule = size 741 585,^(org.pulseaudio.pavucontrol)$
windowrule = dimaround,^(org.pulseaudio.pavucontrol)$
windowrulev2 = float,class: ^(thunar)
windowrulev2 = float,class: ^(thunar)
windowrulev2 = workspace special:fm,class: ^(thunar)

View File

@@ -1,13 +0,0 @@
# STARTUP
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /usr/lib/polkit-kde-authentication-agent-1
exec-once = pamixer --set-volume 50 &
exec-once = dunst & waybar & hypridle & blueman-applet & udiskie -Nt &
exec-once = nm-applet --indicator &
exec-once = mullvad-vpn &
exec-once = swaybg -i ~/Images/wallpaper.png &
exec-once = wl-clip-persist --clipboard regular --all-mime-type-regex '^(?!x-kde-passwordManagerHint).+'
exec-once = hyprctl dispatch exec "sleep 4s && copyq --start-server"
exec-once = hyprctl dispatch exec "sleep 5s && keepassxc"
exec-once = hyprctl dispatch exec "sleep 3s && solaar -w hide"

View File

@@ -1,36 +0,0 @@
ignore-empty-password
disable-caps-lock-text
image=$HOME/.config/hypr/bg/calvin2.jpeg
font=Calvin and Hobbes
text-ver-color=00000000
text-wrong-color=00000000
text-clear-color=00000000
inside-color=00000000
inside-ver-color=00000000
inside-wrong-color=00000000
inside-clear-color=00000000
inside-caps-lock-color=00000000
ring-color=00000000
ring-ver-color=00000000
ring-wrong-color=00000000
ring-clear-color=00000000
line-color=00000000
line-clear-color=00000000
line-ver-color=00000000
key-hl-color=00000000
bs-hl-color=00000000
caps-lock-bs-hl-color=00000000
caps-lock-key-hl-color=00000000
separator-color=00000000
scaling=fill
indicator
clock
timestr=%I:%M %p
datestr=%A, %d %B
indicator-x-position=400
indicator-y-position=875
indicator-radius=450
font-size=200
text-color=080808

View File

@@ -1,3 +0,0 @@
#!/bin/bash
sleep 1
killall -9 Hyprland sleep 2

View File

@@ -1,30 +0,0 @@
#!/usr/bin/env sh
# set variables
wLayout="$HOME/.config/wlogout/layout_2"
wlTmplt="$HOME/.config/wlogout/style_2.css"
# set font size
fntSize=`gsettings get org.gnome.desktop.interface font-name | sed "s/'//g" | awk '{print $2}'`
export fntSize=$(( fntSize * 2 ))
# set scaling as per monitor res
res=`cat /sys/class/drm/*/modes | head -1 | cut -d 'x' -f 2`
case $1 in
1) wlColms=1
export mgn=$(( res * 10 / 100 ))
export hvr=$(( res * 5 / 100 )) ;;
2) wlColms=5
export mgn=$(( res * 8 / 100 ))
export mgn2=$(( res * 65 / 100 ))
export hvr=$(( res * 3 / 100 ))
export hvr2=$(( res * 60 / 100 )) ;;
*) echo "Error: invalid parameter passed..."
exit 1 ;;
esac
# eval config files
wlStyle=`envsubst < $wlTmplt`
# launch wlogout
wlogout -b $wlColms -c 0 -r 0 --layout $wLayout --css <(echo "$wlStyle") --protocol layer-shell

View File

@@ -34,11 +34,6 @@ let
gotools gotools
]; ];
haskell = [
haskell-language-server
ghc
];
lua = [ lua = [
lua-language-server lua-language-server
stylua stylua
@@ -69,16 +64,9 @@ let
]; ];
rust = [ rust = [
rustToolchain cargo
bacon # background code check rustfmt
]; rust-analyzer
rustToolchain = pkgs.fenix.stable.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
"rust-analyzer"
]; ];
shell = [ shell = [
@@ -98,18 +86,7 @@ let
]; ];
extraPackages = extraPackages =
tools tools ++ c ++ gamedev ++ golang ++ lua ++ markup ++ nix ++ python ++ rust ++ shell ++ web;
++ c
++ gamedev
++ golang
++ haskell
++ lua
++ markup
++ nix
++ python
++ rust
++ shell
++ web;
in in
{ {
@@ -123,9 +100,4 @@ in
plugins = with pkgs.vimPlugins; [ telescope-cheat-nvim ]; plugins = with pkgs.vimPlugins; [ telescope-cheat-nvim ];
inherit extraPackages; inherit extraPackages;
}; };
programs.helix = {
enable = true;
inherit extraPackages;
};
} }

View File

@@ -0,0 +1,45 @@
{ config, ... }:
{
programs.starship = {
enable = true;
settings = {
add_newline = false;
# character = {
# success_symbol = "[➜](bold green)";
# error_symbol = "[➜](bold red)";
# };
};
};
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
nixconfig = "cd /home/cnst/.nix-config/";
ll = "ls -l";
nixupdate = "sudo nixos-rebuild switch --flake .#cnix";
flakeupdate = "nix flake update";
};
history = {
size = 1000;
path = "${config.xdg.dataHome}/zsh/history";
};
oh-my-zsh = {
enable = true;
plugins = [
"git"
"thefuck"
];
theme = "robbyrussell";
};
initExtra = ''
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=241'
eval $(thefuck --alias)
eval $(thefuck --alias FUCK)
eval "$(starship init zsh)"
'';
};
}

View File

@@ -8,7 +8,8 @@
pkgs, pkgs,
system, system,
... ...
}: { }:
{
# You can import other NixOS modules here # You can import other NixOS modules here
imports = [ imports = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
@@ -24,7 +25,9 @@
]; ];
home-manager = { home-manager = {
extraSpecialArgs = {inherit inputs outputs;}; extraSpecialArgs = {
inherit inputs outputs;
};
users = { users = {
# Import your home-manager configuration # Import your home-manager configuration
cnst = import ../home-manager/home.nix; cnst = import ../home-manager/home.nix;
@@ -51,10 +54,13 @@
}; };
}; };
nix = let nix =
let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in { in
{
settings = { settings = {
warn-dirty = false;
# Enable flakes and new 'nix' command # Enable flakes and new 'nix' command
experimental-features = "nix-command flakes"; experimental-features = "nix-command flakes";
# Opinionated: disable global registry # Opinionated: disable global registry
@@ -73,25 +79,48 @@
# System packages # System packages
environment = { environment = {
systemPackages = [ systemPackages = [
inputs.nixvim.packages.${pkgs.system}.default # Dev
pkgs.git pkgs.git
pkgs.pyright pkgs.pyright
pkgs.python3 pkgs.python3
pkgs.gcc pkgs.gcc
pkgs.nodejs_22 pkgs.go
pkgs.nodePackages_latest.npm
pkgs.nodePackages_latest.nodejs
pkgs.nodePackages.prettier
pkgs.nodePackages.prettier-plugin-toml
pkgs.lua-language-server
pkgs.stylua
pkgs.prettierd
pkgs.cargo pkgs.cargo
pkgs.gnumake pkgs.hyprlang
pkgs.nixd
pkgs.nil
pkgs.black
pkgs.python312Packages.jedi-language-server
pkgs.isort
pkgs.bacon
pkgs.clang
pkgs.clang-tools
pkgs.alejandra
# Util
pkgs.stow pkgs.stow
pkgs.gnumake
pkgs.wget pkgs.wget
pkgs.curl pkgs.curl
pkgs.ripgrep pkgs.ripgrep
pkgs.nixd
pkgs.python312Packages.oauth2 pkgs.python312Packages.oauth2
pkgs.python312Packages.httplib2 pkgs.python312Packages.httplib2
pkgs.python312Packages.pip
pkgs.killall pkgs.killall
pkgs.alejandra
pkgs.tree-sitter pkgs.tree-sitter
pkgs.lazygit pkgs.lazygit
pkgs.tmux
pkgs.tmuxifier
pkgs.unzip
pkgs.p7zip
pkgs.unrar
]; ];
localBinInPath = true; localBinInPath = true;
}; };
@@ -103,7 +132,15 @@
fira-code-symbols fira-code-symbols
font-awesome font-awesome
jetbrains-mono jetbrains-mono
(nerdfonts.override {fonts = ["JetBrainsMono" "FiraCode" "Iosevka" "3270" "DroidSansMono"];}) (nerdfonts.override {
fonts = [
"JetBrainsMono"
"FiraCode"
"Iosevka"
"3270"
"DroidSansMono"
];
})
]; # Bootloader ]; # Bootloader
boot.loader = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
@@ -123,6 +160,11 @@
}; };
graphics = { graphics = {
enable = true; enable = true;
extraPackages = with pkgs; [
libva
vaapiVdpau
libvdpau-va-gl
];
}; };
}; };
@@ -134,6 +176,12 @@
solaar.enable = true; solaar.enable = true;
nix-ld.enable = true; nix-ld.enable = true;
adb.enable = true; adb.enable = true;
nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/cnst/.nix-config";
};
neovim = { neovim = {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;
@@ -177,7 +225,12 @@
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
# openssh.authorizedKeys.keys = []; # openssh.authorizedKeys.keys = [];
extraGroups = ["wheel" "networkmanager" "audio" "video"]; extraGroups = [
"wheel"
"networkmanager"
"audio"
"video"
];
}; };
}; };

View File

@@ -1,29 +1,53 @@
# 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, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
boot = {
initrd = {
availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
]; ];
kernelModules = [ ];
};
kernelModules = [ "kvm-amd" ];
kernelPackages = pkgs.linuxPackages_latest;
consoleLogLevel = 3;
kernelParams = [
"quiet"
"splash"
];
extraModulePackages = [ ];
};
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; fileSystems."/" = {
boot.initrd.kernelModules = [ ]; device = "/dev/disk/by-uuid/de372c64-89a2-4bbe-ad57-926cdd98e97d";
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/de372c64-89a2-4bbe-ad57-926cdd98e97d";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-60ba815c-481b-4932-94d2-b8d29465d3eb".device = "/dev/disk/by-uuid/60ba815c-481b-4932-94d2-b8d29465d3eb"; boot.initrd.luks.devices."luks-60ba815c-481b-4932-94d2-b8d29465d3eb".device = "/dev/disk/by-uuid/60ba815c-481b-4932-94d2-b8d29465d3eb";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/0954-2370"; device = "/dev/disk/by-uuid/0954-2370";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [
"fmask=0022"
"dmask=0022"
];
}; };
swapDevices = [ ]; swapDevices = [ ];

View File

@@ -2,8 +2,6 @@
default partial alphanumeric_keys default partial alphanumeric_keys
xkb_symbols "hhkbse" { xkb_symbols "hhkbse" {
include "latin(type2)"
include "se(se)"
name[Group1]="Sweden - HHKBse"; name[Group1]="Sweden - HHKBse";
@@ -56,5 +54,4 @@ xkb_symbols "hhkbse" {
key <AB08> {[ comma, semicolon ]}; key <AB08> {[ comma, semicolon ]};
key <AB09> {[ period, colon ]}; key <AB09> {[ period, colon ]};
key <AB10> {[ minus, underscore, endash ]}; key <AB10> {[ minus, underscore, endash ]};
}; };