Compare commits

...

51 commits

Author SHA1 Message Date
Antoine Martin df15e6b6c2 home: fish: use real .fish files for functions 2021-04-22 17:52:39 +02:00
Antoine Martin 325d3ee1b2 flake.lock: Update
Flake input changes:

* Updated 'home-manager': 'github:nix-community/home-manager/6aa6556bcab6dc0f6398b4daa8404d788fd7a6a2' -> 'github:nix-community/home-manager/db00b39a9abec04245486a01b236b8d9734c9ad0'
* Updated 'nixpkgs-unstable': 'github:NixOS/nixpkgs/0a5f5bab0e08e968ef25cff393312aa51a3512cf' -> 'github:NixOS/nixpkgs/d235056d6d6dcbd2999bd55fd120d831d4df6304'
2021-04-22 17:37:56 +02:00
Antoine Martin dbe1afbfcd home: fish: setup wrapper around flake lock 2021-04-22 17:37:56 +02:00
Antoine Martin ee7f2eb7bd home: switch font to Iosevka for emacs/term 2021-04-22 17:36:33 +02:00
Antoine Martin b538eec36f home: setup fish and starship module 2021-04-22 17:36:33 +02:00
Antoine Martin e596dee8ee home: i3: remove borders for alacritty windows 2021-04-22 16:08:11 +02:00
Antoine Martin 4b5c301e46 sddm-sugar-candy: use custom config 2021-04-22 15:15:34 +02:00
Antoine Martin b1e1b0f1dd boreal: setup sddm theme module 2021-04-22 14:22:55 +02:00
Antoine Martin ecb72c6900 boreal: prefer sddm to gdm 2021-04-22 03:32:36 +02:00
Antoine Martin 6a984ead58 home: i3: assign Discord to workspace 10 as well 2021-04-22 03:24:27 +02:00
Antoine Martin 7de95e8626 flake.lock: Update
Flake input changes:

* Updated 'emacs-overlay': 'github:nix-community/emacs-overlay/905883cd5de24958bfd354c6e335f38f667e7ede' -> 'github:nix-community/emacs-overlay/e4778461070fb17602e71b01b8beaf7976e5f6ca'
* Updated 'nixpkgs-unstable': 'github:NixOS/nixpkgs/a73020b2a150322c9832b50baeb0296ba3b13dd7' -> 'github:NixOS/nixpkgs/0a5f5bab0e08e968ef25cff393312aa51a3512cf'
2021-04-22 03:12:42 +02:00
Antoine Martin 273cbba17f home: themes: setup i3bar theme 2021-04-22 02:34:52 +02:00
Antoine Martin 494542899d home: i3: use option for ws back&forth 2021-04-22 02:34:52 +02:00
Antoine Martin c43917a979 home: i3: remove border setting 2021-04-22 01:25:32 +02:00
Antoine Martin acb4607a04 home: theme: switch to real solarized for i3 2021-04-22 01:23:00 +02:00
Antoine Martin fb1b440a41 home: alacritty: don't hide borders 2021-04-22 00:47:33 +02:00
Antoine Martin 845b1c5c4e home: tmux: set terminal to screen-256color 2021-04-22 00:27:34 +02:00
Antoine Martin 08beb20033 home: themes: set default values 2021-04-22 00:27:28 +02:00
Antoine Martin 0e07f901bc home: alacritty: setup config 2021-04-22 00:25:39 +02:00
Antoine Martin 36d8b273b7 home: setup x cursor module 2021-04-21 18:53:21 +02:00
Antoine Martin 28e08c817e home: i3: enable workspace auto back&forth 2021-04-21 10:47:01 +02:00
Antoine Martin 6ff469e96f home: themes: move options to my.themes 2021-04-21 10:30:05 +02:00
Antoine Martin a25d5051d3 boreal: use solarized light theme 2021-04-21 10:24:35 +02:00
Antoine Martin a8d417c774 home: i3: make use of built-in theme module 2021-04-21 04:07:18 +02:00
Antoine Martin 7846271ba5 home: themes: setup solarized light 2021-04-21 04:06:51 +02:00
Antoine Martin 8dff0e21e1 home: themes: setup theme types for i3 2021-04-21 04:05:19 +02:00
Antoine Martin 0cdb05ecf1 home: i3: setup bluetooth mouse battery block 2021-04-21 02:11:48 +02:00
Antoine Martin 93eccb76ec home: i3: add memory usage block 2021-04-21 01:47:11 +02:00
Antoine Martin c71c5d345f home: i3: use barchart for CPU usage 2021-04-20 01:50:10 +02:00
Antoine Martin 0cfafb1758 home: i3: default border pixel 2021-04-20 01:29:19 +02:00
Antoine Martin f6f0cfb3ba home: i3: finish up theme 2021-04-20 01:08:13 +02:00
Antoine Martin 28a296435a home: i3: assign slack to ws10 2021-04-20 01:08:13 +02:00
Antoine Martin 30e7a384d0 home: i3: keep default resize mode 2021-04-20 01:08:11 +02:00
Antoine Martin 2f1e12890d home: i3: setup betterlockscreen 2021-04-20 01:06:59 +02:00
Antoine Martin 97a2a0e6e5 home: i3: volume bindings 2021-04-20 01:06:59 +02:00
Antoine Martin 8284139b0e home: i3: fix font issue in i3 bar
see nix-community/home-manager#1937 for details about the issue
2021-04-20 01:06:59 +02:00
Antoine Martin 39c6f6db3a home: i3bar: setup blocks 2021-04-20 01:06:59 +02:00
Antoine Martin f3313d39a6 home: i3bar: use solarized-light 2021-04-20 01:06:59 +02:00
Antoine Martin 34d6ef1e2f boreal: disable wireguard config for now 2021-04-20 01:06:59 +02:00
Antoine Martin 17f7df9fc8 home: tmux: basic setup 2021-04-20 01:06:59 +02:00
Antoine Martin 2151342f5f home: i3: make status bar font bigger 2021-04-20 01:06:59 +02:00
Antoine Martin 9684592fbd home: emacs: move package dependencies in homeconf 2021-04-20 01:06:59 +02:00
Antoine Martin 52290a8f8d home: setup flameshot 2021-04-20 01:06:59 +02:00
Antoine Martin cc34396e9e home: move emacs service to home config 2021-04-20 01:06:59 +02:00
Antoine Martin 6b660a74ef home: x: don't use absolute path for commands 2021-04-20 01:06:59 +02:00
Antoine Martin e3a9db2af0 flake: make home-manager chatty 2021-04-20 01:06:59 +02:00
Antoine Martin 4ee7d15cb8 home: x: setup i3status-rust 2021-04-20 01:06:59 +02:00
Antoine Martin e00685bdb5 home: i3: shortcut to launch emacs 2021-04-20 01:06:59 +02:00
Antoine Martin 73e1ff6c0f home: basic i3 setup 2021-04-20 01:06:54 +02:00
Antoine Martin 5c86bdd16a home: setup home-manager 2021-04-19 13:42:29 +02:00
Antoine Martin 44b05768cd flake: use explicit input definitions 2021-04-19 12:49:30 +02:00
37 changed files with 1094 additions and 29 deletions

1
.gitattributes vendored
View file

@ -1,2 +1,3 @@
secrets/*.secret filter=git-crypt diff=git-crypt secrets/*.secret filter=git-crypt diff=git-crypt
secrets/wireguard.nix filter=git-crypt diff=git-crypt secrets/wireguard.nix filter=git-crypt diff=git-crypt
home/secrets/*.secret filter=git-crypt diff=git-crypt

View file

@ -3,23 +3,17 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
alacritty alacritty
discord discord
emacsPgtkGcc
feh feh
firefox firefox
flameshot
pavucontrol pavucontrol
slack slack
spotify spotify
sqlite # needed for org-roam
zathura zathura
]; ];
fonts.fonts = with pkgs; [
input-fonts
emacs-all-the-icons-fonts
];
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
programs.nm-applet.enable = true; programs.nm-applet.enable = true;
# NOTE: needed for home emacs configuration
nixpkgs.config.input-fonts.acceptLicense = true; nixpkgs.config.input-fonts.acceptLicense = true;
} }

View file

@ -14,10 +14,6 @@
AddKeysToAgent yes AddKeysToAgent yes
''; '';
}; };
tmux = {
enable = true;
baseIndex = 1;
};
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View file

@ -1,11 +1,13 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
# Default configuration # Default configuration
./base ./base
./base/gui-programs.nix ./base/gui-programs.nix
# Module definitions
./modules
# Service definitions # Service definitions
./services ./services

View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"emacs-overlay": { "emacs-overlay": {
"locked": { "locked": {
"lastModified": 1618653777, "lastModified": 1619028898,
"narHash": "sha256-jSG1i83pmKwAx6QtkVjyCQT+/LvMEMEVeVDZcOFjRTg=", "narHash": "sha256-OgKYwyxZA7zfdanc8RhfZ7OCHlAXHuzN6r4Q6Gjpzlk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "905883cd5de24958bfd354c6e335f38f667e7ede", "rev": "e4778461070fb17602e71b01b8beaf7976e5f6ca",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -16,6 +16,27 @@
"type": "github" "type": "github"
} }
}, },
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1618962339,
"narHash": "sha256-Ecud4mXuA96NTCDUWGp5GVVNarZFWZL3YUZ0I8mQKIs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "db00b39a9abec04245486a01b236b8d9734c9ad0",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1618149891, "lastModified": 1618149891,
@ -34,11 +55,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1618072958, "lastModified": 1619057301,
"narHash": "sha256-QDKj58ECixtb4EJMWV5D5Lb2xdCgab1Opi4zjQWbDOg=", "narHash": "sha256-1Y1nCnwGSQHM76KGIhz+8tOAGOT3wlP+dKjwoyQXCtg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a73020b2a150322c9832b50baeb0296ba3b13dd7", "rev": "d235056d6d6dcbd2999bd55fd120d831d4df6304",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -51,6 +72,7 @@
"root": { "root": {
"inputs": { "inputs": {
"emacs-overlay": "emacs-overlay", "emacs-overlay": "emacs-overlay",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable" "nixpkgs-unstable": "nixpkgs-unstable"
} }

View file

@ -1,12 +1,37 @@
{ {
description = "Nixos configuration with flakes"; description = "Nixos configuration with flakes";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.09"; nixpkgs = {
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; type = "github";
emacs-overlay.url = "github:nix-community/emacs-overlay/master"; owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-20.09";
}; };
outputs = { self, nixpkgs, nixpkgs-unstable, emacs-overlay }: { nixpkgs-unstable = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-unstable";
};
emacs-overlay = {
type = "github";
owner = "nix-community";
repo = "emacs-overlay";
ref = "master";
};
home-manager = {
type = "github";
owner = "nix-community";
repo = "home-manager";
ref = "master";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, emacs-overlay, home-manager }: {
nixosConfigurations.poseidon = nixpkgs.lib.nixosSystem rec { nixosConfigurations.poseidon = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; system = "x86_64-linux";
modules = modules =
@ -37,10 +62,22 @@
[ [
./boreal.nix ./boreal.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.alarsyo = import ./home;
home-manager.verbose = true;
}
{ {
nixpkgs.overlays = [ nixpkgs.overlays = [
emacs-overlay.overlay emacs-overlay.overlay
(self: super: {
packages = import ./pkgs { pkgs = super; };
})
# uncomment this to build everything from scratch, fun but takes a # uncomment this to build everything from scratch, fun but takes a
# while # while
# #

39
home/alacritty.nix Normal file
View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.alacritty;
alacrittyTheme = config.my.theme.alacrittyTheme;
in
{
options.my.home.alacritty.enable = lib.mkEnableOption "Alacritty terminal";
config = lib.mkIf cfg.enable {
programs.alacritty = {
enable = true;
settings = {
window = {
padding = {
x = 8;
y = 8;
};
};
font = {
normal = {
family = "Iosevka Fixed";
style = "Medium";
};
size = 10.0;
};
colors = alacrittyTheme;
};
};
home.packages = with pkgs; [
iosevka-bin
];
# make sure font is discoverable
fonts.fontconfig.enable = true;
};
}

18
home/default.nix Normal file
View file

@ -0,0 +1,18 @@
{ ... }:
{
imports = [
./alacritty.nix
./emacs.nix
./fish
./flameshot.nix
./secrets
./starship.nix
./themes
./tmux.nix
./x
];
home.stateVersion = "20.09";
home.username = "alarsyo";
}

29
home/emacs.nix Normal file
View file

@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }:
{
options.my.home.emacs = with lib; {
enable = mkEnableOption "Emacs daemon configuration";
};
config = lib.mkIf config.my.home.emacs.enable {
home.packages = with pkgs; [
sqlite # needed by org-roam
# fonts used by my config
emacs-all-the-icons-fonts
iosevka-bin
];
# make sure above fonts are discoverable
fonts.fontconfig.enable = true;
services.emacs = {
enable = true;
# generate emacsclient desktop file
client.enable = true;
};
programs.emacs = {
enable = true;
package = pkgs.emacsPgtkGcc;
};
};
}

15
home/fish/default.nix Normal file
View file

@ -0,0 +1,15 @@
{ config, lib, ... }:
let
cfg = config.my.home.fish;
in
{
options.my.home.fish.enable = lib.mkEnableOption "Fish shell";
config = lib.mkIf cfg.enable {
programs.fish = {
enable = true;
};
xdg.configFile."fish/functions" = { source = ./. + "/functions"; };
};
}

View file

@ -0,0 +1,7 @@
function nfl
set -l flags "--commit-lock-file"
for flake in $argv
set -a flags "--update-input" "$flake"
end
nix flake lock $flags
end

13
home/flameshot.nix Normal file
View file

@ -0,0 +1,13 @@
{ config, lib, ... }:
let
cfg = config.my.home.flameshot;
in
{
options.my.home.flameshot = with lib; {
enable = mkEnableOption "flameshot autolaunch";
};
config.services.flameshot = lib.mkIf cfg.enable {
enable = true;
};
}

Binary file not shown.

13
home/secrets/default.nix Normal file
View file

@ -0,0 +1,13 @@
{ lib, ... }:
with lib;
{
options.my.secrets = mkOption {
type = types.attrs;
};
config.my.secrets = {
# I'm not sure hiding this is very important, but it *seems* like a bad idea
# to expose this
bluetooth-mouse-mac-address = fileContents ./bluetooth-mouse-mac-address.secret;
};
}

17
home/starship.nix Normal file
View file

@ -0,0 +1,17 @@
{ config, lib, ... }:
let
cfg = config.my.home.starship;
in
{
options.my.home.starship.enable = lib.mkEnableOption "Starship.rs prompt";
config = lib.mkIf cfg.enable {
programs.starship = {
enable = true;
enableFishIntegration = true;
settings = {
add_newline = false;
};
};
};
}

89
home/themes/alacritty.nix Normal file
View file

@ -0,0 +1,89 @@
{ lib }:
with lib;
let
mkColorOption = import ./color.nix { inherit lib; };
primaryColorModule = types.submodule {
options = {
background = mkColorOption {};
foreground = mkColorOption {};
};
};
cursorColorModule = types.submodule {
options = {
text = mkColorOption {};
cursor = mkColorOption {};
};
};
rainbowColorModule = types.submodule {
options = {
black = mkColorOption {};
red = mkColorOption {};
green = mkColorOption {};
yellow = mkColorOption {};
blue = mkColorOption {};
magenta = mkColorOption {};
cyan = mkColorOption {};
white = mkColorOption {};
};
};
in
types.submodule {
options = {
primary = mkOption {
type = primaryColorModule;
default = {
foreground = "#c5c8c6";
background = "#1d1f21";
};
};
cursor = mkOption {
type = cursorColorModule;
default = {
text = "#1d1f21";
cursor = "#c5c8c6";
};
};
normal = mkOption {
type = rainbowColorModule;
default = {
black = "#1d1f21";
red = "#cc6666";
green = "#b5bd68";
yellow = "#f0c674";
blue = "#81a2be";
magenta = "#b294bb";
cyan = "#8abeb7";
white = "#c5c8c6";
};
};
bright = mkOption {
type = rainbowColorModule;
default = {
black = "#666666";
red = "#d54e53";
green = "#b9ca4a";
yellow = "#e7c547";
blue = "#7aa6da";
magenta = "#c397d8";
cyan = "#70c0b1";
white = "#eaeaea";
};
};
dim = mkOption {
type = rainbowColorModule;
default = {
black = "#131415";
red = "#864343";
green = "#777c44";
yellow = "#9e824c";
blue = "#556a7d";
magenta = "#75617b";
cyan = "#5b7d78";
white = "#828482";
};
};
};
}

9
home/themes/color.nix Normal file
View file

@ -0,0 +1,9 @@
{ lib }:
let
mkColorOption = with lib; {default ? "#000000", description ? "" }: mkOption {
inherit description default;
example = "#abcdef";
type = types.strMatching "#[0-9a-f]{6}";
};
in
mkColorOption

34
home/themes/default.nix Normal file
View file

@ -0,0 +1,34 @@
{ config, lib, ... }:
with lib;
let
themeType = types.submodule {
options = {
alacrittyTheme = mkOption {
type = import ./alacritty.nix { inherit lib; };
default = {};
};
i3Theme = mkOption {
type = import ./i3.nix { inherit lib; };
default = {};
};
i3BarTheme = mkOption {
type = import ./i3bar.nix { inherit lib; };
default = {};
};
};
};
in
{
options.my.theme = mkOption {
type = themeType;
default = {};
};
options.my.themes = mkOption {
type = with types; attrsOf themeType;
};
config.my.themes = {
solarizedLight = import ./solarizedLight;
};
}

185
home/themes/i3.nix Normal file
View file

@ -0,0 +1,185 @@
{ lib }:
with lib;
let
mkColorOption = import ./color.nix { inherit lib; };
barColorSetModule = types.submodule {
options = {
border = mkColorOption {};
background = mkColorOption {};
text = mkColorOption {};
};
};
colorSetModule = types.submodule {
options = {
border = mkColorOption {};
childBorder = mkColorOption {};
background = mkColorOption {};
text = mkColorOption {};
indicator = mkColorOption {};
};
};
in
types.submodule {
options = {
bar = mkOption {
type = types.submodule {
options = {
background = mkColorOption {
default = "#000000";
description = "Background color of the bar.";
};
statusline = mkColorOption {
default = "#ffffff";
description = "Text color to be used for the statusline.";
};
separator = mkColorOption {
default = "#666666";
description = "Text color to be used for the separator.";
};
focusedWorkspace = mkOption {
type = barColorSetModule;
default = {
border = "#4c7899";
background = "#285577";
text = "#ffffff";
};
description = ''
Border, background and text color for a workspace button when the workspace has focus.
'';
};
activeWorkspace = mkOption {
type = barColorSetModule;
default = {
border = "#333333";
background = "#5f676a";
text = "#ffffff";
};
description = ''
Border, background and text color for a workspace button when the workspace is active.
'';
};
inactiveWorkspace = mkOption {
type = barColorSetModule;
default = {
border = "#333333";
background = "#222222";
text = "#888888";
};
description = ''
Border, background and text color for a workspace button when the workspace does not
have focus and is not active.
'';
};
urgentWorkspace = mkOption {
type = barColorSetModule;
default = {
border = "#2f343a";
background = "#900000";
text = "#ffffff";
};
description = ''
Border, background and text color for a workspace button when the workspace contains
a window with the urgency hint set.
'';
};
bindingMode = mkOption {
type = barColorSetModule;
default = {
border = "#2f343a";
background = "#900000";
text = "#ffffff";
};
description =
"Border, background and text color for the binding mode indicator";
};
};
};
default = {};
};
background = mkOption {
type = types.str;
default = "#ffffff";
description = ''
Background color of the window. Only applications which do not cover
the whole area expose the color.
'';
};
focused = mkOption {
type = colorSetModule;
default = {
border = "#4c7899";
background = "#285577";
text = "#ffffff";
indicator = "#2e9ef4";
childBorder = "#285577";
};
description = "A window which currently has the focus.";
};
focusedInactive = mkOption {
type = colorSetModule;
default = {
border = "#333333";
background = "#5f676a";
text = "#ffffff";
indicator = "#484e50";
childBorder = "#5f676a";
};
description = ''
A window which is the focused one of its container,
but it does not have the focus at the moment.
'';
};
unfocused = mkOption {
type = colorSetModule;
default = {
border = "#333333";
background = "#222222";
text = "#888888";
indicator = "#292d2e";
childBorder = "#222222";
};
description = "A window which is not focused.";
};
urgent = mkOption {
type = colorSetModule;
default = {
border = "#2f343a";
background = "#900000";
text = "#ffffff";
indicator = "#900000";
childBorder = "#900000";
};
description = "A window which has its urgency hint activated.";
};
placeholder = mkOption {
type = colorSetModule;
default = {
border = "#000000";
background = "#0c0c0c";
text = "#ffffff";
indicator = "#000000";
childBorder = "#0c0c0c";
};
description = ''
Background and text color are used to draw placeholder window
contents (when restoring layouts). Border and indicator are ignored.
'';
};
};
}

24
home/themes/i3bar.nix Normal file
View file

@ -0,0 +1,24 @@
{ lib }:
with lib;
let
mkColorOption = import ./color.nix { inherit lib; };
in
types.submodule {
options = {
theme = mkOption {
type = types.submodule {
options = {
name = mkOption {
type = types.str;
default = "plain";
};
overrides = mkOption {
type = types.attrsOf types.str;
default = {};
};
};
};
default = {};
};
};
}

View file

@ -0,0 +1,39 @@
let
colors = import ./colors.nix;
in
with colors;
{
primary = {
background = base3;
foreground = base00;
};
cursor = {
text = base3;
cursor = base00;
};
normal = {
black = base02;
red = red;
green = green;
yellow = yellow;
blue = blue;
magenta = magenta;
cyan = cyan;
white = base2;
};
bright = {
black = base03;
red = orange;
green = base01;
yellow = base00;
blue = base0;
magenta = violet;
cyan = base1;
white = base3;
};
dim = {};
}

View file

@ -0,0 +1,18 @@
{
base03 = "#002b36"; # brblack
base02 = "#073642"; # black
base01 = "#586e75"; # brgreen
base00 = "#657b83"; # bryellow
base0 = "#839496"; # brblue
base1 = "#93a1a1"; # brcyan
base2 = "#eee8d5"; # white
base3 = "#fdf6e3"; # brwhite
yellow = "#b58900"; # yellow
orange = "#cb4b16"; # brred
red = "#dc322f"; # red
magenta = "#d33682"; # magenta
violet = "#6c71c4"; # brmagenta
blue = "#268bd2"; # blue
cyan = "#2aa198"; # cyan
green = "#859900"; # green
}

View file

@ -0,0 +1,5 @@
{
i3Theme = import ./i3.nix;
i3BarTheme = import ./i3bar.nix;
alacrittyTheme = import ./alacritty.nix;
}

View file

@ -0,0 +1,64 @@
let
colors = import ./colors.nix;
in
with colors;
{
bar = {
background = base3;
statusline = yellow;
separator = red;
focusedWorkspace = {
border = blue;
background = blue;
text = base3; # base2 ?
};
inactiveWorkspace = {
border = base2;
background = base2;
text = base00;
};
activeWorkspace = {
border = blue;
background = base2;
text = yellow;
};
urgentWorkspace = {
border = red;
background = red;
text = base3;
};
};
focused = {
border = blue;
background = blue;
text = base3;
indicator = magenta;
childBorder = blue;
};
focusedInactive = {
border = base2;
background = base2;
text = base00;
indicator = magenta;
childBorder = base2;
};
unfocused = {
border = base2;
background = base2;
text = base00;
indicator = magenta;
childBorder = base2;
};
urgent = {
border = orange;
background = orange;
text = base3;
indicator = magenta;
childBorder = orange;
};
}

View file

@ -0,0 +1,21 @@
let
colors = import ./colors.nix;
in
with colors;
{
theme = {
name = "solarized-light";
overrides = {
idle_bg = base2;
idle_fg = base00;
info_bg = blue;
info_fg = base3;
good_bg = green;
good_fg = base3;
warning_bg = yellow;
warning_fg = base3;
critical_bg = red;
critical_fg = base3;
};
};
}

15
home/tmux.nix Normal file
View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.tmux;
in
{
options.my.home.tmux = with lib; {
enable = mkEnableOption "tmux dotfiles";
};
config.programs.tmux = lib.mkIf cfg.enable {
enable = true;
baseIndex = 1;
terminal = "screen-256color";
};
}

17
home/x/cursor.nix Normal file
View file

@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.x.cursor;
in
{
options.my.home.x.cursor.enable = lib.mkEnableOption "X cursor";
config = lib.mkIf cfg.enable {
xsession.pointerCursor = {
package = pkgs.capitaine-cursors;
name = "capitaine-cursors";
# available sizes for capitaine-cursors are:
# 24, 30, 36, 48, 60, 72
size = 30;
};
};
}

12
home/x/default.nix Normal file
View file

@ -0,0 +1,12 @@
{ config, lib, pkgs, ... }:
{
imports = [
./cursor.nix
./i3.nix
./i3bar.nix
];
options.my.home.x = with lib; {
enable = mkEnableOption "X server configuration";
};
}

122
home/x/i3.nix Normal file
View file

@ -0,0 +1,122 @@
{ config, lib, pkgs, ... }:
let
isEnabled = config.my.home.x.enable;
myTerminal =
# FIXME: fix when terminal is setup in home
# if config.my.home.terminal.program != null
if true
then "alacritty"
else "i3-sensible-terminal";
alt = "Mod1"; # `Alt` key
modifier = "Mod4"; # `Super` key
logoutMode = "[L]ogout, [S]uspend, [P]oweroff, [R]eboot";
i3Theme = config.my.theme.i3Theme;
in
{
config = lib.mkIf isEnabled {
my.home = {
flameshot.enable = true;
};
home.packages = with pkgs; [
betterlockscreen
];
xsession.windowManager.i3 = {
enable = true;
config = {
inherit modifier;
bars =
let
barConfigPath =
config.xdg.configFile."i3status-rust/config-top.toml".target;
in
[
{
statusCommand = "i3status-rs ${barConfigPath}";
position = "top";
fonts = [ "DejaVuSansMono" "FontAwesome5Free 9" ];
colors = i3Theme.bar;
}
];
colors = {
inherit (i3Theme)
focused
focusedInactive
unfocused
urgent
;
};
focus = {
followMouse = true;
mouseWarping = true;
};
workspaceAutoBackAndForth = true;
fonts = [
"DejaVu Sans Mono 8"
];
keybindings = lib.mkOptionDefault {
"${modifier}+Shift+e" = ''mode "${logoutMode}"'';
"${modifier}+i" = "exec emacsclient -c";
# Volume handling
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" = "exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"${modifier}+l" = "exec --no-startup-id betterlockscreen --lock";
};
modes =
let
makeModeBindings = attrs: attrs // {
"Escape" = "mode default";
"Return" = "mode default";
};
in
lib.mkOptionDefault {
"${logoutMode}" = makeModeBindings {
"l" = "exec --no-startup-id i3-msg exit, mode default";
"s" = "exec --no-startup-id betterlockscreen --suspend, mode default";
"p" = "exec --no-startup-id systemctl poweroff, mode default";
"r" = "exec --no-startup-id systemctl reboot, mode default";
};
};
startup = [
# FIXME: make it conditional on "nvidia" being part of video drivers
{
command = "nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1'";
notification = false;
}
];
terminal = myTerminal;
assigns = {
"10" = [
{ class = "Slack"; }
{ class = "discord"; }
];
};
window.commands = [
{ command = "border pixel 2"; criteria = { class = "Alacritty"; }; }
];
};
};
};
}

91
home/x/i3bar.nix Normal file
View file

@ -0,0 +1,91 @@
{ config, lib, pkgs, ... }:
let
isEnabled = config.my.home.x.enable;
i3BarTheme = config.my.theme.i3BarTheme;
in
{
config = lib.mkIf isEnabled {
home.packages = with pkgs; [
iw # Used by `net` block
lm_sensors # Used by `temperature` block
font-awesome
];
programs.i3status-rust = {
enable = true;
bars = {
top = {
icons = "awesome5";
theme = i3BarTheme.theme.name;
settings = i3BarTheme;
blocks = [
{
block = "disk_space";
path = "/";
alias = "/";
info_type = "available";
unit = "GB";
interval = 60;
warning = 20.0;
alert = 10.0;
}
# TODO: update to new format when i3status-rust updates to v0.20:
# https://github.com/greshake/i3status-rust/blob/4d55b1d94ee09cbdefd805841fb54a2a4a0663a4/doc/blocks.md#available-format-keys-11
{
block = "memory";
display_type = "memory";
format_mem = "{Mug}/{MTg}GB";
warning_mem = 70.0;
critical_mem = 90.0;
# don't show swap
clickable = false;
}
{
block = "cpu";
interval = 1;
format = "{barchart}";
}
{
block = "temperature";
collapsed = false;
interval = 10;
format = "{max}°";
# FIXME: specific to my AMD Ryzen CPU. Make this depend on
# hostname or something else
chip = "k10temp-pci-*";
inputs = [ "Tccd1" ];
}
{
block = "networkmanager";
primary_only = true;
}
{
block = "bluetooth";
mac = config.my.secrets.bluetooth-mouse-mac-address;
hide_disconnected = true;
# TODO: use format when i3status-rust updates to v0.20
# format = "{percentage}";
}
{
block = "sound";
driver = "pulseaudio";
}
# {
# block = "notify";
# }
{
block = "time";
interval = 5;
format = "%a %d/%m %T";
locale = "fr_FR";
timezone = "Europe/Paris";
}
];
};
};
};
};
}

View file

@ -10,6 +10,8 @@ in
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./home.nix
]; ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
@ -38,7 +40,7 @@ in
# List services that you want to enable: # List services that you want to enable:
my.services = { my.services = {
wireguard = { wireguard = {
enable = true; enable = false;
iface = "wg"; iface = "wg";
port = 51820; port = 51820;
@ -69,12 +71,9 @@ in
layout = "fr"; layout = "fr";
xkbVariant = "us"; xkbVariant = "us";
}; };
};
my.displayManager.sddm.enable = true;
emacs = {
enable = true;
package = pkgs.emacsPgtkGcc;
};
};
sound.enable = true; sound.enable = true;
hardware.pulseaudio = { hardware.pulseaudio = {

15
hosts/boreal/home.nix Normal file
View file

@ -0,0 +1,15 @@
{ config, ... }:
{
home-manager.users.alarsyo = {
# Keyboard settings & i3 settings
my.home.x.enable = true;
my.home.x.cursor.enable = true;
my.home.alacritty.enable = true;
my.home.emacs.enable = true;
my.home.tmux.enable = true;
my.home.starship.enable = false;
my.home.fish.enable = true;
my.theme = config.home-manager.users.alarsyo.my.themes.solarizedLight;
};
}

6
modules/default.nix Normal file
View file

@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./sddm.nix
];
}

23
modules/sddm.nix Normal file
View file

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.displayManager.sddm;
in
{
options.my.displayManager.sddm.enable = lib.mkEnableOption "SDDM setup";
config = lib.mkIf cfg.enable {
services.xserver.displayManager.sddm = {
enable = true;
theme = "sugar-candy";
};
environment.systemPackages = with pkgs; [
packages.sddm-sugar-candy
# dependencies for sugar-candy theme
libsForQt5.qt5.qtgraphicaleffects
libsForQt5.qt5.qtquickcontrols2
libsForQt5.qt5.qtsvg
];
};
}

4
pkgs/default.nix Normal file
View file

@ -0,0 +1,4 @@
{ pkgs }:
{
sddm-sugar-candy = pkgs.callPackage ./sddm-sugar-candy {};
}

View file

@ -0,0 +1,51 @@
diff --git a/theme.conf b/theme.conf
index f39fb68..8f3256d 100644
--- a/theme.conf
+++ b/theme.conf
@@ -1,6 +1,6 @@
[General]
-Background="Backgrounds/Mountain.jpg"
+Background="Backgrounds/Colorful Dune.jpg"
## Path relative to the theme root directory. Most standard image file formats are allowed including support for transparency. (e.g. background.jpeg/illustration.GIF/Foto.png/undraw.svgz)
DimBackgroundImage="0.0"
@@ -9,8 +9,8 @@ DimBackgroundImage="0.0"
ScaleImageCropped="true"
## Whether the image should be cropped when scaled proportionally. Setting this to false will fit the whole image instead, possibly leaving white space. This can be exploited beautifully with illustrations (try it with "undraw.svg" included in the theme).
-ScreenWidth="1440"
-ScreenHeight="900"
+ScreenWidth="1920"
+ScreenHeight="1080"
## Adjust to your resolution to help SDDM speed up on calculations
@@ -44,7 +44,7 @@ MainColor="white"
## Used for all elements when not focused/hovered etc. Usually the best effect is achieved by having this be either white or a very dark grey like #444 (not black for smoother antialias)
## Colors can be HEX or Qt names (e.g. red/salmon/blanchedalmond). See https://doc.qt.io/qt-5/qml-color.html
-AccentColor="#fb884f"
+AccentColor="#268bd2"
## Used for elements in focus/hover/pressed. Should be contrasting to the background and the MainColor to achieve the best effect.
BackgroundColor="#444"
@@ -84,7 +84,7 @@ ForceLastUser="true"
ForcePasswordFocus="true"
## Give automatic focus to the password field. Together with ForceLastUser this makes for the fastest login experience.
-ForceHideCompletePassword="false"
+ForceHideCompletePassword="true"
## If you don't like to see any character at all not even while being entered set this to true.
ForceHideVirtualKeyboardButton="false"
@@ -96,7 +96,8 @@ ForceHideSystemButtons="false"
AllowEmptyPassword="false"
## Enable login for users without a password. This is discouraged. Makes the login button always enabled.
-AllowBadUsernames="false"
+## set to true to not capitalize my username
+AllowBadUsernames="true"
## Do not change this! Uppercase letters are generally not allowed in usernames. This option is only for systems that differ from this standard! Also shows username as is instead of capitalized.

View file

@ -0,0 +1,19 @@
{ stdenv, fetchFromGitLab }:
stdenv.mkDerivation rec {
pname = "sddm-sugar-candy";
# latest master commit, no recent tags :(
version = "2b72ef6c6f720fe0ffde5ea5c7c48152e02f6c4f";
dontBuild = true;
installPhase = ''
mkdir -p $out/share/sddm/themes
cp -aR . $out/share/sddm/themes/sugar-candy
'';
patches = [ ./custom-conf.patch ];
src = fetchFromGitLab {
domain = "framagit.org";
owner = "MarianArlt";
repo = "sddm-sugar-candy";
rev = version;
sha256 = "sha256-XggFVsEXLYklrfy1ElkIp9fkTw4wvXbyVkaVCZq4ZLU=";
};
}