Overhaul luna complete
2
.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
secrets/*
|
|
||||||
!secrets/secrets.yaml
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
keys:
|
|
||||||
- &terra age167thunwadsswd0u37tajk85wy4x7sgw6sg3j2aspcax7essmge6qwen0uz
|
|
||||||
creation_rules:
|
|
||||||
- path_regex: secrets/secrets.yaml$
|
|
||||||
key_groups:
|
|
||||||
- age:
|
|
||||||
- *terra
|
|
||||||
12
README.md
|
|
@ -1,12 +0,0 @@
|
||||||
# Setup when done cloning (i.e. things I need to put into my config)
|
|
||||||
* Logins:
|
|
||||||
* Bitwarden (Firefox & Desktop)
|
|
||||||
* Discord
|
|
||||||
* JetBrains
|
|
||||||
* Parsec
|
|
||||||
* Spotify
|
|
||||||
* Tailscale
|
|
||||||
* Whatsapp
|
|
||||||
|
|
||||||
* Configure Display setup and refresh rate
|
|
||||||
* Rebuild: update .#hostname
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
docs:~/Documents
|
|
||||||
down:~/Downloads
|
|
||||||
nix:~/nix-config
|
|
||||||
obs:~/Documents/Uni
|
|
||||||
prog:~/Programming
|
|
||||||
21
flake.lock
generated
|
|
@ -7,31 +7,32 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739002622,
|
"lastModified": 1736373539,
|
||||||
"narHash": "sha256-PtJV5OYQF7XO6XkDYypsYJS3+OsgYaYSmkO3I/A7lZo=",
|
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "947eef9e99c42346cf0aac2bebe1cd94924c173b",
|
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
|
"ref": "release-24.11",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738961098,
|
"lastModified": 1739055578,
|
||||||
"narHash": "sha256-yWNBf6VDW38tl179FEuJ0qukthVfB02kv+mRsfUsWC0=",
|
"narHash": "sha256-2MhC2Bgd06uI1A0vkdNUyDYsMD0SLNGKtD8600mZ69A=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a3eaf5e8eca7cab680b964138fb79073704aca75",
|
"rev": "a45fa362d887f4d4a7157d95c28ca9ce2899b70e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-24.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
@ -74,11 +75,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738291974,
|
"lastModified": 1739262228,
|
||||||
"narHash": "sha256-wkwYJc8cKmmQWUloyS9KwttBnja2ONRuJQDEsmef320=",
|
"narHash": "sha256-7JAGezJ0Dn5qIyA2+T4Dt/xQgAbhCglh6lzCekTVMeU=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "4c1251904d8a08c86ac6bc0d72cc09975e89aef7",
|
"rev": "07af005bb7d60c7f118d9d9f5530485da5d1e975",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
24
flake.nix
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager/release-24.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
url = "github:Mic92/sops-nix";
|
url = "github:Mic92/sops-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
|
@ -29,7 +28,6 @@
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
# Supported systems for your flake packages, shell, etc.
|
|
||||||
systems = [
|
systems = [
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
"i686-linux"
|
"i686-linux"
|
||||||
|
|
@ -37,28 +35,10 @@
|
||||||
"aarch64-darwin"
|
"aarch64-darwin"
|
||||||
"x86_64-darwin"
|
"x86_64-darwin"
|
||||||
];
|
];
|
||||||
# This is a function that generates an attribute by calling a function you
|
|
||||||
# pass to it, with each system as an argument
|
|
||||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||||
in {
|
in {
|
||||||
# Your custom packages
|
|
||||||
# Accessible through 'nix build', 'nix shell', etc
|
|
||||||
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
|
||||||
# Formatter for your nix files, available through 'nix fmt'
|
|
||||||
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
|
||||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||||
|
|
||||||
# Your custom packages and modifications, exported as overlays
|
|
||||||
overlays = import ./overlays {inherit inputs;};
|
|
||||||
# Reusable nixos modules you might want to export
|
|
||||||
# These are usually stuff you would upstream into nixpkgs
|
|
||||||
nixosModules = import ./modules/nixos;
|
|
||||||
# Reusable home-manager modules you might want to export
|
|
||||||
# These are usually stuff you would upstream into home-manager
|
|
||||||
homeManagerModules = import ./modules/home-manager;
|
|
||||||
|
|
||||||
# NixOS configuration entrypoint
|
|
||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
luna = nixpkgs.lib.nixosSystem {
|
luna = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs outputs;};
|
specialArgs = {inherit inputs outputs;};
|
||||||
|
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
./nvim/neovim.nix
|
|
||||||
./plasma.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs = {
|
|
||||||
overlays = [
|
|
||||||
outputs.overlays.additions
|
|
||||||
outputs.overlays.modifications
|
|
||||||
outputs.overlays.unstable-packages
|
|
||||||
];
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
allowUnfreePredicate = _: true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home = {
|
|
||||||
username = "horseman";
|
|
||||||
homeDirectory = "/home/horseman";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
userName = "KoenDR06";
|
|
||||||
userEmail = "koen.de.ruiter@hotmail.com";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.gh.enable = true;
|
|
||||||
|
|
||||||
systemd.user.startServices = "sd-switch";
|
|
||||||
|
|
||||||
home.stateVersion = "23.05";
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
lua << EOF
|
|
||||||
|
|
||||||
require('lualine').setup {
|
|
||||||
options = {
|
|
||||||
icons_enabled = true,
|
|
||||||
theme = 'auto',
|
|
||||||
component_separators = { left = '', right = ''},
|
|
||||||
section_separators = { left = '', right = ''},
|
|
||||||
disabled_filetypes = {
|
|
||||||
statusline = {},
|
|
||||||
winbar = {},
|
|
||||||
},
|
|
||||||
ignore_focus = {},
|
|
||||||
always_divide_middle = true,
|
|
||||||
globalstatus = false,
|
|
||||||
refresh = {
|
|
||||||
statusline = 1000,
|
|
||||||
tabline = 1000,
|
|
||||||
winbar = 1000,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = {'mode'},
|
|
||||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
|
||||||
lualine_c = {'filename'},
|
|
||||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
|
||||||
lualine_y = {'progress'},
|
|
||||||
lualine_z = {'location'}
|
|
||||||
},
|
|
||||||
inactive_sections = {
|
|
||||||
lualine_a = {},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_c = {'filename'},
|
|
||||||
lualine_x = {'location'},
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {}
|
|
||||||
},
|
|
||||||
tabline = {},
|
|
||||||
winbar = {},
|
|
||||||
inactive_winbar = {},
|
|
||||||
extensions = {}
|
|
||||||
}
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
programs.neovim = {
|
|
||||||
enable = true;
|
|
||||||
vimAlias = true;
|
|
||||||
|
|
||||||
plugins = [
|
|
||||||
{
|
|
||||||
plugin = pkgs.vimPlugins.vim-numbertoggle;
|
|
||||||
config = "set number norelativenumber";
|
|
||||||
}
|
|
||||||
{ plugin = pkgs.vimPlugins.vim-sleuth; }
|
|
||||||
{
|
|
||||||
plugin = pkgs.vimPlugins.lualine-nvim;
|
|
||||||
config = lib.fileContents ./lualine.vim;
|
|
||||||
# Change icons so that lualine looks nice in tty
|
|
||||||
}
|
|
||||||
{ plugin = pkgs.vimPlugins.neoscroll-nvim; }
|
|
||||||
# Save lsat cursor position
|
|
||||||
# When in normal mode, I have to press arrow right to make a new line. Bad.
|
|
||||||
# Clock in vim
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
./nvim/neovim.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs = {
|
|
||||||
overlays = [
|
|
||||||
outputs.overlays.additions
|
|
||||||
outputs.overlays.modifications
|
|
||||||
outputs.overlays.unstable-packages
|
|
||||||
];
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
allowUnfreePredicate = _: true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home = {
|
|
||||||
username = "horseman";
|
|
||||||
homeDirectory = "/home/horseman";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
direnv
|
|
||||||
docker-compose
|
|
||||||
fzf
|
|
||||||
gcc
|
|
||||||
gnupg
|
|
||||||
htop
|
|
||||||
jdk
|
|
||||||
nodejs_22
|
|
||||||
python3
|
|
||||||
sops
|
|
||||||
tailscale
|
|
||||||
tmux
|
|
||||||
unzip
|
|
||||||
wakeonlan
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
userName = "KoenDR06";
|
|
||||||
userEmail = "koen.de.ruiter@hotmail.com";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.gh.enable = true;
|
|
||||||
|
|
||||||
systemd.user.startServices = "sd-switch";
|
|
||||||
|
|
||||||
home.stateVersion = "23.05";
|
|
||||||
}
|
|
||||||
|
|
@ -1,146 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
../../pkgs/zsh.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs = {
|
|
||||||
overlays = [
|
|
||||||
outputs.overlays.additions
|
|
||||||
outputs.overlays.modifications
|
|
||||||
outputs.overlays.unstable-packages
|
|
||||||
];
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
|
||||||
|
|
||||||
programs.nix-ld.enable = true;
|
|
||||||
programs.nix-ld.libraries = with pkgs; [
|
|
||||||
dotnetCorePackages.sdk_9_0
|
|
||||||
];
|
|
||||||
|
|
||||||
nix.nixPath = ["/etc/nix/path"];
|
|
||||||
environment.etc =
|
|
||||||
lib.mapAttrs'
|
|
||||||
(name: value: {
|
|
||||||
name = "nix/path/${name}";
|
|
||||||
value.source = value.flake;
|
|
||||||
})
|
|
||||||
config.nix.registry;
|
|
||||||
|
|
||||||
nix.settings.trusted-users = [ "root" "horseman" ];
|
|
||||||
nix.settings = {
|
|
||||||
experimental-features = "nix-command flakes";
|
|
||||||
auto-optimise-store = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Amsterdam";
|
|
||||||
services.lorri.enable = true;
|
|
||||||
services.tailscale.enable = true;
|
|
||||||
|
|
||||||
services.mullvad-vpn.enable = true;
|
|
||||||
services.mullvad-vpn.package = pkgs.mullvad-vpn;
|
|
||||||
networking.nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
|
|
||||||
services.resolved = {
|
|
||||||
enable = true;
|
|
||||||
dnssec = "true";
|
|
||||||
domains = [ "~." ];
|
|
||||||
fallbackDns = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
sops = {
|
|
||||||
defaultSopsFile = ../../secrets/secrets.yaml;
|
|
||||||
defaultSopsFormat = "yaml";
|
|
||||||
age = {
|
|
||||||
sshKeyPaths = [ "/home/horseman/.ssh/id_ed25519" ];
|
|
||||||
keyFile = "/home/horseman/.config/sops/age/keys.txt";
|
|
||||||
generateKey = false;
|
|
||||||
};
|
|
||||||
secrets = {
|
|
||||||
"syncthing/user".owner = "horseman";
|
|
||||||
"syncthing/password".owner = "horseman";
|
|
||||||
};
|
|
||||||
templates = {
|
|
||||||
"syncuser".content = ''${config.sops.placeholder."syncthing/user"}'';
|
|
||||||
"syncpassword".content = ''${config.sops.placeholder."syncthing/password"}'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.syncthing = {
|
|
||||||
enable = true;
|
|
||||||
user = "horseman";
|
|
||||||
dataDir = "/home/horseman";
|
|
||||||
configDir = "/home/horseman/.config/syncthing";
|
|
||||||
overrideDevices = true;
|
|
||||||
overrideFolders = true;
|
|
||||||
settings = {
|
|
||||||
options = {
|
|
||||||
urAccepted = -1;
|
|
||||||
};
|
|
||||||
gui = {
|
|
||||||
user = config.sops.templates."syncuser".content;
|
|
||||||
password = config.sops.templates."syncpassword".content;
|
|
||||||
};
|
|
||||||
devices = {
|
|
||||||
"luna" = {
|
|
||||||
id = "MW4ZTAX-D7KDLRL-YHNGNCF-V6FW5L4-SCKQKES-BO7KV43-L5667GL-JHIYEAA";
|
|
||||||
autoAcceptFolders = true;
|
|
||||||
name = "luna";
|
|
||||||
};
|
|
||||||
"terra" = {
|
|
||||||
id = "2QWRFLY-ZUY5C6C-X36R5CY-PJSGLYY-5HWIWJN-2YYWRPU-T66GJMU-GXTQ6QK";
|
|
||||||
autoAcceptFolders = true;
|
|
||||||
name = "terra";
|
|
||||||
};
|
|
||||||
"solis" = {
|
|
||||||
id = "YOSYADZ-3OZ3XBH-7XEIK2W-DHAEIFD-5P5ZIHB-PAP74DH-T7GHLKT-O32YEA4";
|
|
||||||
autoAcceptFolders = true;
|
|
||||||
name = "solis";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
folders = {
|
|
||||||
"Documents" = {
|
|
||||||
id = "documentFolder";
|
|
||||||
path = "/home/horseman/Documents";
|
|
||||||
devices = [ "luna" "terra" "solis" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
networking.firewall.allowedUDPPorts = [ 22000 21027 ];
|
|
||||||
networking.firewall.allowedTCPPorts = [ 8384 22000 ];
|
|
||||||
|
|
||||||
users.users = {
|
|
||||||
horseman = {
|
|
||||||
initialPassword = "1234";
|
|
||||||
isNormalUser = true;
|
|
||||||
openssh.authorizedKeys.keyFiles = [
|
|
||||||
../../config/ssh/authorized_keys
|
|
||||||
];
|
|
||||||
extraGroups = [
|
|
||||||
"wheel"
|
|
||||||
"networkmanager"
|
|
||||||
"docker"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
PermitRootLogin = "no";
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
|
||||||
}
|
|
||||||
|
|
@ -7,68 +7,11 @@
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../pkgs/firefox.nix
|
./modules.nix
|
||||||
../common/configuration.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
extraSpecialArgs = { inherit inputs outputs; };
|
|
||||||
users = {
|
|
||||||
horseman = import ../../home-manager/apps.nix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "luna";
|
networking.hostName = "luna";
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
networking.extraHosts = ''
|
|
||||||
127.0.0.1 koala.rails.local members.rails.local leden.rails.local intro.rails.local
|
|
||||||
'';
|
|
||||||
|
|
||||||
services.xserver.enable = true;
|
system.stateVersion = "24.11";
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.displayManager.sddm.autoNumlock = true;
|
|
||||||
services.displayManager.defaultSession = "plasma";
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.kernelModules = [ "snd-seq" "snd-rawmidi" ];
|
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
services.jack = {
|
|
||||||
jackd.enable = false;
|
|
||||||
alsa.enable = true;
|
|
||||||
loopback.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
|
||||||
kate
|
|
||||||
konsole
|
|
||||||
];
|
|
||||||
environment.gnome.excludePackages = with pkgs; [
|
|
||||||
gnome-calendar
|
|
||||||
gnome-characters
|
|
||||||
nautilus
|
|
||||||
gnome-clocks
|
|
||||||
gnome-contacts
|
|
||||||
evince
|
|
||||||
file-roller
|
|
||||||
geary
|
|
||||||
gnome-system-monitor
|
|
||||||
eog
|
|
||||||
gnome-logs
|
|
||||||
gnome-maps
|
|
||||||
gnome-music
|
|
||||||
seahorse
|
|
||||||
gnome-text-editor
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
|
|
||||||
virtualisation.virtualbox.host.enable = true;
|
|
||||||
users.extraGroups.vboxusers.members = [ "horseman" ];
|
|
||||||
|
|
||||||
users.extraUsers.horseman.extraGroups = [ "jackaudio" ];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,15 @@
|
||||||
# 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, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||||
|
|
@ -13,13 +17,13 @@
|
||||||
boot.kernelModules = ["kvm-intel"];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.extraModulePackages = [];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/c1447573-eee5-48ea-9937-84330065628b";
|
device = "/dev/disk/by-uuid/c1447573-eee5-48ea-9937-84330065628b";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/B516-99F1";
|
device = "/dev/disk/by-uuid/B516-99F1";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
44
machines/luna/modules.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [../../modules];
|
||||||
|
|
||||||
|
config.horseman = {
|
||||||
|
users.horseman.enable = true;
|
||||||
|
|
||||||
|
base = {
|
||||||
|
nix.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
loader.systemd.enable = true;
|
||||||
|
greeter.sddm.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
wm = {
|
||||||
|
plasma.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
audio.enable = true;
|
||||||
|
bluetooth.enable = true;
|
||||||
|
wifi.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
network = {
|
||||||
|
mullvad.enable = true;
|
||||||
|
ssh.enable = true;
|
||||||
|
syncthing.enable = true;
|
||||||
|
tailscale.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
apps = {
|
||||||
|
dev.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -6,57 +6,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [];
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
./hardware-configuration.nix
|
|
||||||
../common/configuration.nix
|
|
||||||
../../modules/sleep-at-night.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
extraSpecialArgs = { inherit inputs outputs; };
|
|
||||||
users = {
|
|
||||||
horseman = import ../../home-manager/server-apps.nix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "solis";
|
networking.hostName = "solis";
|
||||||
|
|
||||||
boot.loader.grub.enable = true;
|
|
||||||
boot.loader.grub.device = "/dev/sda";
|
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
|
|
||||||
services.resolved.enable = true;
|
|
||||||
services.resolved.extraConfig = "DNSStubListener=no\n";
|
|
||||||
|
|
||||||
systemd.timers."backupSyncthing" = {
|
|
||||||
wantedBy = [ "timers.target" ];
|
|
||||||
timerConfig = {
|
|
||||||
OnCalendar = "weekly";
|
|
||||||
Persistent = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services."backupSyncthing" = {
|
|
||||||
script = ''
|
|
||||||
/home/horseman/nix-config/misc/backup.sh
|
|
||||||
'';
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
User = "horseman";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# services.sleep-at-night = {
|
|
||||||
# enable = true;
|
|
||||||
# shutdown = {
|
|
||||||
# hour = 00;
|
|
||||||
# minute = 30;
|
|
||||||
# };
|
|
||||||
# wakeup = "08:00:00";
|
|
||||||
# };
|
|
||||||
|
|
||||||
networking.firewall.enable = true;
|
|
||||||
networking.firewall.allowPing = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,15 @@
|
||||||
# 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, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "usb_storage" "usbhid" "sd_mod" "sr_mod"];
|
boot.initrd.availableKernelModules = ["ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "usb_storage" "usbhid" "sd_mod" "sr_mod"];
|
||||||
|
|
@ -13,13 +17,13 @@
|
||||||
boot.kernelModules = ["kvm-amd"];
|
boot.kernelModules = ["kvm-amd"];
|
||||||
boot.extraModulePackages = [];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/74211087-d087-49d5-bc58-eb49748a51f0";
|
device = "/dev/disk/by-uuid/74211087-d087-49d5-bc58-eb49748a51f0";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [
|
||||||
[ { device = "/dev/disk/by-uuid/bfe8c490-e8d7-438e-b95b-5bc5743bb23b"; }
|
{device = "/dev/disk/by-uuid/bfe8c490-e8d7-438e-b95b-5bc5743bb23b";}
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|
|
||||||
|
|
@ -6,104 +6,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [];
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./refind.nix
|
|
||||||
../../pkgs/firefox.nix
|
|
||||||
../common/configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# NVIDIA Drivers
|
|
||||||
hardware.graphics.enable32Bit = true;
|
|
||||||
hardware.graphics.enable = true;
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
|
||||||
hardware.nvidia = {
|
|
||||||
modesetting.enable = true;
|
|
||||||
powerManagement.enable = false;
|
|
||||||
powerManagement.finegrained = false;
|
|
||||||
open = true;
|
|
||||||
nvidiaSettings = true;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
||||||
};
|
|
||||||
# End NVIDIA
|
|
||||||
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
extraSpecialArgs = { inherit inputs outputs; };
|
|
||||||
users = {
|
|
||||||
horseman = import ../../home-manager/apps.nix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "terra";
|
networking.hostName = "terra";
|
||||||
|
|
||||||
systemd.timers."enable-wol" = {
|
|
||||||
wantedBy = [ "timers.target" ];
|
|
||||||
timerConfig = {
|
|
||||||
OnBootSec = "5m";
|
|
||||||
OnUnitActiveSec = "1m";
|
|
||||||
Unit = "enable-wol.service";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services."enable-wol" = {
|
|
||||||
script = ''
|
|
||||||
/home/horseman/nix-config/misc/startup.sh
|
|
||||||
'';
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
User = "root";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
ethtool
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
|
||||||
kate
|
|
||||||
konsole
|
|
||||||
];
|
|
||||||
environment.gnome.excludePackages = with pkgs; [
|
|
||||||
gnome-calendar
|
|
||||||
gnome-characters
|
|
||||||
nautilus
|
|
||||||
gnome-clocks
|
|
||||||
gnome-contacts
|
|
||||||
evince
|
|
||||||
file-roller
|
|
||||||
geary
|
|
||||||
gnome-system-monitor
|
|
||||||
eog
|
|
||||||
gnome-logs
|
|
||||||
gnome-maps
|
|
||||||
gnome-music
|
|
||||||
seahorse
|
|
||||||
gnome-text-editor
|
|
||||||
];
|
|
||||||
|
|
||||||
services.xserver.enable = true;
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.displayManager.sddm.autoNumlock = true;
|
|
||||||
services.displayManager.sddm.wayland.enable = false;
|
|
||||||
services.displayManager.defaultSession = "plasma";
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
|
|
||||||
programs.ssh.askPassword = lib.mkForce "/nix/store/qrzq7dqp8dkffb5dvi42q647dhm87ady-ksshaskpass-6.0.3/bin/ksshaskpass";
|
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
services.jack = {
|
|
||||||
jackd.enable = true;
|
|
||||||
alsa.enable = false;
|
|
||||||
loopback.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.extraUsers.horseman.extraGroups = [ "jackaudio" ];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,15 @@
|
||||||
# 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, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
||||||
|
|
@ -13,18 +17,18 @@
|
||||||
boot.kernelModules = ["kvm-amd"];
|
boot.kernelModules = ["kvm-amd"];
|
||||||
boot.extraModulePackages = [];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/4d963cda-4ec7-4cee-8e82-35402d385f54";
|
device = "/dev/disk/by-uuid/4d963cda-4ec7-4cee-8e82-35402d385f54";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/6AB6-63FD";
|
device = "/dev/disk/by-uuid/6AB6-63FD";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [
|
||||||
[ { device = "/dev/disk/by-uuid/53db744d-a858-49b0-a3a1-c7c576aba0c9"; }
|
{device = "/dev/disk/by-uuid/53db744d-a858-49b0-a3a1-c7c576aba0c9";}
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.refind
|
|
||||||
pkgs.efibootmgr
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
#!/run/current-system/sw/bin/zsh
|
|
||||||
|
|
||||||
cd /home/horseman
|
|
||||||
file=backups/$(date +%Y-%m-%d).tar
|
|
||||||
tar -cf $file Documents
|
|
||||||
|
|
||||||
if grep -q $(sha256sum $file) backups/sum; then
|
|
||||||
echo 'hashes match, quitting'
|
|
||||||
rm $file
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
echo $(sha256sum $file) > backups/sum
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 176 KiB |
|
|
@ -1,3 +0,0 @@
|
||||||
#!/run/current-system/sw/bin/zsh
|
|
||||||
|
|
||||||
sudo ethtool -s eno1 wol g
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
lookandfeeltool -a org.kde.breezedark.desktop
|
|
||||||
|
|
||||||
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript '
|
|
||||||
var allDesktops = desktops();
|
|
||||||
for (i = 0; i < allDesktops.length; i++) {
|
|
||||||
d = allDesktops[i];
|
|
||||||
d.wallpaperPlugin = "org.kde.image";
|
|
||||||
d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");
|
|
||||||
d.writeConfig("Image", "file:///home/horseman/nix-config/misc/nixos_wallpaper_dark_3840x2160.png");
|
|
||||||
}'
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
lookandfeeltool -a org.kde.breeze.desktop
|
|
||||||
|
|
||||||
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript '
|
|
||||||
var allDesktops = desktops();
|
|
||||||
for (i = 0; i < allDesktops.length; i++) {
|
|
||||||
d = allDesktops[i];
|
|
||||||
d.wallpaperPlugin = "org.kde.image";
|
|
||||||
d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");
|
|
||||||
d.writeConfig("Image", "file:///home/horseman/nix-config/misc/nixos_wallpaper_light_3840x2160.png");
|
|
||||||
}'
|
|
||||||
7
modules/apps/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{inputs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./terminal.nix
|
||||||
|
./visual.nix
|
||||||
|
./dev.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
22
modules/apps/dev.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.apps.dev;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.apps.dev = {
|
||||||
|
enable = mkEnableOption "Apps used for programming";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# Docker
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
24
modules/apps/terminal.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.apps.terminal;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.apps.terminal = {
|
||||||
|
enable = mkEnableOption "Apps that run only in terminal without a GUI";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
services.lorri.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -7,17 +7,16 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
cfg = config.horseman.boot.refind;
|
cfg = config.horseman.apps.visual;
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
horseman.boot.refind = {
|
horseman.apps.visual = {
|
||||||
enable = mkEnableOption "Enables rEFInd, the bootloader";
|
enable = mkEnableOption "Apps that run in a visual window";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
refind
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
66
modules/apps/visual/firefox.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
policies = {
|
||||||
|
DisableTelemetry = true;
|
||||||
|
DisableFirefoxStudies = true;
|
||||||
|
DisablePocket = true;
|
||||||
|
DisableAccounts = true;
|
||||||
|
DisableFirefoxScreenshots = true;
|
||||||
|
DisplayBookmarksToolbar = "never";
|
||||||
|
PasswordManagerEnabled = false;
|
||||||
|
|
||||||
|
ExtensionSettings = {
|
||||||
|
"*".installation_mode = "blocked";
|
||||||
|
# uBlock Origin:
|
||||||
|
"uBlock0@raymondhill.net" = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
# Dark Reader
|
||||||
|
"addon@darkreader.org" = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
# Advent of Code delta-rank
|
||||||
|
"{78b07db2-25ed-4088-9c92-5c5dcfca3c3c}" = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/advent-of-code-delta-score/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
# SponsorBlock
|
||||||
|
"sponsorBlocker@ajay.app" = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
# KeepassXC
|
||||||
|
"keepassxc-browser@keepassxc.org" = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
# Cookie Blocker
|
||||||
|
"idcac-pub@guus.ninja" = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/istilldontcareaboutcookies/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
# Ghostery
|
||||||
|
"firefox@ghostery.com" = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ghostery/latest.xpi";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
Preferences = {
|
||||||
|
general = {
|
||||||
|
autoScroll = true;
|
||||||
|
};
|
||||||
|
"browser.newtabpage.activity-stream.showSponsored" = lock-false;
|
||||||
|
"browser.newtabpage.activity-stream.system.showSponsored" = lock-false;
|
||||||
|
"browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
5
modules/base/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{inputs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./nix.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -7,15 +7,15 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
cfg = config.horseman.common.locale;
|
cfg = config.horseman.base.locale;
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
horseman.common.locale = {
|
horseman.base.locale = {
|
||||||
enable = mkEnableOption "Dutch locale settings";
|
enable = mkEnableOption "Locale settings";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = {
|
||||||
time.timeZone = "Europe/Amsterdam";
|
time.timeZone = "Europe/Amsterdam";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -7,16 +7,21 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
cfg = config.horseman.common.nix;
|
cfg = config.horseman.base.nix;
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
horseman.common.nix = {
|
horseman.base.nix = {
|
||||||
enable = mkEnableOption "Nix settings";
|
enable = mkEnableOption "Standard settings for nix";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = {
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
|
overlays = [
|
||||||
|
# outputs.overlays.additions
|
||||||
|
# outputs.overlays.modifications
|
||||||
|
# outputs.overlays.unstable-packages
|
||||||
|
];
|
||||||
config = {
|
config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
@ -25,7 +30,9 @@ in {
|
||||||
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
||||||
|
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
programs.nix-ld.libraries = with pkgs; [];
|
programs.nix-ld.libraries = with pkgs; [
|
||||||
|
dotnetCorePackages.sdk_9_0
|
||||||
|
];
|
||||||
|
|
||||||
nix.nixPath = ["/etc/nix/path"];
|
nix.nixPath = ["/etc/nix/path"];
|
||||||
environment.etc =
|
environment.etc =
|
||||||
6
modules/boot/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{inputs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./loader/systemd.nix
|
||||||
|
./greeter/sddm.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
21
modules/boot/greeter/sddm.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.boot.greeter.sddm;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.boot.greeter.sddm = {
|
||||||
|
enable = mkEnableOption "SDDM Greeter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
services.displayManager.sddm.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
22
modules/boot/loader/systemd.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.boot.loader.systemd;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.boot.loader.systemd = {
|
||||||
|
enable = mkEnableOption "Sets systemd as the bootloader";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.systemd-boot.configurationLimit = 10;
|
||||||
|
};
|
||||||
|
}
|
||||||
12
modules/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{inputs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./apps
|
||||||
|
./hardware
|
||||||
|
./network
|
||||||
|
./terminal
|
||||||
|
./wm
|
||||||
|
./users
|
||||||
|
./boot
|
||||||
|
./base
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/hardware/audio.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.hardware.audio;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.hardware.audio = {
|
||||||
|
enable = mkEnableOption "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
services.jack = {
|
||||||
|
jackd.enable = false;
|
||||||
|
alsa.enable = true;
|
||||||
|
loopback.enable = false;
|
||||||
|
};
|
||||||
|
users.extraUsers.horseman.extraGroups = ["jackaudio"];
|
||||||
|
};
|
||||||
|
}
|
||||||
21
modules/hardware/bluetooth.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.hardware.bluetooth;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.hardware.bluetooth = {
|
||||||
|
enable = mkEnableOption "Bluetooth";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
8
modules/hardware/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{inputs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./audio.nix
|
||||||
|
./bluetooth.nix
|
||||||
|
./gpu/nvidia.nix
|
||||||
|
./wifi.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
31
modules/hardware/gpu/nvidia.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.hardware.gpu.nvidia;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.hardware.gpu.nvidia = {
|
||||||
|
enable = mkEnableOption "Enable support for NVIDIA GPUs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
hardware.graphics.enable32Bit = true;
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = false;
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
open = true;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
22
modules/hardware/wifi.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.hardware.wifi;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.hardware.wifi = {
|
||||||
|
enable = mkEnableOption "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
users.users.horseman.extraGroups = ["networkmanager"];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
|
|
||||||
# These should be stuff you would like to share with others, not your personal configurations.
|
|
||||||
{
|
|
||||||
# List your module files here
|
|
||||||
# my-module = import ./my-module.nix;
|
|
||||||
}
|
|
||||||
8
modules/network/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{inputs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./mullvad.nix
|
||||||
|
./ssh.nix
|
||||||
|
./syncthing.nix
|
||||||
|
./tailscale.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
33
modules/network/mullvad.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.network.mullvad;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.network.mullvad = {
|
||||||
|
enable = mkEnableOption "Enables the Mullvad VPN";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
services = {
|
||||||
|
mullvad-vpn = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.mullvad-vpn;
|
||||||
|
};
|
||||||
|
resolved = {
|
||||||
|
enable = true;
|
||||||
|
dnssec = "true";
|
||||||
|
domains = ["~."];
|
||||||
|
fallbackDns = ["1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
networking.nameservers = ["1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one"];
|
||||||
|
};
|
||||||
|
}
|
||||||
41
modules/network/ssh.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.network.ssh;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.network.ssh = {
|
||||||
|
enable = mkEnableOption "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
services.openssh = {
|
||||||
|
banner = ''
|
||||||
|
==================================================================
|
||||||
|
=== ==== ==== ========= ================================= ===
|
||||||
|
=== ==== ==== ========= ================================= ===
|
||||||
|
=== ==== ==== ========= ================================= ===
|
||||||
|
=== ==== ==== === === === ==== === = = ==== === ===
|
||||||
|
=== == == === = == == = == == == = == ===
|
||||||
|
==== == == === == == ===== = == = = == == ===
|
||||||
|
==== == == === ===== == ===== = == = = == ==========
|
||||||
|
===== == ==== = == == = == = == = = == = == ===
|
||||||
|
====== ==== ====== === === ==== === = = === === ===
|
||||||
|
==================================================================
|
||||||
|
'';
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
59
modules/network/syncthing.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.network.syncthing;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.network.syncthing = {
|
||||||
|
enable = mkEnableOption "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
user = "horseman";
|
||||||
|
dataDir = "/home/horseman";
|
||||||
|
configDir = "/home/horseman/.config/syncthing";
|
||||||
|
overrideDevices = true;
|
||||||
|
overrideFolders = true;
|
||||||
|
settings = {
|
||||||
|
options = {
|
||||||
|
urAccepted = -1;
|
||||||
|
};
|
||||||
|
devices = {
|
||||||
|
"luna" = {
|
||||||
|
id = "MW4ZTAX-D7KDLRL-YHNGNCF-V6FW5L4-SCKQKES-BO7KV43-L5667GL-JHIYEAA";
|
||||||
|
autoAcceptFolders = true;
|
||||||
|
name = "luna";
|
||||||
|
};
|
||||||
|
"terra" = {
|
||||||
|
id = "2QWRFLY-ZUY5C6C-X36R5CY-PJSGLYY-5HWIWJN-2YYWRPU-T66GJMU-GXTQ6QK";
|
||||||
|
autoAcceptFolders = true;
|
||||||
|
name = "terra";
|
||||||
|
};
|
||||||
|
"solis" = {
|
||||||
|
id = "YOSYADZ-3OZ3XBH-7XEIK2W-DHAEIFD-5P5ZIHB-PAP74DH-T7GHLKT-O32YEA4";
|
||||||
|
autoAcceptFolders = true;
|
||||||
|
name = "solis";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
folders = {
|
||||||
|
"Documents" = {
|
||||||
|
id = "documentFolder";
|
||||||
|
path = "/home/horseman/Documents";
|
||||||
|
devices = ["luna" "terra" "solis"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
networking.firewall.allowedUDPPorts = [22000 21027];
|
||||||
|
networking.firewall.allowedTCPPorts = [8384 22000];
|
||||||
|
};
|
||||||
|
}
|
||||||
21
modules/network/tailscale.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.network.tailscale;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.network.tailscale = {
|
||||||
|
enable = mkEnableOption "Enable the Tailscale VPN service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
services.tailscale.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
|
|
||||||
# These should be stuff you would like to share with others, not your personal configurations.
|
|
||||||
{
|
|
||||||
# List your module files here
|
|
||||||
# my-module = import ./my-module.nix;
|
|
||||||
}
|
|
||||||
|
|
@ -1,79 +0,0 @@
|
||||||
{config, pkgs, lib, ...}:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.services.sleep-at-night;
|
|
||||||
sleep-if-night = pkgs.writeScriptBin "sleep-if-night" ''
|
|
||||||
#!${pkgs.bash}/bin/bash
|
|
||||||
wakeupTime="$3"
|
|
||||||
shutdownHour="00$1"
|
|
||||||
shutdownHour="''${shutdownHour:(-2)}"
|
|
||||||
shutdownMinute="00$2"
|
|
||||||
shutdownMinute="''${shutdownMinute:(-2)}"
|
|
||||||
currentHour="$(${pkgs.coreutils}/bin/date +%H)"
|
|
||||||
currentMinute="$(${pkgs.coreutils}/bin/date +%M)"
|
|
||||||
if [[ "$currentHour" -eq "$shutdownHour" ]] && [[ "$currentMinute" -eq "$shutdownMinute" ]]
|
|
||||||
then
|
|
||||||
echo "Shutting down now. Waking up at $wakeupTime".
|
|
||||||
${pkgs.utillinux}/bin/rtcwake -m off -t "$(${pkgs.coreutils}/bin/date -d "$wakeupTime" +%s)";
|
|
||||||
else
|
|
||||||
echo "Current time is $currentHour:$currentMinute. Shutting down at $shutdownHour:$shutdownMinute."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
with lib; {
|
|
||||||
|
|
||||||
options = {
|
|
||||||
services.sleep-at-night = {
|
|
||||||
|
|
||||||
enable = mkOption {
|
|
||||||
default = false;
|
|
||||||
type = with types; bool;
|
|
||||||
description = ''
|
|
||||||
Sleep at night.
|
|
||||||
If you start the system after the given `shutdown` time, the system will keep running until the `shutdown` time occurs again, even if you start it before the given `wakeup` time.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
wakeup = mkOption {
|
|
||||||
default = "09:00:00";
|
|
||||||
type = with types; str;
|
|
||||||
description = ''
|
|
||||||
Wake up at given time.
|
|
||||||
The time has to be parsable by `date -d`.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
shutdown = {
|
|
||||||
hour = mkOption {
|
|
||||||
default = 01;
|
|
||||||
type = with types; ints.between 0 23;
|
|
||||||
description = ''
|
|
||||||
Shut down at given hour.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
minute = mkOption {
|
|
||||||
default = 00;
|
|
||||||
type = with types; ints.between 0 59;
|
|
||||||
description = ''
|
|
||||||
Shut down at given minute of the given `hour`.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
systemd.services.sleep-at-night = {
|
|
||||||
description = "Sleep at night.";
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${sleep-if-night}/bin/sleep-if-night ${toString cfg.shutdown.hour} ${toString cfg.shutdown.minute} ${cfg.wakeup}";
|
|
||||||
Restart = "on-success";
|
|
||||||
RestartSec = 30;
|
|
||||||
User = "root";
|
|
||||||
};
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -7,15 +7,14 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
cfg = config.horseman.xxxxxx.xxxxxx;
|
cfg = config.horseman.xxx.yyy;
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
horseman.xxxxxx.xxxxxx = {
|
horseman.xxx.yyy = {
|
||||||
enable = mkEnableOption "";
|
enable = mkEnableOption "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = {
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
5
modules/terminal/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{inputs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./zsh.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -7,17 +7,15 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
cfg = config.horseman.base.locale;
|
cfg = config.horseman.terminal.zsh;
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
horseman.terminal.zsh = {
|
horseman.terminal.zsh = {
|
||||||
enable = mkEnableOption "Enable ZSH and all associated plugins";
|
enable = mkEnableOption "The ZSH shell and plugins for it";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = {
|
||||||
services.lorri.enable = true;
|
|
||||||
|
|
||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
environment.shells = with pkgs; [zsh];
|
environment.shells = with pkgs; [zsh];
|
||||||
|
|
||||||
|
|
@ -28,8 +26,8 @@ in {
|
||||||
histSize = 10000;
|
histSize = 10000;
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
clone-dotfiles = "cp /home/horseman/nix-config/config/dotfiles/.\* /home/horseman/";
|
clone-dotfiles = "cp -r /home/horseman/nix-config/config/dotfiles/.\* /home/horseman/";
|
||||||
rebuild = "nix fmt && clone-dotfiles && sudo nixos-rebuild switch --flake";
|
rebuild = "clone-dotfiles && sudo nixos-rebuild switch --flake";
|
||||||
update = "sudo nix flake update && rebuild";
|
update = "sudo nix flake update && rebuild";
|
||||||
compose = "sudo docker compose";
|
compose = "sudo docker compose";
|
||||||
wolpc = "wakeonlan D8:5E:D3:A8:B1:0A";
|
wolpc = "wakeonlan D8:5E:D3:A8:B1:0A";
|
||||||
5
modules/users/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{inputs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./horseman.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
38
modules/users/horseman.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.users.horseman;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.users.horseman = {
|
||||||
|
enable = mkEnableOption "Default user";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
home-manager = {
|
||||||
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
|
users.horseman = {
|
||||||
|
home.stateVersion = "24.11";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.horseman = {
|
||||||
|
initialPassword = "1234";
|
||||||
|
isNormalUser = true;
|
||||||
|
openssh.authorizedKeys.keyFiles = [
|
||||||
|
../../config/ssh/authorized_keys
|
||||||
|
];
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"docker"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
modules/wm/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{inputs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./gnome
|
||||||
|
./plasma
|
||||||
|
./qtile
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,4 @@
|
||||||
{
|
{pkgs, ...}: {
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
dconf.settings = {
|
dconf.settings = {
|
||||||
"org/gnome/desktop/peripherals/touchpad" = {
|
"org/gnome/desktop/peripherals/touchpad" = {
|
||||||
natural-scroll = false;
|
natural-scroll = false;
|
||||||
46
modules/wm/gnome/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.wm.gnome;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.desktop.gnome = {
|
||||||
|
enable = mkEnableOption "Gnome";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
desktopManager.gnome.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.gnome.excludePackages = with pkgs; [
|
||||||
|
gnome-calendar
|
||||||
|
gnome-characters
|
||||||
|
nautilus
|
||||||
|
gnome-clocks
|
||||||
|
gnome-contacts
|
||||||
|
evince
|
||||||
|
file-roller
|
||||||
|
geary
|
||||||
|
gnome-system-monitor
|
||||||
|
eog
|
||||||
|
gnome-logs
|
||||||
|
gnome-maps
|
||||||
|
gnome-music
|
||||||
|
seahorse
|
||||||
|
gnome-text-editor
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.horseman = {
|
||||||
|
imports = [./config.nix];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -206,7 +206,7 @@
|
||||||
"org_kde_powerdevil"."Toggle Keyboard Backlight" = "Keyboard Light On/Off";
|
"org_kde_powerdevil"."Toggle Keyboard Backlight" = "Keyboard Light On/Off";
|
||||||
"org_kde_powerdevil"."Turn Off Screen" = [];
|
"org_kde_powerdevil"."Turn Off Screen" = [];
|
||||||
"org_kde_powerdevil"."powerProfile" = ["Battery" "" "Meta+B\\, ,Battery" "Meta+B,Switch Power Profile"];
|
"org_kde_powerdevil"."powerProfile" = ["Battery" "" "Meta+B\\, ,Battery" "Meta+B,Switch Power Profile"];
|
||||||
"plasmashell"."activate application launcher" = ["Meta" "" "Alt+F1\\, ,Meta" "Alt+F1,Activate Application Launcher"];
|
"plasmashell"."activate application launcher" = ["Alt+F1" "Alt+F1,Activate Application Launcher"];
|
||||||
"plasmashell"."activate task manager entry 1" = "Meta+1";
|
"plasmashell"."activate task manager entry 1" = "Meta+1";
|
||||||
"plasmashell"."activate task manager entry 10" = "\\, Meta+0\\, ,Meta+0,Activate Task Manager Entry 10";
|
"plasmashell"."activate task manager entry 10" = "\\, Meta+0\\, ,Meta+0,Activate Task Manager Entry 10";
|
||||||
"plasmashell"."activate task manager entry 2" = "Meta+2";
|
"plasmashell"."activate task manager entry 2" = "Meta+2";
|
||||||
39
modules/wm/plasma/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.wm.plasma;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.wm.plasma = {
|
||||||
|
enable = mkEnableOption "Plasma 6";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
services = {
|
||||||
|
xserver.enable = true;
|
||||||
|
|
||||||
|
desktopManager.plasma6.enable = true;
|
||||||
|
displayManager = {
|
||||||
|
sddm.autoNumlock = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
power-profiles-daemon.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||||
|
kate
|
||||||
|
konsole
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.horseman = {
|
||||||
|
imports = [./config.nix];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
20
modules/wm/qtile/config/LICENSE
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2020 Daniel Diaz
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
91
modules/wm/qtile/config/README.md
Normal file
|
|
@ -0,0 +1,91 @@
|
||||||
|
# Qtile configuration file
|
||||||
|
|
||||||
|
## Screenshots 🖥️
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## What is Qtile?
|
||||||
|
|
||||||
|
[Qtile](http://www.qtile.org/) is a window manager written and configured in Python🐍. It is hackable and lightweight, you can install it among other desktop environments and [standalone WM's](https://wiki.archlinux.org/index.php/window_manager).
|
||||||
|
|
||||||
|
## Installation 🐧
|
||||||
|
|
||||||
|
Install Qtile and other dependencies.
|
||||||
|
|
||||||
|
### For Arch Linux
|
||||||
|
All software, one command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yay -S qtile picom rofi nitrogen xorg-server-xephyr
|
||||||
|
lxappearance-gtk3 megasync python-psutil brave-browser alacritty
|
||||||
|
bat playerctl pulseaudio-ctl dunst alacritty fish starship neovim
|
||||||
|
pavucontrol flameshot noto-fonts-emoji noto-fonts-emoji brightnessctl blueman xfce4-power-manager network-manager-applet xfce4-clipman-plugin
|
||||||
|
```
|
||||||
|
|
||||||
|
Also install Rofi Power menu:
|
||||||
|
```
|
||||||
|
git clone git@github.com:jluttine/rofi-power-menu.git
|
||||||
|
cp rofi-power-menu ~/.local/bin/
|
||||||
|
```
|
||||||
|
|
||||||
|
The [xephyr](https://wiki.archlinux.org/index.php/Xephyr) package is for testing purposes.
|
||||||
|
|
||||||
|
[Nitrogen](https://wiki.archlinux.org/index.php/nitrogen) help us to set a cool wallpaper since Qtile doesn't have a wallpaper manager by default.
|
||||||
|
|
||||||
|
### For Debian, Ubuntu
|
||||||
|
|
||||||
|
For Debian, Ubuntu and derivates [here](http://docs.qtile.org/en/latest/manual/install/ubuntu.html) is the qtile installation guide.
|
||||||
|
|
||||||
|
#### Dependencies
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install picom rofi xserver-xephyr nitrogen
|
||||||
|
```
|
||||||
|
|
||||||
|
## Cloning the config files 📁
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone git@github.com:DaniDiazTech/Qtile-Config.git ~/.config/qtile
|
||||||
|
```
|
||||||
|
|
||||||
|
## Testing 🧪
|
||||||
|
|
||||||
|
If you want to test the config files without crashing your current qtile instance, type the following commands:
|
||||||
|
|
||||||
|
```
|
||||||
|
Xephyr -br -ac -noreset -screen 1280x720 :1 &
|
||||||
|
DISPLAY=:1 qtile "/PATH/TO/TEST-CONFIG"
|
||||||
|
```
|
||||||
|
|
||||||
|
Once you've done all these steps you should have a cool Qtile instance, but most keybindings won't work, because probably you don´t have the software I use, you could install [my software](https://github.com/DaniDiazTech/Qtile-Config/blob/main/software.txt) or re-map the keybindings in [keybindings.py](https://github.com/Daniel1404/Qtile-Config/blob/main/keybindings.py) file.
|
||||||
|
|
||||||
|
## Startup 🏁
|
||||||
|
|
||||||
|
One of the most important functions in the config is the startup function located at the bottom of _config.py_.
|
||||||
|
|
||||||
|
``` python
|
||||||
|
@hook.subscribe.startup_once
|
||||||
|
def start_once():
|
||||||
|
home = os.path.expanduser('~')
|
||||||
|
subprocess.call([home + '/.config/qtile/autostart.sh'])
|
||||||
|
```
|
||||||
|
|
||||||
|
You can manage the autostart applications editing the _autostart.sh_ file.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
#! /bin/bash
|
||||||
|
picom --experimental-backend &
|
||||||
|
nitrogen --restore &
|
||||||
|
```
|
||||||
|
|
||||||
|
You can setup your Qtile instance quickly using the `setup.py` file:
|
||||||
|
|
||||||
|
```python
|
||||||
|
python setup.py
|
||||||
|
```
|
||||||
|
|
||||||
|
Remember to set a wallpaper with nitrogen so every time you boot into Qtile, your wallpaper will be restored.
|
||||||
104
modules/wm/qtile/config/config.py
Normal file
|
|
@ -0,0 +1,104 @@
|
||||||
|
###############################################
|
||||||
|
### QTILE CONFIGURATION FILE OF DANIEL DIAZ ###
|
||||||
|
#
|
||||||
|
# ____ ____
|
||||||
|
# | _ \ | _ \ Copyright (c) 2020 Daniel Diaz
|
||||||
|
# | | | || | | |
|
||||||
|
# | |_| || |_| | http://www.github.com/DaniDiazTech/
|
||||||
|
# |____/ |____/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
####### IMPORTS #########
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
# from typing import List # noqa: F401
|
||||||
|
|
||||||
|
from libqtile import hook, layout
|
||||||
|
from libqtile.config import Group, Match
|
||||||
|
|
||||||
|
# Local Files
|
||||||
|
from keys.keybindings import Mouse,Keybindings
|
||||||
|
|
||||||
|
from widgets import MyWidgets
|
||||||
|
from layouts import Layouts
|
||||||
|
from groups import CreateGroups
|
||||||
|
from icons import group_icons
|
||||||
|
|
||||||
|
|
||||||
|
###### MAIN ######
|
||||||
|
if __name__ in ["config", "__main__"]:
|
||||||
|
# Initializes objects
|
||||||
|
|
||||||
|
# Initializes keybindings
|
||||||
|
obj_keys = Keybindings()
|
||||||
|
|
||||||
|
# Mouse
|
||||||
|
obj_mouse = Mouse()
|
||||||
|
obj_widgets = MyWidgets()
|
||||||
|
obj_layouts = Layouts()
|
||||||
|
obj_groups = CreateGroups()
|
||||||
|
|
||||||
|
# Initializes qtile variables
|
||||||
|
keys = obj_keys.init_keys()
|
||||||
|
mouse = obj_mouse.init_mouse()
|
||||||
|
layouts = obj_layouts.init_layouts()
|
||||||
|
groups = obj_groups.init_groups()
|
||||||
|
|
||||||
|
# Append group keys for groups
|
||||||
|
keys += obj_keys.init_keys_groups(group_icons)
|
||||||
|
|
||||||
|
### DISPLAYS WIDGETS IN THE SCREEN ####
|
||||||
|
|
||||||
|
screens = obj_widgets.init_screen()
|
||||||
|
main_widgets_list = obj_widgets.init_widgets_list()
|
||||||
|
widgets_screen1 = obj_widgets.init_widgets_screen()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dgroups_key_binder = None
|
||||||
|
|
||||||
|
dgroups_app_rules = [] # type: list
|
||||||
|
|
||||||
|
follow_mouse_focus = True
|
||||||
|
|
||||||
|
bring_front_click = False
|
||||||
|
|
||||||
|
cursor_warp = False
|
||||||
|
|
||||||
|
|
||||||
|
floating_layout = layout.Floating(float_rules=[
|
||||||
|
# Run the utility of `xprop` to see the wm class and name of an X client.
|
||||||
|
*layout.Floating.default_float_rules,
|
||||||
|
Match(wm_class='confirmreset'), # gitk
|
||||||
|
Match(wm_class='dialog'), # Dialogs stuff
|
||||||
|
Match(wm_class='makebranch'), # gitk
|
||||||
|
Match(wm_class='maketag'), # gitk
|
||||||
|
Match(wm_class='ssh-askpass'), # ssh-askpass
|
||||||
|
Match(title='branchdialog'), # gitk
|
||||||
|
Match(title='pinentry'), # GPG key password entry
|
||||||
|
])
|
||||||
|
auto_fullscreen = True
|
||||||
|
|
||||||
|
focus_on_window_activation = "smart"
|
||||||
|
|
||||||
|
reconfigure_screens = True
|
||||||
|
|
||||||
|
# If things like steam games want to auto-minimize themselves when losing
|
||||||
|
# focus, should we respect this or not?
|
||||||
|
respect_minimize_requests = True
|
||||||
|
|
||||||
|
# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this
|
||||||
|
wmname = "LG3D"
|
||||||
|
|
||||||
|
@hook.subscribe.startup_once
|
||||||
|
def start_once():
|
||||||
|
home = os.path.expanduser('~')
|
||||||
|
subprocess.call([home + '/.local/bin/autostart'])
|
||||||
|
|
||||||
|
@hook.subscribe.client_new
|
||||||
|
def dialogs(window):
|
||||||
|
if(window.window.get_wm_type() == 'dialog' or window.window.get_wm_transient_for()):
|
||||||
|
window.floating = True
|
||||||
117
modules/wm/qtile/config/config_keybindings.py
Normal file
|
|
@ -0,0 +1,117 @@
|
||||||
|
"""
|
||||||
|
MODIFY THIS FILE TO CREATE CUSTOM KEYBINDINGS
|
||||||
|
|
||||||
|
Keybindings are configured with tuples, inside Predifined lists Variables
|
||||||
|
|
||||||
|
Modifier -> list() -> Ex: [MOD, CONTROL]
|
||||||
|
|
||||||
|
Key -> str() -> Ex: 'j'
|
||||||
|
|
||||||
|
Command -> str() -> Ex: vscode
|
||||||
|
|
||||||
|
(Modifier, Key, Command)
|
||||||
|
"""
|
||||||
|
|
||||||
|
from libqtile.confreader import ConfigError
|
||||||
|
|
||||||
|
# Import default mod keys
|
||||||
|
from keys.default import *
|
||||||
|
|
||||||
|
from functions import PWA
|
||||||
|
|
||||||
|
from os.path import expanduser
|
||||||
|
|
||||||
|
HOME = expanduser("~")
|
||||||
|
|
||||||
|
# Define constants here
|
||||||
|
TERMINAL = "alacritty"
|
||||||
|
|
||||||
|
|
||||||
|
# Basic window manager movements
|
||||||
|
|
||||||
|
|
||||||
|
# Qtile shutdown/restart keys
|
||||||
|
SHUTDOWN_MODIFIER = [MOD, CONTROL]
|
||||||
|
RESTART = "r"
|
||||||
|
SHUTDOWN = "q"
|
||||||
|
|
||||||
|
|
||||||
|
# Group movement keys:
|
||||||
|
GROUPS_KEY = CONTROL
|
||||||
|
SWAP_GROUP_KEY = SHIFT
|
||||||
|
|
||||||
|
NEXT_GROUP = "period"
|
||||||
|
PREV_GROUP = "comma"
|
||||||
|
|
||||||
|
|
||||||
|
# ------------ Hardware Configs ------------
|
||||||
|
HARDWARE_KEYS = [
|
||||||
|
# (Modifier, Key, Command)
|
||||||
|
|
||||||
|
# Volume
|
||||||
|
([], "XF86AudioLowerVolume", "pactl set-sink-volume @DEFAULT_SINK@ -5%"),
|
||||||
|
([], "XF86AudioRaiseVolume", "pactl set-sink-volume @DEFAULT_SINK@ +5%"),
|
||||||
|
([], "XF86AudioMute", "pactl set-sink-mute @DEFAULT_SINK@ toggle"),
|
||||||
|
|
||||||
|
# Brightness
|
||||||
|
([], "XF86MonBrightnessUp", "brightnessctl set +5%"),
|
||||||
|
([], "XF86MonBrightnessDown", "brightnessctl set 5%-"),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
APPS = [
|
||||||
|
([MOD], "Return", TERMINAL),
|
||||||
|
# (Modifier, Key, Command)
|
||||||
|
([MOD], "e", "thunar"),
|
||||||
|
([MOD, ALT], "d", "emacs"),
|
||||||
|
([MOD, ALT], "o", "env LIBGL_ALWAYS_SOFTWARE=1 obs"),
|
||||||
|
([MOD, ALT], "v", "gvim"),
|
||||||
|
([MOD, ALT], "b", "brave"),
|
||||||
|
([MOD, ALT], "c", "code"),
|
||||||
|
([MOD, ALT], "p", "pycharm"),
|
||||||
|
([MOD, ALT], "a", "pavucontrol"),
|
||||||
|
([MOD, ALT], "e", "vim -g .config/qtile/config.py"),
|
||||||
|
([MOD, ALT], "z", "zoom"),
|
||||||
|
|
||||||
|
# Media hotkeys
|
||||||
|
([MOD], "Up", "pulseaudio-ctl up 5"),
|
||||||
|
([MOD], "Down", "pulseaudio-ctl down 5"),
|
||||||
|
|
||||||
|
# Makes reference to play-pause script
|
||||||
|
# You can find it in my scripts repository
|
||||||
|
([ALTGR], "space", "play-pause"),
|
||||||
|
|
||||||
|
# Run "rofi-theme-selector" in terminal to select a theme
|
||||||
|
([MOD], "space", 'rofi -modi "drun,power-menu:rofi-power-menu,run,window,ssh" -show drun -show-icons'),
|
||||||
|
|
||||||
|
# Screenshots
|
||||||
|
([], "Print", "xfce4-screenshooter"),
|
||||||
|
# Full screen screenshot
|
||||||
|
([ALT], "Print", "xfce4-screenshooter -f -c"),
|
||||||
|
|
||||||
|
# Terminal apps
|
||||||
|
([MOD, ALT], "n", TERMINAL + " -e nvim"),
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
##########################
|
||||||
|
# Your custom keys here #
|
||||||
|
##########################
|
||||||
|
|
||||||
|
CUSTOM_SPAWN_KEYS = [
|
||||||
|
# PWA keys
|
||||||
|
([MOD, ALT], "s", PWA.spotify()),
|
||||||
|
([MOD, ALT], "m", PWA.music()),
|
||||||
|
([MOD, ALT], "t", PWA.calendar()),
|
||||||
|
([MOD, ALT], "y", PWA.youtube()),
|
||||||
|
([MOD, ALT], "l", PWA.notion()),
|
||||||
|
([MOD, ALT], "h", PWA.habitica()),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
SPAWN_KEYS = HARDWARE_KEYS + APPS + CUSTOM_SPAWN_KEYS
|
||||||
|
|
||||||
|
SPAWN_CMD_KEYS = [
|
||||||
|
# Takes full screenshot and creates a file on the screenshot folder
|
||||||
|
([SHIFT], "Print", f"xfce4-screenshooter -f -s {HOME}/Pictures/Screenshots/"),
|
||||||
|
]
|
||||||
85
modules/wm/qtile/config/functions.py
Normal file
|
|
@ -0,0 +1,85 @@
|
||||||
|
from libqtile.lazy import lazy
|
||||||
|
# from libqtile.command_client import InteractiveCommandClient
|
||||||
|
|
||||||
|
|
||||||
|
class Functions:
|
||||||
|
|
||||||
|
##### MOVE WINDOW IN GROUPS #####
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def window_to_prev_group():
|
||||||
|
@lazy.function
|
||||||
|
def __inner(qtile):
|
||||||
|
i = qtile.groups.index(qtile.current_group)
|
||||||
|
|
||||||
|
if qtile.current_window and i != 0:
|
||||||
|
group = qtile.groups[i - 1].name
|
||||||
|
qtile.current_window.togroup(group, switch_group=True)
|
||||||
|
|
||||||
|
return __inner
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def window_to_next_group():
|
||||||
|
@lazy.function
|
||||||
|
def __inner(qtile):
|
||||||
|
i = qtile.groups.index(qtile.current_group)
|
||||||
|
|
||||||
|
if qtile.current_window and i != len(qtile.groups):
|
||||||
|
group = qtile.groups[i + 1].name
|
||||||
|
qtile.current_window.togroup(group, switch_group=True)
|
||||||
|
|
||||||
|
return __inner
|
||||||
|
|
||||||
|
##### KILL ALL WINDOWS #####
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def kill_all_windows():
|
||||||
|
@lazy.function
|
||||||
|
def __inner(qtile):
|
||||||
|
for window in qtile.current_group.windows:
|
||||||
|
window.kill()
|
||||||
|
|
||||||
|
return __inner
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def kill_all_windows_minus_current():
|
||||||
|
@lazy.function
|
||||||
|
def __inner(qtile):
|
||||||
|
for window in qtile.current_group.windows:
|
||||||
|
if window != qtile.current_window:
|
||||||
|
window.kill()
|
||||||
|
|
||||||
|
return __inner
|
||||||
|
|
||||||
|
|
||||||
|
class PWA:
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def notion():
|
||||||
|
return "brave --profile-directory=Default --app=https://notion.so"
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def music():
|
||||||
|
return "brave --profile-directory=Default --app=https://music.youtube.com/"
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def spotify():
|
||||||
|
return "brave --profile-directory=Default --app=https://open.spotify.com/"
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def youtube():
|
||||||
|
return "brave --user-data-dir=Default --app=https://www.youtube.com"
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def calendar():
|
||||||
|
return "brave --profile-directory=Default --app=https://calendar.google.com/calendar/"
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def habitica():
|
||||||
|
return "brave --profile-directory=Default --app=https://habitica.com/"
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
print("This is an utilities module")
|
||||||
17
modules/wm/qtile/config/groups.py
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
from libqtile.config import Group
|
||||||
|
from icons import group_icons
|
||||||
|
|
||||||
|
class CreateGroups:
|
||||||
|
group_names = group_icons
|
||||||
|
|
||||||
|
def init_groups(self):
|
||||||
|
"""
|
||||||
|
Return the groups of Qtile
|
||||||
|
"""
|
||||||
|
#### First and last
|
||||||
|
groups = [Group(name, layout="max") if name == self.group_names[0]
|
||||||
|
else Group(name, layout="floating")
|
||||||
|
if name == self.group_names[-1] else Group(name, layout="monadtall")
|
||||||
|
for name in self.group_names]
|
||||||
|
return groups
|
||||||
|
|
||||||
15
modules/wm/qtile/config/icons.py
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
|
# You can define a letter and its icon here
|
||||||
|
group_icons = ["B ",
|
||||||
|
"D ",
|
||||||
|
"T ",
|
||||||
|
"V ",
|
||||||
|
"M ",
|
||||||
|
"C ",
|
||||||
|
"E ",
|
||||||
|
"N ",
|
||||||
|
]
|
||||||
|
|
||||||
BIN
modules/wm/qtile/config/icons/layout-floating.png
Normal file
|
After Width: | Height: | Size: 232 B |
BIN
modules/wm/qtile/config/icons/layout-max.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/wm/qtile/config/icons/layout-monadtall.png
Normal file
|
After Width: | Height: | Size: 218 B |
BIN
modules/wm/qtile/config/icons/layout-tile.png
Normal file
|
After Width: | Height: | Size: 225 B |
BIN
modules/wm/qtile/config/icons/layout-treetab.png
Normal file
|
After Width: | Height: | Size: 212 B |
BIN
modules/wm/qtile/config/icons/python.png
Normal file
|
After Width: | Height: | Size: 746 B |
BIN
modules/wm/qtile/config/icons/terminal-iconx14.png
Normal file
|
After Width: | Height: | Size: 288 B |
BIN
modules/wm/qtile/config/icons/terminal-iconx24.png
Normal file
|
After Width: | Height: | Size: 365 B |
4
modules/wm/qtile/config/keys/assets.py
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
def create_keybinding():
|
||||||
|
"""
|
||||||
|
Returns a key object based on a dictionary
|
||||||
|
"""
|
||||||
60
modules/wm/qtile/config/keys/default.py
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
"""Qtile default keybindings"""
|
||||||
|
|
||||||
|
# Keys
|
||||||
|
MOD = "mod4"
|
||||||
|
ALT = "mod1"
|
||||||
|
ALTGR = "mod5"
|
||||||
|
SHIFT = "shift"
|
||||||
|
CONTROL = "control"
|
||||||
|
|
||||||
|
# Basic wm bindings
|
||||||
|
|
||||||
|
# All of these variables include the MOVEMENT_KEYS at the start
|
||||||
|
|
||||||
|
# The key which the WM will use to move the layouts
|
||||||
|
MOVEMENT_KEY = MOD
|
||||||
|
KILL_KEY = MOD
|
||||||
|
|
||||||
|
SWAP_KEY = SHIFT
|
||||||
|
FLOATING_KEY = SHIFT
|
||||||
|
|
||||||
|
|
||||||
|
############ BINDINGS FOR MONADTALL ##############
|
||||||
|
# Move between windows
|
||||||
|
LEFT = "h"
|
||||||
|
RIGHT = "l"
|
||||||
|
DOWN = "j"
|
||||||
|
UP = "k"
|
||||||
|
|
||||||
|
# Swap windows
|
||||||
|
SWAP_LEFT = "h"
|
||||||
|
SWAP_RIGHT = "l"
|
||||||
|
SWAP_DOWN = "j"
|
||||||
|
SWAP_UP = "k"
|
||||||
|
|
||||||
|
SWAP_FLIP = "space" # Flip the layout
|
||||||
|
|
||||||
|
########### LAYOUTS ###############
|
||||||
|
# Change windows lenght
|
||||||
|
GROW = "i"
|
||||||
|
SHRINK = "m"
|
||||||
|
NORMALIZE = "n"
|
||||||
|
MAXIMIZE = "o"
|
||||||
|
|
||||||
|
# Floating layout
|
||||||
|
TOOGLE_FLOATING = "f"
|
||||||
|
TOOGLE_FULL = "g"
|
||||||
|
|
||||||
|
# Groups key
|
||||||
|
# Move screen to next and previous group
|
||||||
|
NEXT = "k"
|
||||||
|
PREVIOUS = "j"
|
||||||
|
|
||||||
|
# Kill Functions
|
||||||
|
KILL_CURRENT = "w"
|
||||||
|
KILL_ALL = "x"
|
||||||
|
KILL_ALL_MINUS_CURRENT = "c"
|
||||||
|
|
||||||
|
# Rotates layouts
|
||||||
|
|
||||||
|
TOOGLE_LAYOUT = "Tab"
|
||||||
165
modules/wm/qtile/config/keys/keybindings.py
Normal file
|
|
@ -0,0 +1,165 @@
|
||||||
|
|
||||||
|
from libqtile.config import Click, Drag, Key
|
||||||
|
from libqtile.lazy import lazy
|
||||||
|
|
||||||
|
# Import the function that move the window to the next and prev group
|
||||||
|
from functions import Functions, PWA
|
||||||
|
|
||||||
|
from config_keybindings import *
|
||||||
|
|
||||||
|
|
||||||
|
class Keybindings:
|
||||||
|
|
||||||
|
keys = []
|
||||||
|
|
||||||
|
spawn_keys = SPAWN_KEYS
|
||||||
|
|
||||||
|
cmd_keys = SPAWN_CMD_KEYS
|
||||||
|
|
||||||
|
def create_layout_keys(self):
|
||||||
|
############ BINDINGS FOR MONADTALL ##############
|
||||||
|
modifier = [MOVEMENT_KEY]
|
||||||
|
|
||||||
|
layout_left = Key(modifier, LEFT, lazy.layout.left())
|
||||||
|
|
||||||
|
layout_right = Key(modifier, RIGHT, lazy.layout.right())
|
||||||
|
|
||||||
|
layout_down = Key(modifier, DOWN, lazy.layout.down())
|
||||||
|
|
||||||
|
layout_up = Key(modifier, UP, lazy.layout.up())
|
||||||
|
|
||||||
|
toogle_layout = Key(modifier, TOOGLE_LAYOUT, lazy.next_layout())
|
||||||
|
|
||||||
|
self.keys += [layout_left, layout_right, layout_down, layout_up, toogle_layout]
|
||||||
|
|
||||||
|
def create_swap_keys(self):
|
||||||
|
modifier = [MOVEMENT_KEY, SWAP_KEY]
|
||||||
|
|
||||||
|
left = Key(modifier, SWAP_LEFT, lazy.layout.swap_left())
|
||||||
|
right = Key(modifier, SWAP_RIGHT, lazy.layout.swap_right())
|
||||||
|
down = Key(modifier, SWAP_DOWN, lazy.layout.shuffle_down())
|
||||||
|
up = Key(modifier, SWAP_UP, lazy.layout.shuffle_up())
|
||||||
|
|
||||||
|
flip = Key(modifier, SWAP_FLIP, lazy.layout.flip())
|
||||||
|
|
||||||
|
self.keys += [left, right, down, up, flip]
|
||||||
|
|
||||||
|
|
||||||
|
def create_windows_keys(self):
|
||||||
|
|
||||||
|
modifier = [MOVEMENT_KEY]
|
||||||
|
|
||||||
|
grow = Key(modifier, GROW, lazy.layout.grow())
|
||||||
|
shrink = Key(modifier, SHRINK, lazy.layout.shrink())
|
||||||
|
normalize = Key(modifier, NORMALIZE, lazy.layout.normalize())
|
||||||
|
maximize = Key(modifier, MAXIMIZE, lazy.layout.maximize())
|
||||||
|
|
||||||
|
self.keys += [grow, shrink, normalize, maximize]
|
||||||
|
|
||||||
|
def create_shutdown_keys(self):
|
||||||
|
|
||||||
|
shutdown = Key(SHUTDOWN_MODIFIER, SHUTDOWN, lazy.shutdown())
|
||||||
|
restart = Key(SHUTDOWN_MODIFIER, RESTART, lazy.restart())
|
||||||
|
|
||||||
|
self.keys += [shutdown, restart]
|
||||||
|
|
||||||
|
def create_kill_keys(self):
|
||||||
|
modifier = [MOVEMENT_KEY, ALTGR]
|
||||||
|
|
||||||
|
all_minus_current = Key(modifier, KILL_ALL_MINUS_CURRENT,
|
||||||
|
Functions.kill_all_windows_minus_current())
|
||||||
|
all_ = Key(modifier, KILL_ALL,
|
||||||
|
Functions.kill_all_windows())
|
||||||
|
current = Key([KILL_KEY], KILL_CURRENT,
|
||||||
|
lazy.window.kill())
|
||||||
|
|
||||||
|
self.keys += [all_minus_current, all_, current]
|
||||||
|
|
||||||
|
def create_floating_keys(self):
|
||||||
|
|
||||||
|
modifier = [MOVEMENT_KEY, FLOATING_KEY]
|
||||||
|
|
||||||
|
floating = Key(modifier, TOOGLE_FLOATING, lazy.window.toggle_floating())
|
||||||
|
full = Key(modifier, TOOGLE_FULL, lazy.window.toggle_fullscreen())
|
||||||
|
|
||||||
|
self.keys += [floating, full]
|
||||||
|
|
||||||
|
def create_groups_keys(self):
|
||||||
|
modifier = [GROUPS_KEY]
|
||||||
|
swap_modifier = [GROUPS_KEY, SWAP_GROUP_KEY]
|
||||||
|
screen_modifier = [MOVEMENT_KEY]
|
||||||
|
|
||||||
|
move_next = Key(modifier, NEXT_GROUP, lazy.screen.next_group())
|
||||||
|
move_prev = Key(modifier, PREV_GROUP, lazy.screen.prev_group())
|
||||||
|
|
||||||
|
swap_next = Key(swap_modifier, NEXT_GROUP, Functions.window_to_next_group())
|
||||||
|
swap_prev = Key(swap_modifier, PREV_GROUP, Functions.window_to_prev_group())
|
||||||
|
|
||||||
|
move_next_screen = Key(screen_modifier, NEXT_GROUP, lazy.next_screen())
|
||||||
|
move_prev_screen = Key(screen_modifier, PREV_GROUP, lazy.next_screen())
|
||||||
|
|
||||||
|
self.keys += [move_next, move_prev, swap_next, swap_prev, move_next_screen, move_prev_screen]
|
||||||
|
|
||||||
|
def create_spawn_keys(self):
|
||||||
|
|
||||||
|
for spawn_key in self.spawn_keys:
|
||||||
|
|
||||||
|
modifier, key, command = spawn_key
|
||||||
|
|
||||||
|
keybinding = Key(modifier, key, lazy.spawn(command))
|
||||||
|
|
||||||
|
self.keys.append(keybinding)
|
||||||
|
|
||||||
|
def create_cmd_keys(self):
|
||||||
|
|
||||||
|
for cmd_key in self.cmd_keys:
|
||||||
|
|
||||||
|
modifier, key, command = cmd_key
|
||||||
|
|
||||||
|
keybinding = Key(modifier, key, lazy.spawncmd(command))
|
||||||
|
|
||||||
|
self.keys.append(keybinding)
|
||||||
|
|
||||||
|
|
||||||
|
def init_keys_groups(self, group_names):
|
||||||
|
"""
|
||||||
|
Create bindings to move between groups
|
||||||
|
"""
|
||||||
|
group_keys = []
|
||||||
|
for icon in group_names:
|
||||||
|
index = (icon[0]).lower()
|
||||||
|
|
||||||
|
group_keys += [Key([MOVEMENT_KEY, GROUPS_KEY], index, lazy.group[icon].toscreen()), Key(
|
||||||
|
[MOVEMENT_KEY, SWAP_GROUP_KEY], index, lazy.window.togroup(icon, switch_group=True))]
|
||||||
|
|
||||||
|
return group_keys
|
||||||
|
|
||||||
|
def init_keys(self):
|
||||||
|
|
||||||
|
self.create_layout_keys()
|
||||||
|
self.create_swap_keys()
|
||||||
|
self.create_windows_keys()
|
||||||
|
self.create_shutdown_keys()
|
||||||
|
self.create_kill_keys()
|
||||||
|
self.create_floating_keys()
|
||||||
|
self.create_groups_keys()
|
||||||
|
|
||||||
|
self.create_cmd_keys()
|
||||||
|
self.create_spawn_keys()
|
||||||
|
|
||||||
|
return self.keys
|
||||||
|
|
||||||
|
|
||||||
|
class Mouse:
|
||||||
|
def __init__(self, mod_key=MOD):
|
||||||
|
self.mod = mod_key
|
||||||
|
|
||||||
|
def init_mouse(self):
|
||||||
|
mouse = [
|
||||||
|
Drag([self.mod], "Button1", lazy.window.set_position_floating(),
|
||||||
|
start=lazy.window.get_position()),
|
||||||
|
Drag([self.mod], "Button3", lazy.window.set_size_floating(),
|
||||||
|
start=lazy.window.get_size()),
|
||||||
|
Click([self.mod], "Button2", lazy.window.bring_to_front())
|
||||||
|
]
|
||||||
|
return mouse
|
||||||
15
modules/wm/qtile/config/keys/print_keybindings.py
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
"""
|
||||||
|
Script that automates the process of writing a keybindings.md
|
||||||
|
By directly getting the keybindings from keybindings.py
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Local import
|
||||||
|
from keybindings import Keybindings
|
||||||
|
|
||||||
|
def get_keybindings():
|
||||||
|
current_keybindings = Keybindings()
|
||||||
|
list_of_keys = list(current_keybindings.init_keys())
|
||||||
|
return list_of_keys
|
||||||
|
|
||||||
|
|
||||||
|
print(*get_keybindings(), sep="\n")
|
||||||
51
modules/wm/qtile/config/layouts.py
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
from libqtile import layout
|
||||||
|
|
||||||
|
|
||||||
|
class Layouts:
|
||||||
|
def __init__(self):
|
||||||
|
self.default = {
|
||||||
|
"border_width": 2,
|
||||||
|
"margin": 8,
|
||||||
|
"border_focus": "#668bd7",
|
||||||
|
"border_normal": "1D2330"}
|
||||||
|
|
||||||
|
def init_layouts(self):
|
||||||
|
"""
|
||||||
|
Returns the layouts variable
|
||||||
|
"""
|
||||||
|
layouts = [
|
||||||
|
layout.Max(**self.default),
|
||||||
|
layout.MonadTall(**self.default),
|
||||||
|
layout.floating.Floating(**self.default),
|
||||||
|
layout.TreeTab(
|
||||||
|
font="Ubuntu",
|
||||||
|
fontsize=10,
|
||||||
|
sections=["FIRST", "SECOND", "THIRD", "FOURTH"],
|
||||||
|
section_fontsize=10,
|
||||||
|
border_width=2,
|
||||||
|
bg_color="1c1f24",
|
||||||
|
active_bg="c678dd",
|
||||||
|
active_fg="000000",
|
||||||
|
inactive_bg="a9a1e1",
|
||||||
|
inactive_fg="1c1f24",
|
||||||
|
padding_left=0,
|
||||||
|
padding_x=0,
|
||||||
|
padding_y=5,
|
||||||
|
section_top=10,
|
||||||
|
section_bottom=20,
|
||||||
|
level_shift=8,
|
||||||
|
vspace=3,
|
||||||
|
panel_width=200
|
||||||
|
),
|
||||||
|
# layout.Stack(num_stacks=2),
|
||||||
|
# Try more layouts by unleashing below layouts.
|
||||||
|
# layout.Bsp(),
|
||||||
|
# layout.Columns(),
|
||||||
|
# layout.Matrix(),
|
||||||
|
# layout.MonadWide(**self.default),
|
||||||
|
# layout.RatioTile(),
|
||||||
|
# layout.Tile(),
|
||||||
|
# layout.VerticalTile(),
|
||||||
|
# layout.Zoomy(),
|
||||||
|
]
|
||||||
|
return layouts
|
||||||
26
modules/wm/qtile/config/scripts/autostart.sh
Executable file
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# ---
|
||||||
|
# Use "run program" to run it only if it is not already running
|
||||||
|
# Use "program &" to run it regardless
|
||||||
|
# ---
|
||||||
|
# NOTE: This script runs with every restart of AwesomeWM
|
||||||
|
# TODO: run_once
|
||||||
|
|
||||||
|
|
||||||
|
function run {
|
||||||
|
if ! pgrep $1 > /dev/null ;
|
||||||
|
then
|
||||||
|
$@&
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
run picom -CGb &
|
||||||
|
run nitrogen --restore &
|
||||||
|
run /usr/lib/polkit-kde-authentication-agent-1 &
|
||||||
|
run megasync
|
||||||
|
run xfce4-clipman
|
||||||
|
run xfce4-power-manager
|
||||||
|
run gammy
|
||||||
|
run dunst
|
||||||
|
run nm-applet
|
||||||
|
run blueman-applet
|
||||||
4
modules/wm/qtile/config/scripts/play-pause.sh
Executable file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
playerctl play-pause
|
||||||
|
|
||||||
225
modules/wm/qtile/config/setup.py
Executable file
|
|
@ -0,0 +1,225 @@
|
||||||
|
# /usr/bin/python
|
||||||
|
|
||||||
|
# Os level operations
|
||||||
|
import os
|
||||||
|
from getpass import getuser
|
||||||
|
|
||||||
|
# Determinates if the program is installed
|
||||||
|
from shutil import which
|
||||||
|
|
||||||
|
# Get the OS I'm in
|
||||||
|
import platform
|
||||||
|
|
||||||
|
INSTALL_PATH = ".local/bin"
|
||||||
|
|
||||||
|
|
||||||
|
def print_program_welcome():
|
||||||
|
|
||||||
|
row = "=" * 55
|
||||||
|
|
||||||
|
sep = "||"
|
||||||
|
|
||||||
|
welcome = "SETUP SCRIPT OF DANIEL'S QTILE CONFIG".center(len(row) - len(sep) * 2)
|
||||||
|
|
||||||
|
welcome = sep + welcome + sep
|
||||||
|
|
||||||
|
|
||||||
|
print(row)
|
||||||
|
|
||||||
|
print("")
|
||||||
|
|
||||||
|
|
||||||
|
print(welcome)
|
||||||
|
|
||||||
|
print("")
|
||||||
|
|
||||||
|
print(row + "\n")
|
||||||
|
|
||||||
|
print(f"Hi there {getuser()}, you are about to setup Qtile".center(len(row)))
|
||||||
|
|
||||||
|
print("\n" + row)
|
||||||
|
|
||||||
|
|
||||||
|
def print_current_dir():
|
||||||
|
print(f"Currently you are in {os.getcwd()} directory")
|
||||||
|
|
||||||
|
def get_correct_os():
|
||||||
|
"""
|
||||||
|
Returns the Os name:
|
||||||
|
|
||||||
|
get_os -> bool
|
||||||
|
|
||||||
|
Linux: linux
|
||||||
|
Mac: darwin
|
||||||
|
Windows: windows
|
||||||
|
"""
|
||||||
|
os = platform.system().lower()
|
||||||
|
|
||||||
|
return os == "linux"
|
||||||
|
|
||||||
|
|
||||||
|
def get_home_path():
|
||||||
|
"""
|
||||||
|
Get Linux home path
|
||||||
|
|
||||||
|
get_home_path -> str
|
||||||
|
"""
|
||||||
|
return os.path.expanduser("~")
|
||||||
|
|
||||||
|
def get_local_bin(home):
|
||||||
|
"""
|
||||||
|
Returns the local bin path of the User
|
||||||
|
"""
|
||||||
|
return f"{home}/.local/bin"
|
||||||
|
|
||||||
|
def check_local_folder_exists():
|
||||||
|
"""
|
||||||
|
Check if .local/bin exists
|
||||||
|
"""
|
||||||
|
home = get_home_path()
|
||||||
|
|
||||||
|
local = get_local_bin(home)
|
||||||
|
|
||||||
|
return os.path.exists(local)
|
||||||
|
|
||||||
|
|
||||||
|
def create_local_install_folder(local_bin):
|
||||||
|
"""
|
||||||
|
Creates local bin folder
|
||||||
|
"""
|
||||||
|
print("")
|
||||||
|
print(f"Creating folder ar {local_bin}")
|
||||||
|
print("")
|
||||||
|
|
||||||
|
try:
|
||||||
|
os.mkdir(local_bin)
|
||||||
|
except OSError:
|
||||||
|
raise OSError(f"Creation of the directory {local_bin} failed")
|
||||||
|
else:
|
||||||
|
print(f"Successfully created the directory {local_bin}")
|
||||||
|
|
||||||
|
def get_response(message="yes/no"):
|
||||||
|
"""
|
||||||
|
returns -> bool
|
||||||
|
"""
|
||||||
|
while True:
|
||||||
|
response = input(message).lower()
|
||||||
|
|
||||||
|
if response == "yes":
|
||||||
|
return True
|
||||||
|
elif response == "no":
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
print("\nSorry your response must be yes or no\n")
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
LOCAL_BIN = get_local_bin(get_home_path())
|
||||||
|
|
||||||
|
def link_scripts(path):
|
||||||
|
|
||||||
|
path = os.path.abspath(path)
|
||||||
|
if not os.path.exists(path):
|
||||||
|
raise OSError("Sorry that path doesn't exist")
|
||||||
|
|
||||||
|
|
||||||
|
os.chdir(path)
|
||||||
|
|
||||||
|
i = 0
|
||||||
|
|
||||||
|
|
||||||
|
for file_ in os.listdir(path):
|
||||||
|
file_path = os.path.abspath(file_)
|
||||||
|
|
||||||
|
file_name = file_.split(".")[0]
|
||||||
|
|
||||||
|
link_path = LOCAL_BIN + f"/{file_name}"
|
||||||
|
|
||||||
|
if os.path.exists(link_path):
|
||||||
|
print("You have already in path", file_name)
|
||||||
|
continue
|
||||||
|
|
||||||
|
os.link(file_path, link_path)
|
||||||
|
|
||||||
|
i += 1
|
||||||
|
|
||||||
|
return f"Linked {i} files to .local/bin"
|
||||||
|
|
||||||
|
|
||||||
|
def get_dependencies(software_path="software.txt"):
|
||||||
|
"""software_path -> path of software.txt
|
||||||
|
|
||||||
|
returns list of dependencies
|
||||||
|
"""
|
||||||
|
|
||||||
|
if not os.path.exists(software_path):
|
||||||
|
print(f"The file {software_path} wasn't found. Please clone again or provide one")
|
||||||
|
|
||||||
|
if get_response("Continue without dependencies warnings? [yes/no]"):
|
||||||
|
print("Dependencies won't be shown")
|
||||||
|
return None
|
||||||
|
else:
|
||||||
|
print("Clone again or provide a file.")
|
||||||
|
exit()
|
||||||
|
|
||||||
|
software = []
|
||||||
|
|
||||||
|
with open(software_path, "r") as file_:
|
||||||
|
for line in file_:
|
||||||
|
software.append(line.strip())
|
||||||
|
|
||||||
|
return software
|
||||||
|
|
||||||
|
def check_dependencies(dependencies=None):
|
||||||
|
"""dependencies -> list
|
||||||
|
|
||||||
|
returns -> str programs that aren't installed
|
||||||
|
"""
|
||||||
|
if dependencies is None:
|
||||||
|
return ""
|
||||||
|
|
||||||
|
not_installed = []
|
||||||
|
|
||||||
|
for program in dependencies:
|
||||||
|
if which(program) is not None:
|
||||||
|
continue
|
||||||
|
|
||||||
|
not_installed.append(program)
|
||||||
|
|
||||||
|
first_row = "The following software is not installed, some scripts may not work\n"
|
||||||
|
|
||||||
|
if not_installed:
|
||||||
|
return first_row + "\n".join(not_installed)
|
||||||
|
else:
|
||||||
|
return ""
|
||||||
|
|
||||||
|
def main():
|
||||||
|
|
||||||
|
print_program_welcome()
|
||||||
|
|
||||||
|
if not get_correct_os():
|
||||||
|
raise OSError("Sorry Qtile is only supported in Linux")
|
||||||
|
|
||||||
|
if not check_local_folder_exists():
|
||||||
|
print("\n.local/bin folder doesn't exists\n")
|
||||||
|
|
||||||
|
response = get_response(message="Do you want to create that directory [yes, no] >> ")
|
||||||
|
|
||||||
|
if not response:
|
||||||
|
print("Setup can't continue if .local/bin doesn't exists")
|
||||||
|
print("Rerun the script or set up the scripts manually")
|
||||||
|
exit()
|
||||||
|
|
||||||
|
print("Creating .local/bin/folder")
|
||||||
|
create_local_install_folder(LOCAL_BIN)
|
||||||
|
|
||||||
|
|
||||||
|
dependencies = get_dependencies()
|
||||||
|
scripts_path = "./scripts"
|
||||||
|
print(check_dependencies(dependencies=dependencies))
|
||||||
|
print(link_scripts(path=scripts_path))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
11
modules/wm/qtile/config/software.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
picom
|
||||||
|
nitrogen
|
||||||
|
megasync
|
||||||
|
xfce4-clipman-plugin
|
||||||
|
playerctl
|
||||||
|
pulseaudio-ctl
|
||||||
|
bat
|
||||||
|
python-psutil
|
||||||
|
alacritty
|
||||||
|
brave-browser
|
||||||
|
lxappearance-gtk3
|
||||||
456
modules/wm/qtile/config/widgets.py
Normal file
|
|
@ -0,0 +1,456 @@
|
||||||
|
import os
|
||||||
|
from libqtile import bar, widget
|
||||||
|
from libqtile.lazy import lazy
|
||||||
|
from libqtile.config import Screen
|
||||||
|
|
||||||
|
from functions import PWA
|
||||||
|
# widget_defaults = dict(
|
||||||
|
# font="Ubuntu Mono",
|
||||||
|
# fontsize = 12,
|
||||||
|
# padding = 2,
|
||||||
|
# background=colors[2]
|
||||||
|
# )
|
||||||
|
|
||||||
|
# extension_defaults = widget_defaults.copy()
|
||||||
|
|
||||||
|
|
||||||
|
class MyWidgets:
|
||||||
|
def __init__(self):
|
||||||
|
self.colors = [["#292d3e", "#292d3e"], # panel background
|
||||||
|
# background for current screen tab
|
||||||
|
["#434758", "#434758"],
|
||||||
|
["#ffffff", "#ffffff"], # font color for group names
|
||||||
|
# border line color for current tab
|
||||||
|
["#bc13fe", "#bc13fe"], # Group down color
|
||||||
|
# border line color for other tab and odd widgets
|
||||||
|
["#8d62a9", "#8d62a9"],
|
||||||
|
["#668bd7", "#668bd7"], # color for the even widgets
|
||||||
|
["#e1acff", "#e1acff"], # window name
|
||||||
|
|
||||||
|
["#000000", "#000000"],
|
||||||
|
["#AD343E", "#AD343E"],
|
||||||
|
["#f76e5c", "#f76e5c"],
|
||||||
|
["#F39C12", "#F39C12"],
|
||||||
|
["#F7DC6F", "#F7DC6F"],
|
||||||
|
["#f1ffff", "#f1ffff"],
|
||||||
|
["#4c566a", "#4c566a"], ]
|
||||||
|
|
||||||
|
self.termite = "alacritty"
|
||||||
|
|
||||||
|
def init_widgets_list(self):
|
||||||
|
'''
|
||||||
|
Function that returns the desired widgets in form of list
|
||||||
|
'''
|
||||||
|
widgets_list = [
|
||||||
|
widget.Sep(
|
||||||
|
linewidth=0,
|
||||||
|
padding=5,
|
||||||
|
foreground=self.colors[2],
|
||||||
|
background=self.colors[0]
|
||||||
|
),
|
||||||
|
widget.GroupBox(
|
||||||
|
font="Ubuntu Bold",
|
||||||
|
fontsize=12,
|
||||||
|
margin_y=2,
|
||||||
|
margin_x=0,
|
||||||
|
padding_y=5,
|
||||||
|
padding_x=3,
|
||||||
|
borderwidth=3,
|
||||||
|
active=self.colors[-2],
|
||||||
|
inactive=self.colors[-1],
|
||||||
|
# rounded=True,
|
||||||
|
rounded=False,
|
||||||
|
# highlight_color=self.colors[9],
|
||||||
|
# highlight_method="line",
|
||||||
|
highlight_method='block',
|
||||||
|
urgent_alert_method='block',
|
||||||
|
# urgent_border=self.colors[9],
|
||||||
|
this_current_screen_border=self.colors[9],
|
||||||
|
this_screen_border=self.colors[4],
|
||||||
|
other_current_screen_border=self.colors[0],
|
||||||
|
other_screen_border=self.colors[0],
|
||||||
|
foreground=self.colors[2],
|
||||||
|
background=self.colors[0],
|
||||||
|
disable_drag=True
|
||||||
|
),
|
||||||
|
# widget.Prompt(
|
||||||
|
# prompt=lazy.spawncmd(),
|
||||||
|
# font="Ubuntu Mono",
|
||||||
|
# padding=10,
|
||||||
|
# foreground=self.colors[3],
|
||||||
|
# background=self.colors[1]
|
||||||
|
# ),
|
||||||
|
widget.Sep(
|
||||||
|
linewidth=0,
|
||||||
|
padding=25,
|
||||||
|
foreground=self.colors[2],
|
||||||
|
background=self.colors[0]
|
||||||
|
),
|
||||||
|
widget.WindowName(
|
||||||
|
foreground=self.colors[6],
|
||||||
|
background=self.colors[0],
|
||||||
|
padding=5
|
||||||
|
),
|
||||||
|
widget.Systray(
|
||||||
|
background=self.colors[0],
|
||||||
|
padding=5
|
||||||
|
),
|
||||||
|
# widget.TextBox(
|
||||||
|
# font="Ubuntu Bold",
|
||||||
|
# text='',
|
||||||
|
# background=self.colors[0],
|
||||||
|
# foreground=self.colors[11],
|
||||||
|
# padding=0,
|
||||||
|
# fontsize=37
|
||||||
|
# ),
|
||||||
|
widget.Battery(
|
||||||
|
charge_char='+', discharge_char='-', error_message='error',
|
||||||
|
format='{percent:2.0%} ({char}{hour:d}:{min:02d})', hide_threshold=None,
|
||||||
|
low_percentage=0.1, foreground=self.colors[7], background=self.colors[10], update_delay=10),
|
||||||
|
widget.TextBox(
|
||||||
|
text=" 🖬",
|
||||||
|
foreground=self.colors[7],
|
||||||
|
background=self.colors[11],
|
||||||
|
padding=0,
|
||||||
|
fontsize=14
|
||||||
|
),
|
||||||
|
widget.Memory(
|
||||||
|
foreground=self.colors[7],
|
||||||
|
background=self.colors[11],
|
||||||
|
mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(
|
||||||
|
self.termite + ' -e htop')},
|
||||||
|
padding=5
|
||||||
|
),
|
||||||
|
widget.ThermalSensor(
|
||||||
|
# interface="enp5s0",
|
||||||
|
# fmt='Net: {down} ↓↑ {up}',
|
||||||
|
foreground=self.colors[7],
|
||||||
|
background=self.colors[9],
|
||||||
|
padding=5
|
||||||
|
),
|
||||||
|
# widget.TextBox(
|
||||||
|
# text='',
|
||||||
|
# background=self.colors[11],
|
||||||
|
# foreground=self.colors[10],
|
||||||
|
# padding=0,
|
||||||
|
# fontsize=37
|
||||||
|
# ),
|
||||||
|
widget.TextBox(
|
||||||
|
text=" ",
|
||||||
|
foreground=self.colors[7],
|
||||||
|
background=self.colors[10],
|
||||||
|
padding=0,
|
||||||
|
mouse_callbacks={
|
||||||
|
"Button1": lambda: qtile.cmd_spawn("pavucontrol")}
|
||||||
|
),
|
||||||
|
widget.Volume(
|
||||||
|
foreground=self.colors[7],
|
||||||
|
background=self.colors[10],
|
||||||
|
padding=5
|
||||||
|
),
|
||||||
|
# widget.TextBox(
|
||||||
|
# text='',
|
||||||
|
# background=self.colors[10],
|
||||||
|
# foreground=self.colors[9],
|
||||||
|
# padding=0,
|
||||||
|
# fontsize=37
|
||||||
|
# ),
|
||||||
|
widget.CurrentLayoutIcon(
|
||||||
|
custom_icon_paths=[os.path.expanduser(
|
||||||
|
"~/.config/qtile/icons")],
|
||||||
|
foreground=self.colors[0],
|
||||||
|
background=self.colors[9],
|
||||||
|
padding=0,
|
||||||
|
scale=0.7
|
||||||
|
),
|
||||||
|
widget.CurrentLayout(
|
||||||
|
foreground=self.colors[7],
|
||||||
|
background=self.colors[9],
|
||||||
|
padding=5
|
||||||
|
),
|
||||||
|
# widget.TextBox(
|
||||||
|
# text='',
|
||||||
|
# foreground=self.colors[8],
|
||||||
|
# background=self.colors[9],
|
||||||
|
# padding=0,
|
||||||
|
# fontsize=37
|
||||||
|
# ),
|
||||||
|
widget.Clock(
|
||||||
|
foreground=self.colors[7],
|
||||||
|
background=self.colors[8],
|
||||||
|
mouse_callbacks={
|
||||||
|
"Button1": lambda qtile: qtile.cmd_spawn(PWA.calendar())},
|
||||||
|
format="%A %d - %H:%M"
|
||||||
|
),
|
||||||
|
widget.Sep(
|
||||||
|
linewidth=0,
|
||||||
|
padding=10,
|
||||||
|
foreground=self.colors[0],
|
||||||
|
background=self.colors[8]
|
||||||
|
),
|
||||||
|
]
|
||||||
|
return widgets_list
|
||||||
|
|
||||||
|
def init_widgets_screen(self):
|
||||||
|
'''
|
||||||
|
Function that returns the widgets in a list.
|
||||||
|
It can be modified so it is useful if you have a multimonitor system
|
||||||
|
'''
|
||||||
|
widgets_screen = self.init_widgets_list()
|
||||||
|
return widgets_screen
|
||||||
|
|
||||||
|
def init_widgets_screen2(self):
|
||||||
|
'''
|
||||||
|
Function that returns the widgets in a list.
|
||||||
|
It can be modified so it is useful if you have a multimonitor system
|
||||||
|
'''
|
||||||
|
widgets_screen2 = self.init_widgets_screen()
|
||||||
|
return widgets_screen2
|
||||||
|
|
||||||
|
def init_screen(self):
|
||||||
|
'''
|
||||||
|
Init the widgets in the screen
|
||||||
|
'''
|
||||||
|
return [Screen(top=bar.Bar(widgets=self.init_widgets_screen(), opacity=1.0, size=20)),
|
||||||
|
Screen(top=bar.Bar(
|
||||||
|
widgets=self.init_widgets_screen2(), opacity=1.0, size=20))
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
# bar = Bar([
|
||||||
|
# Sep(
|
||||||
|
# linewidth = 0,
|
||||||
|
# padding = 2,
|
||||||
|
# foreground = onedark_darker["color4"],
|
||||||
|
# background = onedark_darker["color4"]
|
||||||
|
# ),
|
||||||
|
# Image(
|
||||||
|
# filename = "~/.config/qtile/icons/archlinux_blue.png",
|
||||||
|
# scale = "False",
|
||||||
|
# mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn("alacritty")},
|
||||||
|
# background = onedark_darker["color4"],
|
||||||
|
# ),
|
||||||
|
# #widget.Sep(
|
||||||
|
# # linewidth = 0,
|
||||||
|
# # padding = 2,
|
||||||
|
# # foreground = onedark_darker["colorback"],
|
||||||
|
# # background = onedark_darker["colorback"]
|
||||||
|
# #),
|
||||||
|
# right_arrow(onedark_darker["color4"], onedark_darker["colorback"]),
|
||||||
|
# GroupBox(
|
||||||
|
# font = "JetBrains Nerd Font Mono Bold",
|
||||||
|
# fontsize = 12,
|
||||||
|
# fmt = '{}',
|
||||||
|
# borderwidth = 2,
|
||||||
|
# background = onedark_darker["colorback"],
|
||||||
|
# active = onedark_darker["color6"],
|
||||||
|
# inactive = onedark_darker["color5"],
|
||||||
|
# rounded = False,
|
||||||
|
# #Block_highlight_text_color = onedark_darker["color3"],
|
||||||
|
# highlight_method = 'line',
|
||||||
|
# highlight_color = onedark_darker["colorback"], # line block colour
|
||||||
|
# this_current_screen_border = onedark_darker["color4"],
|
||||||
|
# this_screen_border = onedark_darker["color7"],
|
||||||
|
# urgent_alert_method = 'line',
|
||||||
|
# urgent_border = onedark_darker["color10"],
|
||||||
|
# urgent_text = onedark_darker["color14"],
|
||||||
|
# disable_drag = True,
|
||||||
|
# ),
|
||||||
|
# right_arrow(onedark_darker["colorback"], onedark_darker["color14"]),
|
||||||
|
# CurrentLayoutIcon(
|
||||||
|
# custom_icon_paths = [os.path.expanduser("~/.config/qtile/icons")],
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# background = onedark_darker["color14"],
|
||||||
|
# padding = 0,
|
||||||
|
# scale = 0.7
|
||||||
|
# ),
|
||||||
|
# CurrentLayout(
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# background = onedark_darker["color14"],
|
||||||
|
# padding = 5,
|
||||||
|
# ),
|
||||||
|
# right_arrow(onedark_darker["color14"], onedark_darker["color9"]),
|
||||||
|
# TextBox(
|
||||||
|
# text = '',
|
||||||
|
# font = "Font Awesome 6 Free Solid",
|
||||||
|
# fontsize = 15,
|
||||||
|
# background = onedark_darker["color9"],
|
||||||
|
# foreground = onedark_darker["color4"],
|
||||||
|
# padding = 2
|
||||||
|
# ),
|
||||||
|
# WindowCount(
|
||||||
|
# format = ' {num} ',
|
||||||
|
# background = onedark_darker["color9"],
|
||||||
|
# foreground = onedark_darker["color4"],
|
||||||
|
# show_zero = True,
|
||||||
|
# ),
|
||||||
|
# right_arrow(onedark_darker["color9"], onedark_darker["color1"]),
|
||||||
|
# WindowName(
|
||||||
|
# foreground = onedark_darker["color5"],
|
||||||
|
# background = onedark_darker["color1"],
|
||||||
|
# padding = 5,
|
||||||
|
# format = '[ {name} ]',
|
||||||
|
# empty_group_string = '[ ]',
|
||||||
|
# parse_text = parse_func,
|
||||||
|
# ),
|
||||||
|
# #widget.Spacer(),
|
||||||
|
# Sep(
|
||||||
|
# linewidth = 0,
|
||||||
|
# padding = 6,
|
||||||
|
# foreground = onedark_darker["color1"],
|
||||||
|
# background = onedark_darker["color1"],
|
||||||
|
# ),
|
||||||
|
# left_arrow(onedark_darker["color2"], onedark_darker["color1"]),
|
||||||
|
# TextBox(
|
||||||
|
# text = '',
|
||||||
|
# font = "Font Awesome 6 Free Solid",
|
||||||
|
# fontsize = 15,
|
||||||
|
# padding = 2,
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# background = onedark_darker["color2"],
|
||||||
|
# ),
|
||||||
|
# Net(
|
||||||
|
# interface = "wlp44s0",
|
||||||
|
# format = '{down} {up}',
|
||||||
|
# prefix = 'M',
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# background = onedark_darker["color2"],
|
||||||
|
# padding = 5,
|
||||||
|
# ),
|
||||||
|
# left_arrow(onedark_darker["color3"], onedark_darker["color2"]),
|
||||||
|
# TextBox(
|
||||||
|
# text = '',
|
||||||
|
# font = "Font Awesome 6 Free Solid",
|
||||||
|
# fontsize = 15,
|
||||||
|
# padding = 2,
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# background = onedark_darker["color3"]
|
||||||
|
# ),
|
||||||
|
# CPU(
|
||||||
|
# background = onedark_darker["color3"],
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# fmt = 'Cpu: {}',
|
||||||
|
# #format = '{freq_current}GHz {load_percent}%',
|
||||||
|
# format = '[ {load_percent} ]%',
|
||||||
|
# padding = 5,
|
||||||
|
# ),
|
||||||
|
# left_arrow(onedark_darker["color4"], onedark_darker["color3"]),
|
||||||
|
# TextBox(
|
||||||
|
# text = '',
|
||||||
|
# font = "Font Awesome 6 Free Solid",
|
||||||
|
# fontsize = 15,
|
||||||
|
# padding = 2,
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# background = onedark_darker["color4"]
|
||||||
|
# ),
|
||||||
|
# ThermalSensor(
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# background = onedark_darker["color4"],
|
||||||
|
# threshold = 90,
|
||||||
|
# fmt = 'Temp: {}',
|
||||||
|
# format='[ {temp:.0f}{unit} ]',
|
||||||
|
# padding = 5,
|
||||||
|
# ),
|
||||||
|
# left_arrow(onedark_darker["color5"], onedark_darker["color4"]),
|
||||||
|
# TextBox(
|
||||||
|
# text = '',
|
||||||
|
# font = "Font Awesome 6 Free Solid",
|
||||||
|
# fontsize = 15,
|
||||||
|
# padding = 2,
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# background = onedark_darker["color5"]
|
||||||
|
# ),
|
||||||
|
# Memory(
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# background = onedark_darker["color5"],
|
||||||
|
# #mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')},
|
||||||
|
# fmt = 'Mem: {}',
|
||||||
|
# #format = '{MemUsed: .0f}{mm}/{MemTotal: .0f}{mm}',
|
||||||
|
# format = '[ {MemUsed:.0f} ]{mm}',
|
||||||
|
# padding = 5,
|
||||||
|
# ),
|
||||||
|
# left_arrow(onedark_darker["color6"], onedark_darker["color5"]),
|
||||||
|
# TextBox(
|
||||||
|
# text = '',
|
||||||
|
# font = "Font Awesome 6 Free Solid",
|
||||||
|
# fontsize = 15,
|
||||||
|
# padding = 2,
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# background = onedark_darker["color6"]
|
||||||
|
# ),
|
||||||
|
# Battery(
|
||||||
|
# padding = 5,
|
||||||
|
# background = onedark_darker["color6"],
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# charge_char = 'AC',
|
||||||
|
# discharge_char = '',
|
||||||
|
# empty_char = 'ﮣ',
|
||||||
|
# full_char = 'ﭹ',
|
||||||
|
# fmt = 'Bat: {}',
|
||||||
|
# format = '{char}[ {percent:2.0%} ]', #{hour:d}:{min:02d} {watt:.2f} W'
|
||||||
|
# #low_background = none,
|
||||||
|
# low_forground = '#ff0000',
|
||||||
|
# update_interval = 60,
|
||||||
|
# ),
|
||||||
|
# #battery,
|
||||||
|
|
||||||
|
# left_arrow(onedark_darker["color7"], onedark_darker["color6"]),
|
||||||
|
# TextBox(
|
||||||
|
# text = '',
|
||||||
|
# font = "Font Awesome 6 Free Solid",
|
||||||
|
# fontsize = 15,
|
||||||
|
# padding = 2,
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# background = onedark_darker["color7"]
|
||||||
|
# ),
|
||||||
|
# PulseVolume(
|
||||||
|
# background = onedark_darker["color7"],
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# fmt = 'Vol: [ {} ]',
|
||||||
|
# device = 'default',
|
||||||
|
# channel = 'Master',
|
||||||
|
# limit_max_volume = True,
|
||||||
|
# padding = 5,
|
||||||
|
# update_interval = 0.1,
|
||||||
|
# mute_command = 'pactl set-sink-mute @DEFAULT_SINK@ toggle',
|
||||||
|
# volume_up_command = 'pactl set-sink-volume @DEFAULT_SINK@ +5%',
|
||||||
|
# volume_down_command = 'pactl set-sink-volume @DEFAULT_SINK@ -5%',
|
||||||
|
# ),
|
||||||
|
# #volume,
|
||||||
|
# #widget.Volume(
|
||||||
|
# # foreground = onedark_darker[8],
|
||||||
|
# # background = onedark_darker[0],
|
||||||
|
# # fmt = 'Vol: {}',
|
||||||
|
# # padding = 5,
|
||||||
|
# # mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e alsamixer')}
|
||||||
|
# #),
|
||||||
|
# left_arrow(onedark_darker["color10"], onedark_darker["color7"]),
|
||||||
|
# TextBox(
|
||||||
|
# text = '',
|
||||||
|
# font = "Font Awesome 6 Free Solid",
|
||||||
|
# fontsize = 15,
|
||||||
|
# padding = 2,
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# background = onedark_darker["color10"]
|
||||||
|
# ),
|
||||||
|
# Clock(
|
||||||
|
# foreground = onedark_darker["colorback"],
|
||||||
|
# background = onedark_darker["color10"],
|
||||||
|
# format = "%a %d, %b [ %I:%M ]%P",
|
||||||
|
# padding = 5,
|
||||||
|
# ),
|
||||||
|
# left_arrow(onedark_darker["colorback"], onedark_darker["color10"]),
|
||||||
|
# Systray(
|
||||||
|
# background = onedark_darker["colorback"],
|
||||||
|
# padding = 2
|
||||||
|
# ),
|
||||||
|
|
||||||
|
# #widget.TextBox(
|
||||||
|
# # text = '',
|
||||||
|
# # font = "Mononoki Regular Bold",
|
||||||
|
# # fontsize = 18,
|
||||||
|
# # padding = 0,
|
||||||
|
# # background = onedark_darker[0],
|
||||||
|
# # foreground = onedark_darker[9],
|
||||||
|
# #),
|
||||||
|
# ], size=25)
|
||||||
31
modules/wm/qtile/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||||
|
cfg = config.horseman.wm.qtile;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
horseman.desktop.qtile = {
|
||||||
|
enable = mkEnableOption "Qtile";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
windowManager.qtile.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
system.activationScripts.script.text = ''
|
||||||
|
cd /home/horseman && \
|
||||||
|
rm -r .config/qtile && \
|
||||||
|
cp -r nix-config/modules/wm/qtile/config \
|
||||||
|
.config/qtile
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,86 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
../../pkgs/zsh.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
services.tailscale.enable = true;
|
|
||||||
|
|
||||||
services.mullvad-vpn.enable = true;
|
|
||||||
services.mullvad-vpn.package = pkgs.mullvad-vpn;
|
|
||||||
networking.nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
|
|
||||||
services.resolved = {
|
|
||||||
enable = true;
|
|
||||||
dnssec = "true";
|
|
||||||
domains = [ "~." ];
|
|
||||||
fallbackDns = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
sops = {
|
|
||||||
defaultSopsFile = ../../secrets/secrets.yaml;
|
|
||||||
defaultSopsFormat = "yaml";
|
|
||||||
age = {
|
|
||||||
sshKeyPaths = [ "/home/horseman/.ssh/id_ed25519" ];
|
|
||||||
keyFile = "/home/horseman/.config/sops/age/keys.txt";
|
|
||||||
generateKey = false;
|
|
||||||
};
|
|
||||||
secrets = {
|
|
||||||
"syncthing/user".owner = "horseman";
|
|
||||||
"syncthing/password".owner = "horseman";
|
|
||||||
};
|
|
||||||
templates = {
|
|
||||||
"syncuser".content = ''${config.sops.placeholder."syncthing/user"}'';
|
|
||||||
"syncpassword".content = ''${config.sops.placeholder."syncthing/password"}'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.syncthing = {
|
|
||||||
enable = true;
|
|
||||||
user = "horseman";
|
|
||||||
dataDir = "/home/horseman";
|
|
||||||
configDir = "/home/horseman/.config/syncthing";
|
|
||||||
overrideDevices = true;
|
|
||||||
overrideFolders = true;
|
|
||||||
settings = {
|
|
||||||
options = {
|
|
||||||
urAccepted = -1;
|
|
||||||
};
|
|
||||||
gui = {
|
|
||||||
user = config.sops.templates."syncuser".content;
|
|
||||||
password = config.sops.templates."syncpassword".content;
|
|
||||||
};
|
|
||||||
devices = {
|
|
||||||
"luna" = {
|
|
||||||
id = "MW4ZTAX-D7KDLRL-YHNGNCF-V6FW5L4-SCKQKES-BO7KV43-L5667GL-JHIYEAA";
|
|
||||||
autoAcceptFolders = true;
|
|
||||||
name = "luna";
|
|
||||||
};
|
|
||||||
"terra" = {
|
|
||||||
id = "2QWRFLY-ZUY5C6C-X36R5CY-PJSGLYY-5HWIWJN-2YYWRPU-T66GJMU-GXTQ6QK";
|
|
||||||
autoAcceptFolders = true;
|
|
||||||
name = "terra";
|
|
||||||
};
|
|
||||||
"solis" = {
|
|
||||||
id = "YOSYADZ-3OZ3XBH-7XEIK2W-DHAEIFD-5P5ZIHB-PAP74DH-T7GHLKT-O32YEA4";
|
|
||||||
autoAcceptFolders = true;
|
|
||||||
name = "solis";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
folders = {
|
|
||||||
"Documents" = {
|
|
||||||
id = "documentFolder";
|
|
||||||
path = "/home/horseman/Documents";
|
|
||||||
devices = [ "luna" "terra" "solis" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
networking.firewall.allowedUDPPorts = [ 22000 21027 ];
|
|
||||||
networking.firewall.allowedTCPPorts = [ 8384 22000 ];
|
|
||||||
}
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
./hardware-configuration.nix
|
|
||||||
../../pkgs/firefox.nix
|
|
||||||
../common/configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
extraSpecialArgs = { inherit inputs outputs; };
|
|
||||||
users = {
|
|
||||||
horseman = import ../../home-manager/apps.nix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "luna";
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
networking.extraHosts = ''
|
|
||||||
127.0.0.1 koala.rails.local members.rails.local leden.rails.local intro.rails.local
|
|
||||||
'';
|
|
||||||
|
|
||||||
services.xserver.enable = true;
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.displayManager.sddm.autoNumlock = true;
|
|
||||||
services.displayManager.defaultSession = "plasma";
|
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
services.jack = {
|
|
||||||
jackd.enable = false;
|
|
||||||
alsa.enable = true;
|
|
||||||
loopback.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
|
||||||
kate
|
|
||||||
konsole
|
|
||||||
];
|
|
||||||
environment.gnome.excludePackages = with pkgs; [
|
|
||||||
gnome-calendar
|
|
||||||
gnome-characters
|
|
||||||
nautilus
|
|
||||||
gnome-clocks
|
|
||||||
gnome-contacts
|
|
||||||
evince
|
|
||||||
file-roller
|
|
||||||
geary
|
|
||||||
gnome-system-monitor
|
|
||||||
eog
|
|
||||||
gnome-logs
|
|
||||||
gnome-maps
|
|
||||||
gnome-music
|
|
||||||
seahorse
|
|
||||||
gnome-text-editor
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
|
|
||||||
virtualisation.virtualbox.host.enable = true;
|
|
||||||
users.extraGroups.vboxusers.members = [ "horseman" ];
|
|
||||||
|
|
||||||
users.extraUsers.horseman.extraGroups = [ "jackaudio" ];
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/c1447573-eee5-48ea-9937-84330065628b";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/B516-99F1";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
./hardware-configuration.nix
|
|
||||||
../common/configuration.nix
|
|
||||||
../../modules/sleep-at-night.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
extraSpecialArgs = { inherit inputs outputs; };
|
|
||||||
users = {
|
|
||||||
horseman = import ../../home-manager/server-apps.nix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "solis";
|
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
|
|
||||||
services.resolved.enable = true;
|
|
||||||
services.resolved.extraConfig = "DNSStubListener=no\n";
|
|
||||||
|
|
||||||
systemd.timers."backupSyncthing" = {
|
|
||||||
wantedBy = [ "timers.target" ];
|
|
||||||
timerConfig = {
|
|
||||||
OnCalendar = "weekly";
|
|
||||||
Persistent = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services."backupSyncthing" = {
|
|
||||||
script = ''
|
|
||||||
/home/horseman/nix-config/misc/backup.sh
|
|
||||||
'';
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
User = "horseman";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# services.sleep-at-night = {
|
|
||||||
# enable = true;
|
|
||||||
# shutdown = {
|
|
||||||
# hour = 00;
|
|
||||||
# minute = 30;
|
|
||||||
# };
|
|
||||||
# wakeup = "08:00:00";
|
|
||||||
# };
|
|
||||||
|
|
||||||
networking.firewall.enable = true;
|
|
||||||
networking.firewall.allowPing = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/74211087-d087-49d5-bc58-eb49748a51f0";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/bfe8c490-e8d7-438e-b95b-5bc5743bb23b"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
|
|
@ -1,109 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./refind.nix
|
|
||||||
../../pkgs/firefox.nix
|
|
||||||
../common/configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# NVIDIA Drivers
|
|
||||||
hardware.graphics.enable32Bit = true;
|
|
||||||
hardware.graphics.enable = true;
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
|
||||||
hardware.nvidia = {
|
|
||||||
modesetting.enable = true;
|
|
||||||
powerManagement.enable = false;
|
|
||||||
powerManagement.finegrained = false;
|
|
||||||
open = true;
|
|
||||||
nvidiaSettings = true;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
||||||
};
|
|
||||||
# End NVIDIA
|
|
||||||
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
extraSpecialArgs = { inherit inputs outputs; };
|
|
||||||
users = {
|
|
||||||
horseman = import ../../home-manager/apps.nix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "terra";
|
|
||||||
|
|
||||||
systemd.timers."enable-wol" = {
|
|
||||||
wantedBy = [ "timers.target" ];
|
|
||||||
timerConfig = {
|
|
||||||
OnBootSec = "5m";
|
|
||||||
OnUnitActiveSec = "1m";
|
|
||||||
Unit = "enable-wol.service";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services."enable-wol" = {
|
|
||||||
script = ''
|
|
||||||
/home/horseman/nix-config/misc/startup.sh
|
|
||||||
'';
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
User = "root";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
ethtool
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
|
||||||
kate
|
|
||||||
konsole
|
|
||||||
];
|
|
||||||
environment.gnome.excludePackages = with pkgs; [
|
|
||||||
gnome-calendar
|
|
||||||
gnome-characters
|
|
||||||
nautilus
|
|
||||||
gnome-clocks
|
|
||||||
gnome-contacts
|
|
||||||
evince
|
|
||||||
file-roller
|
|
||||||
geary
|
|
||||||
gnome-system-monitor
|
|
||||||
eog
|
|
||||||
gnome-logs
|
|
||||||
gnome-maps
|
|
||||||
gnome-music
|
|
||||||
seahorse
|
|
||||||
gnome-text-editor
|
|
||||||
];
|
|
||||||
|
|
||||||
services.xserver.enable = true;
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.displayManager.sddm.autoNumlock = true;
|
|
||||||
services.displayManager.sddm.wayland.enable = false;
|
|
||||||
services.displayManager.defaultSession = "plasma";
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
|
|
||||||
programs.ssh.askPassword = lib.mkForce "/nix/store/qrzq7dqp8dkffb5dvi42q647dhm87ady-ksshaskpass-6.0.3/bin/ksshaskpass";
|
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
services.jack = {
|
|
||||||
jackd.enable = true;
|
|
||||||
alsa.enable = false;
|
|
||||||
loopback.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.extraUsers.horseman.extraGroups = [ "jackaudio" ];
|
|
||||||
}
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/4d963cda-4ec7-4cee-8e82-35402d385f54";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/6AB6-63FD";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/53db744d-a858-49b0-a3a1-c7c576aba0c9"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
|
||||||
cfg = config.horseman.boot.grub;
|
|
||||||
in {
|
|
||||||
options = {
|
|
||||||
horseman.boot.grub = {
|
|
||||||
enable = mkEnableOption "Enables grub, the bootloader";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
boot.loader.grub = {
|
|
||||||
enable = true;
|
|
||||||
device = "/dev/sda";
|
|
||||||
configurationLimit = 10;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
|
||||||
cfg = config.horseman.boot.systemd;
|
|
||||||
in {
|
|
||||||
options = {
|
|
||||||
horseman.boot.systemd = {
|
|
||||||
enable = mkEnableOption "Enables systemd, the bootloader";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
boot.kernelModules = [ "snd-seq" "snd-rawmidi" ];
|
|
||||||
boot.loader.systemd-boot = {
|
|
||||||
enable = true;
|
|
||||||
configurationLimit = 10;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
|
||||||
cfg = config.horseman.terminal.pkgs;
|
|
||||||
in {
|
|
||||||
options = {
|
|
||||||
horseman.terminal.pkgs = {
|
|
||||||
enable = mkEnableOption "Packages that are used in the terminal";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
environment.packages = with pkgs; [
|
|
||||||
direnv
|
|
||||||
docker-compose
|
|
||||||
efibootmgr
|
|
||||||
ethtool
|
|
||||||
file
|
|
||||||
fzf
|
|
||||||
gcc
|
|
||||||
gnupg
|
|
||||||
haskell.compiler.native-bignum.ghcHEAD
|
|
||||||
haskell-language-server
|
|
||||||
htop
|
|
||||||
jdk
|
|
||||||
neofetch
|
|
||||||
nodejs_22
|
|
||||||
python313
|
|
||||||
platformio-core
|
|
||||||
sops
|
|
||||||
sqlite
|
|
||||||
sxiv
|
|
||||||
termdown
|
|
||||||
tmux
|
|
||||||
unzip
|
|
||||||
wakeonlan
|
|
||||||
zsh
|
|
||||||
xclip
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
|
||||||
cfg = config.horseman.packages.visual;
|
|
||||||
in {
|
|
||||||
options = {
|
|
||||||
horseman.packages.visual = {
|
|
||||||
enable = mkEnableOption "Programs that open in a window on the screen";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
environment.packages = with pkgs; [
|
|
||||||
alacritty
|
|
||||||
bitwarden
|
|
||||||
discord-ptb
|
|
||||||
ghex
|
|
||||||
gnome-calculator # Should be replaced, opens up so slowww
|
|
||||||
jetbrains.clion
|
|
||||||
jetbrains.idea-ultimate
|
|
||||||
jetbrains.pycharm-professional
|
|
||||||
jetbrains.rider
|
|
||||||
jetbrains.webstorm
|
|
||||||
inkscape
|
|
||||||
keepassxc
|
|
||||||
krita
|
|
||||||
libreoffice
|
|
||||||
mullvad-vpn
|
|
||||||
parsec-bin
|
|
||||||
qbittorrent
|
|
||||||
reaper
|
|
||||||
retext
|
|
||||||
solaar
|
|
||||||
spotify
|
|
||||||
sqlitebrowser
|
|
||||||
thunderbird
|
|
||||||
vlc
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
|
||||||
cfg = config.horseman.terminal.neovim;
|
|
||||||
in {
|
|
||||||
options = {
|
|
||||||
horseman.terminal.neovim = {
|
|
||||||
enable = mkEnableOption "Neovim options";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
|
||||||
cfg = config.horseman.users.horseman;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
horseman.users.horseman = {
|
|
||||||
enable = mkEnableOption "User 'horseman'";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
users.users = {
|
|
||||||
horseman = {
|
|
||||||
initialPassword = "correct horse battery staple";
|
|
||||||
isNormalUser = true;
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCtbmZFvOsukUtqKnRkzLqphpgA0HF/mCcH/6BtPah6G4v6gqu8za58w8/0//aGkurG3sfQ5YhphFMJYm26/QdCUvVYeC92LWC5mjWB/md+BOWCoZYoEL0NHuu5f+7EQcmxLYuIv7mzHB1T+fwgOyuoW6IKLLQcmokx4uyg8apUs0yaRr9rCmoxeYOlZlsE6pKS2E8YUEkCRUZ1PZW6ILHXOOaz3KQ7s429MPvKv+061SlyEZuyinzsS1+4e/j5fCddq9Ac2ar1TiIkFhmtpJfJ2iWzVAvpZ08KV4nHgews07jjuj0/dZufSXbWJI6fQCMRvETeQsDU0RB6AxO//6plSo6svsGa/XhZx55AZAotflc2EzIi5QPWa078xu8IR23/flj52gqCj3O7RxhZib+L4cCdAS8nSZkLw9VV2kROqf4JcRYsinfKetBBPJU3RYKDVq8uF23eliNw+5lYKJu5FzPVFmS/J+vAme/vHkHLNKz5CnZoABjeue4PEnpSyFCJhf4w94lbB9JBaxKuZoXvaPE7bKDTHWbVC9DKWrL+QqNP5tsiV3/jI9gx4ty9OihMv5p46ennD17AbMM6xi/yPjvX6jbDIo+jMswW1ndhH2Ka6PTRpx8G+BWgoEVjCoP/DptloE6B5EfZous8Yd+RBuRiqNk4WUB+6PWVO7ELfQ horseman" # luna
|
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCmYI+jn1B69r4GUEeVE1/q+HSNcLzT+qG0nEpIjyO3VCsocLIJqT6cJtPKTh/j9RPySvz1lo2ZFemCeKBfsdHy95JoYqbAcoJ9jacH3X8LixIiGin6ew/h6QJONU1UAuxcEDoEyeHfmNBRdgaahNTWtgvFd1YhB4WQwN9THZ/axGdnWLi/y0y98aqERw98fGOhAzxqZyeGkWK5ByRiiGmfrmU7IsX916z5s9OPFYeIGvI3UPKL5awpQMrD/+VhtQjAy8guWbBKbN+7cVU/JQjhaPAeVC18iON++Ux6pGq1/yA+IFDb/fFofXD70vRYemg7zSVbf2ceBg8iSR2OdcZVPfhIKq7mx62TcYVY7aDlz7fFedl7tVhxRd5Ze7T/kbRQtbqL++3UQaZwnx6HoXGMvdIbKV/KHcmqjQQClzWZyk8oI+VbkF/nfTgShW/X0UQYzBSdsCb4XywzfnLRH4Ops/v7ZOc2zBApl7j1Oj+nW7dJ5/P6FgMw553tNXnEVXqGvdvalmDl/hjR3UVedm18ZKwu+6+1mcHsDGKCi5C79zVksr9IbFNICosA23xfrnKQYmncBzobbY4N39SToI9ulcukOJj26ooAG3RhHqSyOkcM3nTUbHwKb/19J+NAm2iT9ipNGurwwPO4VcJY36237es7MEkmQHfD1ZOo6biafw horseman" # terra
|
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCrgH3kBWwxoFms9ggilPmiKX9X0/AlWjGN7a+k3ddwfK0LvH9T8ueil1Zjw16P0XNMmy076bUBJJ89aVILXgYx+ngKmnIg32lqo5bafEpub1c3wtjGcwXtJnUXMwcqdIjkR2sfzuQPLXlob/Q+GsShm4TBEtzVTdpbCj768LyTtFx4vHZByyGtam0Ibb/6GVE1V2IcA/R+iQlCAqSjFxvSq1ll+wxsEUaT7b0ru1WhUXz0ITWoRkA8p0UjTl/uoXYcsPsqGR7dXgW7hNF087TOf+FsmiL+I6pbbB8+at5yq8I6l1lCwfLaMz2M5lHkn5jZiBuUDOXWpbbk1214iWrymAbpbVmNU68QVEcQkJTnfbRQ/56Nvq80emFgke6p4vcVnR9iVbaZDnOkMVH6HEs0Qc/rC38p9aISAdJvI49GWaz8fs1OgVi7mj9xA0QREc6/oalJ1F3BehPUk8v4uqww3u+I2AdWPp/6HO9zVU2mTrO30a8IbjOqFqMqdV+nYFxNbHIIIZ9acv95FGqIBCG0U9d8XVVFQ+kVWxkXxPk0uynzAsrXyiH3gzxHwy7stCxybZkTpQPjf+vSt4Tz3PRxnyq1OWTUzWmBVe0MCdZX5h/oQp6kI1Ys/t+UrP1G9NEIwGg+/zlpmGiV8Pm10b6gEXgv09BQPFGPsBbl4NRpQQ horseman" # solis
|
|
||||||
];
|
|
||||||
extraGroups = [
|
|
||||||
"wheel"
|
|
||||||
"networkmanager"
|
|
||||||
"docker"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
PermitRootLogin = "no";
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# lmao idk if I should remove this but it's funny so imma keep it
|
|
||||||
system.stateVersion = "23.11";
|
|
||||||
};
|
|
||||||
}
|
|
||||||