Compare commits
6 Commits
master
...
feat_parts
Author | SHA1 | Date | |
---|---|---|---|
054b92e5e3 | |||
05f5ca0f91 | |||
1d42e5fd1e | |||
472817d1da | |||
55e4c663f4 | |||
196683aceb |
23
default.nix
Normal file
23
default.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
top@{ inputs, ... }: {
|
||||||
|
imports = [ ./nixos ./home ];
|
||||||
|
systems = [ "x86_64-linux" ];
|
||||||
|
perSystem = perSystem@{ system, ... }: {
|
||||||
|
config._module.args = {
|
||||||
|
pkgs = import inputs.nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
nvim = inputs.ide.nvim.${system}.standalone {
|
||||||
|
plugins.lsp.servers = {
|
||||||
|
bashls.enable = true;
|
||||||
|
nushell.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
scripts = (prev.buildEnv { name = "scripts"; paths = [ ./. ]; });
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
stateVersion = "24.05";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
23
flake.lock
23
flake.lock
@ -492,6 +492,26 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717285511,
|
||||||
|
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"pre-commit-hooks": {
|
"pre-commit-hooks": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_3",
|
"flake-compat": "flake-compat_3",
|
||||||
@ -528,7 +548,8 @@
|
|||||||
"hosts": "hosts",
|
"hosts": "hosts",
|
||||||
"ide": "ide",
|
"ide": "ide",
|
||||||
"nid": "nid",
|
"nid": "nid",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs",
|
||||||
|
"parts": "parts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
35
flake.nix
35
flake.nix
@ -5,6 +5,10 @@
|
|||||||
url = "github:nix-community/home-manager/release-24.05";
|
url = "github:nix-community/home-manager/release-24.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
parts = {
|
||||||
|
url = "github:hercules-ci/flake-parts";
|
||||||
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||||
|
};
|
||||||
hosts = {
|
hosts = {
|
||||||
url = "github:StevenBlack/hosts";
|
url = "github:StevenBlack/hosts";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -19,34 +23,5 @@
|
|||||||
};
|
};
|
||||||
catppuccin.url = "github:catppuccin/nix";
|
catppuccin.url = "github:catppuccin/nix";
|
||||||
};
|
};
|
||||||
outputs = { nixpkgs, home-manager, hosts, ide, nid, catppuccin, ... }:
|
outputs = inputs: inputs.parts.lib.mkFlake { inherit inputs; } { imports = [ ./. ]; };
|
||||||
let
|
|
||||||
system = "x86_64-linux";
|
|
||||||
stateVersion = "24.05";
|
|
||||||
my-overlay = self: super: {
|
|
||||||
scripts = (super.buildEnv { name = "scripts"; paths = [ ./. ]; });
|
|
||||||
};
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
overlays = [ my-overlay ];
|
|
||||||
};
|
|
||||||
modules = import ./modules {
|
|
||||||
inherit system nixpkgs pkgs ide my-overlay;
|
|
||||||
};
|
|
||||||
home = import ./home {
|
|
||||||
inherit stateVersion pkgs modules home-manager nid catppuccin;
|
|
||||||
};
|
|
||||||
nixos = import ./nixos {
|
|
||||||
inherit stateVersion system nixpkgs modules hosts catppuccin;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
nixosConfigurations = {
|
|
||||||
laptop = nixos.laptop;
|
|
||||||
};
|
|
||||||
homeConfigurations = {
|
|
||||||
ivand = home.ivand;
|
|
||||||
};
|
|
||||||
modules = modules;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
3
home/configs/default.nix
Normal file
3
home/configs/default.nix
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
imports = [ ./ivand ];
|
||||||
|
}
|
22
home/configs/ivand/default.nix
Normal file
22
home/configs/ivand/default.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
toplevel@{ inputs, withSystem, ... }:
|
||||||
|
{
|
||||||
|
flake.homeConfigurations.ivand = withSystem "x86_64-linux" (ctx@{ pkgs, stateVersion, ... }:
|
||||||
|
inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
modules =
|
||||||
|
let
|
||||||
|
mods = toplevel.config.flake.homeManagerModules;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
{
|
||||||
|
home.stateVersion = stateVersion;
|
||||||
|
}
|
||||||
|
inputs.nid.hmModules.nix-index
|
||||||
|
mods.all
|
||||||
|
mods.dev
|
||||||
|
mods.essential
|
||||||
|
mods.random
|
||||||
|
inputs.catppuccin.homeManagerModules.catppuccin
|
||||||
|
];
|
||||||
|
});
|
||||||
|
}
|
@ -1,41 +1,3 @@
|
|||||||
{ stateVersion, pkgs, home-manager, modules, nid, catppuccin, ... }:
|
|
||||||
let
|
|
||||||
ivand-programs = with modules.home.programs; [
|
|
||||||
bat
|
|
||||||
bottom
|
|
||||||
browserpass
|
|
||||||
carapace
|
|
||||||
chromium
|
|
||||||
cliphist
|
|
||||||
comma
|
|
||||||
firefox
|
|
||||||
git
|
|
||||||
gpg
|
|
||||||
imv
|
|
||||||
kitty
|
|
||||||
lf
|
|
||||||
mako
|
|
||||||
mpv
|
|
||||||
nushell
|
|
||||||
nvim
|
|
||||||
obs-studio
|
|
||||||
pueue
|
|
||||||
rofi
|
|
||||||
starship
|
|
||||||
sway
|
|
||||||
swaylock
|
|
||||||
tealdeer
|
|
||||||
tmux
|
|
||||||
waybar
|
|
||||||
zsh
|
|
||||||
];
|
|
||||||
ivand-packages = {
|
|
||||||
home.packages = with modules.home.packages; (dev ++ essential ++ random);
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
ivand = home-manager.lib.homeManagerConfiguration {
|
imports = [ ./modules ./configs ];
|
||||||
inherit pkgs;
|
|
||||||
modules = [{ home.stateVersion = stateVersion; } ./ivand nid.hmModules.nix-index ivand-packages] ++ ivand-programs ++ [ catppuccin.homeManagerModules.catppuccin ];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -1,109 +0,0 @@
|
|||||||
{ pkgs, ... }: rec {
|
|
||||||
|
|
||||||
programs.home-manager = { enable = true; };
|
|
||||||
|
|
||||||
|
|
||||||
catppuccin = {
|
|
||||||
enable = true;
|
|
||||||
flavor = "mocha";
|
|
||||||
};
|
|
||||||
|
|
||||||
gtk = {
|
|
||||||
enable = true;
|
|
||||||
catppuccin.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home = rec {
|
|
||||||
username = "ivand";
|
|
||||||
homeDirectory = "/home/ivand";
|
|
||||||
sessionPath = [
|
|
||||||
"$HOME/.local/bin"
|
|
||||||
];
|
|
||||||
sessionVariables = {
|
|
||||||
PASSWORD_STORE_DIR = "${homeDirectory}/.password-store";
|
|
||||||
EDITOR = "nvim";
|
|
||||||
PAGER = "bat";
|
|
||||||
TERM = "screen-256color";
|
|
||||||
};
|
|
||||||
pointerCursor = {
|
|
||||||
name = "Catppuccin-Mocha-Green-Cursors";
|
|
||||||
package = pkgs.catppuccin-cursors.mochaGreen;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user = {
|
|
||||||
timers = {
|
|
||||||
rbingwp = {
|
|
||||||
Timer = {
|
|
||||||
OnCalendar = "*-*-* 10:00:00";
|
|
||||||
Persistent = true;
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
WantedBy = [ "timers.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
wpd = {
|
|
||||||
Service = {
|
|
||||||
Environment = [
|
|
||||||
"PATH=${pkgs.xdg-user-dirs}/bin:${pkgs.swaybg}/bin"
|
|
||||||
];
|
|
||||||
ExecStart = [ "${pkgs.nushell}/bin/nu -c 'swaybg -i ((xdg-user-dir PICTURES) | path split | path join bg.png)'" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
bingwp = {
|
|
||||||
Service = {
|
|
||||||
Type = "oneshot";
|
|
||||||
Environment = [
|
|
||||||
"PATH=${pkgs.xdg-user-dirs}/bin:${pkgs.nushell}/bin"
|
|
||||||
];
|
|
||||||
ExecStart = [ "${pkgs.scripts}/bin/bingwp" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
rbingwp = {
|
|
||||||
Install = {
|
|
||||||
WantedBy = [ "sway-session.target" ];
|
|
||||||
};
|
|
||||||
Unit = {
|
|
||||||
Description = "Restart bingwp and wpd services";
|
|
||||||
After = "graphical-session-pre.target";
|
|
||||||
PartOf = "graphical-session.target";
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = [ "${pkgs.nushell}/bin/nu -c '${pkgs.systemd}/bin/systemctl --user restart bingwp.service; ${pkgs.systemd}/bin/systemctl --user restart wpd.service'" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg = {
|
|
||||||
enable = true;
|
|
||||||
userDirs = {
|
|
||||||
enable = true;
|
|
||||||
createDirectories = true;
|
|
||||||
desktop = "${home.homeDirectory}/dt";
|
|
||||||
documents = "${home.homeDirectory}/doc";
|
|
||||||
download = "${home.homeDirectory}/dl";
|
|
||||||
pictures = "${home.homeDirectory}/pic";
|
|
||||||
videos = "${home.homeDirectory}/vid";
|
|
||||||
templates = "${home.homeDirectory}/tpl";
|
|
||||||
publicShare = "${home.homeDirectory}/pub";
|
|
||||||
music = "${home.homeDirectory}/mus";
|
|
||||||
};
|
|
||||||
mimeApps = {
|
|
||||||
enable = true;
|
|
||||||
defaultApplications = {
|
|
||||||
"text/html" = "firefox.desktop";
|
|
||||||
"x-scheme-handler/http" = "firefox.desktop";
|
|
||||||
"x-scheme-handler/https" = "firefox.desktop";
|
|
||||||
"x-scheme-handler/about" = "firefox.desktop";
|
|
||||||
"x-scheme-handler/unknown" = "firefox.desktop";
|
|
||||||
"x-scheme-handler/mailto" = "userapp-Thunderbird-LDALA2.desktop";
|
|
||||||
"message/rfc822" = "userapp-Thunderbird-LDALA2.desktop";
|
|
||||||
"x-scheme-handler/mid" = "userapp-Thunderbird-LDALA2.desktop";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
3
home/modules/default.nix
Normal file
3
home/modules/default.nix
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
imports = [ ./packages ];
|
||||||
|
}
|
146
home/modules/packages/default.nix
Normal file
146
home/modules/packages/default.nix
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
{ moduleWithSystem, ... }: {
|
||||||
|
flake.homeManagerModules = {
|
||||||
|
dev = moduleWithSystem (
|
||||||
|
top@{ ... }:
|
||||||
|
perSystem@{ pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
openssh
|
||||||
|
procs
|
||||||
|
ripgrep
|
||||||
|
fswatch
|
||||||
|
nvim
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
essential = moduleWithSystem (
|
||||||
|
top@{ ... }:
|
||||||
|
perSystem@{ pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gopass
|
||||||
|
ffmpeg
|
||||||
|
transmission
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
random = moduleWithSystem (
|
||||||
|
top@{ ... }:
|
||||||
|
perSystem@{ pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
xonotic
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
all = moduleWithSystem
|
||||||
|
(
|
||||||
|
top@{ ... }:
|
||||||
|
perSystem@{ pkgs, ... }:
|
||||||
|
rec {
|
||||||
|
imports = [ ../programs ];
|
||||||
|
programs.home-manager = { enable = true; };
|
||||||
|
catppuccin = {
|
||||||
|
enable = true;
|
||||||
|
flavor = "mocha";
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
catppuccin.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home = rec {
|
||||||
|
username = "ivand";
|
||||||
|
homeDirectory = "/home/ivand";
|
||||||
|
sessionPath = [
|
||||||
|
"$HOME/.local/bin"
|
||||||
|
];
|
||||||
|
sessionVariables = {
|
||||||
|
PASSWORD_STORE_DIR = "${homeDirectory}/.password-store";
|
||||||
|
EDITOR = "nvim";
|
||||||
|
PAGER = "bat";
|
||||||
|
TERM = "screen-256color";
|
||||||
|
};
|
||||||
|
pointerCursor = {
|
||||||
|
name = "Catppuccin-Mocha-Green-Cursors";
|
||||||
|
package = pkgs.catppuccin-cursors.mochaGreen;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user = {
|
||||||
|
timers = {
|
||||||
|
rbingwp = {
|
||||||
|
Timer = {
|
||||||
|
OnCalendar = "*-*-* 10:00:00";
|
||||||
|
Persistent = true;
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
wpd = {
|
||||||
|
Service = {
|
||||||
|
Environment = [
|
||||||
|
"PATH=${pkgs.xdg-user-dirs}/bin:${pkgs.swaybg}/bin"
|
||||||
|
];
|
||||||
|
ExecStart = [ "${pkgs.nushell}/bin/nu -c 'swaybg -i ((xdg-user-dir PICTURES) | path split | path join bg.png)'" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
bingwp = {
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
Environment = [
|
||||||
|
"PATH=${pkgs.xdg-user-dirs}/bin:${pkgs.nushell}/bin"
|
||||||
|
];
|
||||||
|
ExecStart = [ "${pkgs.scripts}/bin/bingwp" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
rbingwp = {
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "sway-session.target" ];
|
||||||
|
};
|
||||||
|
Unit = {
|
||||||
|
Description = "Restart bingwp and wpd services";
|
||||||
|
After = "graphical-session-pre.target";
|
||||||
|
PartOf = "graphical-session.target";
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = [ "${pkgs.nushell}/bin/nu -c '${pkgs.systemd}/bin/systemctl --user restart bingwp.service; ${pkgs.systemd}/bin/systemctl --user restart wpd.service'" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
userDirs = {
|
||||||
|
enable = true;
|
||||||
|
createDirectories = true;
|
||||||
|
desktop = "${home.homeDirectory}/dt";
|
||||||
|
documents = "${home.homeDirectory}/doc";
|
||||||
|
download = "${home.homeDirectory}/dl";
|
||||||
|
pictures = "${home.homeDirectory}/pic";
|
||||||
|
videos = "${home.homeDirectory}/vid";
|
||||||
|
templates = "${home.homeDirectory}/tpl";
|
||||||
|
publicShare = "${home.homeDirectory}/pub";
|
||||||
|
music = "${home.homeDirectory}/mus";
|
||||||
|
};
|
||||||
|
mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
defaultApplications = {
|
||||||
|
"text/html" = "firefox.desktop";
|
||||||
|
"x-scheme-handler/http" = "firefox.desktop";
|
||||||
|
"x-scheme-handler/https" = "firefox.desktop";
|
||||||
|
"x-scheme-handler/about" = "firefox.desktop";
|
||||||
|
"x-scheme-handler/unknown" = "firefox.desktop";
|
||||||
|
"x-scheme-handler/mailto" = "userapp-Thunderbird-LDALA2.desktop";
|
||||||
|
"message/rfc822" = "userapp-Thunderbird-LDALA2.desktop";
|
||||||
|
"x-scheme-handler/mid" = "userapp-Thunderbird-LDALA2.desktop";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{ pkgs }: {
|
{ pkgs, ... }: {
|
||||||
programs.chromium = {
|
programs.chromium = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.ungoogled-chromium;
|
package = pkgs.ungoogled-chromium;
|
30
home/modules/programs/default.nix
Normal file
30
home/modules/programs/default.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{ ... }: {
|
||||||
|
imports = [
|
||||||
|
./bat
|
||||||
|
./bottom
|
||||||
|
./carapace
|
||||||
|
./chromium
|
||||||
|
./cliphist
|
||||||
|
./comma
|
||||||
|
./firefox
|
||||||
|
./git
|
||||||
|
./gpg
|
||||||
|
./imv
|
||||||
|
./mako
|
||||||
|
./kitty
|
||||||
|
./lf
|
||||||
|
./mpv
|
||||||
|
./nushell
|
||||||
|
./obs-studio
|
||||||
|
./pueue
|
||||||
|
./rofi
|
||||||
|
./starship
|
||||||
|
./sway
|
||||||
|
./swaylock
|
||||||
|
./tealdeer
|
||||||
|
./tmux
|
||||||
|
./waybar
|
||||||
|
./zsh
|
||||||
|
];
|
||||||
|
programs.browserpass.enable = true;
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{ pkgs }: {
|
{ pkgs, ... }: {
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles.ivand = {
|
profiles.ivand = {
|
3
home/modules/programs/neovim/default.nix
Normal file
3
home/modules/programs/neovim/default.nix
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{ nvim, ... }:
|
||||||
|
nvim
|
||||||
|
{ }
|
@ -1,4 +1,4 @@
|
|||||||
{ pkgs }: {
|
{ pkgs, ... }: {
|
||||||
programs.obs-studio = {
|
programs.obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = with pkgs.obs-studio-plugins; [ wlrobs ];
|
plugins = with pkgs.obs-studio-plugins; [ wlrobs ];
|
@ -59,7 +59,6 @@
|
|||||||
libreoffice-qt
|
libreoffice-qt
|
||||||
mupdf
|
mupdf
|
||||||
pavucontrol
|
pavucontrol
|
||||||
scripts
|
|
||||||
slurp
|
slurp
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
xdg-user-dirs
|
xdg-user-dirs
|
@ -1,13 +0,0 @@
|
|||||||
{ system, nixpkgs, pkgs, ide, ... }:
|
|
||||||
{
|
|
||||||
nixos = {
|
|
||||||
gaming = import ./nixos/gaming { inherit nixpkgs; };
|
|
||||||
nvidia = import ./nixos/nvidia { inherit nixpkgs; };
|
|
||||||
dnscrypt = import ./nixos/dnscrypt;
|
|
||||||
wireguard = import ./nixos/wireguard;
|
|
||||||
};
|
|
||||||
home = {
|
|
||||||
packages = import ./home/packages pkgs;
|
|
||||||
programs = import ./home/programs { inherit system pkgs ide; };
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
pkgs: with pkgs; {
|
|
||||||
dev = [
|
|
||||||
openssh
|
|
||||||
procs
|
|
||||||
ripgrep
|
|
||||||
fswatch
|
|
||||||
];
|
|
||||||
essential = [
|
|
||||||
gopass
|
|
||||||
ffmpeg
|
|
||||||
transmission
|
|
||||||
];
|
|
||||||
random = [
|
|
||||||
telegram-desktop
|
|
||||||
xonotic
|
|
||||||
];
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
{ system, pkgs, ide, ... }: {
|
|
||||||
|
|
||||||
nvim = import ./neovim {
|
|
||||||
nvim = ide.nvim.${system}.homeManagerModules.nvim;
|
|
||||||
};
|
|
||||||
bat = import ./bat;
|
|
||||||
bottom = import ./bottom;
|
|
||||||
browserpass = { programs.browserpass.enable = true; };
|
|
||||||
carapace = import ./carapace;
|
|
||||||
chromium = import ./chromium { inherit pkgs; };
|
|
||||||
cliphist = import ./cliphist;
|
|
||||||
comma = import ./comma;
|
|
||||||
firefox = import ./firefox { inherit pkgs; };
|
|
||||||
git = import ./git;
|
|
||||||
gpg = import ./gpg { inherit pkgs; };
|
|
||||||
imv = import ./imv;
|
|
||||||
mako = import ./mako;
|
|
||||||
kitty = import ./kitty { inherit pkgs; };
|
|
||||||
lf = import ./lf;
|
|
||||||
mpv = import ./mpv;
|
|
||||||
nushell = import ./nushell { inherit pkgs; };
|
|
||||||
obs-studio = import ./obs-studio { inherit pkgs; };
|
|
||||||
pueue = import ./pueue;
|
|
||||||
rofi = import ./rofi { inherit pkgs; };
|
|
||||||
starship = import ./starship;
|
|
||||||
sway = import ./sway { inherit pkgs; };
|
|
||||||
swaylock = import ./swaylock;
|
|
||||||
tealdeer = import ./tealdeer;
|
|
||||||
tmux = import ./tmux { inherit pkgs; };
|
|
||||||
waybar = import ./waybar;
|
|
||||||
zsh = import ./zsh { inherit pkgs; };
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
{ nvim, ... }:
|
|
||||||
nvim
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
plugins.lsp.servers = {
|
|
||||||
bashls.enable = true;
|
|
||||||
nushell.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
networking.wg-quick.interfaces = {
|
|
||||||
wg0 = {
|
|
||||||
address = [ "10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/64" ];
|
|
||||||
dns = [ "1.1.1.1" "fdc9:281f:04d7:9ee9::1" ];
|
|
||||||
privateKeyFile = "/etc/wireguard/privatekey";
|
|
||||||
|
|
||||||
peers = [
|
|
||||||
{
|
|
||||||
publicKey = "5FiTLnzbgcbgQLlyVyYeESEd+2DtwM1JHCGz/32UcEU=";
|
|
||||||
allowedIPs = [ "0.0.0.0/0" "::/0" ];
|
|
||||||
endpoint = "37.205.13.29:51820";
|
|
||||||
persistentKeepalive = 25;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
18
nixos/configs/default.nix
Normal file
18
nixos/configs/default.nix
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
toplevel@{ inputs, withSystem, ... }:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
flake.nixosConfigurations.nixos = withSystem system (ctx@{ config, inputs', ... }:
|
||||||
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs inputs';
|
||||||
|
packages = config.packages;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./laptop-hardware.nix
|
||||||
|
inputs.hosts.nixosModule
|
||||||
|
inputs.catppuccin.nixosModules.catppuccin
|
||||||
|
] ++ (with toplevel.config.flake.nixosModules; [ wireguard catppuccin boot security xdg networking users services programs env rest ]);
|
||||||
|
});
|
||||||
|
}
|
@ -1,13 +1,3 @@
|
|||||||
{ stateVersion, system, nixpkgs, modules, hosts, catppuccin, ... }: {
|
{ ... }: {
|
||||||
laptop = nixpkgs.lib.nixosSystem {
|
imports = [ ./modules ./configs ];
|
||||||
inherit system;
|
|
||||||
modules = [
|
|
||||||
{ system.stateVersion = stateVersion; }
|
|
||||||
../hardware-configuration.nix
|
|
||||||
./laptop
|
|
||||||
modules.nixos.wireguard
|
|
||||||
hosts.nixosModule
|
|
||||||
catppuccin.nixosModules.catppuccin
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -1,180 +0,0 @@
|
|||||||
{ config, pkgs, ... }: {
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware = {
|
|
||||||
opengl = {
|
|
||||||
enable = true;
|
|
||||||
driSupport = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
catppuccin = {
|
|
||||||
enable = true;
|
|
||||||
flavor = "mocha";
|
|
||||||
};
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
loader = {
|
|
||||||
grub = {
|
|
||||||
enable = true;
|
|
||||||
catppuccin.enable = true;
|
|
||||||
useOSProber = true;
|
|
||||||
efiSupport = true;
|
|
||||||
device = "nodev";
|
|
||||||
};
|
|
||||||
efi = {
|
|
||||||
canTouchEfiVariables = true;
|
|
||||||
efiSysMountPoint = "/boot/efi";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
|
||||||
kernelModules = [ "v4l2loopback" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
security = {
|
|
||||||
sudo = {
|
|
||||||
enable = false;
|
|
||||||
execWheelOnly = true;
|
|
||||||
extraRules = [
|
|
||||||
{
|
|
||||||
groups = [ "wheel" ];
|
|
||||||
commands = [{ command = "${pkgs.light}/bin/light"; options = [ "SETENV" "NOPASSWD" ]; }];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
doas = {
|
|
||||||
enable = true;
|
|
||||||
extraRules = [
|
|
||||||
# Allow wheel to run all commands without password and keep user env.
|
|
||||||
{ groups = [ "wheel" ]; noPass = true; keepEnv = true; }
|
|
||||||
];
|
|
||||||
};
|
|
||||||
polkit.enable = true;
|
|
||||||
rtkit.enable = true;
|
|
||||||
pam = { services = { swaylock = { }; }; };
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg = {
|
|
||||||
portal = {
|
|
||||||
enable = true;
|
|
||||||
wlr.enable = true;
|
|
||||||
config.common.default = "*";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
i18n.supportedLocales = [ "all" ];
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Prague";
|
|
||||||
|
|
||||||
fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-emoji noto-fonts-lgc-plus ];
|
|
||||||
|
|
||||||
environment = {
|
|
||||||
systemPackages = with pkgs; [
|
|
||||||
cmatrix
|
|
||||||
coreutils-full
|
|
||||||
cryptsetup
|
|
||||||
dig
|
|
||||||
fd
|
|
||||||
file
|
|
||||||
git
|
|
||||||
glibc
|
|
||||||
gnumake
|
|
||||||
jq
|
|
||||||
mlocate
|
|
||||||
moreutils
|
|
||||||
ntfs3g
|
|
||||||
openssl
|
|
||||||
srm
|
|
||||||
unzip
|
|
||||||
vim
|
|
||||||
zip
|
|
||||||
];
|
|
||||||
shells = with pkgs; [ zsh nushell ];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
wireless = {
|
|
||||||
enable = true;
|
|
||||||
networks = {
|
|
||||||
"Smart-Hostel-2.4" = {
|
|
||||||
psk = "smarttrans.bg";
|
|
||||||
};
|
|
||||||
"Yohohostel2.4G" = {
|
|
||||||
psk = "kaskamaska";
|
|
||||||
};
|
|
||||||
"Nomado_Guest" = {
|
|
||||||
psk = "welcomehome";
|
|
||||||
};
|
|
||||||
"HostelMusala Uni" = {
|
|
||||||
psk = "mhostelm";
|
|
||||||
};
|
|
||||||
"BOUTIQUE APARTMENTS" = {
|
|
||||||
psk = "boutique26";
|
|
||||||
};
|
|
||||||
"Safestay" = {
|
|
||||||
psk = "AlldayrooftopBAR";
|
|
||||||
};
|
|
||||||
"HOSTEL JASMIN 2" = {
|
|
||||||
psk = "Jasmin2024";
|
|
||||||
};
|
|
||||||
"HOME" = {
|
|
||||||
psk = "iloveprague";
|
|
||||||
};
|
|
||||||
"Vodafone-B925" = {
|
|
||||||
psk = "7aGh3FE6pN4p4cu6";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
stevenBlackHosts = {
|
|
||||||
enable = true;
|
|
||||||
blockFakenews = true;
|
|
||||||
blockGambling = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
zsh.enable = true;
|
|
||||||
nix-ld.enable = true;
|
|
||||||
adb.enable = true;
|
|
||||||
dconf.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users = {
|
|
||||||
defaultUserShell = pkgs.zsh;
|
|
||||||
users = {
|
|
||||||
ivand = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [
|
|
||||||
"adbusers"
|
|
||||||
"adm"
|
|
||||||
"audio"
|
|
||||||
"bluetooth"
|
|
||||||
"dialout"
|
|
||||||
"flatpak"
|
|
||||||
"kvm"
|
|
||||||
"mlocate"
|
|
||||||
"render"
|
|
||||||
"video"
|
|
||||||
"wheel"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
extraGroups = { mlocate = { }; };
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
|
||||||
xserver.videoDrivers = [ "nouveau" ];
|
|
||||||
dbus.enable = true;
|
|
||||||
flatpak.enable = true;
|
|
||||||
pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
208
nixos/modules/default.nix
Normal file
208
nixos/modules/default.nix
Normal file
@ -0,0 +1,208 @@
|
|||||||
|
{ moduleWithSystem, ... }: {
|
||||||
|
flake.nixosModules = {
|
||||||
|
wireguard = {
|
||||||
|
networking.wg-quick.interfaces = {
|
||||||
|
wg0 = {
|
||||||
|
address = [ "10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/64" ];
|
||||||
|
dns = [ "1.1.1.1" "fdc9:281f:04d7:9ee9::1" ];
|
||||||
|
privateKeyFile = "/etc/wireguard/privatekey";
|
||||||
|
|
||||||
|
peers = [
|
||||||
|
{
|
||||||
|
publicKey = "5FiTLnzbgcbgQLlyVyYeESEd+2DtwM1JHCGz/32UcEU=";
|
||||||
|
allowedIPs = [ "0.0.0.0/0" "::/0" ];
|
||||||
|
endpoint = "37.205.13.29:51820";
|
||||||
|
persistentKeepalive = 25;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
catppuccin = {
|
||||||
|
catppuccin = {
|
||||||
|
enable = true;
|
||||||
|
flavor = "mocha";
|
||||||
|
};
|
||||||
|
boot.loader.grub.catppuccin.enable = true;
|
||||||
|
};
|
||||||
|
boot = {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
grub = {
|
||||||
|
enable = true;
|
||||||
|
useOSProber = true;
|
||||||
|
efiSupport = true;
|
||||||
|
device = "nodev";
|
||||||
|
};
|
||||||
|
efi = {
|
||||||
|
canTouchEfiVariables = true;
|
||||||
|
efiSysMountPoint = "/boot/efi";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kernelModules = [ "v4l2loopback" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
security = moduleWithSystem (toplevel@{ ... }: nixos@{ pkgs, ... }: {
|
||||||
|
security = {
|
||||||
|
sudo = {
|
||||||
|
enable = false;
|
||||||
|
execWheelOnly = true;
|
||||||
|
extraRules = [
|
||||||
|
{
|
||||||
|
groups = [ "wheel" ];
|
||||||
|
commands = [{ command = "${pkgs.light}/bin/light"; options = [ "SETENV" "NOPASSWD" ]; }];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
doas = {
|
||||||
|
enable = true;
|
||||||
|
extraRules = [
|
||||||
|
# Allow wheel to run all commands without password and keep user env.
|
||||||
|
{ groups = [ "wheel" ]; noPass = true; keepEnv = true; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
polkit.enable = true;
|
||||||
|
rtkit.enable = true;
|
||||||
|
pam = { services = { swaylock = { }; }; };
|
||||||
|
};
|
||||||
|
});
|
||||||
|
xdg = {
|
||||||
|
xdg = {
|
||||||
|
portal = {
|
||||||
|
enable = true;
|
||||||
|
wlr.enable = true;
|
||||||
|
config.common.default = "*";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
networking = {
|
||||||
|
networking = {
|
||||||
|
wireless = {
|
||||||
|
enable = true;
|
||||||
|
networks = {
|
||||||
|
"Smart-Hostel-2.4" = {
|
||||||
|
psk = "smarttrans.bg";
|
||||||
|
};
|
||||||
|
"Yohohostel2.4G" = {
|
||||||
|
psk = "kaskamaska";
|
||||||
|
};
|
||||||
|
"Nomado_Guest" = {
|
||||||
|
psk = "welcomehome";
|
||||||
|
};
|
||||||
|
"HostelMusala Uni" = {
|
||||||
|
psk = "mhostelm";
|
||||||
|
};
|
||||||
|
"BOUTIQUE APARTMENTS" = {
|
||||||
|
psk = "boutique26";
|
||||||
|
};
|
||||||
|
"Safestay" = {
|
||||||
|
psk = "AlldayrooftopBAR";
|
||||||
|
};
|
||||||
|
"HOSTEL JASMIN 2" = {
|
||||||
|
psk = "Jasmin2024";
|
||||||
|
};
|
||||||
|
"HOME" = {
|
||||||
|
psk = "iloveprague";
|
||||||
|
};
|
||||||
|
"Vodafone-B925" = {
|
||||||
|
psk = "7aGh3FE6pN4p4cu6";
|
||||||
|
};
|
||||||
|
"O2WIFIZ_EXT" = {
|
||||||
|
psk = "iloveprague";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
stevenBlackHosts = {
|
||||||
|
enable = true;
|
||||||
|
blockFakenews = true;
|
||||||
|
blockGambling = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
users = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
||||||
|
users = {
|
||||||
|
defaultUserShell = pkgs.zsh;
|
||||||
|
users = {
|
||||||
|
ivand = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"adbusers"
|
||||||
|
"adm"
|
||||||
|
"audio"
|
||||||
|
"bluetooth"
|
||||||
|
"dialout"
|
||||||
|
"flatpak"
|
||||||
|
"kvm"
|
||||||
|
"mlocate"
|
||||||
|
"render"
|
||||||
|
"video"
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraGroups = { mlocate = { }; };
|
||||||
|
};
|
||||||
|
});
|
||||||
|
services = {
|
||||||
|
services = {
|
||||||
|
xserver.videoDrivers = [ "nouveau" ];
|
||||||
|
dbus.enable = true;
|
||||||
|
flatpak.enable = true;
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
programs = {
|
||||||
|
programs = {
|
||||||
|
zsh.enable = true;
|
||||||
|
nix-ld.enable = true;
|
||||||
|
adb.enable = true;
|
||||||
|
dconf.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
env = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
||||||
|
environment = {
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
cmatrix
|
||||||
|
coreutils-full
|
||||||
|
cryptsetup
|
||||||
|
dig
|
||||||
|
fd
|
||||||
|
file
|
||||||
|
git
|
||||||
|
glibc
|
||||||
|
gnumake
|
||||||
|
jq
|
||||||
|
mlocate
|
||||||
|
moreutils
|
||||||
|
ntfs3g
|
||||||
|
openssl
|
||||||
|
srm
|
||||||
|
unzip
|
||||||
|
vim
|
||||||
|
zip
|
||||||
|
];
|
||||||
|
shells = with pkgs; [ zsh nushell ];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
rest = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
||||||
|
nix = {
|
||||||
|
extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
hardware = {
|
||||||
|
opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
i18n.supportedLocales = [ "all" ];
|
||||||
|
time.timeZone = "Europe/Prague";
|
||||||
|
fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-emoji noto-fonts-lgc-plus ];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user