Compare commits

..

13 Commits

Author SHA1 Message Date
6fbe4bb98d Add darcs 2021-11-26 20:54:30 +02:00
a71ea2c566 Add htop 2021-11-26 20:17:55 +02:00
07137630f8 add jq 2021-11-22 20:36:42 +02:00
887a7ae17d mpv conifg 2021-11-20 22:19:25 +02:00
cdc7d4c2b8 Add mpv and youtube-dl 2021-11-20 22:06:05 +02:00
cf8ca88b20 Add pavucontrol 2021-11-20 21:58:19 +02:00
fcfae78e51 Configuration for enishen 2021-11-20 21:45:35 +02:00
b9a26e1817 Config for desktop 2021-11-20 21:37:25 +02:00
12cd312f38 Rename to omena 2021-11-20 21:25:10 +02:00
6bf5613c71 Add entr 2021-11-20 21:05:45 +02:00
061c47de75 Add direnv and fix prompt 2021-11-19 22:53:42 +02:00
fec9d083da Update 2021-11-19 22:49:29 +02:00
ab25eaed17 xmonad config 2021-11-19 21:16:56 +02:00
6 changed files with 487 additions and 28 deletions

View File

@ -1,5 +1,23 @@
{
"nodes": {
"easy-hls-src": {
"inputs": {
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1636606878,
"narHash": "sha256-rLxYl7iYP9vQhSvVlV2uRCdgrqKDz/vN1Z8ZmA8itkM=",
"owner": "jkachmar",
"repo": "easy-hls-nix",
"rev": "edd5710946d46ea40810ef9a708b084d7e05a118",
"type": "github"
},
"original": {
"owner": "jkachmar",
"repo": "easy-hls-nix",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1637014545,
@ -60,6 +78,21 @@
"type": "github"
}
},
"flake-utils_5": {
"locked": {
"lastModified": 1637014545,
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -233,11 +266,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1636886446,
"narHash": "sha256-4xsVM2H8CG3d/3V+GqDDLDOmb3kdrugbqKVyrg8Q/zc=",
"lastModified": 1637186689,
"narHash": "sha256-NU7BhgnwA/3ibmCeSzFK6xGi+Bari9mPfn+4cBmyEjw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5cb226a06c49f7a2d02863d0b5786a310599df6b",
"rev": "7fad01d9d5a3f82081c00fb57918d64145dc904c",
"type": "github"
},
"original": {
@ -247,6 +280,21 @@
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1615055905,
"narHash": "sha256-Ig7CXgE5C3mwtTVBl8nSTessa1oMAm6Pm/p+T6iAJD8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f3fc074642a25ef5a1423412f09946149237e338",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"pypi-deps-db": {
"flake": false,
"locked": {
@ -271,7 +319,51 @@
"myUrxvt": "myUrxvt",
"myVim": "myVim",
"myZsh": "myZsh",
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_3",
"xmonad-masser": "xmonad-masser",
"xmonad-module": "xmonad-module"
}
},
"xmonad-masser": {
"inputs": {
"easy-hls-src": "easy-hls-src",
"flake-utils": "flake-utils_5",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1637084914,
"narHash": "sha256-TTuEa8pngrydMP3nbjb4lT94+Cg6blOy1CjhpsxuIhs=",
"owner": "MasseR",
"repo": "xmonad-masser",
"rev": "837656a2d0c685619793fc282c90f59bf24e8494",
"type": "github"
},
"original": {
"owner": "MasseR",
"repo": "xmonad-masser",
"type": "github"
}
},
"xmonad-module": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1637345727,
"narHash": "sha256-mt7S6iIt6ethG6E9jF5xlhVpyhfEiEWZHKqNRj1JRgk=",
"ref": "master",
"rev": "8ba34427d36adbb276b4e3d6cd8245574918cdc0",
"revCount": 1,
"type": "git",
"url": "https://git.rauhala.info/MasseR/nix-conf-xmonad"
},
"original": {
"type": "git",
"url": "https://git.rauhala.info/MasseR/nix-conf-xmonad"
}
}
},

View File

@ -23,6 +23,14 @@
url = "git+https://git.rauhala.info/MasseR/nix-conf-urxvt";
inputs.nixpkgs.follows = "nixpkgs";
};
xmonad-module = {
url = "git+https://git.rauhala.info/MasseR/nix-conf-xmonad";
inputs.nixpkgs.follows = "nixpkgs";
};
xmonad-masser = {
url = "github:MasseR/xmonad-masser";
inputs.nixpkgs.follows = "nixpkgs";
};
kobodl = {
url = "github:MasseR/nix-kobodl";
};
@ -38,10 +46,12 @@
selfModules ++ [
inputs.myZsh.nixosModule
inputs.myUrxvt.nixosModule
inputs.xmonad-module.nixosModule
];
overlays = [
inputs.myEmacs.overlay
inputs.myVim.overlay
inputs.xmonad-masser.overlay
];
homeConfigurations =
@ -67,7 +77,53 @@
{
programs.home-manager.enable = true;
imports = self.nixosModules ++ [
./macbook/masse.nix
./omena/masse.nix
];
};
};
"masse@freya" = home-manager.lib.homeManagerConfiguration {
system = system;
homeDirectory = "/home/masse";
username = "masse";
stateVersion = "21.05";
pkgs = import nixpkgs {
system = system;
overlays = self.overlays ++ [
(final: prev: {
kobodl = inputs.kobodl.packages.${system}.kobodl;
})
];
};
configuration = {pkgs,...}:
{
programs.home-manager.enable = true;
imports = self.nixosModules ++ [
./freya/masse.nix
];
};
};
"enishen@freya" = home-manager.lib.homeManagerConfiguration {
system = system;
homeDirectory = "/home/enishen";
username = "enishen";
stateVersion = "21.05";
pkgs = import nixpkgs {
system = system;
overlays = self.overlays ++ [
(final: prev: {
kobodl = inputs.kobodl.packages.${system}.kobodl;
})
];
};
configuration = {pkgs,...}:
{
programs.home-manager.enable = true;
imports = self.nixosModules ++ [
./freya/enishen.nix
];
};
};

16
freya/enishen.nix Normal file
View File

@ -0,0 +1,16 @@
{lib, pkgs, ...}:
let
in
{
home.packages = with pkgs; [
];
imports = [
];
}

View File

@ -1,34 +1,53 @@
{ config, pkgs, ...}:
{config, lib, pkgs,...}:
{
programs.command-not-found.enable = true;
home.keyboard.layout = "fi";
home.packages = with pkgs; [
pass
vifm
qutebrowser
kobodl
myEmacs
calibre
okular
gimp
inkscape
gwenview
myVim
myEmacs
firefox-bin
];
services.flameshot = {
enable = true;
};
services.syncthing = {
enable = true;
tray = false;
};
services.xcape = {
enable = true;
mapExpression = {
"Hyper_L" = "Tab";
};
};
home.file.".xprofile".text = ''
xmodmap ~/.Xmodmap
'';
services.emacs = {
enable = true;
package = pkgs.myEmacs;
};
services.flameshot = {
enable = true;
};
home.file.".Xmodmap".text = ''
remove Lock = Caps_Lock
add Lock = Escape
keysym Caps_Lock = Escape
keysym Escape = Caps_Lock
services.syncthing = {
enable = true;
tray = false;
};
programs.mac-keys.enable = true;
keycode 23 = Hyper_L
keycode 255 = Tab
'';
programs.git = {
enable = true;
userName = "Mats Rauhala";
@ -58,13 +77,13 @@
};
};
};
programs.gpg = {
programs.ssh = {
enable = true;
settings = {
"default-key" = "2104943D6033C8F4F7D4F560BDA6DFEDBCFB6779";
"default-recipient-self" = "";
"keyserver-options" = "auto-key-retrieve";
# controlMaster = "yes";
# controlPersist = "10m";
forwardAgent = true;
matchBlocks = {
};
};

156
omena/masse.nix Normal file
View File

@ -0,0 +1,156 @@
{ config, pkgs, ...}:
{
nixpkgs.config.allowUnfree = true;
programs.command-not-found.enable = true;
home.keyboard.layout = "fi";
home.packages = with pkgs; [
pass
vifm
qutebrowser
kobodl
htop
yt-dlp
darcs
jq
pavucontrol
direnv
entr
myEmacs
myVim
];
programs.mpv = {
enable = true;
config = {
"script-opts" = "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp";
force-window = true;
ytdl-format = "bestvideo+bestaudio";
};
};
services.emacs = {
enable = true;
package = pkgs.myEmacs;
};
services.flameshot = {
enable = true;
};
services.syncthing = {
enable = true;
tray = false;
};
programs.mac-keys.enable = true;
programs.git = {
enable = true;
userName = "Mats Rauhala";
userEmail = "mats.rauhala@iki.fi";
signing = {
key = "2104943D6033C8F4F7D4F560BDA6DFEDBCFB6779";
};
ignores = [
"env"
"*.swp"
"*.swo"
"*.orig"
"*.crt"
"*.key"
"*.log"
"tags"
"result"
"*.pub"
"*.db"
"*.sqlite"
".projectile"
".dir-locals.el"
];
extraConfig = {
push = {
default = "simple";
};
};
};
programs.gpg = {
enable = true;
settings = {
"default-key" = "2104943D6033C8F4F7D4F560BDA6DFEDBCFB6779";
"default-recipient-self" = "";
"keyserver-options" = "auto-key-retrieve";
};
};
programs.myZsh.enable = true;
programs.myUrxvt.enable = true;
programs.xmonad = {
enable = true;
dhallConfigPath = ./xmonad.dhall;
packages = with pkgs;
let
prompt = writeScriptBin "prompt" ''
${pkgs.haskellPackages.xmobar}/bin/xmobar ${xmobarConf}
'';
xmobarConf = pkgs.writeText "xmobar" ''
Config {
font = "xft:Iosevka-9"
, bgColor = "#3F3F3F"
, fgColor = "#DCDCCC"
, position = Top
, lowerOnStart = True
, commands = [
Run MultiCpu ["-t", "CPU: <total>%"] 30
, Run Memory ["-t", "Mem: <usedbar> (<cache>M)"] 3600
, Run Date "%a %b %_d %Y %H:%M:%S" "date" 20
, Run StdinReader
, Run Battery [ "--template" , "Batt: <acstatus>"
, "--Low" , "10" -- units: %
, "--High" , "80" -- units: %
, "--low" , "darkred"
, "--normal" , "darkorange"
, "--high" , "darkgreen"
, "--" -- battery specific options
-- discharging status
, "-o" , "<left>% (<timeleft>)"
-- AC "on" status
, "-O" , "<fc=#dAA520>Charging</fc>"
-- charged status
, "-i" , "<fc=#006000>Charged</fc>"
] 120
, Run DynNetwork [ "--template" , "<dev>: <tx>kB/s|<rx>kB/s"
, "--Low" , "1000" -- units: B/s
, "--High" , "500000" -- units: B/s
, "--normal" , "darkorange"
, "--high" , "darkred"
] 30
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% }{%dynnetwork% | %battery% | %multicpu% | %memory% | <fc=#FFFFCC>%date%</fc>"
}
'';
in
{
inherit qutebrowser flameshot calibre spotify hledger obsidian prompt;
hledger_ui = hledger-ui;
element = element-desktop;
signal = signal-desktop;
vim = myVim;
emacs = myEmacs;
urxvt = rxvt-unicode;
};
};
}

120
omena/xmonad.dhall Normal file
View File

@ -0,0 +1,120 @@
let Prelude =
https://prelude.dhall-lang.org/v20.1.0/package.dhall
sha256:26b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98
let Config =
/home/masse/git/xmonad-masser/dhall/package.dhall
sha256:8cca83716bc75d06cb22c7f45091606159404289d9866601817b2ab81170afcb
let pkgs =
{ qutebrowser = "@qutebrowser@"
, prompt = "@prompt@"
, signal = "@signal@"
, element = "@element@"
, emacs = "@emacs@"
, urxvt = "@urxvt@"
, flameshot = "@flameshot@"
, obsidian = "@obsidian@"
, vim = "@vim@"
, calibre = "@calibre@"
, spotify = "@spotify@"
, hledger = "@hledger@"
, hledger-ui = "@hledger_ui@"
}
let browser = "${pkgs.qutebrowser}/bin/qutebrowser"
let terminal = "${pkgs.urxvt}/bin/urxvt"
let prompt = "${pkgs.prompt}/bin/prompt"
let shellIn = \(path : Text) -> "${terminal} -cd ${path}"
let paths =
let pathElement = \(x : Prelude.Map.Entry Text Text) -> x.mapValue
in Prelude.Text.concatMapSep
":"
(Prelude.Map.Entry Text Text)
pathElement
(toMap pkgs)
let runOnTopic =
\(name : Text) ->
\(action : Text) ->
Config.Topic::{ name, action = [ Config.Command.Spawn action ] }
let spawn = Config.Command.Spawn
in Config::{
, path = paths
, applications = { terminal, prompt = prompt }
, topics =
[ runOnTopic "signal" "${pkgs.signal}/bin/signal-desktop"
, runOnTopic "element" "${pkgs.element}/bin/element-desktop"
, runOnTopic "xmonad" (shellIn "/home/masse/git/xmonad-masser")
, runOnTopic "adhoc" (shellIn "/home/masse/code_practice")
, Config.Topic::{
, name = "zettel"
, action =
[ spawn "${pkgs.obsidian}/bin/obsidian"
, spawn "${pkgs.vim}/bin/vim -g"
]
}
, runOnTopic "conf" (shellIn "/etc/nixos")
, runOnTopic "web" browser
, Config.Topic::{
, name = "ledger"
, action =
[ spawn
"${pkgs.vim}/bin/vim -g /home/masse/wikidata/accounting/2021.journal"
, spawn (shellIn "/home/masse/wikidata/accounting")
, spawn
( shellIn
"/home/masse/wikidata/accounting -e ${pkgs.hledger-ui}/bin/hledger-ui --watch --register checking -U -P"
)
, spawn
( shellIn
"/home/masse/wikidata/accounting -e ${pkgs.hledger-ui}/bin/hledger-ui --watch --register savings -U -P"
)
, spawn
( shellIn
"/home/masse/wikidata/accounting -e ${pkgs.hledger-ui}/bin/hledger-ui --watch --register lunchcard -U -P"
)
]
}
, runOnTopic "pdf" "${pkgs.calibre}/bin/calibre"
, runOnTopic "music" "${pkgs.spotify}/bin/spotify"
]
, bindings =
let mkCommand =
\(prefix : Text) ->
\(name : Text) ->
\(command : Text) ->
Config.SubCommand.act
{ prefix, name, command = Config.Command.Spawn command }
let mkSearch =
\(prefix : Text) ->
\(name : Text) ->
\(site : Text) ->
Config.SubCommand.act
{ prefix
, name
, command = Config.Command.Search { name, browser, site }
}
in [ mkCommand
"M-<Print>"
"Take a screenshot"
"${pkgs.flameshot}/bin/flameshot gui"
, Config.SubCommand.subMap
{ prefix = "M-s"
, name = "Search"
, sub =
[ mkSearch "h" "hoogle" "https://hoogle.haskell.org?hoogle="
, mkSearch "g" "google" "https://google.com/search?q="
, mkSearch "d" "duckduckgo" "https://duckduckgo.com/?q="
]
}
]
}